ADR Management
Commands
| Command | Script |
|---|---|
/adr list | ~/.claude/skills/aminnaggar_adrs/scripts/list-adrs.sh <adr_path> |
/adr list all | ~/.claude/skills/aminnaggar_adrs/scripts/list-adrs.sh <adr_path> all |
/adr show <id> | ~/.claude/skills/aminnaggar_adrs/scripts/show-adr.sh <adr_path> <id> |
/adr summary | ~/.claude/skills/aminnaggar_adrs/scripts/summary-adrs.sh <adr_path> |
/adr search <query> | ~/.claude/skills/aminnaggar_adrs/scripts/search-adrs.sh <adr_path> "query" |
/adr sync | ~/.claude/skills/aminnaggar_adrs/scripts/sync-claude-md.sh <adr_path> then edit CLAUDE.md |
/adr new | See workflow below |
Filters for list: active (default), all, proposed, accepted, deprecated, superseded
Finding the ADRs Directory
- •Look for
adrs/in the current project root - •If not found, ask the user for the path
/adr new - Creating an ADR
Principle: Infer everything from conversation context. Only ask user for judgment calls.
Workflow
- •
Draft the ADR from conversation context. Fill ALL frontmatter fields:
- •
id: Runnext-adr.shto get next number, format asADR-XXX - •
title: Short descriptive title (50 chars max) - •
date: Today's date (YYYY-MM-DD) - •
status:proposed(default for new ADRs) - •
supersedes:[]initially - •
superseded_by:null - •
tags: Infer from context (component, domain, technology) - •
deciders: Include user's name if known - •
context-critical: Your best guess (see criteria below) - •
summary: One-liner in format "Domain: Decision" (required if context-critical)
- •
- •
Check for conflicts: Run
summary-adrs.shto get all active ADR summaries - •
Ask user only for judgment calls:
- •"This might supersede ADR-003 (ORM: Prisma for type safety). Does it?"
- •"Is this context-critical? (Should future sessions see this in CLAUDE.md?)"
- •
Create the file:
{NNN}-{kebab-case-title}.mdin the adrs directory - •
If supersedes another ADR: Update the old ADR's frontmatter:
- •Set
status: superseded - •Set
superseded_by: ADR-XXX(the new ADR's ID)
- •Set
- •
If context-critical: Run
/adr syncto update CLAUDE.md
Context-Critical Criteria
Set context-critical: true when:
- •Non-obvious technology/library choice (would Claude suggest differently?)
- •Contradicts common conventions or defaults
- •Reversing would require significant refactoring
- •External constraints not visible in code (regulatory, business, API limitations)
NOT context-critical:
- •Standard best practices
- •Decisions obvious from reading the code
- •Minor implementation details
/adr sync - Updating CLAUDE.md
- •Run
sync-claude-md.sh <adr_path>to get the formatted section content - •Find the
## ADRssection in the project's CLAUDE.md - •Replace everything under that header until the next
##or EOF - •If no
## ADRssection exists, add it at the end of the file - •If no CLAUDE.md exists, create one with the ADRs section
Do not use HTML markers. The ## ADRs header is the boundary.
ADR File Format
Filename: {NNN}-{kebab-case-title}.md (e.g., 003-use-drizzle-orm.md)
See reference.md for full format specification.
Conventions
- •IDs:
ADR-001,ADR-002, etc. - •Status lifecycle:
proposed->accepted->deprecatedorsuperseded - •
supersedesis an array (can replace multiple ADRs) - •
superseded_byis singular (only one ADR can replace this one) - •Always run scripts via full path:
~/.claude/skills/aminnaggar_adrs/scripts/