@code-migration/wow-migrator 0.1.3 → 0.1.5
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.
- package/package.json +1 -1
- package/skills/android-project-analyst/SKILL.md +69 -46
- package/skills/android-project-analyst/bind.md +10 -5
- package/skills/android-project-analyst/dependencies.yaml +66 -10
- package/skills/android-project-analyst/output-contract.md +357 -0
- package/skills/android-project-analyst/roles/analysis-workspace-state.md +25 -8
- package/skills/android-project-analyst/roles/behavior-logic.md +6 -2
- package/skills/android-project-analyst/roles/data-contract-flow.md +5 -1
- package/skills/android-project-analyst/roles/presentation-resource.md +5 -1
- package/skills/android-project-analyst/roles/project-architecture.md +5 -1
- package/skills/android-project-analyst/workflow.md +75 -29
- package/skills/android-to-kmp-migrator/SKILL.md +62 -142
- package/skills/android-to-kmp-migrator/bind.md +29 -67
- package/skills/android-to-kmp-migrator/dependencies.yaml +72 -11
- package/skills/android-to-kmp-migrator/output-contract.md +318 -0
- package/skills/android-to-kmp-migrator/roles/completion-report.md +3 -1
- package/skills/android-to-kmp-migrator/roles/global-migration-phase.md +87 -0
- package/skills/android-to-kmp-migrator/roles/migration-planning-gate.md +75 -0
- package/skills/android-to-kmp-migrator/roles/migration-prep.md +75 -0
- package/skills/android-to-kmp-migrator/roles/migration-verification.md +44 -26
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +16 -8
- package/skills/android-to-kmp-migrator/roles/module-implementation.md +82 -0
- package/skills/android-to-kmp-migrator/roles/target-project-assistant.md +104 -0
- package/skills/android-to-kmp-migrator/workflow.md +85 -224
- package/skills/kmp-test-validator/SKILL.md +52 -85
- package/skills/kmp-test-validator/bind.md +30 -56
- package/skills/kmp-test-validator/dependencies.yaml +101 -9
- package/skills/kmp-test-validator/output-contract.md +166 -0
- package/skills/kmp-test-validator/roles/validation-business-testing.md +83 -0
- package/skills/kmp-test-validator/roles/validation-code-gate.md +116 -0
- package/skills/kmp-test-validator/roles/validation-fidelity-gate.md +118 -0
- package/skills/kmp-test-validator/roles/validation-report.md +23 -14
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +5 -2
- package/skills/kmp-test-validator/workflow.md +60 -115
- package/skills/migration-task-adapter/SKILL.md +64 -93
- package/skills/migration-task-adapter/bind.md +27 -91
- package/skills/migration-task-adapter/dependencies.yaml +21 -10
- package/skills/migration-task-adapter/output-contract.md +276 -0
- package/skills/migration-task-adapter/roles/adapter-report.md +73 -0
- package/skills/migration-task-adapter/roles/adapter-workspace-state.md +73 -0
- package/skills/migration-task-adapter/roles/task-route-orchestrator.md +106 -0
- package/skills/migration-task-adapter/workflow.md +76 -142
- package/skills/android-project-analyst/MIGRATION.md +0 -67
- package/skills/android-to-kmp-migrator/MIGRATION.md +0 -129
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +0 -68
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +0 -71
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +0 -70
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +0 -70
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +0 -68
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +0 -69
- package/skills/kmp-test-validator/MIGRATION.md +0 -84
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +0 -72
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +0 -72
- package/skills/kmp-test-validator/roles/validation-remediation.md +0 -117
- package/skills/kmp-test-validator/roles/validation-test-runner.md +0 -67
- package/skills/migration-task-adapter/MIGRATION.md +0 -49
- package/skills/migration-task-adapter/roles/task-reporter.md +0 -134
- package/skills/migration-task-adapter/roles/task-understanding-router.md +0 -139
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +0 -145
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +0 -198
|
@@ -1,246 +1,107 @@
|
|
|
1
|
-
# Workflow:
|
|
1
|
+
# Workflow: Analyst P6 → module-first migration → kmp-test-validator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
See [output-contract.md](output-contract.md) and active role IDs in [SKILL.md](SKILL.md).
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
graph TD
|
|
9
|
-
L0[
|
|
10
|
-
|
|
11
|
-
INV --> WS[migration-workspace-state
|
|
12
|
-
WS -->
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
L0[Pre-flight deps] --> UP[Verify analyst P6]
|
|
10
|
+
UP --> INV[migration inventory]
|
|
11
|
+
INV --> WS[migration-workspace-state]
|
|
12
|
+
WS --> TPA0[target-project-assistant global_baseline]
|
|
13
|
+
TPA0 --> LOOP[For each migration_module_id]
|
|
14
|
+
|
|
15
|
+
subgraph MOD[Per-module pipeline]
|
|
16
|
+
TPA1[target-project-assistant module_anchors]
|
|
17
|
+
TPA1 --> PG[migration-planning-gate]
|
|
18
|
+
PG --> PREP[migration-prep]
|
|
19
|
+
PREP --> RF1[review/fix]
|
|
20
|
+
RF1 --> UI[module-implementation mode ui]
|
|
21
|
+
UI --> RF2[review/fix]
|
|
22
|
+
RF2 --> LOGIC[module-implementation mode logic]
|
|
23
|
+
LOGIC --> RF3[review/fix]
|
|
24
|
+
RF3 --> VER[migration-verification]
|
|
25
|
+
VER --> MCR[module_completion_record]
|
|
26
|
+
MCR --> READY[completion-report readiness]
|
|
27
|
+
READY --> MODREP[module_migration_representation]
|
|
20
28
|
end
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
READY -->|needs_rerun| RESP
|
|
32
|
-
READY -->|ready_for_validation| MODREP[module_migration_representation.*]
|
|
33
|
-
MODREP --> ALL{all modules represented?}
|
|
34
|
-
ALL -- No --> LOOP
|
|
35
|
-
ALL -- Yes --> GLOB[global_migration_representation.*]
|
|
36
|
-
GLOB --> REPORT[completion-report<br/>mode report]
|
|
37
|
-
REPORT --> KV[kmp-test-validator]
|
|
30
|
+
LOOP --> MOD
|
|
31
|
+
MOD --> M4{Package M4?}
|
|
32
|
+
M4 -- No --> LOOP
|
|
33
|
+
M4 -- Yes --> GMP1[global-migration-phase mode integrate]
|
|
34
|
+
GMP1 --> GMP2[global-migration-phase mode align]
|
|
35
|
+
GMP2 -->|needs_rerun| LOOP
|
|
36
|
+
GMP2 -->|passed| GLOB[global_migration_representation]
|
|
37
|
+
GLOB --> REPORT[completion-report report]
|
|
38
|
+
REPORT --> KV[kmp-test-validator V0]
|
|
38
39
|
```
|
|
39
40
|
|
|
40
|
-
##
|
|
41
|
+
## Step 0 — Pre-flight
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
node_result_dir = <module_root>/node-results/<node_id>
|
|
47
|
-
module_representation_dir = <module_root>/representation
|
|
48
|
-
global_dir = <output_root>/global
|
|
49
|
-
report_dir = <output_root>/report
|
|
50
|
-
```
|
|
43
|
+
- **Executor**: Leader
|
|
44
|
+
- **Input**: [dependencies.yaml](dependencies.yaml) — `tools[]` (`rg`, `git`, `curl`), `optional_mcp.jetbrains`, `upstream_inputs` analyst **P6**
|
|
45
|
+
- **Output**: `run_manifest.json` → `dependency_preflight` (CLI status, MCP availability, P6 readiness pointer)
|
|
46
|
+
- **Gate**: missing CLI tools → degraded modes per dependencies.yaml; analyst P6 not ready → **blocked** before module dispatch
|
|
51
47
|
|
|
52
|
-
##
|
|
48
|
+
## Step 1 — Upstream + output root
|
|
53
49
|
|
|
54
|
-
|
|
50
|
+
- Verify analyst package **P6**; write `upstream_analyst_index.json`.
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
- **Input**: [dependencies.yaml](dependencies.yaml)
|
|
58
|
-
- **Action**: check optional tools (`rg`, `git`, `curl`) and report degraded behavior.
|
|
59
|
-
- **Output**: pre-flight status recorded in `run_manifest.json` and later workspace-state artifacts.
|
|
60
|
-
- **Gate**: missing optional tools do not skip nodes; the controller records degraded evidence.
|
|
52
|
+
## Step 2 — Migration inventory
|
|
61
53
|
|
|
62
|
-
|
|
54
|
+
- `migration_module_inventory.*`, `modules_migration_index.json`, per-module `module_brief.json`.
|
|
63
55
|
|
|
64
|
-
|
|
65
|
-
- **Input**: `legacy_android_project_path` or completed SPEC, `kmp_target_project_path`, `migration_scope`, optional `output_dir`
|
|
66
|
-
- **Action**: verify migration trigger, verify analyst completion, lock `output_root`, write `<output_root>/run_manifest.json`.
|
|
67
|
-
- **Output**: `<output_root>/run_manifest.json` containing Android/SPEC inputs, KMP target path, migration scope, output root, allowed roots, dependency-preflight status, schedule version, and timestamp.
|
|
68
|
-
- **Gate**: stop if target is not KMP-compatible or analyst completion is missing/stale.
|
|
56
|
+
## Step 3 — Workspace state
|
|
69
57
|
|
|
70
|
-
|
|
58
|
+
- Init ledger; track handoff gates **M0**–**V0**.
|
|
71
59
|
|
|
72
|
-
|
|
73
|
-
- **Action**: divide the requested migration into deterministic `migration_module_id` slices.
|
|
74
|
-
- **Output**:
|
|
75
|
-
- `<module_index_dir>/migration_module_inventory.json`: module ids/order, scope slices, target placement hints, allowed files/source sets, module output roots, blockers.
|
|
76
|
-
- `<module_index_dir>/migration_module_inventory.md`: agent-readable module schedule and boundary evidence.
|
|
77
|
-
- `<module_root>/module_brief.json` for every scheduled module: module dispatch contract, evidence paths, role hints, allowed files/source sets, assumptions.
|
|
78
|
-
- **Gate**: every module has `module_scope`, UI/logic/data/resource scope, target placement hints, `allowed_target_files`, and `allowed_source_sets`.
|
|
79
|
-
|
|
80
|
-
### Step 3 — Workspace State
|
|
81
|
-
|
|
82
|
-
- **Executor**: `migration-workspace-state`
|
|
83
|
-
- **Input**: migration module inventory, module briefs, node outputs, changed files, planning outputs, implementation outputs, review outputs, verification outputs, representation outputs, source change/timestamp evidence, rerun reports, blockers.
|
|
84
|
-
- **Action**: initialize and refresh a progress ledger. Track per-module current stage, stage status, planned/completed work units, `finish_rate`, changed-file ownership, plan-vs-code gaps, stale outputs, rerun hooks, blockers, and next safe actions.
|
|
85
|
-
- **Output**:
|
|
86
|
-
- `<global_dir>/node-results/migration-workspace-state/migration_workspace_state.json`, `.md`: global/module progress ledger, aggregate finish rate, stale/blocked modules, rerun hooks.
|
|
87
|
-
- `<module_root>/node-results/migration-workspace-state/migration_workspace_state.json`, `.md`: module stage status, finish rate, changed-file ownership, plan-vs-code gaps, stale outputs, rerun hooks.
|
|
88
|
-
- **Gate**: stale upstream outputs, failed stages, missing review/verification, or non-empty `rerun_hooks` must be routed before downstream consumption. A downstream stage may consume a module only when the latest module progress record marks its required upstream stages fresh and usable.
|
|
89
|
-
|
|
90
|
-
### Workspace State Refresh Points
|
|
91
|
-
|
|
92
|
-
The Leader refreshes `migration-workspace-state` after each major stage, and before any downstream role consumes newly produced artifacts:
|
|
93
|
-
|
|
94
|
-
| Refresh point | Required progress evidence |
|
|
95
|
-
|---|---|
|
|
96
|
-
| After module inventory | module list, module briefs, planned stage schedule |
|
|
97
|
-
| After planning | planned work units, source-to-target map, expected artifacts |
|
|
98
|
-
| After dependency/platform gate | dependency/platform readiness and blockers |
|
|
99
|
-
| After prep fan-out | presentation/state-data prep outputs and changed-file ownership |
|
|
100
|
-
| After every review/fix/re-review | latest review status, fix ownership, unresolved findings |
|
|
101
|
-
| After UI implementation | UI coding artifacts, plan coverage, review hook if needed |
|
|
102
|
-
| After logic implementation | logic coding artifacts, plan coverage, review hook if needed |
|
|
103
|
-
| After verification | check status, failed check routing, verification-required gaps |
|
|
104
|
-
| After readiness/module representation | module status and representation artifacts |
|
|
105
|
-
| After global representation/report | aggregate finish rate, stale module list, validation handoff readiness |
|
|
106
|
-
|
|
107
|
-
### Step 4 — Module Analysis And Planning
|
|
108
|
-
|
|
109
|
-
- **Executor**: `migration-analysis-planning`
|
|
110
|
-
- **Input**: module brief, SPEC paths, analyst artifacts, target path, workspace state
|
|
111
|
-
- **Action**: verify SPEC/raw-source deltas, capture target KMP context/reuse inventory, produce source-to-target map and ordered implementation plan.
|
|
112
|
-
- **Output**: `<module_root>/node-results/migration-analysis-planning/migration_analysis_planning.json`, `.md`. The artifacts must contain SPEC/raw-source deltas, target KMP evidence, reuse inventory, source-to-target map, resource project map, integration scaffold, ordered implementation tasks, blockers.
|
|
113
|
-
- **Gate**: target KMP evidence and source-to-target map must exist before dependency/platform work.
|
|
114
|
-
- **Workspace-state update**: record planned work units and initial `finish_rate` basis. If the plan is incomplete, `migration-workspace-state` emits a rerun hook to `migration-analysis-planning`.
|
|
115
|
-
|
|
116
|
-
### Step 5 — Dependency And Platform Gate
|
|
117
|
-
|
|
118
|
-
- **Executor**: `dependency-platform-gate`
|
|
119
|
-
- **Input**: planning output, target baseline, allowed files/source sets
|
|
120
|
-
- **Action**: apply minimal-change dependency gate and define/implement safe platform boundaries when required.
|
|
121
|
-
- **Output**: `<module_root>/node-results/dependency-platform-gate/dependency_platform_gate.json`, `.md`. The artifacts must contain capability map, dependency/build decisions, platform capability boundaries, expect/actual/source-set plan, changed files, implementation constraints, blockers.
|
|
122
|
-
- **Gate**: returns `ready_for_implementation` or `blocked`; no prep/implementation proceeds on blocked platform/dependency capability.
|
|
123
|
-
- **Workspace-state update**: record dependency/platform stage status and pause downstream consumers when blocked.
|
|
124
|
-
|
|
125
|
-
### Step 6 — Prep Fan-Out
|
|
126
|
-
|
|
127
|
-
- **Executors**: `presentation-integration`, `state-data-prep`
|
|
128
|
-
- **Action**:
|
|
129
|
-
- `presentation-integration`: theme tokens, resource migration/modeling, navigation routes.
|
|
130
|
-
- `state-data-prep`: state holders, models, mappers, API/data expectations, logic handoff.
|
|
131
|
-
- **Output**:
|
|
132
|
-
- `<module_root>/node-results/presentation-integration/presentation_integration.json`, `.md`: token/component/resource/media/route mappings, UI handoff, changed files, presentation gaps.
|
|
133
|
-
- `<module_root>/node-results/state-data-prep/state_data_prep.json`, `.md`: state holders, UI state/events/effects, model/mappers, API/data contract expectations, logic handoff, changed files.
|
|
134
|
-
- **Gate**: every file-changing prep slice enters review/fix before UI or logic consumes it.
|
|
135
|
-
- **Workspace-state update**: record changed-file ownership and plan-vs-code gaps for prep outputs; emit review rerun hooks when file-changing slices lack review approval.
|
|
136
|
-
|
|
137
|
-
### Step 7 — Review/Fix Loop
|
|
138
|
-
|
|
139
|
-
- **Executor**: `module-node-review-fix`
|
|
140
|
-
- **Modes**:
|
|
141
|
-
- `review`: read-only review of one module/node slice.
|
|
142
|
-
- `fix`: scoped edit of explicit `must_fix` findings inside `allowed_files`.
|
|
143
|
-
- **Gate**: every fix must be followed by a fresh review. Downstream nodes may consume only slices whose latest review is `approved`.
|
|
144
|
-
- **Output**:
|
|
145
|
-
- Review mode: `<module_root>/node-results/module-node-review-fix/<owning_node>/review/module_node_review.json`, `.md` with read-only findings, reviewed files, approval/needs-fix status, blockers.
|
|
146
|
-
- Fix mode: `<module_root>/node-results/module-node-review-fix/<owning_node>/fix/module_node_fix.json`, `.md` with fixed/unfixed findings, changed files, `requires_re_review: true`, blockers.
|
|
147
|
-
- **Workspace-state update**: record review status by owner node and planned work unit. `needs_fix` and missing re-review produce rerun hooks.
|
|
148
|
-
|
|
149
|
-
### Step 8 — UI Implementation
|
|
150
|
-
|
|
151
|
-
- **Executor**: `ui-implementation`
|
|
152
|
-
- **Action**: implement visible UI surface first, including states/resources and binding surfaces.
|
|
153
|
-
- **Output**: `<module_root>/node-results/ui-implementation/ui_implementation.json`, `.md` with changed UI/resource files, UI coverage, fidelity notes, binding surfaces, diagnostics, blockers.
|
|
154
|
-
- **Gate**: UI output is reviewed/approved before logic implementation.
|
|
155
|
-
- **Workspace-state update**: record UI implementation progress, changed files, missing planned UI work, unplanned UI changes, and required review hooks.
|
|
156
|
-
|
|
157
|
-
### Step 9 — Logic Implementation
|
|
158
|
-
|
|
159
|
-
- **Executor**: `logic-implementation`
|
|
160
|
-
- **Action**: implement repositories/use cases/API integration/business logic bound to approved UI surfaces.
|
|
161
|
-
- **Output**: `<module_root>/node-results/logic-implementation/logic_implementation.json`, `.md` with changed logic/data/API files, architecture alignment, platform boundaries, data flows, API integrations, logic coverage, diagnostics, blockers.
|
|
162
|
-
- **Gate**: logic output is reviewed/approved before verification.
|
|
163
|
-
- **Workspace-state update**: record logic implementation progress, changed files, missing planned logic work, unplanned logic changes, and required review hooks.
|
|
164
|
-
|
|
165
|
-
### Step 10 — Verification
|
|
166
|
-
|
|
167
|
-
- **Executor**: `migration-verification`
|
|
168
|
-
- **Required `check_ids`**:
|
|
169
|
-
- `source_set`
|
|
170
|
-
- `api_contract`
|
|
171
|
-
- `ui_render`
|
|
172
|
-
- `incremental_build`
|
|
173
|
-
- **Output**: `<module_root>/node-results/migration-verification/migration_verification.json`, `.md`, plus log files when commands run. The artifacts must contain stable `check_results`, evidence, failures, routed owner nodes, command/log paths, blockers.
|
|
174
|
-
- **Gate**: failures route to the responsible reduced role and re-enter review/fix.
|
|
175
|
-
- **Workspace-state update**: record verification status, failed check ids, `route_to_node`, and rerun hooks that pause readiness until resolved.
|
|
176
|
-
|
|
177
|
-
### Step 11 — Readiness And Module Representation
|
|
178
|
-
|
|
179
|
-
- **Executor**: `completion-report` in `mode: readiness`, then Leader
|
|
180
|
-
- **Action**: decide module readiness; write module representation.
|
|
181
|
-
- **Output**:
|
|
182
|
-
- `<module_root>/node-results/completion-report/readiness/completion_readiness.json`, `.md`: requirement coverage, invariants, review/verification status, rerun requests, blockers.
|
|
183
|
-
- `<module_representation_dir>/module_migration_representation.json`: machine synthesis of verified module migration outputs, changed files by role, coverage, gaps, evidence.
|
|
184
|
-
- `<module_representation_dir>/module_migration_representation.md`: agent-readable module migration handoff and traceability.
|
|
185
|
-
- **Gate**: blocked modules still write a representation with blockers.
|
|
186
|
-
- **Workspace-state update**: record module representation artifacts, final module finish rate, and remaining blockers without issuing the final report verdict.
|
|
187
|
-
|
|
188
|
-
### Step 12 — Global Representation
|
|
60
|
+
## Step 4 — Target project assistant (global)
|
|
189
61
|
|
|
190
|
-
-
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"validation_inputs": [],
|
|
230
|
-
"limitations": [],
|
|
231
|
-
"manual_steps": [],
|
|
232
|
-
"blocking_gaps": []
|
|
233
|
-
}
|
|
234
|
-
```
|
|
62
|
+
- `mode: global_baseline` → `target_alignment_revision.*`
|
|
63
|
+
|
|
64
|
+
## Step 5 — Per-module pipeline
|
|
65
|
+
|
|
66
|
+
| Step | Role | Notes |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| 5a | TPA `module_anchors` | Package **M2** per module |
|
|
69
|
+
| 5b | `migration-planning-gate` | Planning + dep/platform in one pass |
|
|
70
|
+
| 5c | `migration-prep` | Presentation + state/data in one pass |
|
|
71
|
+
| 5d | `module-node-review-fix` | After prep if file-changing |
|
|
72
|
+
| 5e | `module-implementation` `ui` | Then review/fix |
|
|
73
|
+
| 5f | `module-implementation` `logic` | After UI approved; then review/fix |
|
|
74
|
+
| 5g | `migration-verification` | Static + restoration; **no full build** |
|
|
75
|
+
| 5h | Leader | `module_completion_record.json` |
|
|
76
|
+
| 5i | `completion-report` `readiness` + module representation | Package **M3** |
|
|
77
|
+
|
|
78
|
+
Repeat until package **M4**.
|
|
79
|
+
|
|
80
|
+
## Step 6 — Global migration phase
|
|
81
|
+
|
|
82
|
+
### 6a Integrate
|
|
83
|
+
|
|
84
|
+
- **Role**: `global-migration-phase` `mode: integrate`
|
|
85
|
+
- **Output**: `global-migration-phase/integrate/global_system_integration.*`
|
|
86
|
+
- **Gate**: package **M5**
|
|
87
|
+
|
|
88
|
+
### 6b Align
|
|
89
|
+
|
|
90
|
+
- **Role**: `global-migration-phase` `mode: align`
|
|
91
|
+
- **Output**: `global-migration-phase/align/post_integration_alignment.*`, `report/alignment_report.*`
|
|
92
|
+
- **Gate**: package **M6**; `needs_rerun` → module loop or re-integrate
|
|
93
|
+
|
|
94
|
+
## Step 7 — Report + validator
|
|
95
|
+
|
|
96
|
+
- Global representation + `completion-report` `report` → package **V0** → `kmp-test-validator`
|
|
97
|
+
|
|
98
|
+
## TPA consult
|
|
99
|
+
|
|
100
|
+
Any target question → TPA `mode: consult` (append `consultation_log`).
|
|
235
101
|
|
|
236
102
|
## Acceptance Criteria
|
|
237
103
|
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
-
-
|
|
242
|
-
- Review/fix invocations are separate: `review` -> optional `fix` -> fresh `review`.
|
|
243
|
-
- Verification uses stable `check_ids` and routes failures to reduced role IDs.
|
|
244
|
-
- No Android-only API leaks into `commonMain`; dependency changes pass the minimal-change gate.
|
|
245
|
-
- `global_migration_representation.*` exists before report mode.
|
|
246
|
-
- `kmp-test-validator` is invoked only after `completion-report` report mode returns `ready_for_validation`.
|
|
104
|
+
- Dispatch only role IDs from `SKILL.md`.
|
|
105
|
+
- Mode rules: `ui` before `logic`; `integrate` before `align`; `review`/`fix` separate.
|
|
106
|
+
- `migration-verification` never runs `incremental_build`.
|
|
107
|
+
- `handoff_gates` match output-contract.
|
|
@@ -1,139 +1,108 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kmp-test-validator
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
Use with the kmp-test-validator controller after android-to-kmp-migrator has produced
|
|
4
|
+
Swarm Skill pipeline that validates Android-to-KMP migration output: workspace ledger, fidelity gate (trust + restoreability modes), code gate (build + fix modes), optional business testing (behavioral + Figma UI submodules), and final validation report.
|
|
5
|
+
Use with the kmp-test-validator controller after android-to-kmp-migrator has produced validation-ready package V0, or when given Android source/SPEC plus a KMP target for migrated behavior validation.
|
|
6
6
|
Do NOT use for generic KMP testing, KMP-only feature work, isolated Gradle troubleshooting, Android analysis, or non-migration refactors.
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.5"
|
|
8
8
|
kind: swarm-skill
|
|
9
9
|
disable-model-invocation: true
|
|
10
10
|
roles:
|
|
11
11
|
- id: validation-workspace-state
|
|
12
12
|
kind: ai_agent
|
|
13
|
-
purpose: Validation ledger — node status,
|
|
13
|
+
purpose: Validation ledger — node status, handoff gates VG0–VG5, supplement/remediation cycle counts, stale inputs, blockers. No audit, build, fix, or verdict.
|
|
14
14
|
skills: []
|
|
15
15
|
tools: [git]
|
|
16
|
-
- id: validation-
|
|
16
|
+
- id: validation-fidelity-gate
|
|
17
17
|
kind: ai_agent
|
|
18
|
-
purpose:
|
|
18
|
+
purpose: Fidelity gate — mode trust (pre-build Android/SPEC vs KMP) or restoreability (post-build module/function audit, migrator supplement routing). Read-only.
|
|
19
19
|
skills: []
|
|
20
20
|
tools: [rg, git]
|
|
21
|
-
- id: validation-
|
|
21
|
+
- id: validation-code-gate
|
|
22
22
|
kind: ai_agent
|
|
23
|
-
purpose:
|
|
23
|
+
purpose: Code gate — mode build (3-scenario compile/preview) or fix (error DB or model, restoreability-preserving edits). Only fix mode edits production code.
|
|
24
24
|
skills: []
|
|
25
25
|
tools: [rg, git]
|
|
26
|
-
- id: validation-
|
|
26
|
+
- id: validation-business-testing
|
|
27
27
|
kind: ai_agent
|
|
28
|
-
purpose:
|
|
29
|
-
skills: []
|
|
30
|
-
tools: [rg, git]
|
|
31
|
-
- id: validation-remediation
|
|
32
|
-
kind: ai_agent
|
|
33
|
-
purpose: Scoped target fixes — fix confirmed target KMP failures inside allowed files and emit required reruns.
|
|
28
|
+
purpose: Optional business testing — behavioral submodule (user test cases) and ui_comparison submodule (Figma) after VG3.
|
|
34
29
|
skills: []
|
|
35
30
|
tools: [rg, git]
|
|
36
31
|
- id: validation-report
|
|
37
32
|
kind: ai_agent
|
|
38
|
-
purpose: Final verdict synthesis — passed/failed/blocked from verified fidelity,
|
|
33
|
+
purpose: Final verdict synthesis — passed/failed/blocked from verified fidelity, code-gate, business-testing, and fix evidence.
|
|
39
34
|
skills: []
|
|
40
35
|
tools: [git]
|
|
41
36
|
---
|
|
42
37
|
|
|
43
38
|
# KMP Test Validator Swarm Skill
|
|
44
39
|
|
|
45
|
-
This is the agent-facing registry and team definition for the `kmp-test-validator` controller. It validates Android-to-KMP migration output against Android source and
|
|
40
|
+
This is the agent-facing registry and team definition for the `kmp-test-validator` controller. It validates Android-to-KMP migration output against Android source, analyst SPEC, and migrator artifacts.
|
|
41
|
+
|
|
42
|
+
The team is a **serial pipeline with two controller loops**: code-gate fix remediation and migrator supplement.
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
**Canonical file recording system**: [output-contract.md](output-contract.md) defines paths, migrator `V0` inputs, handoff gates `VG0`–`VG5`, and mode contracts. The Leader MUST read `output-contract.md` before the first dispatch.
|
|
48
45
|
|
|
49
46
|
## Protocol Summary
|
|
50
47
|
|
|
51
|
-
0. **Pre-flight** —
|
|
52
|
-
1. **
|
|
53
|
-
2. **
|
|
54
|
-
3. **
|
|
55
|
-
4. **
|
|
56
|
-
5. **
|
|
57
|
-
6. **Final report** —
|
|
48
|
+
0. **Pre-flight** — [dependencies.yaml](dependencies.yaml); verify migrator `V0`; lock output root.
|
|
49
|
+
1. **Workspace state** — ledger + `handoff_gates`.
|
|
50
|
+
2. **Fidelity gate `trust`** — migration trigger + pre-build fidelity (`VG1`).
|
|
51
|
+
3. **Code gate `build`** — three-scenario compile + build/preview (`VG2`); on failure → code gate `fix` → rerun `build` (max 3 cycles).
|
|
52
|
+
4. **Fidelity gate `restoreability`** — post-build restoreability (`VG3`); migrator supplement loop (max 3) when required.
|
|
53
|
+
5. **Business testing** — optional behavioral / Figma submodules when user inputs exist (`VG4`).
|
|
54
|
+
6. **Final report** — `validation-report` (`VG5`).
|
|
58
55
|
|
|
59
56
|
## Roles
|
|
60
57
|
|
|
61
|
-
| id |
|
|
58
|
+
| id | Modes | Role file |
|
|
62
59
|
|---|---|---|
|
|
63
|
-
| `validation-workspace-state` |
|
|
64
|
-
| `validation-
|
|
65
|
-
| `validation-
|
|
66
|
-
| `validation-
|
|
67
|
-
| `validation-
|
|
68
|
-
| `validation-report` | Final verdict synthesis | [roles/validation-report.md](roles/validation-report.md) |
|
|
60
|
+
| `validation-workspace-state` | — | [roles/validation-workspace-state.md](roles/validation-workspace-state.md) |
|
|
61
|
+
| `validation-fidelity-gate` | `trust \| restoreability` | [roles/validation-fidelity-gate.md](roles/validation-fidelity-gate.md) |
|
|
62
|
+
| `validation-code-gate` | `build \| fix` | [roles/validation-code-gate.md](roles/validation-code-gate.md) |
|
|
63
|
+
| `validation-business-testing` | `behavioral \| ui_comparison` submodules | [roles/validation-business-testing.md](roles/validation-business-testing.md) |
|
|
64
|
+
| `validation-report` | — | [roles/validation-report.md](roles/validation-report.md) |
|
|
69
65
|
|
|
70
66
|
## Files
|
|
71
67
|
|
|
72
68
|
| File | What it contains |
|
|
73
69
|
|---|---|
|
|
74
|
-
| [
|
|
75
|
-
| [workflow.md](workflow.md) |
|
|
76
|
-
| [bind.md](bind.md) | Guardrails
|
|
77
|
-
| [
|
|
78
|
-
| [
|
|
70
|
+
| [output-contract.md](output-contract.md) | Canonical paths, V0 upstream, VG0–VG5 gates |
|
|
71
|
+
| [workflow.md](workflow.md) | Pipeline, gates, controller loops |
|
|
72
|
+
| [bind.md](bind.md) | Guardrails and resource limits |
|
|
73
|
+
| [dependencies.yaml](dependencies.yaml) | Upstream V0, optional inputs, MCP, tools |
|
|
74
|
+
| [roles/](roles/) | Role specs |
|
|
79
75
|
|
|
80
76
|
## Strict Output Schedule
|
|
81
77
|
|
|
82
|
-
Validation artifacts must be written parallel to migration artifacts, under a `validation` base location. If the migration run uses a default base like `~/.a2c_agents/migration`, the validator uses the sibling base `~/.a2c_agents/validation`. If a `migration_output_root` is provided, derive the validation base by replacing the `migration` path segment with `validation` when possible; otherwise use `<output_dir or ~/.a2c_agents/validation>`.
|
|
83
|
-
|
|
84
78
|
```text
|
|
85
79
|
output_root = <output_dir or ~/.a2c_agents/validation>/kmp-test-validator
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
test_runner_dir = <output_root>/test-runner
|
|
90
|
-
remediation_dir = <output_root>/remediation
|
|
91
|
-
report_dir = <output_root>/report
|
|
92
|
-
logs_dir = <output_root>/logs
|
|
80
|
+
fidelity_gate_dir = <output_root>/fidelity-gate
|
|
81
|
+
code_gate_dir = <output_root>/code-gate
|
|
82
|
+
business_testing_dir = <output_root>/business-testing
|
|
93
83
|
```
|
|
94
84
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- `<output_root>/run_manifest.json`
|
|
98
|
-
- `<workspace_state_dir>/validation_workspace_state.json`
|
|
99
|
-
- `<workspace_state_dir>/validation_workspace_state.md`
|
|
100
|
-
- `<intake_dir>/validation_intake_fidelity.json`
|
|
101
|
-
- `<intake_dir>/validation_intake_fidelity.md`
|
|
102
|
-
- `<plan_gate_dir>/validation_plan_gate.json`
|
|
103
|
-
- `<plan_gate_dir>/validation_plan_gate.md`
|
|
104
|
-
- `<logs_dir>/plan-gate/*` when build/preview commands run
|
|
105
|
-
- `<test_runner_dir>/validation_test_runner.json`
|
|
106
|
-
- `<test_runner_dir>/validation_test_runner.md`
|
|
107
|
-
- `<logs_dir>/test-runner/*` when tests run
|
|
108
|
-
- `<remediation_dir>/<cycle_id>/validation_remediation.json` and `.md` when fixes run
|
|
109
|
-
- `<report_dir>/kmp_validation_report.json`
|
|
110
|
-
- `<report_dir>/kmp_validation_report.md`
|
|
111
|
-
|
|
112
|
-
No validator artifact may be written inside the migration output root. Migration artifacts are read-only inputs referenced by path.
|
|
85
|
+
See [output-contract.md](output-contract.md) for full layout. No validator artifact inside migration output root.
|
|
113
86
|
|
|
114
87
|
## Output Artifact Content Matrix
|
|
115
88
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
| Stage / owner | Output file(s) | Required content |
|
|
89
|
+
| Owner | Artifacts | Required content |
|
|
119
90
|
|---|---|---|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
| Final verdict / `validation-report` | `kmp_validation_report.json`, `kmp_validation_report.md` | Final `passed | failed | blocked` verdict from verified evidence, fidelity summary, build/preview summary, test statistics, remediation summary, changed files, remaining failures, blockers, report path. |
|
|
127
|
-
|
|
128
|
-
JSON artifacts are the machine-routable source of truth. Markdown artifacts are agent-readable handoffs that preserve exact paths, commands/logs, changed-file ownership, rerun context, blockers, and downstream routing. Node Markdown must not be a prose-only completion summary.
|
|
91
|
+
| Leader | `run_manifest.json`, `upstream_migration_index.json` | V0 verification, dependency preflight |
|
|
92
|
+
| `validation-workspace-state` | `validation_workspace_state.*` | `handoff_gates` VG0–VG5, cycle counts |
|
|
93
|
+
| `validation-fidelity-gate` | `trust/validation_fidelity_trust.*`, `restoreability/validation_restoreability_audit.*` | Pre-build trust or post-build restoreability per mode |
|
|
94
|
+
| `validation-code-gate` | `build/validation_code_build.*`, `fix/<cycle>/validation_code_fix.*`, code-gate logs | Compile scenario + build/preview or fix knowledge + reruns |
|
|
95
|
+
| `validation-business-testing` | `validation_business_testing.*`, logs | Submodule outcomes or explicit skip |
|
|
96
|
+
| `validation-report` | `kmp_validation_report.*` | Evidence-backed final verdict |
|
|
129
97
|
|
|
130
98
|
## Shared Return Contract
|
|
131
99
|
|
|
132
100
|
```json
|
|
133
101
|
{
|
|
134
|
-
"status": "completed | passed | failed | needs_rerun | blocked",
|
|
102
|
+
"status": "completed | passed | failed | needs_rerun | needs_migrator_supplement | blocked",
|
|
135
103
|
"node": "node-name",
|
|
136
|
-
"
|
|
104
|
+
"mode": "trust | restoreability | build | fix",
|
|
105
|
+
"output_dir": "<node output dir>",
|
|
137
106
|
"output_files": [],
|
|
138
107
|
"changed_files": [],
|
|
139
108
|
"stale_upstream_inputs": [],
|
|
@@ -142,12 +111,10 @@ JSON artifacts are the machine-routable source of truth. Markdown artifacts are
|
|
|
142
111
|
}
|
|
143
112
|
```
|
|
144
113
|
|
|
145
|
-
Use `needs_rerun` when a previous role can resolve the gap, `failed` when validation evidence is complete and a behavior/build/test failure remains, and `blocked` when required evidence, command, environment, or user input is missing.
|
|
146
|
-
|
|
147
114
|
## Shared Rules
|
|
148
115
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
116
|
+
- Dispatch only role IDs listed in this registry.
|
|
117
|
+
- Only `validation-code-gate` mode `fix` edits target production code.
|
|
118
|
+
- Fidelity-gate modes are read-only; restoreability routes gaps to migrator supplement.
|
|
119
|
+
- Code-gate `build` uses three compile scenarios only; `fix` uses error DB when configured.
|
|
120
|
+
- Business-testing submodules require user inputs; skipped is not pass-by-omission.
|