safe-refactor
Restructure code while preserving behavior. This skill defines behavior-preservation boundaries and establishes verification before structural edits, supporting extraction, consolidation, ownership moves, and cleanup. It keeps intermediate states buildable and testable, then runs the same proof after changes to ensure behavior matches and the requested structure is achieved, significantly reducing regressions and hidden bugs.
npx skills add https://github.com/juliusbrussee/caveman --skill safe-refactorBefore / After Comparison
1 组Developers manually refactor without behavioral verification boundaries, often breaking interfaces or ordering, which leads to issues surfacing late and requiring extensive rework and debugging, impacting delivery schedules.
This skill establishes verification before structural edits, moves one ownership boundary at a time, and keeps intermediate states testable, ensuring consistent behavior and dramatically cutting rework time while boosting efficiency.
Safe refactor
Define behavior-preservation boundary and establish verification before structural edits.
- Keep feature changes outside refactor.
- Move one ownership boundary at a time.
- Preserve public interfaces, failure behavior, ordering, and compatibility unless explicitly scoped.
- Keep intermediate states buildable and testable.
- Avoid dependency or configuration growth without correctness need.
Run same proof after change. Stop when behavior matches and requested structure is achieved.
User Reviews (0)
Write a Review
No reviews yet
Statistics
User Rating
Rate this Skill