Spec-driven development, for real
Spec-driven development, for realPart 6
Feature specs and plans
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: Every feature starts with a design spec: why, goals, non-goals, the contract change in words, and numbered acceptance criteria (AC-1, AC-2…), each one provable. It is approved before anything else. Then a plan, written by Claude in plan mode, where every task names the criteria it serves and the test written first. It is approved before any code. From here on, everything measures against the spec.
Part 5 pinned down the words and the open questions. This part covers block 5, where everything so far comes together for one feature. The team and product are invented.
Tuesday, 11:00
Maya has everything she needs: REQ-041, DEC-018, a new ADR-0009, the definition of late, and OQ-07 left open. She runs the write-spec skill. Claude reads all of it first, then asks her three questions it cannot answer from the files: who may see the cost basis, whether a waived fee is in scope, and what the return screen shows when nothing is late.
Her answers go into the spec, not the chat. Twenty minutes later there is a file the team lead can approve.
Think of it like this: A pilot files a flight plan before take-off: the route, the fuel, the alternates. Nobody works it out in the air. If the weather changes, the plan changes on paper first, and everyone in the tower can see it.
Two stops before any code
The spec
# Late fees
ACME-41, 2026-03-05. Implements REQ-041.
## Why
Rentals come back late every day and staff add fees by hand
in a spreadsheet. Customers dispute them at the desk.
## Goals
- The fee is computed, shown and stored when the return is recorded.
## Non-goals
- Posting fees to the ledger (waits on OQ-07).
- Waiving fees. A separate ticket.
## Acceptance criteria
- AC-1 A late return shows the fee on the return screen before payment.
- AC-2 The fee is per started hour at the item's hourly rate (DEC-018).
- AC-3 The fee never exceeds the item's day rate (DEC-018).
- AC-4 Staff see the fee and the cost basis; a customer sees the fee only.
- AC-5 Amounts are integer minor units end to end (P11).
## The contract change
POST /rentals/{id}/return returns late_fee_minor (everyone)
and fee_basis (staff only, absent for customers).
## Decisions and open questions
Settled: DEC-018, ADR-0009. Open: OQ-07, built as a setting.
Notice what is not there: no class names, no library, no database table. A spec says what and why. The how belongs to the plan.
Remember: “AC-4: staff see the fee and the cost basis; a customer sees the fee only” is not a UI note. It is a field-security rule, and it will become a server test (Part 7) and a reviewer check (Part 9).
The plan
With the spec approved, Maya switches Claude to plan mode. It reads the code, proposes the tasks, and changes nothing until she approves.
# Plan: late fees Spec approved by Maya, 2026-03-05. | # | Task | Serves | Test first | | T1 | terms.hours_overdue, terms.late_fee_minor | AC-2 AC-3 AC-5 | test_late_fee.py | | T2 | store the fee on Return at recording time | AC-1 (ADR-0009)| test_return_record.py | | T3 | late_fee_minor, gated fee_basis on serializer| AC-1 AC-4 | test_return_fields.py | | T4 | export OpenAPI, regenerate the web client | AC-1 | drift gate | | T5 | return screen shows the fee from the types | AC-1 AC-4 | return-screen.test.tsx |
Checking the plan in one look
Lay the criteria against the tasks. An empty row is a criterion nobody will build. An empty column is work nobody asked for.
Under the hood: files, names and approvals
- Specs live in
docs/specs/YYYY-MM-DD-<feature>-design.md, plans indocs/plans/. The date in the name keeps them in order and lets a later spec say which one it amends. - A spec that reverses an earlier one says so at the top: “Amends 2026-01-12-invoicing-design.md, which made fees computed at invoice time.” The real repositories behind this series do exactly that.
- Plan mode is Claude Code’s read-only mode: Claude reads and proposes but does not edit (Shift+Tab, or
defaultMode: "plan"in settings). See permission modes. - Both approvals are a message in the pull request or the ticket, with a name and a date in the file’s header. “Approved in a call” is not an approval anyone can find.
- If you use Spec-Kit Plus, its
/specifyand/plancommands produce the same two files; the kit’s skills are a lighter way to the same place.
What makes a spec work
- Why in two or three sentences.
- Numbered ACs, each provable by a test, an output or a screenshot.
- Non-goals, so nothing extra gets built.
- The contract change in words, per role.
- Every term from docs/definitions/.
- How to build it, before what to build.
- "Fast", "intuitive": nothing you can test.
- No IDs, so tasks and tests cannot point back.
- Answers that only exist in the chat.
- A guessed answer to an open question.
Which one fits?
- It is a new feature: Spec, then planwrite-spec, approve; plan in plan mode with tasks pointing at ACs; approve; build.
- It is a one-line fix: A clear request and a testNo spec needed for a typo. Still a changelog line and a tracker update.
- The request is vague: Ask, and write the answers in the specClaude lists what is unclear; the answers go into the file, not the chat.
- An AC has no task: Fix the planAdd the task, or move the AC to Non-goals with the person’s agreement.
- The spec changes a binding choice: An ADR with the specPart 4. The spec cites it.
In the kit
docs/specs/_TEMPLATE-design.mdanddocs/plans/_TEMPLATE-plan.md, filled with this late-fee example.- The
write-specskill: read first, ask what is unclear, write the answers into the file, stop for approval.
Three rules of thumb
The spec never names a technology. The plan always does.
One for the spec, one for the plan. Both in writing, both before code.
Tasks cite ACs, tests cite ACs, the evidence table lists ACs. The spec is the yardstick.
QuizWhile building T3, Claude adds a “fee waived” flag because “staff will probably need it”. What should happen?
Show the answer
Answer: Remove it: no AC asks for it, and waiving is a non-goal
The grid has no row for it, and the spec lists waiving as a non-goal. If staff need it, that is a new spec, approved like this one.
Words in this post:
- Design spec: what to build and why, with acceptance criteria.
- Acceptance criterion (AC): one provable statement of what done means, with an ID.
- Non-goal: something deliberately left out.
- Plan: the tasks that build the spec, each pointing at its criteria.
- Plan mode: Claude reads and proposes, but changes nothing.
Next, Part 7: The contract turns the spec’s “contract change” into one generated shape that both the API and the web app must follow.
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 plansyou are here
- 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 end