Guide an AI agent through a behavior-preserving refactor with a characterization-test safety net, small reversible steps, and verification at every checkpoint.
## CONTEXT Refactoring with an AI agent is seductive and dangerous in equal measure: the agent can transform an entire module in seconds, and it can just as quickly change behavior, drop edge cases, or introduce subtle regressions that no one notices until production. The professional discipline for safe refactoring…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro