@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.
- package/README.md +59 -58
- package/bin/{kmp-skills.js → wow-migrator.js} +65 -17
- package/package.json +16 -8
- package/skills/android-project-analyst/MIGRATION.md +39 -23
- package/skills/android-project-analyst/SKILL.md +54 -44
- package/skills/android-project-analyst/bind.md +22 -14
- package/skills/android-project-analyst/dependencies.yaml +8 -4
- package/skills/android-project-analyst/roles/analysis-workspace-state.md +118 -0
- package/skills/android-project-analyst/roles/behavior-logic.md +163 -0
- package/skills/android-project-analyst/roles/data-contract-flow.md +167 -0
- package/skills/android-project-analyst/roles/presentation-resource.md +296 -0
- package/skills/android-project-analyst/roles/project-architecture.md +171 -0
- package/skills/android-project-analyst/workflow.md +118 -70
- package/skills/android-to-kmp-migrator/MIGRATION.md +61 -1
- package/skills/android-to-kmp-migrator/SKILL.md +96 -134
- package/skills/android-to-kmp-migrator/bind.md +33 -11
- package/skills/android-to-kmp-migrator/roles/completion-report.md +72 -0
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +63 -0
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +66 -0
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +65 -0
- package/skills/android-to-kmp-migrator/roles/migration-verification.md +77 -0
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +13 -1
- package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +74 -0
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +65 -0
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +63 -0
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +64 -0
- package/skills/android-to-kmp-migrator/workflow.md +175 -149
- package/skills/kmp-test-validator/MIGRATION.md +18 -3
- package/skills/kmp-test-validator/SKILL.md +44 -79
- package/skills/kmp-test-validator/bind.md +8 -8
- package/skills/kmp-test-validator/dependencies.yaml +3 -3
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +67 -0
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +66 -0
- package/skills/kmp-test-validator/roles/validation-remediation.md +7 -7
- package/skills/kmp-test-validator/roles/validation-report.md +8 -10
- package/skills/kmp-test-validator/roles/validation-test-runner.md +61 -0
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +2 -2
- package/skills/kmp-test-validator/workflow.md +87 -119
- package/skills/migration-task-adapter/MIGRATION.md +34 -0
- package/skills/migration-task-adapter/SKILL.md +134 -0
- package/skills/migration-task-adapter/bind.md +113 -0
- package/skills/migration-task-adapter/dependencies.yaml +26 -0
- package/skills/migration-task-adapter/roles/task-reporter.md +129 -0
- package/skills/migration-task-adapter/roles/task-understanding-router.md +134 -0
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +140 -0
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +189 -0
- package/skills/migration-task-adapter/workflow.md +183 -0
- package/skills/android-project-analyst/roles/android-ecosystem.md +0 -141
- package/skills/android-project-analyst/roles/api-list.md +0 -136
- package/skills/android-project-analyst/roles/architecture-pattern.md +0 -131
- package/skills/android-project-analyst/roles/data-flow.md +0 -143
- package/skills/android-project-analyst/roles/logic-understand.md +0 -154
- package/skills/android-project-analyst/roles/resource-understand.md +0 -151
- package/skills/android-project-analyst/roles/ui-understand.md +0 -136
- package/skills/android-to-kmp-migrator/roles/api-contract-parity.md +0 -95
- package/skills/android-to-kmp-migrator/roles/dataflow-logic-implementation.md +0 -130
- package/skills/android-to-kmp-migrator/roles/dependency-resolution.md +0 -106
- package/skills/android-to-kmp-migrator/roles/incremental-build-check.md +0 -105
- package/skills/android-to-kmp-migrator/roles/legacy-spec-delta-review.md +0 -104
- package/skills/android-to-kmp-migrator/roles/migration-alignment.md +0 -119
- package/skills/android-to-kmp-migrator/roles/migration-report.md +0 -108
- package/skills/android-to-kmp-migrator/roles/module-node-migration-fix.md +0 -111
- package/skills/android-to-kmp-migrator/roles/module-node-migration-review.md +0 -108
- package/skills/android-to-kmp-migrator/roles/navigation-migration.md +0 -104
- package/skills/android-to-kmp-migrator/roles/platform-api-replacement.md +0 -104
- package/skills/android-to-kmp-migrator/roles/prd-completion-check.md +0 -124
- package/skills/android-to-kmp-migrator/roles/resource-migration.md +0 -109
- package/skills/android-to-kmp-migrator/roles/source-set-placement-guard.md +0 -95
- package/skills/android-to-kmp-migrator/roles/state-model-mapping.md +0 -109
- package/skills/android-to-kmp-migrator/roles/target-project-understand.md +0 -118
- package/skills/android-to-kmp-migrator/roles/theme-design-system-mapping.md +0 -101
- package/skills/android-to-kmp-migrator/roles/ui-mockup-implementation.md +0 -121
- package/skills/android-to-kmp-migrator/roles/ui-render-fidelity-check.md +0 -100
- package/skills/kmp-test-validator/roles/android-kmp-fidelity-audit.md +0 -102
- package/skills/kmp-test-validator/roles/build-preview-gate.md +0 -109
- package/skills/kmp-test-validator/roles/kmp-validation-plan.md +0 -108
- package/skills/kmp-test-validator/roles/test-case-decomposition.md +0 -103
- package/skills/kmp-test-validator/roles/test-execution.md +0 -104
- package/skills/kmp-test-validator/roles/validation-input-contract.md +0 -111
|
@@ -1,167 +1,193 @@
|
|
|
1
|
-
# Workflow: Legacy Android SPEC + target KMP project
|
|
1
|
+
# Workflow: Legacy Android SPEC + target KMP project -> migrated, validation-ready KMP code
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This workflow uses the reduced 10-role module-first migrator. Adjacent responsibilities are consolidated, but gates remain explicit through role modes, check IDs, and exact output paths.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
graph TD
|
|
9
|
-
L0[Leader
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
TH[theme-design-system-mapping]
|
|
21
|
-
RS[resource-migration]
|
|
22
|
-
NV[navigation-migration]
|
|
23
|
-
PA[platform-api-replacement]
|
|
24
|
-
SM[state-model-mapping]
|
|
9
|
+
L0[Leader pre-flight] --> ROOT[LockOutputRoot<br/>run_manifest.json]
|
|
10
|
+
ROOT --> INV[MigrationModuleInventory]
|
|
11
|
+
INV --> WS[migration-workspace-state]
|
|
12
|
+
WS --> LOOP[ForEachMigrationModule]
|
|
13
|
+
LOOP --> PLAN[migration-analysis-planning]
|
|
14
|
+
PLAN --> DP[dependency-platform-gate]
|
|
15
|
+
DP --> PREP
|
|
16
|
+
|
|
17
|
+
subgraph PREP[Prep fan-out]
|
|
18
|
+
PI[presentation-integration]
|
|
19
|
+
SD[state-data-prep]
|
|
25
20
|
end
|
|
26
21
|
|
|
27
|
-
PREP -->
|
|
28
|
-
|
|
29
|
-
UI -->
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
PREP --> RF1{module-node-review-fix<br/>review/fix/re-review}
|
|
23
|
+
RF1 --> UI[ui-implementation]
|
|
24
|
+
UI --> RF2{module-node-review-fix}
|
|
25
|
+
RF2 --> LOGIC[logic-implementation]
|
|
26
|
+
LOGIC --> RF3{module-node-review-fix}
|
|
27
|
+
RF3 --> VER[migration-verification<br/>source_set api_contract ui_render incremental_build]
|
|
28
|
+
VER -->|failed| RESP[Re-dispatch responsible reduced role]
|
|
29
|
+
RESP --> RF1
|
|
30
|
+
VER -->|passed| READY[completion-report<br/>mode readiness]
|
|
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]
|
|
38
|
+
```
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
VER -->|all passed| PC[prd-completion-check]
|
|
44
|
-
PC -- needs_rerun --> RESP
|
|
45
|
-
PC -- blocked --> BLK
|
|
46
|
-
PC -- ready_for_validation --> MR[migration-report]
|
|
47
|
-
MR -- ready_for_validation --> KV[Leader invokes kmp-test-validator]
|
|
48
|
-
MR -- blocked --> BLK
|
|
40
|
+
## Strict Output Roots
|
|
49
41
|
|
|
50
|
-
|
|
42
|
+
```text
|
|
43
|
+
output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator
|
|
44
|
+
module_index_dir = <output_root>/module-index
|
|
45
|
+
module_root = <output_root>/modules/<migration_module_id>
|
|
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
|
|
51
50
|
```
|
|
52
51
|
|
|
53
|
-
The review→fix loop (`RFa/RFb/RFc`) is: `module-node-migration-review` → if `needs_fix`, `module-node-migration-fix` → mandatory re-review → repeat until `approved` or `blocked`. The `migration-workspace-state` ledger is refreshed after major node completions to flag stale upstream artifacts.
|
|
54
|
-
|
|
55
52
|
## Detailed Steps
|
|
56
53
|
|
|
57
|
-
### Step 0 — Pre-flight
|
|
54
|
+
### Step 0 — Pre-flight
|
|
58
55
|
|
|
59
56
|
- **Executor**: Leader
|
|
60
57
|
- **Input**: [dependencies.yaml](dependencies.yaml)
|
|
61
|
-
- **Action**:
|
|
62
|
-
- **
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- **
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- **
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- **
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- **
|
|
90
|
-
- **
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
99
|
-
- **
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- **
|
|
106
|
-
- **
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- **
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- **
|
|
117
|
-
- **
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- **
|
|
125
|
-
- **
|
|
126
|
-
- **
|
|
127
|
-
|
|
128
|
-
### Step
|
|
129
|
-
|
|
130
|
-
- **Executor**: `
|
|
131
|
-
- **
|
|
132
|
-
- **
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- **Output**:
|
|
143
|
-
- **
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- **
|
|
149
|
-
- **
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
58
|
+
- **Action**: check optional tools (`rg`, `git`, `curl`) and report degraded behavior.
|
|
59
|
+
- **Gate**: missing optional tools do not skip nodes; the controller records degraded evidence.
|
|
60
|
+
|
|
61
|
+
### Step 1 — Trigger + Output Root
|
|
62
|
+
|
|
63
|
+
- **Executor**: Leader
|
|
64
|
+
- **Input**: `legacy_android_project_path` or completed SPEC, `kmp_target_project_path`, `migration_scope`, optional `output_dir`
|
|
65
|
+
- **Action**: verify migration trigger, verify analyst completion, lock `output_root`, write `<output_root>/run_manifest.json`.
|
|
66
|
+
- **Gate**: stop if target is not KMP-compatible or analyst completion is missing/stale.
|
|
67
|
+
|
|
68
|
+
### Step 2 — Migration Module Inventory
|
|
69
|
+
|
|
70
|
+
- **Executor**: Leader
|
|
71
|
+
- **Action**: divide the requested migration into deterministic `migration_module_id` slices.
|
|
72
|
+
- **Output**:
|
|
73
|
+
- `<module_index_dir>/migration_module_inventory.json`
|
|
74
|
+
- `<module_index_dir>/migration_module_inventory.md`
|
|
75
|
+
- `<module_root>/module_brief.json` for every scheduled module
|
|
76
|
+
- **Gate**: every module has `module_scope`, UI/logic/data/resource scope, target placement hints, `allowed_target_files`, and `allowed_source_sets`.
|
|
77
|
+
|
|
78
|
+
### Step 3 — Workspace State
|
|
79
|
+
|
|
80
|
+
- **Executor**: `migration-workspace-state`
|
|
81
|
+
- **Output**: `<global_dir>/node-results/migration-workspace-state/migration_workspace_state.*`
|
|
82
|
+
- **Gate**: stale upstream outputs must be rerun before downstream consumption.
|
|
83
|
+
|
|
84
|
+
### Step 4 — Module Analysis And Planning
|
|
85
|
+
|
|
86
|
+
- **Executor**: `migration-analysis-planning`
|
|
87
|
+
- **Input**: module brief, SPEC paths, analyst artifacts, target path, workspace state
|
|
88
|
+
- **Action**: verify SPEC/raw-source deltas, capture target KMP context/reuse inventory, produce source-to-target map and ordered implementation plan.
|
|
89
|
+
- **Output**: `<module_root>/node-results/migration-analysis-planning/migration_analysis_planning.*`
|
|
90
|
+
- **Gate**: target KMP evidence and source-to-target map must exist before dependency/platform work.
|
|
91
|
+
|
|
92
|
+
### Step 5 — Dependency And Platform Gate
|
|
93
|
+
|
|
94
|
+
- **Executor**: `dependency-platform-gate`
|
|
95
|
+
- **Input**: planning output, target baseline, allowed files/source sets
|
|
96
|
+
- **Action**: apply minimal-change dependency gate and define/implement safe platform boundaries when required.
|
|
97
|
+
- **Output**: `<module_root>/node-results/dependency-platform-gate/dependency_platform_gate.*`
|
|
98
|
+
- **Gate**: returns `ready_for_implementation` or `blocked`; no prep/implementation proceeds on blocked platform/dependency capability.
|
|
99
|
+
|
|
100
|
+
### Step 6 — Prep Fan-Out
|
|
101
|
+
|
|
102
|
+
- **Executors**: `presentation-integration`, `state-data-prep`
|
|
103
|
+
- **Action**:
|
|
104
|
+
- `presentation-integration`: theme tokens, resource migration/modeling, navigation routes.
|
|
105
|
+
- `state-data-prep`: state holders, models, mappers, API/data expectations, logic handoff.
|
|
106
|
+
- **Output**:
|
|
107
|
+
- `<module_root>/node-results/presentation-integration/presentation_integration.*`
|
|
108
|
+
- `<module_root>/node-results/state-data-prep/state_data_prep.*`
|
|
109
|
+
- **Gate**: every file-changing prep slice enters review/fix before UI or logic consumes it.
|
|
110
|
+
|
|
111
|
+
### Step 7 — Review/Fix Loop
|
|
112
|
+
|
|
113
|
+
- **Executor**: `module-node-review-fix`
|
|
114
|
+
- **Modes**:
|
|
115
|
+
- `review`: read-only review of one module/node slice.
|
|
116
|
+
- `fix`: scoped edit of explicit `must_fix` findings inside `allowed_files`.
|
|
117
|
+
- **Gate**: every fix must be followed by a fresh review. Downstream nodes may consume only slices whose latest review is `approved`.
|
|
118
|
+
|
|
119
|
+
### Step 8 — UI Implementation
|
|
120
|
+
|
|
121
|
+
- **Executor**: `ui-implementation`
|
|
122
|
+
- **Action**: implement visible UI surface first, including states/resources and binding surfaces.
|
|
123
|
+
- **Gate**: UI output is reviewed/approved before logic implementation.
|
|
124
|
+
|
|
125
|
+
### Step 9 — Logic Implementation
|
|
126
|
+
|
|
127
|
+
- **Executor**: `logic-implementation`
|
|
128
|
+
- **Action**: implement repositories/use cases/API integration/business logic bound to approved UI surfaces.
|
|
129
|
+
- **Gate**: logic output is reviewed/approved before verification.
|
|
130
|
+
|
|
131
|
+
### Step 10 — Verification
|
|
132
|
+
|
|
133
|
+
- **Executor**: `migration-verification`
|
|
134
|
+
- **Required `check_ids`**:
|
|
135
|
+
- `source_set`
|
|
136
|
+
- `api_contract`
|
|
137
|
+
- `ui_render`
|
|
138
|
+
- `incremental_build`
|
|
139
|
+
- **Output**: `<module_root>/node-results/migration-verification/migration_verification.*`
|
|
140
|
+
- **Gate**: failures route to the responsible reduced role and re-enter review/fix.
|
|
141
|
+
|
|
142
|
+
### Step 11 — Readiness And Module Representation
|
|
143
|
+
|
|
144
|
+
- **Executor**: `completion-report` in `mode: readiness`, then Leader
|
|
145
|
+
- **Action**: decide module readiness; write module representation.
|
|
146
|
+
- **Output**:
|
|
147
|
+
- `<module_root>/node-results/completion-report/readiness/completion_readiness.*`
|
|
148
|
+
- `<module_representation_dir>/module_migration_representation.json`
|
|
149
|
+
- `<module_representation_dir>/module_migration_representation.md`
|
|
150
|
+
- **Gate**: blocked modules still write a representation with blockers.
|
|
151
|
+
|
|
152
|
+
### Step 12 — Global Representation
|
|
153
|
+
|
|
154
|
+
- **Executor**: Leader
|
|
155
|
+
- **Input**: all module representations
|
|
156
|
+
- **Output**:
|
|
157
|
+
- `<global_dir>/global_migration_representation.json`
|
|
158
|
+
- `<global_dir>/global_migration_representation.md`
|
|
159
|
+
- **Gate**: final report cannot run until global representation exists and is non-empty.
|
|
160
|
+
|
|
161
|
+
### Step 13 — Final Report And Validation Handoff
|
|
162
|
+
|
|
163
|
+
- **Executor**: `completion-report` in `mode: report`, then Leader
|
|
164
|
+
- **Output**:
|
|
165
|
+
- `<report_dir>/migration_report.json`
|
|
166
|
+
- `<report_dir>/migration_report.md`
|
|
167
|
+
- **Gate**: report mode may return `ready_for_validation` only after module/global representations exist and readiness has passed. Leader invokes `kmp-test-validator` afterward.
|
|
168
|
+
|
|
169
|
+
## Final Report Shape
|
|
154
170
|
|
|
155
171
|
```json
|
|
156
172
|
{
|
|
157
173
|
"status": "ready_for_validation | blocked",
|
|
158
|
-
"migration_scope": "
|
|
159
|
-
"kmp_target_project_path": "
|
|
160
|
-
"legacy_android_project_path": "
|
|
161
|
-
"
|
|
174
|
+
"migration_scope": "",
|
|
175
|
+
"kmp_target_project_path": "",
|
|
176
|
+
"legacy_android_project_path": "",
|
|
177
|
+
"output_root": "",
|
|
178
|
+
"migration_module_inventory": "",
|
|
179
|
+
"module_representations": [],
|
|
180
|
+
"global_migration_representation": "",
|
|
181
|
+
"changed_files_by_role": [],
|
|
162
182
|
"source_to_target_summary": [],
|
|
163
|
-
"coverage_summary": {
|
|
164
|
-
|
|
183
|
+
"coverage_summary": {
|
|
184
|
+
"presentation": "",
|
|
185
|
+
"state_data": "",
|
|
186
|
+
"ui": "",
|
|
187
|
+
"logic": "",
|
|
188
|
+
"platform": "",
|
|
189
|
+
"verification": ""
|
|
190
|
+
},
|
|
165
191
|
"validation_inputs": [],
|
|
166
192
|
"limitations": [],
|
|
167
193
|
"manual_steps": [],
|
|
@@ -171,10 +197,10 @@ The review→fix loop (`RFa/RFb/RFc`) is: `module-node-migration-review` → if
|
|
|
171
197
|
|
|
172
198
|
## Acceptance Criteria
|
|
173
199
|
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
- `
|
|
200
|
+
- Active dispatch uses only the 10 reduced role IDs from `SKILL.md`.
|
|
201
|
+
- Every module has a `module_brief.json`, verified node outputs under `<module_root>/node-results/`, and a module migration representation.
|
|
202
|
+
- Review/fix invocations are separate: `review` -> optional `fix` -> fresh `review`.
|
|
203
|
+
- Verification uses stable `check_ids` and routes failures to reduced role IDs.
|
|
204
|
+
- No Android-only API leaks into `commonMain`; dependency changes pass the minimal-change gate.
|
|
205
|
+
- `global_migration_representation.*` exists before report mode.
|
|
206
|
+
- `kmp-test-validator` is invoked only after `completion-report` report mode returns `ready_for_validation`.
|
|
@@ -11,7 +11,7 @@ Converted from a single controller-support skill (a flat SKILL.md node registry
|
|
|
11
11
|
|
|
12
12
|
The registry separated controller from nodes and encoded the dispatch order, but it did not encode the team as a first-class artifact: no per-role anti-convergence mottos, no `Forbidden`/`Mandatory` boundary blocks the validator could check, no pasteable `Inline Persona` (each of the 9 dispatches re-derived its contract by hand), no Mermaid topology making the pipeline + remediation loop explicit, and no resource/behavioral guardrails (token/wall-clock budgets, `max_remediation_cycles`, degraded modes). The fidelity-before-tests gate, build-before-tests gate, "Android/SPEC is ground truth", and "never invent a command" invariants lived only in prose.
|
|
13
13
|
|
|
14
|
-
## Decomposition
|
|
14
|
+
## Original 0.2 Decomposition
|
|
15
15
|
|
|
16
16
|
- **Pattern: C (specialization pipeline) + remediation loop.**
|
|
17
17
|
- Gate: `validation-input-contract` (refuse non-migration scenarios).
|
|
@@ -38,6 +38,21 @@ The registry separated controller from nodes and encoded the dispatch order, but
|
|
|
38
38
|
| Trigger boundary + controller validation rules | `bind.md` § Behavioral Constraints + SKILL.md § Shared Rules |
|
|
39
39
|
| Optional Android Studio MCP context | SKILL.md § Optional Android Studio MCP Context + per-role Inline Persona MCP inputs |
|
|
40
40
|
|
|
41
|
-
## Team-vs-single
|
|
41
|
+
## Original Team-vs-single Delta
|
|
42
42
|
|
|
43
|
-
The conversion
|
|
43
|
+
The 0.2 conversion preserved every source contract while adding: explicit pipeline + remediation-loop topology with verifiable gates, per-role anti-overlap boundaries that name siblings, self-contained pasteable personas (no re-derivation per dispatch across 9 nodes), resource/token/wall-clock budgets plus a `max_remediation_cycles` bound, failure-routing rules, and concrete degraded modes for missing commands, unsupported previews, and missing MCP.
|
|
44
|
+
|
|
45
|
+
## Role Reduction Refactor (0.3)
|
|
46
|
+
|
|
47
|
+
The current active validator reduces 9 roles to 6. See [ROLE_REDUCTION.md](ROLE_REDUCTION.md).
|
|
48
|
+
|
|
49
|
+
| Old role(s) | Active role |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `validation-workspace-state` | `validation-workspace-state` |
|
|
52
|
+
| `validation-input-contract`, `android-kmp-fidelity-audit` | `validation-intake-fidelity` |
|
|
53
|
+
| `kmp-validation-plan`, `build-preview-gate` | `validation-plan-gate` |
|
|
54
|
+
| `test-case-decomposition`, `test-execution` | `validation-test-runner` |
|
|
55
|
+
| `validation-remediation` | `validation-remediation` |
|
|
56
|
+
| `validation-report` | `validation-report` |
|
|
57
|
+
|
|
58
|
+
The reduction keeps the important gates intact: migration trigger/fidelity trust gate, build-before-tests gate, scoped remediation with mandatory reruns, and report-only final verdict.
|
|
@@ -1,114 +1,84 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kmp-test-validator
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
Use with the kmp-test-validator controller after a migration report
|
|
4
|
+
6-role reduced pipeline Swarm Skill that validates Android-to-KMP migration output: workspace ledger, intake/fidelity trust gate, command/build-preview gate, Android-anchored test runner, scoped remediation, and final validation report.
|
|
5
|
+
Use with the kmp-test-validator controller after android-to-kmp-migrator has produced a validation-ready migration report, 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.3"
|
|
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, changed-file ownership, stale inputs, rerun/blocker history, next actions. No audit, build, or
|
|
13
|
+
purpose: Validation ledger — node status, changed-file ownership, stale inputs, rerun/blocker history, next actions. No audit, build, test, fix, or verdict.
|
|
14
14
|
skills: []
|
|
15
15
|
tools: [git]
|
|
16
|
-
- id: validation-
|
|
16
|
+
- id: validation-intake-fidelity
|
|
17
17
|
kind: ai_agent
|
|
18
|
-
purpose:
|
|
19
|
-
skills: []
|
|
20
|
-
tools: [rg]
|
|
21
|
-
- id: android-kmp-fidelity-audit
|
|
22
|
-
kind: ai_agent
|
|
23
|
-
purpose: Compare Android source/SPEC vs migrated KMP across UI, logic, data flow, control flow before tests are trusted; flag test-trust blockers.
|
|
18
|
+
purpose: Intake and fidelity trust gate — verify migration scenario, normalize brief, compare Android source/SPEC vs KMP, and flag test-trust blockers.
|
|
24
19
|
skills: []
|
|
25
20
|
tools: [rg, git]
|
|
26
|
-
- id:
|
|
27
|
-
kind: ai_agent
|
|
28
|
-
purpose: Discover target structure and resolve trusted build/preview/test commands and scope-to-target mapping. Never invents commands.
|
|
29
|
-
skills: []
|
|
30
|
-
tools: [rg]
|
|
31
|
-
- id: build-preview-gate
|
|
21
|
+
- id: validation-plan-gate
|
|
32
22
|
kind: ai_agent
|
|
33
|
-
purpose:
|
|
23
|
+
purpose: Command and build gate — resolve trusted build/preview/test commands, run build and preview/renderability before behavioral tests, route failures.
|
|
34
24
|
skills: []
|
|
35
|
-
tools: [rg]
|
|
36
|
-
- id: test-
|
|
37
|
-
kind: ai_agent
|
|
38
|
-
purpose: Decompose user tests, SPEC acceptance, and migration validation inputs into atomic Android-anchored cases. No fabricated expectations.
|
|
39
|
-
skills: []
|
|
40
|
-
tools: [rg]
|
|
41
|
-
- id: test-execution
|
|
25
|
+
tools: [rg, git]
|
|
26
|
+
- id: validation-test-runner
|
|
42
27
|
kind: ai_agent
|
|
43
|
-
purpose:
|
|
28
|
+
purpose: Test workflow — decompose validation requirements into atomic Android-anchored cases, execute them through project conventions, capture evidence.
|
|
44
29
|
skills: []
|
|
45
30
|
tools: [rg, git]
|
|
46
31
|
- id: validation-remediation
|
|
47
32
|
kind: ai_agent
|
|
48
|
-
purpose:
|
|
33
|
+
purpose: Scoped target fixes — fix confirmed target KMP failures inside allowed files and emit required reruns.
|
|
49
34
|
skills: []
|
|
50
35
|
tools: [rg, git]
|
|
51
36
|
- id: validation-report
|
|
52
37
|
kind: ai_agent
|
|
53
|
-
purpose:
|
|
38
|
+
purpose: Final verdict synthesis — passed/failed/blocked from verified fidelity, build, preview, test, and remediation evidence. No new tests or fixes.
|
|
54
39
|
skills: []
|
|
55
40
|
tools: [git]
|
|
56
41
|
---
|
|
57
42
|
|
|
58
43
|
# KMP Test Validator Swarm Skill
|
|
59
44
|
|
|
60
|
-
This is the agent-facing registry and team definition for the `kmp-test-validator` controller
|
|
61
|
-
|
|
62
|
-
The team is a **specialization pipeline (C) with a remediation loop**: an input-contract gate, then a fidelity audit before tests are trusted, then a validation plan, a build/preview gate before behavioral tests, test decomposition and execution, a remediation loop back to the gate/tests, and a final report. A single agent attempting validation conflates these stages — it trusts green tests without auditing fidelity, runs behavioral tests before the build compiles, invents build commands, and lets a KMP pass that contradicts Android behavior count as success. Isolating each concern into an owned node with hard gates keeps Android source/SPEC as ground truth and every verdict evidence-backed. The controller (Leader) owns scenario gating, routing, rerun handling, and the final verdict; nodes own bounded validation work.
|
|
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 migration SPEC evidence.
|
|
63
46
|
|
|
64
|
-
|
|
47
|
+
The team is a **reduced serial pipeline with a remediation loop**. Role overlap has been collapsed from 9 role files to 6 role definitions. See [ROLE_REDUCTION.md](ROLE_REDUCTION.md) for the old-to-new map and merge rationale.
|
|
65
48
|
|
|
66
|
-
|
|
49
|
+
## Protocol Summary
|
|
67
50
|
|
|
68
|
-
0. **Pre-flight
|
|
69
|
-
1. **Workspace state** — `validation-workspace-state
|
|
70
|
-
2. **
|
|
71
|
-
3. **
|
|
72
|
-
4. **
|
|
73
|
-
5. **
|
|
74
|
-
6. **
|
|
75
|
-
7. **Test execution** — `test-execution` runs cases via project conventions; a KMP pass that contradicts Android evidence is a failure.
|
|
76
|
-
8. **Remediation loop** — `validation-remediation` fixes confirmed target failures within `allowed_files` and re-runs the affected gate/tests until pass or `blocked` (see [bind.md](bind.md)).
|
|
77
|
-
9. **Final: validation report** — `validation-report` synthesizes the `passed | failed | blocked` verdict. Leader routes non-target failures out; it never fabricates a pass.
|
|
51
|
+
0. **Pre-flight** — check optional dependencies from [dependencies.yaml](dependencies.yaml).
|
|
52
|
+
1. **Workspace state** — initialize `validation-workspace-state`.
|
|
53
|
+
2. **Intake/fidelity trust gate** — run `validation-intake-fidelity`; block non-migration validation and test-trust blockers.
|
|
54
|
+
3. **Plan/build gate** — run `validation-plan-gate`; commands must be trusted, and build/preview must pass before behavioral tests.
|
|
55
|
+
4. **Test workflow** — run `validation-test-runner` when validation cases exist.
|
|
56
|
+
5. **Remediation loop** — run `validation-remediation` only for confirmed target KMP failures, then rerun affected gates/tests.
|
|
57
|
+
6. **Final report** — run `validation-report` to issue `passed | failed | blocked`.
|
|
78
58
|
|
|
79
59
|
## Roles
|
|
80
60
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
| validation-
|
|
86
|
-
| validation-
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
| build-preview-gate | Compile + render gate | Step 5 (before behavioral tests) | rg | [roles/build-preview-gate.md](roles/build-preview-gate.md) |
|
|
90
|
-
| test-case-decomposition | Atomic Android-anchored cases | Step 6 | rg | [roles/test-case-decomposition.md](roles/test-case-decomposition.md) |
|
|
91
|
-
| test-execution | Run cases + capture evidence | Step 7 (after build gate) | rg, git | [roles/test-execution.md](roles/test-execution.md) |
|
|
92
|
-
| validation-remediation | Scoped target fixes + reruns | Step 8 loop (on failures) | rg, git | [roles/validation-remediation.md](roles/validation-remediation.md) |
|
|
93
|
-
| validation-report | Final verdict synthesis | Step 9 | git | [roles/validation-report.md](roles/validation-report.md) |
|
|
94
|
-
|
|
95
|
-
> Before dispatching each teammate, read its role file and paste its `## Inline Persona for Teammate`
|
|
96
|
-
> section directly into the dispatch prompt — adopting agents do NOT auto-load role files. Fill the
|
|
97
|
-
> `{PLACEHOLDER}` inputs from the contract.
|
|
61
|
+
| id | Purpose | Role file |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `validation-workspace-state` | Ledger and stale-input tracking | [roles/validation-workspace-state.md](roles/validation-workspace-state.md) |
|
|
64
|
+
| `validation-intake-fidelity` | Migration scenario gate and fidelity audit | [roles/validation-intake-fidelity.md](roles/validation-intake-fidelity.md) |
|
|
65
|
+
| `validation-plan-gate` | Command resolution plus build/preview gate | [roles/validation-plan-gate.md](roles/validation-plan-gate.md) |
|
|
66
|
+
| `validation-test-runner` | Test decomposition and execution | [roles/validation-test-runner.md](roles/validation-test-runner.md) |
|
|
67
|
+
| `validation-remediation` | Scoped target fixes and rerun requests | [roles/validation-remediation.md](roles/validation-remediation.md) |
|
|
68
|
+
| `validation-report` | Final verdict synthesis | [roles/validation-report.md](roles/validation-report.md) |
|
|
98
69
|
|
|
99
70
|
## Files
|
|
100
71
|
|
|
101
|
-
| File | What it contains |
|
|
102
|
-
|
|
103
|
-
| [
|
|
104
|
-
| [
|
|
105
|
-
| [
|
|
106
|
-
| [
|
|
72
|
+
| File | What it contains |
|
|
73
|
+
|---|---|
|
|
74
|
+
| [ROLE_REDUCTION.md](ROLE_REDUCTION.md) | Reduced role analysis and old-to-new map |
|
|
75
|
+
| [workflow.md](workflow.md) | Reduced pipeline, gates, remediation loop, final report format |
|
|
76
|
+
| [bind.md](bind.md) | Guardrails, failure handling, resource constraints |
|
|
77
|
+
| [roles/](roles/) | Active reduced role specs |
|
|
78
|
+
| [dependencies.yaml](dependencies.yaml) | Optional CLI tools checked at startup |
|
|
107
79
|
|
|
108
80
|
## Shared Return Contract
|
|
109
81
|
|
|
110
|
-
Every node returns a compact payload with, in addition to node-specific fields:
|
|
111
|
-
|
|
112
82
|
```json
|
|
113
83
|
{
|
|
114
84
|
"status": "completed | passed | failed | needs_rerun | blocked",
|
|
@@ -121,17 +91,12 @@ Every node returns a compact payload with, in addition to node-specific fields:
|
|
|
121
91
|
}
|
|
122
92
|
```
|
|
123
93
|
|
|
124
|
-
Use `needs_rerun` when a previous
|
|
125
|
-
|
|
126
|
-
## Optional Android Studio MCP Context
|
|
127
|
-
|
|
128
|
-
When the `jetbrains` MCP server is available, the controller may pass indexed IDE context to nodes: project modules/dependencies/VCS roots/run configs (`get_project_modules`, `get_project_dependencies`, `get_repositories`, `get_run_configurations`), file/symbol ownership (`find_files_by_glob`, `search_in_files_by_regex`, `get_symbol_info`), diagnostics (`get_file_problems`), and IDE build diagnostics (`build_project`). Always pass `projectPath: <kmp_target_project_path>`. MCP is advisory — required build/preview/test commands and the final validation report remain the source of truth.
|
|
94
|
+
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.
|
|
129
95
|
|
|
130
96
|
## Shared Rules
|
|
131
97
|
|
|
132
|
-
- Each
|
|
133
|
-
- Build
|
|
134
|
-
- A passing test
|
|
135
|
-
-
|
|
136
|
-
- The controller must not substitute itself for a
|
|
137
|
-
- Final success requires: migration trigger verified, fidelity audit complete, build/preview gate passed or explicitly blocked with evidence, tests executed when provided, fixes revalidated, and `validation-report` complete.
|
|
98
|
+
- Each role must read its role file before work and stay inside its responsibility boundary.
|
|
99
|
+
- Build/test/preview commands must come from user input, project scripts/docs/CI, or verified Gradle task discovery.
|
|
100
|
+
- A passing KMP test that contradicts Android source/SPEC behavior is a validation failure.
|
|
101
|
+
- Only `validation-remediation` edits target code.
|
|
102
|
+
- The controller must not substitute itself for a role's audit, command gate, test run, fix, or final verdict.
|