Chain a refactor into verifiable commits
Break structural change into steps where each one independently preserves behaviour.
What this prompt helps you do
A sequence of commits, each behaviour-preserving, independently testable, and safe to stop at.
When to use it
A code area needs restructuring but cannot afford a risky rewrite.
What to prepare
The goal, relevant source material, constraints, examples, and the decision or action this should support.
How to get a strong result
Every step must leave the system working; a sequence that is only correct at the end is one big commit.
How to use this prompt
Replace each placeholder with accurate context. Paste the complete prompt into Claude, review the response critically, resolve important questions, and use it as a considered input to the next decision—not as an unchecked final answer.