@code-migration/wow-migrator 0.2.1 → 0.2.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-to-kmp-migrator/SKILL.md +32 -6
- package/skills/android-to-kmp-migrator/bind.md +15 -0
- package/skills/android-to-kmp-migrator/output-contract.md +61 -12
- package/skills/android-to-kmp-migrator/references/kmp-expert.md +260 -0
- package/skills/android-to-kmp-migrator/references/kmp-mvi-flowredux.md +344 -0
- package/skills/android-to-kmp-migrator/references/kmp-mvvm.md +328 -0
- package/skills/android-to-kmp-migrator/roles/completion-report.md +2 -1
- package/skills/android-to-kmp-migrator/roles/global-migration-phase.md +7 -2
- package/skills/android-to-kmp-migrator/roles/migration-planning-gate.md +7 -2
- package/skills/android-to-kmp-migrator/roles/migration-prep.md +12 -2
- package/skills/android-to-kmp-migrator/roles/migration-verification.md +5 -3
- package/skills/android-to-kmp-migrator/roles/module-implementation.md +20 -2
- package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +19 -3
- package/skills/android-to-kmp-migrator/roles/target-project-assistant.md +10 -1
- package/skills/android-to-kmp-migrator/workflow.md +23 -2
- package/skills/kmp-test-validator/SKILL.md +3 -3
- package/skills/kmp-test-validator/bind.md +3 -2
- package/skills/kmp-test-validator/dependencies.yaml +15 -2
- package/skills/kmp-test-validator/output-contract.md +92 -8
- package/skills/kmp-test-validator/roles/validation-code-gate.md +53 -7
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +7 -2
- package/skills/kmp-test-validator/workflow.md +3 -1
|
@@ -36,11 +36,22 @@ You are the `validation-code-gate` node subagent. You merge compile command reso
|
|
|
36
36
|
- Target KMP files edited to resolve confirmed compiler/preview errors traced from build logs.
|
|
37
37
|
- `validation_code_fix.json` and `.md` under `output_dir/fix/<cycle_id>/`.
|
|
38
38
|
- Each failure confirmed as a target KMP issue with Android/SPEC cross-check when needed.
|
|
39
|
-
-
|
|
39
|
+
- Before editing: lookup compile errors in `code-gate/knowledge/compile_error_knowledge.json` and optional `error_knowledge_path`; reuse matching `bug_fix_experience` entries when still valid.
|
|
40
|
+
- `fix_knowledge_source`: `prior_experience` when local knowledge matches; `error_database` when external DB matches; else `model_inference`.
|
|
41
|
+
- `referenced_entry_ids[]` populated when prior bug-fix experiences were applied.
|
|
42
|
+
- `knowledge_candidates[]` proposed for each fixed failure; persisted to `knowledge/entries/` only after subsequent `build` pass verifies the fix.
|
|
40
43
|
- Every fix records `restoreability_impact`; forbidden delete/stub patterns rejected.
|
|
41
44
|
- `changed_files[]` lists every target path modified with `path`, `edit_kind` (`create | update`), `failure_id`, `restoreability_impact`.
|
|
42
45
|
- `required_reruns` includes `validation-code-gate` mode `build` and/or `validation-business-testing` when applicable.
|
|
43
46
|
|
|
47
|
+
## Success Criteria — knowledge persist (after verified `build` pass)
|
|
48
|
+
|
|
49
|
+
When code-gate `build` passes after a fix cycle (`VG2`):
|
|
50
|
+
|
|
51
|
+
- Promote `knowledge_candidates[]` from the verifying fix cycle into `code-gate/knowledge/entries/<entry_id>/bug_fix_experience.*`.
|
|
52
|
+
- Update `compile_error_knowledge.json` and `.md` index with fingerprints, `entry_path`, `verified: true`, and `hit_count` when a prior entry was reused.
|
|
53
|
+
- Skip persist when the same `message_fingerprint` already has a verified entry unless the new fix adds materially different `solution_steps` — then append a new `entry_id` and link via `referenced_entry_ids`.
|
|
54
|
+
|
|
44
55
|
## Compile Resolution Scenarios (build mode only)
|
|
45
56
|
|
|
46
57
|
| Priority | Scenario ID | Sources |
|
|
@@ -71,6 +82,8 @@ Never invent commands outside these scenarios.
|
|
|
71
82
|
**Required**:
|
|
72
83
|
|
|
73
84
|
- Trace first root compiler error from `validation_code_build` logs before editing.
|
|
85
|
+
- Lookup matching bug-fix experiences in [output-contract.md](../output-contract.md) § Compile error knowledge store before `model_inference`.
|
|
86
|
+
- When the same error fingerprint matches a verified entry, apply recorded `solution_steps` first; adapt only when target context differs.
|
|
74
87
|
- Narrowest fix in `allowed_files`; preserve architecture, source sets, dependencies, public API.
|
|
75
88
|
- Edit under `kmp_target_project_path`; record every change in `changed_files`.
|
|
76
89
|
|
|
@@ -103,10 +116,18 @@ Never invent commands outside these scenarios.
|
|
|
103
116
|
"build": { "command": "", "status": "passed | failed | blocked", "log_file": "" },
|
|
104
117
|
"preview_or_renderability": { "required": true, "command": "", "status": "passed | failed | skipped | blocked", "log_file": "" },
|
|
105
118
|
"failures": [{ "id": "", "failure_kind": "compile | preview | environment", "route_to": "validation-code-gate:fix | user | environment" }],
|
|
119
|
+
"knowledge_persist_summary": {
|
|
120
|
+
"verified_fix_cycle_id": "",
|
|
121
|
+
"persisted_entry_ids": [],
|
|
122
|
+
"reused_entry_ids": [],
|
|
123
|
+
"skipped_candidates": []
|
|
124
|
+
},
|
|
106
125
|
"blocking_gaps": []
|
|
107
126
|
}
|
|
108
127
|
```
|
|
109
128
|
|
|
129
|
+
When `status: passed` immediately after a fix cycle, populate `knowledge_persist_summary` and write verified `knowledge_candidates` to `code-gate/knowledge/entries/`.
|
|
130
|
+
|
|
110
131
|
## Output Schema — mode `fix`
|
|
111
132
|
|
|
112
133
|
```json
|
|
@@ -115,8 +136,24 @@ Never invent commands outside these scenarios.
|
|
|
115
136
|
"node": "validation-code-gate",
|
|
116
137
|
"mode": "fix",
|
|
117
138
|
"kmp_target_project_path": "",
|
|
118
|
-
"fix_knowledge_source": "error_database | model_inference",
|
|
119
|
-
"
|
|
139
|
+
"fix_knowledge_source": "prior_experience | error_database | model_inference",
|
|
140
|
+
"knowledge_lookup": {
|
|
141
|
+
"local_knowledge_path": "",
|
|
142
|
+
"external_error_knowledge_path": "",
|
|
143
|
+
"matched_entry_ids": [],
|
|
144
|
+
"lookup_status": "matched | partial_match | no_match"
|
|
145
|
+
},
|
|
146
|
+
"referenced_entry_ids": [],
|
|
147
|
+
"knowledge_candidates": [
|
|
148
|
+
{
|
|
149
|
+
"entry_id": "ce-<slug>",
|
|
150
|
+
"error_signature": {},
|
|
151
|
+
"root_error_excerpt": "",
|
|
152
|
+
"fix_summary": "",
|
|
153
|
+
"solution_steps": [],
|
|
154
|
+
"changed_files_snapshot": []
|
|
155
|
+
}
|
|
156
|
+
],
|
|
120
157
|
"target_edit_summary": {
|
|
121
158
|
"files_touched": 0,
|
|
122
159
|
"compile_fixes": 0,
|
|
@@ -143,8 +180,12 @@ Shared return shape applies. Only `fix` mode populates `changed_files` with targ
|
|
|
143
180
|
- Logs under `logs/code-gate/` referenced by `log_file` fields.
|
|
144
181
|
|
|
145
182
|
**Fix mode** under `<code_gate_dir>/fix/<cycle_id>/`:
|
|
146
|
-
- `validation_code_fix.json` — machine fix record: `kmp_target_project_path`, `fix_knowledge_source`, `target_edit_summary`, per-failure fix mapping, `changed_files` (every target edit), `required_reruns`, forbidden pattern violations, blockers.
|
|
147
|
-
- `validation_code_fix.md` — agent-readable fix handoff: root error → target file edit table, restoreability notes, rerun plan.
|
|
183
|
+
- `validation_code_fix.json` — machine fix record: `kmp_target_project_path`, `fix_knowledge_source`, `knowledge_lookup`, `referenced_entry_ids`, `knowledge_candidates`, `target_edit_summary`, per-failure fix mapping, `changed_files` (every target edit), `required_reruns`, forbidden pattern violations, blockers.
|
|
184
|
+
- `validation_code_fix.md` — agent-readable fix handoff: matched bug-fix experiences, root error → target file edit table, restoreability notes, rerun plan.
|
|
185
|
+
|
|
186
|
+
**Knowledge store** under `<code_gate_dir>/knowledge/` (see [output-contract.md](../output-contract.md)):
|
|
187
|
+
- `compile_error_knowledge.json`, `compile_error_knowledge.md` — lookup index.
|
|
188
|
+
- `entries/<entry_id>/bug_fix_experience.json`, `.md` — verified compile-error → solution experiences, written after `VG2` confirms the fix cycle.
|
|
148
189
|
|
|
149
190
|
## Inline Persona for Teammate
|
|
150
191
|
|
|
@@ -156,7 +197,10 @@ capture logs, route compile/preview failures to fix mode. DO NOT edit target cod
|
|
|
156
197
|
|
|
157
198
|
fix: EDIT THE TARGET KMP PROJECT to resolve confirmed build/preview failures.
|
|
158
199
|
- changed_files = every target file you created or modified under kmp_target_project_path.
|
|
159
|
-
-
|
|
200
|
+
- LOOKUP FIRST: code-gate/knowledge/compile_error_knowledge.json, then optional error_knowledge_path.
|
|
201
|
+
- Reuse prior bug_fix_experience when fingerprint matches; set fix_knowledge_source=prior_experience.
|
|
202
|
+
- Else use external error DB when configured; else model_inference.
|
|
203
|
+
- Record knowledge_candidates for fixed failures; persist entries only after build verifies fix.
|
|
160
204
|
- Narrowest restoreability-preserving fix only; trace root compiler error first.
|
|
161
205
|
- Missing modules/major functions -> migrator supplement, NOT delete/stub hacks.
|
|
162
206
|
|
|
@@ -166,11 +210,13 @@ CONTROL:
|
|
|
166
210
|
- Never edit Legacy Android or migration validator evidence roots.
|
|
167
211
|
|
|
168
212
|
INPUTS: mode, kmp_target_project_path, validation_fidelity_trust_path, validation_code_build_path (fix mode),
|
|
169
|
-
|
|
213
|
+
code_gate_knowledge_dir, compile_error_knowledge_path, error_knowledge_path, user_provided_commands,
|
|
214
|
+
allowed_files, failure_ids, cycle_id, output_dir, logs_dir.
|
|
170
215
|
|
|
171
216
|
OUTPUTS (evidence under output_dir; code fixes under kmp_target_project_path in fix mode):
|
|
172
217
|
- build/validation_code_build.json + .md + code-gate logs
|
|
173
218
|
- fix/<cycle_id>/validation_code_fix.json + .md
|
|
219
|
+
- knowledge/compile_error_knowledge.json + .md + entries/<entry_id>/bug_fix_experience.* (after verified build pass)
|
|
174
220
|
|
|
175
221
|
Return kmp_target_project_path. fix mode: changed_files required when target edits made.
|
|
176
222
|
Emit required_reruns including validation-code-gate:build after fixes.
|
|
@@ -13,7 +13,7 @@ You are the `validation-workspace-state` node subagent dispatched by the `kmp-te
|
|
|
13
13
|
- Stale upstream inputs flagged when changed files, SPEC paths, migration report, or validation requirements changed since a node ran.
|
|
14
14
|
- Rerun history recorded without hiding repeated failures; next safe controller action identified.
|
|
15
15
|
|
|
16
|
-
**Focus areas**: node status normalization, stale-input detection, changed-file ownership, rerun/blocker history, next-action guidance.
|
|
16
|
+
**Focus areas**: node status normalization, stale-input detection, changed-file ownership, compile-error knowledge inventory, rerun/blocker history, next-action guidance.
|
|
17
17
|
|
|
18
18
|
## Boundary
|
|
19
19
|
|
|
@@ -43,6 +43,11 @@ You are the `validation-workspace-state` node subagent dispatched by the `kmp-te
|
|
|
43
43
|
"handoff_gates": { "VG0": {}, "VG1": {}, "VG2": {}, "VG3": {}, "VG4": {}, "VG5": {} },
|
|
44
44
|
"migrator_supplement_cycles": 0,
|
|
45
45
|
"fix_cycles": 0,
|
|
46
|
+
"knowledge_inventory": {
|
|
47
|
+
"compile_error_knowledge_path": "",
|
|
48
|
+
"verified_entry_count": 0,
|
|
49
|
+
"last_persisted_entry_ids": []
|
|
50
|
+
},
|
|
46
51
|
"next_actions": []
|
|
47
52
|
}
|
|
48
53
|
```
|
|
@@ -51,7 +56,7 @@ Shared controller return shape (all nodes): `status`, `node`, `output_files`, `c
|
|
|
51
56
|
|
|
52
57
|
## Output Files And Contents
|
|
53
58
|
|
|
54
|
-
- `validation_workspace_state.json`: machine-routable validation ledger containing current controller step, validator node status, output file inventory, changed-file ownership, stale upstream inputs, rerun history, blockers, and next safe actions.
|
|
59
|
+
- `validation_workspace_state.json`: machine-routable validation ledger containing current controller step, validator node status, output file inventory, changed-file ownership, compile-error knowledge inventory (`knowledge_inventory`), stale upstream inputs, rerun history, blockers, and next safe actions.
|
|
55
60
|
- `validation_workspace_state.md`: agent-readable ledger handoff containing node status table, stale-input table, changed-file ownership summary, rerun/blocker history, and next safe controller action.
|
|
56
61
|
|
|
57
62
|
## Inline Persona for Teammate
|
|
@@ -44,7 +44,8 @@ Initialize ledger with `handoff_gates` VG0–VG5; track `fix_cycles` and `migrat
|
|
|
44
44
|
- **Executor**: `validation-code-gate` mode `build`
|
|
45
45
|
- **Compile scenarios**: `user_specified` → `global_tool_search` → `default_gradle_kmp`
|
|
46
46
|
- **Output**: `code-gate/build/validation_code_build.*`, `logs/code-gate/*`
|
|
47
|
-
- **On failure**: dispatch code-gate mode `fix`
|
|
47
|
+
- **On failure**: dispatch code-gate mode `fix` — lookup `code-gate/knowledge/compile_error_knowledge.json` and optional `error_knowledge_path` for matching bug-fix experiences, then edit target KMP files → rerun `build` (max 3 fix cycles)
|
|
48
|
+
- **On `VG2` pass after fix**: persist verified `knowledge_candidates` to `code-gate/knowledge/entries/<entry_id>/bug_fix_experience.*` and update the knowledge index
|
|
48
49
|
- **Gate**: `VG2`
|
|
49
50
|
|
|
50
51
|
### Step 4 — Fidelity Gate `restoreability`
|
|
@@ -80,5 +81,6 @@ Initialize ledger with `handoff_gates` VG0–VG5; track `fix_cycles` and `migrat
|
|
|
80
81
|
- Dispatch only role IDs from `SKILL.md`.
|
|
81
82
|
- Fidelity-gate `trust` before code-gate `build`; `restoreability` after `VG2`.
|
|
82
83
|
- Only code-gate mode `fix` edits production code.
|
|
84
|
+
- Compile errors with verified solutions are stored as bug-fix experiences; same fingerprints reuse prior entries before `model_inference`.
|
|
83
85
|
- Business testing skipped (not passed) when no user inputs.
|
|
84
86
|
- Final verdict evidence-backed from verified artifacts.
|