write-adr
Skill9 starsChanged 5 months agoApache-2.0View on GitHub
Sanook captures a significant technical decision as a structured Architecture Decision Record (Michael Nygard format) — context, decision, alternatives considered, consequences — written to docs/adr/ as numbered files with an index.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- Industrial-AI-Research-Lab/nir-agent-overlaytheir own version, first seen Sep 30, 2026
- dr-zog/plumblinetheir own version, first seen Aug 27, 2026
- 686f6c61/alfred-devtheir own version, first seen Aug 15, 2026
- HexamindOrganisation/hexgatetheir own version, first seen Jul 16, 2026
- 0xdeafcafe/skillstheir own version, first seen Jun 9, 2026
- fabianmagrini/skillstheir own version, first seen May 10, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- 686f6c61/alfred-dev★ 116same name
- HexamindOrganisation/hexgate★ 18same name
- fabianmagrini/skills★ 1same name
- MaheshAwasare/claude-skills-pro★ 1same name
- 0xdeafcafe/skills★ 0same name
- dr-zog/plumbline★ 0same name
- Industrial-AI-Research-Lab/nir-agent-overlay★ 0same 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 repository147 other files it gives its agents.
- second-brain/AGENTS.mdAGENTS.md
- second-brain/CLAUDE.mdCLAUDE.md
- agent-tool-mcp-builderSkill
- api-design-reviewSkill
- async-concurrency-correctnessSkill
- audit-accessibility-wcagSkill
- audit-license-complianceSkill
- audit-technical-seoSkill
- auth-jwt-sessionSkill
- author-codemodSkill
- brainstorm-designSkill
- build-audit-loggingSkill
- build-cdc-streaming-pipelineSkill
- build-cli-toolSkill
- build-data-tableSkill
- build-etl-pipelineSkill
- build-form-validationSkill
- build-native-mobile-uiSkill
- build-office-docsSkill
- build-offline-first-syncSkill
- build-react-componentSkill
- build-realtime-channelSkill
- build-spreadsheetSkill
- build-vector-searchSkill
- caching-strategySkill
- cicd-pipeline-authorSkill
- cloud-cost-optimizeSkill
- code-commentsSkill
- code-reviewSkill
- compose-local-dev-stackSkill
- configure-bundler-buildSkill
- configure-dns-tlsSkill
- configure-reverse-proxy-lbSkill
- configure-security-headers-cspSkill
- contract-testingSkill
- datetime-timezone-correctnessSkill
- db-migration-safetySkill
- debug-ci-pipeline-failureSkill
- debug-flaky-testsSkill
- debug-frontend-browserSkill
- debug-root-causeSkill
- defend-llm-prompt-injectionSkill
- deliver-webhooksSkill
- dependency-upgradeSkill
- deploy-releaseSkill
- design-api-paginationSkill
- design-authorization-modelSkill
- design-backup-dr-recoverySkill
- design-event-sourcing-cqrsSkill
- design-multi-tenancySkill
- design-protobuf-grpc-serviceSkill
- design-relational-schemaSkill
- design-search-index-infraSkill
- design-state-machineSkill
- design-token-systemSkill
- diff-table-paritySkill
- distributed-locks-leasesSkill
- dockerfile-optimizeSkill
- encrypt-sensitive-dataSkill
- error-messageSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Do NOT use for: reversible implementation details, code style nits, or decisions with no real alternative (those go in code comments or …
- Very specific: line 21
Locate or create
docs/adr/: Check whether the repo already has an ADR directory — common locations: docs/adr/, … - Very specific: line 52
Maintain the index: Keep docs/adr/README.md (or index.md) as a table: # | Title | Status | Date, one row per ADR, linking to each file.
- Distinctive: line 62
All-positive Consequences: Every real decision has a cost (new dependency to maintain, lock-in, migration work).
“Common” is measured: kept by at least 6 in 10 of the 7 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
When to Use
Invoke when a decision is being locked in and would be expensive to reverse or confusing to re-litigate later:
- A choice was made between real options: "let's go with X instead of Y" — a stack, library, framework, datastore, protocol, pattern, or module boundary.
- User explicitly says "record this decision" / "write an ADR" / "ADR this".
- Reversing an earlier decision (the old ADR must be superseded, not silently deleted).
Do NOT use for: reversible implementation details, code style nits, or decisions with no real alternative (those go in code comments or commit messages, not an ADR). One ADR = one decision; if the prompt bundles several, split them.
Steps
- Name the decision and its trigger before writing. State it as a single sentence: "We will use X for Y, because Z." If you can't, the decision isn't ripe — ask which option won and why the alternatives lost. Capture the trigger (the problem/forcing function that made a decision necessary) — that becomes Context. If no genuine alternative was ever on the table, stop: it's not an ADR.
- Locate or create
docs/adr/. Check whether the repo already has an ADR directory — common locations:docs/adr/,docs/architecture/decisions/,doc/adr/,adr/. Reuse the existing one and its filename convention; do NOT invent a parallel directory. If none exists, createdocs/adr/. - Assign the next sequential number. List existing files (
ls docs/adr/), find the highestNNNN, add 1. Zero-pad to 4 digits. Filename:NNNN-kebab-case-title.md(e.g.0007-use-postgres-for-event-store.md). Never reuse or renumber an existing ADR number — numbers are permanent IDs other ADRs link to. - Write the record in Nygard format, exactly these sections in order:
Status starts# NNNN. <Short imperative title> - Status: <Proposed | Accepted | Deprecated | Superseded by ADR-MMMM> - Date: <YYYY-MM-DD> ## Context <The forces at play: the problem, constraints, requirements, and assumptions that make a decision necessary. Factual and neutral — no solution yet.> ## Decision <"We will ..." — the choice, stated actively and unambiguously. One decision.> ## Alternatives Considered - **<Option A>** — <what it is> — rejected because <concrete reason>. - **<Option B>** — <what it is> — rejected because <concrete reason>. <Each real alternative + the specific tradeoff that lost it. "Do nothing" can be a valid alternative. If you list only the winner, you haven't justified it.> ## Consequences **Positive:** <what gets easier/safer/faster> **Negative:** <what gets harder, what we now must maintain, what risk we accept> **Neutral / follow-ups:** <new work this creates, things to revisit later>Proposedunless the decision is already final-and-shipped (thenAccepted). Context describes why a decision is needed, not the decision. Consequences MUST include negatives — an ADR with only upsides is propaganda, not a record. - Maintain the index. Keep
docs/adr/README.md(orindex.md) as a table:# | Title | Status | Date, one row per ADR, linking to each file. Append the new row; update the Status cell of any ADR whose status changed. Create the index if it's missing. - On a reversal, supersede — never edit history. To overturn ADR-N: write a new ADR-M for the new decision, and in its Context reference ADR-N. Then change ADR-N's status line to
Superseded by ADR-M(with a link) — do not rewrite ADR-N's body or delete it. Link both ways: new ADR points back to the one it replaces. Accepted ADRs are immutable except for the Status field.
Common Errors
- Editing an accepted ADR's body to "update" a decision. Accepted ADRs are an append-only log. A change of mind is a new, superseding ADR — never a rewrite of the old one. Only the Status line of an existing ADR may change.
- Reusing/skipping a number. Numbers are permanent references. Deleting ADR-0004 and giving 0004 to a new decision corrupts every link that pointed at the old one. Always take
max + 1. - No real alternatives section. Listing only the chosen option (or alternatives with no stated reason for rejection) makes the ADR worthless — the whole value is why the other paths lost. Each alternative needs a concrete rejection reason.
- Context that already contains the decision. Context = forces and constraints only. If "we will use X" appears in Context, you've collapsed the record. Keep the problem and the solution in separate sections.
- All-positive Consequences. Every real decision has a cost (new dependency to maintain, lock-in, migration work). Omitting negatives hides the tradeoff future readers most need.
- Multiple decisions in one ADR. "Use Postgres AND adopt hexagonal architecture" is two ADRs. Bundled records can't be individually superseded later. Split them.
- Forgetting the index / dangling supersede link. A new ADR not added to the index, or an old ADR left as
Acceptedafter being replaced, makes the log lie about current state. Update both sides. - Leaking private context — personal/author names, machine paths, internal tickets, secrets in Context or Decision. Keep it about the system, with generic placeholders.
Verify
- Decision stated as one clear "We will ..." sentence; exactly one decision in the record.
- File is
docs/adr/NNNN-kebab-title.mdwithNNNN = highest existing + 1, zero-padded; no number reused. - All five sections present and correctly scoped: Status, Context (forces only, no solution), Decision, Alternatives Considered (each with a why-rejected reason), Consequences (includes negatives).
- Status is a valid value (
Proposed/Accepted/Deprecated/Superseded by ADR-MMMM) and matches reality. - Index (
README.md/index.md) has a row for this ADR linking to it; statuses there match the files. - If this reverses a prior decision: old ADR's Status changed to
Superseded by ADR-N(body untouched), and the new ADR links back to it — both directions. - No personal identifiers, absolute home paths, internal URLs, or secrets anywhere in the record.
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.

