Write a one-page decision record
Use a short Markdown decision record to preserve the options you considered and the trade-offs behind your choice.
You find a dependency in the config and want to know why the team chose it. The commit shows who added it, and the discussion happened in a chat thread that has since disappeared.
Keep an architecture decision record in the repository so a future maintainer can read why the team made the choice.
The template
I copy this file into docs/decisions/ and number it.
# NNNN. Short title that states the decision
Status: proposed | accepted | superseded by NNNN
Date: YYYY-MM-DD
## Context
What is true today and what forces a choice. Two to four sentences.
## Decision
What we will do, in one or two sentences, starting with "We will".
## Options considered
- Option A: one line on what it is, one line on why not (or why yes).
- Option B: same.
## Consequences
- What gets easier.
- What gets harder.
- What we will need to revisit, and the signal that tells us.Name the decision in the title and keep the context short enough to scan in a pull request.
A filled example
Suppose a team needs to add search to a single table.
# 0001. Keep search in Postgres
Status: accepted
Date: 2025-09-01
## Context
Search covers one table with a title and a body column. Users type a few words and expect matches ranked by relevance. The database already runs in production and has a backup routine.
## Decision
We will use Postgres full-text search for the first version and add no separate search service.
## Options considered
- Hosted search service: adds ranking controls and requires a vendor and a sync job.
- Self-hosted search engine: requires a sync job and a server to run and patch.
- Postgres full-text search: supports relevance ranking inside the existing database.
## Consequences
- Search reads the same rows as the app, so there is no sync job to fall behind.
- Built-in full-text matching does not correct typos. Revisit the choice if users report missing results for misspelled terms.
- A later move to a search service will need a sync job.The example records why the team chose Postgres full-text search and leaves a concrete reason to revisit it.
How I use it
I write one when a choice is expensive to undo or when I expect someone to ask about it. I put the file in the same pull request as the change, so the review covers the reasoning too.
Record the strongest reason for each option you considered. A future reader can see when a constraint changes enough to revisit the choice.
If the decision changes, write a new record with the new reasoning. Mark the old record as superseded and link the two in both directions.