| name | migrate |
| description | Migration orchestrator that safely plans, executes, and verifies codebase or infrastructure migrations with rollback capabilities. |
| layer | orchestrator |
| category | orchestration |
| triggers | ["/migrate","migrate this","migration plan","upgrade to","move from X to Y","convert from X to Y"] |
| inputs | ["Source state description (current technology, version, or architecture)","Target state description (desired technology, version, or architecture)","Optional scope constraints (specific modules, files, or services)","Optional risk tolerance (conservative, moderate, aggressive)"] |
| outputs | ["Detailed migration plan with phases","Backup or snapshot of affected code","Migrated code with all changes applied","Verification report (tests pass, no regressions)","Rollback plan with instructions","Migration summary with before/after comparison"] |
| linksTo | ["plan","plan-validate","plan-archive","scout","research","test","fix","debug","refactor","code-review","optimize","sequential-thinking","git-workflow","commit-crafter","docs-writer","mermaid"] |
| linkedFrom | ["team"] |
| preferredNextSkills | ["test","ship","audit"] |
| fallbackSkills | ["plan","refactor"] |
| riskLevel | high |
| memoryReadPolicy | full |
| memoryWritePolicy | always |
| sideEffects | ["Creates backup branches or snapshots","Modifies source files (potentially many)","Modifies configuration files","May modify dependency files","Creates git commits at each phase","May modify database schemas","May modify infrastructure configuration"] |
Migrate
Purpose
Migrate is the orchestrator for all types of migrations: framework upgrades, language version bumps, architecture shifts, database schema changes, dependency replacements, and technology swaps. It treats every migration as a high-risk operation and applies a disciplined process: plan thoroughly, back up everything, execute incrementally, verify at each step, and always have a rollback plan.
Migrations are inherently dangerous because they touch many files, change fundamental assumptions, and can introduce subtle regressions that only surface later. Migrate exists to make this process as safe and systematic as possible.
Workflow
Phase 1: Assess & Plan
- Parse the migration scope -- Understand what's being migrated from and to. Identify all affected areas.
- Invoke
scout -- Scan the codebase to build a complete inventory of what needs to change:
- Files using the old pattern/technology
- Configuration files that reference it
- Tests that depend on it
- Documentation that mentions it
- Dependencies that relate to it
- Invoke
research -- Look up the migration path:
- Official migration guides (via Context7)
- Known breaking changes between versions
- Community-reported pitfalls
- Codemods or automated migration tools available
- Invoke
sequential-thinking -- Reason through the migration order:
- What must change first (foundations) vs last (consumers)
- Which changes are independent vs dependent
- Where the risk concentrations are
- Invoke
plan -- Create a phased migration plan:
- Phase boundaries with clear milestones
- Per-phase file lists and change descriptions
- Risk assessment per phase
- Estimated effort per phase
- Rollback strategy per phase
- Invoke
plan-validate -- Verify the plan is complete and feasible.
- Invoke
mermaid (if complex) -- Visualize the migration dependency graph.
- Present the plan -- Show the user the full migration plan. This is a mandatory checkpoint -- no migration proceeds without explicit user approval.
Phase 2: Backup
- Invoke -- Create a migration branch from the current state.