---
title: "Package the Proof"
description: "Replace the Builder's loose verification summary with structured command evidence that records what ran, whether it passed, and what useful output a reviewer should inspect."
canonical_url: "https://vercel.com/academy/creating-a-software-factory/package-the-proof"
md_url: "https://vercel.com/academy/creating-a-software-factory/package-the-proof.md"
docset_id: "vercel-academy"
doc_version: "1.0"
last_updated: "2026-08-29T01:48:00.719Z"
content_type: "lesson"
course: "creating-a-software-factory"
course_title: "Creating a Software Factory"
prerequisites:  []
---

<agent-instructions>
Vercel Academy — structured learning, not reference docs.
Lessons are sequenced.
Adapt commands to the human's actual environment (OS, package manager, shell, editor) — detect from project context or ask, don't assume.
The lesson shows one path; if the human's project diverges, adapt concepts to their setup.
Preserve the learning goal over literal steps.
Quizzes are pedagogical — engage, don't spoil.
Quiz answers are included for your reference.
</agent-instructions>

# Package the Proof

# 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.

```json
{
  "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:

```ts title="agent/subagents/builder/agent.ts"
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`:

```md title="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:

```bash
pnpm typecheck
pnpm exec eve info
```

Run the uppercase-channel case:

```bash
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.

\*\*Note: Hide one changed file\*\*

Compare `git diff --name-only` with the Builder's `changes` array. Every real path should appear in the structured result.

\*\*Warning: Verification output is empty\*\*

Capture the test runner summary. A zero exit code proves process completion; the output shows what ran.

\*\*Warning: A deviation disappears\*\*

Use an empty array when implementation matches the spec. Do not omit the field, because omission makes the assessment unknowable.

## Commit

```bash
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`.


---

[Full course index](/academy/llms.txt) · [Sitemap](/academy/sitemap.md)
