Install
$ agentstack add skill-samrom3-claude-hyper-plugs-adr-supersede ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
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:
- Search
CLAUDE.mdfor heading containingADR Locations. Collect bullet paths intoadr_dirs, strip inline# comments. - If not found, fall back: scan for
docs/adrs,decisions,architecture/decisions. - 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:
[->new_num] [new decision text or reason]
Examples:
3 Switching from PostgreSQL to CockroachDB→ old=3, new ADR doesn't exist yet, decision text provided3->7 CockroachDB chosen to replace PostgreSQL→ old=3, new=7 (ADR-0007 already exists), rationale provided3->7→ old=3, new=7 already exists, no extra text
Resolution:
- List files in
target_dirmatchingNNNN-*.md. - Parse
old_num. Zero-pad to 4 digits, find file asold_adr. No arg → display list and ask:
> Which ADR is being superseded? (enter the number)
- Parse
new_numif->present:
new_numprovided + file exists → setnew_adr, skip Steps 4–6, go to Step 7.new_numprovided + file missing → treat as title/number hint for Step 6.- No
->→ create new ADR (proceed through all steps).
- Confirm:
Superseding: ADR-NNNN — . Proceed? (y/n) old_adralreadySuperseded by ADR-MMMM→ warn:ADR-NNNN is already superseded by ADR-MMMM. Supersede again? (y/n). Proceed only on confirm.
Step 4 — Understand the supersession
Gather from:
- Read old ADR in full — Context, Decision, Consequences as baseline.
- Conversation context — why old approach no longer works, what replacement is.
- Arg — text after
/adr-supersedeused as supersession rationale.
Derive:
new_adr_title: concise title for replacement.what_changed: why original replaced (new constraints, better alternatives, lessons learned).new_decision: new decision, specific and declarative.
If any can't be inferred, ask via AskUserQuestion. Batch questions: > I'm superseding ADR-NNNN (). To write replacement ADR: > > 1. What is the new decision? (e.g., "Use Redis for session storage instead of PostgreSQL") > 2. What changed that makes the old decision no longer appropriate?
Proceed only after all three pieces clear.
Step 5 — Draft the new ADR sections
Use old ADR as foundation + supersession context from Step 4.
Context
Start from old ADR's Context (original problem), then explain what changed (new constraints, growth, incidents, technology shifts, lessons learned that invalidate original decision). Reference old ADR by number.
Decision
New decision, clear and declarative. Contrast with old where helpful (e.g., "We will migrate from X to Y"). Include **Supersedes:** ADR- cross-ref.
Consequences
3–7 bullets: benefits of new over old, migration/transition costs, risks/tradeoffs of new decision, follow-up work, what becomes easier/harder vs. superseded approach.
If can't infer: > What are key benefits of new approach, and what migration/transition costs are anticipated?
Step 6 — Create the new ADR via adr-create
Invoke adr-create with:
new_adr_titleas decision summary arg- Full supersession context (old ADR content + what changed + new decision) for section drafting
After completion, capture new file path and number as new_adr and next_num.
Open new ADR file, add cross-ref after **Date:**:
**Supersedes:** ADR-
Save file.
Step 7 — Link the superseded ADR
- Open
old_adr. - Find
**Status:**. Replace value withSuperseded by ADR-. - If
->path (new_adr already existed): add**Superseded by:**metadata after**Date:**if not present. - Save file.
Step 8 — Update the index
- Open
/README.md. - Find row for old ADR. Update
StatustoSuperseded by ADR-. - New ADR just created by adr-create → index row already added, skip. New ADR already existed and not in index → add now.
- Save
README.md.
Step 9 — Confirm
> ADR- → ADR-: > Updated ADR-: Status → "Superseded by ADR-" > Updated index: /README.md > > Review the new ADR and change the Status to Accepted when finalised.
Step 10 — Post-write validation
Invoke adr-check scoped against superseded ADR (file modified in Step 7):
/adr-check
Display all output to user.
- Structural FAIL: Block completion, prompt user to resolve:
> The superseded ADR has a structural validation failure. Please fix the issue above before confirming this supersession is complete.
- Style warnings only: Display and continue. Not blocking.
Note: new ADR (created via adr-create in Step 6) already validated by adr-create's post-write step — don't run adr-check again.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: samrom3
- Source: samrom3/claude-hyper-plugs
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.