Architecture Decision Record
ADR
A short document that captures an important decision about how a system is built, why the team made that choice, and what trade-offs came with it.
What an ADR is for
An Architecture Decision Record (ADR) answers a question the code rarely can: “Why did we build it this way?” A repository can show that two modules ship together. It cannot tell you whether the team chose that arrangement to keep transactions simple or because it had no way to deploy the modules independently. That distinction matters when someone proposes splitting them up.
Write an ADR when the reasoning is likely to matter later. Good candidates include choices about service boundaries, data ownership, or a dependency that would be expensive to replace. A routine implementation detail rarely needs its own record. As a rule of thumb, keep each ADR focused on one decision so readers can tell what still applies if part of the system changes.
What goes into a record
There is no mandatory template. Teams often write short Markdown files under docs/adr/ and review them in a pull request. A useful record gives readers enough information to judge the choice in its original context:
- Title, date, and status. Name the choice and say whether it is proposed, accepted, or superseded. Accepted does not mean implemented.
- Context. State the problem and the constraints that actually affected the choice, such as a delivery deadline or a consistency requirement.
- Decision and alternatives. Say what the team chose and why a credible alternative lost out. Include measurements if they drove the decision.
- Consequences. Record the benefits and the costs the team is taking on. If there is a clear reason to revisit the choice, note it.
Example: keep billing in the existing application
Context: Order confirmation and billing currently update the same database in one transaction. The team operates one deployment and has no current requirement to scale billing separately.
Decision: Keep billing as a module within the application rather than extracting a service. Extraction would allow independent deployment, but with separate data stores the current transaction would need to be redesigned to handle partial failures.
Consequences: The team keeps the local transaction, but billing changes still ship with the rest of the application. Revisit the choice if billing needs its own release schedule or scaling profile.
Keeping records useful
Don't silently rewrite an accepted ADR when the team reverses course. Write a new record, mark the old one as superseded, and point readers to its replacement. The old reasoning may still explain parts of the system that haven't migrated yet. An ADR is also not a current architecture diagram or an implementation plan: it explains why a choice was made, while those artifacts show what exists or how work will get done.
In a system design interview
You may be asked to defend a decision from a design exercise or a past project. Answer as if you were drafting a short ADR: identify the constraint that tipped the balance, compare a realistic alternative, and name the downside you accepted. Then explain what change in requirements would make you choose differently.