| name | migration-planning |
| description | Plans a safe, phased migration from legacy system to new architecture. Documents cutover strategy, rollback plan, data migration approach, validation, and risk mitigation. Outputs migration playbook with timelines and success criteria. |
| allowed-tools | Read, Write |
| effort | high |
Migration Planning
When to activate
When a system redesign is complete and you need to move from old to new (legacy system replacement, platform upgrade, database migration, cloud migration). Triggered by: design approval, customer commitment to migration timeline, or post-launch planning. Always run before cutover date is announced to customer.
When NOT to use
Not for small patches or deployments (use standard CI/CD). Not for feature flags or canary releases (use deployment strategy instead). Not if the new system is not ready (test first). Not if you have <2 weeks to plan (too risky). Not without customer sign-off on downtime tolerance.
Migration Planning Checklist
-
Current State Audit
-
Target State Readiness
-
Cutover Strategy
-
Data Migration
-
Integration Points
-
Rollback & Recovery
-
Success Criteria & Validation
Output Format
Migration Playbook
Executive Summary
- Old system: [name, version, tech]
- New system: [name, version, tech]
- Scope: [what's moving, what's staying]
- Cutover date: [YYYY-MM-DD HH:MM]
- Estimated downtime: [Xh or zero-downtime]
- Risk level: [LOW / MEDIUM / HIGH]
- Owner: [Name, role]
Current State Assessment
| Aspect | Details |
|---|
| Data Volume | [X GB, Y million records] |
| Users Impacted | [X internal, Y external] |
| Integrations | [List: system A, B, C] |
| Downtime Tolerance | [X minutes maximum] |
| Peak Load | [X req/sec, Y concurrent users] |
Migration Strategy
Type: [Big Bang / Phased / Blue-Green / Canary]
Approach:
- [Detailed description of how migration will happen]
- [Why this approach chosen over alternatives]
- [Risks specific to this approach and mitigations]
Timeline (Example for big-bang)
2026-06-20 00:00 — Migration window opens
2026-06-20 00:30 — Data extraction from legacy system (1h estimated)
2026-06-20 01:30 — Transform and load into new system (30min estimated)
2026-06-20 02:00 — Data validation and spot checks (30min)
2026-06-20 02:30 — Update integration endpoints
2026-06-20 03:00 — Enable new system for traffic
2026-06-20 04:00 — Monitor for errors (no user activity yet)
2026-06-20 06:00 — User communication: system ready
2026-06-20 06:30 — First users log in, validate workflows
2026-06-20 08:00 — All users migrated, legacy system in standby
2026-06-21 00:00 — Legacy system archived
Data Migration Plan
-
Extraction
- Source: [old database/system]
- Method: [direct query, dump, API, custom script]
- Volume: [X GB estimated]
- Time: [X hours estimated]
-
Transformation
- Mapping: [old schema → new schema rules]
- Business logic: [any complex transformations]
- Validation rules: [what makes a record valid in new system]
-
Load
- Destination: [new database]
- Batch size: [X records per batch to avoid overload]
- Order: [load order if dependencies matter]
-
Validation
SELECT COUNT(*) FROM old_system.orders -- expected: 1,234,567
SELECT COUNT(*) FROM new_system.orders -- expected: 1,234,567
SELECT SUM(amount) FROM old_system.orders -- expected: $5,432,100
SELECT SUM(amount) FROM new_system.orders -- expected: $5,432,100
Sample check: SELECT * FROM new_system.orders WHERE id = [random sample IDs]
-
Incremental Sync (if new orders created during migration)
- Detect changes in old system after initial load
- Sync new records to new system
- Resume during validation phase before cutover
Integration Updates
Rollback Plan
Trigger: Any of:
- Data loss detected (record count mismatch >1%)
- Performance unacceptable (latency >5s)
- Critical functionality broken (>10% of workflows failing)
- Widespread errors in new system (>1% error rate)
Rollback Procedure:
- Notify stakeholders: [message template]
- Stop traffic to new system
- Restore legacy system from pre-migration backup (if needed)
- Revert integration endpoints to old system URLs
- Notify users: service restored, investigating issue
- Root cause analysis (post-cutover)
Rollback Time: <30 minutes from decision to full restoration
Success Criteria
Risk Register
| Risk | Severity | Probability | Impact | Mitigation |
|---|
| Data loss during extraction | CRITICAL | LOW | Complete restart needed | Backup before starting, validate extract |
| Performance degradation in new system | HIGH | MEDIUM | Users blame new system | Load test at 2x expected peak |
| Integration failures | HIGH | MEDIUM | Downstream outages | Test all integrations pre-cutover |
| Longer-than-expected migration window | MEDIUM | MEDIUM | Users without system longer | Practice full migration 3x before live |
Communication Plan
- T-4 weeks: Announce migration date to all users
- T-1 week: Send detailed cutover schedule and expected downtime
- T-24h: Remind users (if there's downtime)
- T-30min: Begin maintenance window notification
- T+0: Begin migration, monitor actively
- T+2h: Notify users system is live and ready
- T+6h: First status update (all good or investigating)
- T+24h: Post-migration report to stakeholders
Post-Migration (First 48 Hours)
Post-Mortems & Lessons Learned
After cutover:
- What went well?
- What would we do differently?
- What issues came up? Why weren't they caught?
- Update runbook with new learnings