adr-write
User-invoked as /adr-write <title>. Scaffolds a new Architecture Decision Record in docs/adr/ using the MADR template, pre-filling context from recent git log and open GitHub issues. Use when a design
SKILL.md.claude/skills/adr-write/SKILL.md
GitHubADR Write (MADR)
Scaffold a new ADR for the decision titled $ARGUMENTS.
Steps
- Determine the next ADR number: list
docs/adr/, find the highestNNNN-prefix, increment (zero-padded to 4 digits). If none exist, start at0001. Filename:docs/adr/NNNN-<kebab-title>.md. - Seed Context from the repo: run
git log --oneline -10and, ifghis authenticated,gh issue list --state open --limit 10. Summarise what is prompting this decision. - Read the canonical template
docs/adr/template.mdand copy its structure verbatim — do not invent your own headings. FillNNNN, the title, today's date (from session context), and the seeded Context. Leave Status: Proposed. See the section spec in references/template-guide.md for what each section must contain and how the seeded git/issue context maps onto it, and docs/adr/0001-new-ui-rich-based-design.md as a filled exemplar. - Add an index line to
docs/README.md.
Template
The single source of truth is docs/adr/template.md
(read it at generation time — do not paste a copy here that can drift). It uses
the sections: Context, Decision, Alternatives Considered (a table),
Consequences (Positive / Negative), Validation / Rollout, and Links.
references/template-guide.md explains each and where the seeded context lands.
Output
Print the path of the created ADR and a one-line summary. Note that the
app-architect agent owns the decision content - this skill only scaffolds and
seeds it. Leave it Proposed for human/architect sign-off.
Completion checklist
- File created at
docs/adr/NNNN-<kebab-title>.mdwith correct zero-padded sequence number - Structure matches
docs/adr/template.mdexactly (Context, Decision, Alternatives Considered table, Consequences Positive/Negative, Validation / Rollout, Links) - no ad-hoc headings - Status is
Proposed- not Accepted (that requires human/architect sign-off) -
Alternatives Consideredtable has at least the chosen option + one rejected alternative with a stated reason -
Linkssection points at the driving roadmap task / issue used to seed Context -
docs/README.mdhas a new index line for the ADR -
/link-checkpasses on the new file