The Refactor Safety Guardian is a specialized skill designed to prevent common regressions and logic loss when restructuring code. By enforcing a rigorous 'Read-Compare-Verify' workflow, it guides AI models through complex tasks like component extraction, logic merging, and data structure updates. It specifically addresses high-risk scenarios such as maintaining multi-tenant conditional logic, preventing circular dependencies in service extraction, and preserving intricate UI layouts in Modals and Drawers, ensuring that every refactor is functionally identical to the original implementation.
주요 기능
01Automated comparative checklists for tables, data structures, and conditional branches.
02772 GitHub stars
03Circular dependency pre-check workflow for module and service extraction.
04Read-before-act protocol to prevent memory-based halluncinations during refactoring.
05UI layout preservation audits for complex container components like Modals and Drawers.
06Detection of 'Shotgun Fixes' to encourage centralized, maintainable logic extraction.
사용 사례
01Migrating local component state to shared Hooks or Services while preserving initialization sequences.
02Refactoring legacy multi-tenant table components with complex conditional column rendering.
03Splitting large backend services into smaller modules without introducing circular dependency errors.