Package the proof
Imagine receiving a receipt that says only “paid.” No total, no date, no merchant. verification: "all tests pass" is the same kind of receipt.
{
"command": "pnpm test packages/notification-sdk/src/index.test.ts",
"exitCode": 0,
"output": "2 tests passed"
}The Verifier needs the command, exit code, and output. That evidence makes the candidate inspectable without asking the Builder to remember what it meant.
Make Every Check Inspectable
Attach structured command evidence and changed-file summaries to every Builder result.
Hands-on Exercise 4.2
Open agent/subagents/builder/agent.ts. Add verification to the output schema:
verification: {
items: {
additionalProperties: false,
properties: {
command: { type: "string" },
exitCode: { type: "number" },
output: { type: "string" },
},
required: ["command", "exitCode", "output"],
type: "object",
},
type: "array",
},Add verification to required. Keep changes and deviations required too. An empty deviations array tells the next station that the Builder considered the question.
Update agent/subagents/builder/instructions.md:
Run the repository's relevant tests and type checks. Record each exact command, exit code, and useful output. Include the test runner summary even when the exit code is zero.
List every changed path with its purpose. Record any difference between the approved specification and the finished branch in `deviations`.The output should answer four reviewer questions without another model call:
- Which files changed?
- What did each change accomplish?
- Which commands ran?
- What did those commands report?
Compare every path in changes with the specification's affectedFiles. An unexplained path becomes a finding for the next station.
Try It
Compile the Builder:
pnpm typecheck
pnpm exec eve infoRun the uppercase-channel case:
pnpm exec eve invoke "$(cat fixtures/issues/bug-example.md)"Inspect the result and find the regression test command. Its output should name the passing test count, not merely provide exit code zero.
Now imagine the test command exits zero without discovering any tests. The exit code looks healthy, but the output reveals that the evidence is empty. Both fields matter.
Commit
git add agent/subagents/builder
git commit -m "feat(factory): package builder evidence"Done-When
- Every changed file has a purpose
- Every verification record contains a command and exit code
- Successful checks include useful output
- Deviations are explicit, including an empty assessment
- Builder output matches the real candidate branch
The Builder result now contains the evidence needed to select checks and inspect the branch independently.
Solution
The complete verification property and required-field list appear in the exercise. A finished Builder result includes branch, base, pushed, changes, verification, and deviations.
Was this helpful?