Spec-driven development, for real
Spec-driven development, for realPart 13
One ticket, end to end
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: This part puts the whole machine together. ACME-41, a fee for late returns, goes from a one-line ticket to a merged, proven feature in one week, touching every building block in the order a real team meets them. Below: the week hour by hour, every file it touched, what the method costs and what it saves, a four-week plan to adopt it, and the weak spots the original setup still had.
Part 12 handed the work over. This is the last part of the series. The team, the product and every name in it are invented.
The week
- Mon 09:40 · Block 1 · the paper trail
Claude finds REQ-041 and DEC-018 before anything else, because CLAUDE.md says to read the requirement first.
- Mon 10:15 · Block 2 · scoped rules
src/billing/CLAUDE.md is on the desk: minor units, and OQ-07 must not be guessed.
- Mon 14:30 · Block 3 · a decision record
Computing at invoice time would bill a different fee than shown. ADR-0009 supersedes ADR-0003 for fees.
- Tue 09:05 · Block 4 · words and questions
"Late" is defined in the owner’s words with one function. The ledger account becomes OQ-07, built as a setting.
- Tue 11:00 · Block 5 · spec and plan
Five ACs approved, then five tasks in plan mode, each pointing at its ACs. The grid has no gaps.
- Wed 09:00 · Block 8 · skills
/new-endpoint builds T1 to T3 the standard way: gated serializer, If-Match, tests first.
- Wed 10:20 · Block 6 · the contract
export-openapi.sh, then pnpm gen:api. Jonas gets ReturnRecord without typing it.
- Wed 10:31 · Block 7 · the gate
The first edit to return-screen.tsx is blocked until Claude names ReturnRecord and its fields.
- Wed 15:00 · Block 8 · reviewers
Five reviewers in parallel. Field security flags a role check in fee-panel.tsx.
- Thu 09:15 · Block 9 · hooks
The merge warning says 9 behind. Merging main in shows Jonas’s rounding fix had been dropped.
- Thu 11:00 · Block 10 · proof
The AC-3 test passed with the cap removed. A 30-hour fixture makes it real. Evidence table written.
- Thu 17:30 · Block 11 · handoff
The handoff names T5 and fee-panel.tsx as the next step. STATUS and work.md updated; the push gate checks.
- Fri 08:50 · Block 11 · a new session
Jonas types "carry on". The session brief already told Claude where things stand.
- Fri 11:00 · Merged
Changelog line, evidence table, 0 commits behind, nothing deleted. REQ-041 is COVER in the matrix.
Look at how little of that was writing code. Most of the week’s surprises were caught by a file, a gate or a reviewer before they became a bug: a fee that would have changed after the fact, a ledger account that would have been guessed, a field that would have leaked to the wrong screen, a test that proved nothing, a colleague’s fix that would have vanished.
Think of it like this: A good kitchen on a Friday night is calm not because the cooks are better, but because everything that can be decided before service was decided before service. The tickets, the prep lists, the allergen board and the handover notes do the remembering.
Every block, once more
The same line as Part 1, now with a week of ACME-41 behind it. Choose a station to see what it connects to.
Follow the ticket from ACME-41 to Merged. Choose any station to open its note and see what it connects to.
The paper trail
Every requirement, decision and open question gets an ID that never changes: REQ-041, DEC-018, OQ-07. Specs, tests, commits and reviews cite them, so anyone can follow a line of code back to the reason it exists.
In the kitdocs/prd/, docs/plan/ Read the post
Principles and rules
Numbered principles (P1 to P12) that bind the code, a short root CLAUDE.md, and one CLAUDE.md per module. Claude reads the closest one, so each module carries its own rules.
In the kitCLAUDE.md, principles.md Read the post
Decision records
One numbered file per decision that binds the code, with the options rejected and why. Going against a principle needs an ADR, not a judgement call in a pull request.
In the kitdocs/architecture/decisions/, skill write-adr Read the post
Definitions and questions
Business words written once by their owner, each computed by one function. Questions only someone outside engineering can answer stay open on purpose, restated where the code depends on them.
Specs and plans
Before code: a design spec with why, goals and numbered acceptance criteria, then a plan whose every task points at an AC.
In the kitdocs/specs/, docs/plans/, skill write-spec Read the post
The contract
The API’s OpenAPI schema is generated from the code, copied to the web repo, and turned into typed hooks. CI fails if either side drifts. A field that is not in the code cannot reach the screen.
In the kitexport-openapi.sh, orval.config.ts, CI drift gates Read the post
Fact-forcing gates
Hooks that make Claude state facts before it acts: which generated types it uses, which fields the role receives. Others stop it loosening a config or adding a package to make a build pass.
In the kitcontract-fact-force, config-protection, deps-allowlist Read the post
Skills and reviewers
Recipes for the common changes, so every endpoint and screen is built the same way, and read-only reviewers that check a change against one set of rules each.
In the kitskills/, agents/ Read the post
Guardrail hooks
Alarms on the moments that go wrong: a force-push to a shared branch, a pull request without a changelog line, a push without a tracker update, a rule broken in an edit.
In the kitmerge-safety-gate, changelog-gate, push-tracker-gate, edit-warnings Read the post
Proof of done
Done means every acceptance criterion has evidence. One verify command, tests named after ACs, a coverage matrix, and a person walking the real product.
In the kitskill verify-done, docs/qa/ Read the post
Memory and handoffs
A status board, a handoff per module with its next step, a running tracker, one changelog line per pull request and dated context drops. Tomorrow’s session starts where today’s stopped.
In the kitdocs/modules/, work.md, CHANGELOG.md, skill handoff Read the post
One ticket, end to end
All twelve blocks in the order a real ticket meets them, from the requirement to the merge.
In the kitall of it Read the post
Every file the ticket touched
docs/prd/rentals.md 1 REQ-041 (read, not changed) docs/plan/decisions.md 1 DEC-018 (read) src/billing/CLAUDE.md 2 OQ-07 line added docs/architecture/decisions/0009-...md 3 new ADR, supersedes 0003 for fees docs/architecture/decisions/0003-...md 3 status line only docs/definitions/late-return.md 4 new docs/questions/README.md 4 OQ-07 row docs/specs/2026-03-05-late-fees-design.md 5 new docs/plans/2026-03-05-late-fees-plan.md 5 new src/rentals/terms.py src/billing/accounts.py T1, OQ-07 setting src/rentals/api/serializers.py views.py 6 gated fee_basis docs/api/openapi.json (api and web) 6 exported, copied web/src/lib/api/generated/** 6 regenerated, never edited web/src/features/returns/*.tsx 7 written after the gate **/tests/test_*.py *.test.tsx 10 named after ACs docs/qa/coverage-matrix.md 10 REQ-041 rows CHANGELOG.md work.md 9 one line; ticked docs/modules/rentals.md STATUS.md 11 next step docs/context/2026-03-07-late-fees.md 11 three traps
Costs and savings, honestly
- A spec, a plan and an ADR before code: about an hour for this feature.
- A gate that blocks once per file per session.
- A changelog line and a handoff at the end.
- Setting it up: a day, with the kit.
- No invented fields: the gate and the drift checks catch them in seconds.
- No re-argued decisions: ADR-0009 answers them.
- No lost fixes: the merge warning caught one this week.
- No "where were we?": Friday started in one message.
There is no headline number here, on purpose. Measure your own: review rounds per pull request, criteria met at first review, bugs found after merge. Compare similar work before and after. How Claude Code works, Part 12 has a fair way to do it.
Adopting it
Do not switch everything on at once. Each block works on its own, and each one makes the next one easier.
- Week 1 · Paper trail and rules
kit-init. Short CLAUDE.md files, real principles, the first ADR. Cite IDs from now on.
- Week 2 · One feature, spec first
write-spec, plan mode, tasks pointing at ACs, an evidence table at the end.
- Week 3 · The contract and its gates
Export OpenAPI, generate the client, turn on the drift gates and contract-fact-force.
- Week 4 · Guards, reviewers, handoffs
Merge, changelog and tracker hooks; the reviewers; the session brief and the handoff habit. Turn on branch protection.
Under the hood: installing the kit
/plugin marketplace add Zeeshan138063/spec-driven-kit
/plugin install spec-driven-kit@spec-driven-kit
/spec-driven-kit:kit-initkit-initcopies the docs tree, the templates,CLAUDE.md,spec-kit.json, the CI workflows and the trackers into your repository without overwriting anything.- The plugin brings the eight hooks, nine skills and five reviewers. Every hook reads its settings from
spec-kit.json, fails open, and has an off switch. - The hooks need Node 18 or later. Their tests run with
npm testin the kit. - Source and issues: github.com/Zeeshan138063/spec-driven-kit.
The weak spots
The setup this series comes from worked, in production, for months. It also had gaps. They are worth naming, because yours will grow the same way:
They still worked, but the docs advise about 200. Move module rules down and procedures into skills.
Archive finished sections once they are in the changelog. The tracker is for what is true now.
Only a quick set did. Run the full suite before merging, or pay for the CI minutes.
The merge gate warns; the branch setting removes the problem. Turn it on.
The whole series in three rules
Everything else in this series follows from that.
Gates make Claude read the file and name what it found before it changes anything.
Evidence per criterion, then a next step someone else can start from.
QuizWhich single habit does every other block in this series depend on?
Show the answer
Answer: Every fact lives in one file with an ID, and gets cited where it matters
Specs cite REQs, tests cite ACs, code cites ADRs, handoffs cite questions, gates point Claude at the files. Without one home per fact and an ID to cite, none of the other blocks has anything to hold on to.
Words in this post:
- End to end: from the requirement to the merged, proven change.
- Building block: one of the twelve pieces this series covers.
- The kit: the open framework with the templates, hooks, skills and reviewers.
- Adopt: switch blocks on one at a time, on real work.
- Weak spot: a gap the original setup had, named so you can avoid it.
This is the last part. Start again at Part 1: The building blocks, install the kit, or read How Claude Code works for the tools underneath.
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 done
- Spec-driven development, for realMemory and handoffs
- Spec-driven development, for realOne ticket, end to endyou are here