| name | migrate |
| description | Orchestrate framework, API, or language version migration — analyze impact, plan changes, execute in slices, verify each step. Activate when #mg appears anywhere in the user message. |
| argument-hint | <target> |
| disable-model-invocation | false |
| allowed-tools | Read, Edit, MultiEdit, Write, Glob, Grep, Bash, Task |
Orchestrate migration for: $ARGUMENTS
Prerequisite check:
- Verify the migration target is specified. If
$ARGUMENTS is empty:
- What's wrong: No migration target specified.
- How to fix: Provide a target, e.g.,
#mg React 18 to 19 or #mg Python 3.11 to 3.12.
- Verify the project has a recognizable dependency file (package.json, pyproject.toml, go.mod, etc.). If not found:
- What's wrong: Cannot determine project dependencies.
- How to fix: Ensure you're in the correct project directory.
Phase 1 — Impact analysis:
- Identify the migration target (framework version, API change, language upgrade).
- Use
migration-specialist to scan the codebase for affected patterns.
- Use
repo-librarian to map the current architecture and dependencies.
- Produce an impact report:
- Files affected (count and list)
- Breaking changes detected
- Deprecated APIs in use
- Test coverage of affected areas
Phase 2 — Migration plan:
- Use
planner-sisyphus to create a phased migration plan.
- Group changes into independent slices that can be verified separately.
- Identify rollback points between slices.
- Run
critic to verify the plan is executable.
Phase 3 — Execution:
- Execute one slice at a time using
build-integrator.
- After each slice, run targeted verification.
- If a slice fails verification, diagnose with
bug-hunter before proceeding.
- Track progress in the todo list.
Phase 4 — Verification:
- Run full test suite after all slices complete.
- Check for remaining deprecated API usage.
- Verify no regressions in functionality.
- End with:
- Migration summary
- Files changed
- Breaking changes resolved
- Remaining manual steps (if any)
- Verification results