write-adr
Skill0 starsChanged 3 months agoMITView on GitHub
Draft a new Architecture Decision Record into the repo's ADR directory (new files only — not for amending an existing ADR). Use when asked to write an ADR, record an architecture decision, or document a design trade-off.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- LeonardoEnnes/ai-engineering-toolkittheir own version, first seen Nov 8, 2026
- adhamhaithameid/write-skillstheir own version, first seen Nov 8, 2026
- helmut-hoffer-von-ankershoffen/heinzeltheir own version, first seen Nov 8, 2026
- 0xdeafcafe/skillstheir own version, first seen Nov 6, 2026
- pahlevikun/levistacktheir own version, first seen Nov 1, 2026
- daniel-kindl/dkstacktheir own version, first seen Nov 1, 2026
Used with
Projects with it also use code-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- HexamindOrganisation/hexgate★ 23same name
- helmut-hoffer-von-ankershoffen/heinzel★ 2same name
- adhamhaithameid/write-skills★ 1same name
- daniel-kindl/dkstack★ 1same name
- fabianmagrini/skills★ 1same name
- MaheshAwasare/claude-skills-pro★ 1same name
- tejastn10/workbench★ 1same name
- 0xdeafcafe/skills★ 0same name
- dr-zog/plumbline★ 0same name
- Industrial-AI-Research-Lab/nir-agent-overlay★ 0same name
2 more not listed
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 repository6 other files it gives its agents.
- dispatchSkill
- orchestrate-creatorSkill
- promote-memoriesSkill
- risk-reviewSkill
- skill-retroSkill
- work-logSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
5
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 48
Highest is not always most representative: if that ADR is visibly atypical (many more sections than its neighbours, one-off headings like …
- Distinctive: line 61
Context: read CLAUDE.md if present.
- Very specific: line 77
Write the new ADR following TEMPLATE_PATH's structure.
- Distinctive: line 80
If no template exists, use this skeleton:
- Very specific: line 127
Reviewer A — Accuracy: Verify every cited file:line, rule section, doc reference, and external/SDK assertion actually says what the ADR …
- Distinctive: line 131
Reviewer B — Clarity: Read as a future maintainer with no memory of the discussion: is the rationale self-contained?
- Distinctive: line 135
Do not bake house opinions into this prompt (for instance, that a pinned numeric acceptance threshold should be restated as a mechanism …
“Common” is measured: kept by at least 6 in 10 of the 12 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
/write-adr
Draft an Architecture Decision Record for: $ARGUMENTS
Project-agnostic: the repo's existing ADRs are the format spec. This skill discovers them
rather than imposing a house style, so a repo that says ## Trade-offs where another says
## Consequences keeps its own convention with no configuration.
Scope: new ADRs only. Amending an existing ADR is ordinary editing — the numbering, template discovery, and review loop here all assume a file that does not exist yet. If the user wants a change to an already-written ADR, edit it directly instead of invoking this.
A project with its own write-adr skill shadows this one (project scope wins) — expected, and
there is no obligation to keep the two in sync.
Step 1 — Discover
- ADR directory: glob for a directory containing
ADR-*.md/adr-*.md— trydocs/decisions/,docs/adr/,doc/adr/,docs/architecture/decisions/. A bareNNN-*.mdnaming also counts, but only if the directory also looks like a decision log (anINDEX.mdof decisions, or files whose headings read as decisions) — a numeric-prefix glob alone matches ordinary numbered docs (001-getting-started.md) and would drop an ADR into an unrelated series. If several directories match, ask. If none exists, ask the user where to write and use the skeleton in Step 2. The numbering scheme, then the main sequence. First decide what the numbers are: a flat monotonic counter (
ADR-007), or date/year-encoded (ADR-2026-01,ADR-20260718). Everything below assumes flat — if the scheme is date-encoded, do not apply any gap heuristic; derive the next id from the scheme itself (today's date) and pick the template by recency.For a flat scheme, list the numbers and look for outliers before doing arithmetic on them. Repos park entries at sentinel numbers (
ADR-9999,ADR-0000) for deliberately-unnumbered decisions; naivemax + 1onADR-001..027plusADR-9999yieldsADR-10000and corrupts the sequence permanently. A gap of ≥ 50 above the contiguous run is a candidate sentinel, not a verdict — the gap alone cannot tell a parked entry from a reserved subsystem block (100–199) or a renumbered history. So: when any candidate is found, state your reading and ask the user to confirm before writing. Corroborate with the file's content — a sentinel usually reads as a deliberately-unnumbered decision, not as the sequence's next entry.- Template ADR: the highest-numbered ADR in the main sequence (confirmed sentinels
excluded). Read it in full — section names, ordering, status/date header shape, and numbering
width (
ADR-007vs0007) are the spec for the new file. Note its path asTEMPLATE_PATH. Highest is not always most representative: if that ADR is visibly atypical (many more sections than its neighbours, one-off headings like "Dead code removed in passing"), say so and take the common structure across the two or three most recent instead — do not propagate a bespoke document's shape into every future ADR. - Next number: main-sequence max + 1, in the template's zero-padding and filename shape.
Then check for reservations before claiming it: an ADR index,
CLAUDE.md, or aCONTRIBUTINGsection may record a number as reserved / not yet written with no file on disk, which a file listing cannot see. Grep the repo for the candidate number and forreserved|not yet writtennear ADR references; if the number is spoken for, take the next free one and report the skip. - Project ADR rule file (optional): look for
.claude/rules/adr*.mdor aCONTRIBUTINGsection on ADRs. If found, read it and note its path asADR_RULES_PATH— it takes precedence over anything inferred from the template. - Context: read
CLAUDE.mdif present. If the repo has a roadmap/phase doc and the decision is phase-scoped, read only the relevant section.
Report the resolved directory, next number, template, and any sentinel or reserved number skipped,
before writing. Immediately before Write, confirm the target path does not already exist
(re-glob if Step 1 and Step 2 are not contiguous in the same turn — two /write-adr runs in
parallel would otherwise compute the same number). If it exists, stop and report rather than
writing.
Step 2 — Draft
Apply ADR_RULES_PATH here, at draft time — not only at review time. Its standards (typically:
verify each fact-claim you cite as you write it; prefer a mechanism contract over a pinned
threshold) are cheap to honour while drafting and expensive to retrofit once Step 3 finds them
violated.
Write the new ADR following TEMPLATE_PATH's structure. Keep it concise and LLM-friendly: explicit
sections, rationale stated rather than implied.
If no template exists, use this skeleton:
# ADR-NNN: <Title>
> **Status:** Accepted
> **Date:** YYYY-MM-DD
> **Context:** One-line summary of why this decision is needed.
## Context
What is the issue motivating this decision?
## Options
| Option | Pros | Cons |
|--------|------|------|
| **A** | … | … |
## Decision
What is the change being proposed / done?
## Rationale
Why this option over the alternatives?
## Consequences
What becomes easier or more difficult?Options table: include it when real alternatives were considered, with the reason each was rejected. Omit it for a decision with no meaningful alternative — an Options table padded with strawmen is worse than none.
Get today's date from date +%F, never from memory.
Step 3 — Review loop
Launch two subagents in parallel, read-only (they must not modify files). Each prompt MUST embed
the resolved paths. Why this is not optional: a subagent inherits none of this session's
context, and a path-scoped .claude/rules/*.md (one with paths: frontmatter) does not
auto-load for it — such a rule injects only from a Read on its path, which the subagent performs
only if the prompt hands it that path. Passing the paths explicitly is therefore the entire mechanism by
which project ADR standards reach the reviewers;
omit it and the standards vanish with no error. (Depth: code-review-path-scoped-rules.md, under
~/.claude/kit-docs/ on a symlink install or ${CLAUDE_PLUGIN_ROOT}/docs/ on a plugin one.)
Each prompt carries: the new ADR's path, TEMPLATE_PATH, ADR_RULES_PATH if found (with "read it
first and apply it"), and "return findings only — no edits, no file dumps".
- Reviewer A — Accuracy. Verify every cited
file:line, rule section, doc reference, and external/SDK assertion actually says what the ADR claims. Confirm the Options table lists the alternatives that were genuinely considered, each with a stated reason for rejection. Confirm the filename and numbering match the directory's convention. Reviewer B — Clarity. Read as a future maintainer with no memory of the discussion: is the rationale self-contained? Are the consequences honest about costs, not only benefits? Is anything load-bearing left implicit?
Do not bake house opinions into this prompt (for instance, that a pinned numeric acceptance threshold should be restated as a mechanism contract). That is a real standard in some repos and wrong in others, and asserting it here would make a project-agnostic skill emit false-positive review noise. Such opinions reach the reviewers through
ADR_RULES_PATH, which is exactly what that pass-through is for.
Model choice: Reviewer A is largely mechanical verification — a cheaper tier is appropriate.
Reviewer B is a judgment read — keep it on the session model or better. Both are far inside the
subagent output cap (Claude Code 2.1.228: Opus 5 · Sonnet 5 · Fable 5 64,000 / Haiku 4.5 32,000
output tokens per response) for a single document; no scope split is needed here. Depth if installed
via symlink: ~/.claude/rules/subagent-usage.md.
Step 4 — Converge
- Revise the ADR for the findings, then re-run the reviewers on the revision.
- Repeat until no new findings. Hard limit: 3 iterations — stop at 3 even if findings remain.
- Report: the final ADR path, the iteration count, and any findings left unresolved. Do not silently drop them; an unresolved finding is a result, not a failure to hide.
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.

