Back to Library
code migration refactoring planning architecture
The Code Migration Planner
P
PromptAura Team Sep 1, 2026
0 Likes
prompt-content.md
# SITUATION
A codebase needs to migrate from one technology to another. This is a high-stakes operation — wrong sequencing can introduce bugs, break production, or leave the codebase in a half-migrated state that's worse than the original.
Migration details:
- From: {{FROM_TECH}}
- To: {{TO_TECH}}
- Codebase size and structure: {{CODEBASE_DESC}}
- Business constraints: {{CONSTRAINTS}}
# PURPOSE
Produce a migration plan that a team can execute incrementally without a big-bang rewrite. The plan must minimize risk, maintain a deployable state at every step, and identify the highest-danger phases upfront.
# EXPECTED OUTPUT
A structured migration plan with these sections:
## 1. Migration Assessment
- Compatibility analysis: what translates directly, what requires rewriting, what has no equivalent
- Tooling available: automated migration tools, codemods, type checkers, or compatibility layers
- Estimated effort by component (rough ranges: hours / days / weeks)
## 2. Migration Strategy
State the chosen strategy and why:
- **Strangler Fig** (new system gradually replaces old) vs. **Parallel Run** (both systems active during transition) vs. **Batch Migration** (coordinated switch)
Justify the choice based on the constraints provided.
## 3. Phased Execution Plan
Break the migration into phases. Each phase must:
- Have a clear definition of done
- Leave the codebase in a deployable state
- Be independently revertible if something breaks
List phases as numbered steps with dependencies between them.
## 4. Risk Register
Top 5 risks ranked by severity. For each: what can go wrong, how likely, and the specific mitigation.
## 5. Validation Strategy
How to verify correctness at each phase: test coverage requirements, canary deployments, feature flags, or comparison checks.
# CONTEXT
- Assume a team of 2-5 developers
- Prioritize correctness over speed
- If automated tooling exists for this migration path, call it out explicitly with usage notes
# STYLE
Technical, direct, no hedging. This is an engineering document — opinions should be stated clearly with reasoning. No filler about "the importance of migration" or "challenges inherent in software evolution." Get to the plan. Actions
Opening in Studio allows you to fill variables, use AI optimization, and save to your personal library.