From declutter
Incremental migration workflow - safely migrate legacy code to modern patterns
How this command is triggered — by the user, by Claude, or both
Slash command
/declutter:migrateThe summary Claude sees in its command listing — used to decide when to auto-load this command
# /migrate - Incremental Migration Start an incremental migration workflow for moving legacy code to modern patterns. ## Usage ## Migration Strategies ### Strangler Fig Pattern Gradually replace legacy system by: 1. Creating new implementation alongside old 2. Routing traffic incrementally to new 3. Removing old when fully migrated ### Branch by Abstraction Migrate implementation behind abstraction: 1. Create abstraction layer 2. Implement abstraction with legacy code 3. Create new implementation 4. Switch to new implementation 5. Remove legacy ## Language-Specific Migrations ...
Start an incremental migration workflow for moving legacy code to modern patterns.
/migrate # Interactive mode
/migrate strangler # Use Strangler Fig pattern
/migrate branch-by-abstraction # Use Branch by Abstraction
/migrate --language=python # Python-specific migration
/migrate --framework=react # React-specific migration
Gradually replace legacy system by:
digraph strangler {
rankdir=LR;
old [label="Legacy\nSystem"];
new [label="New\nSystem"];
router [label="Router" shape=diamond];
client [label="Client"];
client -> router;
router -> old [label="90%"];
router -> new [label="10%"];
}
Migrate implementation behind abstraction:
digraph branch {
rankdir=TB;
client [label="Client Code"];
iface [label="Interface\n(Abstraction)"];
legacy [label="Legacy\nImplementation"];
modern [label="Modern\nImplementation"];
client -> iface;
iface -> legacy [style=dashed label="before"];
iface -> modern [label="after"];
}
| Option | Description |
|---|---|
--strategy=X | strangler, branch-by-abstraction |
--language=X | python, typescript, java |
--framework=X | react, vue, angular |
--scope=X | Limit migration scope |
--dry-run | Plan only |
User: /migrate strangler --scope=auth
Claude: Starting Strangler Fig migration for auth module...
Phase 1: Analysis
- Legacy auth in: src/legacy/auth/
- Entry points: 3 (login, logout, verify)
- Dependencies: database, cache, email
- Risk: Medium (critical path)
Phase 2: Planning
Migration plan:
1. Create AuthService interface
2. Implement interface with legacy code
3. Create new implementation
4. Add routing layer
5. Migrate login endpoint (10% traffic)
6. ... gradually increase ...
7. Remove legacy when 100%
Approve? [Yes/Revise/Cancel]
User: Yes
Phase 3: Implementation
[Step 1] Creating AuthService interface...
- Interface created
- Tests: PASSING
[Step 2] Wrapping legacy...
...
Migration in progress. Current routing: 10% new, 90% legacy.
Monitor at: /status/migration/auth
During migration:
# Migration Status: auth
## Routing
- Legacy: 90%
- Modern: 10%
## Metrics (Last 24h)
| Metric | Legacy | Modern |
|--------|--------|--------|
| Requests | 9000 | 1000 |
| Errors | 12 | 1 |
| Latency p99 | 120ms | 45ms |
## Status
Migration proceeding normally.
Recommend increasing to 25% modern.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin joowankim-declutter/migratePlans and executes an incremental framework or library migration with dependency audit, breaking changes analysis, step-by-step execution, and verification.
/migrateMigrates a Nuxt project from UI v2/v3 to v4, automatically fixing breaking changes like component renames, model modifiers, composable imports, and CSS import order. Supports dry-run preview.
/migrateMigrates legacy ETL pipelines (stored procedures, SSIS, Informatica) to modern stack by analyzing code, delegating to specialized agents, and producing dbt models, PySpark jobs, Airflow DAGs, validation queries, and rollback documentation.
/migrateConverts ADVPL procedural source files to TLPP object-oriented code with classes, namespaces, and modern patterns. Shows a detailed migration plan for user approval before generating output.
/migrateMigrates a project from Task Master MCP to native markdown-based task tracking by porting pending tasks, cleaning up Task Master files, and updating configuration.
/migrateAutomates migration of OpenShift component repositories to the openshift-tests-extension (OTE) framework — handles repo setup, code generation, test migration, dependency resolution, and Docker integration.