refactor
SolidBehaviour-preserving restructuring under this repo's norms — split a file past ~200 lines or doing two things, remove dead code with evidence, untangle a dependency pointing outward — with golden files and the corpus as the proof nothing moved. Use "refactor", "split this file", "this is dead code", "simplify". Deleting code is proposed with evidence, not done unasked.
Install
Quality Score: 85/100
Skill Content
Details
- Author
- assaio
- Repository
- assaio/assaio
- Created
- 2 months ago
- Last Updated
- today
- Language
- Go
- License
- Apache-2.0
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
refactor
Change the shape of the code without changing what it does — pin current behaviour in characterization tests first, transform, then prove equivalence by those tests passing unmodified and no existing test being deleted, skipped or loosened.
refactor
Evidence-driven refactoring — where does structural improvement actually pay off, then make that change without changing behavior. Survey mode diagnoses by evidence, not aesthetics — git churn × complexity hotspots, the recurring-bug log, upcoming work — and verdicts each candidate REFACTOR/PREP/LEAVE/WATCH, where LEAVE is the default and "the textbook recommends it" is never a reason. Execute mode takes one approved candidate in small behavior-preserving moves, suite green after each. Keeps a debt register in out/refactor/tracker.md so repeat surveys open with what changed. Use for "clean up this module", "improve the architecture", "pay down tech debt" — e.g. "/refactor", "/refactor <target>". For new behavior use feature; for something broken use bugfix.
refactor-code
Change existing code through narrow, behavior-preserving, test-backed simplification without speculative architecture or scope growth. Use for requests to refactor, clean up, restructure, or simplify code. Use explain-code instead when the user only wants an explanation of the current structure.