{
  "version": "act 1.0.17",
  "slug": "migration-assessment",
  "name": "migration-assessment",
  "description": "Use when assessing migration readiness, planning a port to another language, understanding what makes this codebase hard to rewrite, or requesting \"how ready is this for porting?\". Depth 2 \u2014 investigate. Produces per-module readiness cards, recommended migration order, hard/soft blocker list, and platform dependency assessment.",
  "url": "https://act101.ai/docs/skills/migration-assessment",
  "body_md": "# Migration Assessment\n\n**Depth:** Level 2 (Investigate).\n\nSee `../analysis-protocol/references/protocol.md` for: artifact directory structure,\nthe investigation loop, depth levels, summary format, token budget rules, and project\nmap structure. Read that document before proceeding.\n\n## Phase 1: Parallel Tool Dispatch\n\nDispatch all available tools in a **single parallel batch**.\nEach subagent runs one tool, saves raw JSON to `raw/<tool-name>.json`, returns a\nstructured summary.\n\n**Must-have tools:**\n\n| Tool | Purpose | MCP call |\n|------|---------|----------|\n| `analyze_readiness` | Composite migration score (M1) | `analyze_readiness` |\n\nIf `analyze_readiness` is unavailable, report that and stop \u2014 no useful migration\nassessment is possible without it.\n\n**Extended tools (use if available, skip and note in manifest if not):**\n\n| Tool | Purpose | MCP call |\n|------|---------|----------|\n| `analyze_features` | Language feature inventory (M3) | `analyze_features` |\n| `analyze_platform_deps` | Platform/runtime dependencies (M5) | `analyze_platform_deps` |\n| `analyze_interfaces` | Cross-module contracts (M4) | `analyze_interfaces` |\n| `analyze_type_completeness` | Type boundary holes (M7) | `analyze_type_completeness` |\n| `analyze_fan_balance` | Migration ordering \u2014 fan-in/fan-out (M6) | `analyze_fan_balance` |\n| `analyze_depth` | Dependency chain depth (S4) | `analyze_depth` |\n| `analyze_inheritance` | Tangled inheritance hierarchies (H6) | `analyze_inheritance` |\n| `analyze_patterns` | Hard porting blockers | `analyze_patterns` (use `--pattern porting_blockers` if available, else `--tier all`) |\n\n## Phase 2: Investigation\n\nFor each file or module scored \"hard\" in readiness, or flagged as a hard blocker:\n\n**Platform dependency hypothesis example:**\n> **Hypothesis N:** The `<module>` module is migration-ready despite `<N>` platform\n> deps because they're isolated behind a `<WrapperClass>` abstraction.\n> **Evidence:** `analyze_readiness` scored it \"needs-work\"; `analyze_platform_deps`\n> shows N imports of `<platform-api>`.\n> **Confirming query:** `skeleton` on the wrapper file + `references`\n> on the platform import symbol.\n> **Confirms if:** Only the wrapper file imports the platform module directly.\n> **Refutes if:** Multiple files import the platform module directly.\n\n**Complexity blocker hypothesis example:**\n> **Hypothesis N:** `<file>` is a hard blocker due to dynamic dispatch, not complexity.\n> **Evidence:** `analyze_readiness` scored it \"hard\"; patterns flagged reflection/eval use.\n> **Confirming query:** `skeleton` on the file to count dynamic call sites.\n> **Confirms if:** Multiple reflection/eval call sites with no static alternative.\n> **Refutes if:** Single call site that can be wrapped or replaced.\n\nSave investigation notes to `investigation/hypothesis-N.md`.\n\n## Report Structure\n\n```markdown\n# Migration Assessment: <project name>\n\n## Readiness Summary\nReady / Needs work / Hard counts with percentages.\nOverall verdict: **Ready** / **Needs work** / **Hard** \u2014 with confidence note.\n\n## Recommended Migration Order\nFoundation modules first (high fan-in, low fan-out \u2014 ported early, depended upon).\nOrchestrators last (low fan-in, high fan-out \u2014 ported after their dependencies).\nNumbered list with rationale per module.\n\n## Porting Blockers\nPer-file list with context from investigation.\nDistinguish clearly:\n- **Hard blockers:** eval, reflection, FFI, dynamic dispatch \u2014 no mechanical equivalent\n- **Soft blockers:** high complexity, tight coupling \u2014 require refactor before porting\n\n## Platform Dependencies\nBy category (filesystem, network, OS, process, browser, FFI).\nFor each dependency:\n- Which files use it\n- Wrapped vs. direct (direct = higher porting cost)\n- Adaptation strategy for the target language\n\n## Type Boundary Gaps\nModules with low type completeness.\nPer-gap: module path, missing type annotations, impact on mechanical translation.\n\n## Language Feature Concerns\nFeatures with no direct equivalent in the target language.\nPer-feature: count, affected files, suggested adaptation approach.\n\n## Inheritance Complexity\nDeep hierarchies and diamond inheritance patterns that complicate porting.\nPer-finding: chain depth, members, recommended simplification before porting.\n\n## Dependency Depth\nDeepest dependency chains (leaf modules to port first).\nPer-chain: length, root, leaf, recommended port order.\n\n## Per-Module Readiness Cards\nFor each top-level module:\n- Readiness score: ready / needs-work / hard\n- Blocker count (hard / soft)\n- Platform dep count\n- Recommended action\n```\n\n## Project Map Updates\n\nAppends or updates the **\"Migration Readiness\"** section. Appends to the Analysis\nHistory table."
}