What is refactoring?
Load PROACTIVELY when task involves improving code structure without changing behavior. Use when user says "refactor this", "clean up this code", "remove dead code", "reduce duplication", "reorganize the files", or "extract this into a function". Covers extract function/component, rename symbol, simplify conditionals, improve type safety, dependency inversion, dead code removal, circular dependency resolution, and database query refactoring with automated safety validation (typecheck, tests) at each step. Source: mgd34msu/goodvibes-plugin.