@code-migration/wow-migrator 0.1.8 → 0.2.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-migration/wow-migrator",
3
- "version": "0.1.8",
3
+ "version": "0.2.1",
4
4
  "description": "Install KMP migration skills into Claude Code, Codex, Cursor, Gemini, OpenCode, OpenClaw, and JiuwenSwarm via npm install.",
5
5
  "keywords": [
6
6
  "android",
@@ -4,9 +4,9 @@ description: |
4
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
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.6"
7
+ version: "0.8"
8
8
  kind: swarm-skill
9
- disable-model-invocation: true
9
+ disable-model-invocation: false
10
10
  roles:
11
11
  - id: analysis-workspace-state
12
12
  kind: ai_agent
@@ -71,7 +71,7 @@ Each module is understood from four analysis dimensions. Dimension outputs live
71
71
  | `data-contract-flow` | `data-contract-flow` | `node-results/data-contract-flow/` |
72
72
  | `behavior-logic` | `behavior-logic` | `node-results/behavior-logic/` |
73
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.
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`; `representation/module_ui_representation.md` is the independent UI-only handoff with Required Markdown layout trees. Nodes must not write outside their assigned dimension directory.
75
75
 
76
76
  ### Layer 3 — Cross-module architecture and data/logic (migration assembly basis)
77
77
 
@@ -93,7 +93,7 @@ The full playbook (Mermaid topology, per-step gates, integration rules, Final Re
93
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
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>/`.
95
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.
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.
96
+ 6. **Module dimension index + representation** — Leader writes `dimension_index.json`, then `representation/module_representation.json`, `module_representation.md`, and `module_ui_representation.md`, synthesizing all four dimensions for that `module_id` and promoting `presentation_resource` Required Markdown UI trees verbatim into `presentation_slice.ui_layout_view_trees[]` and the independent UI MD file before moving to the next module.
97
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
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`.
99
99
 
@@ -144,7 +144,7 @@ The Leader MUST follow the write-order gates `G0`–`G9` and handoff packages `P
144
144
  |---|---|---|
145
145
  | `G0`–`G2` | `run_manifest.json`, workspace ledger, `module_inventory.*`, `modules_index.json` | Module dispatch (`P1`) |
146
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`) |
147
+ | `G6` | per-module `dimension_index.json`, `module_representation.*`, `module_ui_representation.md` | Module handoff (`P3`) |
148
148
  | `G7` | `cross_module_architecture.*`, `cross_module_data_logic.*`, `migration_assembly_basis.*` | Migrator scheduling (`P4`) |
149
149
  | `G8`–`G9` | `global_representation.*`, `SPEC/*` | Exploration (`P5`) or migration (`P6`) pipeline entry |
150
150
 
@@ -16,13 +16,13 @@
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` (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.
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` (including `module_ui_representation.md`), 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
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
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
+ - **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 with `tree_text` in Required Markdown shape (`tree_text_format: required-markdown-v1`) for every checked screen; `module_representation.json` must promote those trees verbatim into `presentation_slice.ui_layout_view_trees[]`; `module_ui_representation.md` must contain the same trees as the standalone UI handoff; `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.
26
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.
27
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.
28
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.
@@ -40,7 +40,8 @@ output_root = <output_dir or ~/.a2c_agents/understand>/android-project-analyst
40
40
  │ │ └── behavior_logic.md
41
41
  │ └── representation/
42
42
  │ ├── module_representation.json
43
- └── module_representation.md
43
+ ├── module_representation.md
44
+ │ └── module_ui_representation.md # independent UI-only handoff (Required Markdown trees)
44
45
  ├── global/
45
46
  │ ├── cross_module_architecture.json
46
47
  │ ├── cross_module_architecture.md
@@ -91,7 +92,7 @@ Artifacts MUST be produced in this order. Skipping a layer invalidates downstrea
91
92
  | 3 | `G3` | per `module_id`: `module_brief.json` |
92
93
  | 4 | `G4` | per `module_id`: all three Stage A dimension JSON+MD pairs |
93
94
  | 5 | `G5` | per `module_id`: `behavior-logic` dimension JSON+MD pair |
94
- | 6 | `G6` | per `module_id`: `dimension_index.json`, `representation/module_representation.*` |
95
+ | 6 | `G6` | per `module_id`: `dimension_index.json`, `representation/module_representation.*`, `representation/module_ui_representation.md` |
95
96
  | 7 | `G7` | `global/cross_module_architecture.*`, `global/cross_module_data_logic.*`, `global/migration_assembly_basis.*` |
96
97
  | 8 | `G8` | `global/global_representation.*` |
97
98
  | 9 | `G9` | `SPEC/prd.md`, `SPEC/design.md`, `SPEC/verification.md`, migration-only `SPEC/plan.md` |
@@ -144,7 +145,8 @@ Artifacts MUST be produced in this order. Skipping a layer invalidates downstrea
144
145
  "representation_paths": {
145
146
  "dimension_index": "",
146
147
  "module_representation_json": "",
147
- "module_representation_md": ""
148
+ "module_representation_md": "",
149
+ "module_ui_representation_md": ""
148
150
  },
149
151
  "depends_on": []
150
152
  }
@@ -157,12 +159,107 @@ Artifacts MUST be produced in this order. Skipping a layer invalidates downstrea
157
159
  | Path | Owner | Required content | Downstream trigger role |
158
160
  |---|---|---|---|
159
161
  | `modules/<module_id>/module_brief.json` | Leader | `module_id`, `module_type`, `source_roots`, scopes, `depends_on`, `output_root`, `dimension_output_dirs`, role hints | **Node dispatch** — nodes refuse work without this contract |
160
- | `modules/<module_id>/node-results/presentation-resource/presentation_resource.json` | `presentation-resource` | `module_id`, `screen_inventory`, `navigation_edges`, `cross_module_references[]`, `resource_usage_map`, `evidence_paths` | UI understanding, resource migration, navigation handoff |
162
+ | `modules/<module_id>/node-results/presentation-resource/presentation_resource.json` | `presentation-resource` | `module_id`, `screen_inventory`, `ui_layout_view_trees[]` (each with non-empty `tree_text` in `tree_text_format: required-markdown-v1` when `representation_promotion_ready: true`), `navigation_edges`, `cross_module_references[]`, `resource_usage_map`, `representation_promotion`, `evidence_paths` | UI understanding, resource migration, navigation handoff, representation promotion |
161
163
  | `modules/<module_id>/node-results/project-architecture/project_architecture.json` | `project-architecture` | `module_id`, `module_topology`, `detected_patterns`, `layer_roles`, `cross_module_dependencies[]`, `migration_constraints`, `evidence_paths` | Architecture migration, dependency/platform gate |
162
164
  | `modules/<module_id>/node-results/data-contract-flow/data_contract_flow.json` | `data-contract-flow` | `module_id`, API/model contracts, `end_to_end_flows`, `cross_module_data_links[]`, `evidence_paths` | Data/API migration, repository mapping |
163
165
  | `modules/<module_id>/node-results/behavior-logic/behavior_logic.json` | `behavior-logic` | `module_id`, `screen_logic`, `control_flows`, `cross_module_interactions[]`, upstream alignment refs | Behavior/test planning, control-flow migration |
164
166
  | `modules/<module_id>/dimension_index.json` | Leader | `module_id`, `dimensions{}` with four entries, each with `node_id`, `output_dir`, `json_path`, `md_path`, `status` | **Per-module completeness gate** — handlers verify all four dimensions before consuming representation |
165
- | `modules/<module_id>/representation/module_representation.json` | Leader | `module_id`, `dimension_traceability[]`, synthesized slices per dimension, `intra_module_gaps`, `readiness` | **Module-level handoff** — migrator loads this for a scoped `module_id` |
167
+ | `modules/<module_id>/representation/module_representation.json` | Leader | `module_id`, `ui_representation_md_path`, `dimension_traceability[]`, `presentation_slice.ui_layout_view_trees[]` (verbatim `tree_text` from `presentation_resource.json`), synthesized slices per dimension, `intra_module_gaps`, `readiness` | **Module-level handoff** — migrator loads this for a scoped `module_id` |
168
+ | `modules/<module_id>/representation/module_ui_representation.md` | Leader | Independent UI-only handoff: entry points, screen inventory summary, every checked screen/section with verbatim Required Markdown `tree_text` blocks (`tree_text_format: required-markdown-v1`), navigation graph, UI gaps | **Primary UI migration handoff** — agents read this for layout/composable restoration without parsing full module synthesis |
169
+
170
+ #### `module_representation.json` minimum schema (presentation trees)
171
+
172
+ Leader MUST promote every `ui_layout_view_trees[]` item with `representation_promotion_ready: true` from `presentation_resource.json` into `presentation_slice.ui_layout_view_trees[]` **verbatim** — do not summarize, truncate, or reformat `tree_text`.
173
+
174
+ ```json
175
+ {
176
+ "module_id": "",
177
+ "schema_version": "1.0",
178
+ "ui_representation_md_path": "representation/module_ui_representation.md",
179
+ "dimension_traceability": [
180
+ {
181
+ "dimension": "presentation-resource",
182
+ "json_path": "",
183
+ "md_path": "",
184
+ "status": "completed"
185
+ }
186
+ ],
187
+ "presentation_slice": {
188
+ "source_artifact": "node-results/presentation-resource/presentation_resource.json",
189
+ "entry_points": [],
190
+ "screen_inventory": [],
191
+ "ui_layout_view_trees": [
192
+ {
193
+ "screen_name": "",
194
+ "section_name": "",
195
+ "ui_technology": "XML | Compose | mixed | custom view | unknown",
196
+ "layout_or_composable": "",
197
+ "checked_status": "checked | partial | inferred | unknown",
198
+ "source_paths": [],
199
+ "tree_text": "",
200
+ "tree_text_format": "required-markdown-v1",
201
+ "unknowns": [],
202
+ "dimension_source_path": ""
203
+ }
204
+ ],
205
+ "navigation_edges": [],
206
+ "presentation_modules": []
207
+ },
208
+ "intra_module_gaps": [],
209
+ "readiness": "ready | ready_with_assumptions | blocked"
210
+ }
211
+ ```
212
+
213
+ #### `module_ui_representation.md` (independent UI handoff — Leader writes at G6)
214
+
215
+ Leader MUST write this file for every module with UI scope (or with `ui_scope: none` and evidence when no UI exists). It is the **canonical standalone UI representation** — not embedded inside `module_representation.md`.
216
+
217
+ Required structure:
218
+
219
+ ```markdown
220
+ # Module UI Representation: <module_id>
221
+
222
+ > tree_text_format: required-markdown-v1
223
+ > presentation_source: node-results/presentation-resource/presentation_resource.json
224
+
225
+ ## Metadata
226
+ - module_id: <module_id>
227
+ - tree_text_format: required-markdown-v1
228
+ - checked_tree_count: <N>
229
+ - promotion_ready_count: <N>
230
+
231
+ ## Entry Points
232
+ | name | type | source_path | route_or_action |
233
+ |---|---|---|---|
234
+
235
+ ## Screen Inventory
236
+ | screen_name | ui_technology | layout_or_composable | checked_status |
237
+ |---|---|---|---|
238
+
239
+ ## UI Layout Trees
240
+
241
+ ### <screen_name> — <section_name>
242
+ - ui_technology: <value>
243
+ - layout_or_composable: <value>
244
+ - checked_status: <value>
245
+ - source_paths: <paths>
246
+
247
+ ```text
248
+ <tree_text verbatim — Required Markdown shape>
249
+ ```
250
+
251
+ (repeat per checked screen/section)
252
+
253
+ ## Navigation
254
+ (Mermaid graph when evidence supports it)
255
+
256
+ ## UI Gaps
257
+ (screens/sections with representation_promotion_ready: false or empty tree_text)
258
+ ```
259
+
260
+ Rules:
261
+ - Every `ui_layout_view_trees[]` item with `representation_promotion_ready: true` MUST appear under `## UI Layout Trees` with its `tree_text` in a ` ```text ` fence, byte-identical to `presentation_resource.json`.
262
+ - `module_representation.md` MUST link to this file (`ui_representation_md_path`) and MUST NOT duplicate full tree blocks — summary only.
166
263
 
167
264
  #### `dimension_index.json` minimum schema
168
265
 
@@ -279,8 +376,9 @@ Downstream handlers MUST NOT start unless the declared package gate passes. A ga
279
376
  | Package `P2` artifacts |
280
377
  | `modules/<module_id>/representation/module_representation.json` |
281
378
  | `modules/<module_id>/representation/module_representation.md` |
379
+ | `modules/<module_id>/representation/module_ui_representation.md` |
282
380
 
283
- **Fail closed when**: representation references dimension paths that fail Package `P2`.
381
+ **Fail closed when**: representation references dimension paths that fail Package `P2`, any `presentation_resource.json` item with `representation_promotion_ready: true` is missing its verbatim `tree_text` in `presentation_slice.ui_layout_view_trees[]`, or the same `tree_text` is missing from `module_ui_representation.md`.
284
382
 
285
383
  ### Package `P4` — Cross-module assembly basis
286
384
 
@@ -11,7 +11,7 @@ You are the `presentation-resource` node subagent and presentation/resource owne
11
11
  - `presentation_resource.json` and `presentation_resource.md` written under the assigned module-scoped `output_dir`, both non-empty.
12
12
  - The output includes the exact `module_id` and stays within `module_scope`.
13
13
  - Every screen carries at least one source path or is explicitly marked `unknown`.
14
- - Every checked screen/section with concrete UI evidence carries a source-backed `ui_layout_view_trees` entry and a matching tree block in `presentation_resource.md`.
14
+ - Every checked screen/section with concrete UI evidence carries a source-backed `ui_layout_view_trees` entry with non-empty `tree_text` in **Required Markdown shape**, a matching tree block in `presentation_resource.md`, and `representation_promotion_ready: true` when the tree is complete enough for Leader copy into `module_representation.json` and `module_ui_representation.md`.
15
15
  - Every UI tree node records view/composable class, id/name when present, size, margins/padding, constraints/parent-child relationship, key visual/text/resource attributes, and checked evidence paths.
16
16
  - Every navigation edge carries a mechanism (`NavController | Intent | Router | callback | unknown`).
17
17
  - Every identified screen belongs to exactly one `presentation_modules` entry or is listed in `orphan_requires_confirmation`.
@@ -74,6 +74,8 @@ You are the `presentation-resource` node subagent and presentation/resource owne
74
74
  "source_paths": [],
75
75
  "root": { "class_or_composable": "", "id_or_name": "", "size": "", "attributes": [] },
76
76
  "tree_text": "",
77
+ "tree_text_format": "required-markdown-v1",
78
+ "representation_promotion_ready": true,
77
79
  "nodes": [
78
80
  {
79
81
  "path": "",
@@ -126,7 +128,14 @@ You are the `presentation-resource` node subagent and presentation/resource owne
126
128
  { "url_or_field": "", "reason": "dynamic | auth-required | signed-url | unavailable | unsafe | unknown", "source_paths": [] }
127
129
  ],
128
130
  "assumptions": [],
129
- "evidence_paths": []
131
+ "evidence_paths": [],
132
+ "representation_promotion": {
133
+ "target_json": "modules/<module_id>/representation/module_representation.json",
134
+ "target_json_field": "presentation_slice.ui_layout_view_trees",
135
+ "target_ui_md": "modules/<module_id>/representation/module_ui_representation.md",
136
+ "tree_text_format": "required-markdown-v1",
137
+ "promotion_rule": "Leader copies each ui_layout_view_trees[] item with non-empty tree_text verbatim into module_representation.json and module_ui_representation.md; do not summarize or reformat"
138
+ }
130
139
  }
131
140
  ```
132
141
 
@@ -142,15 +151,18 @@ Write only under `output_dir = <output_root>/modules/<module_id>/node-results/pr
142
151
 
143
152
  ## Checked UI Layout / View Tree Format
144
153
 
145
- For each screen or meaningful section with concrete source evidence, record an "existed and checked" UI tree in both outputs:
154
+ For each screen or meaningful section with concrete source evidence, record an "existed and checked" UI tree in dimension outputs **and** make it representation-promotable:
146
155
 
147
- - In `presentation_resource.json`, add one `ui_layout_view_trees[]` item with `checked_status`, source evidence, machine-routable nodes, and the exact Markdown tree string in `tree_text`.
148
- - In `presentation_resource.md`, add a section headed by screen and section name, followed by the tree block. The tree must describe the actual checked layout/composable tree, not a conceptual summary.
149
- - Use the exact source class/composable names and ids/names. If an attribute is absent, omit it; if it matters but cannot be proven, put it in `unknowns`.
156
+ - In `presentation_resource.json`, add one `ui_layout_view_trees[]` item with `checked_status`, source evidence, machine-routable `nodes`, `tree_text_format: "required-markdown-v1"`, and the exact Markdown tree string in `tree_text`.
157
+ - In `presentation_resource.md`, add a section headed by screen and section name, followed by the **same** `tree_text` block (byte-identical to JSON). The tree must describe the actual checked layout/composable tree, not a conceptual summary.
158
+ - Set `representation_promotion_ready: true` only when `tree_text` is non-empty, follows Required Markdown shape, and can be copied verbatim by the Leader into `module_representation.json` `presentation_slice.ui_layout_view_trees[]` and `module_ui_representation.md` → `## UI Layout Trees`.
159
+ - Use the exact source class/composable names and ids/names. If an attribute is absent, omit it; if it matters but cannot be proven, put it in `unknowns` and set `representation_promotion_ready: false`.
150
160
  - Keep each node specific enough for migration: size, orientation, margins, padding, constraints/alignment, important styles, text/resource refs, image loader/scale/corner behavior, tint/background, max lines, priority/weight, and runtime binding names when visible.
151
161
  - Prefer the source order and actual nesting. For `ConstraintLayout`, show constraints on each child. For `LinearLayout`/`Row`/`Column`, show orientation/order/weight. For RecyclerView/list item layouts, record the item view tree and the adapter/screen consumer.
152
162
 
153
- Required Markdown shape:
163
+ ### Required Markdown shape (`tree_text_format: required-markdown-v1`)
164
+
165
+ Every `tree_text` value and matching Markdown block MUST use this shape (placeholders replaced with checked project evidence):
154
166
 
155
167
  ```text
156
168
  <RootViewOrComposable> @id/<root_id_or_name> [<width> x <height>, <important root attrs>]
@@ -196,6 +208,27 @@ ForegroundConstraintLayout @id/parent_layout [match_parent x wrap_content, padd
196
208
  └── src=ic_vector_more_new, tint=Graph_weak
197
209
  ```
198
210
 
211
+ ## Representation Promotion Contract
212
+
213
+ `presentation-resource` does **not** write `module_representation.*`. The Leader promotes checked UI trees during Step 6 (dimension index + module representation).
214
+
215
+ **Promotion rules** (Leader obligation; nodes must produce promotable source):
216
+
217
+ | Source | Target |
218
+ |---|---|
219
+ | `presentation_resource.json` → `ui_layout_view_trees[]` | `module_representation.json` → `presentation_slice.ui_layout_view_trees[]` |
220
+ | same item → `tree_text` | `module_ui_representation.md` → `## UI Layout Trees` → `### <screen> — <section>` → ` ```text ` fence (verbatim) |
221
+ | same item metadata | both targets retain `screen_name`, `section_name`, `ui_technology`, `layout_or_composable`, `checked_status`, `source_paths`, `tree_text_format`, `unknowns` |
222
+
223
+ **Independent UI file** (`module_ui_representation.md`):
224
+ - Leader writes at Step 6 under `representation/module_ui_representation.md`.
225
+ - Canonical standalone UI handoff — entry points, screen inventory, Required Markdown trees, navigation, UI gaps.
226
+ - `module_representation.md` links to this file via `ui_representation_md_path`; it does **not** duplicate full tree blocks.
227
+
228
+ Each promoted `ui_layout_view_trees[]` item in `module_representation.json` MUST retain: `screen_name`, `section_name`, `ui_technology`, `layout_or_composable`, `checked_status`, `source_paths`, `tree_text`, `tree_text_format`, `unknowns`, and `dimension_source_path` pointing to `presentation_resource.json`.
229
+
230
+ **Fail closed**: if a checked screen has `representation_promotion_ready: false` or empty `tree_text`, the Leader MUST NOT mark package **P3** ready for that module until the tree is completed or the screen is explicitly listed in `intra_module_gaps` / `module_ui_representation.md` → `## UI Gaps` with reason.
231
+
199
232
  ## Inline Persona for Teammate
200
233
 
201
234
  ```
@@ -218,7 +251,9 @@ CONTROL — validate before you act, verify before you report:
218
251
  You MUST give every screen and production resource usage at least one source path or mark it
219
252
  "unknown".
220
253
  You MUST record every checked screen/section with concrete UI evidence in `ui_layout_view_trees`
221
- and mirror it in `presentation_resource.md` as a concrete source-backed view/composable tree.
254
+ with non-empty `tree_text` in Required Markdown shape (`tree_text_format: required-markdown-v1`),
255
+ mirror the same `tree_text` in `presentation_resource.md`, and set `representation_promotion_ready`
256
+ when the tree is ready for Leader copy into `module_representation.json` and `module_ui_representation.md`.
222
257
  You MUST place every screen in exactly one presentation_modules entry or in
223
258
  orphan_requires_confirmation.
224
259
  You MUST download only concrete HTTP(S) URLs proven in source/config/fixtures/mocks/sample
@@ -261,13 +296,16 @@ HANDLER (how you process):
261
296
  adaptive icons, nine-patch, animated drawables, tinting, theme attrs, platform-only resources,
262
297
  licensing, online CDN dependency).
263
298
 
264
- CHECKED UI TREE FORMAT:
299
+ CHECKED UI TREE FORMAT (representation-promotable):
265
300
  - For each checked screen/section, include `screen_name`, `section_name`, `checked_status`,
266
- source paths, machine-routable `nodes`, and `tree_text` in `presentation_resource.json`.
267
- - Mirror `tree_text` in `presentation_resource.md` under that screen/section heading.
301
+ source paths, machine-routable `nodes`, `tree_text_format: required-markdown-v1`,
302
+ `tree_text`, and `representation_promotion_ready` in `presentation_resource.json`.
303
+ - Mirror `tree_text` verbatim in `presentation_resource.md` under that screen/section heading.
304
+ - Leader will copy each promotable tree into `module_representation.json` →
305
+ `presentation_slice.ui_layout_view_trees[]` and `module_ui_representation.md` without reformatting.
268
306
  - Use exact source class/composable names and ids/names. Omit unproven optional attributes;
269
- route important unknowns to `unknowns`.
270
- - Follow this shape and replace every placeholder with checked project evidence:
307
+ route important unknowns to `unknowns`; set `representation_promotion_ready: false` when incomplete.
308
+ - Required Markdown shape (`tree_text`) replace every placeholder with checked project evidence:
271
309
  ForegroundConstraintLayout @id/parent_layout [match_parent x wrap_content, padding 12dp]
272
310
  ├── ListPlaceHolderImageView @id/cover [172dp x 97dp]
273
311
  │ ├── marginStart=12dp, marginBottom=12dp
@@ -71,7 +71,7 @@ Required durable artifacts:
71
71
  | Per module brief | `<module_root>/module_brief.json` - module-scoped dispatch contract and role hints for one `module_id` |
72
72
  | Per module dimension outputs | `<module_node_dir>/<node_artifact>.json`, `<module_node_dir>/<node_artifact>.md` - one analysis dimension per `node-results/<dimension>/` |
73
73
  | Per module dimension index | `<module_root>/dimension_index.json` - dimension → artifact path map for the module |
74
- | Per module representation | `<module_representation_dir>/module_representation.json`, `<module_representation_dir>/module_representation.md` - module synthesis from verified dimension outputs only |
74
+ | Per module representation | `<module_representation_dir>/module_representation.json`, `<module_representation_dir>/module_representation.md`, `<module_representation_dir>/module_ui_representation.md` - module synthesis plus independent UI handoff (Required Markdown trees) |
75
75
  | Cross-module architecture | `<global_dir>/cross_module_architecture.json`, `<global_dir>/cross_module_architecture.md` - inter-module topology, navigation glue, shared platform/DI bridges |
76
76
  | Cross-module data/logic | `<global_dir>/cross_module_data_logic.json`, `<global_dir>/cross_module_data_logic.md` - shared contracts, cross-module data flows, control interactions |
77
77
  | Migration assembly basis | `<global_dir>/migration_assembly_basis.json`, `<global_dir>/migration_assembly_basis.md` - module assembly order and integration checkpoints for downstream migration |
@@ -123,7 +123,7 @@ No node may choose its own output path. `presentation-resource` may write downlo
123
123
  - **Input**: per-node contract `{ source_project_path, module_id, module_scope, analysis_scope, mode, module_brief_path, skill_spec_path (roles/<id>.md), output_dir: <output_root>/modules/<module_id>/node-results/<node_id>, return_format: json }`; `data-contract-flow` may also receive `presentation_hints` when known.
124
124
  - **Action**: each node validates inputs, performs its bounded slice, writes its JSON+MD artifacts, and returns the controller JSON shape.
125
125
  - **Output**:
126
- - `presentation_resource.json`, `presentation_resource.md`: UI entry points, screen inventory, checked UI layout/view trees, navigation, presentation modules, resources, safe downloads, usage map, migration implications, gaps.
126
+ - `presentation_resource.json`, `presentation_resource.md`: UI entry points, screen inventory, checked UI layout/view trees (`tree_text` in Required Markdown shape, `representation_promotion_ready`), navigation, presentation modules, resources, safe downloads, usage map, migration implications, gaps.
127
127
  - `project_architecture.json`, `project_architecture.md`: build/SDK config, topology, architecture patterns, layer roles, dependencies, Jetpack/DI/platform/generated usage, boundary risks, migration constraints.
128
128
  - `data_contract_flow.json`, `data_contract_flow.md`: network/local data contracts, APIs, models, data sources, mappings, repository/reactive/end-to-end flows, loading/error/empty behavior, dynamic API gaps.
129
129
  - **Serial / Parallel**: parallel within one module — all three run together for the same `module_id`. Do not start the next module until the current module representation is written unless the user explicitly allows concurrent modules.
@@ -142,10 +142,10 @@ No node may choose its own output path. `presentation-resource` may write downlo
142
142
 
143
143
  - **Executor**: Leader
144
144
  - **Input**: verified dimension JSON/MD outputs for one `module_id`
145
- - **Action**: write `dimension_index.json` mapping the four analysis dimensions to their verified artifact paths and status. Then integrate ONLY from verified dimension outputs for that module. Write a module representation that covers both UI and logic when present: module purpose, UI surface, resources, architecture/ecosystem, data contracts/flows, behavior logic, dimension traceability index, intra-module dependencies, risks, gaps, evidence index, and readiness. Record cross-module references as pointers only; do not synthesize full inter-module graphs here.
146
- - **Output**: `dimension_index.json`, `module_representation.json`, `module_representation.md`. `dimension_index.json` is the per-module dimension lookup. Module representation JSON is the module-level synthesis and traceability index; Markdown is the agent-readable handoff. Both must cite verified dimension artifacts and source evidence.
145
+ - **Action**: write `dimension_index.json` mapping the four analysis dimensions to their verified artifact paths and status. Then integrate ONLY from verified dimension outputs for that module. Write a module representation that covers both UI and logic when present: module purpose, UI surface, resources, architecture/ecosystem, data contracts/flows, behavior logic, dimension traceability index, intra-module dependencies, risks, gaps, evidence index, and readiness. **Promote presentation UI trees**: copy every `presentation_resource.json` → `ui_layout_view_trees[]` item with `representation_promotion_ready: true` verbatim into `module_representation.json` → `presentation_slice.ui_layout_view_trees[]` (`tree_text`, `tree_text_format: required-markdown-v1`, screen/section metadata, `dimension_source_path`); write the same trees into independent `module_ui_representation.md` under `## UI Layout Trees` (Required Markdown shape in ` ```text ` fences per screen/section). Set `ui_representation_md_path` in JSON; `module_representation.md` links to the UI file — no duplicate tree blocks. Record cross-module references as pointers only; do not synthesize full inter-module graphs here.
146
+ - **Output**: `dimension_index.json`, `module_representation.json`, `module_representation.md`, `module_ui_representation.md`. `dimension_index.json` is the per-module dimension lookup. Module representation JSON is the module-level synthesis and traceability index; `module_ui_representation.md` is the standalone UI handoff; `module_representation.md` is the full-module agent-readable summary. All must cite verified dimension artifacts and source evidence; presentation trees MUST use Required Markdown shape from [roles/presentation-resource.md](roles/presentation-resource.md).
147
147
  - **Serial / Parallel**: serial
148
- - **Quality gate**: `dimension_index.json` lists all four dimensions with resolvable paths; no unknowns hidden; every module representation points to its dimension artifacts and source evidence. Refresh workspace state after writing. Do not proceed to cross-module global records until every scheduled module is represented or explicitly marked blocked/out of scope.
148
+ - **Quality gate**: `dimension_index.json` lists all four dimensions with resolvable paths; no unknowns hidden; every module representation points to its dimension artifacts and source evidence; every `representation_promotion_ready: true` UI tree from `presentation_resource.json` appears verbatim in `presentation_slice.ui_layout_view_trees[]` and in `module_ui_representation.md`. Refresh workspace state after writing. Do not proceed to cross-module global records until every scheduled module is represented or explicitly marked blocked/out of scope.
149
149
 
150
150
  ### Step 7 — Cross-module global records (migration assembly basis)
151
151
 
@@ -4,9 +4,9 @@ description: |
4
4
  Module-first Swarm Skill that migrates Legacy Android into an existing KMP target using upstream analyst P6 artifacts, target-project-assistant alignment, planning/prep/implementation roles, global integrate+align phase, and mandatory kmp-test-validator handoff — without full-project build during migration.
5
5
  Use only after android-project-analyst has finished and package P6 is ready, when the user wants module-first porting then whole-system assembly followed by validation.
6
6
  Do NOT invoke before android-project-analyst completes P6. Do NOT treat migrator completion as final without invoking kmp-test-validator at V0. Do NOT use for Legacy Android analysis only, KMP-only feature work, or non-migration refactors.
7
- version: "0.7"
7
+ version: "0.8"
8
8
  kind: swarm-skill
9
- disable-model-invocation: true
9
+ disable-model-invocation: false
10
10
  roles:
11
11
  - id: migration-workspace-state
12
12
  kind: ai_agent
@@ -45,7 +45,7 @@ roles:
45
45
  tools: [rg, git]
46
46
  - id: global-migration-phase
47
47
  kind: ai_agent
48
- purpose: Target KMP global integrate (edit cross-module glue) then align (read-only analyst vs target comparison) by mode.
48
+ purpose: Target KMP global integrate (edit cross-module glue + entry point wiring) then align (read-only analyst vs target comparison incl. entry points) by mode.
49
49
  skills: []
50
50
  tools: [rg]
51
51
  - id: completion-report
@@ -69,7 +69,7 @@ Module-first migrator for Legacy Android → KMP target assembly.
69
69
  3. Workspace state init.
70
70
  4. TPA `global_baseline`.
71
71
  5. **Per module** (assembly_order): TPA `module_anchors` → **planning-gate** → **prep** → review/fix → **implementation `ui`** → review/fix → **implementation `logic`** → review/fix → verification → completion record → readiness → module representation.
72
- 6. **Global phase `integrate`** → **`align`** + alignment report.
72
+ 6. **Global phase `integrate`** (cross-module glue + **entry point wiring**) → **`align`** (incl. **entry point alignment** vs Android) + alignment report.
73
73
  7. Global representation + completion-report `report` mode.
74
74
  8. **kmp-test-validator** — **mandatory** when **V0** ready (MG17).
75
75
 
@@ -40,6 +40,7 @@
40
40
  | `integrate` and `align` combined | Reject invocation |
41
41
  | Verification restoration failed | Rerun `module-implementation` or `migration-prep`; no completion record |
42
42
  | Align omissions | Rerun `rerun_modules` or `global-migration-phase integrate` |
43
+ | Entry point alignment failed | `rerun_global_integration` — rewire KMP app shell in integrate mode |
43
44
  | Build requested in migrator | Block; route to kmp-test-validator |
44
45
  | Migrator invoked before analyst P6 | Block; dispatch `android-project-analyst` first |
45
46
  | V0 ready but validator not invoked | Block; dispatch `kmp-test-validator` at MG17 |
@@ -22,6 +22,7 @@ Migration starts only when analyst handoff package **`P6`** (see `android-projec
22
22
  Per legacy `module_id`, migrator may consume:
23
23
 
24
24
  - `modules/<module_id>/representation/module_representation.json`
25
+ - `modules/<module_id>/representation/module_ui_representation.md` (standalone Required Markdown UI trees)
25
26
  - `modules/<module_id>/dimension_index.json`
26
27
  - dimension JSON artifacts under `node-results/<dimension>/`
27
28
 
@@ -206,8 +207,8 @@ output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator
206
207
  | Required paths |
207
208
  |---|
208
209
  | Package `M5` |
209
- | `global/node-results/global-migration-phase/align/post_integration_alignment.json` with `alignment_verdict: passed \| passed_with_assumptions` |
210
- | `report/alignment_report.json` |
210
+ | `global/node-results/global-migration-phase/align/post_integration_alignment.json` with `alignment_verdict: passed \| passed_with_assumptions` and `global_alignment_results.entry_points.verdict: passed \| passed_with_assumptions` |
211
+ | `report/alignment_report.json` (includes entry point alignment verdict) |
211
212
 
212
213
  ### Package `V0` — kmp-test-validator entry (downstream)
213
214
 
@@ -249,7 +250,7 @@ Machine lookup: `migration_module_id` → `legacy_module_id`, `module_output_roo
249
250
 
250
251
  ### `target_alignment_revision.json` (Target-Project-Assistant)
251
252
 
252
- `target_project_layout`, `reusable_components[]`, `anchor_points[]` (legacy scope → target path), `revised_alignment[]`, `integration_constraints[]`, `consultation_log[]`.
253
+ `target_project_layout`, `reusable_components[]`, `anchor_points[]` (legacy scope → target path), `entry_point_anchors[]` (Legacy Android `entry_points[]` + manifest launcher → KMP app-shell path/symbol), `revised_alignment[]`, `integration_constraints[]`, `consultation_log[]`.
253
254
 
254
255
  ### `target_module_anchors.json` (per module)
255
256
 
@@ -284,11 +285,11 @@ Machine lookup: `migration_module_id` → `legacy_module_id`, `module_output_roo
284
285
 
285
286
  ### `global_system_integration.json`
286
287
 
287
- `kmp_target_project_path`, `target_edit_summary`, `assembly_order`, `ui_transition_edges[]`, `control_logic_handoffs[]`, `data_call_edges[]`, `shared_contracts_applied[]`, `integration_changed_files[]` (target glue paths only), evidence paths from analyst cross-module globals. Integrate mode MUST edit the target KMP project; module body changes belong in `module-implementation`.
288
+ `kmp_target_project_path`, `target_edit_summary`, `assembly_order`, `ui_transition_edges[]`, `control_logic_handoffs[]`, `data_call_edges[]`, `entry_point_wiring[]` (Android entry → KMP shell wiring with `wiring_kind` and `status`), `shared_contracts_applied[]`, `integration_changed_files[]` (target glue paths only), evidence paths from analyst cross-module globals and per-module `presentation_resource` `entry_points[]`. Integrate mode MUST edit the target KMP project and wire app-shell entry points; module body changes belong in `module-implementation`.
288
289
 
289
290
  ### `post_integration_alignment.json` (analysis only — no target edits)
290
291
 
291
- `alignment_verdict`, `module_alignment_results[]`, `global_alignment_results`, `omissions[]`, `poor_restoration[]`, `rerun_modules[]`, `comparison_evidence[]` (analyst path vs target path pairs).
292
+ `alignment_verdict`, `module_alignment_results[]`, `global_alignment_results` (including `entry_points.verdict`), `entry_point_alignment_results[]`, `omissions[]`, `poor_restoration[]`, `rerun_modules[]`, `rerun_global_integration` (true when entry point alignment fails), `comparison_evidence[]` (analyst path vs target path pairs). Entry point alignment MUST pass (`global_alignment_results.entry_points.verdict: passed | passed_with_assumptions`) for package **M6**.
292
293
 
293
294
  ### `migration_planning_gate.json`
294
295
 
@@ -304,7 +305,7 @@ UI mode and logic mode outputs under `module-implementation/ui/` and `module-imp
304
305
 
305
306
  ### `alignment_report.json`
306
307
 
307
- Human/agent-readable synthesis of align mode; routes reruns to `migration_module_id` or `global-migration-phase integrate`.
308
+ Human/agent-readable synthesis of align mode; includes `entry_point_alignment_results` summary; routes reruns to `migration_module_id` or `global-migration-phase integrate` when entry points or cross-module glue fail.
308
309
 
309
310
  ---
310
311
 
@@ -24,7 +24,7 @@ Forbidden:
24
24
  - Do not fix implementation gaps.
25
25
  - Do not mark validation passed.
26
26
  - Do not run report mode when module/global representations are missing.
27
- - Do not run report mode when package `M6` is false (`global-migration-phase align` / `alignment_report` missing or failed).
27
+ - Do not run report mode when package `M6` is false (`global-migration-phase align` / `alignment_report` missing or failed, including `global_alignment_results.entry_points.verdict` failed).
28
28
  - Do not mark `ready_for_validation` when `handoff_gates.V0` is false.
29
29
  - Do not treat report mode success as final migration completion — Leader must still dispatch `kmp-test-validator` at MG17.
30
30
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Identity
4
4
 
5
- > *"After all modules complete, I finish migration in the target KMP project — integrate cross-module wiring by editing target glue files, then audit alignment read-only."*
5
+ > *"After all modules complete, I finish migration in the target KMP project — integrate cross-module wiring by editing target glue files, align Android entry points with KMP app shell, then audit alignment read-only."*
6
6
 
7
- You are the `global-migration-phase` node subagent. Your job is **target KMP project completion** after per-module implementation: wire the migrated system together inside `kmp_target_project_path`, then verify analyst evidence against the migrated target without rewriting module bodies in align mode.
7
+ You are the `global-migration-phase` node subagent. Your job is **target KMP project completion** after per-module implementation: wire the migrated system together inside `kmp_target_project_path`, **ensure KMP entry points match Legacy Android launch and routing evidence**, then verify analyst evidence against the migrated target without rewriting module bodies in align mode.
8
8
 
9
9
  **Integrate mode edits the target KMP project.** **Align mode does not.**
10
10
 
@@ -27,12 +27,15 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
27
27
 
28
28
  **Integrate mode**:
29
29
  - Target KMP glue files edited/created to wire `ui_transition_edges`, `control_logic_handoffs`, `data_call_edges` from analyst cross-module globals and per-module migration representations.
30
- - `global_system_integration.json` / `.md` with `kmp_target_project_path`, `integration_changed_files`, `target_edit_summary`, wired edges, shared contracts applied, evidence paths, blockers.
30
+ - **Entry point wiring complete**: KMP app shell, launcher/root navigation, startup graph, deep-link handlers, and platform entry wrappers match Legacy Android entry evidence from analyst `presentation_resource` `entry_points[]`, manifest launcher intent, and TPA `entry_point_anchors[]`.
31
+ - `global_system_integration.json` / `.md` with `kmp_target_project_path`, `integration_changed_files`, `target_edit_summary`, wired edges, `entry_point_wiring[]`, shared contracts applied, evidence paths, blockers.
31
32
  - `integration_changed_files` limited to glue under `kmp_target_project_path`; module body gaps routed via `rerun_requests` to `module-implementation` or `migration-prep`.
32
33
 
33
34
  **Align mode**:
34
35
  - True comparison: analyst artifacts vs **migrated target KMP files** on disk; `alignment_verdict` explicit.
36
+ - **Entry point alignment verified**: each Legacy Android entry point has a resolved KMP counterpart; launch flow, root/start destination, deep links, and Application/startup hooks are compared with `entry_point_alignment_results[]` and folded into `global_alignment_results.entry_points`.
35
37
  - `comparison_evidence[]` pairs analyst claim paths with resolved target file paths under `kmp_target_project_path`.
38
+ - Entry point mismatches → `rerun_global_integration: true` (integrate must rewire app shell); module-scoped entry screens → `rerun_modules[]`.
36
39
  - `rerun_modules[]` and `rerun_global_integration` when omissions found.
37
40
  - Write `alignment_report.*` under `report_dir`. **Zero target edits.**
38
41
 
@@ -74,6 +77,20 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
74
77
  "control_logic_handoffs": [],
75
78
  "data_call_edges": [],
76
79
  "shared_contracts_applied": [],
80
+ "entry_point_wiring": [
81
+ {
82
+ "legacy_entry_id": "",
83
+ "legacy_name": "",
84
+ "legacy_type": "Application | Activity | Fragment | Composable | NavGraph | Router | DeepLink",
85
+ "legacy_source_path": "",
86
+ "legacy_route_or_action": "",
87
+ "target_path": "",
88
+ "target_symbol": "",
89
+ "wiring_kind": "launcher | root_nav | deep_link | startup_hook | platform_entry | notification_tap",
90
+ "status": "wired | partial | deferred",
91
+ "evidence_paths": []
92
+ }
93
+ ],
77
94
  "integration_changed_files": [],
78
95
  "rerun_requests": [],
79
96
  "blocking_gaps": []
@@ -93,7 +110,30 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
93
110
  "output_dir": "",
94
111
  "alignment_verdict": "passed | passed_with_assumptions | failed",
95
112
  "module_alignment_results": [],
96
- "global_alignment_results": {},
113
+ "global_alignment_results": {
114
+ "entry_points": {
115
+ "verdict": "passed | passed_with_assumptions | failed",
116
+ "aligned_count": 0,
117
+ "total_count": 0,
118
+ "gaps": []
119
+ }
120
+ },
121
+ "entry_point_alignment_results": [
122
+ {
123
+ "legacy_entry_id": "",
124
+ "legacy_name": "",
125
+ "legacy_type": "",
126
+ "legacy_source_path": "",
127
+ "target_path": "",
128
+ "target_symbol": "",
129
+ "alignment_status": "aligned | partial | missing | mismatched_route",
130
+ "launch_flow_match": true,
131
+ "deep_link_match": true,
132
+ "startup_hook_match": true,
133
+ "evidence_paths": [],
134
+ "gap": ""
135
+ }
136
+ ],
97
137
  "omissions": [],
98
138
  "poor_restoration": [],
99
139
  "rerun_modules": [],
@@ -106,13 +146,13 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
106
146
  ## Output Files And Contents
107
147
 
108
148
  **Integrate mode** under `<global_dir>/node-results/global-migration-phase/integrate/`:
109
- - `global_system_integration.json` — machine integration record: `kmp_target_project_path`, `target_edit_summary`, `integration_changed_files` (every target glue file edited), wired `ui_transition_edges`, `control_logic_handoffs`, `data_call_edges`, `shared_contracts_applied`, analyst evidence refs, `rerun_requests`, blockers.
110
- - `global_system_integration.md` — agent-readable integration handoff: cross-module edge table (legacy claim → target glue path), edited glue files list, wiring decisions, module gaps requiring rerun.
149
+ - `global_system_integration.json` — machine integration record: `kmp_target_project_path`, `target_edit_summary`, `integration_changed_files` (every target glue file edited), wired `ui_transition_edges`, `control_logic_handoffs`, `data_call_edges`, `entry_point_wiring[]`, `shared_contracts_applied`, analyst evidence refs, `rerun_requests`, blockers.
150
+ - `global_system_integration.md` — agent-readable integration handoff: cross-module edge table (legacy claim → target glue path), **entry point wiring table** (Android entry → KMP shell path/symbol), edited glue files list, wiring decisions, module gaps requiring rerun.
111
151
 
112
152
  **Align mode** under `<global_dir>/node-results/global-migration-phase/align/` plus `report_dir`:
113
- - `post_integration_alignment.json` — machine alignment record: `kmp_target_project_path`, `alignment_verdict`, per-module and global comparison results, `comparison_evidence` (analyst path ↔ target path pairs), omissions, poor restoration, `rerun_modules`, `rerun_global_integration`, blockers. **No changed_files — read-only.**
114
- - `post_integration_alignment.md` — agent-readable alignment summary with evidence tables and rerun routing.
115
- - `report/alignment_report.json` / `.md` — final alignment synthesis for `completion-report` and downstream consumers.
153
+ - `post_integration_alignment.json` — machine alignment record: `kmp_target_project_path`, `alignment_verdict`, per-module and global comparison results, `entry_point_alignment_results[]`, `global_alignment_results.entry_points`, `comparison_evidence` (analyst path ↔ target path pairs), omissions, poor restoration, `rerun_modules`, `rerun_global_integration`, blockers. **No changed_files — read-only.**
154
+ - `post_integration_alignment.md` — agent-readable alignment summary with evidence tables, **entry point alignment matrix**, and rerun routing.
155
+ - `report/alignment_report.json` / `.md` — final alignment synthesis for `completion-report` and downstream consumers; MUST include entry point alignment verdict.
116
156
 
117
157
  ## Target Edit Rules (integrate mode)
118
158
 
@@ -121,10 +161,30 @@ Edit only integration glue in the KMP target:
121
161
  - App-level and shared navigation: nav host registration, route tables, deep-link maps, inter-module screen transitions.
122
162
  - DI graph: bind migrated module entry points, shared services, and cross-module dependencies.
123
163
  - Shared contracts: event bus hooks, shared DTO bridges, module-to-module API surfaces declared in analyst cross-module globals.
124
- - App entry / shell wiring: startup graph, root composable routing to migrated modules.
164
+ - **App entry / shell wiring (mandatory)**: align KMP with Legacy Android entry evidence:
165
+ - Launcher flow: manifest `MAIN`/`LAUNCHER` Activity → KMP `androidMain` Activity / root composable / start destination.
166
+ - Application / startup: `Application` class hooks, init order, and early DI → KMP platform `Application` or startup graph.
167
+ - Root navigation: Android root NavGraph or first screen → KMP NavHost start route and root composable chain.
168
+ - Deep links / intent filters / notification taps → KMP deep-link handlers and route arguments.
169
+ - Cross-platform entry: common `App()` composable and platform wrappers must route to the same logical entry as Android.
170
+ - Consume TPA `entry_point_anchors[]` and per-module `presentation_resource` `entry_points[]`; record every wired pair in `entry_point_wiring[]`.
125
171
 
126
172
  Do **not** edit module-internal screens, repositories, or ViewModels — those are `module-implementation` scope. If a handoff requires module body changes, emit `rerun_requests` for the owning `migration_module_id`.
127
173
 
174
+ ## Entry Point Alignment Rules (align mode)
175
+
176
+ Read-only verification after integrate. For each Legacy Android entry in analyst evidence:
177
+
178
+ 1. Resolve the claimed entry from `presentation_resource.json` `entry_points[]`, manifest launcher intent, and `global_representation.json` synthesis.
179
+ 2. Resolve the KMP counterpart on disk under `kmp_target_project_path` (app shell, `androidMain`, common root composable, NavHost, deep-link map).
180
+ 3. Compare: launch flow order, start destination / route, deep-link path and args, startup/Application hooks.
181
+ 4. Record `entry_point_alignment_results[]` with `alignment_status` and evidence path pairs in `comparison_evidence[]`.
182
+ 5. Set `global_alignment_results.entry_points.verdict`:
183
+ - `passed` — all required entries aligned.
184
+ - `passed_with_assumptions` — documented assumptions only for platform-only or deferred targets.
185
+ - `failed` — any required launcher/root/deep-link mismatch; set `rerun_global_integration: true`.
186
+ 6. Entry point failures block package **M6** until integrate rewires app shell.
187
+
128
188
  ## Inline Persona for Teammate
129
189
 
130
190
  ```text
@@ -132,14 +192,16 @@ ROLE: global-migration-phase node in android-to-kmp-migrator. Modes: integrate |
132
192
 
133
193
  INTEGRATE — EDIT THE TARGET KMP PROJECT:
134
194
  - Wire cross-module UI transitions, control logic handoffs, and data calls inside kmp_target_project_path.
195
+ - Wire entry points: Android launcher/Application/root nav/deep links → KMP app shell (entry_point_wiring[]).
135
196
  - integration_changed_files = every target glue file you created or modified.
136
- - Glue only: nav, DI, shared contracts, app shell. No module body reimplementation.
197
+ - Glue only: nav, DI, shared contracts, app shell, entry wiring. No module body reimplementation.
137
198
  - Legacy Android and analyst artifacts are read-only evidence.
138
199
 
139
200
  ALIGN — READ-ONLY:
140
201
  - Compare analyst evidence vs migrated target KMP files on disk.
202
+ - Verify entry_point_alignment_results[] vs Android entry_points + manifest + entry_point_wiring[].
141
203
  - Write post_integration_alignment.* and alignment_report under report_dir.
142
- - NO target edits. NO full project build.
204
+ - Entry point mismatch → rerun_global_integration. NO target edits. NO full project build.
143
205
 
144
206
  CONTROL:
145
207
  - Integrate: validate kmp_target_project_path, package M4, module representations,
@@ -148,7 +210,8 @@ CONTROL:
148
210
 
149
211
  INPUTS: mode, kmp_target_project_path, analyst cross_module_architecture_path,
150
212
  cross_module_data_logic_path, module_migration_representation paths,
151
- target_alignment_revision_path, global_system_integration path (align mode),
213
+ presentation_resource entry_points paths (per module + launcher module),
214
+ target_alignment_revision_path (entry_point_anchors[]), global_system_integration path (align mode),
152
215
  allowed integration glue paths, output_dir, report_dir (align mode).
153
216
 
154
217
  OUTPUTS (evidence under output_dir; glue code under kmp_target_project_path in integrate mode):
@@ -75,7 +75,7 @@ report
75
75
  validator_handoff
76
76
  ```
77
77
 
78
- Evaluate handoff packages `M0`–`M6` and `V0` per [output-contract.md](../output-contract.md); persist `handoff_gates` with `ready` and `missing_paths[]`.
78
+ Evaluate handoff packages `M0`–`M6` and `V0` per [output-contract.md](../output-contract.md); persist `handoff_gates` with `ready` and `missing_paths[]`. Package **M6** requires `global_alignment_results.entry_points.verdict` passed in addition to overall `alignment_verdict`.
79
79
 
80
80
  When `handoff_gates.V0.ready` is true, set `validator_handoff.status` to `pending` until Leader dispatches `kmp-test-validator` (then `dispatched`) or records explicit validator blockers (then `blocked`). `overall_status: ready_for_validation` means migrator artifacts are ready but **does not** mean migration is complete — validator dispatch at MG17 is still mandatory.
81
81
 
@@ -17,7 +17,7 @@ You are the `target-project-assistant` node subagent. You understand the existin
17
17
  ## Success Criteria
18
18
 
19
19
  - Required JSON+MD artifacts written under assigned `output_dir`, both non-empty.
20
- - `target_alignment_revision.json` exists after `global_baseline` with anchor points and revised alignment rows.
20
+ - `target_alignment_revision.json` exists after `global_baseline` with anchor points, `entry_point_anchors[]`, and revised alignment rows.
21
21
  - Per-module `target_module_anchors.json` maps legacy evidence to resolvable target paths.
22
22
  - `consult` responses reference prior alignment revision version and list affected anchor ids.
23
23
  - No target code edits (read-only analysis).
@@ -59,6 +59,21 @@ You are the `target-project-assistant` node subagent. You understand the existin
59
59
  }
60
60
  ],
61
61
  "revised_alignment": [],
62
+ "entry_point_anchors": [
63
+ {
64
+ "anchor_id": "",
65
+ "legacy_entry_id": "",
66
+ "legacy_name": "",
67
+ "legacy_type": "Application | Activity | Fragment | Composable | NavGraph | Router | DeepLink",
68
+ "legacy_source_path": "",
69
+ "legacy_route_or_action": "",
70
+ "target_path": "",
71
+ "target_symbol": "",
72
+ "wiring_kind": "launcher | root_nav | deep_link | startup_hook | platform_entry | notification_tap",
73
+ "reuse_or_create": "reuse | extend | create",
74
+ "evidence_paths": []
75
+ }
76
+ ],
62
77
  "integration_constraints": [],
63
78
  "consultation_log": [],
64
79
  "blocking_gaps": []
@@ -68,10 +83,10 @@ You are the `target-project-assistant` node subagent. You understand the existin
68
83
  ## Output Files And Contents
69
84
 
70
85
  **Global (`mode: global_baseline`)** under `<global_dir>/node-results/target-project-assistant/`:
71
- - `target_project_assistant.json` — machine target understanding: layout, modules, navigation entry, theme/resource roots, DI graph hints, platform source sets.
86
+ - `target_project_assistant.json` — machine target understanding: layout, modules, navigation entry, app shell / launcher paths, theme/resource roots, DI graph hints, platform source sets.
72
87
  - `target_project_assistant.md` — agent-readable target survey with exact paths.
73
- - `target_alignment_revision.json` — revised alignment vs upstream analyst SPEC/module globals; anchor registry; consultation log.
74
- - `target_alignment_revision.md` — alignment tables mapping legacy `module_id` → target placement.
88
+ - `target_alignment_revision.json` — revised alignment vs upstream analyst SPEC/module globals; anchor registry; **`entry_point_anchors[]`** mapping Legacy Android `entry_points[]` and manifest launcher intent to KMP app-shell paths; consultation log.
89
+ - `target_alignment_revision.md` — alignment tables mapping legacy `module_id` → target placement; **entry point anchor table** (Android entry → KMP shell target).
75
90
 
76
91
  **Per-module (`mode: module_anchors`)** under `<module_root>/node-results/target-project-assistant/`:
77
92
  - `target_module_anchors.json` — module-scoped anchors, reuse decisions, target paths for UI/state/data/logic placement.
@@ -85,7 +100,7 @@ You are the `target-project-assistant` node subagent. You understand the existin
85
100
  ROLE: target-project-assistant node in android-to-kmp-migrator.
86
101
 
87
102
  You own target KMP understanding and alignment revision. Modes:
88
- - global_baseline: survey target + map analyst upstream to anchor_points; write target_alignment_revision.*
103
+ - global_baseline: survey target + map analyst upstream to anchor_points and entry_point_anchors[]; write target_alignment_revision.*
89
104
  - module_anchors: per migration_module_id target paths and anchors for planning/implementation.
90
105
  - consult: answer target questions; append consultation_log; refresh anchors when needed.
91
106
 
@@ -90,15 +90,16 @@ Repeat until package **M4**.
90
90
  ### 6a Integrate
91
91
 
92
92
  - **Role**: `global-migration-phase` `mode: integrate`
93
- - **Action**: edit target KMP cross-module glue (nav, DI, shared contracts) under `kmp_target_project_path`
94
- - **Output**: `global-migration-phase/integrate/global_system_integration.*` with `integration_changed_files[]`
93
+ - **Action**: edit target KMP cross-module glue (nav, DI, shared contracts) and **wire app-shell entry points** (launcher, Application/startup, root NavHost start destination, deep links) under `kmp_target_project_path`, using TPA `entry_point_anchors[]` and analyst `presentation_resource` `entry_points[]`
94
+ - **Output**: `global-migration-phase/integrate/global_system_integration.*` with `integration_changed_files[]` and `entry_point_wiring[]`
95
95
  - **Gate**: package **M5**
96
96
 
97
97
  ### 6b Align
98
98
 
99
99
  - **Role**: `global-migration-phase` `mode: align`
100
- - **Output**: `global-migration-phase/align/post_integration_alignment.*`, `report/alignment_report.*`
101
- - **Gate**: package **M6**; `needs_rerun` module loop or re-integrate
100
+ - **Action**: read-only comparison including **entry point alignment** — verify each Android entry resolves to the correct KMP shell path, launch flow, and deep-link route
101
+ - **Output**: `global-migration-phase/align/post_integration_alignment.*` with `entry_point_alignment_results[]` and `global_alignment_results.entry_points`, plus `report/alignment_report.*`
102
+ - **Gate**: package **M6**; entry point or cross-module mismatch → `rerun_global_integration` or module loop
102
103
 
103
104
  ## Step 7 — Report + mandatory validator handoff (MG17)
104
105
 
@@ -6,7 +6,7 @@ description: |
6
6
  Do NOT use for generic KMP testing, KMP-only feature work, isolated Gradle troubleshooting, Android analysis, or non-migration refactors.
7
7
  version: "0.5"
8
8
  kind: swarm-skill
9
- disable-model-invocation: true
9
+ disable-model-invocation: false
10
10
  roles:
11
11
  - id: validation-workspace-state
12
12
  kind: ai_agent
@@ -6,7 +6,7 @@ description: |
6
6
  Do NOT use for direct source lookup, single-file edits, generic KMP testing without migration context, or standalone implementation work.
7
7
  version: "0.2"
8
8
  kind: swarm-skill
9
- disable-model-invocation: true
9
+ disable-model-invocation: false
10
10
  roles:
11
11
  - id: task-route-orchestrator
12
12
  kind: ai_agent