Spec-driven development, for real
Spec-driven development, for realPart 11
Proof of done
On this page
New to the short codes like REQ, ADR or AC? See the vocabulary in Part 1, or hover over any code.
In short: Done means every acceptance criterion has evidence. One verify command runs every automated check. Tests are named after the criteria they prove, and each one is checked to make sure it can fail. The pull request carries an evidence table, one row per AC. A coverage matrix maps every requirement to its proof with an honest state. And because “the tests are green” and “a person can do this” are different claims, someone walks the real product.
Part 10 guarded the moments around a change. This part covers block 10, which proves the change does what the spec promised. The team and product are invented.
Thursday, 11:00
All checks are green. Claude says the feature is done. Maya runs the verify-done skill anyway, and it asks an awkward question about the test for AC-3, the one-day cap: would it fail if the cap were removed? Claude removes the min() and runs it. It still passes. The test’s fixture rented the item for two hours, so the cap never mattered.
One new fixture later, the test fails without the cap and passes with it. Now it is evidence.
Think of it like this: A learner driver passes the theory test on a screen, then the driving test with an examiner in the passenger seat. Nobody hands out a licence for the first one alone.
Two different claims
Layers of proof
# web: package.json "verify": "pnpm check:deps && pnpm typecheck && pnpm lint && pnpm test && pnpm build" # api uv run ruff check . && uv run mypy src \ && uv run manage.py makemigrations --check --dry-run \ && uv run pytest -n auto
The evidence table
The verify-done skill ends with a table in the pull request. A reviewer checks rows, not the whole diff from scratch:
| AC | Status | Evidence | | AC-1 | met | test_ac1_fee_on_return passes; screenshot of the return desk | | AC-2 | met | test_req041_ac2_per_started_hour (61 min = 2 hours) | | AC-3 | met | test_req041_ac3_capped_at_day_rate; fails if min() removed | | AC-4 | met | test_customer_json_has_no_fee_basis; fee-panel.test.tsx | | AC-5 | met | types are int; test_amounts_are_minor_units | verify: 412 passed, 0 failed (api) · pnpm verify green (web)
A test that proves nothing
The worst test is a green one that checks nothing. The real project this series comes from found one the hard way:
- A walk test goes green
It records three steps done. CI is happy for months.
- Someone fixes a selector
The button is named "Step 19", not "19". The old selector matched nothing.
- The truth comes out
The helper had returned early when it found nothing. The test was green because it clicked nothing at all.
- The lesson
For each test you cite as evidence, remove the behaviour once and watch it fail. A test that passes with its subject deleted is not evidence.
The coverage matrix
Across the whole product, docs/qa/coverage-matrix.md maps every REQ and AC to the test that proves it, with one of four honest states:
A test proves it, and fails if the behaviour is removed.
Partly covered. The gap is written in the row, and only allowed to shrink.
Cannot be tested yet. The blocker is named, for example a provider sandbox.
Deliberately not covered yet, with the reason.
Under the hood: QA that leaves a record
- Findings are written as: what it is, the evidence, the root cause at
file:line, the fix, and the command that verifies it. The next session reads the register before fixing anything it names, instead of re-deriving it. - Stubs are kinder than real providers. In the real project, a missing permission at an accounting provider passed every stubbed test for weeks and would have failed on the first real write. A green CI says nothing about the vendors. Walk the integrations against their real sandboxes before you rely on them.
- Walk tests against the real stack need their own care: take button labels from the translation files, not from headings; take step numbers from the source document, not from where the code happens to sit; and treat any literal string in a test’s report as a claim nothing verifies.
- A Stop hook can run verify before Claude finishes a turn, as in How Claude Code works, Part 9. Keep it to the fast checks.
Which proof do I need?
- Is this feature done?: The verify-done skillRun verify, list every AC, find the evidence, check each test can fail, write the table.
- A test might be hollow: Delete the behaviour onceIf the test still passes, it proves nothing. Fix it before citing it.
- It works with stubs: Walk the real productStubs we wrote are kinder than real providers. A green CI says nothing about the vendor.
- Which REQs are actually proven?: The coverage matrixEvery REQ and AC, the test that proves it, and an honest state.
- An AC cannot be tested: Rewrite the ACUntil a test, an output or a screenshot could prove it.
In the kit
- The
verify-doneskill and thespec-revieweragent. docs/qa/README.mdand the coverage matrix.- The pull request template, with the evidence table built in.
Three rules of thumb
A row per AC with something checkable. Words are not evidence.
Walk the real product before calling a user-facing feature done.
Prove it once by removing what it tests.
QuizCI is green and every AC has a passing test, but nobody has used the return screen with a real login. Is the feature done?
Show the answer
Answer: Not yet: a person has to do it once on the real product
The tests prove the code. Only a walk through the real product proves a person can do it: the login, the screen, the real data, together.
Words in this post:
- Verify command: one command that runs every automated check.
- Evidence table: one row per AC in the pull request, each with proof.
- Coverage matrix: every requirement mapped to the test that proves it.
- Vacuous test: a test that passes even with its subject removed.
- Walk: using the real product end to end, as a person would.
Next, Part 12: Memory and handoffs makes sure tomorrow’s session, and next month’s teammate, starts exactly where this one stopped.
Setting up Claude Code or AI agents for your team?
I help teams build this: agents, RAG search and Claude Code setups that hold up in production.
Series
Spec-driven development, for real
- Spec-driven development, for realThe building blocks
- Spec-driven development, for realThe paper trail
- Spec-driven development, for realPrinciples and scoped rules
- Spec-driven development, for realDecision records
- Spec-driven development, for realDefinitions and open questions
- Spec-driven development, for realFeature specs and plans
- Spec-driven development, for realThe contract
- Spec-driven development, for realGates that make Claude show its work
- Spec-driven development, for realSkills and reviewers
- Spec-driven development, for realGuardrail hooks
- Spec-driven development, for realProof of doneyou are here
- Spec-driven development, for realMemory and handoffs
- Spec-driven development, for realOne ticket, end to end