Architecture Decision Records
An ADR captures why we made an expensive-to-reverse decision, so the next person does not relitigate it. ADRs live in each repo at /docs/adr, not in this wiki — this page is the template and the guidance.
stateDiagram-v2 [*] --> Proposed Proposed --> Accepted Proposed --> Rejected Accepted --> Accepted: amended (dated, append-only) Accepted --> Superseded: decision reversed Accepted --> Deprecated Superseded --> [*] Deprecated --> [*]
When to write one
Section titled “When to write one”Write an ADR for expensive-to-reverse decisions:
- A database, message broker, auth model, or major framework.
- A cross-cutting pattern — multi-tenancy, caching strategy, API versioning, a data-ownership boundary.
- A deliberate deviation from a company default.
Do not write one for a library swap, a naming tweak, or a local refactor. If reversing it is a small PR, skip the ADR.
The granularity test: if the next revision would change a number, it is calibration, not a decision. Record it in the feature’s design doc. One ADR per boundary — a seam, a dependency, an ownership rule — never one per iteration behind that boundary. Bug fixes are never ADRs.
Where they live
Section titled “Where they live”- One Markdown file per decision:
/docs/adr/NNNN-short-title.md, numbered sequentially. - Every
/docs/adrcarries aREADME.mdindex — one row per ADR: number, title, status, state, scope. Updated in the same PR that adds or supersedes one. A folder of 26 files with no index is a folder nobody reads, and a stale index is a review blocker. - A playbook is not an ADR. If a document tells you how to build something, it is a playbook and lives in
/docs/playbooks/. If it records why a choice was made and what it costs, it is an ADR. One shape per folder.
Template
Section titled “Template”# NNNN. Short decision title
Status: Proposed | Accepted | Superseded by NNNN | DeprecatedState: Current | Approved Intent | TargetDate: YYYY-MM-DDScope: which module or subsystem this governsSupersedes / Amends / Extends: NNNN (links, when applicable)Enforcement: the committed test, analyzer, or linter rule that fails the build — or the word `Review-only`
## ContextThe forces at play: the problem, constraints, and options considered.Facts only — no decision yet.
## DecisionThe choice we made, in active voice: "We will ...".
## RulesThe imperatives a reader must follow. "Do not merge the two contexts."
## ConsequencesWhat becomes easier and what becomes harder, including new risksand follow-up work.Scopetells a reader in one line whether the ADR applies to them.Enforcementmust name a check that exists on the branch that merges the ADR — a declared check nobody writes is how a convention quietly stops being one. SayReview-onlyhonestly rather than naming a test you intend to write.Stateis notStatus:Statussays whether the decision is agreed,Statewhether it is built. Nothing markedApproved IntentorTargetmay be described as implemented — not in a doc, not in a PR, not in an agent’s answer.
Amend or supersede
Section titled “Amend or supersede”ADRs are append-only, not frozen.
- Amend when the decision is sharpened or recalibrated: append a dated
## Amendment — YYYY-MM-DDsection, or prepend a dated status banner. Never rewrite the original Context or Decision text. - Supersede only when the decision is reversed: a new ADR, with links in both directions.
- A superseded ADR is never deleted — its history is the point.
Review
Section titled “Review”- An ADR merges in the PR that implements it, linked to the work item. An ADR written after the merge is documentation, not a decision.
- The PR’s reviewers approve the ADR and the code together. The CTO approves any ADR that deviates from a company default.
See also: Examples · AI Agent Context · Engineering Standards.