@code-migration/wow-migrator 0.1.2 → 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 +71 -28
- package/skills/android-project-analyst/bind.md +12 -6
- 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 +30 -8
- package/skills/android-project-analyst/roles/behavior-logic.md +12 -5
- package/skills/android-project-analyst/roles/data-contract-flow.md +11 -4
- package/skills/android-project-analyst/roles/presentation-resource.md +13 -4
- package/skills/android-project-analyst/roles/project-architecture.md +11 -4
- package/skills/android-project-analyst/workflow.md +88 -39
- package/skills/android-to-kmp-migrator/SKILL.md +62 -111
- package/skills/android-to-kmp-migrator/bind.md +29 -61
- 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 +11 -2
- 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 +47 -23
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +207 -20
- package/skills/android-to-kmp-migrator/roles/module-implementation.md +82 -0
- package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +9 -2
- package/skills/android-to-kmp-migrator/roles/target-project-assistant.md +104 -0
- package/skills/android-to-kmp-migrator/workflow.md +71 -170
- package/skills/kmp-test-validator/SKILL.md +63 -45
- package/skills/kmp-test-validator/bind.md +30 -36
- 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 +30 -16
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +12 -4
- package/skills/kmp-test-validator/workflow.md +62 -97
- package/skills/migration-task-adapter/SKILL.md +67 -76
- package/skills/migration-task-adapter/bind.md +25 -89
- 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 -53
- package/skills/android-to-kmp-migrator/MIGRATION.md +0 -104
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +0 -63
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +0 -66
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +0 -65
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +0 -65
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +0 -63
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +0 -64
- package/skills/kmp-test-validator/MIGRATION.md +0 -58
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +0 -67
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +0 -66
- package/skills/kmp-test-validator/roles/validation-remediation.md +0 -112
- package/skills/kmp-test-validator/roles/validation-test-runner.md +0 -61
- package/skills/migration-task-adapter/MIGRATION.md +0 -34
- package/skills/migration-task-adapter/roles/task-reporter.md +0 -129
- package/skills/migration-task-adapter/roles/task-understanding-router.md +0 -134
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +0 -140
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +0 -189
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: android-project-analyst
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
Use when the android-project-analyst controller must understand, document, onboard, or migration-prep an existing Android project by dividing it into modules first,
|
|
4
|
+
Module-first Swarm Skill that converts a Legacy Android project into module-indexed artifacts, per-module dimension folders, cross-module architecture/data-logic records, a workspace-state ledger, a global representation, and an integrated SPEC package (PRD/DESIGN/PLAN/verification) under strict output paths.
|
|
5
|
+
Use when the android-project-analyst controller must understand, document, onboard, or migration-prep an existing Android project by dividing it into modules first, analyzing each module across presentation/architecture/data/behavior dimensions, recording inter-module assembly basis separately, then combining module representations into a full-project representation.
|
|
6
6
|
Do NOT use for quick file/symbol lookup, non-Android codebases, or single-agent skill authoring.
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.6"
|
|
8
8
|
kind: swarm-skill
|
|
9
9
|
disable-model-invocation: true
|
|
10
10
|
roles:
|
|
@@ -39,20 +39,63 @@ roles:
|
|
|
39
39
|
|
|
40
40
|
This is the agent-facing registry and team definition for the `android-project-analyst` controller (the same-name subagent in `kmp-migration/agents/`). It converts a Legacy Android source project into verified module artifacts, a global project representation, and SPEC artifacts for downstream onboarding, exploration, and migration agents.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
**Canonical file recording system**: [output-contract.md](output-contract.md) defines every output path, required content, write order, and downstream **handoff package gates** (`P0`–`P6`). Downstream handlers (`migration-task-adapter`, `android-to-kmp-migrator`, `kmp-test-validator`) trigger only when the declared package artifacts exist, are non-empty, in-path, and not stale. The Leader MUST read `output-contract.md` before the first dispatch and MUST NOT claim completion without updating `handoff_gates` in the workspace ledger and `SPEC/verification.md`.
|
|
43
|
+
|
|
44
|
+
The team is **module-first Mixed B+C with a workspace-state ledger**: the Leader partitions the project into `analysis_modules`, writes index artifacts and one `modules/<module_id>/` folder per module, maintains `analysis-workspace-state` before downstream consumption, runs three foundation nodes in **parallel** (B) inside each module, then a final **gated specialization** node (C) synthesizes module behavior from verified upstream outputs. The Leader writes a module representation per module, records cross-module architecture and data/logic separately under `global/`, then combines everything into `global_representation.*` and SPEC. The controller owns routing, strict output-path enforcement, reconciliation, workspace-state refreshes, and SPEC integration; nodes own bounded module analysis only.
|
|
45
|
+
|
|
46
|
+
## Module Partitioning Model
|
|
47
|
+
|
|
48
|
+
Analysis follows a three-layer artifact model. Downstream migration agents (`android-to-kmp-migrator`) consume this layout to assemble modules in dependency order.
|
|
49
|
+
|
|
50
|
+
### Layer 1 — Module index and module ID folders
|
|
51
|
+
|
|
52
|
+
The Leader divides in-scope source into bounded `analysis_modules` and materializes:
|
|
53
|
+
|
|
54
|
+
- **Index**: `module-index/module_inventory.*` is the authoritative module schedule; `module-index/modules_index.json` is the machine-routable lookup from `module_id` to folder paths, dimension roots, and representation paths.
|
|
55
|
+
- **Per-module root**: every scheduled `module_id` gets `<output_root>/modules/<module_id>/` before node dispatch. No module analysis may run without its folder and `module_brief.json`.
|
|
56
|
+
|
|
57
|
+
Partitioning rules:
|
|
58
|
+
|
|
59
|
+
- Prefer Gradle modules and feature packages; split one Gradle module into multiple `analysis_modules` when independent features/routes/packages warrant it.
|
|
60
|
+
- Every in-scope source root belongs to exactly one scheduled module or `out_of_scope`.
|
|
61
|
+
- `module_id` is a stable slug reused across inventory, folder names, node outputs, representations, global cross-module records, and migration handoff.
|
|
62
|
+
|
|
63
|
+
### Layer 2 — Multi-dimensional understanding inside each module folder
|
|
64
|
+
|
|
65
|
+
Each module is understood from four analysis dimensions. Dimension outputs live under the same `module_id` folder and are indexed by `dimension_index.json`:
|
|
66
|
+
|
|
67
|
+
| Dimension | Node | Storage path under `modules/<module_id>/` |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `presentation-resource` | `presentation-resource` | `node-results/presentation-resource/` |
|
|
70
|
+
| `project-architecture` | `project-architecture` | `node-results/project-architecture/` |
|
|
71
|
+
| `data-contract-flow` | `data-contract-flow` | `node-results/data-contract-flow/` |
|
|
72
|
+
| `behavior-logic` | `behavior-logic` | `node-results/behavior-logic/` |
|
|
73
|
+
|
|
74
|
+
The Leader writes `dimension_index.json` after all four node outputs verify. `representation/module_representation.*` synthesizes only from verified dimension artifacts for that `module_id`. Nodes must not write outside their assigned dimension directory.
|
|
75
|
+
|
|
76
|
+
### Layer 3 — Cross-module architecture and data/logic (migration assembly basis)
|
|
77
|
+
|
|
78
|
+
Inter-module relationships are **not** folded only into per-module representations. After every scheduled module has a representation, the Leader writes dedicated global artifacts before `global_representation.*`:
|
|
79
|
+
|
|
80
|
+
- `global/cross_module_architecture.*` — Gradle/topology glue, layer boundaries, navigation integration, shared platform services, DI scope bridges, and architectural dependency graph across `module_id`s.
|
|
81
|
+
- `global/cross_module_data_logic.*` — shared APIs/models/stores, cross-module data flows, event/callback/bus links, and cross-module control interactions.
|
|
82
|
+
- `global/migration_assembly_basis.*` — ordered module assembly sequence, integration checkpoints, shared contracts each module must preserve, and blockers for partial migration.
|
|
83
|
+
|
|
84
|
+
`global_representation.*` synthesizes from module representations plus the three cross-module artifacts above. SPEC `design.md` and migration-mode `plan.md` must cite these global cross-module artifacts when describing integration or assembly order.
|
|
43
85
|
|
|
44
86
|
## Workflow
|
|
45
87
|
|
|
46
88
|
The full playbook (Mermaid topology, per-step gates, integration rules, Final Report format) is in [workflow.md](workflow.md). Protocol summary:
|
|
47
89
|
|
|
48
|
-
0. **Pre-flight: check dependencies** — read [dependencies.yaml](dependencies.yaml)
|
|
90
|
+
0. **Pre-flight: check dependencies** — read [dependencies.yaml](dependencies.yaml): `tools[]` (`rg`, `curl`, `git`), `optional_mcp.jetbrains`, and migration-mode `downstream_handoff` **P6** requirements. Report `dependency_preflight` in `run_manifest.json`; **user decides** whether to proceed.
|
|
49
91
|
1. **Trigger + output root lock** — Leader verifies Android evidence and scope, selects `exploration` or `migration`, locks `output_root = <output_dir or ~/.a2c_agents/understand>/android-project-analyst`, and writes `run_manifest.json`.
|
|
50
|
-
2. **Workspace state** — dispatch `analysis-workspace-state` under `<output_root>/workspace-state/`; refresh it after module inventory, each module node group, each module representation, global representation, and SPEC.
|
|
51
|
-
3. **Module inventory** — Leader writes `module-index/module_inventory.json` and `.md`, dividing the project into deterministic `analysis_modules`
|
|
52
|
-
4. **Per-module Stage A (parallel, B-pattern)** — for each `module_id`, dispatch `presentation-resource`, `project-architecture`, and `data-contract-flow` under `<output_root>/modules/<module_id>/node-results/<
|
|
92
|
+
2. **Workspace state** — dispatch `analysis-workspace-state` under `<output_root>/workspace-state/`; refresh it after module inventory, each module node group, each module representation, cross-module global records, global representation, and SPEC.
|
|
93
|
+
3. **Module inventory + index** — Leader writes `module-index/module_inventory.json` and `.md`, plus `module-index/modules_index.json`, dividing the project into deterministic `analysis_modules` and creating each `modules/<module_id>/` folder with scopes and output roots.
|
|
94
|
+
4. **Per-module Stage A (parallel, B-pattern)** — for each `module_id`, dispatch `presentation-resource`, `project-architecture`, and `data-contract-flow` under `<output_root>/modules/<module_id>/node-results/<dimension>/`.
|
|
53
95
|
5. **Per-module Stage B (gated behavior stage, C-pattern)** — after that module's Stage A verifies and workspace-state marks upstream outputs fresh, dispatch `behavior-logic` under the same module root.
|
|
54
|
-
6. **Module representation** — Leader writes
|
|
55
|
-
7. **
|
|
96
|
+
6. **Module dimension index + representation** — Leader writes `dimension_index.json`, then `representation/module_representation.json` and `.md`, synthesizing all four dimensions for that `module_id` before moving to the next module.
|
|
97
|
+
7. **Cross-module global records** — Leader aggregates verified module outputs into `global/cross_module_architecture.*`, `global/cross_module_data_logic.*`, and `global/migration_assembly_basis.*`.
|
|
98
|
+
8. **Global representation + SPEC** — Leader combines module representations and cross-module global records into `global/global_representation.json` and `.md`, then writes SPEC under `<output_root>/SPEC`.
|
|
56
99
|
|
|
57
100
|
## Roles
|
|
58
101
|
|
|
@@ -74,13 +117,13 @@ Each node is dispatched as a subagent that must read its role file (`skill_spec_
|
|
|
74
117
|
|
|
75
118
|
| File | What it contains | When to read |
|
|
76
119
|
|---|---|---|
|
|
120
|
+
| [output-contract.md](output-contract.md) | Canonical path tree, artifact registry, JSON schemas, handoff packages `P0`–`P6`, downstream trigger rules | **Before first dispatch and before claiming handoff** — downstream handlers gate on this file |
|
|
77
121
|
| [workflow.md](workflow.md) | Mermaid B+C topology, step-by-step protocol with gates, integration rules, Final Report format | Before first dispatch — the complete playbook |
|
|
78
122
|
| [bind.md](bind.md) | Resource limits, team behavioral constraints, contract enforcement, failure & degraded modes | When hitting limits, handling failures, or scoping a large project |
|
|
79
|
-
| [ROLE_CLUSTERING.md](ROLE_CLUSTERING.md) | Function/duty analysis, old-to-new role mapping, and clustering rationale | When auditing role ownership or updating personas |
|
|
80
123
|
| [roles/\*.md](roles/) | Per-node identity, success criteria, boundary, output schema, Inline Persona for Teammate | Before dispatching each teammate — extract Inline Persona |
|
|
81
|
-
| [dependencies.yaml](dependencies.yaml) |
|
|
124
|
+
| [dependencies.yaml](dependencies.yaml) | CLI tools, optional `jetbrains` MCP, migration **P6** downstream handoff | Step 0 — verify deps, record `dependency_preflight`, user decides go/no-go |
|
|
82
125
|
|
|
83
|
-
##
|
|
126
|
+
## SPEC Output Contract
|
|
84
127
|
|
|
85
128
|
The Leader integrates verified module representations and the global representation into a SPEC package under `<output_root>/SPEC`:
|
|
86
129
|
|
|
@@ -93,24 +136,23 @@ The Leader integrates verified module representations and the global representat
|
|
|
93
136
|
|
|
94
137
|
SPEC documents must synthesize, not paste node summaries. Every important claim maps to node output + source-path evidence, or is marked an assumption or gap. Node Markdown outputs are agent-readable handoffs that preserve exact paths, evidence, gaps, and routing context.
|
|
95
138
|
|
|
96
|
-
## Strict Output Schedule
|
|
139
|
+
## Strict Output Schedule And Handoff Gates
|
|
140
|
+
|
|
141
|
+
The Leader MUST follow the write-order gates `G0`–`G9` and handoff packages `P0`–`P6` in [output-contract.md](output-contract.md). Summary:
|
|
142
|
+
|
|
143
|
+
| Gate | Artifacts | Unlocks |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `G0`–`G2` | `run_manifest.json`, workspace ledger, `module_inventory.*`, `modules_index.json` | Module dispatch (`P1`) |
|
|
146
|
+
| `G3`–`G5` | per-module `module_brief.json` + four dimension JSON/MD pairs | Dimension completeness (`P2`) |
|
|
147
|
+
| `G6` | per-module `dimension_index.json`, `module_representation.*` | Module handoff (`P3`) |
|
|
148
|
+
| `G7` | `cross_module_architecture.*`, `cross_module_data_logic.*`, `migration_assembly_basis.*` | Migrator scheduling (`P4`) |
|
|
149
|
+
| `G8`–`G9` | `global_representation.*`, `SPEC/*` | Exploration (`P5`) or migration (`P6`) pipeline entry |
|
|
97
150
|
|
|
98
|
-
|
|
151
|
+
Any artifact written outside the path tree in `output-contract.md` is **invalid** — downstream handlers MUST return `blocked` with `reason: out_of_path`.
|
|
99
152
|
|
|
100
|
-
|
|
101
|
-
2. `<output_root>/workspace-state/analysis_workspace_state.json` and `.md` (initialized and refreshed after each major group)
|
|
102
|
-
3. `<output_root>/module-index/module_inventory.json` and `.md`
|
|
103
|
-
4. For each `module_id` in deterministic `module_order`:
|
|
104
|
-
- `<output_root>/modules/<module_id>/module_brief.json`
|
|
105
|
-
- `<output_root>/modules/<module_id>/node-results/presentation-resource/presentation_resource.json` and `.md`
|
|
106
|
-
- `<output_root>/modules/<module_id>/node-results/project-architecture/project_architecture.json` and `.md`
|
|
107
|
-
- `<output_root>/modules/<module_id>/node-results/data-contract-flow/data_contract_flow.json` and `.md`
|
|
108
|
-
- `<output_root>/modules/<module_id>/node-results/behavior-logic/behavior_logic.json` and `.md`
|
|
109
|
-
- `<output_root>/modules/<module_id>/representation/module_representation.json` and `.md`
|
|
110
|
-
5. `<output_root>/global/global_representation.json` and `.md`
|
|
111
|
-
6. `<output_root>/SPEC/prd.md`, `design.md`, `verification.md`, and migration-only `plan.md`
|
|
153
|
+
Before final completion, the Leader MUST set `handoff_gates` in `analysis_workspace_state.json` and mirror them in `SPEC/verification.md` → `## Handoff Gates`. Set `run_manifest.json` → `handoff_package` to the highest ready package (`P0`..`P6`).
|
|
112
154
|
|
|
113
|
-
|
|
155
|
+
JSON artifacts are the machine-routable source of truth. Markdown artifacts are agent-readable handoffs. Full per-file content requirements live in [output-contract.md](output-contract.md) § Artifact Registry.
|
|
114
156
|
|
|
115
157
|
## Optional Android Studio MCP Context
|
|
116
158
|
|
|
@@ -123,3 +165,4 @@ When the `jetbrains` MCP server is available, the controller may pass indexed An
|
|
|
123
165
|
- Each node output must include source-path evidence for important claims; unknowns are marked explicitly, never guessed.
|
|
124
166
|
- Node outputs are intermediate artifacts for SPEC generation, not final user-facing documentation.
|
|
125
167
|
- No node or the Leader modifies the analyzed source project.
|
|
168
|
+
- Downstream handlers gate on file artifacts only — never on chat summaries. Missing package artifacts MUST yield `blocked`, not best-effort continuation.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|---|---|---|
|
|
7
7
|
| `max_parallel_teammates` | 3 | Matches the Stage A foundation fan-out (`presentation-resource`, `project-architecture`, `data-contract-flow`); Stage B is single. |
|
|
8
8
|
| `total_wall_clock_budget` | 30 min | Upper bound for one full module-first run; large monorepos should be scoped down per § (b). |
|
|
9
|
-
| `total_token_budget` | 560k tokens | Budget across
|
|
9
|
+
| `total_token_budget` | 560k tokens | Budget across active roles + Leader integration; workspace-state adds ledger checks. |
|
|
10
10
|
| `per_node_token_budget` | 120k tokens | Per node soft cap; `behavior-logic` and `data-contract-flow` may use the upper end because they consume or trace broad flow evidence. |
|
|
11
11
|
| `resource_download_budget` | 50 files / 50 MB | `presentation-resource` only — caps safe online-resource downloads; excess is recorded in `download_gaps`. |
|
|
12
12
|
| `max_modules_per_run` | 20 | Keeps module-first analysis bounded; larger projects must narrow `analysis_scope` or explicitly run multiple scoped passes. |
|
|
@@ -16,15 +16,17 @@
|
|
|
16
16
|
Team-level rules — distinct from each role's own `## Boundary`.
|
|
17
17
|
|
|
18
18
|
- **Leader-as-orchestrator only**: the Leader (`android-project-analyst` controller) verifies the trigger, builds the shared brief, dispatches nodes, verifies their outputs, refreshes `analysis-workspace-state`, reconciles, and writes SPEC. The Leader does NOT perform a node's detailed analysis, and does NOT invent any presentation/resource/architecture/ecosystem/data/behavior claim that no node traced to a source path.
|
|
19
|
-
- **Strict output schedule and paths**: the Leader MUST lock `output_root` before dispatch and write only the declared schedule artifacts: `run_manifest`, `workspace-state`, `module-index
|
|
19
|
+
- **Strict output schedule and paths**: the Leader MUST lock `output_root` before dispatch and write only the declared schedule artifacts: `run_manifest`, `workspace-state`, `module-index` (including `modules_index.json`), per-module `module_brief`, per-module dimension outputs under `node-results/<dimension>/`, per-module `dimension_index.json`, per-module `representation`, cross-module global records (`cross_module_architecture`, `cross_module_data_logic`, `migration_assembly_basis`), `global_representation`, and `SPEC`. Any node output outside its assigned directory is invalid.
|
|
20
20
|
- **Workspace-state discipline**: `analysis-workspace-state` is refreshed after module inventory, each module node group, each module representation, global representation, and SPEC. Downstream roles must not consume artifacts that the ledger marks stale; rerun the responsible node/module or mark the affected scope `blocked`.
|
|
21
|
-
- **Module-first invariant**: every in-scope source root belongs to an `analysis_modules[]` entry before node dispatch.
|
|
22
|
-
- **
|
|
21
|
+
- **Module-first invariant**: every in-scope source root belongs to an `analysis_modules[]` entry before node dispatch. Every scheduled `module_id` must have a materialized folder under `modules/<module_id>/` and a resolvable entry in `modules_index.json`. Each module must store all four dimension outputs in its module folder before `dimension_index.json` and `module_representation.*` are written. Cross-module architecture and data/logic must be recorded in dedicated `global/` artifacts before `global_representation.*`. The Leader must not build global SPEC directly from raw source or standalone node outputs.
|
|
22
|
+
- **Foundation slices, dispatch-time fixed (B-pattern, Stage A)**: each foundation node works ONLY on its assigned slice. Slices are fixed at dispatch and are not renegotiated between nodes; nodes do not see each other's working state during Stage A.
|
|
23
23
|
- **Gated handoff, no upstream mutation (C-pattern, Stage B)**: `behavior-logic` references upstream node outputs (by path) and enriches only where behavior analysis requires; it MUST NOT rebuild or overwrite an upstream node's catalog. If upstream data is missing/stale, it returns `needs_rerun`/`blocked` rather than reconstructing it.
|
|
24
24
|
- **Mandatory contract enforcement**: every node is dispatched with a complete module-scoped contract (`source_project_path`, `module_id`, `module_scope`, `module_brief_path`, required upstream artifacts, `analysis_scope`, `skill_spec_path`, exact `output_dir`). The Leader rejects any return that lacks required JSON/MD artifacts, omits produced files from `output_files`, writes outside the assigned path, or claims `completed`/`ready_*` without proven output storage.
|
|
25
|
+
- **Role-output content discipline**: required artifacts must contain the content owned by their role, not just the correct filename. For example, `presentation_resource.*` must contain screens/resources/navigation/UI-tree evidence, `project_architecture.*` must contain topology/build/dependency/platform evidence, `data_contract_flow.*` must contain APIs/data-source/model/flow evidence, and `behavior_logic.*` must contain action/lifecycle/rule/control-flow evidence. If content belongs to another role, rerun or route rather than accepting it.
|
|
25
26
|
- **Conflict handling**: when nodes disagree on a fact affecting architecture, data flow, resources, ecosystem constraints, behavior, or migration, the Leader surfaces it verbatim as `Needs confirmation` in `verification.md`. The Leader does NOT silently pick a winner or average findings.
|
|
26
27
|
- **No source modification**: no node and not the Leader may edit the analyzed Android project. `presentation-resource` writes downloads only under `<output_dir>/node-results/presentation-resource/downloaded_resources/` and never stores secrets/cookies/tokens.
|
|
27
28
|
- **Agent-only artifacts**: node outputs and SPEC files are structured for downstream agents/controllers, not human presentation; any user-facing summary is produced only after durable artifacts exist.
|
|
29
|
+
- **Downstream trigger discipline**: adherence to [output-contract.md](output-contract.md) is a hard trigger condition for downstream handlers. The Leader must evaluate handoff packages `P0`–`P6`, persist `handoff_gates` in the workspace ledger and `SPEC/verification.md`, and set `run_manifest.json` → `handoff_package`. Downstream workflows (`migration-task-adapter`, `android-to-kmp-migrator`, `kmp-test-validator`) MUST return `blocked` when required package paths are missing, empty, out-of-path, stale, or contract-invalid — they MUST NOT infer from chat or partial summaries.
|
|
28
30
|
|
|
29
31
|
## Failure Handling
|
|
30
32
|
|
|
@@ -33,12 +35,16 @@ Team-level rules — distinct from each role's own `## Boundary`.
|
|
|
33
35
|
| Failure mode | Response |
|
|
34
36
|
|---|---|
|
|
35
37
|
| Node timeout | Retry once with the same contract. On 2nd timeout, mark the node's slice `[ROLE MISSING — node timed out]` in `verification.md` and proceed with remaining outputs (downstream nodes that hard-require it return `blocked`). |
|
|
36
|
-
| Malformed output (does not match role `## Output Schema`,
|
|
38
|
+
| Malformed output (does not match role `## Output Schema`, files missing/empty, or artifact content does not match the role duty) | Re-dispatch once with the schema and role-owned output content inlined plus a "previous output was malformed/missing/out-of-duty" preamble. On 2nd failure, mark `[ROLE MISSING — malformed output]`. |
|
|
37
39
|
| Node returns `blocked` / `needs_rerun` (missing or stale upstream input) | Refresh `analysis-workspace-state`, resolve the named upstream gap first (re-run the upstream node), then re-dispatch this node. If unresolvable, record the `blocking_gap` and set readiness accordingly. |
|
|
38
40
|
| Node attempts to rebuild another node's catalog | Reject the return as out-of-scope; re-dispatch with the role `## Boundary > Forbidden` restated. |
|
|
39
41
|
| Node writes outside assigned path | Reject the return as invalid; re-dispatch with the exact assigned `output_dir`. Do not move or reuse out-of-path artifacts. |
|
|
40
42
|
| Workspace state marks a required artifact stale | Re-run the owning node or rebuild the owning representation before downstream consumption; do not synthesize around the stale artifact. |
|
|
41
|
-
| Global representation requested before module representations exist | STOP; write/repair missing module representations first, or mark affected modules `blocked` before global
|
|
43
|
+
| Global representation requested before module representations exist | STOP; write/repair missing module representations first, or mark affected modules `blocked` before cross-module global records. |
|
|
44
|
+
| Cross-module global records requested before all module representations exist | STOP; complete per-module `dimension_index.json` and `module_representation.*` first. |
|
|
45
|
+
| `modules_index.json` missing or cannot resolve a scheduled `module_id` | STOP; repair module inventory and index before node dispatch. |
|
|
46
|
+
| Completion claimed while target handoff package `P*` is false | Reject completion; update `handoff_gates`, set `readiness: blocked`, list `missing_paths` per [output-contract.md](output-contract.md). |
|
|
47
|
+
| Downstream handler invoked without required package artifacts | Downstream returns `blocked` with `blocking_gaps`; analyst Leader does not auto-repair unless rerun is requested. |
|
|
42
48
|
|
|
43
49
|
### (b) Input over-scale degradation
|
|
44
50
|
|
|
@@ -1,20 +1,76 @@
|
|
|
1
|
-
# dependencies.yaml — Swarm Skill startup dependency check
|
|
1
|
+
# dependencies.yaml — Swarm Skill startup dependency check (android-project-analyst)
|
|
2
2
|
#
|
|
3
|
-
# Leader reads this
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
# workspace-state stale detection degrades without git).
|
|
3
|
+
# Leader reads this in Workflow Step 0 and records results in run_manifest.json
|
|
4
|
+
# → dependency_preflight. All CLI entries are required: false.
|
|
5
|
+
# Android Studio MCP is optional auxiliary evidence for the Legacy Android source project —
|
|
6
|
+
# it never replaces durable node artifacts or handoff package gates (P0–P6).
|
|
8
7
|
|
|
9
|
-
skills: [] #
|
|
8
|
+
skills: [] # No local domain-specific skill packages required for active roles.
|
|
9
|
+
|
|
10
|
+
optional_mcp:
|
|
11
|
+
- server: jetbrains
|
|
12
|
+
required: false
|
|
13
|
+
used_by:
|
|
14
|
+
- Leader
|
|
15
|
+
- project-architecture
|
|
16
|
+
- presentation-resource
|
|
17
|
+
- data-contract-flow
|
|
18
|
+
- behavior-logic
|
|
19
|
+
purpose: |
|
|
20
|
+
Optional indexed Legacy Android project context from Android Studio / JetBrains IDE.
|
|
21
|
+
Typical tools: get_project_modules, get_project_dependencies, get_repositories,
|
|
22
|
+
find_files_by_glob, search_in_files_by_regex, get_symbol_info, get_file_problems.
|
|
23
|
+
Always pass projectPath = source_project_path (Legacy project open in IDE).
|
|
24
|
+
Supports module inventory, Gradle topology, entry-point discovery, symbol ownership,
|
|
25
|
+
and diagnostics context. MCP output is supporting evidence only — major claims still
|
|
26
|
+
require source-path evidence in per-module dimension JSON artifacts and representations.
|
|
10
27
|
|
|
11
28
|
tools:
|
|
12
29
|
- name: rg
|
|
13
30
|
required: false
|
|
14
|
-
|
|
31
|
+
used_by:
|
|
32
|
+
- presentation-resource
|
|
33
|
+
- project-architecture
|
|
34
|
+
- data-contract-flow
|
|
35
|
+
- behavior-logic
|
|
36
|
+
purpose: Fast source search across the Legacy Android project. Built-in Grep/Read substitute if unavailable.
|
|
15
37
|
- name: curl
|
|
16
38
|
required: false
|
|
17
|
-
|
|
39
|
+
used_by:
|
|
40
|
+
- presentation-resource
|
|
41
|
+
purpose: |
|
|
42
|
+
Download concrete online image/icon/media URLs for analysis under
|
|
43
|
+
node-results/presentation-resource/downloaded_resources/; without curl, record download_gaps.
|
|
18
44
|
- name: git
|
|
19
45
|
required: false
|
|
20
|
-
|
|
46
|
+
used_by:
|
|
47
|
+
- analysis-workspace-state
|
|
48
|
+
purpose: |
|
|
49
|
+
Changed-file sets, timestamps, and stale upstream detection for the analysis ledger;
|
|
50
|
+
without git, fall back to artifact path/status comparison.
|
|
51
|
+
|
|
52
|
+
# Analyst does not compile or build the Legacy Android project during analysis runs.
|
|
53
|
+
|
|
54
|
+
downstream_handoff:
|
|
55
|
+
- consumer: android-to-kmp-migrator
|
|
56
|
+
handoff_package: P6
|
|
57
|
+
when: mode migration
|
|
58
|
+
required: true
|
|
59
|
+
purpose: |
|
|
60
|
+
Migration-mode runs must produce package P6 artifacts before migrator dispatch:
|
|
61
|
+
modules_index.json, migration_assembly_basis.json, cross_module_architecture.json,
|
|
62
|
+
cross_module_data_logic.json, global_representation.json, per-module representations,
|
|
63
|
+
dimension outputs, SPEC (prd, design, plan, verification). Record paths and
|
|
64
|
+
handoff_gates in analysis_workspace_state.json and verification.md.
|
|
65
|
+
|
|
66
|
+
degraded_modes:
|
|
67
|
+
- trigger: rg missing
|
|
68
|
+
effect: Use built-in Grep/Read; record in run_manifest dependency_preflight
|
|
69
|
+
- trigger: curl missing
|
|
70
|
+
effect: presentation-resource records download_gaps for remote media URLs
|
|
71
|
+
- trigger: git missing
|
|
72
|
+
effect: analysis-workspace-state uses artifact timestamps only; stale detection less precise
|
|
73
|
+
- trigger: jetbrains MCP missing or wrong open project
|
|
74
|
+
effect: Continue on file-system evidence only; record MCP gap in verification.md
|
|
75
|
+
- trigger: migration mode without target_project_path
|
|
76
|
+
effect: Ask user before writing plan.md; exploration mode unaffected
|