Repository navigation
feat: renumber verb to reassign an item's ID (#12) - #22
Merged
Merged
Conversation
There was no way to change an item's ID: resolving a multi-branch ID collision meant sed on TASKS.md (the documented anti-pattern) plus manually repointing every reference. Add `renumber OLD (NEW | --next) [--refs]`: - Renames the primary line and every @shadow copy (features), repoints all @deps=/@rel= lists containing the old ID (tag region only — prose mentions stay untouched per the #9 rules; short-form hand-written deps normalize), and renames the `## <OLD>` header in # Notes. - Refuses an occupied target (suggesting --next), cross-kind moves, no-ops, and NEW+--next together. `--next` moves to the next free ID of the same kind. - `--refs` prints a read-only report of remaining mentions across git-tracked files, matching canonical and short forms (T-12 for T-0012) without longer numbers; repointing externals is deliberately the operator's job. Outside a git repo it prints a skip note. Design doc: docs/superpowers/specs/2026-07-13-renumber-design.md. New e2e scenarios 51-52 (20 assertions): rename + deps/rel/notes repoint, all guards, --next, feature shadow sync, --refs report + read-only proof, and the no-git skip. version 1.2.0 -> 1.3.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12.
What
renumber OLD (NEW | --next) [--refs]— reassign an item's ID without hand-editingTASKS.md. The one command that replaces the incident's entire cleanup (sedon the file + manual reference hunt).In-file (always): renames the primary line and every
@shadowcopy (features), repoints all@deps=/@rel=lists containing the old ID, renames the## <OLD>header in# Notes, and prints a summary of what moved. Reference edits go through the anchored tag-region helpers — prose mentions in titles are never rewritten (per the #9 rules).--refs(opt-in, read-only): scans git-tracked files for remaining mentions (canonical and short forms —T-12forT-0012, without matchingT-00123) and printsfile:line: excerpt. It never modifies files — repointing external references is deliberately the operator's/agent's job (per the design discussion). Outside a git repo it prints a skip note.Guards: occupied target (suggests
--next) · cross-kind (T-↔F-) · missing source ·OLD == NEW·NEW+--nexttogether. No--force— safest semantics, and a brand-new verb so nothing existing changes.Design
Approved interactively; recorded in
docs/superpowers/specs/2026-07-13-renumber-design.md. Pairs with #13 (allocation prevents collisions) and #14 (ref-integrity detects fallout); this verb fixes the ones that slip through.Verification
@deps/@rel/notes repoint,show/validateafter, all five guards,--next(including deps following), feature rename with@shadowsync (2 lines new ID / 0 old),--refsreport + byte-identical proof the referenced file wasn't modified, and the not-a-git-repo skip.make checkgreen: 285 assertions, 0 failures; smoke OK; 3.8-safe; single file, zero deps.Minor version: 1.2.0 → 1.3.0.