Topic 057 / Core
Architecture documentation and decision records (ADRs)
Chapter 4.6 · Architecture Decision Records
What and why
Architectural decisions — layered versus hexagonal, monolith versus services, which database — get made in a meeting or a chat thread and then forgotten; six months later nobody remembers why, and the same debate repeats, or worse, someone "fixes" a deliberate trade-off by reverting it. An Architecture Decision Record (ADR) is a short, immutable document capturing one decision: the context that forced it, the options considered, the decision made, and its consequences — including the costs accepted, not only the benefits. Once accepted, an ADR is never edited; a changed decision gets a new ADR that supersedes the old one, preserving the history of why. Builds on: → 45 (C4 diagrams show the shape of the system; ADRs record why it has that shape — the two are companions, not substitutes).
Diagram
# ADR-003: Modular monolith vs. microservices for v1
Status: Accepted (supersedes: none)
Context — what forces this decision now
Options — at least two, including the simpler one
Decision — the option chosen, stated plainly
Consequences — what this buys, and what it costs or forecloses
How it works
- Write one ADR per contested decision — a decision with real trade-offs and at least one credible alternative, not a routine choice.
- State the context in a sentence or two: what forces a decision now (a scaling need, a team split, a dependency that needs replacing).
- List the options genuinely considered, including the simpler or do-nothing option, with each option's real costs, not only its selling points.
- State the decision and its consequences plainly — what is being accepted, not only what is being gained; a decision with no stated cost was not examined honestly.
- Number ADRs sequentially; when a decision changes, write a new ADR that supersedes the old one by number — the old ADR stays in the repository, marked superseded, never deleted or rewritten.
Practical example
(illustrative). Project 1's ADR-001, "modular monolith vs. microservices for v1": context — a single team, single region, early-stage product (Project 1's own scope); options — modular monolith, microservices from day one, a single undifferentiated codebase; decision — modular monolith; consequences — module boundaries must be enforced in code review from day one, and the team accepts that scaling one module independently is not possible yet without a future extraction.
When to use it
- Use when: more than one reasonable option existed and the choice has a real, statable cost.
- Avoid when: there was never a credible second option — writing an ADR for a decision with no real alternative is documentation for its own sake.
- Failure scenarios: architecture documentation that is a hundred pages, written once, and years stale — nobody trusts it and nobody updates it, so it actively misleads.
- Simpler alternative: for a decision truly without a credible alternative, a one-line comment at the decision site is enough; the ADR format is for decisions worth defending later.
Practice
(20–25 min; no lab services — any format; this chapter's ADR exercise). Write ADR-001, "modular monolith vs. microservices for v1," for Project 1 using the template above, with at least two real alternatives and an honestly stated cost of the decision made. Every project requires an ADR for each of its contested decisions (method step 21), not only this one. Done when someone unfamiliar with the project can read only the ADR and correctly state what was given up by choosing the modular monolith.
Key takeaway
An ADR is one page, immutable once accepted, superseded rather than edited — it is the system's memory of why. Done when you can: find a non-trivial decision in your own project, say whether it has an ADR, and write one if it doesn't. Used next in → 157 (architecture evolution revisits old ADRs when the forces behind them change); every project, method step 21.
References
None — this topic makes no external claims.
Source directory