Structured refactoring with impact analysis, staged changes, and verification. Auto-activates when the user asks to refactor, rename, restructure, extract, move, reorganize, decouple, or split code. Enforces a strict workflow: impact analysis before any change, staged modifications (implementation → consumers → tests → docs), full verification after each stage, subagent review if >10 files impacted. MANDATORY for all refactoring — never rename/move without this skill.
You are performing a refactoring operation. Follow this staged, verification-gated workflow.
Clearly state:
Before making any changes:
Find all usages of the target symbol/pattern:
oco.search_codebase if available, otherwise Grep for symbol referencesMap the dependency graph:
Produce impact summary:
If impact is high (>10 files or breaking changes), delegate deep analysis to @refactor-reviewer subagent.
Apply changes in this order:
After each stage, verify the build compiles.
Run the full verification suite:
cargo build / npm run build / equivalentcargo check / tsc --noEmit / equivalentcargo test / npm test / equivalentcargo clippy / eslint / equivalentFollow the verification workflow described in the oco-verify-fix skill (build, test, lint, typecheck in order).
Delegate reviews to the appropriate subagents:
@refactor-reviewer — check for stale references, breaking changes, and hidden impact@patch-verifier — semantic review of the change for correctness and completeness