What problem does it solve? Vague requests like "just clean this up" invite big-bang rewrites that leave code red for days with no proof behavior survived. This Skill turns a refactor you're about to start into a plan whose every step keeps the program green and behavior unchanged, so you can always stop, ship, or tell if you broke something. ## Core Features & Use Cases - Risk-ranked sequencing: Reads blast radius, seams crossed (money/auth/data paths), and test coverage for each area, then orders steps so the highest-risk area is covered first and touched last. - Characterization tests first: Pins current behavior (bugs and all) with snapshot tests at the seam before restructuring, so any moved behavior shows up instantly. - Mode-switchable rigor: A scrappy 5-minute path for trivially reversible cleanups, and a full rigor path (scope in/out, risk read, always-green steps, stop points) for anything crossing a seam. - Use Case: Given a 400-line checkout.ts mixing cart math, tax calc, and a Stripe call, produce a plan that extracts computeTotals behind a small interface, snapshots today's totals first, and defers the duplicated refund-path collapse to a covered final step. ## Quick Start Ask the AI to plan a safe refactor of a messy module before touching it, for example: "checkout.ts is a mess — plan a behavior-preserving refactor with characterization tests and always-green steps."