Arguments. [audit|preview|blocklist] [<old> [to <new>]] [--container|--identifier…] [--repo <repo> ...]. Full form: [audit [blast|half-rename|orphans]|preview|blocklist] [<old> [to <new>]] [--include-historical|--include-memory|--include-plan-docs|--include-bare-token|--container|--identifier] [--repo <repo> ...|--repos-from <file|->|--owner <owner>|--fleet] [--skip <entry> ...] (e.g., /rename-references audit, /rename-references audit blast /verify to /verify-changes, /rename-references audit half-rename /a to /b, /rename-references audit orphans /a to /b, /rename-references blocklist)
Repository context. Gather first
<!-- BEGIN GENERATED: gather-block. Edit docs/conventions/gather-block/block.md, then run scripts/sync-gather-block.py -->
Run each command below as its own Bash call, all sent together in one message (worktree isolation).
Keep any bound in the command's own pipe (output limits).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never ## Pre-computed context lines (gather-block convention).
<!-- END GENERATED: gather-block -->
- Working tree status (empty = clean),
git status --porcelain | head -20 - Rename pairs (git), unstaged,
git diff --name-status -M HEAD | grep '^R' | head -15 - Rename pairs (git), staged,
git diff --cached --name-status -M | grep '^R' | head -15 - Current branch,
git branch --show-current
Purpose
After renaming a skill, file, or identifier, references survive in 7+ syntactic forms. Token-only grep (/old) catches the obvious ones; the rest hide in chain prose (→ old →), comma-lists (Test, Old, Retro), numbered table rows (| 7. Old |), frontmatter chain strings (description: "...→ old → retro process."), frontmatter globs ({a,b,old,c}), cross-skill mode references, and content-file paths (context/old.md style).
This skill makes "find every reference" one invocation instead of 4 manual sweep passes: it runs the full pattern library, triages matches into 3 buckets, and surfaces ambiguity (English-verb collisions like confirm/test/review) for user confirmation rather than auto-applying.
Adapting to your environment
The pattern library, triage classifier, and audit modes need only git and the Grep tool. An adjacent capability named in prose (a verification workflow, an issue tracker, a codebase-audit routine) is optional: invoke it if present, otherwise proceed without. Consumer conventions (work-notes locations, commit policy, naming rules) come from the consuming repository's CLAUDE.md and rules; read them, never assume them.
Action router
Parse $ARGUMENTS first token to determine action. Subsequent tokens are the rename pair (with to/→/->/into separator) or single token for reverse-mode.
| Argument shape | Action | Read |
|---|---|---|
| (empty) | Smart default | inline below. Detect rename pair from conversation/git/staged |
| audit | Audit (read-only sweep. Alias for audit blast) | context/audit.md + audit-modes.md |
| audit <old> or audit <old> to <new> | Audit with explicit pair | context/audit.md |
| audit blast [<old> [to <new>]] | Audit Blast. Pre-rename impact (counts + per-file + bucket distribution; inline-only) | audit-modes.md |
| audit half-rename <old> to <new> | Audit Half-Rename. Files mentioning both old and new (incomplete-rename hygiene) | audit-modes.md |
| audit orphans <old> to <new> | Audit Orphans. Refs at old name or vanished path after rename (requires pair) | audit-modes.md |
| <old> to <new> | Apply full rename | context/apply.md |
| preview <old> to <new> | Preview dry-run | context/apply.md (skip Edit phase) |
| <old> (single token, no separator) | Reverse. Find refs, ask what to replace with | context/audit.md |
| blocklist | Print English-verb blocklist (read-only introspection of triage-bucket safety mechanism) | inline below |
Every sweep runs off the pattern library, the full form registry in context/patterns.md; read it before any sweep. A sweep runs through the Grep tool with the patterns.md regexes over the tracked tree, covering every form the action sweeps (every form in patterns.md for apply, preview, audit and Blast; the forms Audit Orphans names for Orphans). One Grep may combine forms in an alternation as long as every form's regex is in it; never let one token grep stand in for them. Attribute each hit to its form, and a form whose regex no call ran is a form the sweep missed. Reading files one by one is not a sweep; use Read only to confirm a Grep hit in its surrounding context before classifying or editing it. Triage logic is in context/triage.md. Audit sub-mode detail (Blast / Half-rename / Orphans) is in context/audit-modes.md.
Override flags (audit modes)
Six flags. Four widen the sweep; two override the rename-mode resolution. Defaults preserve safety (rename-documenting plan docs / frozen historical notes / memory entries excluded). Long-form only, position-agnostic.
| Flag | Effect | Apply mode? |
|---|---|---|
| --include-historical | Sweep archived/completed work notes and frozen records of past work | OK |
| --include-memory | Sweep Claude Code auto-memory files and MEMORY.md indices in the auto-memory directory (resolution: Auto-memory location) | OK |
| --include-plan-docs | Sweep the active plan/work-notes documents that document this rename | audit-mode only, apply mode rejects with explicit error (the plan doc documents the rename, both names appear by design) |
| --include-bare-token | Surface the bare-token residue that container-rename mode suppresses (patterns.md "Phase 0b"). Always Ambiguous, never Certain. Not applicable to audit orphans, which sweeps no bare-token form | audit-mode only |
| --container | Force container-rename mode, skipping the evidence ladder (patterns.md "Phase 0b") | OK |
| --identifier | Force identifier-rename mode | OK |
Multiple flags compose. Unknown flags raise an error. Detail in audit-modes.md "Override flags" section.
Several repositories. A target form (--repo <repo> and the others) is accepted by every action except blocklist, and sweeps the one rename pair in each repository, per