The Software Factory — Proof Before Commit
The Main Flow, End to End
"Done" a Program Can Check
Before v6.15, "done" meant an agent said so and a reviewer agreed. v6.15 makes done executable: every testable acceptance criterion carries a command, the run records that the command fails before any code exists, re-runs it after, and the commit helper refuses to commit unless a seal over the exact gated code says it passed.
One Epic, Start to Finish
/todowrites each story with averify:command per criterion and, where useful, anAfter:lineplan-check.jsvalidates the plan and derives the waves from the dependencies/run-todoopens a run record (run-record.js start), then for each wave:- writes the wave's tests and records the red run (
ac-verify.js red), then freezes them - dispatches the stories, each overlapping writer in its own worktree
- gates (
gate.js), then re-runs every binding (ac-verify.js run) - reviews the wave, fixes the findings, and seals (
ship-check.js seal) - commits through
commit.js --ship-check
- writes the wave's tests and records the red run (
- At the end of the core slice (when the TODO has a later slice) the run writes a release packet at the Ship gate and, unless the owner's go for the later slice is already recorded, stops for it
A failed gate feeds the failure ledger: the second identical failure gets one deep-tier retry, the third stops. A Budget line caps the whole run.
A Worked Example
The first real run, on an application we will call example-app, built one feature checklist (one TODO) of 19 stories — 17 core, 2 later — in 7 waves: five core waves, then the Ship gate, then one wave per later story. Its plan carried:
- 66
verify:bindings across 17 stories when the plan was written, and 79, all met, across 18 of the 19 stories by the end (one story was manual-only). Each test name starts with its criterion's tag and binds asnpm run test -- <file> -- -t "<tag>"; the second--is there because that project's root test script calls npm again - a Budget line,
attempts=3 gate-failures=10 dispatches=136 minutes=600— after the owner raised the minutes mid-run, recorded as an owner decision - an Owner Decisions table answered up front: run scope (core plus later), one production database migration authorized up front (each later migration in the run needed its own go), and "commit per wave locally, never push"
- a release packet at the Ship gate: the later-slice go had been recorded up front, so the run continued, and the owner's answer on pushing the core slice was recorded as "not yet"
Stories without verify: lines still run; they just get no command-level proof. Adding bindings through /todo is how a checklist earns the factory's guarantees. Migration to v6.15 needs nothing else.
In the main flow, when is the red run recorded?