@code-migration/wow-migrator 0.1.2 → 0.1.4
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 +71 -28
- package/skills/android-project-analyst/bind.md +12 -6
- 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 +30 -8
- package/skills/android-project-analyst/roles/behavior-logic.md +12 -5
- package/skills/android-project-analyst/roles/data-contract-flow.md +11 -4
- package/skills/android-project-analyst/roles/presentation-resource.md +13 -4
- package/skills/android-project-analyst/roles/project-architecture.md +11 -4
- package/skills/android-project-analyst/workflow.md +88 -39
- package/skills/android-to-kmp-migrator/SKILL.md +62 -111
- package/skills/android-to-kmp-migrator/bind.md +29 -61
- 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 +11 -2
- 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 +47 -23
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +207 -20
- package/skills/android-to-kmp-migrator/roles/module-implementation.md +82 -0
- package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +9 -2
- package/skills/android-to-kmp-migrator/roles/target-project-assistant.md +104 -0
- package/skills/android-to-kmp-migrator/workflow.md +71 -170
- package/skills/kmp-test-validator/SKILL.md +63 -45
- package/skills/kmp-test-validator/bind.md +30 -36
- 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 +30 -16
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +12 -4
- package/skills/kmp-test-validator/workflow.md +62 -97
- package/skills/migration-task-adapter/SKILL.md +67 -76
- package/skills/migration-task-adapter/bind.md +25 -89
- package/skills/migration-task-adapter/dependencies.yaml +21 -10
- package/skills/migration-task-adapter/roles/adapter-report.md +71 -0
- package/skills/migration-task-adapter/roles/adapter-workspace-state.md +71 -0
- package/skills/migration-task-adapter/roles/task-route-orchestrator.md +103 -0
- package/skills/migration-task-adapter/workflow.md +71 -143
- package/skills/android-project-analyst/MIGRATION.md +0 -53
- package/skills/android-to-kmp-migrator/MIGRATION.md +0 -104
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +0 -63
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +0 -66
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +0 -65
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +0 -65
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +0 -63
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +0 -64
- package/skills/kmp-test-validator/MIGRATION.md +0 -58
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +0 -67
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +0 -66
- package/skills/kmp-test-validator/roles/validation-remediation.md +0 -112
- package/skills/kmp-test-validator/roles/validation-test-runner.md +0 -61
- package/skills/migration-task-adapter/MIGRATION.md +0 -34
- package/skills/migration-task-adapter/roles/task-reporter.md +0 -129
- package/skills/migration-task-adapter/roles/task-understanding-router.md +0 -134
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +0 -140
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +0 -189
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Role: Target Project Assistant
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
|
|
5
|
+
> *"I am the single owner of target KMP understanding — I locate anchor paths, revise alignment from upstream analyst evidence, and answer every target-project question during migration."*
|
|
6
|
+
|
|
7
|
+
You are the `target-project-assistant` node subagent. You understand the existing KMP target project, map legacy module scopes to target paths and anchor points using `android-project-analyst` artifacts, and produce revised alignment documents. Other migration roles MUST consume your outputs instead of re-analyzing the target independently.
|
|
8
|
+
|
|
9
|
+
## Modes
|
|
10
|
+
|
|
11
|
+
| Mode | When | Output location |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `global_baseline` | Once after migration index + upstream analyst index exist | `<global_dir>/node-results/target-project-assistant/` |
|
|
14
|
+
| `module_anchors` | Per `migration_module_id` before planning | `<module_root>/node-results/target-project-assistant/` |
|
|
15
|
+
| `consult` | Any time target context changes or a node asks a target question | Append to global `consultation_log` in `target_alignment_revision.json` |
|
|
16
|
+
|
|
17
|
+
## Success Criteria
|
|
18
|
+
|
|
19
|
+
- Required JSON+MD artifacts written under assigned `output_dir`, both non-empty.
|
|
20
|
+
- `target_alignment_revision.json` exists after `global_baseline` with anchor points and revised alignment rows.
|
|
21
|
+
- Per-module `target_module_anchors.json` maps legacy evidence to resolvable target paths.
|
|
22
|
+
- `consult` responses reference prior alignment revision version and list affected anchor ids.
|
|
23
|
+
- No target code edits (read-only analysis).
|
|
24
|
+
|
|
25
|
+
## Boundary
|
|
26
|
+
|
|
27
|
+
**Forbidden**:
|
|
28
|
+
- Do NOT implement migration code, edit target files, or add dependencies.
|
|
29
|
+
- Do NOT replace `migration-planning-gate` task ordering — you supply target evidence and alignment only.
|
|
30
|
+
- Do NOT run full project compile/build.
|
|
31
|
+
|
|
32
|
+
**Mandatory**:
|
|
33
|
+
- Read [output-contract.md](../output-contract.md) path contract before acting.
|
|
34
|
+
- Validate `kmp_target_project_path`, upstream analyst paths, `migration_module_id` (when module-scoped), and `output_dir`.
|
|
35
|
+
- On missing/stale upstream analyst artifacts, return `blocked` with precise `blocking_gaps`.
|
|
36
|
+
- Include `migration_module_id` or `"global"` in JSON return payload.
|
|
37
|
+
|
|
38
|
+
## Output Schema (`global_baseline`)
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"status": "completed | blocked",
|
|
43
|
+
"node": "target-project-assistant",
|
|
44
|
+
"mode": "global_baseline | module_anchors | consult",
|
|
45
|
+
"migration_module_id": "global | <id>",
|
|
46
|
+
"output_root": "",
|
|
47
|
+
"output_dir": "",
|
|
48
|
+
"target_project_layout": {},
|
|
49
|
+
"reusable_components": [],
|
|
50
|
+
"anchor_points": [
|
|
51
|
+
{
|
|
52
|
+
"anchor_id": "",
|
|
53
|
+
"legacy_module_id": "",
|
|
54
|
+
"legacy_scope": "",
|
|
55
|
+
"target_path": "",
|
|
56
|
+
"target_symbol": "",
|
|
57
|
+
"reuse_or_create": "reuse | extend | create",
|
|
58
|
+
"evidence_paths": []
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"revised_alignment": [],
|
|
62
|
+
"integration_constraints": [],
|
|
63
|
+
"consultation_log": [],
|
|
64
|
+
"blocking_gaps": []
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Output Files And Contents
|
|
69
|
+
|
|
70
|
+
**Global (`mode: global_baseline`)** under `<global_dir>/node-results/target-project-assistant/`:
|
|
71
|
+
- `target_project_assistant.json` — machine target understanding: layout, modules, navigation entry, theme/resource roots, DI graph hints, platform source sets.
|
|
72
|
+
- `target_project_assistant.md` — agent-readable target survey with exact paths.
|
|
73
|
+
- `target_alignment_revision.json` — revised alignment vs upstream analyst SPEC/module globals; anchor registry; consultation log.
|
|
74
|
+
- `target_alignment_revision.md` — alignment tables mapping legacy `module_id` → target placement.
|
|
75
|
+
|
|
76
|
+
**Per-module (`mode: module_anchors`)** under `<module_root>/node-results/target-project-assistant/`:
|
|
77
|
+
- `target_module_anchors.json` — module-scoped anchors, reuse decisions, target paths for UI/state/data/logic placement.
|
|
78
|
+
- `target_module_anchors.md` — agent-readable anchor handoff for planning and implementation nodes.
|
|
79
|
+
|
|
80
|
+
**Consult (`mode: consult`)** — append entry to global `target_alignment_revision.json` → `consultation_log[]`; optionally refresh `target_module_anchors.json` when anchors change.
|
|
81
|
+
|
|
82
|
+
## Inline Persona for Teammate
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
ROLE: target-project-assistant node in android-to-kmp-migrator.
|
|
86
|
+
|
|
87
|
+
You own target KMP understanding and alignment revision. Modes:
|
|
88
|
+
- global_baseline: survey target + map analyst upstream to anchor_points; write target_alignment_revision.*
|
|
89
|
+
- module_anchors: per migration_module_id target paths and anchors for planning/implementation.
|
|
90
|
+
- consult: answer target questions; append consultation_log; refresh anchors when needed.
|
|
91
|
+
|
|
92
|
+
You do NOT edit target code or run full builds. Other roles MUST use your artifacts.
|
|
93
|
+
|
|
94
|
+
INPUTS: kmp_target_project_path, analyst_output_root, upstream_analyst_index_path, modules_index_path,
|
|
95
|
+
migration_assembly_basis_path, cross_module_architecture_path, cross_module_data_logic_path,
|
|
96
|
+
legacy module_representation paths, migration_module_id, mode, output_dir.
|
|
97
|
+
|
|
98
|
+
OUTPUTS (exact names per output-contract.md):
|
|
99
|
+
Global baseline: target_project_assistant.json/.md, target_alignment_revision.json/.md
|
|
100
|
+
Module anchors: target_module_anchors.json/.md
|
|
101
|
+
|
|
102
|
+
Return JSON with status, node, mode, migration_module_id, output_dir, output_files, changed_files: [],
|
|
103
|
+
stale_upstream_inputs, rerun_requests, blocking_gaps.
|
|
104
|
+
```
|
|
@@ -1,206 +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
|
-
|
|
9
|
+
L0[Pre-flight deps] --> UP[Verify analyst P6]
|
|
10
|
+
UP --> INV[migration inventory]
|
|
11
11
|
INV --> WS[migration-workspace-state]
|
|
12
|
-
WS -->
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Detailed Steps
|
|
53
|
-
|
|
54
|
-
### Step 0 — Pre-flight
|
|
55
|
-
|
|
56
|
-
- **Executor**: Leader
|
|
57
|
-
- **Input**: [dependencies.yaml](dependencies.yaml)
|
|
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
|
|
41
|
+
## Step 0 — Pre-flight
|
|
69
42
|
|
|
70
43
|
- **Executor**: Leader
|
|
71
|
-
- **
|
|
72
|
-
- **Output**:
|
|
73
|
-
|
|
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`.
|
|
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
|
|
77
47
|
|
|
78
|
-
|
|
48
|
+
## Step 1 — Upstream + output root
|
|
79
49
|
|
|
80
|
-
- **
|
|
81
|
-
- **Output**: `<global_dir>/node-results/migration-workspace-state/migration_workspace_state.*`
|
|
82
|
-
- **Gate**: stale upstream outputs must be rerun before downstream consumption.
|
|
50
|
+
- Verify analyst package **P6**; write `upstream_analyst_index.json`.
|
|
83
51
|
|
|
84
|
-
|
|
52
|
+
## Step 2 — Migration inventory
|
|
85
53
|
|
|
86
|
-
-
|
|
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.
|
|
54
|
+
- `migration_module_inventory.*`, `modules_migration_index.json`, per-module `module_brief.json`.
|
|
91
55
|
|
|
92
|
-
|
|
56
|
+
## Step 3 — Workspace state
|
|
93
57
|
|
|
94
|
-
- **
|
|
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.
|
|
58
|
+
- Init ledger; track handoff gates **M0**–**V0**.
|
|
99
59
|
|
|
100
|
-
|
|
60
|
+
## Step 4 — Target project assistant (global)
|
|
101
61
|
|
|
102
|
-
-
|
|
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.
|
|
62
|
+
- `mode: global_baseline` → `target_alignment_revision.*`
|
|
110
63
|
|
|
111
|
-
|
|
64
|
+
## Step 5 — Per-module pipeline
|
|
112
65
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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** |
|
|
118
77
|
|
|
119
|
-
|
|
78
|
+
Repeat until package **M4**.
|
|
120
79
|
|
|
121
|
-
|
|
122
|
-
- **Action**: implement visible UI surface first, including states/resources and binding surfaces.
|
|
123
|
-
- **Gate**: UI output is reviewed/approved before logic implementation.
|
|
80
|
+
## Step 6 — Global migration phase
|
|
124
81
|
|
|
125
|
-
###
|
|
82
|
+
### 6a Integrate
|
|
126
83
|
|
|
127
|
-
- **
|
|
128
|
-
- **
|
|
129
|
-
- **Gate**:
|
|
84
|
+
- **Role**: `global-migration-phase` `mode: integrate`
|
|
85
|
+
- **Output**: `global-migration-phase/integrate/global_system_integration.*`
|
|
86
|
+
- **Gate**: package **M5**
|
|
130
87
|
|
|
131
|
-
###
|
|
88
|
+
### 6b Align
|
|
132
89
|
|
|
133
|
-
- **
|
|
134
|
-
- **
|
|
135
|
-
|
|
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.
|
|
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
|
|
141
93
|
|
|
142
|
-
|
|
94
|
+
## Step 7 — Report + validator
|
|
143
95
|
|
|
144
|
-
-
|
|
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.
|
|
96
|
+
- Global representation + `completion-report` `report` → package **V0** → `kmp-test-validator`
|
|
151
97
|
|
|
152
|
-
|
|
98
|
+
## TPA consult
|
|
153
99
|
|
|
154
|
-
|
|
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
|
|
170
|
-
|
|
171
|
-
```json
|
|
172
|
-
{
|
|
173
|
-
"status": "ready_for_validation | blocked",
|
|
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": [],
|
|
182
|
-
"source_to_target_summary": [],
|
|
183
|
-
"coverage_summary": {
|
|
184
|
-
"presentation": "",
|
|
185
|
-
"state_data": "",
|
|
186
|
-
"ui": "",
|
|
187
|
-
"logic": "",
|
|
188
|
-
"platform": "",
|
|
189
|
-
"verification": ""
|
|
190
|
-
},
|
|
191
|
-
"validation_inputs": [],
|
|
192
|
-
"limitations": [],
|
|
193
|
-
"manual_steps": [],
|
|
194
|
-
"blocking_gaps": []
|
|
195
|
-
}
|
|
196
|
-
```
|
|
100
|
+
Any target question → TPA `mode: consult` (append `consultation_log`).
|
|
197
101
|
|
|
198
102
|
## Acceptance Criteria
|
|
199
103
|
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
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`.
|
|
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,88 +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.
|
|
46
41
|
|
|
47
|
-
The team is a **
|
|
42
|
+
The team is a **serial pipeline with two controller loops**: code-gate fix remediation and migrator supplement.
|
|
43
|
+
|
|
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. **Workspace state** —
|
|
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 |
|
|
75
|
+
|
|
76
|
+
## Strict Output Schedule
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
output_root = <output_dir or ~/.a2c_agents/validation>/kmp-test-validator
|
|
80
|
+
fidelity_gate_dir = <output_root>/fidelity-gate
|
|
81
|
+
code_gate_dir = <output_root>/code-gate
|
|
82
|
+
business_testing_dir = <output_root>/business-testing
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
See [output-contract.md](output-contract.md) for full layout. No validator artifact inside migration output root.
|
|
86
|
+
|
|
87
|
+
## Output Artifact Content Matrix
|
|
88
|
+
|
|
89
|
+
| Owner | Artifacts | Required content |
|
|
90
|
+
|---|---|---|
|
|
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 |
|
|
79
97
|
|
|
80
98
|
## Shared Return Contract
|
|
81
99
|
|
|
82
100
|
```json
|
|
83
101
|
{
|
|
84
|
-
"status": "completed | passed | failed | needs_rerun | blocked",
|
|
102
|
+
"status": "completed | passed | failed | needs_rerun | needs_migrator_supplement | blocked",
|
|
85
103
|
"node": "node-name",
|
|
104
|
+
"mode": "trust | restoreability | build | fix",
|
|
105
|
+
"output_dir": "<node output dir>",
|
|
86
106
|
"output_files": [],
|
|
87
107
|
"changed_files": [],
|
|
88
108
|
"stale_upstream_inputs": [],
|
|
@@ -91,12 +111,10 @@ The team is a **reduced serial pipeline with a remediation loop**. Role overlap
|
|
|
91
111
|
}
|
|
92
112
|
```
|
|
93
113
|
|
|
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.
|
|
95
|
-
|
|
96
114
|
## Shared Rules
|
|
97
115
|
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
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.
|