Architecture Decision Records (ADRs)
An ADR is a one-page record of one technical decision, its context and its consequences, kept in the repository so people and AI tools stop reopening settled choices.
4 min read / Updated / Last checked
- Format
- Template · Intermediate
- Who it is for
- Founders and the builders they hire
- You leave with
- Write, review and maintain ADRs with a ready template and a CI check for the decision log.
The problem
On November 4, 2025, the UK government published an Architectural Decision Record Framework for the public sector. It sets an eight-field template for recording decisions and four levels for escalating them, from a single team up to a cross-government design council, and it is mandatory for decisions that cross government departments [1]. A government standardizing a decision format says something about the cost of not having one.
Startups pay the same cost on a smaller scale, and AI-assisted development makes it worse. Decisions now get made in chat: "use Supabase auth," "store files in S3," "keep billing in the main database." The chat scrolls away. Six weeks later a new developer, an agency taking over the code or an AI agent with a fresh context window sees the result without the reason, and proposes changing it. Sometimes the change is right. Often it repeats an option the team already rejected for a reason nobody wrote down.
The founder sees this as slow handovers, repeated debates and pull requests that undo earlier work. The fix is cheap: one short file per decision, kept next to the code.
How it works
Michael Nygard proposed the format in November 2011. An ADR is a short text file with five parts: a title, the context (the forces at play, stated as facts), the decision (written as "We will..."), a status and the consequences, good and bad [2]. Files are numbered in sequence, numbers are never reused, and the whole record should fit on one or two pages [2]. When a decision is reversed, the old file stays and is marked superseded, because knowing what the team once decided is still useful [2].
AWS's prescriptive guidance adds a lifecycle and a review step [3]:
- The author (the ADR owner) writes it in the Proposed state.
- The team reviews it in a meeting that starts with a silent reading slot. AWS suggests 10 to 15 minutes is usually enough. Readers add comments, then the owner walks through them.
- The outcome is Accepted, Rejected with a reason recorded, or back to the owner for rework.
- An accepted ADR is immutable. A different decision later means a new ADR that supersedes the old one.
AWS also lists what deserves an ADR: structure (for example, microservices), non-functional requirements such as security and availability, dependencies between components, interfaces such as APIs, and construction techniques such as libraries and frameworks [3]. Spotify's engineering blog answers the question of when to write one with "almost always," and its engineers report two practical gains: new owners of a system get up to speed faster, and teams align on shared practices [4].
The MADR template, version 4.0.0 released in September 2024, adds sections that matter most for disputed choices: decision drivers, the options considered with their pros and cons, and a confirmation step that says how compliance will be checked [5].
For an AI-assisted team, the ADR folder is also context. A coding agent pointed at docs/adr/ before it proposes a change sees the rejected options and why (see Context Engineering vs. Prompt Engineering).
The life of one ADR
Fig. 01- Proposedowner drafts context, options, decision
- Reviewsilent read, comments, owner responds
- Acceptedtimestamped and immutable
- Rejectedkept with the reason
- Supersededlinks to the record that replaced it
By the numbers
- fields in the UK government's ADR template [1]
- 8
- escalation levels in the same framework, team to cross-government [1]
- 4
- of silent reading AWS suggests at the start of an ADR review [3]
- 10 to 15 minutes
- Nygard's length limit for a whole ADR [2]
- 1 to 2 pages
| Template | Sections | Records rejected options | Status values given |
|---|---|---|---|
| Nygard, 2011 | Title, Context, Decision, Status, Consequences | Only inside Context | Proposed, Accepted, Deprecated, Superseded [2] |
| MADR 4.0.0, 2024 | Context and Problem Statement, Decision Drivers, Considered Options, Decision Outcome, Consequences, Confirmation, Pros and Cons | Yes, as its own section | A free status field in front matter [5] |
| UK ADR Framework, 2025 | Title, Date, Status, Context, Decision, Consequences, Stakeholders consulted, Links to supporting documents | Not a separate field | Not defined on the page [1] |
The numbers say the format is small on purpose. One to two pages [2] and a 15-minute read [3] keep writing an ADR cheaper than the debate it prevents. A team that finds ADRs heavy is usually writing design documents and calling them ADRs.
The table shows the one real choice. Nygard's five sections suit a small team that agrees quickly. MADR's considered options and confirmation suit decisions that were contested, or that an agency or AI agent is likely to reopen, because the rejected alternative and the reason it lost are on the page [5].
Implementation
Keep ADRs in docs/adr/, one Markdown file each, named 0007-short-title.md. The template below combines Nygard's core with MADR's options and confirmation. The example decision is filled in to show the level of detail.
# 0007. Run background jobs from Postgres, not a separate queue service
Status: Accepted
Date: 2026-11-12
Owner: (engineer) | Consulted: (founder), (agency lead)
Supersedes: none
## Context
We send booking confirmations and reminders, about 2,000 jobs a day (illustrative).
We run one Postgres database and one API service. Nobody on the team operates a broker.
Jobs must not be lost if the API restarts, and a reminder must never be sent twice.
## Considered options
1. Job table in Postgres, polled by a worker in the same codebase
2. Managed queue service from our cloud provider
3. Self-hosted message broker
## Decision
We will use option 1: a jobs table with a unique key per job, processed by one worker.
## Consequences
- Good: no new service to run, jobs commit in the same transaction as the booking.
- Bad: polling adds database load. Revisit above 50 jobs per second (illustrative).
- Follow-up: worker records the key of every sent message before sending.
## Confirmation
Code review rejects new queue clients. The duplicate-send test runs in CI.Rules that keep the log useful:
- One decision per file. The title states the decision, not the topic: "Run background jobs from Postgres," not "Background jobs."
- Write the ADR in the same pull request as the change it explains, and link it in the description.
- Never edit an accepted ADR's decision. Write a new one, set the old one's status to
Supersededand addSuperseded by: 0012-....md[3]. - Add a line to the AI coding tool's project instructions: "Read docs/adr before proposing architectural changes. A change that contradicts an Accepted ADR needs a new ADR."
- Founders do not write the technical content, but they should be in the consulted list for decisions that change cost, vendor lock-in or data location.
Test it
A decision log drifts like any other document. This script runs in CI and fails the build when the log breaks its own rules.
"""Check the decision log in docs/adr. Usage: python check_adrs.py docs/adr"""
import re
import sys
from pathlib import Path
STATUSES = {"Proposed", "Accepted", "Rejected", "Deprecated", "Superseded"}
REQUIRED = ["## Context", "## Decision", "## Consequences"]
NAME = re.compile(r"^(\d{4})-[a-z0-9-]+\.md$")
def check(folder: Path) -> list[str]:
errors, numbers = [], {}
for path in sorted(folder.glob("*.md")):
match = NAME.match(path.name)
if not match:
errors.append(f"{path.name}: name must look like 0007-short-title.md")
continue
numbers.setdefault(match.group(1), []).append(path.name)
text = path.read_text(encoding="utf-8")
status = re.search(r"^Status:\s*(\w+)", text, re.M)
if not status or status.group(1) not in STATUSES:
errors.append(f"{path.name}: missing or unknown Status")
errors += [f"{path.name}: missing {h}" for h in REQUIRED if h not in text]
if status and status.group(1) == "Superseded":
# A superseded record must point at the record that replaced it.
link = re.search(r"Superseded by:\s*(\d{4}-[a-z0-9-]+\.md)", text)
if not link or not (folder / link.group(1)).exists():
errors.append(f"{path.name}: Superseded without a valid 'Superseded by:' file")
errors += [f"number {n} used twice: {names}" for n, names in numbers.items() if len(names) > 1]
return errors
if __name__ == "__main__":
problems = check(Path(sys.argv[1]))
print("\n".join(problems) or "OK: decision log is consistent")
sys.exit(1 if problems else 0)Expected result on a clean log: OK: decision log is consistent and exit status 0. Copy an ADR to a second file with the same number, or set a status to Done, and the script names the file and exits 1.
The script checks form. Once a quarter, check substance: pick three recent pull requests that changed architecture (a new dependency, a new service, a schema redesign) and confirm each links an ADR. Expected: three out of three. Any miss gets an ADR written after the fact, with the date it was actually decided.
Decision
Start the decision log this week, with the decisions already made. Backfilling them is a one-off job for whoever made them, and far cheaper than reopening each one later.
- Write an ADR for every decision about structure, data storage, external providers, authentication and APIs.
- Use Nygard's five sections for routine choices and the options section for anything contested.
- Review in a short meeting with a silent read first, then treat accepted records as immutable [3].
- Require an ADR in any agency handover, and give AI coding tools the folder as standing context.
Sources
- [1]Architectural Decision Record Framework (opens in a new tab)GOV.UK, November 2025
- [2]Documenting Architecture Decisions (opens in a new tab)Michael Nygard, Cognitect, November 2011
- [3]Architectural decision record process (opens in a new tab)AWS Prescriptive Guidance, November 2026
- [4]When Should I Write an Architecture Decision Record (opens in a new tab)Josef Blake, Spotify Engineering, April 2020
- [5]MADR: Markdown Architectural Decision Records (opens in a new tab)ADR GitHub organization, September 2024
Technical guidance, not legal or security certification.
Related resources
Need a technical review of an AI-built MVP?
Discuss your build