@code-migration/wow-migrator 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/android-project-analyst/SKILL.md +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 +65 -92
- package/skills/migration-task-adapter/bind.md +25 -92
- package/skills/migration-task-adapter/dependencies.yaml +21 -10
- package/skills/migration-task-adapter/roles/adapter-report.md +71 -0
- package/skills/migration-task-adapter/roles/adapter-workspace-state.md +71 -0
- package/skills/migration-task-adapter/roles/task-route-orchestrator.md +103 -0
- package/skills/migration-task-adapter/workflow.md +71 -143
- package/skills/android-project-analyst/MIGRATION.md +0 -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,87 +1,77 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: migration-task-adapter
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
Use when a controller must decide
|
|
4
|
+
Front-door Swarm Skill that classifies Android/KMP migration requests, routes understand/migration/validation tasks to analyst, migrator, and validator workflows, and records stage gates plus asset ledgers before the final adapter report.
|
|
5
|
+
Use when a controller must decide task intent and invoke the correct downstream workflow before detailed analysis, migration, or validation runs.
|
|
6
6
|
Do NOT use for direct source lookup, single-file edits, generic KMP testing without migration context, or standalone implementation work.
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.2"
|
|
8
8
|
kind: swarm-skill
|
|
9
9
|
disable-model-invocation: true
|
|
10
10
|
roles:
|
|
11
|
-
- id: task-
|
|
11
|
+
- id: task-route-orchestrator
|
|
12
12
|
kind: ai_agent
|
|
13
|
-
purpose: Task
|
|
14
|
-
skills: []
|
|
15
|
-
tools: [rg]
|
|
16
|
-
- id: workflow-orchestrator
|
|
17
|
-
kind: ai_agent
|
|
18
|
-
purpose: Workflow orchestration owner - consume the route decision, build downstream analyst/migrator/validator dispatch contracts, record observed workflow results, and request reruns without doing downstream role work.
|
|
13
|
+
purpose: Task route and orchestration — mode route (classify intent, paths, downstream sequence) or orchestrate (dispatch contracts, observed downstream outputs). No downstream role work.
|
|
19
14
|
skills: []
|
|
20
15
|
tools: [rg, git]
|
|
21
|
-
- id: workspace-state
|
|
16
|
+
- id: adapter-workspace-state
|
|
22
17
|
kind: ai_agent
|
|
23
|
-
purpose:
|
|
18
|
+
purpose: Workspace ledger — stage inspections, intermediate asset records, path compliance, freshness, reruns. No routing, orchestration, or final verdict.
|
|
24
19
|
skills: []
|
|
25
20
|
tools: [git]
|
|
26
|
-
- id:
|
|
21
|
+
- id: adapter-report
|
|
27
22
|
kind: ai_agent
|
|
28
|
-
purpose: Final
|
|
23
|
+
purpose: Final adapter report from verified route, orchestration, workspace, stage, and downstream evidence. No new routing or workflow execution.
|
|
29
24
|
skills: []
|
|
30
25
|
tools: [git]
|
|
31
26
|
---
|
|
32
27
|
|
|
33
28
|
# Migration Task Adapter Swarm Skill
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
Front-door adapter for the KMP Migration Toolkit. It does not replace `android-project-analyst`, `android-to-kmp-migrator`, or `kmp-test-validator`. It classifies the user task, invokes the right downstream workflow, enforces stage gates, records consumed artifacts, and produces a final adapter report.
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
## Task Routes
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
| Route | Downstream |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `only_understand_ui` | `android-project-analyst` — UI/presentation focus |
|
|
37
|
+
| `only_understand_logic` | `android-project-analyst` — behavior/control-flow focus |
|
|
38
|
+
| `only_understand_architecture` | `android-project-analyst` — architecture/ecosystem focus |
|
|
39
|
+
| `only_understand_overview` | `android-project-analyst` — full representation + SPEC |
|
|
40
|
+
| `migration` | analyst (if SPEC stale) → `android-to-kmp-migrator` → optional `kmp-test-validator` |
|
|
41
|
+
| `validation_handoff` | `kmp-test-validator` when migration evidence exists |
|
|
45
42
|
|
|
46
43
|
## Protocol Summary
|
|
47
44
|
|
|
48
|
-
0. **Pre-flight**
|
|
49
|
-
1. **
|
|
50
|
-
2. **Workspace
|
|
51
|
-
3. **
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- validation handoff routes to `kmp-test-validator` only after migration report evidence exists.
|
|
55
|
-
4. **Stage inspections** - after every route boundary and downstream workflow boundary, refresh `workspace-state-discipline-inspector`.
|
|
56
|
-
5. **Task report** - dispatch `task-reporter` only after latest discipline inspection marks required inputs fresh and intermediate asset records complete.
|
|
45
|
+
0. **Pre-flight** — [dependencies.yaml](dependencies.yaml); lock adapter `output_root`.
|
|
46
|
+
1. **Route** — `task-route-orchestrator` mode `route` → `task_route.*`.
|
|
47
|
+
2. **Workspace init** — `adapter-workspace-state` → ledger, first stage inspection, asset records.
|
|
48
|
+
3. **Orchestrate** — `task-route-orchestrator` mode `orchestrate` → downstream dispatch contracts and observed outputs.
|
|
49
|
+
4. **Stage gates** — refresh `adapter-workspace-state` after each route and downstream boundary.
|
|
50
|
+
5. **Report** — `adapter-report` when `pre_report` stage passes and assets are complete.
|
|
57
51
|
|
|
58
52
|
## Roles
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
| `
|
|
65
|
-
| `workflow-orchestrator` | Build dispatch contracts, track downstream workflow observations, route reruns/blockers | After route decision and before/after downstream workflow execution | [roles/workflow-orchestrator.md](roles/workflow-orchestrator.md) |
|
|
66
|
-
| `workspace-state-discipline-inspector` | Inspect stage records, intermediate assets, output paths, workspace freshness, reruns | Initialized early and refreshed after every stage boundary | [roles/workspace-state-discipline-inspector.md](roles/workspace-state-discipline-inspector.md) |
|
|
67
|
-
| `task-reporter` | Final machine-routable report from verified adapter/downstream artifacts | Last stage only | [roles/task-reporter.md](roles/task-reporter.md) |
|
|
54
|
+
| id | Modes | Role file |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `task-route-orchestrator` | `route \| orchestrate` | [roles/task-route-orchestrator.md](roles/task-route-orchestrator.md) |
|
|
57
|
+
| `adapter-workspace-state` | — | [roles/adapter-workspace-state.md](roles/adapter-workspace-state.md) |
|
|
58
|
+
| `adapter-report` | — | [roles/adapter-report.md](roles/adapter-report.md) |
|
|
68
59
|
|
|
69
60
|
## Files
|
|
70
61
|
|
|
71
|
-
| File |
|
|
62
|
+
| File | Contents |
|
|
72
63
|
|---|---|
|
|
73
|
-
| [workflow.md](workflow.md) |
|
|
74
|
-
| [bind.md](bind.md) | Guardrails,
|
|
75
|
-
| [dependencies.yaml](dependencies.yaml) |
|
|
76
|
-
| [roles/](roles/) |
|
|
64
|
+
| [workflow.md](workflow.md) | Topology, route matrix, stage gates, report shape |
|
|
65
|
+
| [bind.md](bind.md) | Guardrails, path contract, failure handling |
|
|
66
|
+
| [dependencies.yaml](dependencies.yaml) | Downstream skills and optional tools |
|
|
67
|
+
| [roles/](roles/) | Role specs |
|
|
77
68
|
|
|
78
|
-
##
|
|
69
|
+
## Output Layout
|
|
79
70
|
|
|
80
71
|
```text
|
|
81
72
|
output_root = <output_dir or ~/.a2c_agents/task-adapter>/migration-task-adapter
|
|
82
|
-
task_dir = <output_root>/task
|
|
83
73
|
workspace_state_dir = <output_root>/workspace-state
|
|
84
|
-
|
|
74
|
+
route_orchestration_dir = <output_root>/route-orchestration
|
|
85
75
|
stage_inspection_dir = <output_root>/stage-inspections
|
|
86
76
|
intermediate_asset_dir = <output_root>/intermediate-assets
|
|
87
77
|
report_dir = <output_root>/report
|
|
@@ -89,64 +79,47 @@ report_dir = <output_root>/report
|
|
|
89
79
|
|
|
90
80
|
Required artifacts:
|
|
91
81
|
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
- `<orchestration_dir>/workflow_orchestration.json`
|
|
102
|
-
- `<orchestration_dir>/workflow_orchestration.md`
|
|
103
|
-
- `<report_dir>/task_adapter_report.json`
|
|
104
|
-
- `<report_dir>/task_adapter_report.md`
|
|
105
|
-
|
|
106
|
-
## Output Artifact Content Matrix
|
|
107
|
-
|
|
108
|
-
The adapter verifies both artifact names and role-aligned content before any downstream stage consumes an artifact.
|
|
109
|
-
|
|
110
|
-
| Stage / owner | Output file(s) | Required content |
|
|
111
|
-
|---|---|---|
|
|
112
|
-
| Output root lock / Leader | `run_manifest.json` | Task id, raw task summary, requested scope, source/target paths when provided, adapter output root, allowed roots, downstream workflow candidates, dependency-preflight status, schedule version, timestamp. |
|
|
113
|
-
| Task route / `task-understanding-router` | `task_understanding_router.json`, `task_understanding_router.md` | Normalized task, route, task kind, understand focus, source/target/scope fields, existing artifact evidence, required/missing inputs, downstream workflow sequence, stage inspection requirements, intermediate asset requirements, blockers. |
|
|
114
|
-
| Orchestration / `workflow-orchestrator` | `workflow_orchestration.json`, `workflow_orchestration.md` | Downstream workflow sequence, dispatch contracts, expected output roots/artifacts, route constraints, stage inspection requests, observed downstream outputs, intermediate asset updates, rerun requests, blockers. |
|
|
115
|
-
| Workspace discipline / `workspace-state-discipline-inspector` | `workspace_state_discipline.json`, `workspace_state_discipline.md` | Adapter artifact inventory, stage status, path compliance, freshness checks, intermediate asset coverage, rerun history, blockers, next safe actions. No task routing or downstream analysis. |
|
|
116
|
-
| Stage inspections / `workspace-state-discipline-inspector` | `<stage_inspection_dir>/<stage_id>/stage_inspection.json`, `.md` | Checked inputs/outputs, path compliance, freshness checks, intermediate asset coverage, downstream contract checks, stage status, rerun requests, blockers, next allowed stage. |
|
|
117
|
-
| Intermediate assets / `workspace-state-discipline-inspector` | `intermediate_asset_records.json`, `intermediate_asset_records.md` | Stable records for every consumed adapter/downstream artifact: asset id/type, producer, path, status, freshness basis, consumers, source evidence, coverage gaps, blockers. |
|
|
118
|
-
| Final task report / `task-reporter` | `task_adapter_report.json`, `task_adapter_report.md` | Final route/status/readiness, source/target paths, downstream workflow summaries, stage inspection summary, intermediate asset summary, verified outputs, rerun requests, blockers, report path. |
|
|
82
|
+
- `run_manifest.json`
|
|
83
|
+
- `route-orchestration/route/task_route.json`, `.md`
|
|
84
|
+
- `workspace-state/adapter_workspace_state.json`, `.md`
|
|
85
|
+
- `route-orchestration/orchestrate/workflow_orchestration.json`, `.md`
|
|
86
|
+
- `stage-inspections/<stage_id>/stage_inspection.json`, `.md`
|
|
87
|
+
- `intermediate-assets/intermediate_asset_records.json`, `.md`
|
|
88
|
+
- `report/adapter_report.json`, `.md`
|
|
89
|
+
|
|
90
|
+
Downstream workflows write only to their own output roots; the adapter records paths in asset records.
|
|
119
91
|
|
|
120
|
-
|
|
92
|
+
## Artifact Owners
|
|
121
93
|
|
|
122
|
-
|
|
94
|
+
| Owner | Artifacts |
|
|
95
|
+
|---|---|
|
|
96
|
+
| Leader | `run_manifest.json` |
|
|
97
|
+
| `task-route-orchestrator` | `task_route.*`, `workflow_orchestration.*` |
|
|
98
|
+
| `adapter-workspace-state` | `adapter_workspace_state.*`, `stage_inspection.*`, `intermediate_asset_records.*` |
|
|
99
|
+
| `adapter-report` | `adapter_report.*` |
|
|
123
100
|
|
|
124
101
|
## Shared Return Contract
|
|
125
102
|
|
|
126
103
|
```json
|
|
127
104
|
{
|
|
128
105
|
"status": "completed | routed | passed | ready_for_report | needs_rerun | failed | blocked",
|
|
129
|
-
"node": "
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
106
|
+
"node": "node-id",
|
|
107
|
+
"mode": "route | orchestrate",
|
|
108
|
+
"task_id": "",
|
|
109
|
+
"route": "",
|
|
110
|
+
"output_dir": "",
|
|
111
|
+
"output_files": [],
|
|
134
112
|
"changed_files": [],
|
|
135
113
|
"stale_upstream_inputs": [],
|
|
136
|
-
"rerun_requests": [
|
|
137
|
-
{ "node": "<adapter or downstream node/workflow>", "reason": "", "required_inputs": [], "expected_output": "" }
|
|
138
|
-
],
|
|
114
|
+
"rerun_requests": [],
|
|
139
115
|
"blocking_gaps": []
|
|
140
116
|
}
|
|
141
117
|
```
|
|
142
118
|
|
|
143
|
-
Controller handling: missing or empty output files cause rerun of the same role. Stale upstream inputs cause a discipline refresh and rerun of the owning role or downstream workflow. Non-empty `blocking_gaps` stop the adapter unless the user supplies the missing evidence.
|
|
144
|
-
|
|
145
119
|
## Shared Rules
|
|
146
120
|
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
- User-facing completion happens only after `task-reporter` writes verified report artifacts.
|
|
121
|
+
- Adapter roles orchestrate only — no Android analysis, migration implementation, validation testing, or code fixes.
|
|
122
|
+
- Route classification happens before downstream workflow selection.
|
|
123
|
+
- Every consumed durable artifact must appear in `intermediate_asset_records.*`.
|
|
124
|
+
- Downstream evidence is consumed by path and status only — never invented.
|
|
125
|
+
- Final user-facing completion requires `adapter_report.*`.
|
|
@@ -4,113 +4,46 @@
|
|
|
4
4
|
|
|
5
5
|
| Item | Limit | Reason |
|
|
6
6
|
|---|---|---|
|
|
7
|
-
| `max_parallel_teammates` | 1 |
|
|
8
|
-
| `total_wall_clock_budget` | 20 min
|
|
9
|
-
| `total_token_budget` | 300k
|
|
10
|
-
| `per_node_token_budget` |
|
|
11
|
-
| `max_route_retries` | 2 |
|
|
12
|
-
| `
|
|
7
|
+
| `max_parallel_teammates` | 1 | Serial control plane; stage gates around downstream boundaries |
|
|
8
|
+
| `total_wall_clock_budget` | 20 min | Adapter overhead only; downstream workflows keep own budgets |
|
|
9
|
+
| `total_token_budget` | 300k | Record contracts and ledgers; do not duplicate downstream analysis |
|
|
10
|
+
| `per_node_token_budget` | 90k | Narrow roles cite paths, not full downstream outputs |
|
|
11
|
+
| `max_route_retries` | 2 | Persistent ambiguity → user blocker |
|
|
12
|
+
| `max_stage_repairs` | 2 per stage | Rerun `adapter-workspace-state`; do not bypass gates |
|
|
13
13
|
|
|
14
14
|
## Behavioral Constraints
|
|
15
15
|
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **Strict output root
|
|
19
|
-
- **Downstream boundary
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **Only-understand focus is a route constraint, not a license to skip evidence gates**: focused UI, logic, architecture, and overview understanding still require analyst artifacts and verification. The focus determines priority and reporting emphasis.
|
|
27
|
-
- **Migration readiness**: migration may not start from raw source alone when the migrator requires analyst completion. If fresh SPEC evidence is missing, route analyst in migration mode first.
|
|
28
|
-
- **Report-only finalization**: only `task-reporter` issues the adapter final task status, and only from verified adapter and downstream artifacts.
|
|
29
|
-
|
|
30
|
-
## Stage Inspection Contract
|
|
31
|
-
|
|
32
|
-
Each stage inspection artifact must include:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"stage_id": "",
|
|
37
|
-
"status": "pass | needs_rerun | blocked",
|
|
38
|
-
"checked_inputs": [],
|
|
39
|
-
"checked_outputs": [],
|
|
40
|
-
"path_compliance": [],
|
|
41
|
-
"freshness_checks": [],
|
|
42
|
-
"intermediate_asset_coverage": [],
|
|
43
|
-
"downstream_contract_checks": [],
|
|
44
|
-
"rerun_requests": [],
|
|
45
|
-
"blocking_gaps": [],
|
|
46
|
-
"next_allowed_stage": ""
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Inspection rules:
|
|
51
|
-
|
|
52
|
-
- `pass` requires all required inputs and outputs to exist, be non-empty, be under allowed roots, and be recorded in intermediate assets when consumed.
|
|
53
|
-
- `needs_rerun` requires a concrete owner and expected output.
|
|
54
|
-
- `blocked` requires a user/actionable gap or unavailable environment/tool/evidence.
|
|
55
|
-
|
|
56
|
-
## Intermediate Asset Record Contract
|
|
57
|
-
|
|
58
|
-
Every asset record must be stable and machine-routable:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"asset_id": "",
|
|
63
|
-
"asset_type": "run_manifest | route_decision | stage_inspection | workspace_state | downstream_output | representation | spec | migration_report | validation_report | final_report | log | other",
|
|
64
|
-
"producer": "",
|
|
65
|
-
"path": "",
|
|
66
|
-
"status": "exists | missing | stale | blocked | not_applicable",
|
|
67
|
-
"created_or_observed_at": "",
|
|
68
|
-
"freshness_basis": "",
|
|
69
|
-
"consumers": [],
|
|
70
|
-
"source_evidence": [],
|
|
71
|
-
"blocking_gaps": []
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
No downstream stage may consume a durable artifact whose record is `missing`, `stale`, or `blocked`.
|
|
16
|
+
- **Orchestrator only** — classify, route, inspect, record, report. No analysis, migration, validation, or code edits.
|
|
17
|
+
- **Route before downstream** — `task-route-orchestrator` mode `route` completes before workflow invoke.
|
|
18
|
+
- **Strict output root** — `output_root = <output_dir or ~/.a2c_agents/task-adapter>/migration-task-adapter`.
|
|
19
|
+
- **Downstream boundary** — analyst/migrator/validator artifacts stay in their output roots; adapter records paths in asset ledger.
|
|
20
|
+
- **Validator root** — validation artifacts under parallel `validation` root, not migration root.
|
|
21
|
+
- **Stage gates** — every route and downstream boundary gets `stage_inspection.*` with `pass | needs_rerun | blocked`.
|
|
22
|
+
- **Asset ledger** — every consumed durable artifact has one record with producer, path, status, freshness.
|
|
23
|
+
- **No hidden fallbacks** — missing/stale evidence → rerun request to owning workflow.
|
|
24
|
+
- **Migration readiness** — migrator requires fresh analyst SPEC; route analyst first when missing.
|
|
25
|
+
- **Final verdict** — only `adapter-report` issues adapter final status.
|
|
76
26
|
|
|
77
27
|
## Failure Handling
|
|
78
28
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
| Failure mode | Response |
|
|
29
|
+
| Failure | Response |
|
|
82
30
|
|---|---|
|
|
83
|
-
| Node timeout | Retry once
|
|
84
|
-
| Malformed
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
| Downstream workflow output missing/empty | Route rerun to the owning downstream workflow or role; do not create adapter-side replacement artifacts. |
|
|
90
|
-
| Downstream output stale | Refresh the owning downstream workspace-state workflow if available, then rerun the owning workflow/role before consumption. |
|
|
91
|
-
| Downstream workflow returns blocked | Preserve its blocker in adapter stage inspection and final report. Do not downgrade to a partial pass. |
|
|
92
|
-
|
|
93
|
-
### Input over-scale degradation
|
|
31
|
+
| Node timeout | Retry once; then `[ROLE MISSING]` and block dependent stages |
|
|
32
|
+
| Malformed or out-of-path output | Rerun owning role with path contract |
|
|
33
|
+
| Ambiguous route | Rerun mode `route`; then ask user for path/scope |
|
|
34
|
+
| Missing stage inspection | Rerun `adapter-workspace-state` for `stage_id` |
|
|
35
|
+
| Missing asset record | Rerun workspace state before consumption |
|
|
36
|
+
| Downstream missing/stale | Rerun owning downstream workflow |
|
|
94
37
|
|
|
95
|
-
|
|
96
|
-
|---|---|
|
|
97
|
-
| User asks for whole-project overview without a scope on a very large Android project | Route to `only_understand_overview` with a scope-narrowing blocker or ask for feature/module priority. |
|
|
98
|
-
| User asks for migration without a KMP target path | Route classification may complete, but orchestration blocks before migrator dispatch. |
|
|
99
|
-
| User asks for validation without migration report/SPEC evidence | Route to `validation_handoff` only as blocked, listing required migration evidence. |
|
|
100
|
-
| Existing downstream artifacts are too large to inspect inline | Record paths and status only; require downstream report/verification artifacts instead of pasting node contents. |
|
|
101
|
-
|
|
102
|
-
## Required Path Contract
|
|
38
|
+
## Path Contract
|
|
103
39
|
|
|
104
40
|
```json
|
|
105
41
|
{
|
|
106
42
|
"output_root": "<output_dir or ~/.a2c_agents/task-adapter>/migration-task-adapter",
|
|
107
|
-
"task_dir": "<output_root>/task",
|
|
108
43
|
"workspace_state_dir": "<output_root>/workspace-state",
|
|
109
|
-
"
|
|
44
|
+
"route_orchestration_dir": "<output_root>/route-orchestration",
|
|
110
45
|
"stage_inspection_dir": "<output_root>/stage-inspections",
|
|
111
46
|
"intermediate_asset_dir": "<output_root>/intermediate-assets",
|
|
112
47
|
"report_dir": "<output_root>/report"
|
|
113
48
|
}
|
|
114
49
|
```
|
|
115
|
-
|
|
116
|
-
Reject adapter artifacts outside this path contract. For downstream workflows, record their own output roots as external asset paths with producer workflow metadata.
|
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
# dependencies.yaml -
|
|
2
|
-
#
|
|
3
|
-
# All tools are optional. The adapter can still route and report with file-system
|
|
4
|
-
# evidence, but degraded checks must be recorded in stage inspections.
|
|
1
|
+
# dependencies.yaml — migration-task-adapter startup check
|
|
5
2
|
|
|
6
3
|
skills:
|
|
7
4
|
- name: android-project-analyst
|
|
8
5
|
required: false
|
|
9
|
-
|
|
6
|
+
used_by:
|
|
7
|
+
- task-route-orchestrator
|
|
8
|
+
purpose: Downstream for understand routes and pre-migration SPEC.
|
|
10
9
|
- name: android-to-kmp-migrator
|
|
11
10
|
required: false
|
|
12
|
-
|
|
11
|
+
used_by:
|
|
12
|
+
- task-route-orchestrator
|
|
13
|
+
purpose: Downstream for migration after analyst evidence is fresh.
|
|
13
14
|
- name: kmp-test-validator
|
|
14
15
|
required: false
|
|
15
|
-
|
|
16
|
+
used_by:
|
|
17
|
+
- task-route-orchestrator
|
|
18
|
+
purpose: Downstream for validation when migration report exists; validation root is parallel to migration.
|
|
16
19
|
|
|
17
20
|
tools:
|
|
18
21
|
- name: rg
|
|
19
22
|
required: false
|
|
20
|
-
|
|
23
|
+
used_by:
|
|
24
|
+
- task-route-orchestrator
|
|
25
|
+
purpose: Optional evidence discovery for routing.
|
|
21
26
|
- name: git
|
|
22
27
|
required: false
|
|
23
|
-
|
|
28
|
+
used_by:
|
|
29
|
+
- task-route-orchestrator
|
|
30
|
+
- adapter-workspace-state
|
|
31
|
+
- adapter-report
|
|
32
|
+
purpose: Changed-file and freshness checks for ledger and report.
|
|
24
33
|
- name: curl
|
|
25
34
|
required: false
|
|
26
|
-
|
|
35
|
+
used_by:
|
|
36
|
+
- task-route-orchestrator
|
|
37
|
+
purpose: Optional; downstream analyst presentation workflows may fetch remote media.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Role: Adapter Report
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
|
|
5
|
+
> "I issue the final adapter verdict from verified route, orchestration, workspace, stage, and downstream evidence only."
|
|
6
|
+
|
|
7
|
+
You are the `adapter-report` node subagent. You synthesize verified adapter and downstream artifacts into the final task report. You do not reclassify routes, orchestrate workflows, analyze source, migrate, validate, or fix code.
|
|
8
|
+
|
|
9
|
+
## Success Criteria
|
|
10
|
+
|
|
11
|
+
- `adapter_report.json` and `adapter_report.md` under `report_dir`.
|
|
12
|
+
- Final status from verified evidence: `completed`, `ready_for_validation`, `needs_rerun`, `failed`, or `blocked`.
|
|
13
|
+
- Every claim cites an adapter artifact, stage inspection, asset record, or downstream report path.
|
|
14
|
+
- Missing `pre_report` inspection or stale required inputs → `needs_rerun` or `blocked`.
|
|
15
|
+
|
|
16
|
+
## Status Rules
|
|
17
|
+
|
|
18
|
+
- `completed` — understand route satisfied; inspections pass; assets recorded.
|
|
19
|
+
- `ready_for_validation` — migration report ready; validation not run in this adapter pass.
|
|
20
|
+
- `needs_rerun` — concrete owner can resolve missing/stale evidence.
|
|
21
|
+
- `failed` — downstream workflow failed with verified evidence.
|
|
22
|
+
- `blocked` — missing path, evidence, or user decision.
|
|
23
|
+
|
|
24
|
+
## Boundary
|
|
25
|
+
|
|
26
|
+
**Forbidden**:
|
|
27
|
+
|
|
28
|
+
- Do not repair stage inspections or alter orchestration contracts.
|
|
29
|
+
- Do not claim downstream pass without report artifacts and latest stage inspection support.
|
|
30
|
+
|
|
31
|
+
**Mandatory**:
|
|
32
|
+
|
|
33
|
+
- Validate all required input paths; use latest `pre_report` stage inspection before reporting.
|
|
34
|
+
|
|
35
|
+
## Output Schema
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"status": "completed | ready_for_validation | needs_rerun | failed | blocked",
|
|
40
|
+
"node": "adapter-report",
|
|
41
|
+
"task_id": "",
|
|
42
|
+
"route": "",
|
|
43
|
+
"understand_focus": "ui | logic | architecture | overview | mixed | none",
|
|
44
|
+
"source_project_path": "",
|
|
45
|
+
"target_project_path": "",
|
|
46
|
+
"downstream_workflows": [],
|
|
47
|
+
"stage_inspection_summary": [],
|
|
48
|
+
"intermediate_asset_summary": {},
|
|
49
|
+
"verified_outputs": [],
|
|
50
|
+
"readiness": "ready | ready_with_assumptions | ready_for_validation | blocked",
|
|
51
|
+
"rerun_requests": [],
|
|
52
|
+
"blocking_gaps": [],
|
|
53
|
+
"report_path": ""
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Output Files
|
|
58
|
+
|
|
59
|
+
- `adapter_report.json`, `adapter_report.md`
|
|
60
|
+
|
|
61
|
+
## Inline Persona
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
ROLE: adapter-report.
|
|
65
|
+
|
|
66
|
+
Synthesize final adapter status from task_route, workflow_orchestration, adapter_workspace_state, stage inspections, asset records, and downstream reports.
|
|
67
|
+
|
|
68
|
+
INPUTS: task_id, route, task_route_path, workflow_orchestration_path, adapter_workspace_state_path, pre_report_stage_inspection_path, intermediate_asset_records_path, downstream_report_paths, report_dir.
|
|
69
|
+
|
|
70
|
+
Do not reclassify, orchestrate, analyze, migrate, validate, or fix.
|
|
71
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Role: Adapter Workspace State
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
|
|
5
|
+
> "I keep the adapter ledger honest — stage gates, asset records, path compliance, and stale inputs."
|
|
6
|
+
|
|
7
|
+
You are the `adapter-workspace-state` node subagent. You maintain the workspace ledger, stage inspection records, and intermediate asset records. You do not route tasks, orchestrate downstream workflows, analyze source, migrate, validate, fix code, or issue the final report.
|
|
8
|
+
|
|
9
|
+
## Success Criteria
|
|
10
|
+
|
|
11
|
+
- `adapter_workspace_state.json` and `.md` under `workspace_state_dir`.
|
|
12
|
+
- Per requested `stage_id`: `stage_inspection.json` and `.md` under `stage_inspection_dir/<stage_id>/`.
|
|
13
|
+
- `intermediate_asset_records.json` and `.md` under `intermediate_asset_dir`.
|
|
14
|
+
- Every consumed artifact has one asset record; every stage declares `pass`, `needs_rerun`, or `blocked`.
|
|
15
|
+
|
|
16
|
+
## Boundary
|
|
17
|
+
|
|
18
|
+
**Forbidden**:
|
|
19
|
+
|
|
20
|
+
- Do not classify routes or build dispatch contracts (`task-route-orchestrator`).
|
|
21
|
+
- Do not issue final adapter status (`adapter-report`).
|
|
22
|
+
- Do not move or rewrite downstream workflow artifacts.
|
|
23
|
+
|
|
24
|
+
**Mandatory**:
|
|
25
|
+
|
|
26
|
+
- Validate `output_root`, stage and asset dirs, and known artifact paths.
|
|
27
|
+
- Treat missing/stale/out-of-path artifacts as `needs_rerun` or `blocked`.
|
|
28
|
+
|
|
29
|
+
## Output Schema
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"status": "passed | needs_rerun | blocked",
|
|
34
|
+
"node": "adapter-workspace-state",
|
|
35
|
+
"task_id": "",
|
|
36
|
+
"route": "",
|
|
37
|
+
"current_stage_id": "",
|
|
38
|
+
"stage_status": [],
|
|
39
|
+
"artifact_inventory": [],
|
|
40
|
+
"path_compliance": [],
|
|
41
|
+
"freshness_checks": [],
|
|
42
|
+
"rerun_history": [],
|
|
43
|
+
"blocking_gaps": [],
|
|
44
|
+
"next_actions": []
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Stage IDs
|
|
49
|
+
|
|
50
|
+
- `route_decision` — after task-route-orchestrator mode `route`
|
|
51
|
+
- `pre_downstream_dispatch` — before downstream invoke
|
|
52
|
+
- `post_analyst` | `post_migrator` | `post_validator` — after applicable workflow
|
|
53
|
+
- `pre_report` | `post_report` — around adapter-report
|
|
54
|
+
|
|
55
|
+
## Output Files
|
|
56
|
+
|
|
57
|
+
- `adapter_workspace_state.json`, `adapter_workspace_state.md`
|
|
58
|
+
- `<stage_inspection_dir>/<stage_id>/stage_inspection.json`, `.md`
|
|
59
|
+
- `<intermediate_asset_dir>/intermediate_asset_records.json`, `.md`
|
|
60
|
+
|
|
61
|
+
## Inline Persona
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
ROLE: adapter-workspace-state.
|
|
65
|
+
|
|
66
|
+
Inspect stage gates, record intermediate assets, track freshness and path compliance. Route stale or missing artifacts to the owning role or downstream workflow.
|
|
67
|
+
|
|
68
|
+
INPUTS: task_id, route, current_stage_id, output_root, known_artifacts, consumed_artifacts, downstream_observations, output_dir, stage_inspection_dir, intermediate_asset_dir.
|
|
69
|
+
|
|
70
|
+
Do not route, orchestrate, analyze, migrate, validate, or report final status.
|
|
71
|
+
```
|