Topic 2 of 5 · 4 min read
Architecture decision records with AI
Goal: Turn a design discussion into an ADR with context, options, decision and consequences, and catch rationale the agent invented.
An architecture decision record (ADR) is a short file that says what was decided, why, and what it costs, and an agent can draft it only from what people actually said. The agent writes the text. A named person owns the decision.
Check yourself · 1 of 3
Which section of an ADR records what the team gives up by choosing an option?
Why it matters
Six months from now someone will ask why you chose Postgres over DynamoDB, or why the service retries three times. The code shows what you did. It cannot show what you rejected. Michael Nygard's classic format keeps this cheap: a title, a status, the context, the decision and the consequences, in one page stored next to the code. Agents are good at turning a long chat thread or meeting notes into that shape. They are also good at inventing a reason that sounds right. A made-up rationale in an ADR is worse than no ADR, because people will trust it.
How to do it
- Give the agent the source. Paste the thread, the notes or the issue. Say: "Use only this material. If a section has no support, write
Not discussed." - Ask for the fixed sections. Title, Status (proposed, accepted, superseded), Context, Options considered, Decision, Consequences.
- Make options real. Each option should have at least one reason for and one against, taken from the discussion.
- Write consequences honestly. Include the costs and the new work the decision creates, not only the benefits.
- Check every reason against the source. Underline each "because". Can you find it in the thread? Remove or mark the rest.
- A person sets the status. Only the decision owner moves it from proposed to accepted, and their name goes in the file.
Before and after
Weak draft: "We chose Kafka because it scales to millions of events and is the industry standard."
The thread said: "We already run Kafka for billing, so ops knows it. Expected load is about 200 events a second. Queue ordering matters for refunds."
Fixed draft: "Decision: use the existing Kafka cluster. Reasons: the team already operates it, and per-partition ordering fits refund processing. Consequence: we accept more operational weight than a hosted queue for our modest load." The scale claim and the industry-standard claim are gone because nobody said them.
What goes wrong
- Invented rationale. Plausible reasons that were never discussed.
- Strawman options. Alternatives written only to lose.
- Missing consequences. The ADR reads like an advert for the choice.
- No owner. The file says "we decided" and no one can be asked.
Examples
Spotting an invented reason
The draft says: "We rejected RabbitMQ because of its poor reliability." The thread only says: "Nobody here has run RabbitMQ." The honest line is "We rejected RabbitMQ because the team has no operating experience with it." The invented claim also insults a tool for no evidence.
A minimal ADR skeleton
# ADR 014: Use the existing Kafka cluster for refund events
Status: Proposed (owner: Priya N.)
## Context
## Options considered
## Decision
## Consequences
The agent fills the headings from the thread. The owner reads each section against the source before changing the status.
Key points
- An ADR records context, options, decision and consequences in one short file in the repo.
- Tell the agent to use only the supplied discussion and to write
Not discussedwhere support is missing. - Every reason in the ADR must be traceable to something a person said or measured.
- Consequences must include costs and new obligations, not just benefits.
- A named person sets the status to accepted; the agent never makes the decision.
Common mistakes
- Letting the agent decide the winner when the discussion ended without one.
- Accepting reasons such as "industry standard" or "scales well" that nobody said and nobody measured.
- Writing only the benefits and leaving out the costs the team agreed to accept.
- Skipping the ADR because the agent can "explain it later"; the agent will not remember the discussion.
Check yourself · 2 of 3
An agent drafts an ADR from a chat thread and adds "chosen for its industry-leading performance". Nobody said this. What do you do?
Check yourself · 3 of 3
Who should mark an agent-drafted ADR as accepted?
Practice items, not counted towards your mastery.
Start here
- Architectural Decision Records (adr.github.io) (opens in a new tab)DocsFree
Templates, tooling and examples for ADRs, from the community that maintains the format.
- Documenting Architecture Decisions (Michael Nygard) (opens in a new tab)ArticleFree
The original short essay: title, status, context, decision and consequences, kept small and in the repo.
- Docs as Code (Write the Docs) (opens in a new tab)ArticleFree
Treat docs like code: version control, review, automated checks and the same pull request.