Skip to content
BoringStack
Star

Verify and records

2 min read

bun run factory verify looks at what the branch changed and runs the checks for each changed unit:

  • apps/api, apps/ui, tools and packages run agent:verify in an owned sandbox, the same profile the agents use.
  • apps/docs and apps/site run their own build and validate commands.
  • infra/bootstrap and infra/agent-host run OpenTofu format and validate, and infra/agent-host also 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.

bun run factory verification new <branch> writes the skeleton. The agent fills it. Every section is required:

SectionWhat goes in it
Riskui, logic, data or auth-billing. It sets how deep review goes.
Checks runCopied from factory verify.
Walked in browserWhat was seen working in the running product.
ReviewThe reviewer’s verdict and what was changed after it.
Not verifiedAn honest list. Write “none” only when none is true.
For the next sessionWhat the next person or agent needs.
Build noteWhere 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.

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.