Refactoring prompts
Restructuring code without changing behavior.
Legacy Code Refactoring Plan (Tests First)
Produces a step-by-step refactoring plan for scary legacy code: characterization tests first, then a sequence of tiny, always-green, reversible steps.
Naming & Extraction Pass
A focused refactoring pass that only improves names and extracts functions — the two changes with the highest readability payoff per line changed.
YAGNI Pass — Delete Speculative Abstraction
Hunts the abstractions nobody asked for — single-implementation interfaces, config that never varies, wrapper layers — and shows the simpler code hiding underneath.
God Function Decomposition Plan
A behavior-preserving plan for breaking up a 300-line function: responsibility inventory, hidden coupling map, then an extraction sequence where every step compiles and passes.