refactor
FeaturedExecute one behavior-preserving structural transformation and report evidence. Triggers: "refactor this", "simplify without changing behavior".
Install
Quality Score: 96/100
Skill Content
Details
- Author
- boshu2
- Repository
- boshu2/agentops
- Created
- 8 months ago
- Last Updated
- today
- Language
- Go
- License
- Apache-2.0
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
refactor
Use for authorised, behaviour-preserving structural simplification backed by characterisation and equivalence evidence. Not for new behaviour, read-only review, or unknown root cause; use tdd, code-review, or diagnose.
refactor
Restructure existing code without changing its behavior — extract, rename, inline, split, deduplicate, reshape — with tests holding behavior fixed before and after. Scoped to structure only: no new features, no bug fixes, no behavior changes. Use when the user says "refactor", "clean up the structure", "extract this", "split this file", "untangle", or "restructure".
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.