← ClaudeAtlas

rewritelisted

Ground-up rewrite of a subsystem informed by hindsight. Not refactoring — a fresh implementation. Inventories, extracts requirements, designs, builds alongside, proves equivalence, swaps.
turqoisehex/cc-sentinel · ★ 4 · AI & Automation · score 77
Install: claude install-skill turqoisehex/cc-sentinel
# /rewrite — Elegant Rewrite **Trigger:** `/rewrite <subsystem>` — e.g., `/rewrite auth subsystem` "Knowing everything you know now, scrap this and implement the elegant solution." Not refactoring — ground-up rewrite informed by hindsight. **Channel:** CT=`CURRENT_TASK_chN.md` (channeled) or `CURRENT_TASK.md`. Scripts: `SENTINEL_CHANNEL=N`. `[chN/]`=dispatch subdir, `[_chN]`=file suffix, `[chN_]`=squad prefix. Full rules: `.claude/reference/channel-routing.md`. ## Procedure ### Step 1: Understand what exists Read the subsystem completely — what the code does, not what comments say. Write **Current State Inventory** to `verification_findings/rewrite_inventory[_chN].md`: files + responsibilities, data flow, external interfaces, test coverage. ### Step 2: Understand what it should do Read spec, design docs, CT, project-specific rules files. Write **Requirements Extraction** to the same file: behavioral requirements, design constraints, integration points. ### Step 3: Catalog the debt Compare Steps 1 and 2. Write **Debt Catalog** to the same file: accidental complexity, incomplete migrations, over/under-engineering, naming lies. ### Step 4: Design the elegant version Write **Rewrite Design** to `verification_findings/rewrite_design[_chN].md`: new file structure, data flow, what's eliminated (from debt catalog), what's preserved, migration strategy for external interfaces. Principles: one responsibility per file, minimal interfaces, names match behavior, YAGNI, consis