What problem does it solve? Refactoring often breaks working code because structural changes get mixed with behavior changes, preservation claims go unverified, and big-bang rewrites leave the system unshippable. This Skill enforces a disciplined process where every refactor keeps tests green and every preservation claim is backed by evidence. ## Core Features & Use Cases - Structural/Behavioral Separation: Enforces the rule that every commit is either structural or behavioral, never both, so changes stay reviewable and reversible. - Proof Contracts: Requires each behavior-preservation claim to name the unchanged behavior, invariant, public boundary, and before/after evidence, adding characterization tests where coverage is missing. - Safe Migration Patterns: Guides parallel change (expand, migrate, contract), branch by abstraction, rename maps, and verified deletion of old paths instead of big-bang rewrites. - Use Case: When extracting a module from a legacy codebase, the Skill walks you through naming the coupling being separated, writing characterization tests, migrating callers incrementally, and proving no traffic remains on the old path before deleting it. ## Quick Start Use the refactoring skill to plan a safe, behavior-preserving refactor of the legacy payment module with characterization tests and incremental commits.