agentleFS
rvdbreemenrvdbreemen/adr-kit/skills/supersede/SKILL.md

supersede

Skill13 starsChanged 4 months agoMITView on GitHub

Supersede an Accepted ADR while preserving history and links. Use for replacing a decision, successor ADRs, or changed architecture.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. wrg32786/aigent-os★ 25same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository19 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use $ARGUMENTS as the required ADR id.

    line 14
  2. Distinctive:

    Run the graph tool on it and show the user the result:

    line 32
  3. Very specific:

    Conflict guard (hard stop): Read the old ADR. If its Status line already says Superseded by ADR-X where X is NOT the ADR you are about to …

    line 42
  4. Very specific:

    Before drafting, run /adr-kit:grill --revalidate ADR-OLD.

    line 53
  5. Distinctive:

    Only after the user has approved the new ADR-NEW:

    line 88
  6. Very specific:

    Ensure ADR-NEW is Accepted through python "$ADR_KIT/bin/adr" accept ADR-NEW --adr-dir docs/adr.

    line 90
  7. Distinctive:

    Run the only supported reciprocal mutation:

    line 93
  8. Distinctive:

    If inbound ADRs from Step 1 reference the old decision, list them and offer a note pointing at ADR-NEW.

    line 105
  9. Distinctive:

    Run all three and show the results:

    line 110
  10. Distinctive:

    If any check fails, fix the link wiring (not the old ADR's prose) and re-run until clean.

    line 125
  11. Distinctive:

    Do not flip it to Accepted on your own initiative.

    line 135
  12. Distinctive:

    Verification is part of the job: Do not declare the supersession done before Step 4 is clean.

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

adr-kit supersede

Reply in the language the user writes in; default to English. Keep command output, identifiers, paths, and ADR file content unchanged.

Use $ARGUMENTS as the required ADR id. Ask for the id when it is empty and never infer a destructive target.

You are running /adr-kit:supersede. Purpose: replace an existing decision with a new one without rewriting history. The old ADR's reasoning stays immutable; only its Status line changes and its Status History grows by one entry. Everything else lands in the new ADR.

Resolve the plugin path once and reuse it:

ADR_KIT="${ADR_KIT_ROOT:-${CLAUDE_PLUGIN_ROOT}}"
[ -n "$ADR_KIT" ] || { echo "adr-kit: plugin root not found; set ADR_KIT_ROOT, or update or reinstall the plugin" >&2; exit 1; }

Step 1 - Identify the target and show its graph

  1. Take the ADR id from the argument; if absent, ask which ADR to supersede.
  2. Run the graph tool on it and show the user the result:

    python "$ADR_KIT/bin/adr-related" ADR-OLD --format json

    Present inbound edges explicitly: these are the ADRs that point at the target and may need their Related Decisions updated after supersession. Flag any dangling references already present.

  3. Conflict guard (hard stop). Read the old ADR. If its Status line already says Superseded by ADR-X where X is NOT the ADR you are about to create, stop and surface the conflict to the user verbatim. Never overwrite an existing supersession pointer; the user must resolve the chain (perhaps the right move is superseding ADR-X instead).
  4. Confirm with the user: "Supersede ADR-OLD (<title>) with a new ADR about <reason>?" Do not proceed without a yes.

Step 2 - Draft the superseding ADR (Proposed)

Before drafting, run /adr-kit:grill --revalidate ADR-OLD. Revalidation covers changed forces, alternatives, migration, consequences, new evidence, and impact on related ADRs. It supports unchanged, Proposed successor, reject-candidate, and explicit defer outcomes. Never rewrite Accepted prose.

Determine the next free ADR number (highest existing + 1, no gaps, no reuse). Invoke the adr-generator subagent with:

  • The user's stated reason for the change as Context input.
  • The old ADR's Decision text as background (what is being replaced and why it no longer holds).
  • An explicit instruction to include in ## Related Decisions: - **ADR-OLD (<old title>)**: Supersedes ADR-OLD.
  • Status: Proposed with today's date, and a status_history entry:

    status_history:
      - date: YYYY-MM-DD
        status: Proposed
        changed_by: <user>
        reason: Drafted to supersede ADR-OLD
        changed_via: adr-kit /adr-kit:supersede

Show the draft to the user. Never auto-accept it. The user reviews and may iterate; the new ADR is only flipped to Accepted (by the user or on their explicit instruction) before the old one is touched.

Show the complete acceptance packet and require an explicit yes in this active session before invoking adr accept ... --confirm. A failure or interruption stops before adr supersede, leaving the old ADR and reciprocal links unchanged.

Step 3 - Supersede transactionally (only after approval)

Only after the user has approved the new ADR-NEW:

  1. Ensure ADR-NEW is Accepted through python "$ADR_KIT/bin/adr" accept ADR-NEW --adr-dir docs/adr. Acceptance is blocked unless all verification gates pass.
  2. Run the only supported reciprocal mutation:

    python "$ADR_KIT/bin/adr" supersede ADR-OLD --by ADR-NEW \
      --adr-dir docs/adr --changed-by "<user>" \
      --reason "Superseded by ADR-NEW (<new title>)"

    The command rejects illegal or conflicting chains before mutation. It atomically updates both ADRs and all generated index views, and restores their original bytes if any write or index refresh fails. Never reproduce these edits manually.

  3. If inbound ADRs from Step 1 reference the old decision, list them and offer a note pointing at ADR-NEW. Apply only entries the user approves.

Step 4 - Verify the chain

Run all three and show the results:

python "$ADR_KIT/bin/adr-related" ADR-OLD --format json
python "$ADR_KIT/bin/adr-related" ADR-NEW --format json
python "$ADR_KIT/bin/adr-lint" docs/adr/

The chain is clean when:

  • ADR-OLD shows outbound superseded-by -> ADR-NEW and ADR-NEW shows outbound supersedes -> ADR-OLD (and inbound mirrors of each other).
  • Neither graph reports dangling references.
  • adr-lint reports no FAIL on either file.

If any check fails, fix the link wiring (not the old ADR's prose) and re-run until clean. Report the final state to the user.

Boundaries

  • Immutability. The only allowed edits to the old ADR are the Status line flip and appended status history performed by the lifecycle command.
  • Conflict guard. An existing Superseded by pointing at a different ADR is a stop-the-line conflict. Surface it; never overwrite.
  • No auto-accept. The new ADR starts as Proposed and a human approves it. Do not flip it to Accepted on your own initiative.
  • No silent edits to third ADRs. Updating inbound referencers happens only per-entry with user approval.
  • Verification is part of the job. Do not declare the supersession done before Step 4 is clean.

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.