What problem does it solve?
This skill provides a disciplined, test-driven protocol for refactoring that minimizes risk by requiring verification, incremental changes, and a clear rollback path.
Core Features & Use Cases
- Phase-driven workflow covering assessment, planning, execution, verification, and completion to structure large refactors.
- Safety-first approach that enforces running tests before, during, and after changes to catch regressions early.
- Guidance on common refactoring patterns (Extract Method, Extract Class, Move Method, Rename, Introduce Parameter Object) with concrete steps and examples.
- Use Case: A team refactors a 800-line module to improve maintainability while preserving behavior and providing a rollback path.
Quick Start
Follow the protocol: identify refactoring need, run tests (python tools/run_tests.py), plan changes, execute in small steps, verify with tests, and commit with a descriptive message.