Home/Templates/Code Migration Plan
Coding

Code Migration Plan Prompt Template

Create a phased migration plan for moving between frameworks, databases, or architectures with minimal downtime.

The Prompt

ROLE: You are a senior engineer and technical programme manager who specialises in zero-downtime migrations — you have migrated monoliths to microservices, Postgres to Spanner, and Ruby to Go without taking applications offline. CONTEXT: You are planning a migration from one stack, database, or architecture to another. Migrations fail in two ways: by trying to do too much at once (big bang migration), or by never finishing because the phasing is too conservative. This plan must be aggressive enough to actually complete, and safe enough to survive contact with production. TASK: Create a phased migration plan for the transition described below. RULES: • The plan must follow the strangler fig pattern or equivalent: new and old run in parallel, traffic shifts gradually, old is removed last • Every phase must have a "go / no-go" decision gate: specific measurable criteria that must be met before proceeding to the next phase • Risk assessment per phase must be concrete: "this phase could corrupt 5% of user records if X goes wrong" not "moderate risk" • The rollback plan for each phase must be tested as part of the phase itself — not thought about afterward • Flag any dependency that must be resolved before migration can start with [BLOCKER:] CONSTRAINTS: Phases should be deployable independently — no phase should require simultaneous changes across more than 2 systems. Estimated durations should be conservative (2x the optimistic estimate). EDITABLE VARIABLES: • [FROM_STACK] — current technology, database, or architecture • [TO_STACK] — target technology, database, or architecture • [PROJECT] — what the system does and its scale • [DOWNTIME_TOLERANCE] — maximum acceptable downtime (e.g. zero, 30 minutes during maintenance window, weekend only) • [TEAM_SIZE] — engineering headcount available for the migration OUTPUT FORMAT: **Migration Overview:** [From X to Y, estimated total duration, approach] **Phase 0: Prerequisites** [Blockers to resolve, infra to provision, tooling to set up] **Phase 1–N: [Phase name]** Duration: [estimate] Goal: [what changes in this phase] Changes: [specific technical changes] Go/No-Go Gate: [measurable criteria] Rollback: [how to undo this phase if it fails] Risk: [concrete risk statement] **[BLOCKER:] items:** [Prerequisites that must be resolved first] **Data Migration Strategy:** [If applicable — how data moves from old to new] **Testing Strategy:** [How you verify the migration succeeded] QUALITY BAR: If phase N fails and requires rollback, the rollback should take less time than the phase itself took to run. A migration where rollback is harder than going forward is a migration waiting to become an incident.

Make it specific to you

PromptITIN asks a few questions and builds a version tailored to your use case.

✦ Enhance with AI

How to use this template

1

Copy the template

Click the copy button to grab the full prompt text.

2

Fill in the placeholders

Replace anything in [BRACKETS] with your specific details.

3

Paste into any AI tool

Works with ChatGPT, Claude, Gemini, Cursor, and more.

4

Or enhance with AI

Sign in to PromptITIN and let AI tailor the prompt to your exact situation in seconds.

Why this prompt works

The 'go/no-go decision gate' requirement is what prevents migration plans from being aspirational slide decks — each gate forces the team to define success criteria before starting a phase, not after something goes wrong. The rollback-must-be-tested-in-the-phase rule prevents the most common migration incident cause.

Tips for best results

  • Run a dry migration in a staging environment that has a recent production data snapshot before touching production — most surprises appear in staging first
  • Phase 0 (prerequisites) is usually underestimated — give it 2x the time you think it needs, especially if it involves access, credentials, or cross-team dependencies
  • The strangler fig approach works best when you can add a routing layer — if you can't add a proxy without downtime, the migration plan needs to start with adding that capability
  • Assign a migration DRI (directly responsible individual) before starting — migrations stall when ownership is diffuse

More Coding templates

Code Review

Get a comprehensive AI code review covering bugs, performance issues, security vulnerabilities, best practice violations, and refactoring opportunities with specific line references.

View →

Debug an Error

Diagnose any code error with a structured breakdown: root cause analysis, step-by-step fix, and prevention strategies for the future.

View →

Explain Code Simply

Translate complex code into plain English with line-by-line explanations, real-world analogies, and edge-case analysis for any skill level.

View →
← Browse all 195 templates