| name | migration-advisor |
| description | Front door for legacy migrations โ assess a legacy system from shallow read-only signals (repo probe, git history, a reachable running instance) plus a short interview, then recommend an entry path (rehost, replatform, rearchitect) and an ordered sequence of migration skills to invoke. Produces migration/PLAN.md with its evidence shown; routes, never executes. Use when someone wants to migrate, modernize, or port a legacy enterprise Java or web application and needs to know where to start. Triggers on "migrate this legacy app", "how do I modernize this", "port this old system", "where do I start with this legacy codebase", "plan a migration". |
Migration Advisor
The triage front door. Legacy migration is judgment-heavy and the entry-path choice is a human decision โ this skill gathers the cheap signals that inform that choice, recommends a path and a sequence, and hands off. It routes, never executes: every step it recommends is invoked explicitly by a human, and each produces a reviewable artifact.
Stay shallow. The value is finishing in under a minute on a repo you have never seen. Deep vocabulary mining is /concept-extractor; behavior capture is /characterization-tests. Those are steps in the plan, not prerequisites to producing it.
Data Sources
Use whatever is present; state in the plan which were available โ a plan built without git or a runnable instance is more heuristic, and must say so.
Repo probe (always)
Read-only counts and pattern hits, never comprehension:
- Platform / age โ build files:
javax.* vs jakarta.*, servlet/EJB/JSF/Spring versions, target JDK; or package.json with jQuery/AngularJS/Backbone.
- Size / shape โ module, package, and file counts; LOC order of magnitude; density of
*Manager/*Impl/*Util/*Facade names (overengineering signal โ concept pipeline pays off; small and clean โ rearchitect directly).
- External dependencies โ count and identity of libraries with Java SE or platform equivalents (the replatform/simplifier signal).
- Test coverage โ presence and size of a test source tree (near-zero โ characterization must come first; "1:1 lift" is risky).
- Surfaces โ JAX-RS resources,
web.xml mappings, queue config, batch jobs; whether a runnable artifact exists (is characterization feasible, on which surface).
Git history (if .git present)
Aggregate git log / shortlog / --numstat, not per-file blame:
- Liveness โ last commit date, commit frequency: frozen (experts likely gone โ lean on recorded behavior and async questionnaires) vs. active (strangle alongside ongoing work).
- Bus factor โ
git shortlog -sne: contributor count and whether the top authors are recent. Pre-fills the interview's expert-availability question with names.
- Hotspots โ churn per file/package: where behavior is volatile and characterization should concentrate.
- Temporal coupling โ files that change together: empirical evidence that latent structure exists and the carve path will pay off. Note it; do not carve โ that is
/bc-carver.
- Code age โ old untouched code is safe to lift; recently churned code is where lift risk concentrates.
Distrust the signal when history is shallow-cloned, squashed/rebased, dominated by reformatting or dependency-bump commits, or broken by large file moves. Say so rather than presenting distorted churn as fact.
Running instance (if reachable)
Confirm a surface responds; note base URL and health. Do not exercise it โ that is characterization's job.
Interview
The routing-critical facts live in people's heads. Ask 3โ4 enumerable questions with AskUserQuestion, pre-filled from the probes so the human confirms or corrects rather than starts blank:
- Must the system keep running during migration? โ rehost/replatform first vs. rearchitect directly.
- Is a domain expert available? (offer the git bus-factor names) โ concept path viability; live vs. async clarification.
- Goal: clean modern runtime, or full BCE? โ replatform-terminal vs. carve to sbce.
- Platform EOL / compliance deadline? โ urgency; favors lift-first.
Output
Write migration/PLAN.md:
- Findings โ the gathered signals, each with its source and the caveats that apply. Spot-checkable, never trust-based.
- Recommended path โ rehost, replatform, or rearchitect โ with the reasoning (which signals drove it), so a human who knows the system can override a bad inference.
- Sequence โ the ordered skills to invoke (
/characterization-tests record โ โฆ ), with steps marked skippable and why, and the decision points that need a human call flagged.
- Reference, don't restate โ link each step to its own skill README for detail; keep the plan thin so it does not drift from the skills.
The plan is a recommendation with its evidence shown, not a verdict โ candidates-not-verdicts applied to the routing decision itself. The human edits it before step one.
Entry Paths
- Rehost โ 1:1 lift onto the target runtime, nothing else. Keeps running through a long migration or under EOL pressure.
- Replatform โ lift, then
/simplifier passes under the characterization green bar. A valid terminal state, or preparation for the concept pipeline.
- Rearchitect โ recover vocabulary (
/concept-extractor โ /concept-clarifier), carve (/bc-carver), converge to specs (/sbce + stack skill). For overengineered systems where the structure hides the domain.