write-adr
Skill18 starsChanged 5 months agoMITView on GitHub
Write or update an Architecture Decision Record in docs/adr/ using the hexgate house style (R-<AREA>-NNN id, Status, Applies-to globs, MUST/MUST-NOT decision, a detailed Why). Use when recording a durable design/security decision, when asked to "write an ADR / decision record", or when superseding an existing one.
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
- Sir-chawakorn/sanook-clitheir own version, first seen Jun 21, 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
- Sir-chawakorn/sanook-cli★ 9same 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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- hexgate/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- hexgate/CLAUDE.mdCLAUDE.md
- integration-testsSkill
- pr-descriptionSkill
- run-platformSkill
- write-policySkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
9
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 10
Read a couple of existing records first — they are the source of truth for the house style — then match them.
- Distinctive: line 24
One decision per file: If you can't state it in two sentences, it's probably two decisions — split it.
- Very specific: line 26
Superseding?: Don't delete the old record.
- Distinctive: line 33
Every record has these; keep the optional ones only when they earn their place.
- Distinctive: line 42
Never "prefer" or "consider" — those let an agent do the opposite.
- Distinctive: line 91
Do give the decision a stable id and cite it by id from other docs (a PR body, another ADR) instead of re-explaining it.
- Distinctive: line 93
Do write MUST / MUST NOT, not "prefer / consider".
- Distinctive: line 94
Do keep it under ~200 lines.
- Very specific: line 95
Do add a Verify command whenever the rule is mechanically checkable.
- Distinctive: line 96
Do not delete or rewrite a superseded record — supersede it and keep the chain.
- Distinctive: line 97
Do not restate language/framework basics or anything the code already shows.
“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
Write a hexgate ADR
ADRs live in docs/adr/, one decision per file, named
R-<AREA>-<NNN>-<kebab-summary>.md (e.g. R-GUARD-002-guards-fail-closed.md).
Read a couple of existing records first — they are the source of truth for the
house style — then match them.
Terse on what, detailed on why. An agent reads these under a token budget and acts on them literally, so the decision must be unambiguous and the rationale must survive: six months later nobody remembers why, and without it someone "cleans up" the decision and reintroduces the bug it was avoiding. The rationale is the one part you must never compress.
Before writing
- Pick the area and the next id. Existing areas:
AGENT,GUARD,POL. Reuse one if the decision fits it; open a new area only for a genuinely new subsystem. Number is the next free integer in that area (ls docs/adr/). - One decision per file. If you can't state it in two sentences, it's probably two decisions — split it.
- Superseding? Don't delete the old record. Set the old one's Status to
Superseded by R-<AREA>-NNN (date)with a short "Why superseded" note, and set the new one's Status tosupersedes …, so the chain resolves. SeeR-AGENT-001→R-AGENT-002for the pattern.
Required shape
Every record has these; keep the optional ones only when they earn their place.
- Title —
# R-<AREA>-NNN: <the decision as a short imperative phrase>. - Status —
Accepted · <YYYY-MM-DD>, orSuperseded by …/supersedes …. - Applies to — the exact file/dir globs the decision governs, e.g.
`hexgate/guards/**`, `hexgate/adapters/**/tools.py`. This is what scopes the ADR: an agent loads it when touching those paths, so it is not always-on context. Be specific. - ## Decision — one or two imperative sentences, then MUST / MUST NOT bullets. Never "prefer" or "consider" — those let an agent do the opposite.
- ## Why — the forces, the tradeoff, and what breaks if the rule is ignored. Spend words here. Name the concrete failure the decision avoids (an incident, a fail-open, a drift) if there is one.
Optional, when useful:
- ## Consequences — what this enables or costs downstream (a cleanup job now required, a dev-env dependency, a follow-up deferred).
- ## Rejected alternatives — the specific option you turned down and why.
- ## Verify — a grep/lint/test the agent or CI can actually run to check the rule holds. Loading an ADR into a prompt is not enforcement; a check is.
Template
# R-AREA-00N: <decision as a short imperative phrase>
**Status:** Accepted · 2026-09-14
**Applies to:** `hexgate/<path>/**`, `platform/api/<path>/**`
## Decision
<One or two imperative sentences.> Then the specifics:
- <A MUST bullet — the rule, stated so an agent cannot read it two ways.>
- <A MUST NOT bullet — the thing this decision forbids.>
## Why
<The forces and the tradeoff. What breaks if this is ignored — name the concrete
failure (fail-open, drift, incident) the decision avoids. This is the part that
must not be compressed.>
## Consequences
- <What this now requires or costs elsewhere.>
## Rejected alternatives
- **<Option>** — <why it was turned down.>
## Verify
`<a grep / lint / test that checks the rule holds>`Do / do-not
- Do give the decision a stable id and cite it by id from other docs (a PR body, another ADR) instead of re-explaining it.
- Do write MUST / MUST NOT, not "prefer / consider".
- Do keep it under ~200 lines; the Why is where the words go.
- Do add a
Verifycommand whenever the rule is mechanically checkable. - Do not delete or rewrite a superseded record — supersede it and keep the chain.
- Do not restate language/framework basics or anything the code already shows.
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.

