Architectural Decision Records (ADRs)
Write down major architecture decisions and the reasons behind them, so future maintainers know why a choice was made, not just what it was.
What is it?
A team picks a message queue over direct API calls between two services. Six months later, a new engineer asks: "why is this so much more complicated than calling the other service directly?"
Nobody recorded the reasoning. Maybe there was a good reason (the other service was unreliable and needed decoupling), or maybe it was a mistake that's now safe to undo. Without a record, both look the same. The team either lives with a decision it doesn't understand or risks reverting something load-bearing.
An Architectural Decision Record (ADR) is a short document, usually one file per decision, that captures one significant choice:
- The context or problem that prompted it.
- The options considered.
- The decision made.
- The consequences, including tradeoffs accepted.
ADRs usually live in the codebase (often docs/adr/), numbered in order, and are treated as immutable history. If a decision is reversed, you write a new ADR that supersedes the old one instead of editing it away, so the original reasoning is never lost.
Most documentation describes the system as it is now. An ADR keeps a snapshot of reasoning at the moment of the decision, including constraints and alternatives that no longer apply. That context is what you need to judge whether the decision is still right or safe to revisit.
Explain like I'm 10
A doctor's chart records not just current medication but why it was prescribed and which alternatives were ruled out, so a later doctor can tell whether things have changed enough to reconsider.
Examples
A minimal ADR
# ADR-0007: Use a message queue between OrderService and ShippingService
## Status
Accepted
## Context
ShippingService has intermittent downtime during deploys (roughly
weekly). OrderService currently calls it synchronously via HTTP, so
those deploys cause order placement to fail for end users.
## Decision
Introduce a message queue (SQS) between the two services. OrderService
publishes an "OrderPlaced" event and returns immediately; ShippingService
consumes it whenever it's available.
## Alternatives considered
- Retrying the HTTP call with backoff — rejected, still fails if the
outage outlasts the retry window.
- Making ShippingService's deploys zero-downtime — rejected for now,
would require infra work outside this team's control.
## Consequences
- Order placement no longer fails due to ShippingService downtime.
- Order and shipment creation are no longer strictly synchronous —
there's a small delay, and OrderService needs a way to show
"processing" status to the user in the meantime.It's not just 'what' (use a queue). It records the real problem, the alternatives considered and why they were rejected, and the honest tradeoffs accepted (a small delay).
Structuring ADRs as they accumulate
docs/adr/
0001-use-postgres-for-primary-storage.md
0002-adopt-monorepo-for-frontend-and-backend.md
0007-use-message-queue-between-order-and-shipping.md
0012-supersede-0007-move-to-synchronous-calls-with-circuit-breaker.md
// ^ ADR-0007 is not deleted or edited — 0012 references and
// supersedes it once circumstances changed, keeping the
// original reasoning intact for anyone looking back.ADRs are numbered and kept forever, even when superseded, so the history of why the architecture evolved is never lost, only added to.
How it works
Write an ADR when a significant, hard-to-reverse decision is made, usually in the same pull request or discussion, while the context is fresh. A small, consistent template (context, decision, alternatives, consequences) makes it quick for anyone to write and read.
Once written, an ADR is never edited for new information. If the decision changes, a new ADR references and supersedes it, keeping the full history of reasoning intact and in order.
Why does it exist?
The reasoning behind a decision fades much faster than its effects in the code. The code stays, but the constraints, alternatives, and tradeoffs live only in people's memories, which fade or leave the company.
Without a record, future engineers must either trust past decisions blindly or risk re-arguing (and maybe reverting) decisions that were right given context they can no longer see.
When to use it
Write an ADR for decisions that are expensive to reverse, affect several teams or much of the codebase, or involved real tradeoffs: a database choice, a major architectural pattern, a significant third-party dependency, a cross-service communication style.
When not to use it
Skip ADRs for routine, easily reversed implementation choices (a function's internal algorithm, a naming convention). Code comments and regular docs cover those. An ADR for every small decision buries the important ones and makes the practice feel like bureaucracy.
Common mistakes
Stating only the decision, without the context and rejected alternatives, which is exactly the information that makes ADRs valuable later.
Editing or deleting old ADRs to 'keep them up to date' instead of writing a new one that supersedes them, destroying the historical trail.
Making ADRs so long and formal that nobody keeps writing them. Keep the format light enough to use consistently.
Practice exercises
- Easy:
Write a short ADR for a real or imagined decision to use TypeScript instead of plain JavaScript for a new project. Include at least one rejected alternative.
- Medium:
Think of a significant technical decision on one of your projects that was never documented. Reconstruct an ADR for it as best you can, noting which context you had to guess.
- Hard:
Write two linked ADRs: one deciding to build a feature as a monolith module, and a later one that supersedes it by extracting the module into a separate service, citing what changed to justify the reversal.
Interview questions
What is an Architectural Decision Record?
A short document that captures one significant architectural decision (its context, the alternatives considered, the decision, and its consequences) and is kept as a permanent record for future maintainers.
Why shouldn't an old ADR be edited when a decision is later reversed?
The old ADR preserves the reasoning and constraints that were true when the decision was made. Editing it destroys that context. Instead, write a new ADR that explicitly supersedes it.
What kinds of decisions are worth writing an ADR for?
Decisions that are expensive or risky to reverse, affect a large part of the system or several teams, and involved real tradeoffs between alternatives. Not routine, easily reversed implementation details.