Spec-driven development, for real
Spec-driven development, for realPart 4
Decision records
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: An architecture decision record (ADR) is one short, numbered file per decision that binds the code: the context, the options considered, the decision and its consequences. It lands in the same pull request as the code, the code cites its number, and it is never edited afterwards; a changed mind is a new ADR that supersedes the old one. Claude reads these files, so it stops proposing the option you already rejected.
Part 3 wrote the rules. This part covers block 3: what happens when a rule has to bend, or a choice has to be made once and for all. The team and product are invented.
Monday, 14:30
Claude’s first plan for the late fee says: compute it when the invoice is built, like every other charge. That is what ADR-0003 says to do.
Maya spots the problem. An item’s hourly rate can be edited after a rental comes back. If the fee is computed at invoice time, the customer could be shown one fee at the desk and billed another. That breaks the requirement she just read.
So this feature needs a different rule. In her old team, that would have been a Slack thread. Here it is a file.
Think of it like this: When a judge decides a hard case, the ruling and its reasons are written down. The next court with the same question does not argue it from scratch: it cites the case. A decision record is a ruling for your codebase.
Why write it down
Claude has no memory of last month’s meeting. Without the record, it will propose the obvious option with confidence, and someone has to remember why that was turned down. With the record, the reason is on the desk before the plan is written.
What a record holds
Here is the one Maya wrote with Claude’s help, using the write-adr skill:
# 0009. A late fee is computed once, at return, and stored - Status: Accepted (2026-03-05). Supersedes ADR-0003 for fees. - Cites: REQ-041, DEC-018, P4, P6 ## Context ADR-0003 computes every charge when the invoice is built. For late fees that means the fee changes if an item's hourly rate is edited after the return. A customer could be shown one fee and billed another. ## Options considered | Option | For | Against | | Compute at invoice time | one code path | fee can change after return | | Compute at return, store | shown fee = billed | a second path; must store it | | Snapshot the rate only | small | still recomputes; rounding | ## Decision The fee is computed by terms.late_fee_minor when the return is recorded, stored on the Return, and never recomputed. ## Consequences - What the customer sees at the desk is what they pay (AC-1). - A rate change never alters a past fee (P4, P6). - Correcting a wrong fee is a new adjustment, not an edit.
Remember: keep it short. The record above takes ten minutes to write. A decision not worth ten minutes did not need recording.
Changing your mind
ADRs are never edited after they are accepted. When the facts change, you write a new one:
- ADR-0003 · Accepted in January
Charges are computed when the invoice is built. True and sensible at the time.
- March · The facts change
Late fees depend on a rate that can be edited after the return. Computing late breaks AC-1.
- ADR-0009 · A new record
States the new decision and says it supersedes 0003 for fees. Written in the same pull request as the code.
- ADR-0003 · One line changes
Only its status:
Superseded by ADR-0009 for fees. The original reasoning stays as it was. - Code cites the number
# ADR-0009: computed once at return, never recomputedon the line that stores it.
Under the hood: making Claude use them
CLAUDE.mdsays where the records live and that going against a principle needs one. That puts the folder on Claude’s map.- The
write-adrskill in the kit searches for an earlier record on the same subject before numbering a new one, so supersessions are not missed. - Code cites the number on the line it governs:
# ADR-0009: computed once at return. When Claude edits that line, the citation is right in front of it, and one search finds the reasoning. - The
spec-revieweragent (Part 9) flags a change that contradicts an accepted ADR without a new one. - The real repositories behind this series hold more than thirty records between them, from “one front door for every tenant” to “documents are served by signed links”. Their most-cited sections are the rejected options.
When a record earns its place
- The code goes against a principle.
- A choice will be questioned: "why didn’t we just...?"
- An earlier ADR is being reversed.
- Two reasonable people disagreed and one way was picked.
- Nobody would ever choose differently.
- It is a detail inside one function. A comment is enough.
- It is a business decision: that is a DEC in the plan.
- It is undecided: that is an open question (Part 5).
Which one fits?
- We chose one technical approach over another: A new ADRNumber it, list the options, state the decision, commit it with the code.
- We changed our mind: A superseding ADRA new record. The old one only gets its status line changed.
- The code must break a principle: An ADR firstNo merge until the exception is recorded and cited from the code.
- Finance or the client decided something: A DEC in the planBusiness choices quote the person (Part 2). ADRs are for how the code works.
- Nobody knows yet: An open questionPart 5. Do not record a guess as a decision.
In the kit
docs/architecture/decisions/_TEMPLATE.mdand the folder’s README.0001-record-decisions.md: the first record every project writes, about writing records.- The
write-adrskill.
Three rules of thumb
Change your mind with a new ADR. The old reasoning is history, and history is evidence.
The rejected option is what the next person proposes. Answer it in advance.
The ADR lands with the code it explains. Written later means never written.
QuizSix months later the team decides late fees should be recomputed nightly after all. What do they do with ADR-0009?
Show the answer
Answer: Write ADR-0015 that supersedes it, and change only 0009’s status line
The old reasoning is evidence of why the code was the way it was. A new record states the new decision and points back, and the old one’s status says where to look now.
Words in this post:
- ADR: architecture decision record. One numbered file per decision.
- Options considered: the alternatives, each with for and against.
- Supersede: replace an earlier decision with a new record that says so.
- Status line: proposed, accepted with a date, or superseded by a number.
- Cite: put the ADR number on the code it governs.
Next, Part 5: Definitions and open questions pins down what the business words mean, and what to do when nobody can answer yet.
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 recordsyou are here
- 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 end