← ClaudeAtlas

adr-supersedelisted

This skill should be used when the user asks to 'supersede an ADR', 'replace an architectural decision', 'update an ADR with a new decision', 'mark an ADR as superseded', or when an existing architectural decision has changed and needs to be replaced while preserving the historical record.
samrom3/claude-hyper-plugs · ★ 1 · Data & Documents · score 68
Install: claude install-skill samrom3/claude-hyper-plugs
# adr-supersede Creates new ADR superseding existing one, updates old ADR's status, maintains bidirectional cross-refs in both files and dir index. > ADRs **additive only**: never delete or heavily rewrite accepted ADR. History preserved — old ADR stays readable. --- ## Step 1 — Discover ADR directories Same discovery as `adr-create` Step 1: 1. Search `CLAUDE.md` for heading containing `ADR Locations`. Collect bullet paths into `adr_dirs`, strip inline `# comments`. 2. If not found, fall back: scan for `docs/adrs`, `decisions`, `architecture/decisions`. 3. If empty, inform user and stop. ## Step 2 — Select target directory Multiple dirs → auto-suggest based on recent file context (same as `adr-create` Step 2). Present suggestion, wait for confirmation. Use confirmed path as `target_dir`. ## Step 3 — Parse the argument and identify ADRs Format: ``` <old_num>[->new_num] [new decision text or reason] ``` Examples: - `3 Switching from PostgreSQL to CockroachDB` → old=3, new ADR doesn't exist yet, decision text provided - `3->7 CockroachDB chosen to replace PostgreSQL` → old=3, new=7 (ADR-0007 already exists), rationale provided - `3->7` → old=3, new=7 already exists, no extra text Resolution: 1. List files in `target_dir` matching `NNNN-*.md`. 2. **Parse `old_num`**. Zero-pad to 4 digits, find file as `old_adr`. No arg → display list and ask: > Which ADR is being superseded? (enter the number) 3. **Parse `new_num`** if `->` present: - `new_num` provided + file ex