@code-migration/wow-migrator 0.2.5 → 0.2.6
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/bind.md +1 -1
- package/skills/android-project-analyst/output-contract.md +18 -3
- package/skills/android-project-analyst/roles/analysis-workspace-state.md +11 -7
- package/skills/android-project-analyst/roles/data-contract-flow.md +80 -13
- package/skills/android-project-analyst/workflow.md +3 -2
- package/skills/android-to-kmp-migrator/SKILL.md +3 -3
- package/skills/android-to-kmp-migrator/bind.md +1 -0
- package/skills/android-to-kmp-migrator/output-contract.md +53 -8
- package/skills/android-to-kmp-migrator/roles/completion-report.md +1 -1
- package/skills/android-to-kmp-migrator/roles/global-migration-phase.md +54 -0
- package/skills/android-to-kmp-migrator/roles/migration-prep.md +15 -3
- package/skills/android-to-kmp-migrator/roles/migration-verification.md +41 -6
- package/skills/android-to-kmp-migrator/roles/module-implementation.md +19 -4
- package/skills/android-to-kmp-migrator/workflow.md +9 -8
- package/skills/kmp-test-validator/output-contract.md +7 -4
- package/skills/kmp-test-validator/roles/validation-business-testing.md +15 -3
- package/skills/kmp-test-validator/roles/validation-fidelity-gate.md +27 -2
- package/skills/kmp-test-validator/workflow.md +2 -2
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ Team-level rules — distinct from each role's own `## Boundary`.
|
|
|
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 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
|
|
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; `data_flow_tracker_report.*` must record handler-step coverage, follow-ups, and links to `data_contract_flow.*`; 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.
|
|
@@ -33,6 +33,8 @@ output_root = <output_dir or ~/.a2c_agents/understand>/android-project-analyst
|
|
|
33
33
|
│ │ │ ├── project_architecture.json
|
|
34
34
|
│ │ │ └── project_architecture.md
|
|
35
35
|
│ │ ├── data-contract-flow/
|
|
36
|
+
│ │ │ ├── data_flow_tracker_report.json
|
|
37
|
+
│ │ │ ├── data_flow_tracker_report.md
|
|
36
38
|
│ │ │ ├── data_contract_flow.json
|
|
37
39
|
│ │ │ └── data_contract_flow.md
|
|
38
40
|
│ │ └── behavior-logic/
|
|
@@ -162,6 +164,8 @@ Artifacts MUST be produced in this order. Skipping a layer invalidates downstrea
|
|
|
162
164
|
| `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 |
|
|
163
165
|
| `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 |
|
|
164
166
|
| `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 |
|
|
167
|
+
| `modules/<module_id>/node-results/data-contract-flow/data_flow_tracker_report.json` | `data-contract-flow` | `module_id`, `handler_steps[]`, `coverage_summary`, `follow_ups[]`, `blocking_gaps`, `linked_artifacts` | Investigation coverage gate, workspace ledger, rerun routing |
|
|
168
|
+
| `modules/<module_id>/node-results/data-contract-flow/data_flow_tracker_report.md` | `data-contract-flow` | Step coverage table, coverage summary, open follow-ups, blockers | Agent-readable investigation handoff |
|
|
165
169
|
| `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 |
|
|
166
170
|
| `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 |
|
|
167
171
|
| `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` |
|
|
@@ -277,14 +281,23 @@ Rules:
|
|
|
277
281
|
"evidence_count": 0
|
|
278
282
|
},
|
|
279
283
|
"project-architecture": { },
|
|
280
|
-
"data-contract-flow": {
|
|
284
|
+
"data-contract-flow": {
|
|
285
|
+
"node_id": "data-contract-flow",
|
|
286
|
+
"output_dir": "",
|
|
287
|
+
"json_path": "",
|
|
288
|
+
"md_path": "",
|
|
289
|
+
"tracker_json_path": "",
|
|
290
|
+
"tracker_md_path": "",
|
|
291
|
+
"status": "completed | blocked | missing",
|
|
292
|
+
"evidence_count": 0
|
|
293
|
+
},
|
|
281
294
|
"behavior-logic": { }
|
|
282
295
|
},
|
|
283
296
|
"representation_ready": false
|
|
284
297
|
}
|
|
285
298
|
```
|
|
286
299
|
|
|
287
|
-
Each dimension entry MUST have resolvable `json_path` and `md_path` before `representation_ready` is true.
|
|
300
|
+
Each dimension entry MUST have resolvable `json_path` and `md_path` before `representation_ready` is true. The `data-contract-flow` entry MUST also have resolvable `tracker_json_path` and `tracker_md_path`.
|
|
288
301
|
|
|
289
302
|
### Cross-module global records (migration assembly basis)
|
|
290
303
|
|
|
@@ -364,8 +377,9 @@ Downstream handlers MUST NOT start unless the declared package gate passes. A ga
|
|
|
364
377
|
| `modules/<module_id>/module_brief.json` |
|
|
365
378
|
| `modules/<module_id>/dimension_index.json` (all four dimensions `status: completed`) |
|
|
366
379
|
| all four dimension JSON+MD pairs under `node-results/<dimension>/` |
|
|
380
|
+
| `modules/<module_id>/node-results/data-contract-flow/data_flow_tracker_report.json` and `.md` |
|
|
367
381
|
|
|
368
|
-
**Fail closed when**: any dimension is `missing`, `blocked`, or paths in `dimension_index.json` do not resolve.
|
|
382
|
+
**Fail closed when**: any dimension is `missing`, `blocked`, or paths in `dimension_index.json` do not resolve; `data-contract-flow` tracker report is missing, empty, or `handler_steps` do not cover all eleven investigation steps.
|
|
369
383
|
|
|
370
384
|
### Package `P3` — Module representation handoff
|
|
371
385
|
|
|
@@ -440,6 +454,7 @@ Every node MUST:
|
|
|
440
454
|
- Use exact filenames from this contract (JSON snake_case basename, dimension folder kebab-case).
|
|
441
455
|
- Include `module_id` in every dimension JSON artifact.
|
|
442
456
|
- Populate cross-module pointer arrays (`cross_module_references`, `cross_module_dependencies`, `cross_module_data_links`, `cross_module_interactions`) with `target_module_id` and `source_paths` so the Leader can build Package `P4` without re-reading source.
|
|
457
|
+
- `data-contract-flow` MUST write and maintain `data_flow_tracker_report.*` during investigation and list all four output files in `output_files`.
|
|
443
458
|
|
|
444
459
|
## Invalid Artifact Handling (downstream uniform rule)
|
|
445
460
|
|
|
@@ -10,7 +10,7 @@ You are the `analysis-workspace-state` node subagent dispatched by the `android-
|
|
|
10
10
|
|
|
11
11
|
- `analysis_workspace_state.json` and `analysis_workspace_state.md` written under `output_dir`, both non-empty.
|
|
12
12
|
- Every known analysis module and node output is normalized into one ledger.
|
|
13
|
-
- Stale inputs are flagged when module briefs, node outputs, module representations, global representation, SPEC paths, source roots, or analysis requirements changed since a dependent artifact was produced.
|
|
13
|
+
- Stale inputs are flagged when module briefs, node outputs, data-flow investigation tracker reports, module representations, global representation, SPEC paths, source roots, or analysis requirements changed since a dependent artifact was produced.
|
|
14
14
|
- Rerun and blocker history are recorded without hiding repeated failures.
|
|
15
15
|
- Next safe controller actions are listed.
|
|
16
16
|
- `handoff_gates` for packages `P0`–`P6` per [output-contract.md](../output-contract.md) are evaluated with `ready` flags and `missing_paths[]`.
|
|
@@ -70,7 +70,7 @@ Write only under `output_dir = <output_root>/workspace-state/`. Evaluate handoff
|
|
|
70
70
|
## Output Files And Contents
|
|
71
71
|
|
|
72
72
|
- `analysis_workspace_state.json`: machine-routable ledger of run mode, current controller step, module statuses, node output statuses, artifact inventory, stale upstream inputs, rerun history, blocking gaps, `handoff_gates` (`P0`–`P6` per [output-contract.md](../output-contract.md)), and next safe actions. It must not include UI, architecture, data-flow, or behavior analysis.
|
|
73
|
-
- `analysis_workspace_state.md`: agent-readable ledger handoff with module status table, dimension output inventory per `module_id`, `modules_index.json` and `dimension_index.json` readiness, cross-module global record status, artifact readiness table, stale-input table, rerun/blocker history, and next controller action. It must preserve exact artifact paths and owner nodes.
|
|
73
|
+
- `analysis_workspace_state.md`: agent-readable ledger handoff with module status table, dimension output inventory per `module_id`, data-flow investigation tracker status per module, `modules_index.json` and `dimension_index.json` readiness, cross-module global record status, artifact readiness table, stale-input table, rerun/blocker history, and next controller action. It must preserve exact artifact paths and owner nodes.
|
|
74
74
|
|
|
75
75
|
## Inline Persona for Teammate
|
|
76
76
|
|
|
@@ -114,13 +114,17 @@ INPUTS YOU WILL RECEIVE:
|
|
|
114
114
|
HANDLER (how you process):
|
|
115
115
|
1. Normalize module status and node output status for every known analysis module.
|
|
116
116
|
2. Track artifact inventory for run manifest, module inventory, modules_index.json, module briefs,
|
|
117
|
-
dimension outputs
|
|
117
|
+
dimension outputs (including `data-contract-flow` → `data_flow_tracker_report.*` plus
|
|
118
|
+
`data_contract_flow.*`), dimension_index.json, module representations, cross-module global records,
|
|
118
119
|
global representation, and SPEC outputs.
|
|
119
|
-
3.
|
|
120
|
+
3. For each `data-contract-flow` module output, record tracker report paths, `handler_steps`
|
|
121
|
+
completion summary, open `follow_ups`, and `blocking_gaps`; flag stale when tracker and
|
|
122
|
+
`data_contract_flow.*` are out of sync or tracker is missing.
|
|
123
|
+
4. Detect stale upstream inputs when source roots, module briefs, node outputs, representations, or
|
|
120
124
|
SPEC inputs changed after dependent artifacts were produced.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
5. Record rerun and blocker history without hiding repeated failures.
|
|
126
|
+
6. Evaluate handoff packages P0–P6 from output-contract.md; set ready flags and missing_paths.
|
|
127
|
+
7. Identify the next safe controller action.
|
|
124
128
|
|
|
125
129
|
OUTPUTS (write under output_dir, exact names):
|
|
126
130
|
- analysis_workspace_state.json (machine ledger: module/node/artifact status, stale inputs, reruns, blockers, next actions)
|
|
@@ -8,7 +8,8 @@ You are the `data-contract-flow` node subagent and data contract/flow owner disp
|
|
|
8
8
|
|
|
9
9
|
## Success Criteria
|
|
10
10
|
|
|
11
|
-
- `data_contract_flow.json` and `
|
|
11
|
+
- `data_contract_flow.json`, `data_contract_flow.md`, `data_flow_tracker_report.json`, and `data_flow_tracker_report.md` written under the assigned module-scoped `output_dir`, all non-empty.
|
|
12
|
+
- `data_flow_tracker_report.*` records investigation-step coverage, follow-ups, and links to the final flow artifacts.
|
|
12
13
|
- The output includes the exact `module_id` and stays within `module_scope`.
|
|
13
14
|
- Every API entry has a service class/function or is listed as dynamic/unknown.
|
|
14
15
|
- Every API entry and major data-source claim has at least one source path.
|
|
@@ -33,7 +34,8 @@ You are the `data-contract-flow` node subagent and data contract/flow owner disp
|
|
|
33
34
|
- You MUST validate inputs and scope before work (`module_id` present, `module_scope` in-bounds, and `module_brief_path` exists); on missing/stale/contradictory/out-of-scope inputs, stop and return `blocked` or `needs_rerun` with precise `blocking_gaps`.
|
|
34
35
|
- You MUST attach a source path to every endpoint, major data source, repository flow, transformation, and end-to-end flow.
|
|
35
36
|
- You MUST record dynamic/generated/unavailable APIs in `dynamic_or_unknown_apis` instead of guessing.
|
|
36
|
-
- You MUST
|
|
37
|
+
- You MUST maintain `data_flow_tracker_report.json` and `data_flow_tracker_report.md` throughout investigation — update step coverage and follow-ups as you work, then finalize before completion.
|
|
38
|
+
- You MUST write all four artifacts under `output_dir`, list them in `output_files`, and verify they exist and are non-empty before reporting `completed`.
|
|
37
39
|
|
|
38
40
|
## Output Schema
|
|
39
41
|
|
|
@@ -88,6 +90,54 @@ You are the `data-contract-flow` node subagent and data contract/flow owner disp
|
|
|
88
90
|
}
|
|
89
91
|
```
|
|
90
92
|
|
|
93
|
+
#### `data_flow_tracker_report.json` (investigation tracker — write/update during analysis)
|
|
94
|
+
|
|
95
|
+
Machine-routable progress ledger for the data-flow investigation. Update as handler steps complete; finalize when `data_contract_flow.*` is written.
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"status": "in_progress | completed | blocked",
|
|
100
|
+
"node": "data-contract-flow",
|
|
101
|
+
"module_id": "",
|
|
102
|
+
"investigation_started_at": "",
|
|
103
|
+
"investigation_completed_at": "",
|
|
104
|
+
"linked_artifacts": {
|
|
105
|
+
"data_contract_flow_json": "data_contract_flow.json",
|
|
106
|
+
"data_contract_flow_md": "data_contract_flow.md"
|
|
107
|
+
},
|
|
108
|
+
"handler_steps": [
|
|
109
|
+
{
|
|
110
|
+
"step_id": "scope_and_cross_module_links | network_stack | api_declarations | api_consumers | local_data_sources | models_and_mappings | repository_layers | reactive_propagation | transformations_writeback | loading_error_empty | record_unknowns",
|
|
111
|
+
"step_number": 0,
|
|
112
|
+
"status": "pending | in_progress | completed | partial | blocked | skipped",
|
|
113
|
+
"items_investigated": 0,
|
|
114
|
+
"items_pending": 0,
|
|
115
|
+
"follow_ups": [],
|
|
116
|
+
"evidence_paths": []
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"coverage_summary": {
|
|
120
|
+
"apis": { "total": 0, "investigated": 0, "unknown": 0 },
|
|
121
|
+
"data_sources": { "total": 0, "investigated": 0, "unknown": 0 },
|
|
122
|
+
"repository_flows": { "total": 0, "investigated": 0, "unknown": 0 },
|
|
123
|
+
"reactive_streams": { "total": 0, "investigated": 0, "unknown": 0 },
|
|
124
|
+
"end_to_end_flows": { "total": 0, "investigated": 0, "unknown": 0 }
|
|
125
|
+
},
|
|
126
|
+
"follow_ups": [
|
|
127
|
+
{
|
|
128
|
+
"id": "",
|
|
129
|
+
"area": "",
|
|
130
|
+
"description": "",
|
|
131
|
+
"reason": "",
|
|
132
|
+
"blocking": false,
|
|
133
|
+
"owner": "data-contract-flow | behavior-logic | Leader",
|
|
134
|
+
"source_paths": []
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"blocking_gaps": []
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
91
141
|
## Output Path Contract
|
|
92
142
|
|
|
93
143
|
Write only under `output_dir = <output_root>/modules/<module_id>/node-results/data-contract-flow/`. Exact filenames and downstream trigger role: [output-contract.md](../output-contract.md) § Per-module dispatch and dimensions. Out-of-path artifacts invalidate package `P2`.
|
|
@@ -96,6 +146,8 @@ Write only under `output_dir = <output_root>/modules/<module_id>/node-results/da
|
|
|
96
146
|
|
|
97
147
|
- `data_contract_flow.json`: machine-routable data contract/flow artifact containing network stack, API declarations, request/response/model contracts, local/generated/platform data sources, model mappings, repository flows, reactive streams, transformations, end-to-end flows, dynamic/unknown APIs, cross-module data links, gaps, assumptions, and evidence paths.
|
|
98
148
|
- `data_contract_flow.md`: agent-readable data handoff containing network stack overview, API endpoint table, consumer mapping table, local/generated/platform data-source inventory, model mapping notes, repository & mapper flow tables, reactive stream summary, end-to-end Mermaid flow diagrams when evidence allows, loading/error/empty handling summary, dynamic or unknown API gaps, gaps, and assumptions.
|
|
149
|
+
- `data_flow_tracker_report.json`: machine-routable investigation tracker — handler-step status, coverage counts, follow-ups, blocking gaps, and links to `data_contract_flow.*`.
|
|
150
|
+
- `data_flow_tracker_report.md`: agent-readable investigation handoff — step coverage table, coverage summary, open follow-ups, and blockers. Update during analysis; finalize when flow artifacts are complete.
|
|
99
151
|
|
|
100
152
|
## Inline Persona for Teammate
|
|
101
153
|
|
|
@@ -113,7 +165,9 @@ CONTROL — validate before you act, verify before you report:
|
|
|
113
165
|
and module_brief_path exists. On missing / stale / contradictory / out-of-scope inputs, STOP
|
|
114
166
|
and return status "blocked" or "needs_rerun" with precise blocking_gaps. Do not guess or
|
|
115
167
|
broaden scope.
|
|
116
|
-
-
|
|
168
|
+
- Initialize data_flow_tracker_report.* at investigation start; refresh step coverage and
|
|
169
|
+
follow_ups as handler steps complete.
|
|
170
|
+
- Write outputs ONLY under output_dir; do not report "completed" until all four files exist,
|
|
117
171
|
are non-empty, and are verified.
|
|
118
172
|
|
|
119
173
|
You MUST attach a source path to every endpoint, data source, repository flow, transformation,
|
|
@@ -137,28 +191,41 @@ INPUTS YOU WILL RECEIVE:
|
|
|
137
191
|
- optional jetbrains MCP context (indexed search / symbol info): {MCP_CONTEXT}
|
|
138
192
|
|
|
139
193
|
HANDLER (how you process):
|
|
194
|
+
0. Create data_flow_tracker_report.json and .md with status in_progress, module_id,
|
|
195
|
+
investigation_started_at, empty handler_steps aligned to steps 1–11 below, and
|
|
196
|
+
coverage_summary initialized to zero.
|
|
140
197
|
1. Stay inside module_scope; record cross-module data dependencies as cross_module_data_links with target_module_id and source_paths — these feed global/cross_module_data_logic.* during Leader integration
|
|
141
|
-
without analyzing target modules here.
|
|
198
|
+
without analyzing target modules here. Update tracker step scope_and_cross_module_links.
|
|
142
199
|
2. Identify network stack (Retrofit/OkHttp/Ktor/Volley/GraphQL/custom/generated clients).
|
|
200
|
+
Update tracker step network_stack.
|
|
143
201
|
3. Catalog API service declarations (path, method, function, service class, request/response
|
|
144
|
-
types, annotations).
|
|
202
|
+
types, annotations). Update tracker step api_declarations and coverage_summary.apis.
|
|
145
203
|
4. Catalog API and data consumers (repositories, data sources, use cases, ViewModels, presenters,
|
|
146
|
-
loaders, workers).
|
|
204
|
+
loaders, workers). Update tracker step api_consumers.
|
|
147
205
|
5. Catalog local/generated/platform data sources (Room/SQLite/DataStore/SharedPreferences/files/
|
|
148
|
-
ContentProvider/in-memory caches/Worker outputs/generated API or DB code).
|
|
206
|
+
ContentProvider/in-memory caches/Worker outputs/generated API or DB code). Update tracker step
|
|
207
|
+
local_data_sources and coverage_summary.data_sources.
|
|
149
208
|
6. Catalog models and mappings (request/response DTOs, entities, domain models, UI state models,
|
|
150
|
-
pagination/error wrappers).
|
|
209
|
+
pagination/error wrappers). Update tracker step models_and_mappings.
|
|
151
210
|
7. Trace repository & data-source layers (interfaces, implementations, mappers, cache policies,
|
|
152
|
-
paging sources, loaders, data managers).
|
|
211
|
+
paging sources, loaders, data managers). Update tracker step repository_layers and
|
|
212
|
+
coverage_summary.repository_flows.
|
|
153
213
|
8. Trace reactive propagation (LiveData/StateFlow/Flow/Rx/callbacks/event-bus/observable fields/
|
|
154
|
-
Compose state).
|
|
214
|
+
Compose state). Update tracker step reactive_propagation and coverage_summary.reactive_streams.
|
|
155
215
|
9. Trace transformations and write-back paths (action→validation→repo/API/local write→cache
|
|
156
|
-
invalidation→UI update).
|
|
216
|
+
invalidation→UI update). Update tracker step transformations_writeback.
|
|
157
217
|
10. Identify loading/error/empty paths, retry/refresh, cache invalidation, pagination, and gaps.
|
|
218
|
+
Update tracker step loading_error_empty.
|
|
158
219
|
11. Record unknowns (dynamic endpoint construction, generated code absent, remote schema
|
|
159
|
-
|
|
220
|
+
unavailable, unclear consumers). Update tracker step record_unknowns; add non-blocking items to
|
|
221
|
+
follow_ups and blocking items to blocking_gaps.
|
|
222
|
+
12. Write data_contract_flow.json and .md from verified findings; finalize tracker with status
|
|
223
|
+
completed, investigation_completed_at, linked_artifacts paths, and reconciled coverage_summary
|
|
224
|
+
counts vs data_contract_flow.json.
|
|
160
225
|
|
|
161
226
|
OUTPUTS (write under output_dir, exact names):
|
|
227
|
+
- data_flow_tracker_report.json (investigation tracker: handler-step coverage, follow-ups, blockers)
|
|
228
|
+
- data_flow_tracker_report.md (agent handoff: step table, coverage summary, follow-ups, blockers)
|
|
162
229
|
- data_contract_flow.json (machine artifact: APIs, data sources, models, mappings, repository/reactive/end-to-end flows, gaps, evidence)
|
|
163
230
|
- data_contract_flow.md (agent handoff: endpoint/source/consumer tables, flow diagrams, loading/error/empty behavior, unknowns)
|
|
164
231
|
|
|
@@ -167,7 +234,7 @@ RETURN TO CONTROLLER (exactly this shape, no preamble):
|
|
|
167
234
|
"status": "completed",
|
|
168
235
|
"node": "data-contract-flow",
|
|
169
236
|
"summary": "short summary",
|
|
170
|
-
"output_files": ["data_contract_flow.json", "data_contract_flow.md"],
|
|
237
|
+
"output_files": ["data_flow_tracker_report.json", "data_flow_tracker_report.md", "data_contract_flow.json", "data_contract_flow.md"],
|
|
171
238
|
"key_findings": [],
|
|
172
239
|
"blocking_gaps": []
|
|
173
240
|
}
|
|
@@ -126,8 +126,9 @@ No node may choose its own output path. `presentation-resource` may write downlo
|
|
|
126
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
|
+
- `data_flow_tracker_report.json`, `data_flow_tracker_report.md`: investigation-step coverage, coverage counts, follow-ups, blockers, and links to the flow artifacts above.
|
|
129
130
|
- **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.
|
|
130
|
-
- **Quality gate**: each return must be `status: "completed"` with `output_files` that exist and are non-empty. Refresh `analysis-workspace-state` after the group; on missing/empty/non-`completed`/stale output → re-dispatch that node with the same contract plus the failure reason (retry policy in [bind.md](bind.md) § Failure Handling). Do NOT synthesize around a failed node.
|
|
131
|
+
- **Quality gate**: each return must be `status: "completed"` with `output_files` that exist and are non-empty. For `data-contract-flow`, require `data_flow_tracker_report.*` in addition to `data_contract_flow.*`. Refresh `analysis-workspace-state` after the group; on missing/empty/non-`completed`/stale output → re-dispatch that node with the same contract plus the failure reason (retry policy in [bind.md](bind.md) § Failure Handling). Do NOT synthesize around a failed node.
|
|
131
132
|
|
|
132
133
|
### Step 5 — Stage B per module: dispatch behavior logic node (gated handoff, C-pattern)
|
|
133
134
|
|
|
@@ -142,7 +143,7 @@ No node may choose its own output path. `presentation-resource` may write downlo
|
|
|
142
143
|
|
|
143
144
|
- **Executor**: Leader
|
|
144
145
|
- **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. **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
|
+
- **Action**: write `dimension_index.json` mapping the four analysis dimensions to their verified artifact paths and status. For `data-contract-flow`, include `tracker_json_path` and `tracker_md_path` pointing at `data_flow_tracker_report.*`. 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
147
|
- **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
148
|
- **Serial / Parallel**: serial
|
|
148
149
|
- **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.
|
|
@@ -40,7 +40,7 @@ roles:
|
|
|
40
40
|
tools: [rg, git]
|
|
41
41
|
- id: migration-verification
|
|
42
42
|
kind: ai_agent
|
|
43
|
-
purpose: Module static checks + UI/logic restoration vs analyst — no full project build.
|
|
43
|
+
purpose: Module static checks + UI/logic/analytics (埋点) restoration vs analyst — no full project build.
|
|
44
44
|
skills: [operating-instructions]
|
|
45
45
|
tools: [rg, git]
|
|
46
46
|
- id: global-migration-phase
|
|
@@ -70,8 +70,8 @@ Module-first migrator for Legacy Android → KMP target assembly. **Upstream ana
|
|
|
70
70
|
2. Migration inventory + `modules_migration_index.json`.
|
|
71
71
|
3. Workspace state init.
|
|
72
72
|
4. TPA `global_baseline`.
|
|
73
|
-
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.
|
|
74
|
-
6. **Global phase `integrate`** (cross-module glue + **entry point wiring**) → **`align`** (incl. **entry point alignment** vs Android) + alignment report.
|
|
73
|
+
5. **Per module** (assembly_order): TPA `module_anchors` → **planning-gate** → **prep** (incl. analytics_expectations) → review/fix → **implementation `ui`** → review/fix → **implementation `logic`** (incl. 埋点 restoration) → review/fix → verification (incl. analytics_restoration) → completion record → readiness → module representation.
|
|
74
|
+
6. **Global phase `integrate`** (cross-module glue + **entry point wiring** + **analytics SDK wiring**) → **`align`** (incl. **entry point** and **analytics alignment** vs Android) + alignment report.
|
|
75
75
|
7. Global representation + completion-report `report` mode.
|
|
76
76
|
8. **kmp-test-validator** — **mandatory** when **V0** ready (MG17).
|
|
77
77
|
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
| `ui` and `logic` combined | Reject invocation |
|
|
52
52
|
| `integrate` and `align` combined | Reject invocation |
|
|
53
53
|
| Verification restoration failed | Rerun `module-implementation` or `migration-prep`; no completion record |
|
|
54
|
+
| Analytics restoration failed (`analytics_restoration` check or `global_alignment_results.analytics` failed) | Rerun `module-implementation` `logic` for missing 埋点; rerun `global-migration-phase integrate` for SDK wiring gaps |
|
|
54
55
|
| Align omissions | Rerun `rerun_modules` or `global-migration-phase integrate` |
|
|
55
56
|
| Entry point alignment failed | `rerun_global_integration` — rewire KMP app shell in integrate mode |
|
|
56
57
|
| Build requested in migrator | Block; route to kmp-test-validator |
|
|
@@ -198,8 +198,8 @@ output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator
|
|
|
198
198
|
| `migration-prep/migration_prep.json` |
|
|
199
199
|
| `module-implementation/ui/module_implementation_ui.json`, `module-implementation/logic/module_implementation_logic.json` + approved reviews |
|
|
200
200
|
| **Target edits**: when planning tasks require file changes, both UI and logic implementation artifacts MUST have non-empty `changed_files[]` under `kmp_target_project_path` |
|
|
201
|
-
| `migration_verification.json` with all required `check_ids` passed (including `target_files_exist` when `changed_files` non-empty) |
|
|
202
|
-
| `module_completion_record.json` with `ui_restoration` and `
|
|
201
|
+
| `migration_verification.json` with all required `check_ids` passed (including `target_files_exist` when `changed_files` non-empty, and `analytics_restoration` passed or `skipped` with evidence) |
|
|
202
|
+
| `module_completion_record.json` with `ui_restoration`, `logic_restoration`, and `analytics_restoration` passed (or analytics `skipped` with evidence) and `target_changed_files[]` listing module target paths |
|
|
203
203
|
|
|
204
204
|
### Package `M4` — All modules migrated
|
|
205
205
|
|
|
@@ -221,7 +221,7 @@ output_root = <output_dir or ~/.a2c_agents/migration>/android-to-kmp-migrator
|
|
|
221
221
|
| Required paths |
|
|
222
222
|
|---|
|
|
223
223
|
| Package `M5` |
|
|
224
|
-
| `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` |
|
|
224
|
+
| `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` and `global_alignment_results.analytics.verdict: passed \| passed_with_assumptions \| not_applicable` |
|
|
225
225
|
| `report/alignment_report.json` (includes entry point alignment verdict) |
|
|
226
226
|
|
|
227
227
|
### Package `V0` — kmp-test-validator entry (downstream)
|
|
@@ -306,6 +306,7 @@ Machine lookup: `migration_module_id` → `legacy_module_id`, `module_output_roo
|
|
|
306
306
|
"target_changed_files": [{ "path": "", "owning_role": "migration-prep | module-implementation | module-node-review-fix", "mode": "ui | logic | fix | null" }],
|
|
307
307
|
"ui_restoration": { "status": "passed | failed", "gaps": [] },
|
|
308
308
|
"logic_restoration": { "status": "passed | failed", "gaps": [] },
|
|
309
|
+
"analytics_restoration": { "status": "passed | failed | skipped", "restored_count": 0, "total_count": 0, "gaps": [] },
|
|
309
310
|
"upstream_match": { "module_representation_path": "", "matched_claims": [], "missing_claims": [] },
|
|
310
311
|
"rerun_required": false,
|
|
311
312
|
"evidence_paths": []
|
|
@@ -321,16 +322,19 @@ Machine lookup: `migration_module_id` → `legacy_module_id`, `module_output_roo
|
|
|
321
322
|
- `ui_render` — static UI surface check (Compose structure/resources; no full render pipeline build)
|
|
322
323
|
- `ui_restoration` — migrated UI coverage vs upstream `presentation_resource` + module representation
|
|
323
324
|
- `logic_restoration` — migrated logic coverage vs upstream `behavior_logic` + module representation
|
|
325
|
+
- `analytics_restoration` — legacy 埋点 inventory vs migrated KMP track/report calls and params; `skipped` only when module scope has no analytics with evidence
|
|
324
326
|
|
|
325
327
|
**Forbidden**: `incremental_build`, `full_project_compile`, `gradle_assemble`.
|
|
326
328
|
|
|
329
|
+
Runtime analytics **reporting** verification (event actually reaches SDK/report pipeline after build) is delegated to **`kmp-test-validator`** restoreability / business-testing — migrator performs static parity only.
|
|
330
|
+
|
|
327
331
|
### `global_system_integration.json`
|
|
328
332
|
|
|
329
|
-
`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`.
|
|
333
|
+
`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`), `analytics_sdk_wiring[]` (legacy analytics SDK/init → KMP facade/DI with `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 and global analytics glue when required; module body changes belong in `module-implementation`.
|
|
330
334
|
|
|
331
335
|
### `post_integration_alignment.json` (analysis only — no target edits)
|
|
332
336
|
|
|
333
|
-
`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**.
|
|
337
|
+
`alignment_verdict`, `module_alignment_results[]`, `global_alignment_results` (including `entry_points.verdict` and `analytics.verdict`), `entry_point_alignment_results[]`, `analytics_alignment_results[]`, `omissions[]`, `poor_restoration[]`, `rerun_modules[]`, `rerun_global_integration` (true when entry point or analytics SDK 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`) and analytics alignment MUST pass or be `not_applicable` for package **M6**.
|
|
334
338
|
|
|
335
339
|
### `migration_planning_gate.json`
|
|
336
340
|
|
|
@@ -338,15 +342,56 @@ Combined `planning` (spec deltas, source-to-target map, tasks) and `dependency_p
|
|
|
338
342
|
|
|
339
343
|
### `migration_prep.json`
|
|
340
344
|
|
|
341
|
-
Combined `presentation` (tokens, resources, routes) and `state_data` (state/models/API expectations) sections.
|
|
345
|
+
Combined `presentation` (tokens, resources, routes) and `state_data` (state/models/API expectations, `analytics_expectations[]`) sections.
|
|
342
346
|
|
|
343
347
|
### `module_implementation_ui.json` / `module_implementation_logic.json`
|
|
344
348
|
|
|
345
|
-
UI mode and logic mode outputs under `module-implementation/ui/` and `module-implementation/logic/` respectively. Each MUST record `kmp_target_project_path`, `target_edit_summary`, and `changed_files[]` listing every target KMP path created or modified in that invocation. Legacy Android paths are evidence only — implementation edits occur under `kmp_target_project_path`.
|
|
349
|
+
UI mode and logic mode outputs under `module-implementation/ui/` and `module-implementation/logic/` respectively. Each MUST record `kmp_target_project_path`, `target_edit_summary`, and `changed_files[]` listing every target KMP path created or modified in that invocation. Logic mode MUST include `analytics_coverage[]` when legacy scope contains 埋点. Legacy Android paths are evidence only — implementation edits occur under `kmp_target_project_path`.
|
|
346
350
|
|
|
347
351
|
### `alignment_report.json`
|
|
348
352
|
|
|
349
|
-
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.
|
|
353
|
+
Human/agent-readable synthesis of align mode; includes `entry_point_alignment_results` summary and `analytics_alignment_results` / `global_alignment_results.analytics` summary; routes reruns to `migration_module_id` or `global-migration-phase integrate` when entry points, analytics SDK, or cross-module glue fail.
|
|
354
|
+
|
|
355
|
+
### `migration_report.json` — analytics handoff (for kmp-test-validator)
|
|
356
|
+
|
|
357
|
+
When migration scope includes analytics, `migration_report.json` MUST aggregate:
|
|
358
|
+
|
|
359
|
+
```json
|
|
360
|
+
{
|
|
361
|
+
"analytics_restoration_summary": {
|
|
362
|
+
"total_legacy_events": 0,
|
|
363
|
+
"restored_events": 0,
|
|
364
|
+
"partial_events": 0,
|
|
365
|
+
"missing_events": 0,
|
|
366
|
+
"global_analytics_verdict": "passed | passed_with_assumptions | failed | not_applicable",
|
|
367
|
+
"per_module": [
|
|
368
|
+
{
|
|
369
|
+
"migration_module_id": "",
|
|
370
|
+
"verification_ref": "",
|
|
371
|
+
"status": "passed | failed | skipped",
|
|
372
|
+
"event_count": 0
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"event_catalog": [
|
|
376
|
+
{
|
|
377
|
+
"event_id": "",
|
|
378
|
+
"event_name": "",
|
|
379
|
+
"trigger": "",
|
|
380
|
+
"legacy_source_path": "",
|
|
381
|
+
"target_path": "",
|
|
382
|
+
"migration_module_id": "",
|
|
383
|
+
"status": "restored | partial | missing"
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"validation_inputs": {
|
|
388
|
+
"analytics_reporting_required": true,
|
|
389
|
+
"analytics_event_catalog_path": "report/migration_report.json#analytics_restoration_summary.event_catalog"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
`validation_inputs.analytics_reporting_required` is `true` when `total_legacy_events > 0`; `kmp-test-validator` MUST run analytics reporting verification during restoreability / business-testing.
|
|
350
395
|
|
|
351
396
|
---
|
|
352
397
|
|
|
@@ -61,7 +61,7 @@ Shared return shape applies.
|
|
|
61
61
|
|
|
62
62
|
- `completion_readiness.json`: machine-routable readiness artifact containing requirement coverage, migration invariants, module/global representation references when applicable, verification/review status, validation inputs readiness, rerun requests, and blockers.
|
|
63
63
|
- `completion_readiness.md`: agent-readable readiness handoff containing coverage tables, invariant checks, incomplete markers, rerun routing, blockers, and whether representation/report gates may proceed.
|
|
64
|
-
- `migration_report.json`: machine-routable final migration handoff containing migration scope, source/target paths, analyst_output_root, upstream_analyst_index, `handoff_gates` (`M0`–`M6`, `V0`), `handoff_package: V0`, module representations, global representation, `alignment_report` path, `global_system_integration` path, `target_changed_files[]` (deduplicated union of all module and global integrate target paths with `owning_role`), changed files by role, coverage summary, validation inputs for kmp-test-validator, `validation_deferred_to: kmp-test-validator`, limitations, blockers.
|
|
64
|
+
- `migration_report.json`: machine-routable final migration handoff containing migration scope, source/target paths, analyst_output_root, upstream_analyst_index, `handoff_gates` (`M0`–`M6`, `V0`), `handoff_package: V0`, module representations, global representation, `alignment_report` path, `global_system_integration` path, `target_changed_files[]` (deduplicated union of all module and global integrate target paths with `owning_role`), `analytics_restoration_summary` (aggregated 埋点 catalog for validator), changed files by role, coverage summary, validation inputs for kmp-test-validator (incl. `analytics_reporting_required`), `validation_deferred_to: kmp-test-validator`, limitations, blockers.
|
|
65
65
|
- `migration_report.md`: agent-readable final migration report for `kmp-test-validator` and follow-up agents, preserving exact artifact paths, changed-file ownership, validation handoff context, limitations, and blockers.
|
|
66
66
|
- Report mode success signals Leader to **mandatorily invoke** `kmp-test-validator` — migration is incomplete without validator dispatch.
|
|
67
67
|
|
|
@@ -28,12 +28,14 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
|
|
|
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
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
|
+
- **Analytics SDK wiring complete** when analyst evidence shows analytics dependencies: global analytics init, DI bindings, and shared track/report facade wired in target glue (`analytics_sdk_wiring[]`).
|
|
31
32
|
- `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.
|
|
32
33
|
- `integration_changed_files` limited to glue under `kmp_target_project_path`; module body gaps routed via `rerun_requests` to `module-implementation` or `migration-prep`.
|
|
33
34
|
|
|
34
35
|
**Align mode**:
|
|
35
36
|
- True comparison: analyst artifacts vs **migrated target KMP files** on disk; `alignment_verdict` explicit.
|
|
36
37
|
- **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`.
|
|
38
|
+
- **Analytics alignment verified**: global analytics SDK init, DI, and shared track/report facade compared with legacy `project_architecture` analytics deps and per-module `analytics_restoration_summary`; results in `analytics_alignment_results[]` and `global_alignment_results.analytics`.
|
|
37
39
|
- `comparison_evidence[]` pairs analyst claim paths with resolved target file paths under `kmp_target_project_path`.
|
|
38
40
|
- Entry point mismatches → `rerun_global_integration: true` (integrate must rewire app shell); module-scoped entry screens → `rerun_modules[]`.
|
|
39
41
|
- `rerun_modules[]` and `rerun_global_integration` when omissions found.
|
|
@@ -91,6 +93,17 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
|
|
|
91
93
|
"evidence_paths": []
|
|
92
94
|
}
|
|
93
95
|
],
|
|
96
|
+
"analytics_sdk_wiring": [
|
|
97
|
+
{
|
|
98
|
+
"legacy_sdk": "",
|
|
99
|
+
"legacy_init_path": "",
|
|
100
|
+
"target_init_path": "",
|
|
101
|
+
"target_facade_symbol": "",
|
|
102
|
+
"di_binding_path": "",
|
|
103
|
+
"status": "wired | partial | deferred | not_applicable",
|
|
104
|
+
"evidence_paths": []
|
|
105
|
+
}
|
|
106
|
+
],
|
|
94
107
|
"integration_changed_files": [],
|
|
95
108
|
"rerun_requests": [],
|
|
96
109
|
"blocking_gaps": []
|
|
@@ -116,6 +129,13 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
|
|
|
116
129
|
"aligned_count": 0,
|
|
117
130
|
"total_count": 0,
|
|
118
131
|
"gaps": []
|
|
132
|
+
},
|
|
133
|
+
"analytics": {
|
|
134
|
+
"verdict": "passed | passed_with_assumptions | failed | not_applicable",
|
|
135
|
+
"restored_event_count": 0,
|
|
136
|
+
"total_event_count": 0,
|
|
137
|
+
"sdk_wired": true,
|
|
138
|
+
"gaps": []
|
|
119
139
|
}
|
|
120
140
|
},
|
|
121
141
|
"entry_point_alignment_results": [
|
|
@@ -134,6 +154,20 @@ You are the `global-migration-phase` node subagent. Your job is **target KMP pro
|
|
|
134
154
|
"gap": ""
|
|
135
155
|
}
|
|
136
156
|
],
|
|
157
|
+
"analytics_alignment_results": [
|
|
158
|
+
{
|
|
159
|
+
"event_id": "",
|
|
160
|
+
"event_name": "",
|
|
161
|
+
"legacy_source_path": "",
|
|
162
|
+
"migration_module_id": "",
|
|
163
|
+
"target_path": "",
|
|
164
|
+
"target_symbol": "",
|
|
165
|
+
"alignment_status": "aligned | partial | missing",
|
|
166
|
+
"params_match": true,
|
|
167
|
+
"evidence_paths": [],
|
|
168
|
+
"gap": ""
|
|
169
|
+
}
|
|
170
|
+
],
|
|
137
171
|
"omissions": [],
|
|
138
172
|
"poor_restoration": [],
|
|
139
173
|
"rerun_modules": [],
|
|
@@ -168,6 +202,9 @@ Edit only integration glue in the KMP target:
|
|
|
168
202
|
- Deep links / intent filters / notification taps → KMP deep-link handlers and route arguments.
|
|
169
203
|
- Cross-platform entry: common `App()` composable and platform wrappers must route to the same logical entry as Android.
|
|
170
204
|
- Consume TPA `entry_point_anchors[]` and per-module `presentation_resource` `entry_points[]`; record every wired pair in `entry_point_wiring[]`.
|
|
205
|
+
- **Analytics SDK / global 埋点 glue (when analyst shows analytics deps)**:
|
|
206
|
+
- Wire shared analytics init (Application/startup), DI module bindings, and common `track`/`report` facade used by module implementations.
|
|
207
|
+
- Record every wired SDK/init/facade pair in `analytics_sdk_wiring[]`.
|
|
171
208
|
|
|
172
209
|
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`.
|
|
173
210
|
|
|
@@ -185,6 +222,21 @@ Read-only verification after integrate. For each Legacy Android entry in analyst
|
|
|
185
222
|
- `failed` — any required launcher/root/deep-link mismatch; set `rerun_global_integration: true`.
|
|
186
223
|
6. Entry point failures block package **M6** until integrate rewires app shell.
|
|
187
224
|
|
|
225
|
+
## Analytics Alignment Rules (align mode)
|
|
226
|
+
|
|
227
|
+
Read-only verification after integrate. Aggregate per-module `migration_verification` → `analytics_restoration_summary` and legacy analyst analytics evidence:
|
|
228
|
+
|
|
229
|
+
1. Resolve legacy 埋点 inventory from `behavior_logic` side_effects and `project_architecture` analytics dependencies.
|
|
230
|
+
2. Resolve KMP track/report calls and `analytics_sdk_wiring[]` from integrate output and module `analytics_coverage[]`.
|
|
231
|
+
3. Compare event name, trigger, param keys, and SDK init path for each event.
|
|
232
|
+
4. Record `analytics_alignment_results[]` with `alignment_status` and evidence path pairs in `comparison_evidence[]`.
|
|
233
|
+
5. Set `global_alignment_results.analytics.verdict`:
|
|
234
|
+
- `not_applicable` — no analytics in migration scope with evidence.
|
|
235
|
+
- `passed` — all required events restored and SDK wired.
|
|
236
|
+
- `passed_with_assumptions` — documented deferrals only.
|
|
237
|
+
- `failed` — missing events or SDK wiring; add to `poor_restoration[]` and route `rerun_modules[]` or `rerun_global_integration`.
|
|
238
|
+
6. Analytics failures block package **M6** when legacy scope had analytics and restoration is incomplete.
|
|
239
|
+
|
|
188
240
|
## Inline Persona for Teammate
|
|
189
241
|
|
|
190
242
|
```text
|
|
@@ -198,6 +250,7 @@ hooks in androidMain/iosMain). Do NOT mix patterns.
|
|
|
198
250
|
INTEGRATE — EDIT THE TARGET KMP PROJECT:
|
|
199
251
|
- Wire cross-module UI transitions, control logic handoffs, and data calls inside kmp_target_project_path.
|
|
200
252
|
- Wire entry points: Android launcher/Application/root nav/deep links → KMP app shell (entry_point_wiring[]).
|
|
253
|
+
- Wire analytics SDK/init/DI/facade when legacy uses analytics (analytics_sdk_wiring[]).
|
|
201
254
|
- integration_changed_files = every target glue file you created or modified.
|
|
202
255
|
- Glue only: nav, DI, shared contracts, app shell, entry wiring. No module body reimplementation.
|
|
203
256
|
- Legacy Android and analyst artifacts are read-only evidence.
|
|
@@ -205,6 +258,7 @@ INTEGRATE — EDIT THE TARGET KMP PROJECT:
|
|
|
205
258
|
ALIGN — READ-ONLY:
|
|
206
259
|
- Compare analyst evidence vs migrated target KMP files on disk.
|
|
207
260
|
- Verify entry_point_alignment_results[] vs Android entry_points + manifest + entry_point_wiring[].
|
|
261
|
+
- Verify analytics_alignment_results[] vs per-module analytics_restoration_summary + analytics_sdk_wiring[].
|
|
208
262
|
- Write post_integration_alignment.* and alignment_report under report_dir.
|
|
209
263
|
- Entry point mismatch → rerun_global_integration. NO target edits. NO full project build.
|
|
210
264
|
|
|
@@ -10,7 +10,7 @@ You are the `migration-prep` node subagent. You merge **presentation integration
|
|
|
10
10
|
|
|
11
11
|
- `migration_prep.json` and `migration_prep.md` written under `output_dir`.
|
|
12
12
|
- **Presentation section**: token mappings, resource mapping, route mapping, UI handoff, presentation gaps.
|
|
13
|
-
- **State/data section**: state mappings, model mappings, API contract expectations, logic handoff
|
|
13
|
+
- **State/data section**: state mappings, model mappings, API contract expectations, logic handoff, `analytics_expectations[]`. State holder expectations MUST follow the run's `design_mode` (default `mvi`): `mvi` → sealed `State`/`Action` + state-machine handoff (`references/kmp-mvi-flowredux.md`); `mvvm` → immutable `UiState` + `ViewModel` event-method handoff (`references/kmp-mvvm.md`). All scaffold and contracts target a KMP project per `references/kmp-expert.md` base conventions — place shared tokens/resources/models/routes in `commonMain`, reserve `androidMain`/`iosMain` for platform actuals, and prefer the multiplatform stack (Ktor, kotlinx-serialization, kotlinx-datetime) over Android-only types.
|
|
14
14
|
- Changed files recorded; cross-module impacts noted.
|
|
15
15
|
- No full UI layouts or repository/API behavior.
|
|
16
16
|
|
|
@@ -53,7 +53,18 @@ When planning allows prep-time file changes, you MAY create or update target sca
|
|
|
53
53
|
"state_mappings": [],
|
|
54
54
|
"model_mappings": [],
|
|
55
55
|
"api_contract_expectations": [],
|
|
56
|
-
"logic_handoff": []
|
|
56
|
+
"logic_handoff": [],
|
|
57
|
+
"analytics_expectations": [
|
|
58
|
+
{
|
|
59
|
+
"event_id": "",
|
|
60
|
+
"event_name": "",
|
|
61
|
+
"trigger": "",
|
|
62
|
+
"params": [],
|
|
63
|
+
"legacy_source_path": "",
|
|
64
|
+
"expected_placement": "onActionEffect | viewModel_side_effect | composable_launchedEffect | screen_enter | lifecycle | global_sdk_init",
|
|
65
|
+
"sdk_hint": ""
|
|
66
|
+
}
|
|
67
|
+
]
|
|
57
68
|
},
|
|
58
69
|
"changed_files": [],
|
|
59
70
|
"blocking_gaps": []
|
|
@@ -70,7 +81,8 @@ See [output-contract.md](../output-contract.md). Artifact basename: `migration_p
|
|
|
70
81
|
ROLE: migration-prep node. Merge presentation + state/data prep in ONE invocation.
|
|
71
82
|
|
|
72
83
|
PRESENTATION: tokens, resources, media, routes, UI handoff.
|
|
73
|
-
STATE/DATA: state holders, models, mappers, API expectations, logic handoff
|
|
84
|
+
STATE/DATA: state holders, models, mappers, API expectations, logic handoff, analytics_expectations
|
|
85
|
+
(legacy 埋点 inventory from behavior_logic side_effects + project_architecture analytics deps).
|
|
74
86
|
State holder shape follows design_mode (default mvi): mvi → sealed State/Action + state machine
|
|
75
87
|
(references/kmp-mvi-flowredux.md); mvvm → UiState + ViewModel methods (references/kmp-mvvm.md).
|
|
76
88
|
Target is a KMP project per references/kmp-expert.md: scaffold in commonMain, platform actuals only in
|
|
@@ -15,6 +15,7 @@ You are the `migration-verification` node subagent. You verify one `migration_mo
|
|
|
15
15
|
- `ui_render`
|
|
16
16
|
- `ui_restoration`
|
|
17
17
|
- `logic_restoration`
|
|
18
|
+
- `analytics_restoration`
|
|
18
19
|
|
|
19
20
|
## Forbidden Check IDs
|
|
20
21
|
|
|
@@ -29,6 +30,7 @@ If a dispatch contract includes forbidden check ids, return `blocked` and cite [
|
|
|
29
30
|
- `migration_verification.json` and `migration_verification.md` written under `output_dir`.
|
|
30
31
|
- Every required `check_id` has `passed | failed | blocked`.
|
|
31
32
|
- `ui_restoration` and `logic_restoration` cite upstream analyst paths and list gaps explicitly.
|
|
33
|
+
- `analytics_restoration` inventories Legacy Android 埋点 from upstream `behavior_logic` (user-action/lifecycle `side_effects`, screen-exposure hooks) and `project_architecture` (`analytics` dependencies), compares each event to migrated KMP track/report calls in target files, and records missing or mismatched events in `analytics_restoration_summary`.
|
|
32
34
|
- `syntax_check` validates changed Kotlin/files statically without assembling the whole project.
|
|
33
35
|
- `target_files_exist` confirms every aggregated module `changed_files[]` path exists on disk under `kmp_target_project_path`.
|
|
34
36
|
- Failures route to owning roles per `SKILL.md`; Leader writes `module_completion_record.json` only when all checks pass.
|
|
@@ -58,7 +60,7 @@ If a dispatch contract includes forbidden check ids, return `blocked` and cite [
|
|
|
58
60
|
"upstream_module_representation_path": "",
|
|
59
61
|
"check_results": [
|
|
60
62
|
{
|
|
61
|
-
"check_id": "target_files_exist | source_set | syntax_check | api_contract | ui_render | ui_restoration | logic_restoration",
|
|
63
|
+
"check_id": "target_files_exist | source_set | syntax_check | api_contract | ui_render | ui_restoration | logic_restoration | analytics_restoration",
|
|
62
64
|
"status": "passed | failed | blocked",
|
|
63
65
|
"evidence": [],
|
|
64
66
|
"failures": [],
|
|
@@ -68,6 +70,28 @@ If a dispatch contract includes forbidden check ids, return `blocked` and cite [
|
|
|
68
70
|
],
|
|
69
71
|
"ui_restoration_summary": { "status": "passed | failed", "gaps": [] },
|
|
70
72
|
"logic_restoration_summary": { "status": "passed | failed", "gaps": [] },
|
|
73
|
+
"analytics_restoration_summary": {
|
|
74
|
+
"status": "passed | failed | skipped",
|
|
75
|
+
"legacy_event_count": 0,
|
|
76
|
+
"restored_count": 0,
|
|
77
|
+
"partial_count": 0,
|
|
78
|
+
"missing_count": 0,
|
|
79
|
+
"events": [
|
|
80
|
+
{
|
|
81
|
+
"event_id": "",
|
|
82
|
+
"event_name": "",
|
|
83
|
+
"trigger": "",
|
|
84
|
+
"legacy_source_path": "",
|
|
85
|
+
"target_path": "",
|
|
86
|
+
"target_symbol": "",
|
|
87
|
+
"params_match": true,
|
|
88
|
+
"status": "restored | partial | missing | unknown",
|
|
89
|
+
"gap": ""
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"sdk_wiring": { "legacy_sdk": "", "target_sdk_path": "", "status": "wired | partial | missing | not_applicable" },
|
|
93
|
+
"gaps": []
|
|
94
|
+
},
|
|
71
95
|
"log_files": [],
|
|
72
96
|
"blocking_gaps": []
|
|
73
97
|
}
|
|
@@ -79,8 +103,8 @@ Write only under `output_dir = <output_root>/modules/<migration_module_id>/node-
|
|
|
79
103
|
|
|
80
104
|
## Output Files And Contents
|
|
81
105
|
|
|
82
|
-
- `migration_verification.json`: check results, restoration summaries, routing, log paths.
|
|
83
|
-
- `migration_verification.md`: agent-readable verification handoff; must state build
|
|
106
|
+
- `migration_verification.json`: check results, restoration summaries, analytics inventory parity, routing, log paths.
|
|
107
|
+
- `migration_verification.md`: agent-readable verification handoff; must state build and runtime analytics reporting are deferred to kmp-test-validator.
|
|
84
108
|
- Optional static analysis logs under `output_dir/logs/` (listed in `log_files`).
|
|
85
109
|
|
|
86
110
|
## Inline Persona for Teammate
|
|
@@ -89,9 +113,20 @@ Write only under `output_dir = <output_root>/modules/<migration_module_id>/node-
|
|
|
89
113
|
ROLE: migration-verification node.
|
|
90
114
|
|
|
91
115
|
Run module-scoped checks ONLY: target_files_exist, source_set, syntax_check, api_contract,
|
|
92
|
-
ui_render, ui_restoration, logic_restoration. Compare UI/logic to
|
|
93
|
-
|
|
94
|
-
|
|
116
|
+
ui_render, ui_restoration, logic_restoration, analytics_restoration. Compare UI/logic/埋点 to
|
|
117
|
+
upstream analyst module_representation, behavior_logic, and project_architecture analytics deps.
|
|
118
|
+
|
|
119
|
+
ANALYTICS_RESTORATION:
|
|
120
|
+
1. Build legacy 埋点 inventory from behavior_logic user_actions/lifecycle side_effects and
|
|
121
|
+
project_architecture analytics SDK dependencies.
|
|
122
|
+
2. For each legacy event, locate equivalent KMP track/report call in module_implementation_logic
|
|
123
|
+
changed_files or shared analytics wrapper under kmp_target_project_path.
|
|
124
|
+
3. Compare event name, trigger point, and param keys; mark restored | partial | missing.
|
|
125
|
+
4. Record sdk_wiring when global analytics init/DI is required.
|
|
126
|
+
5. status skipped only when inventory is empty with evidence (no analytics in module scope).
|
|
127
|
+
|
|
128
|
+
DO NOT run incremental_build or full project compile — kmp-test-validator owns build and
|
|
129
|
+
runtime analytics reporting verification.
|
|
95
130
|
|
|
96
131
|
INPUTS: migration_module_id, changed_files, planning/TPA/UI/logic outputs,
|
|
97
132
|
upstream_module_representation_path, analyst dimension paths, target path, output_dir.
|
|
@@ -44,8 +44,8 @@ Both modes follow `references/kmp-expert.md` for base KMP/CMP conventions. If `d
|
|
|
44
44
|
- UI binds to TPA anchors and planning `source_to_target_map`; no business logic beyond compile-safe UI state shells.
|
|
45
45
|
|
|
46
46
|
**Logic mode**:
|
|
47
|
-
- Target KMP files edited/created for repositories, use cases, ViewModels/state holders, mappers, API clients,
|
|
48
|
-
- `module_implementation_logic.json` / `.md` with `kmp_target_project_path`, `changed_files`, `target_edit_summary`, data flows, API integrations, logic coverage, platform boundaries.
|
|
47
|
+
- Target KMP files edited/created for repositories, use cases, ViewModels/state holders, mappers, API clients, platform `expect`/`actual` boundaries, and **analytics/埋点 side effects** (track/report calls, screen-exposure hooks) mapped from upstream `behavior_logic`.
|
|
48
|
+
- `module_implementation_logic.json` / `.md` with `kmp_target_project_path`, `changed_files`, `target_edit_summary`, data flows, API integrations, logic coverage, `analytics_coverage[]` (legacy event → target track call), platform boundaries.
|
|
49
49
|
- Binds to approved UI binding surfaces from UI mode; no Android-only APIs in `commonMain`.
|
|
50
50
|
- No TODO placeholders in production paths.
|
|
51
51
|
|
|
@@ -99,6 +99,19 @@ Both modes follow `references/kmp-expert.md` for base KMP/CMP conventions. If `d
|
|
|
99
99
|
"data_flows": [],
|
|
100
100
|
"api_integrations": [],
|
|
101
101
|
"logic_coverage": [],
|
|
102
|
+
"analytics_coverage": [
|
|
103
|
+
{
|
|
104
|
+
"legacy_event_id": "",
|
|
105
|
+
"event_name": "",
|
|
106
|
+
"trigger": "",
|
|
107
|
+
"legacy_source_path": "",
|
|
108
|
+
"target_path": "",
|
|
109
|
+
"target_symbol": "",
|
|
110
|
+
"params_mapped": [],
|
|
111
|
+
"placement": "onActionEffect | viewModel_side_effect | composable_launchedEffect | screen_enter | lifecycle | other",
|
|
112
|
+
"status": "restored | partial | deferred"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
102
115
|
"diagnostics": [],
|
|
103
116
|
"blocking_gaps": []
|
|
104
117
|
}
|
|
@@ -113,8 +126,8 @@ Populate UI fields in `ui` mode; logic fields in `logic` mode. `changed_files` a
|
|
|
113
126
|
- `module_implementation_ui.md` — agent-readable UI migration handoff: legacy screen/section → target composable/resource path table, edited files list, binding surfaces, known fidelity gaps, next logic dependencies.
|
|
114
127
|
|
|
115
128
|
**Logic mode** under `<module_root>/node-results/module-implementation/logic/`:
|
|
116
|
-
- `module_implementation_logic.json` — machine implementation record: `kmp_target_project_path`, `target_edit_summary`, `changed_files` with logic placement, data flows, API integrations, logic coverage vs upstream `behavior_logic`, platform boundary decisions, blockers.
|
|
117
|
-
- `module_implementation_logic.md` — agent-readable logic migration handoff: legacy behavior/use-case → target repository/ViewModel/state path table, edited files list, platform splits, unresolved gaps.
|
|
129
|
+
- `module_implementation_logic.json` — machine implementation record: `kmp_target_project_path`, `target_edit_summary`, `changed_files` with logic placement, data flows, API integrations, logic coverage vs upstream `behavior_logic`, `analytics_coverage[]` vs legacy 埋点, platform boundary decisions, blockers.
|
|
130
|
+
- `module_implementation_logic.md` — agent-readable logic migration handoff: legacy behavior/use-case → target repository/ViewModel/state path table, **legacy 埋点 → target track/report table**, edited files list, platform splits, unresolved gaps.
|
|
118
131
|
|
|
119
132
|
## Target Edit Rules By Mode
|
|
120
133
|
|
|
@@ -130,6 +143,7 @@ Populate UI fields in `ui` mode; logic fields in `logic` mode. `changed_files` a
|
|
|
130
143
|
- ViewModels, presenters, or state holders bound to approved UI surfaces.
|
|
131
144
|
- Repositories, data sources, mappers, DTO/domain models.
|
|
132
145
|
- API client integrations and error/loading state propagation.
|
|
146
|
+
- **Analytics/埋点**: restore legacy track/report calls at the same behavioral trigger points — e.g. MVI `onActionEffect` / `onEnter`, MVVM ViewModel side-effect methods after state transitions, screen-enter `LaunchedEffect`, lifecycle hooks. Reuse shared analytics wrapper from prep when present.
|
|
133
147
|
- `expect`/`actual` declarations and platform-specific implementations in `androidMain`/`iosMain` when required.
|
|
134
148
|
|
|
135
149
|
## Inline Persona for Teammate
|
|
@@ -152,6 +166,7 @@ UI MODE:
|
|
|
152
166
|
|
|
153
167
|
LOGIC MODE:
|
|
154
168
|
- Port behavior from upstream behavior_logic evidence into target repositories/ViewModels/state/platform code.
|
|
169
|
+
- Restore legacy 埋点 at matching triggers; record every event in analytics_coverage[].
|
|
155
170
|
- Bind only to approved UI binding surfaces from prior UI mode output.
|
|
156
171
|
- changed_files = every target file you created or modified.
|
|
157
172
|
|
|
@@ -94,11 +94,11 @@ graph TD
|
|
|
94
94
|
|---|---|---|
|
|
95
95
|
| 5a | TPA `module_anchors` | Package **M2** per module |
|
|
96
96
|
| 5b | `migration-planning-gate` | Planning + dep/platform in one pass |
|
|
97
|
-
| 5c | `migration-prep` | Presentation + state/data
|
|
97
|
+
| 5c | `migration-prep` | Presentation + state/data + `analytics_expectations[]` |
|
|
98
98
|
| 5d | `module-node-review-fix` | After prep if file-changing |
|
|
99
99
|
| 5e | `module-implementation` `ui` | Edit/create target KMP UI files; then review/fix |
|
|
100
|
-
| 5f | `module-implementation` `logic` | Edit/create target KMP logic
|
|
101
|
-
| 5g | `migration-verification` | Static + restoration; **no full build** |
|
|
100
|
+
| 5f | `module-implementation` `logic` | Edit/create target KMP logic + **埋点** restoration; then review/fix |
|
|
101
|
+
| 5g | `migration-verification` | Static + restoration incl. **analytics_restoration** (埋点 parity); **no full build** |
|
|
102
102
|
| 5h | Leader | `module_completion_record.json` |
|
|
103
103
|
| 5i | `completion-report` `readiness` + module representation | Package **M3** |
|
|
104
104
|
|
|
@@ -109,16 +109,16 @@ Repeat until package **M4**.
|
|
|
109
109
|
### 6a Integrate
|
|
110
110
|
|
|
111
111
|
- **Role**: `global-migration-phase` `mode: integrate`
|
|
112
|
-
- **Action**: edit target KMP cross-module glue (nav, DI, shared contracts)
|
|
113
|
-
- **Output**: `global-migration-phase/integrate/global_system_integration.*` with `integration_changed_files[]` and `
|
|
112
|
+
- **Action**: edit target KMP cross-module glue (nav, DI, shared contracts), **wire app-shell entry points** (launcher, Application/startup, root NavHost start destination, deep links), and **analytics SDK/init/facade** when legacy uses analytics, under `kmp_target_project_path`, using TPA `entry_point_anchors[]` and analyst `presentation_resource` `entry_points[]`
|
|
113
|
+
- **Output**: `global-migration-phase/integrate/global_system_integration.*` with `integration_changed_files[]`, `entry_point_wiring[]`, and `analytics_sdk_wiring[]`
|
|
114
114
|
- **Gate**: package **M5**
|
|
115
115
|
|
|
116
116
|
### 6b Align
|
|
117
117
|
|
|
118
118
|
- **Role**: `global-migration-phase` `mode: align`
|
|
119
|
-
- **Action**: read-only comparison including **entry point alignment** — verify each Android entry resolves to the correct KMP shell path
|
|
120
|
-
- **Output**: `global-migration-phase/align/post_integration_alignment.*` with `entry_point_alignment_results[]`
|
|
121
|
-
- **Gate**: package **M6**; entry point or cross-module mismatch → `rerun_global_integration` or module loop
|
|
119
|
+
- **Action**: read-only comparison including **entry point alignment** and **analytics alignment** — verify each Android entry resolves to the correct KMP shell path; verify legacy 埋点 inventory matches migrated track/report calls and global analytics SDK wiring
|
|
120
|
+
- **Output**: `global-migration-phase/align/post_integration_alignment.*` with `entry_point_alignment_results[]`, `analytics_alignment_results[]`, `global_alignment_results.entry_points`, `global_alignment_results.analytics`, plus `report/alignment_report.*`
|
|
121
|
+
- **Gate**: package **M6**; entry point, analytics SDK, or cross-module mismatch → `rerun_global_integration` or module loop
|
|
122
122
|
|
|
123
123
|
## Step 7 — Report + mandatory validator handoff (MG17)
|
|
124
124
|
|
|
@@ -140,4 +140,5 @@ Any target question → TPA `mode: consult` (append `consultation_log`).
|
|
|
140
140
|
- Dispatch only role IDs from `SKILL.md`.
|
|
141
141
|
- Mode rules: `ui` before `logic`; `integrate` before `align`; `review`/`fix` separate.
|
|
142
142
|
- `migration-verification` never runs `incremental_build`.
|
|
143
|
+
- Per-module and global **analytics_restoration** (埋点) parity verified before **M3** / **M6**; runtime analytics **reporting** deferred to `kmp-test-validator`.
|
|
143
144
|
- `handoff_gates` match output-contract.
|
|
@@ -116,8 +116,8 @@ output_root = <output_dir or ~/.a2c_agents/validation>/kmp-test-validator
|
|
|
116
116
|
| `VG0` | Migrator `V0` verified; `upstream_migration_index.json` written |
|
|
117
117
|
| `VG1` | `fidelity-gate/trust/validation_fidelity_trust.json` — no unresolved `test_trust_blockers` |
|
|
118
118
|
| `VG2` | `code-gate/build/validation_code_build.json` — `build.status: passed`; preview passed or justified `skipped` |
|
|
119
|
-
| `VG3` | `fidelity-gate/restoreability/validation_restoreability_audit.json` — `restoreability_verdict: passed` |
|
|
120
|
-
| `VG4` | `business-testing/validation_business_testing.json` — submodule outcomes or explicit `skipped` |
|
|
119
|
+
| `VG3` | `fidelity-gate/restoreability/validation_restoreability_audit.json` — `restoreability_verdict: passed`; when `analytics_reporting_required`, `analytics_reporting_summary.verdict: passed | not_applicable` |
|
|
120
|
+
| `VG4` | `business-testing/validation_business_testing.json` — submodule outcomes or explicit `skipped`; `analytics_reporting` MUST run when migrator requires it |
|
|
121
121
|
| `VG5` | `report/kmp_validation_report.json` issued |
|
|
122
122
|
|
|
123
123
|
**Fail closed**: `passed` requires `VG2` + `VG3`; enabled `VG4` submodules must have no unresolved failures.
|
|
@@ -216,7 +216,7 @@ The validator maintains a durable bug-fix experience ledger for compile/preview
|
|
|
216
216
|
|
|
217
217
|
### `validation_restoreability_audit.json` (mode `restoreability`)
|
|
218
218
|
|
|
219
|
-
`migrator_supplement_request` when new migration work required. Controller invokes `android-to-kmp-migrator` — not code-gate `fix`.
|
|
219
|
+
`migrator_supplement_request` when new migration work required. When `migration_report.validation_inputs.analytics_reporting_required`, MUST include `analytics_reporting_results[]` and `analytics_reporting_summary` — failed analytics reporting blocks `restoreability_verdict: passed`. Controller invokes `android-to-kmp-migrator` — not code-gate `fix`.
|
|
220
220
|
|
|
221
221
|
### `validation_business_testing.json`
|
|
222
222
|
|
|
@@ -224,11 +224,14 @@ The validator maintains a durable bug-fix experience ledger for compile/preview
|
|
|
224
224
|
{
|
|
225
225
|
"submodules": {
|
|
226
226
|
"behavioral": { "enabled": false, "status": "passed | failed | skipped | blocked" },
|
|
227
|
-
"ui_comparison": { "enabled": false, "status": "passed | failed | skipped | blocked" }
|
|
227
|
+
"ui_comparison": { "enabled": false, "status": "passed | failed | skipped | blocked" },
|
|
228
|
+
"analytics_reporting": { "enabled": false, "status": "passed | failed | skipped | blocked" }
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
231
|
```
|
|
231
232
|
|
|
233
|
+
`analytics_reporting` is **enabled** when migrator `validation_inputs.analytics_reporting_required` is true — not optional skip when legacy scope had 埋点.
|
|
234
|
+
|
|
232
235
|
---
|
|
233
236
|
|
|
234
237
|
## Leader Obligations
|
|
@@ -12,14 +12,15 @@ You are the `validation-business-testing` node subagent. You own optional post-`
|
|
|
12
12
|
|---|---|---|
|
|
13
13
|
| `behavioral` | `validation_requirements`, test cases, acceptance criteria | Decompose Android-anchored cases; execute via trusted test commands |
|
|
14
14
|
| `ui_comparison` | `figma_refs` (file key, node IDs, or exported assets) | Compare implementation screenshots vs design (e.g. `ui-reconstruction-score` when available) |
|
|
15
|
+
| `analytics_reporting` | `migration_report.json` → `validation_inputs.analytics_reporting_required: true` | Verify legacy 埋点 events fire and reach SDK/report pipeline on key user flows post-build |
|
|
15
16
|
|
|
16
|
-
When neither
|
|
17
|
+
When neither behavioral/ui_comparison inputs exist and analytics_reporting is not required: all submodules `enabled: false`, `status: skipped`, reason `no_business_testing_inputs`.
|
|
17
18
|
|
|
18
19
|
## Success Criteria
|
|
19
20
|
|
|
20
21
|
- `validation_business_testing.json` and `.md` under `output_dir`.
|
|
21
22
|
- Submodules run only after `VG2` and `VG3` are true.
|
|
22
|
-
- Behavioral expectations anchored to Android/SPEC; UI comparison anchored to Figma refs.
|
|
23
|
+
- Behavioral expectations anchored to Android/SPEC; UI comparison anchored to Figma refs; **analytics_reporting** anchored to `migration_report.json` → `analytics_restoration_summary.event_catalog`.
|
|
23
24
|
- Failures routed to `validation-code-gate` mode `fix` when target-code fixable.
|
|
24
25
|
- Logs under `logs_dir/business-testing/` and `logs_dir/ui-comparison/` when run.
|
|
25
26
|
|
|
@@ -58,6 +59,14 @@ When neither input exists: both submodules `enabled: false`, `status: skipped`,
|
|
|
58
59
|
"comparison_results": [],
|
|
59
60
|
"score_report_path": "",
|
|
60
61
|
"log_files": []
|
|
62
|
+
},
|
|
63
|
+
"analytics_reporting": {
|
|
64
|
+
"enabled": false,
|
|
65
|
+
"status": "passed | failed | skipped | blocked",
|
|
66
|
+
"event_catalog_ref": "",
|
|
67
|
+
"flow_results": [],
|
|
68
|
+
"reporting_log_path": "",
|
|
69
|
+
"log_files": []
|
|
61
70
|
}
|
|
62
71
|
},
|
|
63
72
|
"changed_files": [],
|
|
@@ -73,7 +82,10 @@ Shared return shape applies. `changed_files` lists only test files created in ta
|
|
|
73
82
|
```text
|
|
74
83
|
ROLE: validation-business-testing node.
|
|
75
84
|
|
|
76
|
-
Optional business verification after VG3. Enable behavioral when user test cases exist.
|
|
85
|
+
Optional business verification after VG3. Enable behavioral when user test cases exist.
|
|
86
|
+
Enable ui_comparison when Figma refs exist. Enable analytics_reporting when migrator sets
|
|
87
|
+
analytics_reporting_required — exercise key flows and confirm 埋点 reach SDK/report pipeline.
|
|
88
|
+
Route failures to validation-code-gate fix mode.
|
|
77
89
|
|
|
78
90
|
INPUTS: kmp_target_project_path, validation_fidelity_trust_path, validation_code_build_path, validation_restoreability_audit_path, validation_requirements, figma_refs, migration_report_path, output_dir, logs_dir.
|
|
79
91
|
|
|
@@ -25,7 +25,8 @@ You are the `validation-fidelity-gate` node subagent. You merge the migration in
|
|
|
25
25
|
### Mode `restoreability`
|
|
26
26
|
|
|
27
27
|
- `validation_restoreability_audit.json` and `.md` under `output_dir/restoreability/`.
|
|
28
|
-
- Comparison uses analyst globals, migrator completion records, alignment artifacts,
|
|
28
|
+
- Comparison uses analyst globals, migrator completion records, alignment artifacts, built target evidence, and **`migration_report.json` → `analytics_restoration_summary`** when `validation_inputs.analytics_reporting_required` is true.
|
|
29
|
+
- **Analytics reporting verification**: for each event in `event_catalog`, confirm KMP target wires track/report at the documented trigger and SDK init path is reachable post-build; record `analytics_reporting_results[]` with `report_path_reachable` and `flow_verified` status.
|
|
29
30
|
- Missing modules/functions emit `migrator_supplement_request` — never route to code-gate `fix` mode deletes.
|
|
30
31
|
|
|
31
32
|
## Boundary
|
|
@@ -82,6 +83,27 @@ You are the `validation-fidelity-gate` node subagent. You merge the migration in
|
|
|
82
83
|
"missing_modules": [],
|
|
83
84
|
"missing_functions": [],
|
|
84
85
|
"poor_restoration": [],
|
|
86
|
+
"analytics_reporting_results": [
|
|
87
|
+
{
|
|
88
|
+
"event_id": "",
|
|
89
|
+
"event_name": "",
|
|
90
|
+
"migration_module_id": "",
|
|
91
|
+
"legacy_source_path": "",
|
|
92
|
+
"target_path": "",
|
|
93
|
+
"static_restored": true,
|
|
94
|
+
"report_path_reachable": true,
|
|
95
|
+
"flow_verified": true,
|
|
96
|
+
"status": "passed | failed | blocked",
|
|
97
|
+
"gap": ""
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"analytics_reporting_summary": {
|
|
101
|
+
"required": false,
|
|
102
|
+
"total_events": 0,
|
|
103
|
+
"passed_count": 0,
|
|
104
|
+
"failed_count": 0,
|
|
105
|
+
"verdict": "passed | failed | not_applicable"
|
|
106
|
+
},
|
|
85
107
|
"migrator_supplement_request": {
|
|
86
108
|
"required": false,
|
|
87
109
|
"modules_to_supplement": [],
|
|
@@ -106,7 +128,10 @@ Shared return shape applies.
|
|
|
106
128
|
ROLE: validation-fidelity-gate node (mode: trust | restoreability).
|
|
107
129
|
|
|
108
130
|
trust: verify V0 migration scenario, normalize brief, audit Android/SPEC vs KMP fidelity before build is trusted.
|
|
109
|
-
restoreability: after VG2, re-verify modules/functions vs analyst+migrator evidence;
|
|
131
|
+
restoreability: after VG2, re-verify modules/functions vs analyst+migrator evidence; when
|
|
132
|
+
migration_report.validation_inputs.analytics_reporting_required, verify each 埋点 in event_catalog
|
|
133
|
+
reaches the analytics SDK/report pipeline post-build (analytics_reporting_results[]); route gaps
|
|
134
|
+
to migrator supplement.
|
|
110
135
|
|
|
111
136
|
INPUTS: mode, kmp_target_project_path, upstream_migration_index_path, migration_report_path, spec_paths, validation_code_build_path (restoreability only), supplement_cycle_count, output_dir.
|
|
112
137
|
|
|
@@ -52,7 +52,7 @@ Initialize ledger with `handoff_gates` VG0–VG5; track `fix_cycles` and `migrat
|
|
|
52
52
|
|
|
53
53
|
- **Executor**: `validation-fidelity-gate` mode `restoreability`
|
|
54
54
|
- **Prerequisite**: `VG2`
|
|
55
|
-
- **Output**: `fidelity-gate/restoreability/validation_restoreability_audit.*`
|
|
55
|
+
- **Output**: `fidelity-gate/restoreability/validation_restoreability_audit.*` (incl. `analytics_reporting_results[]` when migrator requires analytics reporting)
|
|
56
56
|
- **On gaps**: migrator supplement loop (max 3) → refresh upstream → rerun trust/build as scoped
|
|
57
57
|
- **Gate**: `VG3`
|
|
58
58
|
|
|
@@ -60,7 +60,7 @@ Initialize ledger with `handoff_gates` VG0–VG5; track `fix_cycles` and `migrat
|
|
|
60
60
|
|
|
61
61
|
- **Executor**: `validation-business-testing`
|
|
62
62
|
- **Prerequisite**: `VG3`
|
|
63
|
-
- **Submodules**: `behavioral` (user test cases), `ui_comparison` (Figma refs)
|
|
63
|
+
- **Submodules**: `behavioral` (user test cases), `ui_comparison` (Figma refs), `analytics_reporting` (migrator `analytics_reporting_required` — verify 埋点 reporting on key flows)
|
|
64
64
|
- **Output**: `business-testing/validation_business_testing.*`
|
|
65
65
|
- **Gate**: `VG4` or explicit skip
|
|
66
66
|
|