Verify and records
Verify
Section titled “Verify”bun run factory verify looks at what the branch changed and runs the checks for
each changed unit:
apps/api,apps/ui,toolsandpackagesrunagent:verifyin an owned sandbox, the same profile the agents use.apps/docsandapps/siterun their own build and validate commands.infra/bootstrapandinfra/agent-hostrun OpenTofu format and validate, andinfra/agent-hostalso checks its shell scripts.- The repository’s own files run
bun run check.
A unit with no recipe cannot be verified, so it fails. Narrow the run with
--units=apps/api,apps/ui when you know what changed.
A failure that also fails on the base commit is reported as a warning, not as a
regression of this branch. Pass --no-base to see every failure as a failure.
Verify results are written to .agent-state/factory/verify/, and the latest one to
latest.json in the same folder.
The record
Section titled “The record”bun run factory verification new <branch> writes the skeleton. The agent fills it.
Every section is required:
| Section | What goes in it |
|---|---|
| Risk | ui, logic, data or auth-billing. It sets how deep review goes. |
| Checks run | Copied from factory verify. |
| Walked in browser | What was seen working in the running product. |
| Review | The reviewer’s verdict and what was changed after it. |
| Not verified | An honest list. Write “none” only when none is true. |
| For the next session | What the next person or agent needs. |
| Build note | Where the note in docs/build-notes/ lives. |
bun run factory verification check <branch> fails when a section is missing, or
when HEAD has moved since the record was written. A record of old code never counts.
bun run factory verification gaps lists recent “Not verified” items across records,
for the weekly review.
The gate
Section titled “The gate”bun run factory gate runs the same checks a session must pass before it may stop.
It takes a while, so run it in the background. The Stop hook is what enforces it;
see Hooks.