safe-refactor
作者: juliusbrussee
在保持行为不变的前提下重构代码。用于提取、合并、所有权转移或清理场景,其中验证必须围绕结构编辑进行。
npx skills add https://github.com/juliusbrussee/caveman --skill safe-refactorSafe 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.