Skip to content
zeeshare.com

writing / FDE and agents

Spec-driven development, for real

Spec-driven development, for realPart 4

Decision records

On this page
  1. Monday, 14:30
  2. Why write it down
  3. What a record holds
  4. Changing your mind
  5. When a record earns its place
  6. Which one fits?
  7. In the kit
  8. 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: 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.

Decision records Principles Citations Arguments Claude

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

Decided in a meeting "why not compute it later?" same debate, PR 212 again, PR 260 Claude proposes it too Decided in ADR-0009 the question comes up "see ADR-0009" reason already written Claude reads it first Claude has no memory of last month’s meeting. It does read docs/architecture/decisions/.
A ruling written down is a ruling you only make once.

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

Statusproposed, accepted with a date, or superseded Accepted (2026-03-05) Supersedes ADR-0003 Contextthe facts that forced a decision measured numbers what breaks if undecided Optionsat least two, each with for and against the rejected one matters most Decisionone or two sentences a reviewer can check "computed once, at return" Consequenceseasier, harder, and what must stay true when to revisit
The rejected option is the most valuable part: it is exactly what the next person, or the next Claude session, will propose.

Here is the one Maya wrote with Claude’s help, using the write-adr skill:

docs/architecture/decisions/0009-late-fee-fixed-at-return.md
# 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.
Short, dated, and specific. The table of options is what stops the argument coming back.

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:

  1. ADR-0003 · Accepted in January

    Charges are computed when the invoice is built. True and sensible at the time.

  2. March · The facts change

    Late fees depend on a rate that can be edited after the return. Computing late breaks AC-1.

  3. 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.

  4. ADR-0003 · One line changes

    Only its status: Superseded by ADR-0009 for fees. The original reasoning stays as it was.

  5. Code cites the number

    # ADR-0009: computed once at return, never recomputed on the line that stores it.

Under the hood: making Claude use them
  • CLAUDE.md says where the records live and that going against a principle needs one. That puts the folder on Claude’s map.
  • The write-adr skill 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-reviewer agent (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

Write an ADR when
  • 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.
Skip it when
  • 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

Three rules of thumb

Never edit a decision

Change your mind with a new ADR. The old reasoning is history, and history is evidence.

Write down what you rejected

The rejected option is what the next person proposes. Answer it in advance.

Same pull request

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.

See services
Next in this seriesSpec-driven development, for realDefinitions and open questions4 min read