What it does
The product: what it does for the businesses that use it
Proposal Kernel is a multi-tenant SaaS for any service business whose work is tied to the things it services: tanks, homes, buildings, equipment. Each business is a tenant. It describes its own assets, the rules that decide what work each asset needs and its own rate card, and from then on a lead goes in and a priced, multi-year agreement comes out, delivered as a tracked web proposal with an identical PDF, signed electronically and written back to the business's own system, with the renewal generated when the term comes due.
Two real, differently shaped businesses run on the same code.
- A storage-tank compliance company, the first customer. Its 28 service rules are 23 compliance rules, each cited to the regulation that requires it (13 to state environmental regulations, 8 to US EPA, and the rest to county health codes), and 5 maintenance rules. Picking a customer's tanks is enough for the product to work out every legally required service and when it falls due. Its pricing reproduced a real signed three-year agreement line by line.
- A home-inspection business, the second. Its asset is a house, not a tank, with its own fields, its own lead-paint rule for homes built before 1978, its own flat per-service pricing unit and its own rate card. It reproduces that business's real estimates of $675 and $600.
What each business sets up for itself, all through the same configuration screens:
- Its assets: categories, custom field definitions (ten kinds: text, long text, email, date, date and time, whole number, money, yes or no, list and choice list, grouped as the business likes) and derived values. A derivation rule turns one field into another by date or number bands; the storage tank's regulatory category is derived from its install date and is never typed in.
- Its rules: each says which asset category it covers, when it applies, which service it requires, how often (twelve cadences, from weekly through every ten years, or once), whether it is compliance or maintenance work, and which regulator, agency and regulation it cites. A compliance rule cannot be saved without its citation.
- Its pricing: labor rates for each territory and time of day (business hours, after hours, weekends and holidays), each with a first-hour and an additional-hour rate; pricing units grounded per asset, by an asset count, as a flat fee or by a program quantity; size-banded rates; materials markup; contingency; volume discounts; and a minimum charge. Every amount is a whole number of cents. A labor rate, pricing unit or derivation rule cannot be used until someone approves that exact version, and the approval is bound to its content.
- How it sells: approval rules that route a proposal by deal size, by territory or because it carries compliance work; a renewal window in days before the term ends; and roles with permissions down to individual fields. Every new business starts with an Admin role and a least-privilege Rep role (create, edit, send, view engagement, ingest documents).
- How it looks and sends: its branding, logo, document structure (its own document form, from a narrative letter to a simple estimate), sending defaults and whether payment is collected or handed off.
- Its subscription: plan state and seats, kept current by Stripe.
The working day, end to end:
- A lead comes in. A live sync pulls customers, sites, assets and qualified leads from the business's own field-service system (the property suite's field-service app, his own product; see the property software suite), through its login and token refresh, with every response checked against a schema and any record naming another business refused and logged. Or a person uploads a PDF or Word document and Claude reads it, natively for a PDF, into customer, site and asset records for review.
- The proposal builds itself, in one of three modes: asset-driven, where the rules decide what each asset needs; non-asset, for program work not tied to an asset; and violation response, where an agency's citation becomes a diagnosis, then a corrective scope rolled into a proposal. It lays out a multi-year schedule, including three-year cycles anchored to a set year, prices every line, names the services the rules raised but the rep left out so the client knows what else it needs, and lays the result out as either a narrative letter or a bid sheet, the bid sheet also downloadable as an Excel file.
- Claude writes the narrative, the overview, scope, compliance and closing sections, through the Claude API (Claude Opus 4.8) with structured output against a schema and the fixed instructions cached. The facts it receives have no place to hold money, and a verifier rejects any price-like text, look-alike currency symbols included. A circuit breaker guards the call; when the AI cannot answer, the proposal carries a flag that blocks sending, so nothing goes out half-written.
- Review and approval. The proposal routes to the right approver; approval binds to the exact content's fingerprint, and any edit voids it. The send gate checks every named reason a proposal cannot go before it goes.
- Delivery. Each recipient gets a private link carrying a 256-bit token, stored only as its fingerprint, and a PDF made from the same render, both fingerprinted. Email goes through Resend.
- Engagement and follow-up. Opens, the sections each reader viewed, time on the page, and forwards are recorded per recipient, and a recipient's link can be revoked and reissued; a ranked follow-up queue tells the rep whom to chase next and where each reader stopped.
- Signature and write-back. The customer signs through SignWell; the signature record is frozen, the sent and signed states are written back to the business's own system through a retrying queue that never writes twice and sets aside what keeps failing, and an agreement record starts.
- Renewal. A daily job finds agreements entering their renewal window and generates the renewal proposal through the same path at current prices, never twice for one agreement.
What the product guarantees the businesses that use it:
- It never guesses. A missing rate, rule, asset field or price holds the proposal with a named reason from a closed list and routes it to a person, and the proposal reports which facts a rule needed and could not find.
- Nothing priced or legal moves without sign-off. Service rules and pricing rules are approved before use, and any later edit makes the approval stale; a professional sign-off, where a proposal needs one, is tied to the exact content and voided by any edit; nobody can forge a total, a narrative or an approval through an ordinary edit.
- The client keeps the exact document it saw. The rendered page and PDF are stored once with their fingerprints and checked for integrity, so no later change to the software can alter what was sent or signed. Proposal language lives in versioned service templates that are never rewritten in place.
- Each end customer is walled off inside a business, so one customer's assets can never price another customer's proposal.
- Every outside event counts once. SignWell and Stripe redeliveries are processed exactly once, and the sender address is verified before any email leaves.
- A full record. Every action is in an audit trail with lawful redaction and a retention period each business sets, and every refused action is recorded. Users sign in with scrypt-hashed passwords and can be disabled and re-enabled.
The admin application: a review queue, the follow-up queue, document ingest, a per-proposal engagement view, a rich-text proposal editor, and a screen for every kind of record, generated from the same declarations as the database.
Separation and onboarding: every business's data is walled off inside the database itself by forced row-level security, so no query can reach another business's customers or prices. Adding a business is one provisioning step, and the new business is separate from the moment it exists.
Built with: TypeScript, Hono, React 19 with TipTap, Postgres 18 with forced row-level security, pg-boss job queues, Zod, the Claude API, Playwright (one render for the web page and the PDF), Resend, SignWell, Stripe, Docker and Caddy.
The size of the whole system
- Application code: 75,003 lines in 367 files (counted at
mainfrom the tracked tree, with the shell, JavaScript and Python programs and the files with no ending, among themdeploy/Caddyfileanddeploy/Dockerfile, included). 34,026 lines in 213 files are the product itself insrc/; 9,878 lines in 28 files are the command programs inbin/; 16,196 lines in 46 files are the gate and check programs inscripts/; 2,188 lines in 9 files are the session hooks in.claude/hooks/. - Tests: 54,578 lines in 199 files, the shell tests included: 47,547 lines in 181 files in
tests/, 2,044 lines in 14 files of browser tests ine2e/, and the shell tests of the guards. The gate emits 1,804 tests (the figure on the scoreboard it writes). - Design kits and other tracked material:
design/holds 147 tracked files and 68,631 lines of captured reference designs (three kits: 71 files from one reference site, 61 from a second and 15 from a third's application);docs/holds 313 files and 56,966 lines;.github/16 files and 4,089 lines;domain/27 files and 4,757 lines of client-business truth;reports/6 files and 7,389 lines;spike/5 files and 771 lines;preview/6 files and 352 lines of viewer fixtures;ops/the wire-capture tool (wire.sh,wire.py, 308 lines). - Documents: 157,216 lines of Markdown and YAML (523 Markdown and 145 YAML files), 3,656 lines of HTML, 1,530 tracked files in all, 667 commits on the main line and 752 on all branches, as many as 94 in a single day.
- Data: 42 kinds of record, each declared once in
src/spec/entities/; migration version 39 (the scoreboard'sv39); a gate of 6 stages, 38 Doctor checks and 108 mutation baselines.
The declare-once kernel inside it (51 files, 3,352 lines in src/spec)
- The 42 declarations. One file per kind of record: agreement, app user, approval rule, asset, booking, category, contact, corrective action and its lines, customer, delivery, derivation band and rule, directive and its lines, engagement event, field definition, labor-rate schedule, lead, permission denial, pricing band, discount, rule and unit, proposal flag, line, service, year and proposal itself, render artifact, renewal policy, role, service rule, service template, signature record, site, sync rejection, template version, tenant billing, tenant settings, violation and webhook event. Two further example declarations, a booking and a contact, are the small worked cases the kernel was first proved on.
- The compiler of declarations (
src/spec,src/emit,src/db). From each declaration it emits the table, constraints (including a native no-double-booking exclusion rule), row-by-row security forced on every table, the audit and floor triggers, the validators and the stamps; the migration runner (src/db/migrate.ts,bin/migrate.ts) writes the stamps first. Further emitters produce the per-customer security that follows a customer anchor, the seal on the client anchor, the immutable columns, relation-scope security, delivery replacement rules, safe enum upgrades and per-customer extension columns. - The decompiler (
src/decompile, 298 lines) that rebuilds the declaration from the live database's catalogue; the engine (src/engine/engine.ts, 751 lines), the interpreted single write path; the job doorway (src/engine/jobs.ts, 682 lines) with its version-stamped queue; the tenant layer (src/tenant, per-customer fields as real columns) and the crypto module for the stored outbox body. - The generated screens (
src/ui, 9 files, 907 lines): layout, renderers and field renderers derived from the declarations, the theme and design tokens, the subsetted fonts, and the humanising of machine names for people.
The product engine (48 files, 8,071 lines in src/engine; no AI in any of it)
- The pricing engine and the schedule builder. Money is whole cents, never a float. Prices come from declared bands, rules, units, discounts and labour-rate schedules; the schedule builder lays the priced services across the years of an agreement; the proposal's totals reconcile to its lines.
- The service-rule engine, the appliesWhen predicates and the derivation rules. Which services an asset requires is decided by rules kept as data per customer. A derived fact, such as a storage-tank's regulatory category, is computed on read from the install date (the category is never stored), and a tenant's own derivation bands turn a source attribute into a derived one without engine code.
- The assemblers. One joins the pure leaves into priced asset lines; one prices the programme and non-asset services; one builds the notice-of-violation proposal; a completeness guard blocks and flags a proposal that lacks a rate, a rule or a measurement.
- Block-&-flag, with a declared vocabulary. Every written reason a proposal is blocked comes from one vocabulary of reason codes declared once, built only through its own constructors.
- Approval. A routing decision picks the approvers by deal size, territory zone or flagged state; the approval cut is decided on a canonical content fingerprint shared by every door; the approve step is one function used by all five places that approve.
- The send gate and the lock and signature doors. The send gate (368 lines) checks eleven named reasons for refusal;
lockis the only door into the locked state andrecordSignaturethe only door into the signed state. - The AI narrative path. The facts object holds no place for money; the narrative verifier (strict shape, known section slots, refusal of anything price-like) treats every model output as untrusted data; the orchestrator (340 lines) turns engine facts into a verified draft.
- Engagement and follow-up. An event-sourced summary of first open, per-section views, time-on-page and distinct viewers per recipient; follow-up ranked as opened-but-stalled, then sent-never-opened aging, then recently active; the renewal-due decision (an agreement is due when today reaches the term end minus its renewal window).
- The ingest mapper, the permission model (one declaration of the authorisation decision, read by the web layer's default-deny middleware, the data provider's field gates and the admin screens), the circuit-breaker decision over a sliding window of dependency outcomes, the client-scope and client-agreement guards, the relation-scope guard, the stored-form comparison done by the database, the action tokens, and the named refusal types (stale intent, deploying, verifier refused, token expired, proposal frozen and others, each mapped to what the person sees).
The application services (29 files, 4,909 lines in src/app)
- Proposal generation from a lead (407 lines) and the snapshot reader that reads a proposal's frozen, engine-computed snapshot.
- Send, delivery and tokens. The send service; the delivery service (491 lines) and its token store with a per-attempt lock; per-recipient links stored only as fingerprints (the raw value exists only in memory); the sending identity (the one address every proposal email goes out from); the null outbox that truthfully records "delivered to null"; the recipient-visit queue that records first opens exactly once.
- The viewer, the document spine and engagement. The server-side viewer resolution; the per-customer document spine (a formal narrative letter for one business, a simple estimate for another); the engagement service.
- Webhooks and write-back. The SignWell webhook handler (276 lines) and the Stripe webhook handler (204 lines), each the whole security surface of its webhook; the write-back service that records sent and signed state in the system of record; the renewal scheduler on a timed job; the workers.
- Operations. Tenant provisioning (the one onboarding path), audit redaction (the one lawful removal of an audit payload), the breaker guard that wraps every outside call, the artifact-integrity check that a stored file is byte-identical, and the composition root that builds the whole object graph from configuration.
The connections to outside systems (14 files, 2,284 lines in src/adapters)
- A connector to his own field-service systems (the three that he owns), founded on recorded captures of the real calls; the Anthropic generator for the narrative; the document ingestor for uploaded documents and Word files; the proposal renderer and the time-and-materials sheet renderer that make the PDF from the same source as the web page; the Resend email sender; the SignWell e-signature provider; Stripe billing; and a live-journey browser. Each has a null version that records truthfully, and each has a contract test file.
The web layer and the admin (10 files, 1,701 lines in src/http; 21 files, 3,064 lines in src/admin)
- HTTP. Routes behind default-deny authorisation, cross-site-request protection, rate limiting, a uniform response envelope, recipient-token denial, the viewer chrome and a data provider.
- The admin application (15 interface files, not Next.js pages): sign-in, dashboard, the review queue, follow-ups, ingest, proposal generate, the proposal editor with its pricing panel, generic list and form screens built from the declarations, the status pill and the layout.
The seeded businesses (10 files, 3,615 lines in src/seed)
- The first customer's real profile, its service rules and users; the tank schema; the real signed three-year agreement as a seeded render target, with its own agreement test; the second, differently shaped business, anchored on two committed PDFs of $675.00 and $600.00; and the provisioning and approval seeds.
The enforcement estate (scripts, bin, hooks)
- The gate (
bin/gate.sh, 6 stages), the Doctor (bin/doctor.ts, 38 violations driven through the running system), prove-bites (bin/prove-bites.mjs, 15 illegal declarations), the secret-scan proof, and 46 programs inscripts/: the build-unlock check, the corpus stamp check, the rule-citation check, the journey-to-corpus agreement test, the scope-conservation check, the licence gate, the vision-document linter and its self-test, the size and craft checks, the Lighthouse gate, the design-lint and design-approval programs, the currency detectors and their mutation fixtures, the exit-code contract check, the lessons tool, the issue-cluster census, the absence proof, the scoreboard emitter, the review gate and the guard bite runner. - Nine session hooks (2,188 lines): trunk guard, trunk finish gate, pull-request preflight and finish warning, rule surfacing, lesson surfacing, the source-product guard, the design-replication guard and the subagent orientation hook.
- The Codex governance kernel (
bin/codex-kernel, 12 files and 5,943 lines, with 12 test files and its own mutation gate): contracts, controller, evidence, genesis, host authority, leases, ledger, process, resume support, role support, state and workspace. - The protective estate as a whole: the gate, the fifteen compile proofs, the Doctor, the decompiler, the leak test, the linters, nine session hooks, the finding gates with their 104-case test suite, and the two examiners (the Doctor inside the product's own gate and the independent examiner in the examiner).
- Test fixtures and fakes.
tests/carries 11 folders of fixtures, 10 contract test folders and 8 folders of fakes beside the unit tests, and.github/testsa fakeghcommand with the finding-gate test that runs six live decision bodies. - Three workflows under
.github(design approval, finding gates, the gate) and mutation-testing configurations for the money path and for the Codex kernel.
The rule set and the documents
The golden gate (PK-GOLDEN-0). The independent examiner's scored test of the product: 88 assertions, anchored on the real signed agreement's artifacts and driven through the product's real HTTP path, never a hand-built sample.
The build order in arcs. The executable order of building is a decision record, derived blind by the senior-takeover protocol, hardened by an adversary, with the generality forcing function threaded through every arc; its entry point is ARC 1a, with a written packet (
docs/build/slices/ARC-1A-PACKET.md). Scope closed by the rails. Slice pickup documents (1C to 6 and Stage C) and the reviewed packet arc sit beside it.One repository of record. The approved blueprint, the decision ledger and the 12 certified domain contracts live in the repository with their history kept (PR 6), and nine binding governance rails sit in
CLAUDE.md(PRs 7 and 8).The KERNEL-2 re-key plan and its reversible KERNEL-2A change (PR 4); the captured-reference admin replication and the machine-global prove-absence promotion.
The twelve-domain rule set: 11,922 lines in twelve files (12,426 lines with the registry, the domain map and the decision resolutions), each rule with its Oracle, and fact files in JSON.
THE CLIENT ASK (382 lines), THE JOURNEY (604 lines: eleven first-day steps A1 to A11, the return day B1 to B16 with B6a and B14a, and the surfaces underneath), the authority law and the approved blueprint, the requirement-preservation ledger, 27 decision records, the memory-notes system, the issue protocol, the live-review runbook and the wire captures.
Production hosting: database, application and encrypted web edge as separate containers (
deploy/), with a server admission gate that tests itself before any deploy.
What it achieved
- Pricing: a real signed three-year agreement reproduced line by line, and a second business's real estimates of $675 and $600 through the same code.
- 42 kinds of record, each from one declaration; 15 illegal declarations rejected by the compiler on every run; 38 violations refused by the running system; 1,804 tests; a 95.49% mutation score on the money path with both businesses installed.
- Scale of the organisation: one unattended session in which an orchestrator chained 22 agents through ten phases on five turns from him; a 58-session programme that wrote and certified the rule set, checking 963 citations; 81 lead sessions in the record; up to 12 helpers at once.
- 667 commits on the main line and 752 across all lines, 655 tracked issues, 27 decision records, 167 full reports from fresh-context reviewers, 99 recorded lessons, 214 examiner receipts.
- His own direction across the record: 791 typed turns.
The problem it solves
- In ordinary business software one fact, such as a phone number, is typed by hand in about fourteen places that must agree, and the bugs live where two copies differ. AI is reliably bad at exactly that wiring.
- An AI produces work that looks done and has no inner signal for true against plausible. He judges the work by the evidence machines produce rather than by reading every line, so an agent's confident summary is the most dangerous thing in the project. Every judgment of the work therefore has to come from a machine or from a second party, never the builder.
- Observational identity. With one customer in the system, software hard-coded to that customer and software any customer can configure produce byte-identical output. No test, screen or demo can tell them apart, so an AI takes the shorter path and nothing catches it. He turned that into the forcing function below.
- The word "MVP" is itself an instruction to cut. To an AI it means minimum, defer and do not over-build, and every later cut then looks consistent. He removed version language from the project.
- Planning documents that carry a wrong decision re-infect every new agent that reads them, and they protect themselves with phrases that forbid questioning. So documents are corrected before code.
- An AI will offer an option that breaks a fixed rule as a balanced "Option B". One did, proposing a base whose licence would have forced the client to publish the product's source. He ruled that such an option is not a choice and is never shown to him as one.
- A check that has never been seen to fail proves nothing, and an AI describes its own safeguards as stronger than they are.
- An agent will report its work verified after checking it against a hand-built sample the real product could not produce. He had a buyer-side audit run through the real path, and turned what it showed into external truth, receipts, and the examiner outside the builders' reach.
- AI-written summaries of what a client wants narrow it, and agents then use those summaries to argue the scope down. He had the request rebuilt from the original sources.
- Written rules get skimmed. He moved those rules out of prose and into blocks that act before the command runs.
- A role that only writes reports protects nothing. A role has to be able to say no and stop the work.
- The mirror-scar overcorrection. A loud failure trains agents to overcorrect into the quiet one, such as making a certified part of the product conditional on demand and bringing him a scope question. He closed scope by rule.
- Findings written as report files have no state, no identity and no link to the fix, so findings became issues.
How he built it
Correctness by construction: a wrong build cannot compile or run
- The declare-once kernel (one declaration per fact). Each kind of record is declared once, in one specification file; there are 42. The table, its constraints, its per-customer security, its audit triggers, its validation and its screens are all derived from that file, so there is nothing for an AI to forget. Where a second copy cannot be avoided, a test pins the two together in the same commit. The kernel has its own page (the declare-once kernel).
- Dropping a field is a compile error. Screens are generated from the same declaration. A screen that leaves a field out does not build, and a new field appears on its list and form with no per-screen work.
- Illegal states will not compile, and the gate proves it on every run. Fifteen deliberately illegal declarations are kept in the project: a field type outside the allowed set, a freeze rule that could never fire, a uniqueness rule over nothing, a list column that does not exist, a screen missing a field. The compiler must reject each one by name; if one ever starts compiling, the gate fails. His name for the tool is prove-bites.
- The start-up check (stamp first, then the boot handshake). Every declaration has a fingerprint. The fingerprints are written into the database first, in the same step that changes it, and a changed declaration is refused without a new numbered migration. At start-up the program compares its declarations with the stamps and refuses to serve when anything has drifted.
- The version-stamp funnel. The same fingerprint guards every other doorway: a queued background job from an older version is parked in plain sight and never run, a browser tab opened before a change is refused, and an emailed link is replayed through today's checks.
- The audit-trigger floor. Every write, including one typed by hand at the database console, must truthfully state who is acting, which action and which declaration version, or the database itself refuses it.
- The interpreted single write path. Every change goes through one path: validate, verify with a pure function, write, and queue follow-on work in the same step. No behaviour code is generated per record, so a guarantee added there holds for every record, present and future.
- History by construction. An append-only audit trail and a command log record every change and the intent behind it. Neither can be edited or deleted, and a lawful redaction records itself.
- Dissimilar enforcement. Each catastrophic rule is enforced twice by unlike machinery, once in the program and once in the database, so one being wrong cannot let a violation through.
- The decompiler. A separate program reads the running database's own catalogue, rebuilds the declaration from what is really there, and compares it with the source. It shares no code with the part that generated the database, so the two cannot be wrong in the same way. A column altered by hand is found and named.
- Zero cross-client contamination (the sacred invariant). One customer's data or prices can never reach another's. Row-by-row security is forced in the database on every table, the application connects as a role that cannot bypass it, and a second connection exists only for migrations. The leak test was proved by switching the protection off and watching one customer see another's row.
- Per-tenant real columns. Each customer company defines its own asset types and fields as data. They become real typed columns through the same declared path, with the same security, stamps and audit, and never an untyped catch-all.
- The Doctor. A program that drives 38 real violations through the running system (an unstamped write, a cross-customer read, a tampered audit row, a replayed link, a missing price) and requires each to be refused with the exact error. His rule for it is "demonstrate, don't claim".
What the AI must treat as true
- The authority law. A closed order of eight ranks: his current decisions, then signed outside documents and real business records, the approved blueprint, the audit, the roadmap, his standards, the code, and last, anything an agent has claimed. Code is the defendant: it shows what is, never what was meant. Ten laws sit under it, each earned by a named failure, among them that no summary may outrank its primary artifact, that receipts outrank status prose, and that conflicts are recorded and never silently resolved. Agents may propose changes to this law and may not enact them.
- The domain rules (the certified corpus). Twelve files, 11,922 lines, stating every procedure, business rule, state change, refusal and exact error message the product must have. They were written from the approved blueprint and never from the code, by a contracts-first pipeline: one fresh author per domain, a different fresh reviewer grading each, a final panel, and his stamp. The stamp binds the exact bytes, so a rule changes only by his re-certification. Where a rule says one thing and the code another, the code is wrong.
- The Oracle. Every rule carries the exact list of what a test must assert to prove it, so a builder's acceptance criteria are written before the builder starts, and a review that cites no rule number is not a review.
- THE CLIENT ASK. The statement of what the client contracted for, rebuilt from primary sources only: his own typed instructions, the recorded conversation with the client, and the client's demo notes. It sets out fifteen families of features as a contract and records step by step how AI documents had narrowed the request, so it cannot happen silently again. For each family an agent must establish whether the rules specify it, decided against it on the record, or are silent, and silence is a defect in the rules, never a decision.
- Operator-voice. A decision counts only when he typed it himself, in his own words, as the answer to one plain question. Text pasted from another chatbot is advice, and recording it as his decision is a defect.
- Operator testimony. A figure he states about his own work is testimony. It is never re-measured, argued with or dropped.
- The stamp check. The gate confirms on every run that the rule set's bytes still match the digest he approved, so a rule edited after certification cannot go on reading as certified.
- The rule-citation gate. A change to product code must name the rule that governs it, or state in writing that it changes no behaviour.
- The agreement test for steering documents. The journey document quotes 60 certified sentences and 57 rule numbers; a program compares every one with the rule set, so the copy cannot drift.
- One copy of the law. The second instruction file other AI tools look for is a pointer to the first. Anything that tells an agent how to work here is tracked in the repository.
- Supersede, never delete. A false claim stays in the record under a dated correction banner, and a replaced plan is kept with a pointer to what replaced it.
- Never invent a price (block-&-flag). Where a rate, a rule or a measurement is missing, the proposal is written as blocked with flags naming exactly what is missing. There is no default and no estimate. Money is whole cents and every total reconciles to its lines.
- External truth. The product's output is judged against a real signed contract, clause by clause, and against a second business's real estimates. A total, a count or a summary may never stand in for the document.
- No hand-built samples. Every tier of testing must include a path that takes the product's own seeded data through the entry point a client would use. A sample built by hand is banned.
- Production reachability. Every exported procedure must be reachable from a declared entry point, so code that exists but nothing calls shows as a failure.
- Parked means loud. Every background step has a declared failure state that shows on the record and on the operator's console. A proposal whose delivery stalled is not "sent".
- The wire law. A claim about what an outside system returns is inadmissible without a recorded capture of the real call. Reading that system's source shows what was intended; only the wire shows what it does. He had the capture tool built so that measuring costs less than guessing. The systems it calls are his own, calling them with real credentials is the mandate, and agents may read from them, never write, and never make 58 requests where one returns everything.
- Absence needs proof. "It isn't there" is not accepted without the absence-proof tool.
- No MVP shrinkage; scope is closed. The whole product is specified and only the order of building is open. A requirement-preservation ledger is the closed list of what is owed; removing a row takes his recorded decision. Agents never bring him a scope question, and no capability may be made conditional on a customer or on further confirmation.
- Narrowing by silence. A document that lists less than what is owed is a defect in that document, to be fixed by adding the step, and never a lower bar.
- The vision invariants (V1 to V11). Eleven must and must-not statements distilled from the vision, used as the fixed rubric a fresh reviewer grades every plan against. An option that breaks one is ruled out and reported as ruled out, never offered to him.
- The licence gate (V11). The product is the client's own property to sell, so only permissive licences may enter it. A dependency outside the allowed list fails the gate.
- A build plan may sequence the design, never re-decide it.
- Prove by spike. The one open architecture question, how each customer's own fields are stored, was not settled from a document. It was settled by a throwaway build with two differently shaped customers in its own database, checked by the lead and a fresh adversary.
What the AI is blocked from doing
- The forcing function: a second, differently shaped real customer. A second real business, with different assets, rule forms, pricing units and document lines, is installed in the tests as a permanent requirement on every stage of work. Hard-coding for the first customer now fails physically, so the general design is the cheapest way through. A further check fails if any industry's asset is written into the product as a fixed type.
- The language of narrowing. A linter fails any planning document that contains the phrases that mark a scope cut or forbid questioning: "MVP", "for now", "phase 2", "defer until a second tenant", "do not re-litigate".
- Scope conservation. A program compares every build-order decision with the closed list, so a quiet narrowing shows as a failure. A decision takes effect only once it sits in the repository, having gone through that check.
- Money is unrepresentable in what the AI writer sees (the lethal-trifecta cut). The AI drafts prose only. The one object it ever receives has no place to hold a rate, a total or a discount, and adding one is a compile error, proved on every run. Its draft is treated as untrusted: a fixed checker refuses any text that looks like a price before the draft can enter a proposal. The AI has no ability to send anything.
- The send gate. One pure function owns what "sendable" means. It checks eleven named reasons for refusal on every attempt and writes every failed one onto the proposal. The database will not let a proposal become "sent" through any other door. An approval is pinned to a fingerprint of the exact content approved, so an edit afterwards voids it.
- The trunk law. One working copy on one branch. Hooks in the agent's session refuse a forbidden command before it runs: creating a branch, making a side copy, stashing work. Another blocks ending a turn with unsaved or unpushed work, and another reports stranded work when a session starts. Each rule has its own test showing it blocks and allows correctly.
- The build unlock. Product code cannot be edited until a reviewed plan exists. The unlock is re-derived each time and never cached.
- No review record, no commit. A commit of product code must name its slice and carry a recorded review, or the gate refuses it.
- No new repositories, copies or sibling folders without a plain proposal and his typed yes.
- The rule set is read-only to the build. A builder who thinks a rule is wrong files that as a defect in the rules. Narrowing a rule to fit the code is forbidden.
- Rail promotion and failure→block. A written rule broken once becomes a mechanical block in the same session, and each block's documentation cites the incident and what it cost.
- The gate. Six stages in fixed order: build unlock, type check, lint, tests on a real database, prove-bites, the Doctor. A stage that ran nothing cannot count.
- The verdict is the exit code. A gate's answer is the code it exits with and its failure summary, never a trimmed slice of its output.
- Every check carries a planted failure. A fake secret must trip the secret scan, a page with a known fault must fail the accessibility check at three screen widths, and a deliberately slow page must fail the speed budget.
- Two options on any error. Fix the root cause, or stop and say what happened. Silencing the signal, by a skipped test or a suppressed type error, is forbidden and blocked.
- The salvage rule. Nothing is cleaned up while any work is reachable only from it; it is tagged first. Fifty-two salvage tags preserve work, and squash merges are switched off so every commit of a build keeps its place in the history.
- The craft ratchet. Limits on nesting, size and complexity that can only tighten, because agents copy the worst code they can see.
- Rules reach every helper. He had it measured which kinds of helper agent never receive the project's instructions, and added hooks that hand them the pointer to the rules at launch and before any edit to product code.
- Replicate, don't author. Screens are replicated from captured reference designs kept in the repository and checked by computed-style comparison, not designed afresh by an agent.
Who checks whom
- The Five Laws. Prove it, don't assert it. Run it, don't read it. Producer ≠ reviewer. Verify the artifact, not the summary, and never relay. Two options on any error.
- The immune system, built first. The six guards that defend the build (document lint, licence policy, planted-failure controls, the build unlock, review records, commit discipline) were built and proved before product work resumed.
- Self-terminating setup role. The project began with a setup agent whose only job was to make the repository safe to build on, prove every inherited safeguard by watching it fail and recover, write the brief for the build agent, and stop.
- The plan gate and the review gate. From his standards: a fresh reviewer attacks a plan before any code is written and a second gate reviews the built work. Leaving out a check the plan should have triggered is itself the failure.
- Red→green bijection and the guard manifest. Every safeguard is registered with one input it must block and one it must allow, and both are re-run through the real entry point.
- The honest floor (Binding Rule 3). No safeguard may be described as a wall. Each one states what it proves and what it does not, because a false safety claim misleads an owner who trusts it.
- The self-driving loop. For each slice a fresh teammate builds, the lead verifies by its own hand, the lead breaks the new protection on purpose to prove the test bites, a fresh-context adversary attacks the result, and the work lands and is checked again on the exact landed commit. Builders and reviewers are named teammates working in parallel, each with a stated set of files it may write.
- The engineering team, each role defined by what it can refuse. Domain authority ("that is not what was asked for"), architect, conformance reviewer, craft reviewer ("badly built, and the ticket is irrelevant"), adversary, and the evidence officer, whose only question of any claim is whether the method used could have produced a failing result. Builders never grade their own work. Conformance and craft are separate gates. The orchestrator verifies facts, never forms verdicts and never relays a helper's summary as truth.
- The judgment gate. Before measuring anything, every role writes down what exactly is under judgment, against which two yardsticks, and what result would mean failure.
- Findings are GitHub issues. A finding is filed as an issue with a state, never as a report file. Gate A: no one may confirm their own finding. Gate B: no one may verify their own fix, and a fix needs both a conformance and a craft verdict. Gate C: a finding can be refuted only from a different identity and only by re-running its reproduction. Builders and verifiers act under two separate GitHub identities.
- The claim, never the reasoning. The role confirming a finding is given the claim and the thing itself, and never the finder's argument, because reading why someone believes a thing is how their frame is inherited. A partial confirmation is recorded as partial and does not promote the finding.
- cannot-determine. An agent that cannot tell says so and names the gap. That is a full result.
- Work the cluster, not the issue. Every finding is labelled by where it lives and what shape of cause produced it, so a shared cause is fixed once.
- The independent examiner . A separate repository where builders never write. It takes a fresh copy of the product at a named version and judges what it produces against the signed contract, clause by clause. It has its own page (the examiner.md`).
- The Codex governance kernel. A second controller that runs the whole loop inside another AI tool: an analyst, a builder, a verifier and an adversary, the last two each a new read-only thread, with a fixed program choosing the next legal step and an append-only ledger as the only record of state. The adversary is given the work without the verifier's reasoning. A run closes only after the gate, the browser proof, both fresh verdicts, the landing and a second gate on the landed commit. A child role can never start another governed run.
- The journey reviewer. A reviewer that opens the running software and walks the steps a change touched, capturing a screenshot and the console at each one. Pages built from synthetic data never count as this walk.
- The live-review runbook. A written, receipted procedure for standing the product up to walk it: each agent's own database on a port it picked, torn down afterwards, so agents working in parallel never share one.
- Fresh-context judgment routing. A load-bearing judgment is never made by the working session, which is biased toward finishing. It goes to a fresh agent and the ruling is saved.
- The senior-takeover protocol. An agent taking over stalled work starts blind, from the authority and the current state, never from the previous session's account of itself. It keeps a ledger of what it read and cites the rule that compels its decision.
- Mutation testing on the money path. Deliberate faults are planted in the pricing code and the tests must catch them.
How the truth reaches the owner as evidence
- CHANGE-DONE and PRODUCT-DONE. Two verdicts with two names, and an agent must say which it means. A change counts when the gate is clean before the commit and again on the exact landed commit. The product is judged only by a person's whole working day running end to end.
- THE JOURNEY. That working day written out in order, with the exact words the product must show at each step. Work on a screen is reviewed by opening the software and doing the steps.
- The number. Every claim carries the examiner's score at the start and the end, or says in plain words why it could not be measured. Status is computed from receipts and never typed.
- Operator-held checks. Two checks are his alone and no agent may replace or redefine them: a blinded side-by-side of the signed document and the product's version, and a recorded test with a stranger.
- The design-approval gate. A change that touches how a screen looks stays stopped until he has personally approved the exact screens it produces. The approval is bound to the content of those screens and of every file that draws them, signed by a key kept outside the repository, and recorded only after a fresh render answered a random challenge.
- Declare no-movement in advance. A piece of work not expected to move the examiner's score says so, and why, before it starts.
- No silent parking. Every session ends with its work landed and pushed, or a one-paragraph plain note of what was done and where it is.
- Decide, don't menu. Agents make the technical calls. Only a formed, plain question that is his to answer reaches him, anchored on something he can witness: a real number, a rendered document, a yes or no.
- The memory-notes system. A lesson is admitted only if it quotes a unique passage of a real file. The gate re-checks every quote on every run, and the lesson is shown to an agent the moment it edits that file. Lessons about behaviour sit in a separate, lower-trust tier.
- The shrink log. The pile of written notes is meant to get smaller, as each note graduates into a type, a constraint or a check that cannot be ignored.
- The distrusted handoff. The handoff file opens by telling the next agent to distrust it and verify each claim by hand. Above it sit his two recorded issues, which outrank everything else in the repository. The pickup prompt is a reading gate: an agent cannot get past it without showing what it read.
- The readiness census. The fifteen families turned into 97 conditions, each naming the evidence that would satisfy it, with a "not observable" class so nothing counts because nobody looked.
- The drift-proof scoreboard. Counts of tests, refusals and gate stages are emitted by the gate.
Named concepts
The named concepts, defined
Correctness by construction · The declare-once kernel · One declaration per fact · Dropping a field is a compile error · prove-bites · The audit-trigger floor · The version-stamp funnel · Dissimilar enforcement · The decompiler · The Doctor · Zero cross-client contamination (the sacred invariant) · Observational identity · The forcing function · The mirror-scar overcorrection · No MVP shrinkage · The language of narrowing · Narrowing by silence · Scope is closed · Requirement-preservation ledger · The vision invariants · The escape-hatch / false-choice · The Five Laws · Prove it, don't assert it · Run it, don't read it · Producer ≠ reviewer · Verify the artifact, not the summary · Never relay · Two options on any error · Red→green bijection · The honest floor (Binding Rule 3) · The immune system · The eleven rails · Operator-voice · Operator testimony · No silent parking · The number · Declare no-movement in advance · The salvage rule · Fresh-context judgment routing · Rail promotion · Failure→block · The authority law · Code is the defendant · Receipts outrank status prose · The domain rules · The certified corpus · Oracle · THE CLIENT ASK · The fifteen families · THE JOURNEY · CHANGE-DONE · PRODUCT-DONE · The trunk law · The wire law · Findings are GitHub issues · Gate A, Gate B, Gate C · Work the cluster, not the issue · cannot-determine · The judgment gate · The evidence officer · The self-driving loop · PK-GOLDEN-0 · The capability wall · The lethal trifecta · ProposalFacts · Never invent a price · Block-&-flag · The send gate · External truth · Production reachability · The design-approval gate · The memory-notes system · The shrink log · The craft ratchet · The readiness census · The senior-takeover protocol · The Codex governance kernel · The declare-once compiler · The Codex kernel trial · The twelve-domain rule set · The requirement-preservation ledger · THE JOURNEY steps A1 to A11 and B1 to B16
What it shows
He can design the software, the rules and the organisation of AI agents together, so that correct software is the only kind the organisation can deliver and the owner is told the truth about it by evidence the machine produces, never by the builder's summary.





