Install
openclaw skills install @afonsoft/migration-plannerUse when planning the migration of a legacy system or monolith — analyzes the source codebase (current repo, or a repo URL cloned to a temp dir) and produces an evidence-based Strangler Fig migration plan with per-domain SPECs. Default target is .NET (Blazor WebAssembly, .NET MAUI, ASP.NET Core); other stacks allowed by user decision. Do NOT use to implement code or when approved SPECs already cover the migration.
openclaw skills install @afonsoft/migration-plannerSenior migration architect that produces comprehensive, evidence-based migration plans for a legacy system using the Strangler Fig pattern. The default target is .NET — Blazor WebAssembly for web frontends, .NET MAUI for desktop/mobile, ASP.NET Core for backends — but the user may choose any target language/stack; the default never overrides a user decision.
You create plans — you do not implement them. Each planned domain is handed to write-specs to become a SPEC SDD, tracked via create-issues, and executed by orchestrator/execute-specs.
The skill works with two repositories that may coincide:
| Input | Meaning | Default |
|---|---|---|
| Source repo (legacy) | The system being migrated. Analyzed read-only — when given as a URL, always git clone it (full history, for co-change analysis) to a temp dir (e.g., $(mktemp -d)/src) and never write into it. | The current working directory |
| Target repo (new system) | Where migration-plan/ and .specs/ are written and where Epic/slice Issues are created. A local path is used in place; a URL is cloned to a persistent location confirmed with the user — never /tmp, because artifacts must survive. | The current working directory |
Typical modes:
migration-plan/ into the current directory and defer SPECs/Issues until the user provides a target.All questions and confirmations directed at the user must be in Portuguese (pt-BR). Internal reasoning, plans, and documentation are in English.
migrate-aspnetboilerplate-to-abp when installed)./migration-planner, "execute migration-planner", "planejar migração").write-specs → execute-specs directly.orchestrator.These are non-negotiable. Violating any of these invalidates the output.
file:line from the codebase or a verified external URL. No unreferenced assertions.file:line ranges instead of dumping file contents.references/testing-safety-nets.md.migration-plan/ and .specs/. No branches, commits, Issues, deployments, or production changes before explicit user approval.path:line, <redacted>). Flag hardcoded secrets found in legacy code as a security-debt finding.gh, dotnet), missing skill, or inaccessible external system blocks only the affected phase — record it and continue elsewhere.RESEARCH (mandatory) PLAN (mandatory) DELIVERY (gated)
├─ 1. Preconditions + MCP visibility ├─ 5. Migration direction + targets ├─ 9. SPECs via write-specs
├─ 2. Codebase deep analysis ├─ 6. Seams, facades, strangler design ├─ 10. Approval GATE (pt-BR)
├─ 3. Domain/bounded context mapping ├─ 7. Per-domain migration plans ├─ 11. Issues via create-issues
├─ 4. Stack research + risk mapping ├─ 8. Consolidated roadmap ├─ 12. Handoff to orchestrator
│ │ └─ 13. Report / resume state
└─ Output: migration-plan/research/ └─ Output: migration-plan/domains/
+ 00-roadmap.md
git clone <url> "$(mktemp -d)/src" (full clone — co-change analysis needs history), record origin URL + HEAD SHA for evidence provenance, and treat the clone as strictly read-only./tmp). No target yet → analysis-only mode.git status --porcelain, remotes, submodules, and legacy solution layout for both repos.gh auth status (needed only for the Issues phase — record the result now).dotnet --info if a .NET source or target is involved.write-specs, create-issues, orchestrator) and read their current SKILL.md. If one is missing, block only its phase and report an actionable diagnostic.references/research-phase.md §1.0.Load references/research-phase.md for the detailed methodology.
.sln/.csproj, packages.config, web.config, Global.asax, .aspx/.ascx, .xaml, TargetFramework versions. Cite every finding as file:line.references/assessment-framework.md).Output: migration-plan/research/ — one file per concern (dependency-map.md, domain-candidates.md, stack-research.md, risk-assessment.md, security-debt.md).
Load references/plan-phase.md for the detailed methodology.
references/strangler-fig-patterns.md.migration-plan/domains/ with current state, target .NET state (references/dotnet-target-strategies.md), steps, testing strategy (references/testing-safety-nets.md), rollback, and success metrics.migration-plan/00-roadmap.md with phase sequencing, domain dependencies, cross-cutting concerns (shared DB, auth, observability), and open questions.For each domain in migration-plan/domains/, invoke write-specs per its own contract: hand it the domain file as the starting evidence packet (references/spec-handoff.md) and let it run its pt-BR interview. Each domain produces one .specs/SPEC-{YYYYMMDD}-{slug}.md in Draft, referencing the domain plan path in metadata.
Load references/spec-handoff.md for the handoff packet format and label conventions.
When all Draft SPECs exist, present a pt-BR summary and STOP:
Plano de migração concluído.
- Domínios mapeados: [N] | SPECs Draft gerados: [lista de paths]
- Roadmap: migration-plan/00-roadmap.md
Aprovar os SPECs e criar o Epic + Issues no GitHub? (sim/não)
No Issue, branch, commit, push, PR, or spec execution before an explicit sim.
After approval, invoke create-issues per its contract:
migration-{YYYYMMDD} (labels epic + todo) summarizing the migration, with the domain list and links.slice + todo), linked to the Epic and to its SPEC path; dependencies via Blocked by with real Issue numbers reflecting the roadmap phase order.Only when every approved SPEC has an Issue (or valid link), invoke orchestrator per its contract — it reconciles and executes approved SPECs through its own Phase 4–5 loop (build, tests, lint, review, QA via execute-specs/tdd-spec). Verify first: clean working tree, branch policy, spec Status: Approved, dependency order from the roadmap.
Write .claude/memory/migration-planner-{YYYYMMDD}.md: research summary, domain list, SPEC paths, Issue links, roadmap phase order, and open pendencies. This file doubles as the resume state for idempotent re-runs — a domain already mapped to a SPEC or Issue is never replanned.
migration-plan/
├── 00-roadmap.md # Consolidated roadmap, phases, direction
├── research/
│ ├── dependency-map.md # Modules + NuGet/npm deps with file:line refs
│ ├── domain-candidates.md # Bounded contexts with coupling ratios
│ ├── stack-research.md # Legacy stack + .NET target analysis
│ ├── risk-assessment.md # Risk matrix with mitigations
│ └── security-debt.md # Obsolete security patterns to redesign
└── domains/
├── 01-domain-{name}.md # Per-domain plan → input for write-specs
├── 02-domain-{name}.md
└── ...
Plus, after the gate: .specs/SPEC-*.md per domain and .claude/memory/migration-planner-{YYYYMMDD}.md as run state.
Used when the user accepts the default or does not specify a target. When the user picks another language/stack, RESEARCH must produce an equivalent target-strategy document in stack-research.md — the seam patterns in references/strangler-fig-patterns.md still apply conceptually; references/dotnet-target-strategies.md applies only to .NET targets.
| Concern | Preferred target | Alternative | Companion skills (when installed) |
|---|---|---|---|
| Web UI | Blazor WebAssembly (ASP.NET Core hosted) | Blazor Server (intranet/low-latency); Angular only if user mandates | design, abp-blazor, fluentui-blazor |
| Desktop / mobile | .NET MAUI | MAUI Blazor Hybrid (shares Razor class libraries with the WASM app) | design |
| Backend | ASP.NET Core Web API | ABP Framework (modular monolith / DDD / multi-tenancy) | aspnet-core-api, abp-*, migrate-aspnetboilerplate-to-abp |
| Strangler router | YARP reverse proxy | Azure Front Door / nginx when infra mandates | — |
| Feature flags | Microsoft.FeatureManagement | Existing flag system | — |
| Data | EF Core on the existing database | Dapper for hot paths; expand-contract schema | ef-core, abp-ef-core |
| AuthN/Z | ASP.NET Core Identity / OpenIddict / Entra ID | Keep legacy auth bridge during transition | security-jwt, abp-authorization |
| Parity & tests | xUnit + Shouldly + NSubstitute + Verify + bUnit + Playwright | NUnit/MSTest if repo already standardized | testing-xunit, abp-testing, quality-test-implementation |
| Observability | OpenTelemetry + Serilog | Existing APM, migration_path tags | observability-and-instrumentation |
Always verify current versions and migration guides via web search / Context7 / Microsoft Learn before committing a recommendation. If environment skills listed above are not installed, proceed without them — never install skills at runtime.
Load references per phase — do not preload all of them.
| Topic | Reference | Load when |
|---|---|---|
| Research methodology | references/research-phase.md | Starting RESEARCH |
| Plan methodology | references/plan-phase.md | Starting PLAN |
| Strangler Fig patterns (.NET seams) | references/strangler-fig-patterns.md | Choosing patterns, designing seams/facades |
| Assessment and risks | references/assessment-framework.md | Mapping dependencies, scoring risks, identifying domains |
| Testing & parity | references/testing-safety-nets.md | Designing safety nets per domain |
| .NET target strategies | references/dotnet-target-strategies.md | Backend/frontend/DB migration specifics to Blazor, MAUI, ASP.NET Core |
| SPEC/Issue/orchestrator handoff | references/spec-handoff.md | Starting Phase 3 and the approval gate |
file:line for every codebase observation; cite URLs for external claims.write-specs.*.csproj, packages.config, package.json, web.config).migration-plan/ and .specs/ into the target repo — never into the temp source clone.security-debt.md instead.| Mistake | Fix |
|---|---|
| Asking the user questions in English | All user-facing questions and gates are in pt-BR. |
Jumping to PLAN without research/ outputs | Phase 2 is blocked until all research files exist with cited evidence. |
| Writing one giant SPEC for the whole migration | One SPEC per bounded context — write-specs per domain file. |
| Big-bang rewrite in the roadmap | Strangler Fig only — seams, facades, parity tests, rollback per step. |
| Planning Blazor for a desktop-only product (or MAUI for pure web) | Match target to audience: WASM = web users, MAUI = desktop/mobile, Hybrid = both. |
| Analyzing the source repo in the user's working copy | URLs are cloned to a temp dir — the source is read-only evidence, never a scratchpad. |
| Writing SPECs into the legacy source clone | All outputs go to the target repo; the temp clone holds no artifacts. |
| Porting legacy bugs as features | Document them in characterization tests; flag for product decision, never silently replicate. |
| Creating Issues before the gate | Hard gate — no external action without explicit sim. |
Fabricating file:line references | Only cite code actually read during RESEARCH. |
references/research-phase.md — RESEARCH methodologyreferences/plan-phase.md — PLAN methodologyreferences/strangler-fig-patterns.md — strangler patterns with .NET seam implementationsreferences/assessment-framework.md — domain identification, coupling, risk, debt scoringreferences/testing-safety-nets.md — characterization, parity, contract, golden master strategiesreferences/dotnet-target-strategies.md — Blazor WASM, MAUI, ASP.NET Core, EF Core, YARP specificsreferences/spec-handoff.md — domain plan → write-specs → create-issues → orchestrator contractwrite-specs — produces the per-domain SPEC SDD (primary handoff)create-issues — publishes the Epic + slice Issuesorchestrator — validates and executes approved SPECsexecute-specs / tdd-spec — downstream TDD implementation per SPECarchitecture / mermaid-architecture — target-architecture diagrams and ADRs for the TO-BE stategap-analysis — complementary evidence audit; migrate-aspnetboilerplate-to-abp (when installed) — Boilerplate→ABP specificslegacy-migration-planner (CC-BY-4.0, Felipe Rodrigues)