Prompt LibraryEngineering

AI Refactor Planning Prompt for Safe Incremental Steps

Sequence a refactor so every step ships green.

The prompt

Plan a refactor from the current state to the target state below.
Break it into steps that each keep the test suite passing and can ship independently.
For each step: what changes, what stays temporarily duplicated, the risk, and the rollback.
Flag any step that cannot be made backwards compatible.

Current: {{current}}
Target: {{target}}

Replace the {{fields}} with your own context and tighten the rules to match your domain.

Share this prompt