@code-migration/wow-migrator 0.1.3 → 0.1.5
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 +69 -46
- package/skills/android-project-analyst/bind.md +10 -5
- 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 +25 -8
- package/skills/android-project-analyst/roles/behavior-logic.md +6 -2
- package/skills/android-project-analyst/roles/data-contract-flow.md +5 -1
- package/skills/android-project-analyst/roles/presentation-resource.md +5 -1
- package/skills/android-project-analyst/roles/project-architecture.md +5 -1
- package/skills/android-project-analyst/workflow.md +75 -29
- package/skills/android-to-kmp-migrator/SKILL.md +62 -142
- package/skills/android-to-kmp-migrator/bind.md +29 -67
- 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 +3 -1
- 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 +44 -26
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +16 -8
- package/skills/android-to-kmp-migrator/roles/module-implementation.md +82 -0
- package/skills/android-to-kmp-migrator/roles/target-project-assistant.md +104 -0
- package/skills/android-to-kmp-migrator/workflow.md +85 -224
- package/skills/kmp-test-validator/SKILL.md +52 -85
- package/skills/kmp-test-validator/bind.md +30 -56
- 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 +23 -14
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +5 -2
- package/skills/kmp-test-validator/workflow.md +60 -115
- package/skills/migration-task-adapter/SKILL.md +64 -93
- package/skills/migration-task-adapter/bind.md +27 -91
- package/skills/migration-task-adapter/dependencies.yaml +21 -10
- package/skills/migration-task-adapter/output-contract.md +276 -0
- package/skills/migration-task-adapter/roles/adapter-report.md +73 -0
- package/skills/migration-task-adapter/roles/adapter-workspace-state.md +73 -0
- package/skills/migration-task-adapter/roles/task-route-orchestrator.md +106 -0
- package/skills/migration-task-adapter/workflow.md +76 -142
- package/skills/android-project-analyst/MIGRATION.md +0 -67
- package/skills/android-to-kmp-migrator/MIGRATION.md +0 -129
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +0 -68
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +0 -71
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +0 -70
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +0 -70
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +0 -68
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +0 -69
- package/skills/kmp-test-validator/MIGRATION.md +0 -84
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +0 -72
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +0 -72
- package/skills/kmp-test-validator/roles/validation-remediation.md +0 -117
- package/skills/kmp-test-validator/roles/validation-test-runner.md +0 -67
- package/skills/migration-task-adapter/MIGRATION.md +0 -49
- package/skills/migration-task-adapter/roles/task-reporter.md +0 -134
- package/skills/migration-task-adapter/roles/task-understanding-router.md +0 -139
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +0 -145
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +0 -198
|
@@ -1,155 +1,91 @@
|
|
|
1
|
-
# Workflow:
|
|
1
|
+
# Workflow: task → route → downstream workflow → adapter report
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The adapter classifies intent, records contracts and stage gates, and emits a verified report. It does not perform analysis, migration, or validation itself.
|
|
4
|
+
|
|
5
|
+
**File recording system**: every adapter output path, content requirement, and trigger gate is defined in [output-contract.md](output-contract.md). Adapter roles MUST fail closed when handoff package artifacts are missing, empty, out-of-path, stale, or schema-invalid.
|
|
4
6
|
|
|
5
7
|
## Overview
|
|
6
8
|
|
|
7
9
|
```mermaid
|
|
8
10
|
graph TD
|
|
9
|
-
L0[
|
|
10
|
-
ROOT -->
|
|
11
|
-
|
|
12
|
-
G0 -- No --> STOP[blocked
|
|
13
|
-
G0 -- Yes -->
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
G1
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
APA_MIG --> WSI_A[workspace-state-discipline-inspector]
|
|
25
|
-
WSI_A --> ATM
|
|
26
|
-
ATM --> KV{kmp-test-validator needed?}
|
|
27
|
-
KV -- ready_for_validation --> KTV[kmp-test-validator]
|
|
28
|
-
KV -- blocked --> WSI_M[workspace-state-discipline-inspector]
|
|
29
|
-
KTV --> WSI_V[workspace-state-discipline-inspector]
|
|
30
|
-
APA_UI --> WSI_D[workspace-state-discipline-inspector]
|
|
31
|
-
APA_LOGIC --> WSI_D
|
|
32
|
-
APA_ARCH --> WSI_D
|
|
33
|
-
APA_OV --> WSI_D
|
|
34
|
-
WSI_M --> TR[task-reporter]
|
|
35
|
-
WSI_V --> TR
|
|
36
|
-
WSI_D --> TR
|
|
37
|
-
TR --> WSI_FINAL[workspace-state-discipline-inspector<br/>final check]
|
|
11
|
+
L0[Pre-flight] --> ROOT[run_manifest.json]
|
|
12
|
+
ROOT --> TRO_R[task-route-orchestrator route]
|
|
13
|
+
TRO_R --> G0{Route ok?}
|
|
14
|
+
G0 -- No --> STOP[blocked]
|
|
15
|
+
G0 -- Yes --> WS0[adapter-workspace-state init]
|
|
16
|
+
WS0 --> TRO_O[task-route-orchestrator orchestrate]
|
|
17
|
+
TRO_O --> G1{Route}
|
|
18
|
+
G1 --> APA[android-project-analyst variants]
|
|
19
|
+
G1 --> MIG[migration: analyst then migrator]
|
|
20
|
+
MIG --> KV[kmp-test-validator optional]
|
|
21
|
+
APA --> WS1[adapter-workspace-state]
|
|
22
|
+
KV --> WS1
|
|
23
|
+
MIG --> WS1
|
|
24
|
+
WS1 --> AR[adapter-report]
|
|
25
|
+
AR --> WS2[adapter-workspace-state post_report]
|
|
38
26
|
```
|
|
39
27
|
|
|
40
|
-
##
|
|
28
|
+
## Output Paths
|
|
41
29
|
|
|
42
|
-
The
|
|
30
|
+
The canonical path tree, stage folder names, and handoff packages `A0`–`A6` are in [output-contract.md](output-contract.md). Summary:
|
|
43
31
|
|
|
44
32
|
```text
|
|
45
33
|
output_root = <output_dir or ~/.a2c_agents/task-adapter>/migration-task-adapter
|
|
46
|
-
|
|
34
|
+
downstream_index_dir = <output_root>/downstream-index
|
|
47
35
|
workspace_state_dir = <output_root>/workspace-state
|
|
48
|
-
|
|
36
|
+
route_orchestration_dir = <output_root>/route-orchestration
|
|
49
37
|
stage_inspection_dir = <output_root>/stage-inspections
|
|
50
38
|
intermediate_asset_dir = <output_root>/intermediate-assets
|
|
51
39
|
report_dir = <output_root>/report
|
|
52
40
|
```
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
| Schedule point | Required artifacts |
|
|
57
|
-
|---|---|
|
|
58
|
-
| Output root lock | `<output_root>/run_manifest.json` - task id, raw task, paths/scope, output roots, dependency status, schedule version |
|
|
59
|
-
| Task understanding | `<task_dir>/task_understanding_router.json`, `<task_dir>/task_understanding_router.md` - route decision, focus, evidence, required/missing inputs, downstream sequence |
|
|
60
|
-
| Workspace discipline | `<workspace_state_dir>/workspace_state_discipline.json`, `<workspace_state_dir>/workspace_state_discipline.md` - artifact inventory, path/freshness checks, rerun/blocker history, next actions |
|
|
61
|
-
| Stage inspection | `<stage_inspection_dir>/<stage_id>/stage_inspection.json`, `<stage_inspection_dir>/<stage_id>/stage_inspection.md` - checked inputs/outputs, path/freshness/asset coverage, rerun/blocker routing |
|
|
62
|
-
| Intermediate assets | `<intermediate_asset_dir>/intermediate_asset_records.json`, `<intermediate_asset_dir>/intermediate_asset_records.md` - stable records for every adapter/downstream artifact consumed later |
|
|
63
|
-
| Orchestration | `<orchestration_dir>/workflow_orchestration.json`, `<orchestration_dir>/workflow_orchestration.md` - downstream contracts, expected/observed outputs, stage requests, rerun/blocker routing |
|
|
64
|
-
| Final report | `<report_dir>/task_adapter_report.json`, `<report_dir>/task_adapter_report.md` - final route/status/readiness, verified outputs, stage/asset summaries, blockers |
|
|
65
|
-
|
|
66
|
-
No adapter role may write inside downstream workflow output roots except by invoking the downstream controller with its own declared `output_dir`. Downstream artifacts are referenced by path in intermediate asset records. The validator output root must be the downstream validator's parallel `validation` location, not the migration output root.
|
|
42
|
+
Validator artifacts are recorded under the validator's parallel `validation` root, not the migration root.
|
|
67
43
|
|
|
68
44
|
## Route Matrix
|
|
69
45
|
|
|
70
|
-
| Route | Required inputs | Downstream
|
|
46
|
+
| Route | Required inputs | Downstream | Key evidence |
|
|
71
47
|
|---|---|---|---|
|
|
72
|
-
| `only_understand_ui` | Android source
|
|
73
|
-
| `only_understand_logic` | Android source
|
|
74
|
-
| `only_understand_architecture` | Android source
|
|
75
|
-
| `only_understand_overview` | Android source
|
|
76
|
-
| `migration` |
|
|
77
|
-
| `validation_handoff` | KMP target
|
|
78
|
-
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
### Step 0
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- **
|
|
94
|
-
- **
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- **
|
|
100
|
-
- **Output**: `
|
|
101
|
-
- **Gate**:
|
|
102
|
-
|
|
103
|
-
### Step
|
|
104
|
-
|
|
105
|
-
- **Executor**: `
|
|
106
|
-
- **
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- **
|
|
112
|
-
- **
|
|
113
|
-
|
|
114
|
-
### Step 4 - Stage Inspections
|
|
115
|
-
|
|
116
|
-
- **Executor**: `workspace-state-discipline-inspector`.
|
|
117
|
-
- **Required inspection points**:
|
|
118
|
-
- `route_decision`
|
|
119
|
-
- `pre_downstream_dispatch`
|
|
120
|
-
- `post_analyst`
|
|
121
|
-
- `post_migrator`
|
|
122
|
-
- `post_validator`
|
|
123
|
-
- `pre_report`
|
|
124
|
-
- `post_report`
|
|
125
|
-
- **Action**: for each applicable point, verify current stage inputs, outputs, freshness, path compliance, intermediate asset coverage, and rerun/blocker routing.
|
|
126
|
-
- **Output**: one `stage_inspection.json` and `.md` per stage id plus refreshed workspace discipline and asset ledgers. Stage inspection artifacts must list checked inputs/outputs, path compliance, freshness checks, intermediate asset coverage, downstream contract checks, rerun requests, blockers, and next allowed stage.
|
|
127
|
-
- **Gate**: final report cannot run unless `pre_report` stage inspection passes or explicitly reports `blocked`.
|
|
128
|
-
|
|
129
|
-
### Step 5 - Intermediate Asset Records
|
|
130
|
-
|
|
131
|
-
- **Executor**: `workspace-state-discipline-inspector` with updates from `workflow-orchestrator`.
|
|
132
|
-
- **Action**: record every durable adapter and downstream artifact consumed across stages.
|
|
133
|
-
- **Required fields**:
|
|
134
|
-
- `asset_id`
|
|
135
|
-
- `asset_type`
|
|
136
|
-
- `producer`
|
|
137
|
-
- `path`
|
|
138
|
-
- `status`
|
|
139
|
-
- `created_or_observed_at`
|
|
140
|
-
- `freshness_basis`
|
|
141
|
-
- `consumers`
|
|
142
|
-
- `source_evidence`
|
|
143
|
-
- `blocking_gaps`
|
|
144
|
-
- **Gate**: every `output_files[]` item returned by an adapter role or downstream workflow must appear in `intermediate_asset_records.*` before a downstream consumer uses it.
|
|
145
|
-
|
|
146
|
-
### Step 6 - Task Report
|
|
147
|
-
|
|
148
|
-
- **Executor**: `task-reporter`.
|
|
149
|
-
- **Input**: run manifest, task understanding, workflow orchestration, latest workspace discipline, stage inspections, intermediate asset records, downstream reports.
|
|
150
|
-
- **Action**: synthesize a final machine-routable task report. Do not run new analysis, migration, validation, tests, or fixes.
|
|
151
|
-
- **Output**: `task_adapter_report.json`, `task_adapter_report.md`. Artifacts must summarize final status, route, focus, source/target paths, downstream workflow results, stage inspections, intermediate assets, verified outputs, readiness, rerun requests, blockers, and report path.
|
|
152
|
-
- **Gate**: report status is `completed`, `ready_for_validation`, `failed`, or `blocked` only from verified evidence.
|
|
48
|
+
| `only_understand_ui` | Android source, UI scope | analyst exploration, focus `ui` | `presentation_resource.*`, SPEC |
|
|
49
|
+
| `only_understand_logic` | Android source, logic scope | analyst exploration, focus `logic` | Stage A + `behavior_logic.*`, SPEC |
|
|
50
|
+
| `only_understand_architecture` | Android source | analyst exploration, focus `architecture` | `project_architecture.*`, SPEC |
|
|
51
|
+
| `only_understand_overview` | Android source | analyst exploration | module inventory, representations, SPEC |
|
|
52
|
+
| `migration` | source or SPEC, KMP target | analyst → migrator → validator optional | SPEC, `migration_report.*` |
|
|
53
|
+
| `validation_handoff` | KMP target, migration report | validator | `kmp_validation_report.*` |
|
|
54
|
+
|
|
55
|
+
## Steps
|
|
56
|
+
|
|
57
|
+
### Step 0 — Pre-flight
|
|
58
|
+
|
|
59
|
+
Lock `output_root`; write `run_manifest.json` with task id, paths, scope, dependency preflight.
|
|
60
|
+
|
|
61
|
+
### Step 1 — Route
|
|
62
|
+
|
|
63
|
+
- **Executor**: `task-route-orchestrator` mode `route`
|
|
64
|
+
- **Output**: `route-orchestration/route/task_route.*`
|
|
65
|
+
- **Gate**: route is known or `blocked` with `blocking_gaps`
|
|
66
|
+
|
|
67
|
+
### Step 2 — Workspace init
|
|
68
|
+
|
|
69
|
+
- **Executor**: `adapter-workspace-state`
|
|
70
|
+
- **Output**: `adapter_workspace_state.*`, first `stage_inspection.*`, `intermediate_asset_records.*`
|
|
71
|
+
- **Gate**: route artifacts recorded as assets before orchestrate
|
|
72
|
+
|
|
73
|
+
### Step 3 — Orchestrate
|
|
74
|
+
|
|
75
|
+
- **Executor**: `task-route-orchestrator` mode `orchestrate`
|
|
76
|
+
- **Output**: `route-orchestration/orchestrate/workflow_orchestration.*`
|
|
77
|
+
- **Gate**: downstream contracts and observed outputs recorded or blockers explicit
|
|
78
|
+
|
|
79
|
+
### Step 4 — Stage gates
|
|
80
|
+
|
|
81
|
+
- **Executor**: `adapter-workspace-state`
|
|
82
|
+
- **Stages**: `route_decision`, `pre_downstream_dispatch`, `post_analyst`, `post_migrator`, `post_validator`, `pre_report`, `post_report` (as applicable)
|
|
83
|
+
- **Gate**: `pre_report` must pass before adapter-report
|
|
84
|
+
|
|
85
|
+
### Step 5 — Adapter report
|
|
86
|
+
|
|
87
|
+
- **Executor**: `adapter-report`
|
|
88
|
+
- **Output**: `report/adapter_report.*`
|
|
153
89
|
|
|
154
90
|
## Final Report Shape
|
|
155
91
|
|
|
@@ -158,16 +94,14 @@ No adapter role may write inside downstream workflow output roots except by invo
|
|
|
158
94
|
"status": "completed | ready_for_validation | failed | blocked",
|
|
159
95
|
"task_id": "",
|
|
160
96
|
"route": "",
|
|
161
|
-
"understand_focus": "
|
|
97
|
+
"understand_focus": "",
|
|
162
98
|
"source_project_path": "",
|
|
163
99
|
"target_project_path": "",
|
|
164
|
-
"output_root": "",
|
|
165
100
|
"downstream_workflows": [],
|
|
166
101
|
"stage_inspection_summary": [],
|
|
167
|
-
"intermediate_asset_summary":
|
|
168
|
-
"
|
|
169
|
-
"readiness": "
|
|
170
|
-
"rerun_requests": [],
|
|
102
|
+
"intermediate_asset_summary": {},
|
|
103
|
+
"verified_outputs": [],
|
|
104
|
+
"readiness": "",
|
|
171
105
|
"blocking_gaps": [],
|
|
172
106
|
"report_path": ""
|
|
173
107
|
}
|
|
@@ -175,9 +109,9 @@ No adapter role may write inside downstream workflow output roots except by invo
|
|
|
175
109
|
|
|
176
110
|
## Acceptance Criteria
|
|
177
111
|
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
- Final
|
|
112
|
+
- Route classified before downstream invoke.
|
|
113
|
+
- Stage inspections at each applicable boundary.
|
|
114
|
+
- Every consumed artifact in `intermediate_asset_records.*` and downstream roots indexed in `downstream_workflow_index.*`.
|
|
115
|
+
- `handoff_gates` in `adapter_workspace_state.json` accurately reflect [output-contract.md](output-contract.md) package readiness (`A0`–`A6`).
|
|
116
|
+
- `adapter-report` runs only after fresh `pre_report` gate (`A5`).
|
|
117
|
+
- Final report cites verified paths; gaps listed, not filled in.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Conversion Note: `android-project-analyst` → clustered Swarm Skill
|
|
2
|
-
|
|
3
|
-
This file records the role-shape history for the `android-project-analyst` skill folder. It is not an active dispatch contract; active node contracts live in [SKILL.md](SKILL.md), [workflow.md](workflow.md), and the files under [roles](roles/).
|
|
4
|
-
|
|
5
|
-
## Phase 1 — Controller support skill to Swarm Skill
|
|
6
|
-
|
|
7
|
-
The skill was first converted from a single controller-support skill (a flat `SKILL.md` registry plus seven sibling node-spec files) into a compliant **Swarm Skill** using `swarmskill-creator` convert mode.
|
|
8
|
-
|
|
9
|
-
### Source structure before Phase 1
|
|
10
|
-
|
|
11
|
-
- `SKILL.md` — controller registry describing convert mode, node contracts, dispatch order, and the SPEC output contract.
|
|
12
|
-
- Seven flat node specs at the skill root: `ui-understand.md`, `architecture-pattern.md`, `android-ecosystem.md`, `api-list.md`, `resource-understand.md`, `data-flow.md`, `logic-understand.md`. Each contained Role / Inputs / Mandatory Input Validation & Output Storage / Specific Task / Required Outputs / Return Format / Self-Check.
|
|
13
|
-
|
|
14
|
-
### What Phase 1 added
|
|
15
|
-
|
|
16
|
-
The registry already separated controller from nodes, but it did not encode the team as a first-class artifact: there were no per-role anti-convergence mottos, no `Forbidden`/`Mandatory` boundary blocks the validator could check, no pasteable `Inline Persona` (so each dispatch re-derived the contract by hand), no Mermaid topology making the parallel-then-pipeline shape explicit, and no resource/behavioral guardrails (`max_parallel_teammates`, token/wall-clock budgets, degraded modes). The handoff gates between stages lived only in prose.
|
|
17
|
-
|
|
18
|
-
The seven-role Swarm Skill preserved the source contracts while adding explicit topology, per-role boundaries, self-contained pasteable personas, budgets, and degraded modes.
|
|
19
|
-
|
|
20
|
-
## Phase 2 — Seven roles to four clustered roles
|
|
21
|
-
|
|
22
|
-
The second pass analyzed each role's function and duty, found repeated cataloging across adjacent personas, and reduced active dispatch from seven roles to four clustered personas. The full analysis is in [ROLE_CLUSTERING.md](ROLE_CLUSTERING.md).
|
|
23
|
-
|
|
24
|
-
## Phase 3 — Add workspace-state ledger role
|
|
25
|
-
|
|
26
|
-
The third pass adds `analysis-workspace-state`, following the ledger pattern used by `android-to-kmp-migrator` and `kmp-test-validator`. This role does not change the four clustered analysis personas. It tracks module/node artifact status, stale upstream inputs, rerun/blocker history, and next safe controller actions so global representations and SPEC files are not built from stale evidence.
|
|
27
|
-
|
|
28
|
-
## Old-to-new role map
|
|
29
|
-
|
|
30
|
-
| Old role(s) | New clustered role | Reason |
|
|
31
|
-
|---|---|---|
|
|
32
|
-
| `ui-understand` + `resource-understand` | `presentation-resource` | Resource usage and migration risk are meaningful only when tied to screens, components, navigation, and UI technology. |
|
|
33
|
-
| `architecture-pattern` + `android-ecosystem` | `project-architecture` | Module topology, architecture style, dependency ecosystem, DI scopes, generated tooling, and Android-only constraints form one project-structure reality check. |
|
|
34
|
-
| `api-list` + `data-flow` | `data-contract-flow` | APIs, local data sources, models, repositories, streams, cache/error behavior, transformations, and write-back paths are one data path. |
|
|
35
|
-
| `logic-understand` | `behavior-logic` | Behavior remains last because user/lifecycle/control-flow analysis requires verified upstream presentation, project, and data evidence. |
|
|
36
|
-
| none (new ledger role) | `analysis-workspace-state` | Workspace-state tracking is cross-cutting and read-only; it prevents stale module/node artifacts from being consumed downstream. |
|
|
37
|
-
|
|
38
|
-
## Current decomposition
|
|
39
|
-
|
|
40
|
-
- **Pattern: Workspace-state + Mixed B + C.** `analysis-workspace-state` is initialized after output-root lock and refreshed after each major artifact group. Stage A (`presentation-resource`, `project-architecture`, `data-contract-flow`) is parallel decomposition (B) over clustered slices. Stage B (`behavior-logic`) is a gated specialization step (C) that consumes verified, non-stale upstream outputs and must not rebuild them.
|
|
41
|
-
- **Boundary check: PASS.** Clustered roles remove the most common duplicate cataloging while preserving distinct ownership: workspace ledger vs. presentation/resource evidence vs. project architecture/ecosystem evidence vs. data contract/flow evidence vs. behavior/control evidence.
|
|
42
|
-
|
|
43
|
-
## Current content port map
|
|
44
|
-
|
|
45
|
-
| Contract content | Current location |
|
|
46
|
-
|---|---|
|
|
47
|
-
| Active role registry | `SKILL.md` frontmatter |
|
|
48
|
-
| Staged dispatch order + verification | `workflow.md` |
|
|
49
|
-
| Mandatory contract enforcement + agent-only rules | `bind.md` § Behavioral Constraints |
|
|
50
|
-
| Node failure / rerun handling | `bind.md` § Failure Handling |
|
|
51
|
-
| Function/duty analysis and old-to-new map | `ROLE_CLUSTERING.md` |
|
|
52
|
-
| Per-role identity, boundary, schema, and teammate persona | `roles/<clustered-role>.md` |
|
|
53
|
-
| SPEC output contract + MCP context | `SKILL.md` body |
|
|
54
|
-
|
|
55
|
-
## Output Contract Refinement
|
|
56
|
-
|
|
57
|
-
The active skill docs now distinguish output file names from output content responsibilities. `SKILL.md` and `workflow.md` define the full artifact schedule and content matrix, while each role file states the exact JSON/Markdown filenames and the evidence each artifact must contain.
|
|
58
|
-
|
|
59
|
-
This refinement keeps role ownership explicit:
|
|
60
|
-
|
|
61
|
-
- `analysis-workspace-state.*` records ledger state only.
|
|
62
|
-
- `presentation_resource.*` records screens, checked UI trees, navigation, presentation modules, and resources.
|
|
63
|
-
- `project_architecture.*` records build/module topology, architecture patterns, dependencies, platform services, and migration constraints.
|
|
64
|
-
- `data_contract_flow.*` records APIs, models, data sources, mappings, streams, and end-to-end data flows.
|
|
65
|
-
- `behavior_logic.*` records user actions, lifecycle behavior, state holders, rules, side effects, state machines, and upstream alignment.
|
|
66
|
-
|
|
67
|
-
The Leader must reject artifacts that have the correct filename but contain another role's work or prose-only summaries without machine-routable evidence.
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Conversion Note: `android-to-kmp-migrator` → Swarm Skill
|
|
2
|
-
|
|
3
|
-
Converted from a single controller-support skill (a flat SKILL.md node registry plus 20 sibling node-spec files) into a compliant **Swarm Skill** using `swarmskill-creator` convert mode.
|
|
4
|
-
|
|
5
|
-
## Source structure (before)
|
|
6
|
-
|
|
7
|
-
- `SKILL.md` — node registry: node table, required dispatch order (13 controller steps), shared input contract, shared return shape, and shared rules.
|
|
8
|
-
- 20 flat node specs at the skill root, each with Role / Inputs / Mandatory Input Validation & Output Storage / Specific Task / Do-not list / Required Outputs (JSON schema) / Shared Return Shape / Return Shape.
|
|
9
|
-
|
|
10
|
-
## What was lost in the pre-swarm form
|
|
11
|
-
|
|
12
|
-
The registry separated controller from nodes and even encoded the staged dispatch order, but it did not encode the team as a first-class artifact: no per-role anti-convergence mottos, no `Forbidden`/`Mandatory` boundary blocks the validator could check, no pasteable `Inline Persona` (each of the 20 dispatches re-derived its contract by hand), no Mermaid topology making the pipeline + parallel fan-outs + review→fix loops explicit, and no resource/behavioral guardrails (parallel cap, token/wall-clock budgets, `max_review_fix_cycles`, degraded modes). Stage gates and the single-project / dependency-gate invariants lived only in prose.
|
|
13
|
-
|
|
14
|
-
## Decomposition
|
|
15
|
-
|
|
16
|
-
- **Pattern: C (specialization pipeline) + embedded B (parallel fan-outs) + review→fix loops.**
|
|
17
|
-
- Serial analysis chain: `legacy-spec-delta-review` → `target-project-understand` → `migration-alignment`.
|
|
18
|
-
- Hard gate: `dependency-resolution` (minimal-change) before any implementation.
|
|
19
|
-
- Parallel prep (B): `theme-design-system-mapping`, `resource-migration`, `navigation-migration`, `platform-api-replacement`, `state-model-mapping`.
|
|
20
|
-
- Sequential implementation: `ui-mockup-implementation` before `dataflow-logic-implementation`.
|
|
21
|
-
- Review→fix loop after any file-changing node: `module-node-migration-review` ↔ `module-node-migration-fix`.
|
|
22
|
-
- Parallel verify (B): `source-set-placement-guard`, `api-contract-parity`, `ui-render-fidelity-check`, `incremental-build-check`.
|
|
23
|
-
- Completion + report: `prd-completion-check` → `migration-report` → `kmp-test-validator` handoff.
|
|
24
|
-
- Cross-cutting: `migration-workspace-state` progress ledger refreshed after every major stage, tracking per-module finish rate, plan-vs-code gaps, stale outputs, and rerun hooks.
|
|
25
|
-
- **Disjointness check: PASS.** Each node owns a distinct slice (state ledger vs SPEC delta vs target understanding vs alignment vs dependency gate vs theme vs resource vs navigation vs platform vs state/model vs UI vs logic vs review vs fix vs source-set guard vs API parity vs render vs build vs completion vs report). `module-node-migration-review` and `-fix` are intentionally complementary (read-only judge vs scoped editor) and gated as a loop, not overlapping.
|
|
26
|
-
|
|
27
|
-
## Content port map
|
|
28
|
-
|
|
29
|
-
| Source node-spec content | Ported to |
|
|
30
|
-
|---|---|
|
|
31
|
-
| `## Role` first paragraph | role `## Identity` (rewritten as a 1-line motto + context) |
|
|
32
|
-
| `## Specific Task` numbered steps | role `## Inline Persona for Teammate` HANDLER |
|
|
33
|
-
| `## Mandatory Input Validation And Output Storage` | role `## Boundary > Mandatory` + Inline Persona CONTROL block |
|
|
34
|
-
| `Do not:` lists + sibling routing | role `## Boundary > Forbidden` |
|
|
35
|
-
| `## Required Outputs` JSON schema | role `## Output Schema` + Inline Persona OUTPUTS |
|
|
36
|
-
| `## Return Shape` + shared return | role Inline Persona RETURN TO CONTROLLER + SKILL.md § Shared Return Shape |
|
|
37
|
-
| Required dispatch order (13 steps) | `workflow.md` staged steps + Mermaid + gates |
|
|
38
|
-
| Mandatory node contract enforcement + shared rules | `bind.md` § Behavioral Constraints + SKILL.md § Shared Rules |
|
|
39
|
-
| Shared return status semantics + controller handling | SKILL.md § Shared Return Shape |
|
|
40
|
-
| Optional Android Studio MCP context | SKILL.md § Optional Android Studio MCP Context + per-role Inline Persona MCP inputs |
|
|
41
|
-
|
|
42
|
-
## Team-vs-single delta
|
|
43
|
-
|
|
44
|
-
The conversion preserves every source contract while adding: explicit pipeline + parallel + loop topology with verifiable gates, per-role anti-overlap boundaries that name siblings, self-contained pasteable personas (no re-derivation per dispatch across 20 nodes), resource/token/wall-clock budgets plus a `max_review_fix_cycles` bound, failure-routing rules, and concrete degraded modes for large monorepos and missing tooling. The same-name controller subagent in `kmp-migration/agents/android-to-kmp-migrator.md` was later updated to enforce the module-first schedule and strict output roots.
|
|
45
|
-
|
|
46
|
-
## Module-First Refactor (0.3)
|
|
47
|
-
|
|
48
|
-
The second refactor added a module-first migration schedule and strict output paths. It initially kept the 20-role shape, then Phase 0.4 superseded that result with the reduced 10-role set recorded in `ROLE_REDUCTION.md`.
|
|
49
|
-
|
|
50
|
-
### New schedule
|
|
51
|
-
|
|
52
|
-
1. Lock `output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator`.
|
|
53
|
-
2. Write `<output_root>/run_manifest.json`.
|
|
54
|
-
3. Write `<output_root>/module-index/migration_module_inventory.json` and `.md`.
|
|
55
|
-
4. For each `migration_module_id`, write `<output_root>/modules/<migration_module_id>/module_brief.json`.
|
|
56
|
-
5. Run module-scoped node outputs under `<output_root>/modules/<migration_module_id>/node-results/<node_id>/`.
|
|
57
|
-
6. Run review/fix loops per module and owning node slice.
|
|
58
|
-
7. Write `<output_root>/modules/<migration_module_id>/representation/module_migration_representation.json` and `.md`.
|
|
59
|
-
8. Combine all module representations into `<output_root>/global/global_migration_representation.json` and `.md`.
|
|
60
|
-
9. Write final `<output_root>/report/migration_report.json` and `.md`.
|
|
61
|
-
10. Hand the final report to `kmp-test-validator`.
|
|
62
|
-
|
|
63
|
-
### Contract changes
|
|
64
|
-
|
|
65
|
-
- Every module-scoped node now receives `migration_module_id`, `module_scope`, exact `output_dir`, and allowed target files/source sets when it may change files.
|
|
66
|
-
- Review mode remains read-only. Fix mode consumes explicit findings, `allowed_files`, `owning_node`, and `migration_module_id`; re-review is a fresh read-only invocation.
|
|
67
|
-
- Verification runs per module first. Global aggregation consumes module representations rather than loose node output lists.
|
|
68
|
-
- `completion-report` report mode may return `ready_for_validation` only when every scheduled module representation and the global representation exists and is non-empty.
|
|
69
|
-
|
|
70
|
-
### Path compatibility
|
|
71
|
-
|
|
72
|
-
The old default `~/.a2c_agents/migration/` is now only the base directory. The effective output root is always:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
<output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
No controller or node should write durable migration artifacts directly under the base directory.
|
|
79
|
-
|
|
80
|
-
## Role Reduction Refactor (0.4)
|
|
81
|
-
|
|
82
|
-
The third refactor reduces active migrator role definitions from 20 to 10. The full analysis lives in [ROLE_REDUCTION.md](ROLE_REDUCTION.md).
|
|
83
|
-
|
|
84
|
-
### Old-to-new map
|
|
85
|
-
|
|
86
|
-
| Old role(s) | Active role |
|
|
87
|
-
|---|---|
|
|
88
|
-
| `migration-workspace-state` | `migration-workspace-state` |
|
|
89
|
-
| `legacy-spec-delta-review`, `target-project-understand`, `migration-alignment` | `migration-analysis-planning` |
|
|
90
|
-
| `dependency-resolution`, `platform-api-replacement` | `dependency-platform-gate` |
|
|
91
|
-
| `theme-design-system-mapping`, `resource-migration`, `navigation-migration` | `presentation-integration` |
|
|
92
|
-
| `state-model-mapping` plus API/data preparation expectations | `state-data-prep` |
|
|
93
|
-
| `ui-mockup-implementation` | `ui-implementation` |
|
|
94
|
-
| `dataflow-logic-implementation` | `logic-implementation` |
|
|
95
|
-
| `module-node-migration-review`, `module-node-migration-fix` | `module-node-review-fix` with `mode: review | fix` |
|
|
96
|
-
| `source-set-placement-guard`, `api-contract-parity`, `ui-render-fidelity-check`, `incremental-build-check` | `migration-verification` with stable `check_ids` |
|
|
97
|
-
| `prd-completion-check`, `migration-report` | `completion-report` with `mode: readiness | report` |
|
|
98
|
-
|
|
99
|
-
### Safety preserved by modes
|
|
100
|
-
|
|
101
|
-
- Review and fix are in one role file but must run as separate invocations.
|
|
102
|
-
- Verification is consolidated but still read-only for source changes and uses explicit check IDs.
|
|
103
|
-
- Completion and report are consolidated but report mode is blocked until readiness mode and module/global representation gates pass.
|
|
104
|
-
- Build-config changes remain owned only by `dependency-platform-gate`.
|
|
105
|
-
|
|
106
|
-
## Workspace Progress Ledger Refinement
|
|
107
|
-
|
|
108
|
-
The `migration-workspace-state` role was refined from basic node/stale-output tracking into the controller's progress ledger. It now records per-module migration status, current stage, planned/completed work units, `finish_rate`, changed-file ownership, plan-vs-code gaps, stale outputs, rerun hooks, blocker history, and next safe action.
|
|
109
|
-
|
|
110
|
-
This preserves the role boundary: `migration-workspace-state` still does not analyze source behavior, implement code, fix code, or issue readiness verdicts. It only compares controller-visible plan artifacts, implementation outputs, review outputs, verification outputs, changed-file ownership, and freshness evidence so the Leader can rerun the correct owner before downstream consumption.
|
|
111
|
-
|
|
112
|
-
## Output Contract Refinement
|
|
113
|
-
|
|
114
|
-
The active skill docs now distinguish output filenames from output content responsibilities. `SKILL.md` and `workflow.md` define the full artifact schedule and content matrix, while each role file states the exact JSON/Markdown filenames and the evidence each artifact must contain.
|
|
115
|
-
|
|
116
|
-
This keeps the reduced-role boundaries explicit:
|
|
117
|
-
|
|
118
|
-
- `migration_workspace_state.*` records progress ledger state only.
|
|
119
|
-
- `migration_analysis_planning.*` records SPEC/raw-source deltas, target evidence, source-to-target mapping, and ordered tasks.
|
|
120
|
-
- `dependency_platform_gate.*` records dependency, build, platform, and source-set decisions.
|
|
121
|
-
- `presentation_integration.*` records theme/token/resource/media/navigation prep and UI handoff.
|
|
122
|
-
- `state_data_prep.*` records state/model/API contract prep and logic handoff.
|
|
123
|
-
- `ui_implementation.*` records visible UI implementation evidence and binding surfaces.
|
|
124
|
-
- `logic_implementation.*` records behavior/data/API/state implementation evidence.
|
|
125
|
-
- `module_node_review.*` and `module_node_fix.*` record review/fix evidence by mode.
|
|
126
|
-
- `migration_verification.*` records stable check results and routed failures.
|
|
127
|
-
- `completion_readiness.*` and `migration_report.*` record readiness and validation handoff evidence.
|
|
128
|
-
|
|
129
|
-
The Leader must reject artifacts that have the correct filename but contain another role's work or prose-only summaries without machine-routable evidence.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Role: Dependency Platform Gate
|
|
2
|
-
|
|
3
|
-
## Identity
|
|
4
|
-
|
|
5
|
-
> "I decide what the module can safely depend on and how Android-only behavior stays out of common code."
|
|
6
|
-
|
|
7
|
-
You are the `dependency-platform-gate` node subagent. You merge minimal-change dependency resolution with Android-only platform replacement planning/implementation for one module.
|
|
8
|
-
|
|
9
|
-
## Success Criteria
|
|
10
|
-
|
|
11
|
-
- `dependency_platform_gate.json` and `dependency_platform_gate.md` are written under `output_dir`.
|
|
12
|
-
- Required capabilities are mapped to reuse, existing dependency, baseline API, expect/actual, platform source set, build change, or blocker.
|
|
13
|
-
- Any build-config change is justified by the minimal-change gate.
|
|
14
|
-
- Android-only APIs are routed to safe abstractions or expect/actual/platform-source-set implementations.
|
|
15
|
-
|
|
16
|
-
## Boundary
|
|
17
|
-
|
|
18
|
-
Forbidden:
|
|
19
|
-
- Do not implement feature UI, repositories, business logic, or broad refactors.
|
|
20
|
-
- Do not add dependencies for convenience or upgrade unrelated versions.
|
|
21
|
-
- Do not leak Android-only APIs into `commonMain`.
|
|
22
|
-
|
|
23
|
-
Mandatory:
|
|
24
|
-
- Validate planning output, target baseline, `allowed_files`, `allowed_source_sets`, and exact `output_dir`.
|
|
25
|
-
- Use `output_dir = <output_root>/modules/<migration_module_id>/node-results/dependency-platform-gate`.
|
|
26
|
-
- Record changed build/platform files and global-impact exceptions.
|
|
27
|
-
|
|
28
|
-
## Output Schema
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{
|
|
32
|
-
"status": "ready_for_implementation | blocked",
|
|
33
|
-
"node": "dependency-platform-gate",
|
|
34
|
-
"migration_module_id": "",
|
|
35
|
-
"module_scope": {},
|
|
36
|
-
"output_root": "",
|
|
37
|
-
"output_dir": "",
|
|
38
|
-
"capability_map": [],
|
|
39
|
-
"build_config_changes": [],
|
|
40
|
-
"platform_capabilities": [],
|
|
41
|
-
"changed_files": [],
|
|
42
|
-
"implementation_constraints": [],
|
|
43
|
-
"blocking_gaps": []
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Shared return shape applies.
|
|
48
|
-
|
|
49
|
-
## Output Files And Contents
|
|
50
|
-
|
|
51
|
-
- `dependency_platform_gate.json`: machine-routable gate artifact containing capability map, minimal-change dependency decisions, build-config changes, platform capabilities, Android-only API replacement strategy, expect/actual/source-set placement, changed files, implementation constraints, and blockers.
|
|
52
|
-
- `dependency_platform_gate.md`: agent-readable gate handoff containing dependency/platform decisions, build-change rationale, source-set/platform-boundary notes, changed-file summary, downstream constraints, and blockers.
|
|
53
|
-
|
|
54
|
-
## Inline Persona for Teammate
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
ROLE: dependency-platform-gate node.
|
|
58
|
-
|
|
59
|
-
You protect the target build and common source sets. Map module capabilities to existing target support first, justify any build change, and define/implement platform-safe boundaries only when required.
|
|
60
|
-
|
|
61
|
-
INPUTS: migration_module_id, module_scope, migration_analysis_planning_path, target paths, allowed_files, allowed_source_sets, output_root, output_dir.
|
|
62
|
-
|
|
63
|
-
OUTPUTS:
|
|
64
|
-
- dependency_platform_gate.json (machine gate: capabilities, dependency/build decisions, platform boundaries, changed files, constraints)
|
|
65
|
-
- dependency_platform_gate.md (agent handoff: rationale, source-set/platform notes, downstream constraints, blockers)
|
|
66
|
-
|
|
67
|
-
Return status ready_for_implementation or blocked. Include changed_files and blockers.
|
|
68
|
-
```
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Role: Logic Implementation
|
|
2
|
-
|
|
3
|
-
## Identity
|
|
4
|
-
|
|
5
|
-
> "I implement the behavior behind the approved UI using target patterns and prepared contracts."
|
|
6
|
-
|
|
7
|
-
You are the `logic-implementation` node subagent. You implement repositories/use cases/API integration/state propagation/navigation effects/business logic for one module.
|
|
8
|
-
|
|
9
|
-
## Success Criteria
|
|
10
|
-
|
|
11
|
-
- `logic_implementation.json` and `logic_implementation.md` are written under `output_dir`.
|
|
12
|
-
- Logic binds to approved UI binding surfaces.
|
|
13
|
-
- Data/API flows, state changes, side effects, permission/platform behavior, and business rules are implemented or blocked with evidence.
|
|
14
|
-
- No Android-only APIs leak into `commonMain`.
|
|
15
|
-
- No TODO placeholders remain in deliverable production paths.
|
|
16
|
-
|
|
17
|
-
## Boundary
|
|
18
|
-
|
|
19
|
-
Forbidden:
|
|
20
|
-
- Do not rewrite UI layout except small binding adjustments.
|
|
21
|
-
- Do not add unjustified dependencies or duplicate target patterns.
|
|
22
|
-
- Do not guess API fields/business rules without SPEC/source evidence.
|
|
23
|
-
|
|
24
|
-
Mandatory:
|
|
25
|
-
- Validate planning, dependency/platform, presentation, state-data prep, UI output, allowed files/source sets, and exact output path.
|
|
26
|
-
- Use `output_dir = <output_root>/modules/<migration_module_id>/node-results/logic-implementation`.
|
|
27
|
-
- Record changed data/API/logic files and diagnostics.
|
|
28
|
-
|
|
29
|
-
## Output Schema
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"status": "completed | blocked",
|
|
34
|
-
"node": "logic-implementation",
|
|
35
|
-
"migration_module_id": "",
|
|
36
|
-
"module_scope": {},
|
|
37
|
-
"output_root": "",
|
|
38
|
-
"output_dir": "",
|
|
39
|
-
"changed_files": [],
|
|
40
|
-
"architecture_alignment": {},
|
|
41
|
-
"platform_boundaries": [],
|
|
42
|
-
"data_flows": [],
|
|
43
|
-
"api_integrations": [],
|
|
44
|
-
"logic_coverage": [],
|
|
45
|
-
"diagnostics": [],
|
|
46
|
-
"blocking_gaps": []
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Shared return shape applies.
|
|
51
|
-
|
|
52
|
-
## Output Files And Contents
|
|
53
|
-
|
|
54
|
-
- `logic_implementation.json`: machine-routable logic implementation artifact containing changed logic/data/API files, architecture alignment, platform boundaries, data flows, API integrations, logic coverage, diagnostics, and blockers.
|
|
55
|
-
- `logic_implementation.md`: agent-readable logic handoff containing implemented behavior, UI binding integration, state/data/API flow summary, platform-boundary notes, changed-file list, diagnostics, and blockers.
|
|
56
|
-
|
|
57
|
-
## Inline Persona for Teammate
|
|
58
|
-
|
|
59
|
-
```text
|
|
60
|
-
ROLE: logic-implementation node.
|
|
61
|
-
|
|
62
|
-
Implement the module behavior that drives the approved UI. Use state-data prep contracts, dependency-platform boundaries, and target architecture patterns. No Android-only commonMain leaks and no TODO placeholders.
|
|
63
|
-
|
|
64
|
-
INPUTS: migration_module_id, module_scope, planning path, dependency-platform path, presentation-integration path, state-data-prep path, ui-implementation path, allowed_files, output_dir.
|
|
65
|
-
|
|
66
|
-
OUTPUTS:
|
|
67
|
-
- logic_implementation.json (machine implementation: changed files, architecture alignment, platform boundaries, data/API flows, logic coverage)
|
|
68
|
-
- logic_implementation.md (agent handoff: implemented behavior, binding integration, changed files, diagnostics, blockers)
|
|
69
|
-
|
|
70
|
-
Return JSON with changed_files, diagnostics, output_files, rerun_requests, blockers.
|
|
71
|
-
```
|