What problem does it solve?
Refactoring work often risks behavior changes and inconsistent code quality. This Skill provides a structured, incremental workflow to guide teams through safe refactoring without altering external behavior.
Core Features & Use Cases
- Phase-driven workflow: Analyze, Plan, Refactor, Test, Review, and Complete with governance checks.
- Architecture-aligned: Reads architecture references to align refactor with target patterns and avoid architectural drift.
- Incremental changes & gating: Small, testable steps with version control checkpoints to minimize risk.
- Use Case: You need to clean up a legacy module while preserving functionality and performance, and you want to demonstrate progress and maintainability improvements.
Quick Start
Start a refactor by creating a scoped feature branch, then follow the gate-driven steps:
- Create a new branch: git checkout -b refactor/<scope>-<description>
- Read the architecture doc and define an incremental plan
- Apply one refactoring pattern at a time, run tests after each step, and commit
- Review and finalize with documentation and PR