agentleFS
michelvemichelve/hugin-v0/skills/adr-writer/SKILL.md

adr-writer

Skill0 starsChanged 8 months agoMITView on GitHub

Write, validate, and commit Architecture Decision Records in MADR 4.0.0 format. Use when user says 'write an ADR', 'create an ADR', 'document this decision', 'ADR for X', 'architecture decision record for X', 'record this decision', 'document the decision to use X', or wants to formally capture an architectural choice. Do NOT trigger on 'what ADR covers X?', 'show me the ADR for Y', 'does this violate an ADR?', or 'check ADR compliance' - those are lookup/audit tasks.

10 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every ADR must contain all five mandatory sections.

    line 39
  2. Very specific:

    Read docs/decisions/README.md - find highest NNNN

    line 67
  3. Very specific:

    Always update the index table in docs/decisions/README.md after writing the file

    line 70
  4. Distinctive:

    When replacing an existing ADR (triggered by violation checker or user intent):

    line 83
  5. Very specific:

    If the user asks for external evidence or benchmarks to support the decision, invoke the web-research-specialist agent before finalizing.

    line 92
  6. Very specific:

    When invoked with the supersedes: NNNN argument (either by user or from check-adr-violations.prompt.md), the $ARGUMENTS variable contains …

    line 96
  7. Very specific:

    Add supersedes: "0005 - Old Title" to the new ADR frontmatter

    line 103
  8. Distinctive:

    Update the index table in README.md to reflect the supersession

    line 104
  9. Distinctive:

    If no arguments are provided, this is a new ADR with no supersession relationship.

    line 106

“Common” is measured: kept by at least 6 in 10 of the 9 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

This skill uses extended thinking for complex architectural trade-off analysis. ultrathink

ADR Writer

Writes complete, validated Architecture Decision Records in MADR 4.0.0 format and commits them to docs/decisions/. Follow write-adr.prompt.md for the full 10-step workflow.

When to Activate

Activate on:

  • "write an ADR for X"
  • "create an ADR"
  • "document this decision"
  • "ADR for X"
  • "architecture decision record for X"
  • "record this decision"
  • "document the decision to use X"
  • "we decided to use X, write that up"
  • Invoked from check-adr-violations.prompt.md with a supersedes: NNNN parameter

Do NOT activate on:

  • "what ADR covers X?" → lookup task, read the index
  • "show me the ADR for Y" → lookup task, read the file
  • "does this violate an ADR?" → audit task, use check-adr-violations.prompt.md
  • "check ADR compliance" → audit task, use check-adr-violations.prompt.md

MADR 4.0.0 - Mandatory Sections

Every ADR must contain all five mandatory sections. Missing any one = invalid.

SectionRequiredNotes
YAML frontmatter✅status + date always present
Context and Problem Statement✅2–4 sentences, factual, project-specific
Considered Options✅2–4 options, concise noun phrases
Decision Outcome✅Must start with Chosen option: "X", because
Consequences✅At least one Good + one Bad bullet

Phrasing Rules (non-negotiable)

Decision Outcome - exact format:

Chosen option: "{option name}", because {justification}.

Consequences bullets - exact format:

- Good, because {positive consequence}.
- Bad, because {negative consequence}.
- Neutral, because {neutral consequence}.

Numbering Convention

  1. Read docs/decisions/README.md - find highest NNNN
  2. Increment by 1
  3. Filename: NNNN-short-title.md (lowercase kebab-case, max 5 words)
  4. Always update the index table in docs/decisions/README.md after writing the file

Status Values

StatusWhen to use
acceptedDecision is made and implemented (most common)
proposedDecision under discussion, not yet implemented
supersededReplaced by a newer ADR - add superseded-by: NNNN - Title
deprecatedNo longer relevant, not replaced

Supersede Flow

When replacing an existing ADR (triggered by violation checker or user intent):

  1. New ADR frontmatter gets supersedes: "NNNN - Old Title"
  2. Old ADR frontmatter changes to status: superseded + superseded-by: "NNNN - New Title"
  3. Old ADR row in docs/decisions/README.md status column → superseded
  4. New ADR row added to index as accepted

Optional: Web Research

If the user asks for external evidence or benchmarks to support the decision, invoke the web-research-specialist agent before finalizing. Use its findings in the Consequences section or a More Information section.

Arguments

When invoked with the supersedes: NNNN argument (either by user or from check-adr-violations.prompt.md), the $ARGUMENTS variable contains the ADR number to supersede.

Example invocation: /adr-writer supersedes: 0005

The argument is parsed to:

  • Mark the old ADR (0005) as status: superseded
  • Add supersedes: "0005 - Old Title" to the new ADR frontmatter
  • Update the index table in README.md to reflect the supersession

If no arguments are provided, this is a new ADR with no supersession relationship.

Session Tracking

This skill logs the session ID using ${CLAUDE_SESSION_ID} for correlation:

ADR creation session: ${CLAUDE_SESSION_ID}

This allows tracking which ADRs were written in the same conversation and correlating with git commits when troubleshooting.

Action

Invoke .github/prompts/write-adr.prompt.md and follow its steps in order. Do not shortcut or skip the validation step.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.