Skip to content
zeeshare.com

writing / FDE and agents

Spec-driven development, for real

Spec-driven development, for realPart 11

Proof of done

On this page
  1. Thursday, 11:00
  2. Two different claims
  3. Layers of proof
  4. The evidence table
  5. A test that proves nothing
  6. The coverage matrix
  7. Which proof do I need?
  8. In the kit
  9. Three rules of thumb

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.

Automated checks The spec’s ACs A person Evidence Claude

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

"The tests are green" unit tests pass stubs answer CI is green proves the code "A person can do this" real login real screen click through proves the product Both are needed. Only one is usually checked.
The theory test and the driving test. Passing one says little about the other.

Layers of proof

verify: lint, types, buildseconds, on every change ruff mypy tsc eslint tests named after ACsthe behaviour the spec promised test_req041_ac2 AC-3 cap rules that must always holdisolation, field security, money A cannot read B no fee_basis contract drift gatesboth repositories agree schema = code client = schema a walk through the real producta person, or e2e on the real stack return a drill late see the fee
Each layer catches what the one above cannot. Only the last one proves a person can do it.
one verify command per repository
# 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
Claude, CI and people all run the same command. "Works on my machine" stops meaning anything different.

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:

the evidence table in pull request #88
| 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)
Five rows, five things a reviewer can check in a minute. "Fails if min() removed" means someone made sure the test can fail.

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:

  1. A walk test goes green

    It records three steps done. CI is happy for months.

  2. Someone fixes a selector

    The button is named "Step 19", not "19". The old selector matched nothing.

  3. The truth comes out

    The helper had returned early when it found nothing. The test was green because it clicked nothing at all.

  4. 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:

COVER

A test proves it, and fails if the behaviour is removed.

RATCHET

Partly covered. The gap is written in the row, and only allowed to shrink.

BLOCKED

Cannot be tested yet. The blocker is named, for example a provider sandbox.

LATER

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

Three rules of thumb

Evidence or it is not done

A row per AC with something checkable. Words are not evidence.

Green is not a person

Walk the real product before calling a user-facing feature done.

Every test can fail

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.

See services
Next in this seriesSpec-driven development, for realMemory and handoffs3 min read