@code-migration/wow-migrator 0.1.0

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.
Files changed (55) hide show
  1. package/README.md +113 -0
  2. package/bin/kmp-skills.js +407 -0
  3. package/package.json +48 -0
  4. package/scripts/sync-skills.js +74 -0
  5. package/skills/android-project-analyst/MIGRATION.md +37 -0
  6. package/skills/android-project-analyst/SKILL.md +115 -0
  7. package/skills/android-project-analyst/bind.md +49 -0
  8. package/skills/android-project-analyst/dependencies.yaml +16 -0
  9. package/skills/android-project-analyst/roles/android-ecosystem.md +141 -0
  10. package/skills/android-project-analyst/roles/api-list.md +136 -0
  11. package/skills/android-project-analyst/roles/architecture-pattern.md +131 -0
  12. package/skills/android-project-analyst/roles/data-flow.md +143 -0
  13. package/skills/android-project-analyst/roles/logic-understand.md +154 -0
  14. package/skills/android-project-analyst/roles/resource-understand.md +151 -0
  15. package/skills/android-project-analyst/roles/ui-understand.md +136 -0
  16. package/skills/android-project-analyst/workflow.md +132 -0
  17. package/skills/android-to-kmp-migrator/MIGRATION.md +44 -0
  18. package/skills/android-to-kmp-migrator/SKILL.md +203 -0
  19. package/skills/android-to-kmp-migrator/bind.md +54 -0
  20. package/skills/android-to-kmp-migrator/dependencies.yaml +21 -0
  21. package/skills/android-to-kmp-migrator/roles/api-contract-parity.md +95 -0
  22. package/skills/android-to-kmp-migrator/roles/dataflow-logic-implementation.md +130 -0
  23. package/skills/android-to-kmp-migrator/roles/dependency-resolution.md +106 -0
  24. package/skills/android-to-kmp-migrator/roles/incremental-build-check.md +105 -0
  25. package/skills/android-to-kmp-migrator/roles/legacy-spec-delta-review.md +104 -0
  26. package/skills/android-to-kmp-migrator/roles/migration-alignment.md +119 -0
  27. package/skills/android-to-kmp-migrator/roles/migration-report.md +108 -0
  28. package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +100 -0
  29. package/skills/android-to-kmp-migrator/roles/module-node-migration-fix.md +111 -0
  30. package/skills/android-to-kmp-migrator/roles/module-node-migration-review.md +108 -0
  31. package/skills/android-to-kmp-migrator/roles/navigation-migration.md +104 -0
  32. package/skills/android-to-kmp-migrator/roles/platform-api-replacement.md +104 -0
  33. package/skills/android-to-kmp-migrator/roles/prd-completion-check.md +124 -0
  34. package/skills/android-to-kmp-migrator/roles/resource-migration.md +109 -0
  35. package/skills/android-to-kmp-migrator/roles/source-set-placement-guard.md +95 -0
  36. package/skills/android-to-kmp-migrator/roles/state-model-mapping.md +109 -0
  37. package/skills/android-to-kmp-migrator/roles/target-project-understand.md +118 -0
  38. package/skills/android-to-kmp-migrator/roles/theme-design-system-mapping.md +101 -0
  39. package/skills/android-to-kmp-migrator/roles/ui-mockup-implementation.md +121 -0
  40. package/skills/android-to-kmp-migrator/roles/ui-render-fidelity-check.md +100 -0
  41. package/skills/android-to-kmp-migrator/workflow.md +180 -0
  42. package/skills/kmp-test-validator/MIGRATION.md +43 -0
  43. package/skills/kmp-test-validator/SKILL.md +137 -0
  44. package/skills/kmp-test-validator/bind.md +53 -0
  45. package/skills/kmp-test-validator/dependencies.yaml +17 -0
  46. package/skills/kmp-test-validator/roles/android-kmp-fidelity-audit.md +102 -0
  47. package/skills/kmp-test-validator/roles/build-preview-gate.md +109 -0
  48. package/skills/kmp-test-validator/roles/kmp-validation-plan.md +108 -0
  49. package/skills/kmp-test-validator/roles/test-case-decomposition.md +103 -0
  50. package/skills/kmp-test-validator/roles/test-execution.md +104 -0
  51. package/skills/kmp-test-validator/roles/validation-input-contract.md +111 -0
  52. package/skills/kmp-test-validator/roles/validation-remediation.md +112 -0
  53. package/skills/kmp-test-validator/roles/validation-report.md +114 -0
  54. package/skills/kmp-test-validator/roles/validation-workspace-state.md +102 -0
  55. package/skills/kmp-test-validator/workflow.md +151 -0
@@ -0,0 +1,151 @@
1
+ # Workflow: migrated KMP target + Android source/SPEC → verified validation verdict
2
+
3
+ This Swarm Skill is a **specialization pipeline (C) with a remediation loop**. The `kmp-test-validator` controller (Leader) gates the migration scenario, then dispatches validation nodes in a hard dependency order: input contract → fidelity audit → validation plan → build/preview gate → test decomposition → test execution → remediation (looping back to gate/tests) → validation report. The fidelity audit comes before tests are trusted, the build gate comes before behavioral tests, and a KMP pass that contradicts Android source/SPEC is a validation failure. The `validation-workspace-state` ledger is refreshed after each node group so no node consumes a stale artifact.
4
+
5
+ ## Overview
6
+
7
+ ```mermaid
8
+ graph TD
9
+ L0[Leader: Step 0 pre-flight deps] --> WS[validation-workspace-state]
10
+ WS --> IC[validation-input-contract]
11
+ IC -->|migration trigger?| GT{migration validation scenario?}
12
+ GT -- No --> STOP[Stop: blocked, not a migration validation task]
13
+ GT -- Yes --> FA[android-kmp-fidelity-audit]
14
+ FA -->|test-trust blockers?| GF{fidelity trustworthy?}
15
+ GF -- "blocker" --> STOP2[Stop/route: blocked or to migration node]
16
+ GF -- Yes --> VP[kmp-validation-plan]
17
+ VP -->|commands resolved?| GC{trusted build/test command?}
18
+ GC -- No --> STOP3[Stop: blocked, no trustworthy command]
19
+ GC -- Yes --> BG[build-preview-gate]
20
+ BG -->|build/preview failed| REM
21
+ BG -->|passed| TD[test-case-decomposition]
22
+ TD --> TE[test-execution]
23
+ TE -->|failures| REM[validation-remediation]
24
+ REM -->|required_reruns| BG
25
+ REM -->|required_reruns| TE
26
+ REM -->|blocked| STOP4[Route to migration node / user / environment]
27
+ TE -->|all pass / none requested| VR[validation-report]
28
+ REM -->|fixed + reruns pass| VR
29
+ VR --> OUT[Leader: final verdict passed / failed / blocked]
30
+
31
+ WS -. refreshed after each node group .-> VR
32
+ ```
33
+
34
+ The remediation loop is: `build-preview-gate` or `test-execution` failure → `validation-remediation` fixes within `allowed_files` → the node's `required_reruns` re-run the affected gate/tests → repeat until pass or `blocked` (max cycles per [bind.md](bind.md)).
35
+
36
+ ## Detailed Steps
37
+
38
+ ### Step 0 — Pre-flight: dependency check
39
+
40
+ - **Executor**: Leader
41
+ - **Input**: [dependencies.yaml](dependencies.yaml)
42
+ - **Action**: verify each `tools[]` entry; the target Gradle wrapper drives builds/tests.
43
+ - **Output**: pre-flight note to the user
44
+ - **Quality gate**: all deps `required: false`; the run proceeds with degraded behavior recorded. User decides go/no-go on anything missing.
45
+
46
+ ### Step 1 — Initialize workspace state
47
+
48
+ - **Executor**: `validation-workspace-state`
49
+ - **Input**: target path, optional Android path, scope, known node outputs/changed files
50
+ - **Action**: initialize the validation ledger; refreshed after each later node group.
51
+ - **Output**: `validation_workspace_state.*`
52
+ - **Serial / Parallel**: serial (first, and re-run between groups)
53
+ - **Quality gate**: ledger written and non-empty; no node proceeds when its required upstream input is marked stale.
54
+
55
+ ### Step 2 — Input contract gate
56
+
57
+ - **Executor**: `validation-input-contract`
58
+ - **Input**: target path, Android source/SPEC, migration report/completion evidence, changed files, validation requirements
59
+ - **Action**: verify this is a post-migration validation scenario; normalize paths; confirm KMP evidence; produce the validation brief.
60
+ - **Output**: `validation_input_contract.json` + `validation_brief.md`
61
+ - **Serial / Parallel**: serial
62
+ - **Quality gate**: `trigger_verified: true` with KMP + migration evidence → proceed; missing migration evidence → `blocked` (never downgrade to generic testing).
63
+
64
+ ### Step 3 — Fidelity audit (before tests are trusted)
65
+
66
+ - **Executor**: `android-kmp-fidelity-audit`
67
+ - **Input**: validation brief, SPEC, migration report, changed files
68
+ - **Action**: compare Android source/SPEC vs migrated KMP across UI, logic, data flow, control flow; classify gaps; flag test-trust blockers.
69
+ - **Output**: `android_kmp_fidelity_audit.*`
70
+ - **Serial / Parallel**: serial
71
+ - **Quality gate**: blocker-severity gaps route to the migration node/user before tests are trusted; `needs_rerun`/`blocked` halts the trusted-test path.
72
+
73
+ ### Step 4 — Validation plan
74
+
75
+ - **Executor**: `kmp-validation-plan`
76
+ - **Input**: validation brief, fidelity audit, migration report, optional user commands
77
+ - **Action**: discover structure/source sets/frameworks; resolve build/preview/test commands (user → project scripts/CI → verified Gradle tasks); map scope to targets.
78
+ - **Output**: `kmp_validation_plan.*`
79
+ - **Serial / Parallel**: serial
80
+ - **Quality gate**: at least one trustworthy build/test command resolved with `command_sources`; else `blocked` (no invented command).
81
+
82
+ ### Step 5 — Build/preview gate (before behavioral tests)
83
+
84
+ - **Executor**: `build-preview-gate`
85
+ - **Input**: validation brief, validation plan, fidelity audit, changed files
86
+ - **Action**: run the resolved build command; when UI is in scope, the resolved Compose preview/renderability gate; capture logs.
87
+ - **Output**: `build_preview_gate.*` + log files
88
+ - **Serial / Parallel**: serial — gates the test stage
89
+ - **Quality gate**: `passed` → Step 6; `failed` → route fixable target-code failures to `validation-remediation` (Step 8) and do NOT run behavioral tests; `blocked` → surface with evidence.
90
+
91
+ ### Step 6 — Test case decomposition
92
+
93
+ - **Executor**: `test-case-decomposition`
94
+ - **Input**: validation brief, fidelity audit, validation plan, build/preview gate, migration report, validation requirements
95
+ - **Action**: decompose user tests / SPEC acceptance / migration validation inputs into atomic, Android-anchored cases.
96
+ - **Output**: `test_case_inventory.*`
97
+ - **Serial / Parallel**: serial (runs when test cases/use cases/acceptance criteria exist)
98
+ - **Quality gate**: each case atomic with Android evidence + execution channel; Android-vs-SPEC conflict → `blocked` (no fabricated expectations).
99
+
100
+ ### Step 7 — Test execution
101
+
102
+ - **Executor**: `test-execution`
103
+ - **Input**: validation brief, fidelity audit, validation plan, build/preview gate (passed), test inventory
104
+ - **Action**: run each atomic case via the project's convention; capture evidence; a KMP pass that contradicts Android evidence is a failure.
105
+ - **Output**: `test_execution_results.*` + logs + any created test files
106
+ - **Serial / Parallel**: serial — only after the build gate passes
107
+ - **Quality gate**: `passed` → Step 9; `failed` → route to `validation-remediation` (Step 8).
108
+
109
+ ### Step 8 — Remediation loop (on confirmed failures)
110
+
111
+ - **Executor**: `validation-remediation`, then re-run the affected gate/tests
112
+ - **Input**: failing build/preview gate or test results, `allowed_files`, failure IDs, fidelity audit, validation plan
113
+ - **Action**: confirm each failure is a target KMP issue, apply the narrowest Android/SPEC-anchored fix in `allowed_files`, and emit `required_reruns`.
114
+ - **Output**: `validation_remediation.*` + changed files
115
+ - **Serial / Parallel**: serial loop with Steps 5/7
116
+ - **Quality gate**: every fix is followed by its `required_reruns`; loop until gate+tests pass or `blocked` (max cycles per [bind.md](bind.md)); non-target failures route to migration node/user/environment.
117
+
118
+ ### Step 9 — Final: validation report
119
+
120
+ - **Executor**: `validation-report`, then Leader
121
+ - **Input**: workspace state, fidelity, plan, build/preview, test inventory/results, remediation, migration report
122
+ - **Action**: synthesize the final status; Leader returns the verdict.
123
+ - **Output**: `kmp_validation_report.*` + the completion summary below
124
+ - **Quality gate**: report runs only when the latest workspace state shows no stale required inputs.
125
+
126
+ #### Final Report Format
127
+
128
+ ```json
129
+ {
130
+ "status": "passed | failed | blocked",
131
+ "migration_scope": "...",
132
+ "kmp_target_project_path": "...",
133
+ "fidelity_summary": { "ui": "", "logic": "", "data_flow": "", "control_flow": "" },
134
+ "build_summary": {},
135
+ "preview_or_renderability_summary": {},
136
+ "test_statistics": { "total": 0, "passed": 0, "failed": 0, "skipped": 0, "blocked": 0 },
137
+ "remediation_summary": [],
138
+ "remaining_failures": [],
139
+ "blocking_gaps": [],
140
+ "report_path": "..."
141
+ }
142
+ ```
143
+
144
+ ## Acceptance Criteria
145
+
146
+ - Every dispatched node returned output matching its role `## Output Schema` and the shared return shape; any `[ROLE MISSING]` is recorded per [bind.md](bind.md).
147
+ - **Gate check (C-pattern)**: the input contract verified the migration scenario before any audit; the fidelity audit ran before tests were trusted; the build/preview gate passed before behavioral tests ran.
148
+ - **Loop check**: every remediation fix was followed by its `required_reruns`; no fix counts as resolved without a passing rerun.
149
+ - A KMP pass that contradicts Android source/SPEC is recorded as a failure, not a pass.
150
+ - Build/test commands came from user input, project scripts, target understanding, or verified Gradle discovery — none invented.
151
+ - `validation-report` runs only when no required input is stale and decides `passed | failed | blocked`; if `blocked`, the final response lists blockers and exact missing evidence.