Files
2025-11-30 09:01:45 +08:00

2.7 KiB

description, allowed-tools, model, argument-hint
description allowed-tools model argument-hint
Create Architecture Decision Records (ADR) in MADR format with Skills integration. Records architecture decisions with context and rationale. Auto-numbering (0001, 0002, ...), saves to docs/adr/. Read, Write, Bash(ls:*), Bash(find:*), Bash(cat:*), Grep, Glob inherit [decision title]

/adr - Architecture Decision Record Creator

Purpose

High-quality Architecture Decision Record creation command using ADR Creator Skill.

Detailed process: [@~/.claude/skills/adr-creator/SKILL.md]

Usage

/adr "Decision title"

Examples:

/adr "Adopt TypeScript strict mode"
/adr "Use Auth.js for authentication"
/adr "Introduce Turborepo for monorepo"

Execution Flow (6 Phases)

Phase 1: Pre-Check
  ├─ Duplicate check, naming rules, ADR number assignment
  ↓
Phase 2: Template Selection
  ├─ 1. Tech Selection / 2. Architecture Pattern / 3. Process Change / 4. Default
  ↓
Phase 3: Information Collection
  ├─ Context, Options, Decision Outcome, Consequences
  ↓
Phase 4: ADR Generation
  ├─ Generate in MADR format
  ↓
Phase 5: Validation
  ├─ Required sections, format, quality check
  ↓
Phase 6: Index Update
  └─ Auto-update docs/adr/README.md

Output

docs/adr/
├── README.md              (auto-updated)
├── 0001-initial-tech.md
├── 0002-adopt-react.md
└── 0023-your-new-adr.md   (newly created)

Configuration

Customizable via environment variables:

ADR_DIRECTORY="docs/adr"           # ADR storage location
ADR_DUPLICATE_THRESHOLD="0.7"      # Duplicate detection threshold
ADR_AUTO_VALIDATE="true"           # Auto-validation
ADR_AUTO_INDEX="true"              # Auto-index update

Best Practices

Title Guidelines

✅ Good: "Adopt Zustand for State Management"
✅ Good: "Migrate to PostgreSQL for User Data"
❌ Bad:  "State Management"  (too abstract)
❌ Bad:  "Fix bug"  (not ADR scope)

Status Management

  • proposed → Under consideration
  • accepted → Approved
  • deprecated → No longer recommended
  • superseded → Replaced by another ADR
  • /adr:rule <number> - Generate project rule from ADR
  • /research - Technical investigation before ADR creation
  • /think - Planning before major decisions

Error Handling

Skill Not Found

⚠️  ADR Creator Skill not found
Continuing in normal mode (interactive)

Pre-Check Failure

❌ Issues detected in Pre-Check
Actions: Change title / Review similar ADR / Consider consolidation

References