adr-writing
Skill5 starsChanged 4 months agoMITView on GitHub
Write Architecture Decision Records that a future engineer can act on: a numbered, immutable record with the context that forced the decision, the options weighed with real trade-offs, the decision in one sentence, and the consequences including what becomes harder. Covers when a decision deserves an ADR, how to supersede one, and how to keep an index. Use when a design choice has cross-cutting or long-lived effects, when reviewers keep asking why, or when onboarding depends on decisions nobody wrote down.
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Write an ADR when a decision is:
- Distinctive: line 18
Do not write one for choices that are local, obvious, or cheaply reversible.
- Very specific: line 74
Write the new ADR with Supersedes: NNNN and a Context section that says what changed since.
- Distinctive: line 80
When a codebase has undocumented decisions, write ADRs for the ones people keep asking about, dated today, with a Context that says …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
An ADR records a decision at the moment it was made, with the reasoning that was available then. It is not documentation of the system (that changes) and not a design document (that precedes the decision). Its reader is an engineer two years from now asking "why is it like this, and can I change it?"
When to write one
Write an ADR when a decision is:
- hard to reverse (a database, a framework, a public API shape, a data format), or
- cross-cutting (affects how most code is written: error handling convention, module boundaries, auth model), or
- surprising (a reader would assume the other option), or
- contested (people disagreed, and the losing option will come up again).
Do not write one for choices that are local, obvious, or cheaply reversible; a comment or a commit message serves those. A repository with 200 ADRs has stopped recording decisions and started recording activity.
Format
# 0007. Use PostgreSQL row-level security for tenant isolation
Date: 2026-09-21
Status: accepted
Supersedes: 0003
Deciders: (names or roles)
## Context
What situation forces a decision. The constraints (scale, team, deadline, compliance), the problem observed, and what happens if nothing is decided. Facts, with numbers where they exist. No solutions yet.
## Options considered
### A. Application-level filtering (current)
How it works in one or two sentences. Pros. Cons. What it costs to stay.
### B. Row-level security in PostgreSQL
Same.
### C. Schema per tenant
Same.
## Decision
One sentence: "We will use B: row-level security policies on every tenant-scoped table, enforced by a session variable set in the connection middleware."
Then the reasoning that tipped it, referring to the context's constraints. Two or three paragraphs at most.
## Consequences
What becomes easier. What becomes harder or is now forbidden (and what to do instead). Migration or rollout steps and who owns them. What would make us revisit this (the trigger for a superseding ADR).Writing rules
- Context is factual and dated. "Queries were taking 800 ms at p95 with 40 tenants" ages well; "performance was bad" does not.
- Options are honest. Give the rejected options their real advantages. An ADR whose alternatives are strawmen will not convince the person who preferred one of them.
- The decision is one sentence and uses "we will". Everything else is reasoning.
- Consequences include the negative ones. An ADR that lists only benefits is marketing.
- Immutable once accepted. Fix typos; do not rewrite history. A changed decision is a new ADR that supersedes this one; the old one's status becomes "superseded by NNNN".
- Short. One to two pages. Link to the design document, the benchmark, or the spike branch instead of inlining them.
- Status vocabulary: proposed, accepted, deprecated, superseded by NNNN. Nothing else.
Files and index
docs/adr/NNNN-kebab-title.md, four-digit sequence, never reused.docs/adr/README.mdwith a table: number, title, status, date. Regenerate it or keep it by hand; either way, keep it.- Reference ADRs from code comments where the decision is enforced (
// See ADR 0007), so the reader finds the reasoning from the code.
Superseding
- Write the new ADR with
Supersedes: NNNNand a Context section that says what changed since. - Edit the old ADR's status line only:
Status: superseded by 0012. - Update the index.
Retrofitting
When a codebase has undocumented decisions, write ADRs for the ones people keep asking about, dated today, with a Context that says "recorded retrospectively; the original reasoning was reconstructed from ...". Do not fake the date.
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- marmelab/atomic-crm★ 1.4ksame name
- ivanrvpereira/.agents★ 19same name
- Diviner-Dojo/agent_framework_template★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository89 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- site/llms-full.txtllms.txt
- site/llms.txtllms.txt
- improveSkill
- academic-writingSkill
- benchmark-reportingSkill
- bibtex-managerSkill
- citation-graphSkill
- citation-verifierSkill
- design-science-methodologySkill
- docx-thesisSkill
- experiment-reproducibilitySkill
- latex-toolkitSkill
- literature-searchSkill
- lit-review-synthesisSkill
- paper-readerSkill
- proofread-academicSkill
- research-figuresSkill
- research-methodologySkill
- research-questionSkill
- statistics-advisorSkill
- supervisor-updateSkill
- systematic-reviewSkill
- thesis-proposalSkill
- coolify-image-appSkill
- coolify-vps-baselineSkill
- deploy-verificationSkill
- express-prisma-coolify-imageSkill
- ghcr-coolify-pipelineSkill
- live-domain-cutoverSkill
- nextjs-coolify-imageSkill
- proxy-client-addressSkill
- vps-ops-toolkitSkill
- openapi-specSkill
- readme-writingSkill
- technical-writingSkill
- adversarial-reviewerSkill
- api-design-reviewSkill
- code-review-responseSkill
- create-agentSkill
- create-commandSkill
- create-hookSkill
- create-skillSkill
- db-migration-safetySkill
- dependency-upgradeSkill
- dockerfile-best-practicesSkill
- error-handling-patternsSkill
- executing-plansSkill
- explain-codebaseSkill
- fix-ciSkill
- github-actions-pipelineSkill
- grill-with-docsSkill
- incident-postmortemSkill
- logging-and-observabilitySkill
- parallel-agentsSkill
- performance-optimizationSkill
- refactoring-recipesSkill
- solid-principlesSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

