Architecture Decision Records, With Examples

Valerii Checha
Valerii Checha

19 November 2026

An architecture decision record (ADR) is a short document that captures one significant technical decision: the context that forced it, what was decided, its status, and the consequences the team accepted. ADRs are numbered, stored next to the code, and never rewritten once accepted. When a decision changes, a new record supersedes the old one, so the reasoning behind the system survives the people who made it.

The format exists because of a familiar problem. A new engineer finds something odd, a queue where a direct call would do or a database nobody else uses, and has two bad options: leave it alone without understanding it, or change it without knowing what it was protecting. An ADR gives them a third: look up the decision and read the forces behind it.

Where architecture decision records come from

Michael Nygard proposed the format in a 2011 post titled "Documenting Architecture Decisions". His sections were Title, Context, Decision, Status and Consequences, and his rules were few: one decision per record, numbered sequentially, written in full sentences, kept in the project repository, and never reused or renumbered. A record that is replaced stays in place with its status changed to superseded.

Nat Pryce's adr-tools, a small command line tool, turned that into a habit: adr new creates the next numbered Markdown file from the template, and adr new -s 9 writes a record that supersedes number 9 and updates both files. Later templates added structure. MADR (Markdown Architectural Decision Records, now at version 4) lists the options considered with pros and cons for each. Olaf Zimmermann's Y-statement squeezes the whole decision into one long sentence. The community site adr.github.io collects these and links to tooling for each.

An architecture decision record example

Here is a complete ADR in Nygard's format, laid out the way adr-tools generates it. It is short on purpose.

# 7. Use PostgreSQL for the order service

Date: 2026-11-12

## Status

Accepted

## Context

The order service has to reserve stock, take payment and create the
order as one step: if any part fails, none of it may stay. The
prototype stores orders in MongoDB, and finance now needs monthly
reports that join orders, refunds and customers. Every other service we
run already uses PostgreSQL, and two of the four people on call have
never operated MongoDB.

## Decision

We will use PostgreSQL, on the same managed database service as our
other services, for the order service. The prototype data is migrated
once, before launch.

We compared PostgreSQL, MongoDB and DynamoDB. MongoDB lost because
multi-document transactions are new to the team. DynamoDB lost because
its access patterns must be designed up front and the finance joins
would need an export to another store.

## Consequences

Stock, payment and order commit together or not at all. Finance can
query the read replica directly. Each schema change is now a migration
that has to be reviewed and run. Moving the prototype data costs about
a week. A single primary will need revisiting if order volume grows
tenfold.

Three things make it work. The context describes forces, the facts that pushed in different directions, rather than a story of meetings. The decision is in the active voice, "We will", so nobody has to guess whether it was agreed. And the consequences include the costs. A record that lists only benefits is a sales pitch, and the next engineer cannot tell which trade-offs were seen and which were missed.

ADR templates: Nygard, MADR and Y-statements

NygardMADRY-statement
ShapeFive short sectionsSections plus pros and cons per optionOne structured sentence
Options consideredIn the context, if at allIts own section, each option arguedNamed in the sentence
Typical lengthHalf a pageOne to two pagesThree or four lines
Best forMost teams starting outContested decisions with real alternativesLogging many small decisions quickly

The MADR template, trimmed to the sections most teams keep:

---
status: accepted
date: 2026-11-12
decision-makers: Priya Shah, Tom Berg
---

# Use Amazon SQS for background jobs

## Context and Problem Statement

Image resizing, invoice emails and webhook retries run inside the web
request, so a slow provider makes the page slow. What should carry
background jobs from the web tier to the workers?

## Decision Drivers

* No new infrastructure for a team of five to operate
* A failed job must be retried and never silently lost

## Considered Options

* Amazon SQS
* Self-hosted Kafka
* A jobs table in PostgreSQL

## Decision Outcome

Chosen option: "Amazon SQS", because it removes the work from the
request without giving a small team a broker to operate.

### Consequences

* Good, because a slow provider no longer slows the page
* Bad, because a message can arrive twice, so every handler must be
  safe to run twice

### Confirmation

Each handler has a test that processes the same message twice.

## Pros and Cons of the Options

### Self-hosted Kafka

* Good, because messages can be replayed
* Bad, because brokers have to be run, upgraded and monitored

The Y-statement version of the same kind of decision:

In the context of background jobs from the web tier, facing slow
providers that make page requests slow, we decided for Amazon SQS
(and against self-hosted Kafka and a jobs table in PostgreSQL), to
achieve fast pages and retried jobs with no broker to operate,
accepting that every job handler must be safe to run twice.

Try the three formats on the same decision. Pick one of the worked decisions below, a format and a status, and the block writes the file you would commit, with its name.

Write the same decision in three formats

Pick a format, one of three worked decisions and its status. The record below is the Markdown file you would commit; the highlighted parts are yours to fill in.

Format
Decision
Status

docs/adr/0007-use-postgresql-for-the-order-service.md

# 7. Use PostgreSQL for the order service

Date: [date]

## Status

Accepted

## Context

The order service has to reserve stock, take payment and create the order as one step: if any part fails, none of it may stay. The prototype stores orders in MongoDB, and finance now needs monthly reports that join orders, refunds and customers. Every other service we run already uses PostgreSQL, and two of the four people on call have never operated MongoDB.

## Decision

We will use PostgreSQL, on the same managed database service as our other services, for the order service. The prototype data is migrated once, before launch.

We compared PostgreSQL, MongoDB and DynamoDB. MongoDB lost because multi-document transactions are new to the team. DynamoDB lost because access patterns must be designed up front.

## Consequences

Stock, payment and order commit together or not at all. Finance can query the replica directly. Each schema change is a migration that has to be reviewed and run. We migrate the prototype data once, and it costs about a week. A single primary will need revisiting if order volume grows tenfold.

Once accepted, the record is not edited again apart from typos and links. If the decision changes, the change gets a new record that points back at this one.

My advice is to start with Nygard's five sections and add MADR's "Considered Options" when a decision was genuinely contested. The Y-statement is useful as the summary line at the top of a longer record, or for a decision log where each entry is a sentence.

When to write an ADR

Write one for decisions that are architecturally significant: expensive to reverse, felt outside the team that made them, or likely to puzzle someone later. In practice that means:

  • choosing a datastore, a queue, a framework or a cloud service other teams will depend on;
  • changing how services talk to each other, such as moving from synchronous calls to events;
  • a public API style, an authentication scheme or a data retention rule;
  • a deliberate exception to your own standards ("this service stays on Python 3.9 because");
  • choosing not to do something obvious, such as not adding a cache.

Do not write one for choices a revert can undo in an afternoon, or for conventions a linter enforces. A team that writes an ADR for every library bump stops writing them within a quarter, because the folder turns into noise. When you cannot tell whether a change needs a record, a short proposal or a full RFC, the review depth guide on design docs and RFCs walks through the questions.

How to write a good architecture decision record

  1. Title it with the decision. "Use PostgreSQL for the order service", not "Database discussion". Someone scanning the folder should learn the answer from the file name.
  2. Write the context as forces. The requirements, constraints and facts that pull in different directions. Include the ones that argued against what you chose.
  3. Name the options you considered. Two or three real ones, each with the reason it lost. "We considered nothing else" is a legitimate answer for a forced decision, so say that.
  4. State the decision in one or two sentences. Active voice, present or future tense: "We will".
  5. List consequences on both sides. What gets easier, what gets harder, what new work it creates, and what would make you revisit it.
  6. Set the status and date. Proposed while under review, then accepted or rejected.
  7. Open it as a pull request. The review happens where the code is reviewed, by the people who will live with it.

Write the record when the decision is made, not months later. A record written after the fact tends to tidy away the alternatives and the doubts, which are the parts a future reader needs most.

ADR status: proposed, accepted, superseded

The usual lifecycle is proposed, then accepted or rejected, and later perhaps deprecated or superseded by a newer record. Nygard's post names proposed, accepted, deprecated and superseded; MADR adds rejected.

Keep rejected records. A proposal that was turned down, with its reasons, saves the team from having the same debate a year later with a new hire who has the same good idea.

Superseding works by addition. The new record says "Supersedes ADR-0007" near the top, and the old record's status becomes "Superseded by ADR-0021". Nothing else in the old record changes. Reading the two in order shows how the forces moved, which is often the most useful history a codebase has.

Where to keep ADRs

In the repository, as Markdown, next to the code they describe. adr-tools defaults to doc/adr; docs/adr and docs/decisions are common too. Name files with a zero-padded number and the title, such as 0007-use-postgresql-for-the-order-service.md, so they sort in order and the folder reads as a log.

Two practical additions help. Keep an index file, or generate one, listing every record with its status, so superseded ones are easy to skip. And link to the record from the code it explains, in a comment where the surprising thing lives: // See docs/adr/0012 for why jobs go through SQS. That comment is how most people will find it.

For decisions that cross many repositories, a single architecture repository works, with a pointer from each affected service. Wikis are where ADRs go to be forgotten, because they drift away from the code and nobody reviews changes to them.

ADR vs RFC vs design document vs design rationale

  • An RFC asks for feedback before a decision. It can be long and exploratory.
  • A technical design document describes how something will be built: components, data, interfaces, rollout.
  • An ADR records one decision after it is made, briefly, and links to the RFC or design doc for depth.
  • A design rationale is a different genre: it explains to a client why design work looks the way it does, and asks them to approve it. If that is what you need, see how to write a design rationale.

Common mistakes

  • Several decisions in one record. Split them. Each one may be superseded on its own schedule.
  • Context written as history. "On Tuesday we met and discussed" tells the reader nothing about the forces.
  • No negative consequences. Every real decision costs something. Write the cost down.
  • Editing an accepted record when the decision changes. You lose the reason the first decision was right at the time.
  • Records nobody can find. Link them from the code and from the README's architecture section.

Reviewing ADRs with people outside the repository

Most ADRs should live in the repository and be reviewed in pull requests. Sometimes the people who need to agree are not in it: a client's architect, a security reviewer, a product lead. Then the record needs to travel as a document.

If you use Quixli for that, paste the Markdown into the editor and it converts into headings, lists, tables and code blocks; a fenced block marked mermaid becomes a diagram (importing Markdown covers what converts and what does not). Invite reviewers by email with Can comment and they leave threads on the exact sentence they disagree with. While the record is being edited, version history keeps a version at most every 30 minutes and holds the 30 most recent, so the wording that was approved can be found later. Once it is accepted, commit the final text to the repository, where the next engineer will look for it.

Questions

What is an architecture decision record?
A short document that records one architectural decision: the context that forced it, the decision itself, its status and its consequences. ADRs are numbered, kept with the code, and never rewritten once accepted. When a decision changes, a new record supersedes the old one, so the history of why the system looks the way it does stays intact.
What is the difference between an ADR and an RFC?
An RFC is a proposal written to gather feedback before a decision, and it can run to several pages. An ADR is the short record of the decision once it is made. A large change often has both: the RFC argues the case, and the ADR, a page or less, states the outcome and links back to the RFC for the detail.
Where should ADRs be stored?
Usually in the repository they describe, as numbered Markdown files in a folder such as doc/adr or docs/decisions, so they are reviewed in pull requests and versioned with the code. Decisions that span several repositories often live in one shared architecture repository, with a link from each affected codebase.
Can you edit an ADR after it is accepted?
Only to fix typos or broken links. The point of the record is to show what was decided and why, at the time. If the decision changes, write a new ADR, mark the old one as superseded with a link to the new one, and leave its context and reasoning as they were.
How long should an architecture decision record be?
One to two pages at most, which is the length Michael Nygard asked for in his original post, and many good ones fit on a single screen. If yours needs diagrams, benchmarks and a migration plan, that material belongs in a design document that the ADR links to.

Read next