Architecture decision records: the cheapest governance you can buy

An architecture decision record is a short page that states a decision, the reasons for it and what it costs. Kept in the repository and reviewed like code, a set of records governs architecture better than most review boards.

By Nabil Ahmed8 minute read

The lunar surface near 21°N, 142°E, lit by a low Sun with night falling across one side.
The Moon near 21°N, 142°E. Rendered by Farside from NASA Lunar Reconnaissance Orbiter elevation data.

Every system carries decisions that were made by people who are no longer on the team. Engineers may wonder why the order service calls the ERP for every price rather than keeping its own copy, why there are two message queues, or why one service uses a different language. The people who knew have usually moved on, and the wiki page, if there was one, describes a design replaced long ago.

That leaves the team with two poor options. It can treat the decision as untouchable and work around it indefinitely, or reverse it and rediscover, at some expense, why it was made. Both happen often, and in both cases the cause is lost memory rather than a lack of skill.

An architecture decision record is the cheapest remedy we know of. Writing one takes about half an hour per decision and needs no tool beyond the repository the team already uses. It also does a second job that organizations usually pay far more for, turning architectural governance into the open review of short written decisions as they are made.

In brief

  • An architecture decision record (ADR) is a short document that captures one significant technical decision together with its context, the options that were rejected and the consequences that were accepted.
  • ADRs belong in version control next to the code they describe and are numbered in sequence, and they change only when a new record supersedes an old one.
  • A decision merits a record when reversing it would be expensive, when it affects other teams, when it departs from a standard or when it commits significant money.
  • Reviewing ADRs through the normal pull request process gives architects a lightweight point of control and gives teams a quick answer.
  • The list of rejected options and the reasons for rejecting them is the most valuable part of a record, because it is what prevents the same debate from being held again.

What a record contains

Most teams use a format that comes from Michael Nygard's article "Documenting architecture decisions", which proposed five parts: a title, a status, the context, the decision and the consequences. Later templates such as MADR add an explicit list of the options considered, and we recommend including it. The whole record should fit on one screen, or a little more.

  • The title is a short, numbered noun phrase that states the decision, for example "0014: Read contract prices from the ERP at order time".
  • The status is proposed, accepted or superseded by a later record, and it should carry a date and the names of the people who made the decision.
  • The context sets out the forces in play, meaning the requirement, the constraints and the facts as they were known at the time, written so that a reader two years later can judge whether those circumstances still hold.
  • The options considered are two to four real alternatives, each with the reason it was not chosen.
  • The decision itself takes one or two sentences in the active voice, beginning with the words "We will".
  • The consequences section describes what becomes easier or harder as a result. It also names the risks accepted and the follow-up work created, and it must include the downsides, because a record with no negative consequences has not been thought through.

Records are kept as plain text files, usually Markdown, in a folder such as docs/decisions inside the repository of the system they concern, while decisions that span many systems go in a shared architecture repository. Small command-line helpers such as adr-tools can create and number the files, but a naming convention with a template is enough.

What deserves a record

Not every choice deserves one, and a team that writes a record for each library version will usually give up within a month. Four tests help, and a decision that meets any of them should get a record.

  1. It is expensive to reverse, as with the choice of database, the boundary between two services, a data model that other systems will read, or an authentication approach.
  2. It affects people outside the team, for example through a public API contract, an event schema or a dependency on a shared platform.
  3. It departs from a standard or from a previous decision. If the organization's default is one cloud provider or one language and this system does something else, the reason should be written down.
  4. It commits meaningful money or operating effort, such as adopting a managed service with a significant running cost or taking on something the team will have to support on call.

A useful extra rule is to record the outcome of any design discussion that ran over an hour or was held more than once, since the time already spent shows the decision mattered.

A dozen or so records usually cover the foundations of a new system, and after that a healthy team tends to add a few each quarter.

Where prices come from

Consider a mid-size distributor that is building a new order platform alongside its ERP. Many of its customers have contract prices in the ERP with volume breaks and date ranges, so the team has to decide how the platform obtains a price when an order is placed.

Without a record, the story usually goes like this. The team decides in a meeting to call the ERP synchronously, and two years later a new lead engineer notices that every order waits on an ERP call, judges this to be a design flaw and starts a project to replicate price lists into the platform's own database. Some months in, that project runs into contract pricing rules that the replication cannot express without rebuilding the ERP's pricing engine. The original team had known this, and it was the whole reason for the first decision.

With a record in place, this is what the new lead reads on the first day:

# 0014: Read contract prices from the ERP at order time

Status: Accepted, 12 March. Decided by: order platform lead, ERP owner, enterprise architect.
Supersedes: none.

## Context
Around a third of order lines use customer contract prices. Contract rules
(volume breaks, date ranges, product-group overrides) are evaluated by the ERP
pricing engine and change daily. Finance requires that the invoiced price
equals the price shown at order time. The ERP pricing API responds within
300 ms under normal load but is unavailable during the nightly batch window
(01:00 to 02:30).

## Options considered
1. Replicate price lists to the platform nightly. Rejected: cannot express
   contract rules without reimplementing the pricing engine; prices would be
   up to a day stale, which breaks the finance requirement.
2. Replicate and also reimplement contract rules. Rejected: two pricing
   engines to keep in agreement; high risk of invoice disputes.
3. Call the ERP pricing API at order time. Chosen.

## Decision
We will call the ERP pricing API synchronously for every order line and treat
the ERP as the only source of prices. List prices for browsing are cached for
15 minutes. Contract prices are never cached.

## Consequences
- Order placement depends on ERP availability. During the batch window, orders
  are accepted as "price pending" and priced when the ERP returns.
- Order latency includes the ERP call. We accept this; the timeout is 2 seconds.
- ERP load rises with order volume. To be reviewed if peak order volume doubles.
- Revisit this decision if the ERP is replaced or offers an event feed of
  contract price changes.

The lead may still want to change the design, but the conversation now starts from the actual constraint, and the record names the conditions under which the decision should be reopened. If the change goes ahead, it is written up as record 0031, which states that it supersedes 0014, and the status line of 0014 is updated to point forward to it. The old record is kept, because much of the log's value lies in its history.

Running ADRs as governance

Traditional architecture governance runs through a board, where teams prepare slides, wait for a slot, present and receive a ruling. The cycle is slow, the slides are written to pass review more than to inform, and the ruling is rarely recorded where engineers will find it, so teams learn to avoid the board and the architecture drifts unseen.

ADRs reverse this arrangement with a process along the following lines.

  1. The team writes a record with the status "proposed" and opens a pull request.
  2. Reviewers are assigned by a simple rule, under which a decision that stays inside one team is reviewed by that team's lead, while a decision that crosses teams, departs from standards or commits significant spend also needs an architect.
  3. Discussion takes place in writing in the pull request within an agreed time such as three working days, after which silence counts as consent.
  4. Once the record is approved, its status changes to "accepted" and it is merged.

This gives architects what they need, which is sight of the decisions that matter at the time they are made, with the reasoning attached. Teams get a quick and predictable answer along with a record that protects them later, and as a by-product the organization gets a searchable log of how the estate came to be the way it is. An architecture function that works this way spends its time on the few decisions that cross boundaries, which is the model we argue for in enterprise architecture without the ivory tower and the one we follow in our own enterprise architecture work.

Standards fit the same mechanism, since a standard is a decision record at the level of the organization, such as "New services use the shared identity provider." A team that needs an exception writes a record explaining why. Exceptions then become visible and countable, and a standard that collects many of them is due for revision.

The records pay off again whenever outsiders need to understand the system. A reviewer carrying out technical due diligence or an independent architecture review can read thirty records in an afternoon and learn more than a week of interviews would tell them. New engineers benefit in the same way, and so does an AI coding assistant working in the repository, which can only respect a constraint written where it can read it.

How records go wrong

Records written afterwards as documentation tend to be rationalizations, because a record composed months later reconstructs the reasons instead of capturing them. Write it when the decision is made, while the rejected options are fresh, or better still draft it beforehand, since writing out the context often changes the decision.

Records without rejected options tell the reader nothing about why the choice was made. A line such as "We will use a document database" with no alternatives leaves the next person unable to tell whether a relational database was considered and ruled out or never came up at all.

Editing records in place destroys the history, because once records are rewritten as thinking changes, a reader can no longer trust that a record reflects what was decided at the time. Supersede a record with a new one instead of editing it, although fixing a typo is fine.

Records that run too long turn into design documents. If a record needs diagrams and ten pages, the design document should be written separately, with the record summarizing the decision and linking to it.

Records kept away from the code in a separate document system tend not to be updated, found or reviewed. Records next to the code show up in searches and in the same pull requests as the changes they explain.

Records that go unread are of little use, so link the relevant record from a code comment at the point where the decision has its effect, mention record numbers in pull requests and include the folder in onboarding. A decision log is also the natural backbone of a handover, as we argue in handover is the deliverable.

Records also have a limit, in that they preserve reasoning without checking that the code still follows it. A decision that matters enough should also get an automated check where one is possible, such as a dependency rule in the build, a policy in the pipeline or a contract test, so that the record explains the rule while the check enforces it.

Start this week

  • Create a docs/decisions folder with a one-page template in one repository that is under active development.
  • Write records for the three most recent significant decisions while the people who made them are still available, and mark them accepted with their original dates.
  • Agree on the four tests for what deserves a record and on who reviews which kind of decision.
  • Add a line to the pull request template that asks: "Does this change make or reverse an architectural decision? If so, link the record."
  • Set a review deadline in working days, and make sure reviewers keep to it.
  • After two months, read the log end to end with the team and check whether a newcomer could reconstruct why the system looks as it does.

The practice suits any team building systems that are meant to last, which is why a written decision log is part of how we run enterprise application development. Trying it on one team costs little, and if the log proves useful there you can extend it, while if it does not, you have lost a few hours and gained three well-documented decisions.

Related services

Start a conversation.

A short paragraph is enough. A principal reads every message and replies within one working day.

Or email hello@farside.works. We use what you send only to reply. Privacy