LESSON 7

ADR Management

Record architecture decisions so their reasons survive: when to write an ADR, a practical template, the decision lifecycle, indexing, review, and recovering past decisions.

Introduction

Six months from now someone will ask, “Why do we process imports in a background queue instead of in the request?” If the answer lives only in the memory of someone who has left, the team will either re-argue the decision or reverse it without knowing what it protected.

An Architecture Decision Record (ADR) is a short document that captures one significant decision: the context, the options considered, the choice, and its consequences. In the architecture course you wrote ADRs as part of designing. This lesson is about managing them over time: writing them well, keeping them findable, and handling the fact that decisions change.

Learning Objectives

  • Decide which decisions deserve an ADR.
  • Write an ADR with real alternatives and honest consequences.
  • Manage the ADR lifecycle: proposed, accepted, superseded, deprecated, rejected.
  • Organize, number, index, and link ADRs to code and documentation.
  • Run a lightweight review process.
  • Recover and record decisions that were never written down.
  • Use AI to draft, challenge, and audit ADRs without inventing rationale.

1. What Deserves an ADR

An ADR records an architecturally significant decision: one that is expensive to reverse, affects several parts of the system, or constrains future choices. A practical test: write one if a future maintainer is likely to ask “why?”, or if you expect the same debate to recur.

Likely ADR Probably not
Process imports in a background job instead of the request Which variable name to use
Enforce workspace isolation in the data layer, not only in handlers Formatting rules (a linter enforces them)
Choose the relational database A library upgrade with no impact
Choose how the model provider is accessed and what data is sent Choices fully recorded by a convention document
Define the API versioning and deprecation approach Temporary experiments
Accept a known limitation (technical debt) deliberately  

If a decision is cheap to reverse and affects one place, a code comment or pull request description is enough. Too many ADRs become noise, and nobody reads them.

2. A Practical Template

Keep it to one page. A widely used lightweight format (often called MADR) works well:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ADR-0007: Use content fingerprints for duplicate detection

- Status: Accepted
- Date: 2026-10-14
- Deciders: Tech lead, backend engineers
- Supersedes: none
- Related: ADR-0003 (background import), SRS requirement FR-12

## Context and problem
Customers re-import overlapping exports. We must avoid duplicate
feedback items without relying on customer-supplied row IDs, which
some tools reuse across files. We need a rule that is fast, explainable
to users, and testable.

## Decision drivers
- Explainable to users in one sentence
- Works without customer-supplied IDs
- Constant-time lookup at import volume (50,000 rows, illustrative)

## Options considered
1. **Customer row ID.** Simple, but IDs are reused across exports.
2. **Exact match on the full row.** Misses near-duplicates caused by
   whitespace or case differences.
3. **Fingerprint of normalized body + source + date.** Tolerates
   formatting differences; needs a normalization rule.

## Decision
Option 3. Fingerprint = hash of normalized body, source, and date,
with a unique constraint per workspace.

## Consequences
- Good: duplicates are skipped reliably and explainably.
- Good: the rule is testable with boundary and property tests.
- Bad: same text from the same source on the same day is treated as
  a duplicate even if intended as two items.
- Bad: changing normalization later requires re-fingerprinting.
- Follow-up: document the rule for users; monitor false-duplicate reports.

## References
Pull request 142; pilot feedback notes; docs/user/duplicates.md

The most important parts are options considered and consequences. An ADR with one option and only benefits is an announcement, not a record. Write the downsides; they are what a later reader needs most.

3. Lifecycle and Statuses

Decisions change. ADRs record history, so they are append-only: you do not rewrite an accepted ADR; you write a new one that supersedes it.

Status Meaning
Proposed Under discussion; open for review
Accepted Decided and in force
Rejected Considered and declined; keep it so the idea is not re-proposed without new facts
Deprecated No longer relevant (for example, the feature was removed)
Superseded by ADR-NNNN Replaced by a later decision

Rules:

  • Do not edit the decision of an accepted ADR. Corrections of typos and added links are fine.
  • When a decision changes, write a new ADR that references the old, and update the old one’s status line to “Superseded by ADR-NNNN”. Both stay in the repository.
  • Record the reason it changed: what we learned or what changed in the context. This is often the most valuable text in the whole collection.
  • Rejected ADRs are useful. They stop the cycle of proposing the same idea.

4. Organization: Location, Numbering, Index

1
2
3
4
5
6
7
docs/architecture/decisions/
  README.md                 Index and instructions
  0001-record-architecture-decisions.md
  0002-modular-monolith.md
  0003-background-import-queue.md
  ...
  template.md
  • Store ADRs in the repository next to the code, so they version together and appear in pull requests.
  • Number sequentially and never reuse a number. A stable ID such as ADR-0007 can be referenced from code, tickets, and other documents.
  • Name files by the decision, not the topic: 0007-fingerprint-duplicate-detection.md.
  • Maintain an index with number, title, status, date, and tags. Generate it from the front matter of each file so that it cannot drift.
  • Link both ways: ADRs reference the code and pull requests; code comments, module overviews, and architecture documents reference ADRs (as in lesson 5).
  • Tag by area (data, security, API, AI) so readers can filter.

5. A Lightweight Process

ADRs fail when the process is heavy. A workable flow:

  1. Draft the ADR as a pull request with status Proposed, ideally before or alongside the implementation. Writing the decision while the options are fresh is far cheaper than reconstructing it later.
  2. Review with the people affected: a short discussion in the pull request, or a meeting for large decisions. Reviewers challenge the options and consequences, not the wording.
  3. Decide: the named decider(s) accept or reject. Time-box the discussion; an undecided decision is also a decision, made by default.
  4. Merge with status Accepted (or Rejected).
  5. Revisit when a trigger occurs (a stated condition in the ADR, a failed assumption, a major change).

For decisions that affect many teams or are very large, a longer proposal (an RFC) can precede the ADR. The ADR then records the outcome briefly.

Add to the pull request checklist from lesson 3: “Does this change implement or contradict an ADR? Is a new ADR needed?”

6. Recovering Decisions Never Recorded

Most projects start with decisions already made. You can reconstruct the important ones.

Sources: earlier architecture documentation, design documents, issue and pull request discussions, commit history, chat threads, and, above all, the people who were there.

Method:

  1. List the significant decisions visible in the system (database, queue, tenancy model, authentication, deployment).
  2. For each, gather the evidence and ask the people involved.
  3. Write the ADR with the actual date (or the best-known date, marked as reconstructed) and a note: “Reconstructed from [sources].”
  4. Where the reason is unknown, write “Rationale not recorded” and the evidence of the consequences you can observe. Do not invent a reason.
  5. Ask the original decider to confirm.

A reconstructed ADR with honest gaps is more useful than none, and more useful than a polished fiction.

7. Keeping the Collection Healthy

  • Review the index quarterly (or at each release): are any accepted ADRs no longer true in the code? Mark them deprecated or write superseding records.
  • Check for ADR drift: where the code contradicts an accepted ADR, either the code or the ADR is wrong. This is a finding, not noise.
  • Quality checklist for an ADR: Is the problem stated? Are at least two real options listed (including “do nothing” where relevant)? Are the consequences honest, with downsides? Does it name decider and date? Is it understandable without the meeting that produced it?
  • Keep it short. If an ADR is several pages, the detail belongs in a design document, linked from the ADR.
  • Make them discoverable: link to the index from the README, the architecture overview, and the contribution guide.

8. Using AI With ADRs

Draft from raw discussion.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Act as a technical writer helping to record an architecture decision.

Inputs:
- Discussion notes, pull request threads, or meeting minutes: [paste]
- Relevant requirements and constraints: [paste]
- ADR template: [paste]

Tasks:
1. Draft an ADR in the template using only what the inputs state.
2. Extract the options that were actually discussed, and the reasons
   people gave for and against each.
3. List consequences that were stated, and separately list
   consequences you infer (marked as inferred).
4. List missing information: the decider, the date, an option that
   was mentioned but not evaluated, the reasoning behind the final
   choice.
5. Do not invent rationale. Write "Rationale not recorded" where the
   inputs are silent.

Challenge a decision.

1
2
3
4
5
6
7
8
9
Act as a skeptical reviewer of this ADR: [paste].

1. What options are missing, and which listed option is presented
   unfairly (a straw man)?
2. Which consequences are missing, especially operational, security,
   cost, and maintenance consequences?
3. Which assumptions would invalidate the decision if false? Suggest
   a trigger for revisiting it.
4. Which statements are vague or unmeasurable?

Audit the collection.

1
2
3
4
5
6
Inputs: the ADR index and ADRs, the architecture overview, and the
repository's structure and dependency manifest.

Identify: ADRs whose decisions the code appears to contradict;
significant structures in the code with no ADR; contradictions among
ADRs; and ADRs that appear superseded but are not marked.

Use the audit output as a list of questions. Only the people who made the decision can say why; the model can only help structure, challenge, and notice.

9. Practical Exercise

For SignalDesk (or your project):

  1. Set up the ADR directory, template, and an index generated from front matter.
  2. Gather the ADRs written in the architecture course. Bring them into the template and check that each has real options and honest consequences.
  3. Identify at least five significant decisions with no ADR (for example, duplicate detection, background processing, the tenancy model, the model provider integration, and API versioning) and write them, reconstructing from sources and marking unknown rationale.
  4. Write one new ADR for a decision you are making now, as a pull request with a review.
  5. Supersede one ADR: write the new record, link both, and update the status.
  6. Run the challenge prompt on two ADRs and revise them where the criticism holds.
  7. Run the audit prompt, verify the findings against the code, and log what you resolved.
  8. Add links from code comments, the architecture documentation, and the README to the relevant ADRs.

Verification

You are ready to continue when:

  • Every significant decision in the architecture documentation has an ADR or an explicit “not recorded” gap.
  • Each ADR lists real alternatives and states downsides and a trigger for revisiting.
  • Statuses are accurate, and superseded ADRs point to their replacements.
  • The index is generated, current, and linked from the README.
  • No reconstructed ADR contains invented rationale.
  • The pull request process prompts for ADR impact.

Key Takeaways

  • An ADR records why, so that future people do not re-argue or accidentally reverse decisions.
  • Write ADRs for significant, costly-to-reverse decisions, and keep them short.
  • ADRs are append-only; change a decision with a new ADR that supersedes the old.
  • Options and consequences are the valuable parts, and downsides must be included.
  • AI can structure, challenge, and audit; it cannot supply a reason nobody wrote down.

What’s Next?

Architecture and decisions help engineers who are already oriented. Next, we write the documents that orient them: the README and developer guides, which must work for someone who has never seen the project before.