@code-migration/wow-migrator 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +59 -58
  2. package/bin/{kmp-skills.js → wow-migrator.js} +65 -17
  3. package/package.json +16 -8
  4. package/skills/android-project-analyst/MIGRATION.md +39 -23
  5. package/skills/android-project-analyst/SKILL.md +54 -44
  6. package/skills/android-project-analyst/bind.md +22 -14
  7. package/skills/android-project-analyst/dependencies.yaml +8 -4
  8. package/skills/android-project-analyst/roles/analysis-workspace-state.md +118 -0
  9. package/skills/android-project-analyst/roles/behavior-logic.md +163 -0
  10. package/skills/android-project-analyst/roles/data-contract-flow.md +167 -0
  11. package/skills/android-project-analyst/roles/presentation-resource.md +296 -0
  12. package/skills/android-project-analyst/roles/project-architecture.md +171 -0
  13. package/skills/android-project-analyst/workflow.md +118 -70
  14. package/skills/android-to-kmp-migrator/MIGRATION.md +61 -1
  15. package/skills/android-to-kmp-migrator/SKILL.md +96 -134
  16. package/skills/android-to-kmp-migrator/bind.md +33 -11
  17. package/skills/android-to-kmp-migrator/roles/completion-report.md +72 -0
  18. package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +63 -0
  19. package/skills/android-to-kmp-migrator/roles/logic-implementation.md +66 -0
  20. package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +65 -0
  21. package/skills/android-to-kmp-migrator/roles/migration-verification.md +77 -0
  22. package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +13 -1
  23. package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +74 -0
  24. package/skills/android-to-kmp-migrator/roles/presentation-integration.md +65 -0
  25. package/skills/android-to-kmp-migrator/roles/state-data-prep.md +63 -0
  26. package/skills/android-to-kmp-migrator/roles/ui-implementation.md +64 -0
  27. package/skills/android-to-kmp-migrator/workflow.md +175 -149
  28. package/skills/kmp-test-validator/MIGRATION.md +18 -3
  29. package/skills/kmp-test-validator/SKILL.md +44 -79
  30. package/skills/kmp-test-validator/bind.md +8 -8
  31. package/skills/kmp-test-validator/dependencies.yaml +3 -3
  32. package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +67 -0
  33. package/skills/kmp-test-validator/roles/validation-plan-gate.md +66 -0
  34. package/skills/kmp-test-validator/roles/validation-remediation.md +7 -7
  35. package/skills/kmp-test-validator/roles/validation-report.md +8 -10
  36. package/skills/kmp-test-validator/roles/validation-test-runner.md +61 -0
  37. package/skills/kmp-test-validator/roles/validation-workspace-state.md +2 -2
  38. package/skills/kmp-test-validator/workflow.md +87 -119
  39. package/skills/migration-task-adapter/MIGRATION.md +34 -0
  40. package/skills/migration-task-adapter/SKILL.md +134 -0
  41. package/skills/migration-task-adapter/bind.md +113 -0
  42. package/skills/migration-task-adapter/dependencies.yaml +26 -0
  43. package/skills/migration-task-adapter/roles/task-reporter.md +129 -0
  44. package/skills/migration-task-adapter/roles/task-understanding-router.md +134 -0
  45. package/skills/migration-task-adapter/roles/workflow-orchestrator.md +140 -0
  46. package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +189 -0
  47. package/skills/migration-task-adapter/workflow.md +183 -0
  48. package/skills/android-project-analyst/roles/android-ecosystem.md +0 -141
  49. package/skills/android-project-analyst/roles/api-list.md +0 -136
  50. package/skills/android-project-analyst/roles/architecture-pattern.md +0 -131
  51. package/skills/android-project-analyst/roles/data-flow.md +0 -143
  52. package/skills/android-project-analyst/roles/logic-understand.md +0 -154
  53. package/skills/android-project-analyst/roles/resource-understand.md +0 -151
  54. package/skills/android-project-analyst/roles/ui-understand.md +0 -136
  55. package/skills/android-to-kmp-migrator/roles/api-contract-parity.md +0 -95
  56. package/skills/android-to-kmp-migrator/roles/dataflow-logic-implementation.md +0 -130
  57. package/skills/android-to-kmp-migrator/roles/dependency-resolution.md +0 -106
  58. package/skills/android-to-kmp-migrator/roles/incremental-build-check.md +0 -105
  59. package/skills/android-to-kmp-migrator/roles/legacy-spec-delta-review.md +0 -104
  60. package/skills/android-to-kmp-migrator/roles/migration-alignment.md +0 -119
  61. package/skills/android-to-kmp-migrator/roles/migration-report.md +0 -108
  62. package/skills/android-to-kmp-migrator/roles/module-node-migration-fix.md +0 -111
  63. package/skills/android-to-kmp-migrator/roles/module-node-migration-review.md +0 -108
  64. package/skills/android-to-kmp-migrator/roles/navigation-migration.md +0 -104
  65. package/skills/android-to-kmp-migrator/roles/platform-api-replacement.md +0 -104
  66. package/skills/android-to-kmp-migrator/roles/prd-completion-check.md +0 -124
  67. package/skills/android-to-kmp-migrator/roles/resource-migration.md +0 -109
  68. package/skills/android-to-kmp-migrator/roles/source-set-placement-guard.md +0 -95
  69. package/skills/android-to-kmp-migrator/roles/state-model-mapping.md +0 -109
  70. package/skills/android-to-kmp-migrator/roles/target-project-understand.md +0 -118
  71. package/skills/android-to-kmp-migrator/roles/theme-design-system-mapping.md +0 -101
  72. package/skills/android-to-kmp-migrator/roles/ui-mockup-implementation.md +0 -121
  73. package/skills/android-to-kmp-migrator/roles/ui-render-fidelity-check.md +0 -100
  74. package/skills/kmp-test-validator/roles/android-kmp-fidelity-audit.md +0 -102
  75. package/skills/kmp-test-validator/roles/build-preview-gate.md +0 -109
  76. package/skills/kmp-test-validator/roles/kmp-validation-plan.md +0 -108
  77. package/skills/kmp-test-validator/roles/test-case-decomposition.md +0 -103
  78. package/skills/kmp-test-validator/roles/test-execution.md +0 -104
  79. package/skills/kmp-test-validator/roles/validation-input-contract.md +0 -111
@@ -1,203 +1,165 @@
1
1
  ---
2
2
  name: android-to-kmp-migrator
3
3
  description: |
4
- 20-role pipeline Swarm Skill (C+B) that migrates Legacy Android into an existing KMP target project: analysis, dependency gate, parallel prep, UI-then-logic implementation, reviewfix loops, verification, and a migration report.
5
- Use with the android-to-kmp-migrator controller to port Android UI, resources, navigation, state, and logic into one KMP project, then hand to kmp-test-validator.
4
+ 10-role reduced module-first Swarm Skill (C+B) that migrates Legacy Android into an existing KMP target project with strict output roots, migration-module inventory, per-module node results, module/global representations, review-fix modes, verification checks, and a validation-ready migration report.
5
+ Use with the android-to-kmp-migrator controller to port Android UI, resources, navigation, state, data, platform behavior, and logic into one KMP project by migrating each module first, then synthesizing a global migration representation for kmp-test-validator.
6
6
  Do NOT use for Legacy Android analysis, KMP-only feature work, quick lookups, or non-migration refactors.
7
- version: "0.2"
7
+ version: "0.4"
8
8
  kind: swarm-skill
9
9
  disable-model-invocation: true
10
10
  roles:
11
11
  - id: migration-workspace-state
12
12
  kind: ai_agent
13
- purpose: State ledger — node status, changed-file ownership, stale outputs, rerun/blocker history, next actions. No code analysis or edits.
13
+ purpose: State ledger owner — node status, changed-file ownership, stale outputs, rerun/blocker history, next actions. No code analysis or edits.
14
14
  skills: []
15
15
  tools: [git]
16
- - id: legacy-spec-delta-review
16
+ - id: migration-analysis-planning
17
17
  kind: ai_agent
18
- purpose: Cross-check Legacy SPEC vs raw source for missing coverage and contradictions; classify and route deltas. Raw source wins.
18
+ purpose: Analysis and planning owner — Legacy SPEC/raw-source deltas, target KMP understanding, reuse inventory, source-to-target map, integration scaffold, and ordered module tasks.
19
19
  skills: []
20
20
  tools: [rg]
21
- - id: target-project-understand
21
+ - id: dependency-platform-gate
22
22
  kind: ai_agent
23
- purpose: First migration nodeverify KMP target, capture baseline env, detect relevant sub-module, build reuse inventory and constraints.
23
+ purpose: Dependency and platform owner minimal-change dependency readiness plus Android-only API replacement strategy and expect/actual/platform-source-set plan.
24
24
  skills: []
25
25
  tools: [rg]
26
- - id: migration-alignment
26
+ - id: presentation-integration
27
27
  kind: ai_agent
28
- purpose: Build source-to-target map, integration scaffold, and ordered implementation tasks; record SPEC/Design/Plan deltas. No implementation.
29
- skills: []
30
- tools: [rg]
31
- - id: dependency-resolution
32
- kind: ai_agent
33
- purpose: Minimal-change build gate — map capabilities to baseline/reuse, justify any build-config change. Returns dependency readiness.
34
- skills: []
35
- tools: [rg]
36
- - id: theme-design-system-mapping
37
- kind: ai_agent
38
- purpose: Map Legacy visual tokens to target design-system tokens/components, reuse-first; produce UI guidance and visual gaps.
39
- skills: []
40
- tools: [rg]
41
- - id: resource-migration
42
- kind: ai_agent
43
- purpose: Migrate or model local & online resources into target KMP conventions, preserving semantics; record resource gaps.
28
+ purpose: Presentation integration owner theme/design tokens, resources, online media modeling, navigation routes, presentation gaps, and UI handoff.
44
29
  skills: []
45
30
  tools: [rg, curl]
46
- - id: navigation-migration
31
+ - id: state-data-prep
47
32
  kind: ai_agent
48
- purpose: Migrate routes, parameters, back behavior, deep links, and result passing into target navigation; record route gaps.
33
+ purpose: State and data preparation owner state holders, DTO/domain/UI models, mappers, API/data contract expectations, and logic handoff.
49
34
  skills: []
50
35
  tools: [rg]
51
- - id: platform-api-replacement
36
+ - id: ui-implementation
52
37
  kind: ai_agent
53
- purpose: Replace Android-only APIs with target-safe abstractions or expect/actual; keep Android-only code out of commonMain.
38
+ purpose: UI implementation owner migrated Compose UI layout/components/states/resources first, with binding surfaces and no business logic.
54
39
  skills: []
55
40
  tools: [rg]
56
- - id: state-model-mapping
41
+ - id: logic-implementation
57
42
  kind: ai_agent
58
- purpose: Map state holders and DTO/domain/UI models to target structures, preserving state semantics; hand off to the logic node.
43
+ purpose: Logic implementation owner repositories/use cases/API integration/state propagation/business logic bound to approved UI surfaces.
59
44
  skills: []
60
45
  tools: [rg]
61
- - id: ui-mockup-implementation
62
- kind: ai_agent
63
- purpose: Implement migrated UI layout/components/states/resources first in the target project; expose binding surfaces. No business logic.
64
- skills: []
65
- tools: [rg]
66
- - id: dataflow-logic-implementation
67
- kind: ai_agent
68
- purpose: Implement architecture, data flow, API integration, navigation effects, lifecycle, and business logic bound to UI surfaces.
69
- skills: []
70
- tools: [rg]
71
- - id: module-node-migration-review
72
- kind: ai_agent
73
- purpose: Read-only review of one migration slice for contract/scope/parity/conventions/handoff; classify and route must-fix findings.
74
- skills: []
75
- tools: [rg, git]
76
- - id: module-node-migration-fix
46
+ - id: module-node-review-fix
77
47
  kind: ai_agent
78
- purpose: Apply assigned must-fix findings inside allowed files only; preserve conventions; require mandatory re-review.
48
+ purpose: Review/fix owner with strict modes — read-only review or scoped fix for one module/node slice; fresh re-review required after every fix.
79
49
  skills: []
80
50
  tools: [rg, git]
81
- - id: source-set-placement-guard
51
+ - id: migration-verification
82
52
  kind: ai_agent
83
- purpose: Verify KMP source-set placement; catch Android-only APIs in shared code and missing/duplicate actuals; route violations.
53
+ purpose: Verification owner source-set, API contract, UI render/fidelity, and incremental build checks with stable check IDs and routed failures.
84
54
  skills: []
85
55
  tools: [rg, git]
86
- - id: api-contract-parity
56
+ - id: completion-report
87
57
  kind: ai_agent
88
- purpose: Diff migrated KMP API contracts vs Legacy API/data evidence; classify and route mismatches. No fixes.
89
- skills: []
90
- tools: [rg]
91
- - id: ui-render-fidelity-check
92
- kind: ai_agent
93
- purpose: Verify migrated screens render and cover visual states/resources/theme; route UI failures. Static coverage when no render command.
94
- skills: []
95
- tools: [rg]
96
- - id: incremental-build-check
97
- kind: ai_agent
98
- purpose: Run the smallest trustworthy target build/check; parse failures and route to responsible nodes. Early gate, not final validation.
99
- skills: []
100
- tools: [git]
101
- - id: prd-completion-check
102
- kind: ai_agent
103
- purpose: Judge readiness vs PRD/raw task/SPEC/node outputs and invariants; emit node-routed rerun requests or ready_for_validation.
58
+ purpose: Completion/report owner with strict modes readiness/rerun/blocker decisions and final migration_report handoff after module/global representations exist.
104
59
  skills: []
105
60
  tools: [rg, git]
106
- - id: migration-report
107
- kind: ai_agent
108
- purpose: Synthesize final migration report and validation inputs for kmp-test-validator; ready_for_validation only when completion is ready.
109
- skills: []
110
- tools: [git]
111
61
  ---
112
62
 
113
63
  # Android To KMP Migrator Swarm Skill
114
64
 
115
- This is the agent-facing registry and team definition for the `android-to-kmp-migrator` controller (the same-name subagent in `kmp-migration/agents/`). It converts a Legacy Android SPEC plus an existing KMP target project into migrated, validation-ready KMP code.
65
+ This is the agent-facing registry and team definition for the `android-to-kmp-migrator` controller. It converts a completed Legacy Android SPEC plus an existing KMP target project into migrated, validation-ready KMP code through a module-first schedule.
116
66
 
117
- The team is a **specialization pipeline (C) with embedded parallel fan-outs (B) and review→fix loops**: a serial analysis chain feeds a dependency gate, then a parallel prep stage, then UI-before-logic implementation, then parallel verification, completion check, and report. A single agent attempting the whole migration blurs the hard stage boundaries — it implements logic before the UI surface exists, skips the dependency minimal-change gate, lets Android-only APIs leak into `commonMain`, and self-approves its own work. Isolating each concern into an owned node with hard handoff gates and a mandatory review→fix→re-review loop keeps every change scoped, traceable, and reviewed before downstream nodes consume it. The controller (Leader) owns routing, contract enforcement, rerun handling, and the `kmp-test-validator` handoff; nodes own bounded target-understanding and implementation work.
67
+ The team is a **reduced specialization pipeline (C) with embedded parallel fan-outs (B)**. Role overlap has been collapsed into 10 role definitions; safety is preserved through explicit dispatch modes and strict path contracts. See [ROLE_REDUCTION.md](ROLE_REDUCTION.md) for the old-to-new mapping and merge rationale.
118
68
 
119
- ## Workflow
69
+ ## Protocol Summary
120
70
 
121
- The full playbook (Mermaid topology, per-step gates, review→fix loop, failure routing, Final Report format) is in [workflow.md](workflow.md). Protocol summary:
122
-
123
- 0. **Pre-flight: check dependencies** — read [dependencies.yaml](dependencies.yaml) and verify `rg` / `git` / `curl` (all `required: false`; the target Gradle wrapper drives builds). Report status; **user decides** whether to proceed.
124
- 1. **Trigger + shared brief + workspace state** — Leader confirms the migration trigger and Legacy SPEC context, builds the shared brief, and initializes `migration-workspace-state`. Default `output_dir` = `~/.a2c_agents/migration/`.
125
- 2. **Analysis chain (serial)** — `legacy-spec-delta-review` `target-project-understand` (must confirm KMP, else `blocked`) → `migration-alignment`.
126
- 3. **Dependency gate** — `dependency-resolution` must return `ready_for_implementation` before any implementation node runs (minimal-change gate; see [bind.md](bind.md)).
127
- 4. **Stage Prep (parallel)** — `theme-design-system-mapping`, `resource-migration`, `navigation-migration`, `platform-api-replacement`, `state-model-mapping`.
128
- 5. **Reviewfix loop** — after any file-changing node: `module-node-migration-review` `module-node-migration-fix` (if `needs_fix`) mandatory re-review, until `approved`.
129
- 6. **UI implementation** — `ui-mockup-implementation` (before logic), then the reviewfix loop.
130
- 7. **Dataflow/logic implementation** — `dataflow-logic-implementation`, then the review→fix loop.
131
- 8. **Stage Verify (parallel)** — `source-set-placement-guard`, `api-contract-parity`, `ui-render-fidelity-check`, `incremental-build-check`; failures route back to the responsible node.
132
- 9. **Completion check** — `prd-completion-check` → `ready_for_validation`, `needs_rerun` (route to nodes), or `blocked`.
133
- 10. **Final: migration report** — `migration-report` returns `ready_for_validation` only when completion is ready; the Leader then invokes `kmp-test-validator`. Leader routes failures verbatim, never mediates.
71
+ 0. **Pre-flight** verify optional dependencies from [dependencies.yaml](dependencies.yaml).
72
+ 1. **Trigger + output root** — lock `output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator`; write `run_manifest.json`.
73
+ 2. **Migration module inventory** — write `module-index/migration_module_inventory.json` and `.md`; write each module's `module_brief.json`.
74
+ 3. **Workspace state** — initialize and refresh `migration-workspace-state` under `<output_root>/global/node-results/migration-workspace-state/`.
75
+ 4. **Per-module planning** — run `migration-analysis-planning`.
76
+ 5. **Per-module dependency/platform gate** — run `dependency-platform-gate`.
77
+ 6. **Per-module prep fan-out** — run `presentation-integration` and `state-data-prep` when inputs allow.
78
+ 7. **Review/fix loop** — run `module-node-review-fix` in `review` mode; if needed, run `fix` mode; then run a fresh `review`.
79
+ 8. **UI then logic** — run `ui-implementation`, review/fix, then `logic-implementation`, review/fix.
80
+ 9. **Verification** — run `migration-verification` with required `check_ids`: `source_set`, `api_contract`, `ui_render`, `incremental_build`.
81
+ 10. **Completion/report** — run `completion-report` in `readiness` mode, write module/global representations, then run `completion-report` in `report` mode and hand off to `kmp-test-validator`.
134
82
 
135
83
  ## Roles
136
84
 
137
- Each node is dispatched as a subagent that must read its role file (`skill_spec_path`), paste its `## Inline Persona for Teammate` into the dispatch prompt, and execute only that role's bounded slice. The dispatch order enforces upstream→downstream data availability and the review→fix gates.
138
-
139
- | id | Purpose | When dispatched | Key dependencies | Role file |
140
- |---|---|---|---|---|
141
- | migration-workspace-state | State ledger / stale-output tracking | Step 1 + refreshed after major completions | git | [roles/migration-workspace-state.md](roles/migration-workspace-state.md) |
142
- | legacy-spec-delta-review | SPEC-vs-source delta review | Step 2 (serial) | rg | [roles/legacy-spec-delta-review.md](roles/legacy-spec-delta-review.md) |
143
- | target-project-understand | Target KMP understanding + reuse inventory | Step 2 (serial) | rg | [roles/target-project-understand.md](roles/target-project-understand.md) |
144
- | migration-alignment | Source-to-target map + ordered tasks | Step 2 (serial) | rg | [roles/migration-alignment.md](roles/migration-alignment.md) |
145
- | dependency-resolution | Minimal-change dependency gate | Step 3 (gate) | rg | [roles/dependency-resolution.md](roles/dependency-resolution.md) |
146
- | theme-design-system-mapping | Visual token mapping | Step 4 (parallel prep) | rg | [roles/theme-design-system-mapping.md](roles/theme-design-system-mapping.md) |
147
- | resource-migration | Local & online resource migration | Step 4 (parallel prep) | rg, curl | [roles/resource-migration.md](roles/resource-migration.md) |
148
- | navigation-migration | Route/param/back/deep-link migration | Step 4 (parallel prep) | rg | [roles/navigation-migration.md](roles/navigation-migration.md) |
149
- | platform-api-replacement | Android-only API expect/actual | Step 4 (parallel prep) | rg | [roles/platform-api-replacement.md](roles/platform-api-replacement.md) |
150
- | state-model-mapping | State holder & model mapping | Step 4 (parallel prep) | rg | [roles/state-model-mapping.md](roles/state-model-mapping.md) |
151
- | ui-mockup-implementation | UI surface implementation (first) | Step 6 (after prep approved) | rg | [roles/ui-mockup-implementation.md](roles/ui-mockup-implementation.md) |
152
- | dataflow-logic-implementation | Data/API/logic implementation | Step 7 (after UI approved) | rg | [roles/dataflow-logic-implementation.md](roles/dataflow-logic-implementation.md) |
153
- | module-node-migration-review | Read-only per-slice review | Step 5 loop (after any file change) | rg, git | [roles/module-node-migration-review.md](roles/module-node-migration-review.md) |
154
- | module-node-migration-fix | Scoped must-fix application | Step 5 loop (on needs_fix) | rg, git | [roles/module-node-migration-fix.md](roles/module-node-migration-fix.md) |
155
- | source-set-placement-guard | KMP source-set boundary guard | Step 8 (parallel verify) | rg, git | [roles/source-set-placement-guard.md](roles/source-set-placement-guard.md) |
156
- | api-contract-parity | Migrated vs Legacy API parity | Step 8 (parallel verify) | rg | [roles/api-contract-parity.md](roles/api-contract-parity.md) |
157
- | ui-render-fidelity-check | Render + visual-state coverage | Step 8 (parallel verify) | rg | [roles/ui-render-fidelity-check.md](roles/ui-render-fidelity-check.md) |
158
- | incremental-build-check | Smallest target build/check gate | Step 8 (parallel verify) | git | [roles/incremental-build-check.md](roles/incremental-build-check.md) |
159
- | prd-completion-check | Readiness verdict + rerun routing | Step 9 | rg, git | [roles/prd-completion-check.md](roles/prd-completion-check.md) |
160
- | migration-report | Final report + validation inputs | Step 10 | git | [roles/migration-report.md](roles/migration-report.md) |
161
-
162
- > Before dispatching each teammate, read its role file and paste its `## Inline Persona for Teammate`
163
- > section directly into the dispatch prompt — adopting agents do NOT auto-load role files. Fill the
164
- > `{PLACEHOLDER}` inputs from the contract.
85
+ Each node is dispatched as a subagent that must read its role file (`skill_spec_path`), paste its `## Inline Persona for Teammate` into the dispatch prompt, and execute only that bounded slice.
86
+
87
+ | id | Purpose | When dispatched | Role file |
88
+ |---|---|---|---|
89
+ | `migration-workspace-state` | Ledger and stale-output tracking | Global and module refreshes | [roles/migration-workspace-state.md](roles/migration-workspace-state.md) |
90
+ | `migration-analysis-planning` | SPEC deltas, target understanding, alignment | Per-module first stage | [roles/migration-analysis-planning.md](roles/migration-analysis-planning.md) |
91
+ | `dependency-platform-gate` | Dependency readiness and platform replacement | Before prep/implementation | [roles/dependency-platform-gate.md](roles/dependency-platform-gate.md) |
92
+ | `presentation-integration` | Theme, resources, navigation | Prep fan-out before UI | [roles/presentation-integration.md](roles/presentation-integration.md) |
93
+ | `state-data-prep` | State/model/API contract prep | Prep fan-out before logic | [roles/state-data-prep.md](roles/state-data-prep.md) |
94
+ | `ui-implementation` | UI-first migrated surface | After prep approval | [roles/ui-implementation.md](roles/ui-implementation.md) |
95
+ | `logic-implementation` | Data/API/business logic | After UI approval | [roles/logic-implementation.md](roles/logic-implementation.md) |
96
+ | `module-node-review-fix` | Read-only review or scoped fix by mode | After file-changing slices | [roles/module-node-review-fix.md](roles/module-node-review-fix.md) |
97
+ | `migration-verification` | Source-set/API/UI/build checks | After implementation approval | [roles/migration-verification.md](roles/migration-verification.md) |
98
+ | `completion-report` | Readiness and final report by mode | Module/global completion | [roles/completion-report.md](roles/completion-report.md) |
165
99
 
166
100
  ## Files
167
101
 
168
- | File | What it contains | When to read |
169
- |---|---|---|
170
- | [workflow.md](workflow.md) | Mermaid C+B topology, staged protocol with gates, review→fix loop, failure routing, Final Report format | Before first dispatch — the complete playbook |
171
- | [bind.md](bind.md) | Resource limits, team behavioral constraints, dependency-gate/single-project invariants, failure & degraded modes | When hitting limits, handling failures, or scoping a large migration |
172
- | [roles/\*.md](roles/) | Per-node identity, success criteria, boundary, output schema, Inline Persona for Teammate | Before dispatching each teammate — extract Inline Persona |
173
- | [dependencies.yaml](dependencies.yaml) | External CLI tools (`rg`, `git`, `curl`) checked at startup | Step 0 — verify deps, report missing items, user decides go/no-go |
102
+ | File | What it contains |
103
+ |---|---|
104
+ | [ROLE_REDUCTION.md](ROLE_REDUCTION.md) | Reduced role analysis, old-to-new map, dispatch order, mode boundaries |
105
+ | [workflow.md](workflow.md) | Mermaid topology, staged protocol, gates, final report format |
106
+ | [bind.md](bind.md) | Resource limits, behavioral constraints, failure handling, path contract |
107
+ | [roles/](roles/) | Active reduced role specs |
108
+ | [dependencies.yaml](dependencies.yaml) | Optional CLI tools checked at startup |
109
+
110
+ ## Strict Output Schedule
111
+
112
+ ```text
113
+ output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator
114
+ module_index_dir = <output_root>/module-index
115
+ module_root = <output_root>/modules/<migration_module_id>
116
+ node_result_dir = <module_root>/node-results/<node_id>
117
+ module_representation_dir = <module_root>/representation
118
+ global_dir = <output_root>/global
119
+ report_dir = <output_root>/report
120
+ ```
174
121
 
175
- ## Shared Return Shape
122
+ Required artifacts:
123
+
124
+ - `<output_root>/run_manifest.json`
125
+ - `<module_index_dir>/migration_module_inventory.json`
126
+ - `<module_index_dir>/migration_module_inventory.md`
127
+ - `<module_root>/module_brief.json`
128
+ - `<node_result_dir>/<node-specific>.json`
129
+ - `<node_result_dir>/<node-specific>.md`
130
+ - `<module_representation_dir>/module_migration_representation.json`
131
+ - `<module_representation_dir>/module_migration_representation.md`
132
+ - `<global_dir>/global_migration_representation.json`
133
+ - `<global_dir>/global_migration_representation.md`
134
+ - `<report_dir>/migration_report.json`
135
+ - `<report_dir>/migration_report.md`
176
136
 
177
- Every node return payload includes, in addition to node-specific fields:
137
+ ## Shared Return Shape
178
138
 
179
139
  ```json
180
140
  {
181
141
  "status": "completed | passed | ready_for_implementation | ready_for_validation | needs_rerun | failed | blocked",
182
142
  "node": "<node-name>",
143
+ "mode": "<mode when role has modes>",
144
+ "migration_module_id": "<module id or global>",
145
+ "module_scope": "<module/screen/feature/resource/API scope or global>",
146
+ "output_dir": "<exact node_result_dir>",
183
147
  "output_files": ["<paths>"],
184
148
  "changed_files": ["<paths or empty>"],
185
149
  "stale_upstream_inputs": ["<paths or empty>"],
186
- "rerun_requests": [ { "node": "<responsible-node>", "reason": "", "required_inputs": [], "expected_output": "" } ],
150
+ "rerun_requests": [{ "node": "<responsible-node>", "reason": "", "required_inputs": [], "expected_output": "" }],
187
151
  "blocking_gaps": ["<gaps or empty>"]
188
152
  }
189
153
  ```
190
154
 
191
- Controller handling: missing/empty `output_files` rerun the same node; non-empty `stale_upstream_inputs` refresh those upstream artifacts then rerun; non-empty `rerun_requests` dispatch the responsible node first; `blocking_gaps` with no resolving rerun → stop with a user-visible blocker.
192
-
193
- ## Optional Android Studio MCP Context
194
-
195
- When the `jetbrains` MCP server is available, the controller may pass indexed IDE context to nodes: project structure/dependencies (`get_project_modules`, `get_project_dependencies`, `get_repositories`), code intelligence (`find_files_by_glob`, `search_in_files_by_regex`, `get_symbol_info`), diagnostics after code changes (`get_file_problems`), IDE build diagnostics (`build_project`), run configs (`get_run_configurations`, `execute_run_configuration`), and IDE-safe edits (`rename_refactoring`, `reformat_file`). Always pass `projectPath: <kmp_target_project_path>`. MCP is advisory — Gradle build/check gates, module review, completion check, and KMP validation remain required; record MCP gaps in the workspace ledger.
155
+ Controller handling: missing/empty `output_files` -> rerun the same node; non-empty `stale_upstream_inputs` -> refresh upstream artifacts then rerun; non-empty `rerun_requests` -> dispatch the responsible node first; unresolved `blocking_gaps` -> stop with a user-visible blocker.
196
156
 
197
157
  ## Shared Rules
198
158
 
199
159
  - Each node must read its own role file before work and stay inside its responsibility boundary.
200
- - Every important claim must include evidence from source paths, SPEC sections, or upstream node outputs; unknowns are marked explicitly, never guessed.
201
- - The controller must not substitute itself for node implementation; no migration leaves TODO placeholders as completion output.
202
- - Target conventions and reusable modules/components take priority over new abstractions; target build config is read-only except via `dependency-resolution`.
203
- - Migrated code stays inside one KMP target project; SPEC guides migration, but raw Legacy Android source wins when evidence conflicts.
160
+ - Consolidated roles must respect `mode`; do not combine review and fix in one invocation.
161
+ - Every important claim must include evidence from source paths, SPEC sections, upstream node outputs, or module/global representations.
162
+ - The controller must not substitute itself for node implementation.
163
+ - Target conventions and reusable modules/components take priority over new abstractions.
164
+ - Target build config is read-only except through `dependency-platform-gate`.
165
+ - Migrated code stays inside one KMP target project; raw Legacy Android source wins when SPEC conflicts.
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Item | Limit | Reason |
6
6
  |---|---|---|
7
- | `max_parallel_teammates` | 5 | Matches the largest parallel fan-out (Stage Prep: theme/resource/navigation/platform/state). Stage Verify runs ≤4 in parallel; the analysis chain and review→fix loops are serial. |
8
- | `total_wall_clock_budget` | 90 min | Upper bound for one full migration run including the analysis chain, prep, UI, logic, reviewfix loops, and verification on a feature-scoped migration. Whole-project scope should be split per § (b). |
9
- | `total_token_budget` | 1.5M tokens | Budget across all 20 nodes + Leader integration + reviewfix iterations; prevents one node or loop from exhausting context. |
10
- | `per_node_token_budget` | 120k tokens | Per node soft cap; implementation nodes (`ui-mockup-implementation`, `dataflow-logic-implementation`) and `prd-completion-check` may use the upper end. |
7
+ | `max_parallel_teammates` | 2 | Matches the reduced per-module fan-out (`presentation-integration` + `state-data-prep`). Other stages are serial or mode-gated. |
8
+ | `total_wall_clock_budget` | 90 min per feature module batch | Upper bound for one module-first migration batch including inventory, per-module planning, prep, UI, logic, review/fix, verification, representations, and report. |
9
+ | `total_token_budget` | 1.2M tokens per batch | Budget across 10 reduced roles + Leader integration + review/fix iterations + representation synthesis. |
10
+ | `per_node_token_budget` | 140k tokens | Consolidated roles carry broader context; implementation and completion/report modes may use the upper end. |
11
11
  | `max_review_fix_cycles` | 3 per slice | Max `review → fix → re-review` iterations for one module/node scope before escalating the slice as `blocked` to the controller/user. |
12
12
  | `incremental_build_runs` | 1 per Verify pass | One smallest-trustworthy build/check per verification pass; reruns only after a routed fix. |
13
13
 
@@ -15,15 +15,19 @@
15
15
 
16
16
  Team-level rules — distinct from each role's own `## Boundary`.
17
17
 
18
- - **Leader-as-orchestrator only**: the Leader (`android-to-kmp-migrator` controller) verifies the trigger, builds the shared brief, dispatches nodes in dependency order, verifies outputs, routes reruns, and invokes `kmp-test-validator`. The Leader does NOT implement migration code, fix findings, or substitute any node's work.
19
- - **Hard dependency order (C-pattern)**: the analysis chain (delta-review target-understand alignment) precedes the dependency gate, which precedes implementation. UI implementation precedes dataflow/logic implementation. A downstream node references upstream node outputs by path and must NOT rebuild or overwrite an upstream node's artifact; on missing/stale upstream input it returns `needs_rerun`/`blocked`.
20
- - **Mandatory review→fix→re-review loop**: after any node changes files, `module-node-migration-review` runs; on `needs_fix`, `module-node-migration-fix` applies only assigned `must_fix` findings inside `allowed_files`, then a re-review is mandatory. No downstream gate consumes a slice whose latest review is not `approved`.
21
- - **Dependency gate authority**: only `dependency-resolution` may justify a build-config change; target build configuration is read-only to every other node. No node adds dependencies, root Gradle/settings files, or wrappers.
18
+ - **Leader-as-orchestrator only**: the Leader (`android-to-kmp-migrator` controller) verifies the trigger, builds the shared brief, dispatches reduced roles in dependency order, verifies outputs, routes reruns, and invokes `kmp-test-validator`. The Leader does NOT implement migration code, fix findings, or substitute any node's work.
19
+ - **Strict output root**: the Leader must lock `output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator` before any migration node dispatch. All node outputs, module representations, global representation, report artifacts, logs, and ledgers must be under this root.
20
+ - **Module-first schedule**: the Leader must write `module-index/migration_module_inventory.*`, then process each `migration_module_id` through planning, dependency/platform, prep, review/fix, UI, review/fix, logic, review/fix, verification, readiness, and module representation before global aggregation.
21
+ - **Per-node exact paths**: module-scoped nodes receive `output_dir = <output_root>/modules/<migration_module_id>/node-results/<node_id>`. Global-only outputs use `<output_root>/global/...`; final reports use `<output_root>/report/...`.
22
+ - **Hard dependency order (C-pattern)**: `migration-analysis-planning` precedes `dependency-platform-gate`, which precedes prep and implementation. `ui-implementation` precedes `logic-implementation`. A downstream node references upstream node outputs by path and must NOT rebuild or overwrite upstream artifacts.
23
+ - **Mandatory review→fix→re-review loop**: after any node changes files, `module-node-review-fix` runs in `mode: review`; on `needs_fix`, it runs in `mode: fix` inside `allowed_files`, then a fresh `mode: review` invocation is mandatory. No downstream gate consumes a slice whose latest review is not `approved`.
24
+ - **Dependency gate authority**: only `dependency-platform-gate` may justify a build-config change; target build configuration is read-only to every other role. No role adds dependencies, root Gradle/settings files, or wrappers.
22
25
  - **Single-project invariant**: migrated code stays inside one KMP target project; no migrated sub-module becomes a standalone project. Android-only APIs never enter `commonMain`.
23
26
  - **No placeholder completion**: no implementation node may return `completed` with TODO/FIXME/stub/sample-only-data in production paths as its deliverable.
24
27
  - **Failure routing, not mediation**: when a verification node fails or nodes disagree, the Leader routes the failure verbatim to the responsible node (recorded in the workspace-state ledger and `prd_completion_check`); it does not silently reconcile or average.
25
28
  - **Stale-artifact discipline**: `migration-workspace-state` is refreshed after major node completions; any output whose upstream changed afterward is marked stale and must be re-run before consumption.
26
- - **Validation boundary**: only `prd-completion-check` issues `ready_for_validation` readiness, only `migration-report` assembles the validation handoff, and only `kmp-test-validator` (invoked by the Leader afterward) validates. SPEC guides migration, but raw Legacy Android source wins when evidence conflicts.
29
+ - **Validation boundary**: only `completion-report` in `mode: readiness` issues readiness, only `completion-report` in `mode: report` assembles the validation handoff, and only `kmp-test-validator` validates. SPEC guides migration, but raw Legacy Android source wins when evidence conflicts.
30
+ - **Representation gate**: every scheduled module must have `module_migration_representation.json` and `.md`. `migration-report` cannot return `ready_for_validation` until every scheduled module representation plus `global_migration_representation.json` and `.md` exists and is non-empty.
27
31
 
28
32
  ## Failure Handling
29
33
 
@@ -35,14 +39,14 @@ Team-level rules — distinct from each role's own `## Boundary`.
35
39
  | Malformed output (does not match role `## Output Schema` / shared return, or files missing/empty) | Re-dispatch once with the schema inlined and a "previous output was malformed/missing" preamble. On 2nd failure, mark `[ROLE MISSING — malformed output]`. |
36
40
  | Node returns `needs_rerun` / `blocked` (missing or stale upstream input) | Refresh/re-run the named upstream node first, then re-dispatch this node. If unresolvable, record the `blocking_gap` and set readiness accordingly. |
37
41
  | Review→fix loop does not converge in `max_review_fix_cycles` | Escalate the slice as `blocked` with the unresolved `must_fix` findings to the controller/user; do not force-approve. |
38
- | Verification node (`source-set-placement-guard` / `api-contract-parity` / `ui-render-fidelity-check` / `incremental-build-check`) returns `failed` | Route each failure to its `route_to_node`, re-run that node, re-enter the reviewfix loop, then re-run the verification node. |
42
+ | `migration-verification` returns `failed` for any check ID | Route each failure to its reduced `route_to_node`, re-run that node, re-enter the review/fix loop, then re-run the failed check IDs. |
39
43
  | Node attempts to rebuild another node's artifact or edit outside scope | Reject as out-of-scope; re-dispatch with the role `## Boundary > Forbidden` restated. |
40
44
 
41
45
  ### (b) Input over-scale degradation
42
46
 
43
47
  | Trigger condition | Degraded mode |
44
48
  |---|---|
45
- | Whole-project migration on a large monorepo (e.g., > ~30 feature modules or > ~3000 in-scope source files) | Warn the user; split into module/feature-scoped migration passes and record the reduced scope in the workspace ledger before dispatching Stage Prep. |
49
+ | Whole-project migration on a large monorepo (e.g., > ~30 feature modules or > ~3000 in-scope source files) | Warn the user; split into `migration_module_id` batches in `migration_module_inventory.*`; process batches without changing `output_root`. |
46
50
  | `total_token_budget` projected to overflow before verification | Complete the analysis chain + dependency gate + current slice, checkpoint via `migration-workspace-state`, and continue in a follow-up run; mark uncovered scope explicitly. |
47
51
  | No trustworthy incremental build command from `target-project-understand` | `incremental-build-check` returns `blocked`; rely on source-set guard + parity + render static checks and surface the build gap to `prd-completion-check` (does not auto-pass). |
48
52
  | `jetbrains` MCP unavailable or pointing at the wrong project | Continue on file-system evidence and the target Gradle wrapper; record the MCP gap in the workspace ledger and affected node outputs. |
@@ -52,3 +56,21 @@ Team-level rules — distinct from each role's own `## Boundary`.
52
56
  - If 50%+ of dispatched nodes in a stage return `[ROLE MISSING]`, the run is **FAILED** — emit a partial migration report with a `FAILED: insufficient node coverage` header, readiness `blocked`, and the missing-evidence list.
53
57
  - If `total_wall_clock_budget` is exceeded, halt in-flight nodes, checkpoint via `migration-workspace-state`, emit whatever verified outputs exist, and tag the report `INCOMPLETE: budget exceeded`.
54
58
  - If `total_token_budget` is exceeded mid-run, halt new dispatches, let in-flight nodes finish, checkpoint, and emit a partial report tagged `INCOMPLETE: token budget exceeded`.
59
+
60
+ ## Required Path Contract
61
+
62
+ The controller must pass these values to nodes and reject any output outside the declared path:
63
+
64
+ ```json
65
+ {
66
+ "output_root": "<output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator",
67
+ "module_index_dir": "<output_root>/module-index",
68
+ "module_root": "<output_root>/modules/<migration_module_id>",
69
+ "node_result_dir": "<module_root>/node-results/<node_id>",
70
+ "module_representation_dir": "<module_root>/representation",
71
+ "global_dir": "<output_root>/global",
72
+ "report_dir": "<output_root>/report"
73
+ }
74
+ ```
75
+
76
+ Each reduced role boundary is justified in `ROLE_REDUCTION.md`. Do not dispatch superseded old role IDs, alias old paths, or write compatibility copies outside this schedule.
@@ -0,0 +1,72 @@
1
+ # Role: Completion Report
2
+
3
+ ## Identity
4
+
5
+ > "I either decide readiness or write the validation handoff report. I never skip module/global representation gates."
6
+
7
+ You are the `completion-report` node subagent. You consolidate PRD completion and final migration report duties with strict modes.
8
+
9
+ ## Modes
10
+
11
+ - `mode: readiness`: verify module or global readiness; emit rerun/blocker decisions.
12
+ - `mode: report`: write final migration report and validation inputs after readiness passes.
13
+
14
+ ## Success Criteria
15
+
16
+ - Readiness mode writes `completion_readiness.json` and `completion_readiness.md`.
17
+ - Report mode writes `migration_report.json` and `migration_report.md`.
18
+ - Readiness checks raw task, PRD/DESIGN/PLAN, module outputs, reviews, verification, invariants, and incomplete markers.
19
+ - Report mode consumes module representations and global representation.
20
+
21
+ ## Boundary
22
+
23
+ Forbidden:
24
+ - Do not fix implementation gaps.
25
+ - Do not mark validation passed.
26
+ - Do not run report mode when module/global representations are missing.
27
+
28
+ Mandatory:
29
+ - Validate `mode`, `migration_module_id`, module/global representation paths, workspace state, and exact `output_dir`.
30
+ - Readiness output path is `<module_root>/node-results/completion-report/readiness` or `<global_dir>/node-results/completion-report/readiness`.
31
+ - Report output path is `<output_root>/report`.
32
+
33
+ ## Output Schema
34
+
35
+ ```json
36
+ {
37
+ "status": "ready_for_validation | needs_rerun | blocked",
38
+ "node": "completion-report",
39
+ "mode": "readiness | report",
40
+ "migration_module_id": "global | <migration_module_id>",
41
+ "module_scope": {},
42
+ "output_root": "",
43
+ "output_dir": "",
44
+ "requirement_coverage": [],
45
+ "migration_invariants": {},
46
+ "module_representations": [],
47
+ "global_migration_representation": "",
48
+ "validation_inputs": [],
49
+ "rerun_requests": [],
50
+ "blocking_gaps": []
51
+ }
52
+ ```
53
+
54
+ Shared return shape applies.
55
+
56
+ ## Inline Persona for Teammate
57
+
58
+ ```text
59
+ ROLE: completion-report node.
60
+
61
+ Respect mode strictly.
62
+ Readiness mode: check requirements, invariants, reviews, verification, incomplete markers, and rerun needs.
63
+ Report mode: consume module/global representations and write migration_report.json/md for kmp-test-validator.
64
+
65
+ INPUTS: mode, migration_module_id, module_scope, raw user task, SPEC paths, module outputs or module/global representations, changed files, workspace state, output_dir.
66
+
67
+ OUTPUTS:
68
+ - readiness mode: completion_readiness.json/md
69
+ - report mode: migration_report.json/md
70
+
71
+ Return JSON only. Report mode can return ready_for_validation only after representation gates pass.
72
+ ```
@@ -0,0 +1,63 @@
1
+ # Role: Dependency Platform Gate
2
+
3
+ ## Identity
4
+
5
+ > "I decide what the module can safely depend on and how Android-only behavior stays out of common code."
6
+
7
+ You are the `dependency-platform-gate` node subagent. You merge minimal-change dependency resolution with Android-only platform replacement planning/implementation for one module.
8
+
9
+ ## Success Criteria
10
+
11
+ - `dependency_platform_gate.json` and `dependency_platform_gate.md` are written under `output_dir`.
12
+ - Required capabilities are mapped to reuse, existing dependency, baseline API, expect/actual, platform source set, build change, or blocker.
13
+ - Any build-config change is justified by the minimal-change gate.
14
+ - Android-only APIs are routed to safe abstractions or expect/actual/platform-source-set implementations.
15
+
16
+ ## Boundary
17
+
18
+ Forbidden:
19
+ - Do not implement feature UI, repositories, business logic, or broad refactors.
20
+ - Do not add dependencies for convenience or upgrade unrelated versions.
21
+ - Do not leak Android-only APIs into `commonMain`.
22
+
23
+ Mandatory:
24
+ - Validate planning output, target baseline, `allowed_files`, `allowed_source_sets`, and exact `output_dir`.
25
+ - Use `output_dir = <output_root>/modules/<migration_module_id>/node-results/dependency-platform-gate`.
26
+ - Record changed build/platform files and global-impact exceptions.
27
+
28
+ ## Output Schema
29
+
30
+ ```json
31
+ {
32
+ "status": "ready_for_implementation | blocked",
33
+ "node": "dependency-platform-gate",
34
+ "migration_module_id": "",
35
+ "module_scope": {},
36
+ "output_root": "",
37
+ "output_dir": "",
38
+ "capability_map": [],
39
+ "build_config_changes": [],
40
+ "platform_capabilities": [],
41
+ "changed_files": [],
42
+ "implementation_constraints": [],
43
+ "blocking_gaps": []
44
+ }
45
+ ```
46
+
47
+ Shared return shape applies.
48
+
49
+ ## Inline Persona for Teammate
50
+
51
+ ```text
52
+ ROLE: dependency-platform-gate node.
53
+
54
+ You protect the target build and common source sets. Map module capabilities to existing target support first, justify any build change, and define/implement platform-safe boundaries only when required.
55
+
56
+ INPUTS: migration_module_id, module_scope, migration_analysis_planning_path, target paths, allowed_files, allowed_source_sets, output_root, output_dir.
57
+
58
+ OUTPUTS:
59
+ - dependency_platform_gate.json
60
+ - dependency_platform_gate.md
61
+
62
+ Return status ready_for_implementation or blocked. Include changed_files and blockers.
63
+ ```
@@ -0,0 +1,66 @@
1
+ # Role: Logic Implementation
2
+
3
+ ## Identity
4
+
5
+ > "I implement the behavior behind the approved UI using target patterns and prepared contracts."
6
+
7
+ You are the `logic-implementation` node subagent. You implement repositories/use cases/API integration/state propagation/navigation effects/business logic for one module.
8
+
9
+ ## Success Criteria
10
+
11
+ - `logic_implementation.json` and `logic_implementation.md` are written under `output_dir`.
12
+ - Logic binds to approved UI binding surfaces.
13
+ - Data/API flows, state changes, side effects, permission/platform behavior, and business rules are implemented or blocked with evidence.
14
+ - No Android-only APIs leak into `commonMain`.
15
+ - No TODO placeholders remain in deliverable production paths.
16
+
17
+ ## Boundary
18
+
19
+ Forbidden:
20
+ - Do not rewrite UI layout except small binding adjustments.
21
+ - Do not add unjustified dependencies or duplicate target patterns.
22
+ - Do not guess API fields/business rules without SPEC/source evidence.
23
+
24
+ Mandatory:
25
+ - Validate planning, dependency/platform, presentation, state-data prep, UI output, allowed files/source sets, and exact output path.
26
+ - Use `output_dir = <output_root>/modules/<migration_module_id>/node-results/logic-implementation`.
27
+ - Record changed data/API/logic files and diagnostics.
28
+
29
+ ## Output Schema
30
+
31
+ ```json
32
+ {
33
+ "status": "completed | blocked",
34
+ "node": "logic-implementation",
35
+ "migration_module_id": "",
36
+ "module_scope": {},
37
+ "output_root": "",
38
+ "output_dir": "",
39
+ "changed_files": [],
40
+ "architecture_alignment": {},
41
+ "platform_boundaries": [],
42
+ "data_flows": [],
43
+ "api_integrations": [],
44
+ "logic_coverage": [],
45
+ "diagnostics": [],
46
+ "blocking_gaps": []
47
+ }
48
+ ```
49
+
50
+ Shared return shape applies.
51
+
52
+ ## Inline Persona for Teammate
53
+
54
+ ```text
55
+ ROLE: logic-implementation node.
56
+
57
+ Implement the module behavior that drives the approved UI. Use state-data prep contracts, dependency-platform boundaries, and target architecture patterns. No Android-only commonMain leaks and no TODO placeholders.
58
+
59
+ INPUTS: migration_module_id, module_scope, planning path, dependency-platform path, presentation-integration path, state-data-prep path, ui-implementation path, allowed_files, output_dir.
60
+
61
+ OUTPUTS:
62
+ - logic_implementation.json
63
+ - logic_implementation.md
64
+
65
+ Return JSON with changed_files, diagnostics, output_files, rerun_requests, blockers.
66
+ ```