Lesson 14 of 28Writing that engineers read
ADRs and Async Written Updates
Record each architecture decision in a short, numbered, immutable file, and write status updates and chat messages a busy reader can act on.
Three months into a new job you find that background jobs run from a Postgres table, polled every second, and the primary database spends a third of its CPU on it. It looks like an obvious mistake. You are about to propose replacing it when a colleague says, "There was a reason, I think. Ask Sam." Sam left last year. Without the reason, you cannot tell whether the original choice was careless or wise for its time, and you cannot tell whether the conditions that made it wise still hold. An architecture decision record (ADR) is a one-page file that would have answered you in two minutes. This lesson covers ADRs, and the other writing that keeps a team moving without meetings: weekly status updates and chat messages that get answered.
One decision per file
Michael Nygard proposed ADRs in a 2011 blog post, "Documenting Architecture Decisions". His point was that big architecture documents are never read and never updated, but a short note about one decision, written when it is made, stays useful for years. The idea spread because it is small enough that teams actually do it.
Nygard's format has five parts:
- Title: a short phrase naming the decision, numbered: "7. Use Postgres for background jobs".
- Status: Proposed, Accepted, Rejected, Deprecated, or Superseded (with a link to what replaced it).
- Context: the forces at play. Technical facts, constraints, deadlines, team skills, what was known at the time. Written neutrally.
- Decision: what you will do, in active voice: "We will ...".
- Consequences: what becomes easier and what becomes harder. All of it, not only the good parts.
# {N}. {Decision title, as a short phrase}
Date: {YYYY-MM-DD}
Status: {Proposed | Accepted | Rejected | Deprecated | Superseded by ADR-NNNN}
Deciders: {names or team}
## Context
{The situation and the forces at play: requirements, constraints, numbers,
deadlines, team skills. What a newcomer needs to understand the decision.
State facts, not your preference.}
## Decision
We will {the decision, in full sentences, active voice}.
## Consequences
{What becomes easier. What becomes harder. New risks, costs and follow-up
work. Include the negative ones.}ADRs live in the repo, next to the code they describe, so they are reviewed in pull requests like everything else (the "docs as code" idea from READMEs and docs people use).
- docs/
- adr/
- README.mdindex: number, title, status
- TEMPLATE.md
- 0001-record-architecture-decisions.mdthe first ADR is about ADRs
- 0002-start-as-a-modular-monolith.md
- 0007-use-postgres-for-jobs.mdStatus: Superseded by 0012
- 0011-adopt-feature-flags.md
- 0012-move-jobs-to-a-managed-queue.mdSupersedes 0007
- design/
- 2026-09-api-rate-limiting.mdthe design doc behind 0021
Three rules keep the folder trustworthy.
Number them, never reuse a number. 0007 is ADR-7 forever, so you can write "see ADR-7" in a PR, a ticket or a code comment, and the link never breaks.
Accepted ADRs are immutable. You may fix a typo, but you do not edit the decision. When it changes, you write a new ADR that says "Supersedes ADR-7", and change ADR-7's status to "Superseded by ADR-12". The history is the value. A reader can see that Postgres was right at 50 jobs a minute and a queue became right at 4,000.
Write it when you decide, in the same PR as the change. An ADR written three months later is a reconstruction, and it will be missing the alternatives you actually weighed.
An ADR opens as Proposed, usually in a pull request. Review comments go on the PR.
MADR: when options matter
Nygard's format is deliberately minimal. When a decision involves comparing several options, many teams use MADR (Markdown Any Decision Records, originally "Markdown Architectural Decision Records"), which adds decision drivers and a pros and cons list per option. A simplified version of the MADR 4 template looks like this; check the MADR project site for the current one.
---
status: {proposed | accepted | rejected | deprecated | superseded by ADR-NNNN}
date: {YYYY-MM-DD}
decision-makers: {names}
consulted: {people whose opinion was sought}
informed: {people told afterwards}
---
# {Short title: the problem and the chosen solution}
## Context and Problem Statement
{Two or three sentences, or a question.}
## Decision Drivers
* {driver 1, e.g. a quality we must keep, a deadline, a cost limit}
* {driver 2}
## Considered Options
* {option 1}
* {option 2}
* {option 3}
## Decision Outcome
Chosen option: "{option}", because {justification tied to the drivers}.
### Consequences
* Good, because {...}
* Bad, because {...}
### Confirmation
{How we will check the decision is followed: a review, a test, a
fitness function in CI.}
## Pros and Cons of the Options
### {option 1}
* Good, because {...}
* Bad, because {...}The Confirmation section is worth stealing even if you use Nygard's format. A decision like "billing never imports from orders" is only real if something checks it, ideally the kind of automated fitness function you met in Evolutionary architecture and Conway's law.
Tools exist (such as adr-tools, whose adr new creates the next numbered file and can mark an older one as superseded), but a template and a habit are all you need.
Writing a good ADR
Here is a worked example: the ADR that would have answered your question about the jobs table, and the one that later replaced it.
# 7. Use Postgres for background jobs
Date: 2024-03-04
Status: Superseded by ADR-0012
Deciders: Sam Okafor, Lina Park (backend)
## Context
We need background jobs for emails, PDF invoices and webhooks.
- Load: about 50 jobs per minute, peaking at 200. Growth forecast: 3x
over two years.
- Jobs must be created in the same transaction as the order, so we
never email about an order that rolled back.
- Team of four. Nobody has run a message broker in production.
- We already run Postgres 16 with good backups and monitoring.
Options considered: a jobs table in Postgres, a managed queue, Redis
with a job library.
## Decision
We will store jobs in a `jobs` table in the main database. Workers
claim jobs with `SELECT ... FOR UPDATE SKIP LOCKED` and poll every
second.
## Consequences
- Good: jobs are enqueued atomically with business data. No new
infrastructure, nothing new to learn, monitor or pay for.
- Bad: polling adds steady load to the primary. Above roughly 1,000
jobs per minute this will need revisiting.
- Bad: no built-in delayed retries or dead-letter queue; we will build
a simple version (attempts column, max 5).
- Follow-up: alert if the oldest pending job is older than 5 minutes.# 12. Move background jobs to a managed queue
Date: 2026-05-20
Status: Accepted
Deciders: Lina Park, Dev Rao (backend), Kim (SRE)
Supersedes: ADR-0007
## Context
ADR-0007 expected trouble above about 1,000 jobs per minute. We now
run 4,000 at peak, and job polling uses about 30% of primary CPU during
the evening peak (dashboard: db-primary-cpu). Two incidents this year
(INC-288, INC-301) were slow checkouts caused by job queries.
We still need atomic enqueue with orders.
## Decision
We will move job delivery to a managed queue. To keep enqueue atomic,
the app writes to an outbox table in the same transaction, and a relay
publishes outbox rows to the queue.
## Consequences
- Good: polling load leaves the primary; retries and dead-letter
handling come with the queue.
- Bad: one more managed service to pay for and monitor; local
development needs a queue emulator.
- Bad: delivery becomes at-least-once, so every job handler must be
idempotent. We audited all 14 handlers; 3 needed changes.What makes these good:
- Context a newcomer can follow in two years. Numbers, constraints and the team's skills at the time. "Nobody has run a broker" is a legitimate reason, and writing it down makes it visible when it stops being true.
- The decision is one sentence you could quote, in active voice.
- Honest negative consequences. ADR-7 predicted its own limit. That is not weakness; it is what let ADR-12 be written calmly instead of as a blame exercise.
- Short. One screen. If you need diagrams, data models and rollout plans, that is a design doc, and the ADR links to it.
What deserves an ADR
Nygard's test is "architecturally significant": decisions that affect structure, quality attributes such as performance or security, dependencies, interfaces, or how the system is built. In practice: a new datastore or major library, a pattern every service must follow, an API style, an authentication approach, a build or deployment change. A decision not to do something deserves one too, as the year 3 case in Evolutionary architecture and Conway's law showed. If people would argue about it again in a year, write it down.
A small script can keep the folder honest in CI: every ADR has the required sections, and every "Superseded by" points to an ADR that exists and links back.
Press Run (⌘ Enter) to see what happens.The printed table doubles as the index for docs/adr/README.md. Try deleting "Supersedes 0007." from ADR-12 and run it again.
What does this print?
chain = {"0002": "0005", "0005": "0008"} # ADR -> the ADR that superseded it
adr = "0002"
while adr in chain:
adr = chain[adr]
print(adr)ADR, design doc or RFC?
They overlap, and companies use the names loosely. This is the usual split:
| ADR | Design doc | RFC | |
|---|---|---|---|
| Scope | One decision | One project or feature | A proposal needing wide input, often a cross-team standard |
| Length | One screen | 1 to 10+ pages | Varies; often a design doc plus a process |
| Written | When the decision is made | Before building | Before deciding, for review |
| Lifetime | Permanent, immutable, superseded | Snapshot; status marks it done | Closed when decided |
| Lives in | The repo, docs/adr/ | Repo or shared docs tool | A shared repo or docs tool with a status |
| Answers | "Why is it like this?" | "How will we build this?" | "Should we all do this?" |
The common flow: an RFC or design doc is reviewed, the project is built, and the key decisions from it are recorded as ADRs that link back. The design doc ages; the ADRs stay accurate because they never claimed to describe more than one decision at one moment.
Async status updates
The other writing that matters every week is the status update. Your manager, the product manager and the teams that depend on you cannot attend your Daily Scrum, and they should not need a meeting to learn that you are blocked. A short written update, posted at the same time every week, does it.
Lead with the bottom line. BLUF ("bottom line up front", from military writing) means the first sentence carries the conclusion, so a reader who stops there still knows what matters.
**{Project}: {On track | At risk | Off track}** ({date})
{One sentence: the most important thing a busy reader needs to know.}
**Done this week**
- {Outcome, not activity. Link the PR, doc or dashboard.}
**Next week**
- {What you expect to finish.}
**Risks / blocked**
- {What, the impact on the date, and what you are doing about it.}
**Asks**
- {@person: the specific thing you need from them, and by when.}A worked example, for the rate limiting project from Design Docs and RFCs:
**API rate limiting: At risk** (Fri 26 Sep)
Shadow mode found one Pro customer who would be blocked; enforcement
may slip from 6 Oct to 13 Oct unless we raise their limit by Tuesday.
**Done this week**
- Middleware and Redis script merged and running in shadow mode (PR #1432).
- Dashboard for would-be 429s per key: grafana/d/ratelimit
**Next week**
- Send the 14-day notice email to customers (draft ready).
- Load test: one key at 900 req/s while others measure latency.
**Risks / blocked**
- Acme's nightly sync peaks at 140 req/s, above the Pro limit of 50.
Options: per-key override (2 hours of work) or a higher plan.
**Asks**
- @Marta (account manager): can we give Acme a 200 req/s override,
or should they move plans? Need an answer by Tue 30 Sep.Habits that make updates trusted:
- Outcomes over activity. "Merged and running in shadow mode" beats "worked on middleware".
- Honest status, early. "At risk" on a Friday is a gift. "Off track" announced the day before launch is a failure, even if the work was hard. Projects that report green until the end and then turn red are called watermelons: green outside, red inside. Avoid becoming one.
- Every risk has a "so what" and a plan. The impact on the date, and the options.
- Asks are named, specific and dated. "Any thoughts?" gets nothing. "@Marta, yes or no by Tuesday" gets an answer.
Chat messages that get answers
Most of your written communication at work is chat. Small habits change how quickly people help you.
- No bare "hi". "Hi" followed by waiting forces the other person to reply and wait in turn. Put the greeting and the question in one message. There is a well-known page about this called "no hello".
- Do not ask to ask. "Does anyone know Redis?" becomes "In staging, our Lua script returns
NOSCRIPTafter a failover. Should we fall back to EVAL, or preload scripts on connect?" - Give the context once: what you are trying to do, what you tried, the exact error, and what you think is happening.
- Use threads so a channel stays readable and the answer is findable.
- Paste code and errors as text, or link to the line in the repo. A screenshot of code cannot be searched, copied or read by a screen reader.
- Say how urgent it is. "Not urgent, any time this week" lets people plan.
- Close the loop. When it is solved, post the answer in the thread. If it was a decision, it belongs in an ADR or the design doc, not only in chat, because chat history is where decisions go to be forgotten.
Match each piece of information to where it should be written down.
Put the parts of a weekly status update in the order a busy reader needs them.
- Tap the steps below in the right order.
- ADR
- Architecture decision record: a short, numbered file recording one significant decision, its context and its consequences.
- superseded
- The status of an ADR replaced by a newer one; both link to each other and the old text is kept.
- MADR
- Markdown Any Decision Records: an ADR template that adds decision drivers, considered options and pros and cons.
- consequences
- The ADR section listing what gets easier and harder because of a decision, including the negative effects.
- BLUF
- Bottom line up front: put the conclusion or request in the first sentence.
- watermelon project
- A project reported green until late, when it suddenly turns out to be red inside.
- no hello
- The habit of putting your greeting and full question in one chat message instead of sending a bare 'hi'.