@code-migration/wow-migrator 0.1.1 → 0.1.3
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/MIGRATION.md +51 -21
- package/skills/android-project-analyst/SKILL.md +74 -44
- package/skills/android-project-analyst/bind.md +24 -15
- package/skills/android-project-analyst/dependencies.yaml +8 -4
- package/skills/android-project-analyst/roles/analysis-workspace-state.md +123 -0
- package/skills/android-project-analyst/roles/behavior-logic.md +166 -0
- package/skills/android-project-analyst/roles/data-contract-flow.md +170 -0
- package/skills/android-project-analyst/roles/presentation-resource.md +301 -0
- package/skills/android-project-analyst/roles/project-architecture.md +174 -0
- package/skills/android-project-analyst/workflow.md +123 -72
- package/skills/android-to-kmp-migrator/MIGRATION.md +87 -2
- package/skills/android-to-kmp-migrator/SKILL.md +126 -133
- package/skills/android-to-kmp-migrator/bind.md +43 -15
- package/skills/android-to-kmp-migrator/dependencies.yaml +3 -3
- package/skills/android-to-kmp-migrator/roles/completion-report.md +79 -0
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +68 -0
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +71 -0
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +70 -0
- package/skills/android-to-kmp-migrator/roles/migration-verification.md +83 -0
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +210 -19
- package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +81 -0
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +70 -0
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +68 -0
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +69 -0
- package/skills/android-to-kmp-migrator/workflow.md +215 -149
- package/skills/kmp-test-validator/MIGRATION.md +44 -3
- package/skills/kmp-test-validator/SKILL.md +93 -77
- package/skills/kmp-test-validator/bind.md +29 -9
- package/skills/kmp-test-validator/dependencies.yaml +3 -3
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +72 -0
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +72 -0
- package/skills/kmp-test-validator/roles/validation-remediation.md +14 -9
- package/skills/kmp-test-validator/roles/validation-report.md +15 -12
- package/skills/kmp-test-validator/roles/validation-test-runner.md +67 -0
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +9 -4
- package/skills/kmp-test-validator/workflow.md +106 -118
- package/skills/migration-task-adapter/MIGRATION.md +49 -0
- package/skills/migration-task-adapter/SKILL.md +152 -0
- package/skills/migration-task-adapter/bind.md +116 -0
- package/skills/migration-task-adapter/dependencies.yaml +26 -0
- package/skills/migration-task-adapter/roles/task-reporter.md +134 -0
- package/skills/migration-task-adapter/roles/task-understanding-router.md +139 -0
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +145 -0
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +198 -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,118 +1,139 @@
|
|
|
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
|
|
32
|
-
kind: ai_agent
|
|
33
|
-
purpose: Run the resolved build and Compose preview/renderability gate before behavioral tests; classify and route failures by owner.
|
|
34
|
-
skills: []
|
|
35
|
-
tools: [rg]
|
|
36
|
-
- id: test-case-decomposition
|
|
21
|
+
- id: validation-plan-gate
|
|
37
22
|
kind: ai_agent
|
|
38
|
-
purpose:
|
|
23
|
+
purpose: Command and build gate — resolve trusted build/preview/test commands, run build and preview/renderability before behavioral tests, route failures.
|
|
39
24
|
skills: []
|
|
40
|
-
tools: [rg]
|
|
41
|
-
- id: test-
|
|
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. **
|
|
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. **Output root + workspace state** — lock validation output root parallel to migration, then 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
|
-
|
|
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) |
|
|
69
|
+
|
|
70
|
+
## Files
|
|
82
71
|
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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 |
|
|
79
|
+
|
|
80
|
+
## Strict Output Schedule
|
|
81
|
+
|
|
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
|
+
```text
|
|
85
|
+
output_root = <output_dir or ~/.a2c_agents/validation>/kmp-test-validator
|
|
86
|
+
workspace_state_dir = <output_root>/workspace-state
|
|
87
|
+
intake_dir = <output_root>/intake-fidelity
|
|
88
|
+
plan_gate_dir = <output_root>/plan-gate
|
|
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
|
|
93
|
+
```
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
> section directly into the dispatch prompt — adopting agents do NOT auto-load role files. Fill the
|
|
97
|
-
> `{PLACEHOLDER}` inputs from the contract.
|
|
95
|
+
Required artifacts:
|
|
98
96
|
|
|
99
|
-
|
|
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.
|
|
113
|
+
|
|
114
|
+
## Output Artifact Content Matrix
|
|
100
115
|
|
|
101
|
-
|
|
116
|
+
The controller verifies both artifact names and role-aligned content before downstream stages consume any file.
|
|
117
|
+
|
|
118
|
+
| Stage / owner | Output file(s) | Required content |
|
|
102
119
|
|---|---|---|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
120
|
+
| Output root lock / Leader | `run_manifest.json` | Validation scope, KMP target path, Android source/SPEC paths, migration report path, migration output root, validation output root, allowed roots, dependency-preflight status, timestamp. |
|
|
121
|
+
| Workspace ledger / `validation-workspace-state` | `validation_workspace_state.json`, `validation_workspace_state.md` | Validator node status, output files, changed-file ownership, stale upstream inputs, rerun history, blockers, and next safe action. |
|
|
122
|
+
| Intake/fidelity / `validation-intake-fidelity` | `validation_intake_fidelity.json`, `validation_intake_fidelity.md` | Migration trigger evidence, normalized validation brief, KMP evidence, Android/SPEC-vs-KMP fidelity gaps across UI/logic/data/control flow, test-trust blockers, rerun requests, blockers. |
|
|
123
|
+
| Plan/build gate / `validation-plan-gate` | `validation_plan_gate.json`, `validation_plan_gate.md`, plan-gate logs | Target structure, source sets, test frameworks, trusted command resolution, command sources, build/preview/renderability gate results, log paths, routed failures, blockers. |
|
|
124
|
+
| Test runner / `validation-test-runner` | `validation_test_runner.json`, `validation_test_runner.md`, test logs, optional changed test files | Android/SPEC-anchored test cases, expected vs actual results, commands, log paths, created/reused tests, failure routing, skipped/blocked reasons. |
|
|
125
|
+
| Remediation / `validation-remediation` | `validation_remediation.json`, `validation_remediation.md`, changed target files | Confirmed target KMP failures, Android/SPEC evidence for fixes, fixed/unfixed failures, changed files, diagnostics, required reruns, blockers. |
|
|
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. |
|
|
107
127
|
|
|
108
|
-
|
|
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.
|
|
109
129
|
|
|
110
|
-
|
|
130
|
+
## Shared Return Contract
|
|
111
131
|
|
|
112
132
|
```json
|
|
113
133
|
{
|
|
114
134
|
"status": "completed | passed | failed | needs_rerun | blocked",
|
|
115
135
|
"node": "node-name",
|
|
136
|
+
"output_dir": "<exact validator node output dir under output_root>",
|
|
116
137
|
"output_files": [],
|
|
117
138
|
"changed_files": [],
|
|
118
139
|
"stale_upstream_inputs": [],
|
|
@@ -121,17 +142,12 @@ Every node returns a compact payload with, in addition to node-specific fields:
|
|
|
121
142
|
}
|
|
122
143
|
```
|
|
123
144
|
|
|
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.
|
|
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.
|
|
129
146
|
|
|
130
147
|
## Shared Rules
|
|
131
148
|
|
|
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.
|
|
149
|
+
- Each role must read its role file before work and stay inside its responsibility boundary.
|
|
150
|
+
- Build/test/preview commands must come from user input, project scripts/docs/CI, or verified Gradle task discovery.
|
|
151
|
+
- A passing KMP test that contradicts Android source/SPEC behavior is a validation failure.
|
|
152
|
+
- Only `validation-remediation` edits target code.
|
|
153
|
+
- The controller must not substitute itself for a role's audit, command gate, test run, fix, or final verdict.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|---|---|---|
|
|
7
7
|
| `max_parallel_teammates` | 1 | The validator is a strict serial pipeline — each node consumes the prior node's verified artifact; no stage fans out in parallel. |
|
|
8
8
|
| `total_wall_clock_budget` | 45 min | Upper bound for one full validation run including the build/preview gate, test execution, and one remediation loop on a feature-scoped migration. |
|
|
9
|
-
| `total_token_budget` |
|
|
10
|
-
| `per_node_token_budget` |
|
|
9
|
+
| `total_token_budget` | 600k tokens | Budget across 6 reduced roles + Leader integration + remediation iterations. |
|
|
10
|
+
| `per_node_token_budget` | 130k tokens | Consolidated roles carry broader context; `validation-intake-fidelity`, `validation-test-runner`, and `validation-report` may use the upper end. |
|
|
11
11
|
| `max_remediation_cycles` | 3 | Max `remediation → rerun gate/tests` iterations before escalating remaining failures as `blocked` to the controller/user. |
|
|
12
12
|
| `build_test_runs` | bounded per gate | Build/preview and test commands run once per gate pass; reruns only follow a remediation `required_reruns` request. |
|
|
13
13
|
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
Team-level rules — distinct from each role's own `## Boundary`.
|
|
17
17
|
|
|
18
18
|
- **Leader-as-orchestrator only**: the Leader (`kmp-test-validator` controller) gates the migration scenario, dispatches nodes in dependency order, validates return payloads + output files, refreshes workspace state, and routes reruns. The Leader does NOT perform a node's detailed audit, run its tests, or apply its fixes.
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
19
|
+
- **Strict validation output root**: the Leader must lock `output_root = <output_dir or ~/.a2c_agents/validation>/kmp-test-validator` before validator node dispatch. When a migration output root is provided, validation must be written to a parallel `validation` base location, not inside the migration output root. Migration artifacts are read-only inputs referenced by path.
|
|
20
|
+
- **Per-node exact paths**: validator nodes write only under the declared validation output root: `workspace-state`, `intake-fidelity`, `plan-gate`, `test-runner`, `remediation/<cycle_id>`, `report`, and `logs`.
|
|
21
|
+
- **Role-output content discipline**: required artifacts must contain the content owned by their role, not just the correct filename. `validation_intake_fidelity.*` must contain migration/fidelity trust evidence; `validation_plan_gate.*` must contain trusted commands and build/preview gate evidence; `validation_test_runner.*` must contain Android-anchored cases/results; `validation_remediation.*` must contain confirmed target fixes and required reruns; `kmp_validation_report.*` must contain the final evidence-based verdict.
|
|
22
|
+
- **Migration-scenario trigger boundary**: this team validates ONLY Android-to-KMP migration output. If `validation-intake-fidelity` cannot confirm migration evidence (KMP target + Android source/SPEC + migration report/completion), the run is `blocked` — it is never downgraded to generic KMP testing, KMP-only feature work, or isolated Gradle troubleshooting.
|
|
23
|
+
- **Hard dependency order (C-pattern)**: workspace state → intake/fidelity → plan/build gate → test runner → remediation loop → report. Fidelity is audited before tests are trusted; the build/preview gate passes before behavioral tests run. A downstream role references upstream outputs by path and must NOT rebuild them; on missing/stale upstream input it returns `needs_rerun`/`blocked`.
|
|
21
24
|
- **Android/SPEC is ground truth**: a passing test (or green build) that contradicts Android source/SPEC behavior is a validation failure, not a pass.
|
|
22
25
|
- **No invented commands**: build/test/preview commands come only from user input, project scripts/docs/CI, or verified Gradle task discovery. A node that cannot resolve a trustworthy command returns `blocked`.
|
|
23
|
-
- **Scoped remediation, mandatory rerun**: only `validation-remediation` edits target code, confined to `allowed_files`; every fix is followed by its `required_reruns` (
|
|
26
|
+
- **Scoped remediation, mandatory rerun**: only `validation-remediation` edits target code, confined to `allowed_files`; every fix is followed by its `required_reruns` (`validation-plan-gate` and/or `validation-test-runner`) before it counts as resolved. No fix introduces TODO/FIXME or sample-only production data.
|
|
24
27
|
- **Stale-artifact discipline**: `validation-workspace-state` is refreshed after each node group; `validation-report` runs only when no required input is stale.
|
|
25
28
|
- **Report-only synthesis**: only `validation-report` issues the final `passed | failed | blocked` verdict, synthesizing verified outputs without new tests or fixes.
|
|
26
29
|
|
|
@@ -31,9 +34,9 @@ Team-level rules — distinct from each role's own `## Boundary`.
|
|
|
31
34
|
| Failure mode | Response |
|
|
32
35
|
|---|---|
|
|
33
36
|
| Node timeout | Retry once with the same contract. On 2nd timeout, mark the node `[ROLE MISSING — node timed out]` in the workspace ledger; downstream nodes that hard-require it return `blocked`. |
|
|
34
|
-
| Malformed output (does not match role `## Output Schema` / shared return,
|
|
37
|
+
| Malformed output (does not match role `## Output Schema` / shared return, files missing/empty, writes outside validation output root, or artifact content does not match the role duty) | Re-dispatch once with the schema, exact output path, and role-owned output content inlined plus a "previous output was malformed/missing/out-of-duty/out-of-path" preamble. On 2nd failure, mark `[ROLE MISSING — malformed output]`. |
|
|
35
38
|
| Node returns `needs_rerun` / `blocked` (missing or stale upstream input) | Refresh/re-run the named upstream node first, then re-dispatch this node. If unresolvable, record the `blocking_gap`. |
|
|
36
|
-
| `
|
|
39
|
+
| `validation-plan-gate` or `validation-test-runner` returns `failed` | Route fixable target-code failures to `validation-remediation`; on its `required_reruns`, re-run the affected gate/tests. Non-target failures route to migration node / user / environment. |
|
|
37
40
|
| Remediation loop does not converge in `max_remediation_cycles` | Escalate remaining failures as `blocked` with evidence to the controller/user; do not mark `passed`. |
|
|
38
41
|
| A test passes but contradicts Android/SPEC evidence | Record as `failed` (not pass) and route to remediation or the migration node. |
|
|
39
42
|
|
|
@@ -41,8 +44,8 @@ Team-level rules — distinct from each role's own `## Boundary`.
|
|
|
41
44
|
|
|
42
45
|
| Trigger condition | Degraded mode |
|
|
43
46
|
|---|---|
|
|
44
|
-
| Whole-project validation scope with a very large test inventory | Scope `
|
|
45
|
-
| No trustworthy build/test command resolvable | `
|
|
47
|
+
| Whole-project validation scope with a very large test inventory | Scope `validation-test-runner` to the migrated modules in scope; mark untested areas explicitly in the report rather than running unrelated suites. |
|
|
48
|
+
| No trustworthy build/test command resolvable | `validation-plan-gate` returns `blocked`; rely on static fidelity audit and surface the command gap (does not auto-pass). |
|
|
46
49
|
| Preview/renderability unsupported by the target | Run the build gate only; mark preview `skipped` with reason and still perform static UI-fidelity checks. |
|
|
47
50
|
| `jetbrains` MCP unavailable or pointing at the wrong project | Continue on the target Gradle wrapper + file-system evidence; record the MCP gap in the workspace ledger and affected node outputs. |
|
|
48
51
|
|
|
@@ -51,3 +54,20 @@ Team-level rules — distinct from each role's own `## Boundary`.
|
|
|
51
54
|
- If 50%+ of dispatched nodes return `[ROLE MISSING]`, the run is **FAILED** — emit a partial validation report with a `FAILED: insufficient node coverage` header, status `blocked`, and the missing-evidence list.
|
|
52
55
|
- If `total_wall_clock_budget` is exceeded, halt in-flight nodes, checkpoint via `validation-workspace-state`, emit whatever verified outputs exist, and tag the report `INCOMPLETE: budget exceeded`.
|
|
53
56
|
- If `total_token_budget` is exceeded mid-run, halt new dispatches, let in-flight nodes finish, checkpoint, and emit a partial report tagged `INCOMPLETE: token budget exceeded`.
|
|
57
|
+
|
|
58
|
+
## Required Path Contract
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"output_root": "<output_dir or ~/.a2c_agents/validation>/kmp-test-validator",
|
|
63
|
+
"workspace_state_dir": "<output_root>/workspace-state",
|
|
64
|
+
"intake_dir": "<output_root>/intake-fidelity",
|
|
65
|
+
"plan_gate_dir": "<output_root>/plan-gate",
|
|
66
|
+
"test_runner_dir": "<output_root>/test-runner",
|
|
67
|
+
"remediation_dir": "<output_root>/remediation",
|
|
68
|
+
"report_dir": "<output_root>/report",
|
|
69
|
+
"logs_dir": "<output_root>/logs"
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Validator artifacts outside this path contract are invalid. Migration artifacts remain in their migration output location and are never overwritten or copied as validator outputs.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Leader reads this file in SKILL.md Workflow Step 0 (pre-flight) and reports missing items.
|
|
4
4
|
# Populated from Stage 2 auto-matching (local CLI scan): rg, git found locally; the target project's
|
|
5
|
-
# own Gradle wrapper drives build/preview/test commands (
|
|
5
|
+
# own Gradle wrapper drives build/preview/test commands (validation-plan-gate resolves them and returns
|
|
6
6
|
# blocked rather than inventing one). All entries are required: false — the team degrades gracefully
|
|
7
7
|
# (built-in Grep/Read substitute for rg; git is only for changed-file/diff inspection).
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ skills: [] # Stage 2 auto-matching confirmed no local domain-specific skill ma
|
|
|
11
11
|
tools:
|
|
12
12
|
- name: rg
|
|
13
13
|
required: false
|
|
14
|
-
purpose: Fast source search across the Android source and KMP target for fidelity
|
|
14
|
+
purpose: Fast source search across the Android source and KMP target for intake/fidelity, plan/gate, test runner, and report roles; built-in Grep/Read substitute if unavailable.
|
|
15
15
|
- name: git
|
|
16
16
|
required: false
|
|
17
|
-
purpose: Inspect changed-file sets and diffs in the KMP target for workspace-state, fidelity,
|
|
17
|
+
purpose: Inspect changed-file sets and diffs in the KMP target for workspace-state, intake/fidelity, test runner, remediation, and report roles.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Role: Validation Intake Fidelity
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
|
|
5
|
+
> "I decide whether this validation can be trusted: migration evidence first, Android-vs-KMP fidelity before tests."
|
|
6
|
+
|
|
7
|
+
You are the `validation-intake-fidelity` node subagent. You merge the input contract gate and Android/KMP fidelity audit.
|
|
8
|
+
|
|
9
|
+
## Success Criteria
|
|
10
|
+
|
|
11
|
+
- `validation_intake_fidelity.json` and `validation_intake_fidelity.md` are written under `output_dir`.
|
|
12
|
+
- Post-migration validation trigger is verified, with KMP evidence and migration evidence.
|
|
13
|
+
- Paths and validation requirements are normalized into a validation brief.
|
|
14
|
+
- Android source/SPEC is compared against KMP across UI, logic, data flow, and control flow.
|
|
15
|
+
- Test-trust blockers are identified before build/test results are trusted.
|
|
16
|
+
|
|
17
|
+
## Boundary
|
|
18
|
+
|
|
19
|
+
Forbidden:
|
|
20
|
+
- Do not run builds, previews, or tests.
|
|
21
|
+
- Do not fix code.
|
|
22
|
+
- Do not invent migration evidence or downgrade to generic KMP testing.
|
|
23
|
+
- Do not issue final verdict.
|
|
24
|
+
|
|
25
|
+
Mandatory:
|
|
26
|
+
- Validate target path, Android/SPEC/migration report evidence, changed files, and output path.
|
|
27
|
+
- Return `blocked` when migration evidence is missing.
|
|
28
|
+
- Treat Android source/SPEC as authoritative.
|
|
29
|
+
|
|
30
|
+
## Output Schema
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"status": "completed | needs_rerun | blocked",
|
|
35
|
+
"node": "validation-intake-fidelity",
|
|
36
|
+
"trigger_verified": true,
|
|
37
|
+
"kmp_target_project_path": "",
|
|
38
|
+
"legacy_android_project_path": "",
|
|
39
|
+
"migration_scope": "",
|
|
40
|
+
"spec_paths": {},
|
|
41
|
+
"migration_report_path": "",
|
|
42
|
+
"validation_requirements": [],
|
|
43
|
+
"kmp_evidence": [],
|
|
44
|
+
"fidelity_gaps": [],
|
|
45
|
+
"test_trust_blockers": [],
|
|
46
|
+
"rerun_requests": [],
|
|
47
|
+
"blocking_gaps": []
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Shared return shape applies.
|
|
52
|
+
|
|
53
|
+
## Output Files And Contents
|
|
54
|
+
|
|
55
|
+
- `validation_intake_fidelity.json`: machine-routable intake/fidelity artifact containing trigger verification, KMP target path, Android source path, migration scope, SPEC paths, migration report path, validation requirements, KMP evidence, fidelity gaps, test-trust blockers, rerun requests, and blockers.
|
|
56
|
+
- `validation_intake_fidelity.md`: agent-readable trust-gate handoff containing migration evidence summary, normalized validation brief, Android/SPEC-vs-KMP fidelity findings across UI/logic/data/control flow, test-trust blockers, required reruns, and blockers.
|
|
57
|
+
|
|
58
|
+
## Inline Persona for Teammate
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
ROLE: validation-intake-fidelity node.
|
|
62
|
+
|
|
63
|
+
Verify this is Android-to-KMP migration validation, normalize the validation brief, then audit Android/SPEC vs KMP fidelity before any tests are trusted. Do not run commands or fix code.
|
|
64
|
+
|
|
65
|
+
INPUTS: kmp_target_project_path, legacy_android_project_path, migration_scope, SPEC paths, migration_report_path, changed_files, validation_requirements, output_dir.
|
|
66
|
+
|
|
67
|
+
OUTPUTS:
|
|
68
|
+
- validation_intake_fidelity.json (machine trust gate: trigger evidence, validation brief, fidelity gaps, test-trust blockers)
|
|
69
|
+
- validation_intake_fidelity.md (agent handoff: migration evidence, fidelity audit summary, blockers/reruns)
|
|
70
|
+
|
|
71
|
+
Return JSON only. Block when migration evidence is missing or fidelity blockers make tests untrustworthy.
|
|
72
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Role: Validation Plan Gate
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
|
|
5
|
+
> "I resolve trusted commands and prove the target builds and renders before behavioral tests run."
|
|
6
|
+
|
|
7
|
+
You are the `validation-plan-gate` node subagent. You merge KMP validation planning and build/preview gate execution.
|
|
8
|
+
|
|
9
|
+
## Success Criteria
|
|
10
|
+
|
|
11
|
+
- `validation_plan_gate.json` and `validation_plan_gate.md` are written under `output_dir`.
|
|
12
|
+
- Target structure, source sets, test frameworks, and command sources are discovered.
|
|
13
|
+
- Build/test/preview commands are resolved only from user input, project scripts/docs/CI, or verified Gradle tasks.
|
|
14
|
+
- Resolved build and preview/renderability gates run, with logs captured.
|
|
15
|
+
- Failures are classified and routed.
|
|
16
|
+
|
|
17
|
+
## Boundary
|
|
18
|
+
|
|
19
|
+
Forbidden:
|
|
20
|
+
- Do not invent commands.
|
|
21
|
+
- Do not run behavioral tests.
|
|
22
|
+
- Do not fix code or issue final verdict.
|
|
23
|
+
|
|
24
|
+
Mandatory:
|
|
25
|
+
- Validate intake/fidelity output, migration report evidence, and changed files.
|
|
26
|
+
- Behavioral tests may run only after this role returns `passed`.
|
|
27
|
+
- Capture full logs in files under `output_dir`.
|
|
28
|
+
|
|
29
|
+
## Output Schema
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"status": "passed | failed | blocked",
|
|
34
|
+
"node": "validation-plan-gate",
|
|
35
|
+
"project_structure": [],
|
|
36
|
+
"source_sets": [],
|
|
37
|
+
"test_frameworks": [],
|
|
38
|
+
"resolved_commands": { "build": "", "preview_or_renderability": "", "test": "" },
|
|
39
|
+
"command_sources": [],
|
|
40
|
+
"scope_to_targets": [],
|
|
41
|
+
"build": { "command": "", "status": "passed | failed | blocked", "log_file": "" },
|
|
42
|
+
"preview_or_renderability": { "required": true, "command": "", "status": "passed | failed | skipped | blocked", "log_file": "" },
|
|
43
|
+
"failures": [],
|
|
44
|
+
"rerun_requests": [],
|
|
45
|
+
"blocking_gaps": []
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Shared return shape applies.
|
|
50
|
+
|
|
51
|
+
## Output Files And Contents
|
|
52
|
+
|
|
53
|
+
- `validation_plan_gate.json`: machine-routable command/build gate artifact containing target project structure, source sets, test frameworks, trusted resolved commands, command sources, scope-to-target mapping, build status/log path, preview/renderability status/log path, routed failures, rerun requests, and blockers.
|
|
54
|
+
- `validation_plan_gate.md`: agent-readable gate handoff containing command provenance, build/preview execution summary, log paths, target/source-set/test framework notes, failure classification, rerun requirements, and blockers.
|
|
55
|
+
- Build/preview logs: command output files written under `output_dir` or the shared validation logs directory. Every log path must be referenced from JSON.
|
|
56
|
+
|
|
57
|
+
## Inline Persona for Teammate
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
ROLE: validation-plan-gate node.
|
|
61
|
+
|
|
62
|
+
Resolve trusted validation commands and run build/preview gates. Never invent commands. Do not run behavioral tests or fix code.
|
|
63
|
+
|
|
64
|
+
INPUTS: kmp_target_project_path, migration_scope, validation_intake_fidelity_path, migration_report_path, changed_files, user commands, validation_requirements, output_dir.
|
|
65
|
+
|
|
66
|
+
OUTPUTS:
|
|
67
|
+
- validation_plan_gate.json (machine gate: trusted commands, build/preview status, log paths, routed failures)
|
|
68
|
+
- validation_plan_gate.md (agent handoff: command provenance, gate results, failure routing, blockers)
|
|
69
|
+
- build/preview logs (paths referenced in JSON)
|
|
70
|
+
|
|
71
|
+
Return passed only when required build/preview gates pass.
|
|
72
|
+
```
|
|
@@ -20,7 +20,7 @@ You are the `validation-remediation` node subagent dispatched by the `kmp-test-v
|
|
|
20
20
|
**Forbidden** (prevent role overlap):
|
|
21
21
|
- Do NOT fix failures that are missing-evidence, environment, or intentional divergences — route them out.
|
|
22
22
|
- Do NOT edit outside `allowed_files` or the declared migration scope; do NOT add TODO/FIXME, sample-only production data, or unrelated cleanup.
|
|
23
|
-
- Do NOT run the gates/tests yourself (`
|
|
23
|
+
- Do NOT run the gates/tests yourself (`validation-plan-gate` / `validation-test-runner` rerun) or issue the final verdict (`validation-report`).
|
|
24
24
|
|
|
25
25
|
**Mandatory**:
|
|
26
26
|
- You MUST read this role spec and the controller contract completely before acting.
|
|
@@ -38,13 +38,18 @@ You are the `validation-remediation` node subagent dispatched by the `kmp-test-v
|
|
|
38
38
|
"unfixed_failures": [ { "id": "", "reason": "", "route_to": "migration-node | user | environment" } ],
|
|
39
39
|
"changed_files": [],
|
|
40
40
|
"mcp_diagnostics": [ { "tool": "get_file_problems | build_project | get_symbol_info | rename_refactoring | reformat_file", "file": "", "status": "clean | warnings | errors | unavailable | not_run", "problems": [] } ],
|
|
41
|
-
"required_reruns": [ "
|
|
41
|
+
"required_reruns": [ "validation-plan-gate", "validation-test-runner" ],
|
|
42
42
|
"blocking_gaps": []
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Shared controller return shape (all nodes): `status`, `node`, `output_files`, `changed_files`, `stale_upstream_inputs`, `rerun_requests`, `blocking_gaps`.
|
|
47
47
|
|
|
48
|
+
## Output Files And Contents
|
|
49
|
+
|
|
50
|
+
- `validation_remediation.json`: machine-routable remediation artifact containing fixed failures, unfixed failures with route, changed files, diagnostics, required reruns, blockers, and exact failure evidence consumed.
|
|
51
|
+
- `validation_remediation.md`: agent-readable remediation handoff containing confirmed target failures, Android/SPEC evidence checked, fix summary, changed-file list, unfixed failures, required reruns, diagnostics, and blockers.
|
|
52
|
+
|
|
48
53
|
## Inline Persona for Teammate
|
|
49
54
|
|
|
50
55
|
```
|
|
@@ -72,10 +77,10 @@ INPUTS YOU WILL RECEIVE:
|
|
|
72
77
|
- legacy_android_project_path (or null): {LEGACY_ANDROID_PROJECT_PATH}
|
|
73
78
|
- migration_scope: {MIGRATION_SCOPE}
|
|
74
79
|
- validation_brief_path: {VALIDATION_BRIEF_PATH}
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
80
|
+
- validation_intake_fidelity_path: {VALIDATION_INTAKE_FIDELITY_PATH}
|
|
81
|
+
- validation_plan_gate_path: {VALIDATION_PLAN_GATE_PATH}
|
|
82
|
+
- validation_plan_gate_path (when applicable): {VALIDATION_PLAN_GATE_PATH}
|
|
83
|
+
- validation_test_runner_path (when applicable): {VALIDATION_TEST_RUNNER_PATH}
|
|
79
84
|
- allowed_files: {ALLOWED_FILES}
|
|
80
85
|
- failure_ids: {FAILURE_IDS}
|
|
81
86
|
- output_dir: {OUTPUT_DIR}
|
|
@@ -94,8 +99,8 @@ HANDLER (how you process):
|
|
|
94
99
|
7. Return the exact gates/tests that must be re-run after the fix.
|
|
95
100
|
|
|
96
101
|
OUTPUTS (write under output_dir, exact names):
|
|
97
|
-
- validation_remediation.json (
|
|
98
|
-
- validation_remediation.md
|
|
102
|
+
- validation_remediation.json (machine fix artifact: fixed/unfixed failures, changed files, diagnostics, required reruns)
|
|
103
|
+
- validation_remediation.md (agent handoff: confirmed target fixes, evidence checked, changed files, rerun requirements)
|
|
99
104
|
- changed target files listed in JSON
|
|
100
105
|
|
|
101
106
|
validation_remediation.json schema:
|
|
@@ -103,7 +108,7 @@ validation_remediation.json schema:
|
|
|
103
108
|
"unfixed_failures": [{ "id": "", "reason": "", "route_to": "migration-node | user | environment" }],
|
|
104
109
|
"changed_files": [],
|
|
105
110
|
"mcp_diagnostics": [{ "tool": "get_file_problems | build_project | get_symbol_info | rename_refactoring | reformat_file", "file": "", "status": "clean | warnings | errors | unavailable | not_run", "problems": [] }],
|
|
106
|
-
"required_reruns": ["
|
|
111
|
+
"required_reruns": ["validation-plan-gate", "validation-test-runner"], "blocking_gaps": [] }
|
|
107
112
|
|
|
108
113
|
RETURN TO CONTROLLER (shared shape, no preamble):
|
|
109
114
|
{ "status": "fixed | partially_fixed | blocked", "node": "validation-remediation",
|