What problem does it solve? Refactoring often introduces accidental behavior changes that are hard to detect and review. This Skill enforces a disciplined workflow for restructuring code—simplifying boundaries, reducing duplication, improving names and module layout—while explicitly proving that observable behavior stays unchanged. ## Core Features & Use Cases - Behavior-Preservation Scope: Requires stating upfront which observable behaviors, interfaces, data formats, and error behaviors must remain identical before any edit. - Incremental Mechanical Steps: Guides small, reviewable changes like renaming, extracting, inlining, and deduplicating without mixing in features or fixes. - Production-Handoff Evidence: Emits a structured evidence record with changed files, base/head refs, tests executed, residual risk, and required review lenses. - Use Case: When asked to clean up a tangled module in a repository, the Skill establishes a test baseline, refactors in small steps, reruns the same tests, and hands off a reviewable diff with proof nothing changed behaviorally. ## Quick Start Ask the agent to refactor the specified module to reduce duplication and improve naming without changing any behavior, and require a production-handoff evidence record when done.