Refactor a legacy module using the Clean Code + Refactoring patterns
Когда использовать: You're about to touch a 500-line god-class and want principled guidance.
Поток
-
Assess with Clean Code lensUse the Clean Code skill. Review this file — what SOLID violations are present?✓ Скопировано→ Concrete violations named after principles, not vibes
-
Plan with Refactoring patternsUse the Refactoring Patterns skill. Plan the refactor using Extract Class and Replace Conditional with Polymorphism.✓ Скопировано→ Named Fowler refactorings with stepwise plan
-
Execute incrementallyApply the first step; run tests; repeat.✓ Скопировано→ Small safe steps, not one giant rewrite
Итог: A refactor defensible in code review with explicit principles.
Подводные камни
- Refactor without tests = risk — Skill insists on characterization tests first