How it works
The five-stage build cycle
Every build item follows five stages: Define, Build, Review, Test and Finalise. Each stage has its own hand and ends in a commit carrying its stage prefix, and each has its own check.
Once you unblock the first build, your agent takes work items from the queue one at a time. Each is delivered in rounds of five stages, in order. Every stage ends in a commit whose subject opens with the stage prefix, DEFINE:, BUILD:, REVIEW:, TEST: or FINALISE:, and every stage has its own hand, so the agent that writes the code is never the one that writes its tests or checks it. Before any Build starts, the RCF suite must be green on the base: rcf build base-suite --out <file> records that run, and every rcf build bundle needs the green record as --base-suite <file>.
The five stages
1. Define. Hand: test-author. Prefix: DEFINE:. The agent picks up the item's spec bundle, everything the chain knows about the work: its checks, its dependencies, its architectural context. The test-author writes the tests for every check in scope first, the acceptance and end-to-end tests and the test cases that point at them, and marks pickup with rcf build mark <fbs-id> inProgress. Each new test is red at the Define head with its failing assertion recorded, and the suite fails on exactly the new tests. Strict coverage must hold over them. The test-author never writes production code.
2. Build. Hand: builder. Prefix: BUILD:. Implementation, until the red tests pass, to the agreed checks and nothing beyond them. Wanting to add something the plan did not ask for is an escalation back to the plan, not an improvisation in the code, and a test that cannot pass without being changed is a stop for the owner, never an edit. As the code lands, the builder records which source files serve which checks, so the bridge between spec and code is written while the knowledge is fresh. The builder writes production code and its own housekeeping unit tests only, never a test for a check or the check itself.
3. Review. Hand: reviewer. Prefix: REVIEW:. The tree is re-validated, rcf audit separation judges each commit's stage prefix against the paths it touches, and rcf audit test-strength --record records how strong the touched checks' tests are. The reviewer re-reads the diff against every check in scope, judging on three classes only: harm to the buyer, a vacuous test, and a test or check the builder edited; everything else is a note. The test-strength report shows a gutted test whose mutants survive, and the reviewer judges it. rcf build verdict review records MERGE or FINDINGS for the code and PASS or FINDINGS for test adequacy as a file the REVIEW: commit adds. Separate from this stage, the fresh-context self-review runs between builds every few FBS items and once at the end: a reviewer with no memory of writing the code drives the running app against the item's checks. It reviews the product, not the diff.
4. Test. Hand: verifier. Prefix: TEST:. The verifier runs the full RCF suite against a locally running app serving the reviewed head, with nothing deployed, and records the result from the suite's TAP output with rcf build verdict test, a file the TEST: commit adds. The work merges only on a Review MERGE and a Test PASS at the same head. Any claim of "tested" made here names the runtime it ran against; a green suite is evidence about the runtime it ran on and nothing more.
5. Finalise. Hand: stage-keeper. Prefix: FINALISE:. On the pull-request branch, before the merge, with CI green on the PR head: rcf build finalise <fbs-id> --ci-run <ref> reads the round's recorded verdicts and writes complete. It checks the Review MERGE and adequacy PASS, the Test PASS at the same head, a test-strength record for that head covering every touched check, a source file recorded against every touched check, and the separation audit over the range. The test-strength record is a report: Finalise prints a line for each touched check whose result is fail or blocked and does not refuse on it. After a FINALISE: merge from main it also needs a green base-suite record at that merge, passed as --merge-suite <file>. Finalise runs nothing but git, never reads a verify report and never writes verified. The complete write is committed on the branch, so the merge carries it.
A failed Review or a failed Test closes the round, and the next round starts again at Define. Within a round the stages only move forward, and rcf audit separation fails a commit that steps back without a failed verdict.
The twelve rules
The cycle's contract is twelve rules, which ship in the package as RULE 13 of the harness block and in rcf guidance build-cycle. They cover the chain from requirement to recorded evidence; checks written only for promises to a buyer; a proof level chosen for each touched check at Define (full, journey or external); the five stages; the separation between the hand that writes code and the hand that writes its tests; the exit of Define, Build, Review, Test and Finalise; a round budget of two Define passes and a date; and one readiness pass on the spec before Build. The tool reports test strength and refuses on none of its results: the reviewer's adequacy verdict is the judgement.
Verified comes from a release Verify
The build cycle ends at complete. verified is written outside it, by a release Verify before the promote: rcf verify run --release <label> --since <ref> --record runs the bound end-to-end tests of the live external checks of every item changed since the last release, plus the smoke suites rcf/release-verify.json names, against the release candidate. The target is a URL, or a packed package that it installs cold, as a new user would. It writes rcf/verify-reports/releases/<label>.json and verified on each item whose external checks all passed. No Build waits for it. No production deployment is needed for the build cycle itself: Close the loop without a deploy walks the round on a local server and the release Verify against a preview host or a packed package.
Why every stage commits
The commit is the stage boundary. It makes the cycle auditable in history, and it keeps a failed stage cheap to unwind: rolling back a bad review costs the review, not the build. A stage without its commit is not finished, by definition.
Why the cycle only moves forward
An item's lifecycle runs notStarted, inProgress, complete, verified, and the tooling refuses backward transitions outright, with a distinct exit code for the refusal. rcf build mark goes no further than inProgress: complete is written only by Finalise and verified only by a release Verify, so marking either is refused. That is a design decision, not a limitation. If finished work needs reopening, something upstream changed, and the honest route is to change the chain: reopen the plan, adjust the checks, let impact name everything the change touches. An amend round on a complete or verified item is bundled with rcf build bundle <fbs-id> --acs <ids>. Moving status backwards without recording the changed intent obscures the history. There is a deliberate manual override for genuine corrections, and reaching for it should be rare enough to be remarkable.
Self-review is not verification
The checks at the end of the loop are easy to conflate and deliberately distinct. The fresh-context self-review is the cheap, in-loop check between builds: same machine, driving the app against its checks. The Test stage is the verifier hand running the full suite against the reviewed head, with authority to refuse the merge. The release Verify runs the end-to-end tests of the external checks against the release candidate, and it alone writes verified. Self-review checks the work between builds. The recorded Test verdict gates the merge, and the release Verify provides the evidence for verified status.
The full stage-by-stage guidance the agent works from, entry and exit contracts, escalation rules, failure modes, ships in the package and is published verbatim at the build-cycle playbook. The refusal codes are tabulated at exit codes.