Code prompts
Code prompt

Plan a multi-file change before any edits

You're about to ask an AI agent to refactor or build something that touches several files. Plan first, code never.

Works best in: Claude

Plan how to {{goal: e.g. add multi-currency support to the payment module}}, but do not edit any files yet.

Produce:
1. **Files to touch** — full path, what changes in each, in roughly what order
2. **New files to create** — path + one-sentence purpose
3. **Files to delete or rename** — and what to update afterwards
4. **Public API surface changes** — anything callers will notice (function signatures, response shapes, env vars, DB schema)
5. **Migration steps** — if data or schema changes, the order they need to happen in to stay deployable
6. **Risk callouts** — what could break, what's hard to roll back, what needs a feature flag
7. **Out of scope** — what I asked about that I'm explicitly not doing in this pass

Wait for me to approve the plan before you write any code. If parts of the plan would be cleaner as two separate changes, say so.
·Open in·Share
planningrefactoringai-agents

More code prompts

All code prompts

Go deeper