@buaa_smat/hometrans 26.0.3 → 26.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (750) hide show
  1. package/README.md +1 -1
  2. package/agents/code-reviewer.md +91 -21
  3. package/env-requirements.json +1 -1
  4. package/i18n/agents/code-reviewer.md +93 -21
  5. package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
  6. package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
  7. package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
  8. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
  9. package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
  10. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
  11. package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
  12. package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
  13. package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
  14. package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
  15. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
  16. package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
  17. package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
  18. package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
  19. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
  20. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
  21. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
  22. package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
  23. package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
  24. package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
  25. package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
  26. package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
  27. package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
  28. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
  29. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
  30. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
  31. package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
  32. package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
  33. package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
  34. package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
  35. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
  36. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
  37. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
  38. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
  39. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
  40. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
  41. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
  42. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
  43. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
  44. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
  45. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
  46. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
  47. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
  48. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
  49. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
  50. package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
  51. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
  52. package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
  53. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
  54. package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
  55. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
  56. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
  57. package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
  58. package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
  59. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
  60. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
  61. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
  62. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
  63. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
  64. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
  65. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
  66. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
  67. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
  68. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
  69. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
  70. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
  71. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
  72. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
  73. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
  74. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
  75. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
  76. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
  77. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
  78. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
  79. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
  80. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
  81. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
  82. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
  83. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
  84. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
  85. package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
  86. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
  87. package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
  88. package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
  89. package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
  90. package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
  91. package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
  92. package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
  93. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
  94. package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
  95. package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
  96. package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
  97. package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
  98. package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
  99. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
  100. package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
  101. package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
  102. package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
  103. package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
  104. package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
  105. package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
  106. package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
  107. package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
  108. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
  109. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
  110. package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
  111. package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
  112. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
  113. package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
  114. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
  115. package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
  116. package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
  117. package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
  118. package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
  119. package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
  120. package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
  121. package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
  122. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
  123. package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
  124. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
  125. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
  126. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
  127. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
  128. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
  129. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
  130. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
  131. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
  132. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
  133. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
  134. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
  135. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
  136. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
  137. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
  138. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
  139. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
  140. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
  141. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
  142. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
  143. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
  144. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
  145. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
  146. package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
  147. package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
  148. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
  149. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
  150. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
  151. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
  152. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
  153. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
  154. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
  155. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
  156. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
  157. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
  158. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
  159. package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
  160. package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
  161. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
  162. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
  163. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
  164. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
  165. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
  166. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
  167. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
  168. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
  169. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
  170. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
  171. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
  172. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
  173. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
  174. package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
  175. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
  176. package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
  177. package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
  178. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
  179. package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
  180. package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
  181. package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
  182. package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
  183. package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
  184. package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
  185. package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
  186. package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
  187. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
  188. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
  189. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
  190. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
  191. package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
  192. package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
  193. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
  194. package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
  195. package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
  196. package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
  197. package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
  198. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
  199. package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
  200. package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
  201. package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
  202. package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
  203. package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
  204. package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
  205. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
  206. package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
  207. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
  208. package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
  209. package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
  210. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
  211. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
  212. package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
  213. package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
  214. package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
  215. package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
  216. package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
  217. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
  218. package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
  219. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
  220. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
  221. package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
  222. package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
  223. package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
  224. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
  225. package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
  226. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
  227. package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
  228. package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
  229. package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
  230. package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
  231. package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
  232. package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
  233. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
  234. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
  235. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
  236. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
  237. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
  238. package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
  239. package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
  240. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
  241. package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
  242. package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
  243. package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
  244. package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
  245. package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
  246. package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
  247. package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
  248. package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
  249. package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
  250. package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
  251. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
  252. package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
  253. package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
  254. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
  255. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
  256. package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
  257. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
  258. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
  259. package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
  260. package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
  261. package/package.json +3 -6
  262. package/skills/a2h-app-migrate/SKILL.md +19 -11
  263. package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
  264. package/skills/a2h-app-migrate/references/stage-map.md +2 -2
  265. package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
  266. package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
  267. package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
  268. package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
  269. package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
  270. package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
  271. package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
  272. package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
  273. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
  274. package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
  275. package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
  276. package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
  277. package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
  278. package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
  279. package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
  280. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
  281. package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
  282. package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
  283. package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
  284. package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
  285. package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
  286. package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
  287. package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
  288. package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
  289. package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
  290. package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
  291. package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
  292. package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
  293. package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
  294. package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
  295. package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
  296. package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
  297. package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
  298. package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
  299. package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
  300. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
  301. package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
  302. package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
  303. package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
  304. package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
  305. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
  306. package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
  307. package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
  308. package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
  309. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  310. package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
  311. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
  312. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
  313. package/skills/a2h-arch-generate/SKILL.md +20 -17
  314. package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
  315. package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
  316. package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
  317. package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
  318. package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
  319. package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
  320. package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
  321. package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
  322. package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
  323. package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
  324. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
  325. package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
  326. package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
  327. package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
  328. package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
  329. package/skills/a2h-batch-ui-align/SKILL.md +72 -22
  330. package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
  331. package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
  332. package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
  333. package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
  334. package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
  335. package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
  336. package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
  337. package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
  338. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
  339. package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
  340. package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
  341. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
  342. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
  343. package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
  344. package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
  345. package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
  346. package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
  347. package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
  348. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
  349. package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
  350. package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
  351. package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
  352. package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
  353. package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
  354. package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
  355. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
  356. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
  357. package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
  358. package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
  359. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
  360. package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
  361. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
  362. package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
  363. package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
  364. package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
  365. package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
  366. package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
  367. package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
  368. package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
  369. package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
  370. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
  371. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
  372. package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
  373. package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
  374. package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
  375. package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
  376. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
  377. package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
  378. package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
  379. package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
  380. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
  381. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
  382. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
  383. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
  384. package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
  385. package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
  386. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
  387. package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
  388. package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
  389. package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
  390. package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
  391. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
  392. package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
  393. package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
  394. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
  395. package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
  396. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
  397. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
  398. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
  399. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
  400. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
  401. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
  402. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
  403. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
  404. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
  405. package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
  406. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
  407. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
  408. package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
  409. package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
  410. package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
  411. package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
  412. package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
  413. package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
  414. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
  415. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
  416. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
  417. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
  418. package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
  419. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
  420. package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
  421. package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
  422. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
  423. package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
  424. package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
  425. package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
  426. package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
  427. package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
  428. package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
  429. package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
  430. package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
  431. package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
  432. package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
  433. package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
  434. package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
  435. package/skills/a2h-page-specgen/SKILL.md +124 -20
  436. package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
  437. package/skills/a2h-page-specgen/references/body-language.md +11 -9
  438. package/skills/a2h-page-specgen/references/evidence.md +35 -0
  439. package/skills/a2h-page-specgen/references/execution-model.md +135 -26
  440. package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
  441. package/skills/a2h-page-specgen/references/gates.md +120 -52
  442. package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
  443. package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
  444. package/skills/a2h-page-specgen/references/spec-example.md +312 -0
  445. package/skills/a2h-page-specgen/references/spec-template.md +112 -109
  446. package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
  447. package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
  448. package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
  449. package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
  450. package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
  451. package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
  452. package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
  453. package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
  454. package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
  455. package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
  456. package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
  457. package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
  458. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
  459. package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
  460. package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
  461. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
  462. package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
  463. package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
  464. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
  465. package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
  466. package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
  467. package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
  468. package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
  469. package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
  470. package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
  471. package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
  472. package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
  473. package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
  474. package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
  475. package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
  476. package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
  477. package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
  478. package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
  479. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
  480. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
  481. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
  482. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
  483. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
  484. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
  485. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
  486. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
  487. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
  488. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
  489. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
  490. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
  491. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
  492. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
  493. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
  494. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
  495. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
  496. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
  497. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
  498. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
  499. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
  500. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
  501. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
  502. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
  503. package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
  504. package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
  505. package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
  506. package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
  507. package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
  508. package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
  509. package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
  510. package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
  511. package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
  512. package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
  513. package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
  514. package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
  515. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
  516. package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
  517. package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
  518. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
  519. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
  520. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
  521. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
  522. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
  523. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
  524. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
  525. package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
  526. package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
  527. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
  528. package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
  529. package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
  530. package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
  531. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
  532. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
  533. package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
  534. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
  535. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
  536. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
  537. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
  538. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
  539. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
  540. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
  541. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
  542. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
  543. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
  544. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
  545. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
  546. package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
  547. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
  548. package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
  549. package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
  550. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
  551. package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
  552. package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
  553. package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
  554. package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
  555. package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
  556. package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
  557. package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
  558. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
  559. package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
  560. package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
  561. package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
  562. package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
  563. package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
  564. package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
  565. package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
  566. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
  567. package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
  568. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
  569. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
  570. package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
  571. package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
  572. package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
  573. package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
  574. package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
  575. package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
  576. package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
  577. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
  578. package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
  579. package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
  580. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
  581. package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
  582. package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
  583. package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
  584. package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
  585. package/skills/a2h-resource-convert/SKILL.md +9 -1
  586. package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
  587. package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
  588. package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
  589. package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
  590. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
  591. package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
  592. package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
  593. package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
  594. package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
  595. package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
  596. package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
  597. package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
  598. package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
  599. package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
  600. package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
  601. package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
  602. package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
  603. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
  604. package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
  605. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
  606. package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
  607. package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
  608. package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
  609. package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
  610. package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
  611. package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
  612. package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
  613. package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
  614. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
  615. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
  616. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
  617. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
  618. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
  619. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
  620. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
  621. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
  622. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
  623. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
  624. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
  625. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
  626. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
  627. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
  628. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
  629. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
  630. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
  631. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
  632. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
  633. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
  634. package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
  635. package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
  636. package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
  637. package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
  638. package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
  639. package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
  640. package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
  641. package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
  642. package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
  643. package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
  644. package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
  645. package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
  646. package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
  647. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
  648. package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
  649. package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
  650. package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
  651. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
  652. package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
  653. package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
  654. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
  655. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
  656. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
  657. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
  658. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
  659. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
  660. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
  661. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
  662. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
  663. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
  664. package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
  665. package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
  666. package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
  667. package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
  668. package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
  669. package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
  670. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
  671. package/skills/a2h-spec-generate/SKILL.md +2 -2
  672. package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
  673. package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
  674. package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
  675. package/skills/a2h-utg-explorer/SKILL.md +9 -3
  676. package/skills/a2h-utg-explorer/references/architecture.md +3 -0
  677. package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
  678. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
  679. package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
  680. package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
  681. package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
  682. package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
  683. package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
  684. package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
  685. package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
  686. package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
  687. package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
  688. package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
  689. package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
  690. package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
  691. package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
  692. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
  693. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
  694. package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
  695. package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
  696. package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
  697. package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
  698. package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
  699. package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
  700. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
  701. package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
  702. package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
  703. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
  704. package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
  705. package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
  706. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
  707. package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
  708. package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
  709. package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
  710. package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
  711. package/skills/a2h-utg-static/SKILL.md +6 -2
  712. package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
  713. package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
  714. package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
  715. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
  716. package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
  717. package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
  718. package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
  719. package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
  720. package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
  721. package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
  722. package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
  723. package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
  724. package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
  725. package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
  726. package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
  727. package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
  728. package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
  729. package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
  730. package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
  731. package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
  732. package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
  733. package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
  734. package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
  735. package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
  736. package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
  737. package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
  738. package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
  739. package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
  740. package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
  741. package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
  742. package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
  743. package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
  744. package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
  745. package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
  746. package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
  747. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
  748. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
  749. package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
  750. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
@@ -145,6 +145,8 @@ key 的前缀即范式:V2 分支只读 `v2-*`,V1 分支只读 `v1-*`;`mix-
145
145
 
146
146
  **数据驱动的可见变体、已声明的状态过渡、状态分支清单** → `cards/dynamics.md`。自绘 View 的字号、坐标与 `Path` 单位 → `cards/canvas.md`。
147
147
 
148
+ **只补缺失项的页面(SUP,source pack 有「Supplement only」段)也照常列全页的状态分支清单**:补齐项以外的分支不在本次范围内,在鸿蒙侧一栏写 `不适用(SUP 范围外)`,不要写「未实现」——后者计入 `branch_uncovered` 阻断;补齐项涉及的分支照常给鸿蒙侧 `文件:行号`。
149
+
148
150
  **坐标与窗口模式规则、ConstraintLayout 转写、尺寸 / 位置 / 坐标系三条硬性要求** → `cards/geometry.md`。
149
151
 
150
152
  ### 4.3 生成 ArkUI 代码
@@ -210,7 +212,7 @@ dialog/fragment/adapter 等必须从主页面拆出去到 `{harmony_project_dir}
210
212
 
211
213
  ### 4.5 Lottie 动画集成(仅当父 skill 注入了 `LOTTIE_ENTRIES_FOR_THIS_PAGE` 时执行)
212
214
 
213
- **prompt 中没有这个块 → 跳过本节**:不要主动去读 `resource_mapping.md`,不要在生成的 .ets 里额外提及 Lottie。有这个块 → **先完整读同目录的 `lottie-integration.md`**(宿主逻辑定位、`@ohos/lottie` 写法、各场景改造、融入页面与校验),再生成代码。
215
+ **prompt 中没有这个块 → 跳过本节**:不要主动去读 `resource_mapping.md`,不要在生成的 .ets 里额外提及 Lottie。**例外**:没有这个块,但本组源码(host-chain / SOURCE_PACK)里在播放 Lottie(`LottieAnimation`、`LottieAnimationView`、`rememberLottieComposition`、`lottie_rawRes`……)时,说明父流程没能把动画绑定到本页,**不得**挑一张静态图顶替。按 `lottie-integration.md` 集成,`load_path` 取 `rawfile/lottie/` 下与 `R.raw.<name>` 同名的文件,缺依赖时在 `registry_requests` 里申请 `@ohos/lottie`;确实无法集成时,在 .ets 写 `// LOTTIE-DEGRADED: <缺哪个动画、现用什么占位、原因>` 并在报告登记 L3 degraded。GATE `lottie-host-not-integrated`。有这个块 → **先完整读同目录的 `lottie-integration.md`**(宿主逻辑定位、`@ohos/lottie` 写法、各场景改造、融入页面与校验),再生成代码。
214
216
 
215
217
  ## Phase 5 — 一致性校验(关键,必跑 2 轮 + 条件第 3 轮)
216
218
 
@@ -302,21 +304,22 @@ A 档的推导链一步不省:压缩的是表达方式和重复,不是推理
302
304
  - **静态裁切检查**:根据参考截图/view tree 的主要区域比例检查 toolbar、内容区、卡片和底部区域不会相互覆盖或超出预期内容区。**并且**:
303
305
  - `Stack` 内互为兄弟的文字/图标行,逐个写出纵向区间 `[top, top+高]` 及其原点(判据见 `cards/geometry.md`「硬性要求(坐标系)」原点一段);状态驱动的偏移/尺寸,起止两端各算一次,与对应快照 bounds 比对,快照里不重叠而算出重叠即失败。
304
306
  - 参考 view tree 里是**单行**的 `wrap_content` 文本(高度 ≈ 一行字高),在鸿蒙侧找出它的可用宽度(父宽 − 同行兄弟占宽 − padding),按字号估算文本宽度放得下;放不下而 Android 放得下,说明结构把兄弟摊进了同一行(`cards/geometry.md` 约束布局转写表「二维约束」行),改结构,不要靠缩字号或 `maxLines(1)` 截断掩盖。
305
- - **交互可达性证据**:对每个可点击元素,列出它在父 `Stack`/层叠结构中的**层序**,并确认其后**没有**任何兄弟节点在其可视矩形上方覆盖它。**并且**列出本页所有 `width('100%')` 且 `height('100%')`(或等效撑满)的容器,逐个标注它是可交互的、还是已声明 `hitTestBehavior(HitTestMode.None)`。「视觉不重叠」与「命中不被遮挡」是两件事:透明或贴底的容器在视觉检查中不构成遮挡,却能吞掉其下全部点击。此项漏检的典型表现是元素显示正常、点击无任何反应(含控制台无输出),因为事件被上层节点消费而该节点自身没有 `onClick`。
307
+ - **交互可达性证据**:对每个可点击元素,列出它在父 `Stack`/层叠结构中的**层序**,并确认其后**没有**任何兄弟节点在其可视矩形上方覆盖它。**并且**列出本页所有 `width('100%')` 且 `height('100%')`(或等效撑满)的容器,逐个标注它是可交互的、还是已声明 `hitTestBehavior(HitTestMode.None)`。「视觉不重叠」与「命中不被遮挡」是两件事:透明或贴底的容器在视觉检查中不构成遮挡,却能吞掉其下全部点击。此项漏检的典型表现是元素显示正常、点击无任何反应(含控制台无输出),因为事件被上层节点消费而该节点自身没有 `onClick`。 撑满层是否吞点击由检查器按层叠结构判定:`stack-swallows-taps` / `fullsize-container` 的 GATE 只能改代码或写检查器核验的 `// HIT-TEST:` 标记关闭,这里写的证据文字不算;本项只需为剩下的 CAND 逐条标注依据。
306
308
 
307
309
  - **观测装饰器缺失**(按 Phase 2.0 判定的范式分支):
308
310
  逐条列出 build() 的读取面;判据见 `cards/state.md`,V1 工程另见 `cards/state-v1.md`。
309
- - **颜色冲突**:fill/background/foreground 颜色是否冲突导致不可见(白底白图)?有则修
311
+ - **颜色冲突**:fill/background/foreground 颜色是否冲突导致不可见(白底白图)?有则修。**「源端本来就看不见」只能影响颜色,不能成为删除元素的理由**:view tree 中 `visible-to-user="true"` 的图标一律要有对应 ArkUI 元素;判断它看不见之前,先看 `measure_pack.json` 的 `icon_inventory`(已按配准位置采样)与 `registration`——`registration.ok=false` 表示截图未定格(动画中途),按 view.xml bounds 打的 `--probe` 会采错位置,`ink 0.0%` 不构成不可见的证据。
310
312
  - **颜色设置**:背景/填充/前景色是否与 Android UI 一致(漏设、错设)?有则修。**按状态切换的底色,字色必须用同一条件写出**:Android 的选中/占用分支通常同时调用 `setBackground` 和 `setTextColor`,只译了底色、字色就停在默认深色。`Span` 的颜色继承自外层 `Text`,两处都没写就是默认色。本项**不能只靠自述**:`phase5_check --group` 的 `[text_color]` 段会把 measure_pack 实测的文字前景色与代码里 `Text`/`Span` 的生效字色逐段比对,`text-color-unset` / `text-color-mismatch` 是阻断项。机械兜底:GATE `text-on-stateful-bg-no-color`(词法检查,source-only 页同样生效)
311
313
  - **文字对齐证据**:逐个列出直接含 `Text`(或含渲染 `Text` 的 `@Builder` 调用)的 `Column`/`Row`,标注它是否显式声明了**决定水平位置的那个轴**,以及该取值的 Android 依据。
312
314
  判据(两种容器的水平轴、看父容器、`Scroll.align`、Compose `Box` 子节点对齐)→ `cards/alignment.md`。
313
315
  - **水平内缩证据**:「文字对齐证据」只管对齐方向(Start/Center/End),管不到**缩进了多少**——齐左但左边距差 72vp 照样通过。本项逐个核对每个可见 `Text` 的左边距:
314
316
  判据(对得上实测、同组同缩进、右缘同理)→ `cards/alignment.md`。
315
- - **图标来源分级证据**:对每个可见图标,标注它属于 Phase 4.3 的 L1 / L2 / L2.5 / L3 哪一级;L2 须给出库与符号名,L2.5 须给出原 web 路径与(Remote 时)绝对 URL,L3 须给出降级说明。**L3 未登记即判定失败;判 L3 而未先查 Hybrid-Shell 两节同样判定失败**。并逐个确认没有使用被禁止的三种降级(emoji/文字字形、语义不符的 drawable 顶替、凭记忆手写 SVG)。
317
+ - **图标来源分级证据**:对每个可见图标,标注它属于 Phase 4.3 的 L1 / L2 / L2.5 / L3 哪一级;L2 须给出库与符号名,L2.5 须给出原 web 路径与(Remote 时)绝对 URL,L3 须给出降级说明。**L3 未登记即判定失败;判 L3 而未先查 Hybrid-Shell 两节同样判定失败**。并逐个确认没有使用被禁止的三种降级(emoji/文字字形、语义不符的 drawable 顶替、凭记忆手写 SVG)。 **并且**(机械门禁,图标覆盖):`icon_inventory` 的每个 key 都要在渲染它的 `Image`/`SymbolGlyph` 行上或上方 3 行内写 `// ICON: <key>`(多个用逗号;key 之后可写说明)。**key 一律照抄 measure_pack 输出**(摘要「icons」行或 `icon_inventory[].key`):有 resource-id 时是去掉包名的 id(如 `search_mag_icon`),没有 id 时是 content-desc,两者都没有时是 `node<序号>`(随 view.xml 变化,不要自己推算);同一 id 的多行(列表项)合为一个 key,任一行可见即算可见。确有理由不实现时写 `// ICON-OMIT: <key> — <依据>`,但当实测该图标在纯色底上有墨迹时检查器会拒收。由 `phase5_check --group` 的 `[icons]` 段判定,`icon-uncovered` / `icon-omit-refused` / `icon-marker-detached` 是阻断项,EVIDENCE 文字不能关闭。
318
+ 宿主或共享组件画的图标(Fragment 的宿主 Toolbar 返回 / 溢出菜单、底部导航):标记写在那个共享组件里画它的 Image 行上(`// ICON: <key>`),它覆盖所有引用它的页面组;本组不要在无关的 Image 上补假标记。
316
319
  - **资源引用错用**:资源引用是否与 Android UI 一致;不存在的资源要重新查找正确名; "不允许用任何emoji、硬编码图标"。
317
320
  SVG 内容核对子项(clip-path、fill/stroke、viewBox、染色通道、包围盒 path、`?attr`、占位 SVG、重复属性)→ `cards/resources.md`。
318
321
  - **过渡实现证据**:逐条列出 Phase 4.2「已声明的状态过渡」清单里的每一项,标注 `已实现` / `已降级`(附降级理由与降级后的实际行为)/ `需上报` / `不适用`(附理由)。**清单缺项、或有条目未标注,即判定失败。**
319
- **同一节再列 Phase 4.2「状态分支清单」**:每行「状态 → 源侧条件 `文件:行号` → 分支内构建/绘制调用 → 是否被快照捕获 → 鸿蒙侧 `文件:行号`」。自绘 View 的每个 `drawXxx` 单列一行。未捕获状态的分支调用在鸿蒙侧找不到对应行、又未标 `不适用` 的,判定失败 —— 这是未捕获状态唯一的验收依据。
322
+ **同一节再列 Phase 4.2「状态分支清单」**:每行「状态 → 源侧条件 `文件:行号` → 分支内构建/绘制调用 → 是否被快照捕获 → 鸿蒙侧 `文件:行号`」。自绘 View 的每个 `drawXxx` 单列一行。未捕获状态的分支调用在鸿蒙侧找不到对应行、又未标 `不适用` 的,判定失败 —— 这是未捕获状态唯一的验收依据。`phase5_check.mjs` 逐行读这张表:鸿蒙侧写「未实现 / 未还原」、或引用的 `.ets` 不存在 / 行号越界,计入 `branch_uncovered`(阻断);只写了符号、没写 `文件:行号` 的,列入 `branch_unlocated`。「mock 态不会走到这个分支」不是不实现的理由。
320
323
 
321
324
  **`已降级` 不是可以自行采用的万能出口。** 当某条过渡的**终态已被任一参考快照捕获**时,本页**不得**自行标 `已降级` —— 只能标 `已实现`,或标 `需上报`(附缺口描述),由父流程决定接受或退回。理由:`已降级` 与 `已实现` 并列为零成本的合法终态,而参考快照拍到的状态**本身就是验收目标**,不是可选的行为细节;允许自我降级等于允许本页自行缩小验收范围。
322
325
  判据(机械,与 Phase 4.2 的交叉验证同一条):同一 `resource-id` 在多份快照间的 bounds 或尺寸变化**无法由滚动位移解释**(整块变矮而非整块上移)时,该终态即属"已被捕获"。
@@ -28,6 +28,8 @@ Every sub-agent of this skill (the Step 2 resource agent, the Step 3 reviewers,
28
28
  6. **Without background sub-agents** the same loop runs, but each `lease` is dispatched as one blocking wave. This is correct but slow, because every wave waits for its slowest member. Say so in the Step 7 report.
29
29
  7. **If the parent session ends,** its sub-agents end with it. A new session re-runs `group_queue.mjs init`, which keeps results and queues the interrupted groups to resume.
30
30
  - **One parent per campaign.** Never assume the previous parent ended because this is a new session: the user may have opened a second one while the first is still dispatching. Before writing **anything** under `.hometrans/` (plan, prompts, measure packs, `batch_progress.json`, queue), check: a `detach.mjs status` job `running` (other than a `service: true` one such as `fixture_server`, which runs across sessions by design), a `reviewers.json` entry bound in the last 20 min whose answers are incomplete, or a running group with recent activity. `Q init` runs the same check and refuses (`another parent session may still be driving this campaign`). On any of these, stop and ask the user: monitor only, or stop that session and re-run `init --takeover`. `Q wait`, `lease`, `reap` and `refresh` are not read-only either (they re-plan and settle groups), so a monitoring session never calls them.
31
+ - **A crashed parent is told apart by its heartbeat.** Every queue command and each `wait` poll writes `.hometrans/queue_parent.json`. A live parent sits in `wait`, so its beat is seconds old. A beat older than 10 min with no group or reviewer activity after it means the parent is gone (its sub-agents went with it): `init` then resumes without `--takeover`, and that parent's background jobs, which outlive it, come back as `adopt_jobs` to wait on with `wait --job`. Otherwise the refusal ends with `retry_after_s=N`, the time until a crash would be provable.
32
+ - **Skill agents are followed through their report.** The Step 2 resource, Step 5.5 wiring and Step 6 verify agents write no heartbeat. Bind each as you dispatch it: `group_queue.mjs review-bind <hp> --name resources|wiring|verify --kind skill-agent --answers <its report file>`. `wait` then returns `agent` (`agents_done`) when the report appears, and `agent-silent` (`agents_silent`) when none appeared 3× the stall limit (at least 45 min) after the bind: check that agent's session and resume it with its task id.
31
33
 
32
34
  ## Step 1 — `STATE_DOCS` failure modes
33
35
 
@@ -10,7 +10,8 @@
10
10
 
11
11
  | 变量 | 必需 | 说明 |
12
12
  |---|---|---|
13
- | `scope_request` | 是 | 用户原话表达的范围。可以是单页面("短视频播放页")也可以是语义模块("短视频模块所有缺失页面")。**缺失就问用户,不要猜** |
13
+ | `scope_request` | 是(除非给了 `scope_file`) | 用户原话表达的范围。可以是单页面("短视频播放页")也可以是语义模块("短视频模块所有缺失页面")。**缺失就问用户,不要猜** |
14
+ | `scope_file` | 否 | 已按功能确认过的 `scope.json`(v2,a2h-app-migrate `discover.feature_scope` 写出);给了就走「已确认范围」,跳过 I1–I4 |
14
15
  | `android_project_dir` / `harmony_project_dir` / `apk_path` | 是 | 同主 SKILL.md Step 1 |
15
16
  | `ui_info_root` | 否 | 同主 SKILL.md Step 1。增量下常常**已存在**部分快照,I5 会先复用 |
16
17
  | 设备 | 否 | I5 抓取用(同主 SKILL.md Step 0 的 adb 设备)。没有设备时成员全部按 source-only 转换 |
@@ -50,13 +51,13 @@
50
51
 
51
52
  每个成员记录 `inclusion`:`seed` / `hop:N via <edge trigger>` / `dialog-of:<host>` / `横切`。这个字段是 I4 那张表的核心,也是用户判断该不该裁掉它的唯一依据。
52
53
 
53
- **这四条都是启发式,不可能全对。** 语义边界没有唯一正确答案,所以 I4 的用户确认不是可选步骤。
54
+ **这四条都是启发式,不可能全对。** 语义边界没有唯一正确答案,所以 I4 的用户确认不是可选步骤(a2h-app-migrate 以 `INTERACTION_MODE=auto` 调用时例外,见 I4)。
54
55
 
55
56
  ## I3 — 差异分析:哪些成员真的缺
56
57
 
57
58
  `batch_progress.json` 只记录**本 skill 自己转过的**页面。用户手上那个已有鸿蒙版本没有任何进度文件,所以现存页面必须从工程本身枚举。
58
59
 
59
- **枚举鸿蒙侧现存页面**:对 `ALL_MODULES` 每个模块,读 `src/main/resources/base/profile/main_pages.json` 的路由表,并 Glob `src/main/ets/pages/**/*.ets`、`src/main/ets/components/**/*.ets`。两者取并集——只在 `main_pages.json` 里的是注册未实现,只在磁盘上的是实现未注册,两种都要能看出来。
60
+ **枚举鸿蒙侧现存文件**:跑 `node <skill_dir>/scripts/list_existing.mjs ${harmony_project_dir} --out ${harmony_project_dir}/.hometrans/incremental/existing.json`,不要手工拼。它对每个模块(含 `src/main/ets` 或 `src/main/resources` 的目录,即 `ALL_MODULES`)列出 `src/main/ets/pages/**`、`components/**`、`viewmodel/**` 下的 `.ets`,并对照 `main_pages.json` 路由表给出 `routes.registered_missing`(注册未实现)与 `routes.unregistered_pages`(实现未注册),两种都要在 I4 里能看出来。`viewmodel/**` 必须在列:每个页面组都预测写 `viewmodel/<X>ViewModel.ets`,漏列会让同名的手写 ViewModel 被覆盖。
60
61
 
61
62
  **映射**:沿用工程既有命名规则(`${activity_name}` 去掉 `Activity`/`Fragment` 后加 `Page`,大小写不敏感),这与[step4-prepare.md](step4-prepare.md) Step 4.3 和 `a2h-resource-convert` 用的是同一条规则。
62
63
 
@@ -67,18 +68,23 @@
67
68
  | 级别 | 判据 | 动作 |
68
69
  |---|---|---|
69
70
  | `missing` | 鸿蒙侧无对应页面(命名与内容证据均未命中) | 转换 |
70
- | `exists` | 有对应页面且内容完整 | 跳过,在 Step 7 报告中列出依据 |
71
+ | `exists` | 有对应页面,且 `page_gap.mjs` 判 `complete`(Android 页面的资源 / 文案都已在) | 跳过,在 Step 7 报告中列出依据 |
72
+ | `partial` | 有对应页面、不是占位页,但 `page_gap.mjs` 判 `partial`(部分已迁、部分缺失) | **补齐**(见下):只补缺的部分,原地编辑,不备份覆盖 |
71
73
  | `placeholder` | 有对应页面但是占位空页 | **重迁**(见下) |
72
74
  | `exists?` | 映射不确定 | 交 I4 由用户判断 |
73
75
 
74
76
  **占位判据(机械可判,命中任一即 `placeholder`)**:`build()` 内除脚手架外无控件;无任何 `$r(...)` 资源引用;含 `Hello World` 或 DevEco 模板默认文案;有效行数低于 30。
75
77
 
76
- **`placeholder` 重迁前必须先备份原文件**(同目录 `.bak.<时间戳>`,不要放到 `resources/` 下——见主 SKILL.md 子 agent 契约第 2 条),并在 I4 的表里明示「将覆盖 `<路径>`,已备份」。
78
+ **`exists` / `partial` 由缺失清单判定,不凭印象**:先用 `<a2h-resource-convert skill>/scripts/extract_page_resources.ts --res <各模块 res> --layout <该页布局> [--source <页面类>] --out <work>/gap/<页面>.candidates.json` 取 Android 页面的资源闭包(布局与页面类就是 I1 证据里定位到的文件),再跑 `node <skill_dir>/scripts/page_gap.mjs --candidates <同上> --ets <页面 .ets> [--ets <ViewModel / 组件 .ets>] --mapping ${harmony_project_dir}/.hometrans/resource_mapping.md --out <work>/gap/<页面>.json`。`complete` → `exists`;`partial` → `partial`;`absent`(一项都没找到)→ 占位判据未命中时定 `exists?`,交 I4(多半是映射错了页面)。控件 id 只是弱证据,不单独决定级别。用户说“某页某块没迁”(补齐指令)时,直接对该页跑这两步。
79
+
80
+ **`placeholder` 重迁前必须先备份原文件**(备份到 `${harmony_project_dir}/.hometrans/backup/<时间戳>/<相对工程的路径>`;不要放在页面同目录,也不要放到 `resources/` 下——见主 SKILL.md 子 agent 契约第 2 条。源码树里的备份会随转换一起提交,进入补丁),并在 I4 的表里明示「将覆盖 `<路径>`,已备份」。
77
81
 
78
82
  ## I4 — 用户确认(成员数 > 1 时强制停下)
79
83
 
80
84
  **成员数 > 1 时必须停下等用户确认,不得自行开工。** 成员数 = 1 时可直接继续,但要在回复里写明范围解析依据(哪个信号命中、`file:line`)。
81
85
 
86
+ **例外:a2h-app-migrate 以 `INTERACTION_MODE=auto` 调用时不停下。** 由你按表定案:`exists?` 按内容证据取更可能的一边,一个名字命中多个候选时取证据最强的一个,并在表里写明取舍理由;表和「相邻但被裁掉」清单照样写进回复,然后直接落盘继续。只有某个名字一个候选都没有时才失败。
87
+
82
88
  给出一张表,一行一个成员:
83
89
 
84
90
  | 页面 | 纳入原因 | 状态 | 计划动作 |
@@ -87,20 +93,33 @@
87
93
  | `page_0009_CommentListActivity` | `hop:1 via 点击评论图标` | `placeholder` | 重迁,覆盖 `entry/.../CommentPage.ets`(已备份) |
88
94
  | `page_0012_ShareSheet` | `dialog-of:VideoPlayerActivity` / `横切` | `missing` | 转换 |
89
95
  | `page_0003_LoginActivity` | `hop:2 via 未登录点赞` / `横切` | `exists` | 跳过 |
96
+ | `page_0005_SettingsActivity` | `seed` | `partial`(缺 `notify_switch` 文案、`ic_bell` 图标) | 补齐,原地编辑 `entry/.../SettingsPage.ets` |
97
+
98
+ 传入 `migrated_pages`(a2h-app-migrate 从迁移台账读出的界面已迁页面 id)时,命中的成员在「状态」列追加 `台账:已迁`。它只是提示:计划动作仍按 I3 读磁盘的结论定(台账说已迁、磁盘上却是 `missing` / `placeholder`,说明文件被删或被改回占位,照常转换 / 重迁并在表里写明)。
90
99
 
91
100
  **另附「相邻但被裁掉」清单**,一行一个,写明被哪条停止规则挡住(其它语义域锚点 / 超跳数上限),供用户捞回。没有这份清单,用户无法判断范围是否漏了东西。
92
101
 
93
- 用户确认后的成员集合即 `SCOPE`,其中动作为「转换」或「重迁」的即待转页面集。
102
+ 用户确认后的成员集合即 `SCOPE`,其中动作为「转换」「重迁」或「补齐」的即待转页面集。用户也可以把 `exists` 改成「补齐」(会先跑缺失清单),或把 `partial` 改成「跳过」。
103
+
104
+ **此时先落盘 I5 的两份清单**(`scope.json`、`existing.json`,格式见下),再跑 `progress_identity.mjs resume`(主 SKILL.md「Resume from progress」):续跑身份和所有阶段标记都依赖本范围的 `scope_id`,范围没定之前无法判断。
94
105
 
95
106
  **此时回到主 SKILL.md 跑 Step 2(资源转换的增量模式)**,把 `SCOPE` 内待转页面的源文件作为 `page_files` 传入。放在 I4 之后而不是更早,是因为用户裁掉的成员不该消耗资源转换;放在 I5 之前是因为它与抓取无依赖,先做先暴露资源缺口。跑完回到 I5。
96
107
 
108
+ ## 已确认范围(`scope_file=`,跳过 I1–I4)
109
+
110
+ a2h-app-migrate 的 `discover.feature_scope` 已按功能确认过范围(或用户直接给了确认过的 `scope.json`)时,以 `scope_file=<scope.json>` 调用,不传 `scope_request`。此时:
111
+
112
+ - **不做 I1 / I2 / I4**:范围已由用户按功能确认,不再解析、不再停下确认。读文件(`node <skills_root>/a2h-app-migrate/scripts/scope_model.mjs validate <scope_file>`),`pages` 就是待转页面,`features[].work` 给出每页的类型:`NEW` 整页转换,`SUP` / `CHG` 只补缺失清单 / 变更(经 `build_conversion_set.mjs` 进组的 `supplement`)。
113
+ - **I3 只做一件事**:照常跑 `list_existing.mjs` 写 `existing.json`(命中的文件只改不重建);页面定级已在缺失清单里完成,不重算。
114
+ - `scope.json` 已在 `${harmony_project_dir}/.hometrans/incremental/scope.json`(不是就复制过去);之后照常:`progress_identity.mjs resume --mode incremental --scope <scope.json>`、静态检查基线、Step 2(`page_files` = 这些页面的源文件)、I5 定向抓取、`build_conversion_set.mjs --scope <scope.json> --existing <existing.json>`。
115
+ - `pages` 为空(范围只有无界面逻辑)时不该被调用;被调用了就直接返回 `{ "ok": true, "pages_processed": 0 }` 并说明原因。
97
116
  ## I5 — 定向抓取(`a2h-utg-explorer` 限定范围,不依赖 crawler / AutoGLM)
98
117
 
99
118
  只需要 `SCOPE` 内页面的 `screenshot.png` + `view.xml` + `meta.json`。抓不到的成员不阻塞:`build_conversion_set.mjs` 会把它们当 source-only 转换,与全量模式同一套降级。
100
119
 
101
- **先落盘两份清单**(I3 / I4 的结论,后面每次重建 plan 都用它们):
102
- - `${harmony_project_dir}/.hometrans/incremental/scope.json`:`{"scope": [<SCOPE 内动作为「转换」或「重迁」的 utg node id>]}`。`exists` / `exists?` 判为跳过的成员不写进去。
103
- - `${harmony_project_dir}/.hometrans/incremental/existing.json`:`{"existing": [<I3 枚举出的现存 .ets,相对 ETS 根,如 "pages/MainPage.ets">]}`。
120
+ **两份清单**(I3 / I4 的结论,I4 确认时已落盘,后面每次重建 plan 都用它们。之后再改 `scope.json` 会改变 `scope_id`,即成为另一次运行):
121
+ - `${harmony_project_dir}/.hometrans/incremental/scope.json`:没有「补齐」成员时照旧写 v1 `{"scope": [<SCOPE 内动作为「转换」或「重迁」的 utg node id>]}`。**有任一「补齐」成员时写 v2**:先写草稿(每个成员一条 feature:转换 / 重迁 → `{"type": "NEW", "page": <id>}`;补齐 → `{"type": "SUP", "page": <id>, "missing": <该页 page_gap.mjs 的 JSON>}`),再用 `node <skills_root>/a2h-app-migrate/scripts/scope_model.mjs write --from <草稿> --out <scope.json>` 生成(它推出 `pages` 与 `scope_id`,三条链路据此一致)。`exists` / `exists?` 判为跳过的成员不写进去。补齐页的缺失清单经 `build_conversion_set.mjs` 进入该组的 `supplement`,group pack 只让转换 agent 补这些项。
122
+ - `${harmony_project_dir}/.hometrans/incremental/existing.json`:I3 由 `list_existing.mjs --out` 写出;`existing` 为现存 .ets 列表(相对 ETS 根,如 `"pages/MainPage.ets"`、`"viewmodel/MainViewModel.ets"`)。`build_conversion_set.mjs` 只读 `existing`;带 `--scope` 却不给 `--existing` 时它会打 `[WARN]`。
104
123
 
105
124
  **先复用已有快照**:`ui_info_root` 下已有、能通过 [step4-prepare.md](step4-prepare.md) Step 4.1 精确路径校验、且 `meta.json.static_node` 在 `scope.json` 里的成员,不必再抓。新范围用新 campaign 时,`export_ui_info.mjs` 把上一个 campaign 导出、本次没再抓到且目录仍在的页面记进 `export_manifest.json` `earlier`,`build_conversion_set.mjs --scope` 仍把它们算作 captured,不会另建 source-only 目录。全部成员都有快照时跳过下面的抓取,直接到「建 plan」。
106
125
 
@@ -119,7 +119,9 @@
119
119
  |-------------|---------------|---------|---------|
120
120
  | `android:inputType` | `.type()` | InputType → InputType | Android: `android:inputType="text"`<br/>HarmonyOS: `TextInput().type(InputType.Normal)` |
121
121
  | `android:inputType="textPassword"` | `.type()` | password → Password | Android: `android:inputType="textPassword"`<br/>HarmonyOS: `TextInput().type(InputType.Password)` |
122
- | `android:inputType="number"` | `.type()` | number → Number | Android: `android:inputType="number"`<br/>HarmonyOS: `TextInput().type(InputType.Number)` |
122
+ | `android:inputType="number"` | `.type()` | number → Number | Android: `android:inputType="number"`<br/>HarmonyOS: `TextInput().type(InputType.Number)`<br/>注意:ArkUI `Number` 会**过滤**非数字字符(不支持负数、小数),Android 只换键盘 |
123
+ | `android:inputType="numberDecimal"` / Compose `KeyboardType.Decimal` | `.type()` | numberDecimal → NUMBER_DECIMAL | Android: `android:inputType="numberDecimal"`<br/>HarmonyOS: `TextInput().type(InputType.NUMBER_DECIMAL)`(API 11+,只允许一个小数点,不支持负数)。金额/价格字段即使 Android 写的是 `KeyboardType.Number`,只要业务允许小数也用它 |
124
+ | Compose `KeyboardType.Number` / `NumberPassword` | `.type()` | Number → Number / NUMBER_PASSWORD | 整数字段(验证码、数量)用 `InputType.Number`;可带小数的字段见上一行 |
123
125
  | `android:inputType="phone"` | `.type()` | phone → PhoneNumber | Android: `android:inputType="phone"`<br/>HarmonyOS: `TextInput().type(InputType.PhoneNumber)` |
124
126
  | `android:inputType="email"` | `.type()` | email → Email | Android: `android:inputType="textEmailAddress"`<br/>HarmonyOS: `TextInput().type(InputType.Email)` |
125
127
  | `android:inputType="textMultiLine"` | 使用 TextArea | multiLine → TextArea | Android: `android:inputType="textMultiLine"`<br/>HarmonyOS: 使用 TextArea 组件 |
@@ -1732,7 +1734,7 @@ Column() {
1732
1734
 
1733
1735
  | Android 组件 | 类名 | HarmonyOS 组件 | 替代方案 | 说明 |
1734
1736
  |-------------|------|---------------|---------|------|
1735
- | ConstraintLayout | `androidx.constraintlayout.widget.ConstraintLayout` | `RelativeContainer` | 部分对应 | 约束布局 |
1737
+ | ConstraintLayout | `androidx.constraintlayout.widget.ConstraintLayout` | `RelativeContainer` | 部分对应 | 约束布局。**`wrap_content` 方向不能靠 RelativeContainer 自适应**:height/width 为 `"auto"`(API 11+)或 `LayoutPolicy.wrapContent`(API 20+)时,只要该方向有子组件以 `'__container__'` 为锚点,自适应不生效、视为未设尺寸,在 Scroll/List 里被撑高(RelativeContainer 文档;FAQ faqs-arkui-318)。`wrap_content` 的卡片优先译成 `Column`/`Row`/`Stack`;保留 RelativeContainer 时该方向只锚兄弟节点并写 `'auto'`,或写实测尺寸。GATE `relative-container-unsized-in-scroll` |
1736
1738
  | ConstraintSet | `androidx.constraintlayout.widget.ConstraintSet` | 自定义状态管理 | 动态配置 | 约束集合 |
1737
1739
  | Guideline | `androidx.constraintlayout.widget.Guideline` | 暂无直接对应 | 辅助 Absolute 定位 | 辅助线 |
1738
1740
  | Barrier | `androidx.constraintlayout.widget.Barrier` | 暂无直接对应 | 手动计算位置 | 屏障 |
@@ -2250,7 +2252,7 @@ Column() {
2250
2252
  |----------------|--------|---------------|---------|------|
2251
2253
  | Text | `Text()` | `Text` | 直接映射 | 文本显示 |
2252
2254
  | TextField | `TextField()` / `OutlinedTextField()` | `TextInput` | 配置样式 | 文本输入框 |
2253
- | BasicTextField | `BasicTextField()` | `TextInput` | 基础配置 | 基础文本输入 |
2255
+ | BasicTextField | `BasicTextField()` | `TextInput` + `.padding(0)` + `.borderRadius(0)` + `.backgroundColor(Color.Transparent)` | BasicTextField 无内边距/背景;ArkUI TextInput 默认 padding 上下 8 左右 16、带背景,不清零时定高输入框文字被裁 | 基础文本输入 |
2254
2256
  | Button | `Button()` | `Button` | 直接映射 | 按钮 |
2255
2257
  | IconButton | `IconButton()` | `Button` + 图标 | 组合实现 | 图标按钮 |
2256
2258
  | Icon | `Icon()` | `SymbolGlyph` / `Image` | 系统图标或图片 | 图标 |
@@ -2268,7 +2270,8 @@ Column() {
2268
2270
  | Column | `Column()` | `Column` | 直接映射 | 垂直线性布局 |
2269
2271
  | Row | `Row()` | `Row` | 直接映射 | 水平线性布局 |
2270
2272
  | Box | `Box()` | `Stack({ alignContent: Alignment.TopStart })` | 对齐默认值相反 | 堆叠布局。Compose `Box` 默认 `contentAlignment = TopStart`,ArkUI `Stack` 默认 `Center`:`Box()` 必须写 `alignContent: Alignment.TopStart`,`Box(contentAlignment = X)` 写 X。子节点 `Modifier.align(X)` 不能译成子节点 `.align(X)`(Stack 里不生效),也不能丢掉只留 padding/margin;X 与其余子节点相同时改 Stack 的 `alignContent`,不同时把该子节点包进与 Stack 同尺寸、按 X 排的 `Column`/`Row`(贴底 `justifyContent(FlexAlign.End)`),或用 `.position`/`.markAnchor`。GATE `stack-bar-default-center` / `stack-overlay-default-center` |
2271
- | ConstraintLayout | `ConstraintLayout()` | `RelativeContainer` | 部分对应 | 约束布局 |
2273
+ | Box 叠层(`Box(Modifier.matchParentSize().background(c))` 蒙层) | `Modifier.matchParentSize()` | `.overlay(@Builder)`,builder 根 `Column().width('100%').height('100%').backgroundColor(c).hitTestBehavior(HitTestMode.Transparent)` | 不能传颜色串 | 整卡蒙层/置灰层。`overlay(value: string)` 是**遮罩文本**重载(浮层文档),`.overlay('#66FFFFFF')` / `.overlay('transparent')` 把色值当文字画在左上角、不画蒙层;浮层 builder 里的 `'100%'` 以宿主组件为基准(浮层文档示例 3)。条件蒙层在 builder 里写 `if`。GATE `overlay-string-color` |
2274
+ | ConstraintLayout | `ConstraintLayout()` | `RelativeContainer` | 部分对应 | 约束布局。**`wrap_content` 方向不能靠 RelativeContainer 自适应**:height/width 为 `"auto"`(API 11+)或 `LayoutPolicy.wrapContent`(API 20+)时,只要该方向有子组件以 `'__container__'` 为锚点,自适应不生效、视为未设尺寸,在 Scroll/List 里被撑高(RelativeContainer 文档;FAQ faqs-arkui-318)。`wrap_content` 的卡片优先译成 `Column`/`Row`/`Stack`;保留 RelativeContainer 时该方向只锚兄弟节点并写 `'auto'`,或写实测尺寸。GATE `relative-container-unsized-in-scroll` |
2272
2275
  | FlowRow | `FlowRow()` | `Flex` (direction: Row) | 流式行布局 | 流式行布局 |
2273
2276
  | FlowColumn | `FlowColumn()` | `Flex` (direction: Column) | 流式列布局 | 流式列布局 |
2274
2277
  | LazyColumn | `LazyColumn()` | `List` (listDirection: Axis.Vertical) | 配合 LazyForEach | 懒加载垂直列表 |
@@ -13,7 +13,8 @@
13
13
  | `LinearLayout` (horizontal) | `Row` 组件 | 横向线性布局 |
14
14
  | `FrameLayout` | `Stack` 组件 | 层叠布局,支持 `.alignContent()` |
15
15
  | `RelativeLayout` | `RelativeContainer` 组件 | 相对布局,通过 `.alignRules()` 设置定位规则 |
16
- | `ConstraintLayout` | `RelativeContainer` / 自定义布局 | 约束布局,复杂场景可用自定义 `onMeasureSize`/`onPlaceChildren` |
16
+ | `ConstraintLayout` | `RelativeContainer` / 自定义布局 | 约束布局,复杂场景可用自定义 `onMeasureSize`/`onPlaceChildren`。改用 `Stack` 分层表达时必须写 `Stack({ alignContent: Alignment.TopStart })`:约束把子视图锚在顶部/起始边,`Stack` 默认 `Alignment.Center` |
17
+ | `MotionLayout` | `Stack({ alignContent: Alignment.TopStart })` 分层(背景层 / 滚动层 / 覆盖层),或 `RelativeContainer` | 过渡进度由滚动偏移驱动、插值两端约束。分层时每一层都要有确定尺寸:只靠 `.background()` 显示的空层必须写 `.width('100%')` 和高度(容器宽高缺省取子组件尺寸,空容器为 0);覆盖层(自定义组件)在调用处没有定位时,其根节点要么撑满 Stack,要么依赖 `TopStart`。GATE `bg-only-container-collapsed` / `stack-custom-child-default-center` |
17
18
  | `FlexboxLayout` | `Flex` 组件 | 弹性布局,支持 `FlexDirection`/`FlexWrap`/`FlexAlign` 标准 Flexbox |
18
19
  | `GridLayout` | `Grid` 组件 | 网格布局,通过 `.columnsTemplate('1fr 1fr 1fr')` 定义列 |
19
20
  | `TableLayout` | `Grid` 组件 | 表格布局,使用 `Grid` 组件模拟表格结构 |
@@ -107,6 +108,32 @@
107
108
  | `ArrayAdapter` | `ForEach` + 数组 | 数组适配器 |
108
109
  | `BaseAdapter` | `ForEach` / `LazyForEach` | 基础适配器 |
109
110
 
111
+ ### Compose Lazy 网格的参数映射(LazyVerticalStaggeredGrid / LazyVerticalGrid → WaterFlow / Grid)
112
+
113
+ 组件对应之外,下面几个参数决定间距和整行项,**逐项映射,漏一项就是可见缺陷**(GATE `waterflow-sections-no-gap`):
114
+
115
+ | Compose 参数 | WaterFlow(sections) | Grid |
116
+ |---|---|---|
117
+ | `columns = Fixed(n)` | 网格分组 `crossCount: n` | `.columnsTemplate('1fr 1fr …')` |
118
+ | `contentPadding = PaddingValues(x)` | 每个分组 `margin: x`(或 WaterFlow `.padding(x)`,二选一,不要叠加) | `.padding(x)` |
119
+ | `horizontalArrangement = spacedBy(x)` | 分组 `columnsGap: x`(未写时取 WaterFlow `.columnsGap`) | `.columnsGap(x)` |
120
+ | `verticalItemSpacing = y` / `verticalArrangement = spacedBy(y)` | 分组 `rowsGap: y`(未写时取 WaterFlow `.rowsGap`) | `.rowsGap(y)` |
121
+ | `item(span = FullLine)` | 单独一个 `crossCount: 1` 的分组,同样写 `rowsGap` | `GridItem().columnStart(0).columnEnd(n-1)` |
122
+
123
+ - **分组和数据同步**:`itemsCount` 由数据源计算,不写数字字面量(CAND `waterflow-section-count-literal`)。刷新、加载更多、mock 换成真实数据时,用 `sections.update/splice` 同步。SDK 规定各分组子节点数之和必须等于实际 FlowItem 数,否则布局会异常。
124
+ - **一个 FlowItem 模板只放一种内容**:整行项(轮播、标题、推荐列表)和网格项不要在同一个 `LazyForEach` 回调里用 if/else 切换。节点复用时宽度约束可能沿用上一种内容,网格项就会按整行宽测量:图片撑高,右侧内容被裁掉。整行区和网格区拆成两段数据,或者给每种项单独写子组件,并在调用处给出明确宽度。
125
+ - 能复用共享的 `RefreshLayout`(它已映射 `spacedBy`/`verticalItemSpacing`)就复用。需要整行项时,给共享组件加整行槽位,不要在页面里重写一个漏掉间距的 WaterFlow。
126
+
127
+ ### Compose 顶栏滚动行为(TopAppBarScrollBehavior)
128
+
129
+ | Compose | ArkUI | 说明 |
130
+ |---|---|---|
131
+ | `enterAlwaysScrollBehavior` | 顶栏整体 `.translate({ y: -offset })` + 外层 `.clip(true)` + 内容区同步上移(或顶栏改为 Stack 覆盖层),`offset ∈ [0, 顶栏高]` 由列表 `onDidScroll` 的 `yOffset` 累加 | 上滑时整条顶栏移出屏幕,下滑任意距离后立即回来 |
132
+ | `exitUntilCollapsedScrollBehavior`(LargeTopAppBar) | 同上,但 offset 只在列表回到顶部时减少 | 大标题折叠成小标题 |
133
+ | `pinnedScrollBehavior` | 顶栏固定,只改背景色或阴影 | 不移动 |
134
+
135
+ **禁止只改顶栏 `.height()` 来模拟折叠**:子元素是固定高度时,容器变矮而内容不动,看起来就是"缩了一半"。做不到平移时,写成固定顶栏,并在报告里列为降级,不要做出一个半成品折叠效果。
136
+
110
137
  ## 下拉刷新(SwipeRefreshLayout)映射
111
138
 
112
139
  `SwipeRefreshLayout` → `Refresh` 只是组件对应,下拉时的行为并不一样:
@@ -126,6 +126,30 @@ class SettingsStore {
126
126
  const store: SettingsStore = PersistenceV2.connect(SettingsStore, SettingsStore.KEY, () => new SettingsStore())!;
127
127
  // 仅内存、跨页面共享:
128
128
  const session: SettingsStore = AppStorageV2.connect(SettingsStore, 'session', () => new SettingsStore())!;
129
+ // ❌ 不传构造器:键还不存在时首次 connect 直接抛
130
+ // BusinessError: The default creator should be function when first connect(应用崩溃),
131
+ // `?? new SettingsStore()` 兜底永远走不到。AppStorageV2 文档:「确保数据已经存储在 AppStorageV2 中,
132
+ // 可省略默认构造器;否则必须指定默认构造器,不指定将导致应用异常」。
133
+ // const bad = AppStorageV2.connect(SettingsStore, 'session') ?? new SettingsStore();
134
+ // 跨模块(入口 HAP 与各 feature HAR)共享同一个 key:每个连接点都带构造器,类型保持一致,不依赖「谁先建键」。
135
+ ```
136
+
137
+ ```ts
138
+ // 7) 把 @Builder 交给子组件的 @BuilderParam
139
+ @ComponentV2
140
+ struct Parent {
141
+ @Local url: string = '';
142
+ @Builder Avatar() { Image(this.url) } // this 指向「实际调用点」的组件
143
+ @LocalBuilder AvatarL() { Image(this.url) } // this 固定为声明它的 Parent
144
+ build() {
145
+ Column() {
146
+ // ❌ Item({ trailing: this.Avatar }) —— Avatar 在 Item 里执行,this.url 读的是 Item → undefined / 崩溃
147
+ Item({ trailing: () => { this.Avatar() } }) // ✅ 箭头函数包一层,this 留在 Parent
148
+ Item({ trailing: this.AvatarL }) // ✅ 或改用 @LocalBuilder
149
+ // ❌ Item({ trailing: () => { Image(this.url) } }) —— 箭头函数体不经 UI 编译,组件写在这里渲染即崩(class constructor cannot called without 'new')
150
+ }
151
+ }
152
+ }
129
153
  ```
130
154
 
131
155
  ## 三、高频错误(本表即验收清单)
@@ -138,6 +162,12 @@ const session: SettingsStore = AppStorageV2.connect(SettingsStore, 'session', ()
138
162
  | `@Computed` getter 里写副作用/赋值 | 行为未定义 | getter 保持纯函数;副作用放 `@Monitor` |
139
163
  | `@Monitor` 写在 `struct` 里监听非状态变量 | 不触发 | 只监听 `@Local`/`@Param`/`@Provider`/`@Consumer`/`@Computed` 装饰的变量,深层属性还要被 `@Trace`(依据 `v2-monitor` §限制条件) |
140
164
  | `PersistenceV2.connect` 的类未加 `@ObservedV2` | 不持久化/不刷新 | 存储类必须 `@ObservedV2` + `@Trace` |
165
+ | **`AppStorageV2.connect(T, key)` / `PersistenceV2.connect(T, key)` 不传第三个参数** | **首次进入页面即崩溃**:`BusinessError: The default creator should be function when first connect`;只走冷启动的冒烟测不到 | 一律 `connect(T, key, () => new T())!`;只有前面已用 `keys().includes(key)` 确认键存在时才可省略。GATE `appstoragev2-connect-creator` |
166
+ | **各模块复制一份同名连接类,connect 同一个 key**(feature HAR 不能 import 入口 HAP,于是每个模块抄一份 `PrimaryColorSlot`) | 「同一个 key,connect 不同类型的数据会导致应用异常」:不同文件里的同名类是不同类型;为避开它又让入口「不建键」,结果首连无构造器即崩 | 类与带构造器的 connect 只写一份,放在共享 HAR(`common/*`),各模块 import 它。GATE `appstoragev2-connect-creator`(跨文件形态) |
167
+ | **`@ComponentV2` 页面里 `new CustomDialogController({ builder: X() })`,或 X 是 `@ComponentV2`** | **打开弹窗即崩溃**:`class constructor … cannot be invoked without 'new'`。CustomDialog 文档:控制器只在 `@Component` / `@CustomDialog` 成员里有效,builder 须是 `@CustomDialog` | V2 页面用 `this.getUIContext().getPromptAction().openCustomDialog(new ComponentContent(uiContext, wrapBuilder(fn), params), options)`,关闭用 `closeCustomDialog(content)`。GATE `dialog-controller-v2-builder` |
168
+ | **`Child({ slot: this.SomeBuilder })` 传 `@Builder` 方法引用,Builder 体内读 `this.`** | **运行时崩溃** `xxx is not callable, xxx is undefined`,或读到子组件同名字段(FAQ「使用BuilderParam在父组件调用this的方法报错」) | `slot: () => { this.SomeBuilder() }`,或声明为 `@LocalBuilder`。系统组件参数(`Refresh` 的 builder、`bindSheet`)不受影响。GATE `builder-param-bare-method-ref` |
169
+ | **`Child({ slot: () => { Comp({…}) } })` 箭头函数体里直接写组件** | **渲染到该槽位即闪退** `class constructor cannot called without 'new'`:只有 @Builder 函数体经 UI 编译,箭头函数体原样保留,`Comp({…})` 成了对组件类的普通调用;能编译、冷启动不触发 | 组件写进本组件的 `@Builder X()`(读父状态用 `@LocalBuilder`),参数写 `slot: () => { this.X() }`。GATE `builder-param-arrow-inline-component` |
170
+ | **`TextInput` 单向绑定 `text: this.x`,`onChange` 只在 `if` 里回写**(Compose「过滤后赋值」译成「变了才赋值」) | 输入框显示用户键入的值,状态变量一直是旧值:依赖它的启用判断、提交永远不成立(「完成验证」点了没反应) | 无条件写过滤结果 `const f = filter(v); this.x = f;`,或 `$$this.x` / `!!` + `inputFilter`。GATE `controlled-input-conditional-writeback` |
141
171
  | `@ComponentV2` 里出现 `@State`/`@Link` 等 V1 装饰器 | 编译报错或行为异常 | 全程单一范式,见开头铁律 |
142
172
  | **(V1)`@Observed` 类里用了 `@Track`,却让 UI 读到未被 `@Track` 的成员** | **首帧运行时崩溃**:`BusinessError 140110: Illegal usage of not @Track'ed property 'x' on UI!` | `@Track` 是 **all-or-nothing**:类里一旦出现任何 `@Track`,UI 读到的每一个成员都必须是 `@Track` 字段(依据 `v1-track` §概述、§限制条件) |
143
173
  | **(V1)用 `get x()` 给 UI 暴露派生值** | 同上,首帧崩溃。**编译通过、零告警、字段侧完备性检查全过** —— getter 不是数据属性,无法被 `@Track` 装饰 | **V1 没有 `@Computed`**(那是 V2 能力)。派生值改成**普通方法**(`title(): string`,UI 侧 `vm.title()`;原型方法不经过 `@Track` 代理),或提升为真正的 `@Track` 字段。注意「getter 会重新求值」只说明**响应性**没问题,**不说明合法性** |
@@ -4,7 +4,7 @@ Full procedure for Step 3 (3.1–3.3) of [SKILL.md](../SKILL.md). SKILL.md carri
4
4
 
5
5
  ### Step 3.1 — Static UTG Skeleton (both modes, whole app)
6
6
 
7
- The capture skeleton always ends up in `${harmony_project_dir}/.hometrans/utg_static`. Step 3.2 reads that path and no other. A resume that already has `stages.capture.done` skips Step 3 entirely and does not copy.
7
+ The capture skeleton always ends up in `${harmony_project_dir}/.hometrans/utg_static`. Step 3.2 reads that path and no other. A resume that already has `stages.capture.done` skips Step 3 entirely and does not copy. A resume whose capture already started (`.hometrans/utg_explore/campaign.json` exists, `stages.capture.done` not yet set) skips Step 3.1 the same way (no copy, no `run_pipeline.mjs`, no reviewers) and continues Step 3.2 with `run_cycle.mjs` on that campaign: the campaign's tasks are keyed to the skeleton's node ids, so a rebuilt skeleton would orphan everything captured so far. `reuse_static_utg.mjs` exits 3 (`capture_in_progress`) and `run_pipeline.mjs` refuses without `--resume` in that state.
8
8
 
9
9
  **Reuse a workspace the caller just built.** Only when `reuse_static_workspace` was passed. Read the device locale with `adb shell getprop persist.sys.locale` (same `<adb>` / `-s <ADB_SERIAL>` as Step 3.2). Then:
10
10
 
@@ -100,14 +100,15 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
100
100
  ```bash
101
101
  node <this skill>/scripts/detach.mjs start ${harmony_project_dir} --name run_cycle -- \
102
102
  node run_cycle.mjs $C --config $C/config.json --static $S/utg.json \
103
- --project <android_project_dir> --package <app package>
103
+ --project <android_project_dir> --package <app package> --follow-min 60
104
104
  ```
105
+ `--follow-min 60`: when a pass stops only for unanswered review parts, the call keeps polling their answers files for up to 60 min and runs the next pass the moment they are all in, so the device does not sit idle until you start the cycle again. It does not end to tell you about the parts: `group_queue.mjs wait` returns `reviews` with `reviews_to_dispatch` (the answers files of `capture_pending.json` no reviewer is bound to) — dispatch and `review-bind` those.
105
106
  Device phases run inside the call (30+ min), so it **always** runs in the background (Step 0.1 item 3). Pass `--job run_cycle` to every `group_queue.mjs wait` while it runs; when `wait` reports `job`, read the call's JSON from the end of `.hometrans/jobs/run_cycle.log`. That JSON is written only when the call ends. While it runs, follow `$C/cycle_progress.jsonl` (one line per stage and device phase, with result and error), not process lists or `run_device.log`. Each call advances until the next stage needs answers. It prints JSON with `finished`, `covered`, `skipped`, `failed_phases`, `blocked_on` and `waiting` (per worklist, the `parts` with `worklist` / `answers` paths).
106
107
 
107
108
  Reviews overlap (`--review overlap`, the default). A round's stages (A, B/C, D, direct launch) are extracted up front, and `waiting` lists **every** stage's parts at once. The stages still apply and run on the device in order. While `finished` is false:
108
109
  - Do the "Convert while exploring" checks (item 5 below).
109
110
  - Dispatch one reviewer per waiting part **not already dispatched** (`reviewers.json` records them; `review-bind` each one as you dispatch it) as a Step 3.1 reviewer wave (background sub-agents). Dispatch at most `--max-agents` (10) reviewers at a time, parts of the `blocked_on` worklists first; the rest go as earlier ones complete. The prompt gives the part path, the absolute answers path and the Step 3.1 parse-check, and points to `references/architecture.md` for the schema. Reviewers rely on component trees, open at most one screenshot per item, and save answers every ~4 items. The answers file is a JSON list or `{"items": [...]}`, one row per item with its `key` copied verbatim; `answers_check.mjs` counts a row without `key` as `keyless`, never complete.
110
- - When the parts of every `blocked_on` worklist are complete (`answers_check.mjs`), start `run_cycle.mjs` again the same way, even while other stages' reviewers still run. It merges, applies, runs the device phases and stops at the next stage that waits.
111
+ - When the parts of every `blocked_on` worklist are complete (`answers_check.mjs`), a call started with `--follow-min` continues on its own; only when it has ended (the `job` reason) start `run_cycle.mjs` again the same way, even while other stages' reviewers still run. It merges, applies, runs the device phases and stops at the next stage that waits.
111
112
  - A stage extracted early is re-extracted after the earlier stages ran. Answers to items still offered are kept (`<x>_answers.seed.json`), and items covered meanwhile are dropped. Only new items come back in `waiting` as new parts, e.g. D requirements from B/C `unreachable` answers. Dispatch reviewers for those only.
112
113
  - A `waiting` entry with `error` names answers that do not merge (missing, duplicate or unknown keys). Find the bad part(s) with `answers_check.mjs` and resume their reviewers. The other stages go on meanwhile.
113
114
  - `failed_phases` lists device phases that failed after round 1 (e.g. a budget error). Each was recorded and skipped, and the rest of its stage ran. Report them in Step 7; never re-run them by hand. Every apply and phase is checkpointed, so a re-run after a crash never re-applies one.
@@ -164,7 +165,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
164
165
  node <this skill>/scripts/detach.mjs stop ${harmony_project_dir} --name fixture_server
165
166
  node d_prereqs.mjs release --config $C/config.json
166
167
  ```
167
- `stop` is a no-op when the server was never started. `release` removes the `adb reverse` (no-op for an emulator); it is needed because a forced stop on Windows skips the server's own cleanup. A re-run of Step 3.2 starts the server again the same way and keeps its port.
168
+ Step 7 runs the same two commands on every exit path (finished or not), so the server never outlives the campaign. On an early exit it first runs `detach.mjs stop … --name run_cycle`: a cycle still running when the server goes away would fail every recovery D recipe against the closed URL. `stop` is a no-op when the server was never started. `release` removes the `adb reverse` (no-op for an emulator); it is needed because a forced stop on Windows skips the server's own cleanup. A re-run of Step 3.2 starts the server again the same way and keeps its port.
168
169
 
169
170
  **Export layout** (`export_ui_info.mjs`):
170
171
  - **Per page.** One `page_NNNN_<Name>/` per *verified* static node and screen state, with `screenshot.png`, `view.xml`, `meta.json`.
@@ -172,7 +173,8 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
172
173
  - Other captures of the same state (re-visits, retries, non-sweep swipes) are **not exported**. Their observation ids are in `meta.source.unexported_viewport_ids` (artifacts under `<campaign>/artifacts/<id>/`). There are no `*_vpN` files. The primary is a loaded, unblocked capture when the state has one; only when a sweep origin (which must stay `view.xml`) is still loading or FLAG_SECURE is one loaded capture of the same state exported as `view_loaded.xml` / `screenshot_loaded.png`, listed last.
173
174
  - **Top level.** Also writes `pages.json` (click-path order), `deferred_human.json` and `export_manifest.json`.
174
175
  - **Not exported as pages.** Unmapped `dynamic:*` observations and container kinds (`host-activity`, …) appear only in the manifest. Captures whose view tree belongs to another package are listed under `foreign_tree_captures`.
175
- - **`meta.scroll_completeness`.** `complete` means the page end was proven. `truncated`, `aborted`, `unreached`, `no-container` and `not-swept` mean the frames stop short, and the rest comes from the Android layout source. `meta.scroll.unswept_containers` lists nested vertical scrollers that were not swept.
176
+ - **`meta.scroll_completeness`.** `complete` means the page end was proven **after at least one effective swipe** (`scroll_frames > 0`). `not-scrollable` means a probe proved the content does not overflow (`scroll_probe.overflow == false`); no frame is expected. `truncated`, `aborted`, `unreached`, `no-container`, `not-swept` and `no-effect` mean the frames stop short (or never moved), and the rest comes from the Android layout source. A `complete` with 0 frames is a **false complete** — `capture_audit.mjs` rejects it. `meta.scroll.unswept_containers` lists nested vertical scrollers that were not swept.
177
+ - **`meta.scroll_probe`.** `{overflow, scroll_height, client_height, tag, cls, id}` written by `capture_fast.mjs`. It is the only way to distinguish a page that truly fits its viewport from a scroller that refused to move.
176
178
  - **`meta.json.device_info`.** Comes from the per-session `wm density` / `wm size`. For campaigns listed in `missing_device_info`, run `measure_pack.ts --density <wm density ÷ 160>`.
177
179
 
178
180
  **Record for the report:**
@@ -181,6 +183,20 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
181
183
  - `export_manifest.json` counts: pages, skipped, dynamic-only, foreign-tree drops, missing device_info;
182
184
  - the contents of `deferred_human.json`, which goes to Step 7;
183
185
  - `conversion_set.json`'s `summary`: captured / source-only / attached / skipped.
186
+ ### Step 3.2-F — Fast hybrid capture (`capture_fast.mjs`)
187
+
188
+ Use this when the app is a WebView/uni-app shell and the explorer's task scheduler is too slow or too unstable to finish (measured app_uni 2026-11-20: 2 h for 34/149 pages). It is a **compliant** replacement, not a shortcut:
189
+
190
+ ```bash
191
+ node <this skill>/scripts/capture_fast.mjs <ui_info_root> --source <android_project_dir> \
192
+ --serial <adb serial> --package <pkg> [--launch-component <pkg>/<activity>] \
193
+ [--only <page_id|route>] [--limit N] [--resume] [--force] [--dry-run]
194
+ ```
195
+
196
+ For each page it jumps the route, waits until the accessibility tree is stable, probes `document.scrollingElement` / every overflow element through CDP, records `scroll_probe`, scrolls the **largest real vertical scroller** and writes `screenshot_scroll_N.png` + `view_scroll_N.xml` until the bottom or the cap, then runs `capture_verify` and merges `pages.json` / `export_manifest.json` (never shrinks them). A page whose content fits gets `scroll_completeness: not-scrollable` with 0 frames and `scroll_probe.overflow: false`; a page that never moves gets `no-effect` (degraded, not a false `complete`). A probe that fails (no devtools target answers, an in-page exception) proves nothing: the page gets `not-swept` and `scroll_probe: {overflow: null, failed: true}`, never `not-scrollable`. A re-capture overwrites the page's frames and, right before rewriting `meta.json`, deletes old `screenshot_scroll_N.*` / `view_scroll_N.xml` numbered above the new frame count; a capture that fails mid-sweep keeps the old frames its old meta lists. `--resume` skips only a page whose recorded result is `complete` or `not-scrollable`; `truncated` / `no-effect` / `not-swept` pages are captured again. Without `--appid` and a `manifest.json` appid, the static node ids use a fallback appid and the script warns.
197
+
198
+ `--dry-run` lists the selected pages and whether the source declares a scroll container, without touching the device. `--probe-only` records the probe but leaves an overflow page `not-swept`, so the audit lists it as degraded until frames are captured.
199
+
184
200
  ### Step 3.2-I — Scoped capture (incremental mode's I5)
185
201
 
186
202
  The Step 3.2 explorer cycle with three deltas, all in `./references/incremental-scope.md` I5: the campaign is planned with `plan.mjs --scope <scope.json>` (tasks, review worklists and `capture_pending.json` then cover only the scope), `run_cycle.mjs` gets `--skip D` unless the user allows app-data changes, and the builder runs with `--scope` / `--existing`. No crawler, no model key.
@@ -202,14 +218,17 @@ Directory contents:
202
218
  - A captured directory holds `meta.json` + `view.xml` + `screenshot.png`.
203
219
  - A captured page whose window is FLAG_SECURE (system screencap is black) holds `meta.json` + `view.xml` and no PNG: `screenshot` is `null`, `screenshots` lists only the frames that were kept, and `screenshots_blocked[]` names each view tree with no screenshot (`reason: "flag-secure"`). It is still `captured`: the view tree is real device evidence; only pixel measurements are unavailable. When every frame of the page is blocked, `build_conversion_set.mjs` adds `pixels: "blocked"` to the page row (summary `pages_tree_only`). Step 4 then hands the agent precomputed container geometry, and Step 7 reports the page as having no pixel verification (step4-prepare.md item 6).
204
220
  - A captured page with views taken before its data arrived (visible text still holding `%1$s` / `%2$d` / `%.1f`, i.e. the layout default) carries `content_loading: {primary, views[{view_xml, texts}], loaded_views[]}` in `meta.json`, and the export warns about it. The explorer already waits up to `content_wait_seconds` (10 s) for such text to be formatted before it maps a capture. The export also puts a loaded viewport of the same state first when one exists, so this field only remains when no capture had the data in time. Step 4.1 item 7 says how it is handed on.
221
+ - A captured page whose frames were taken before anything painted carries `capture_quality: {verdict: "rejected", level: "none", reasons[], ink_ratio, frame, frames[], ...}` in `meta.json` (`capture_verify.mjs`, run inside `export_ui_info.mjs` and re-runnable on any ui_info root). This is a **pixels** test, not a view-tree test: on a hybrid page the tree is one WebView node, so neither the explorer's spinner check nor `content_loading` can see a blank body. `build_conversion_set.mjs` demotes such a page to `source-only` (`row.pixels: "rejected"`, `summary.pages_capture_rejected`, `meta.degraded_from: "capture"`; `meta.evidence_tier` keeps the value the capture wrote, the marker alone makes the page source-only, and the directory and its verdict survive every rebuild and re-export), `group_pack.mjs` prints an **EMPTY FRAME** banner in the group prompt, `evidence_gate.mjs` drops its screenshot and view tree from the intake manifest, and the directory stays on disk for audit and re-export. `level: "sparse"` is the softer case (an empty state, or a page that may still be loading): the frame is kept as a state reference and the prompt says the layout must come from source. Re-capture rejected pages in Step 3.2; never re-include one by hand.
222
+ - **Capture-side prevention (Gate R).** For a hybrid app the explorer now waits on the frame, not on the view tree: `content_settle` (default on when `hybrid_route_capture` is set) makes each observation require a body with foreground and two agreeing frames, and `observe()` keeps retrying through `awaitContent`. A run whose `events.jsonl` shows `app_lifecycle` events is not broken — the adapter relaunched an app whose WebView renderer died (`pidof` check before each route jump), which is exactly the case that used to fail every later task. If routes fail with `hybrid-route: CDP …` after a long run, run `node <a2h-utg-explorer>/scripts/forward_gc.mjs --serial <serial> --package <pkg>` — the helper sweeps first on every call, but a manual sweep shows what was stale.
205
223
  - A source-only directory (`meta.json.evidence_tier == "source-only"`) holds only `meta.json`, by design.
206
224
 
207
225
  Directory names depend on the capture path:
208
226
  - `page_NNNN_*/` comes from the explorer export (captured) or the builder (source-only).
209
227
  - `activity_*/`, `route_*/`, `overlay_*/`, `mode_*/`, `dyn_*/` are older captures by other tools; they are read only through the Step 4 Glob fallback.
210
228
 
211
- **Coverage gate.** A small capture does not mean a small conversion, but project tokens (density, theme colours, spacing, framework-control looks) only come from measured pages.
229
+ **Coverage gate.** A small capture does not mean a small conversion, but project tokens (density, theme colours, spacing, framework-control looks) only come from measured pages. **Coverage is not enough: run `scripts/capture_audit.mjs <ui_info_root> --source <android_project_dir> --json <ui_info_root>/capture_audit.json` and require exit 0 before Step 4.** It turns the directory contract into a machine check (paired screenshots, non-blank pixels, `pages.json` completeness, and a scroll verdict for every scrolling page); `build_conversion_set.mjs` carries a fake completion (`complete` with 0 frames, or a scroll container with no verdict) as `scroll_gap` onto the group, so `group_queue.mjs` will not lease it; an honest partial sweep (`truncated`, `not-swept`, `no-effect`, `aborted`, `unreached`) is `scroll_degraded`: it converts with the SINGLE VIEWPORT warning and the below-fold part comes from source. The rule is `scripts/scroll_verdict.mjs`, the same in the audit, the build and the prompt. A queue state written before this gate (no `scroll_gate` field) does not hold at all.
212
230
  - `pages_captured == 0`: stop and report. Fix capture (device, fixtures) first. Incremental mode with no device, or after the user chose not to capture, proceeds source-only instead and says so in Step 7.
231
+ - `pages_capture_rejected > 0`: those pages were captured before anything painted (see the directory contract above). They are already source-only in `plan`; report them together with the captured count (`captured − rejected`) and, when a device is available, re-capture them before Step 5. `pages_captured + pages_capture_rejected` is the honest number of pages the device actually showed.
213
232
  - Otherwise, report `captured / source-only / attached / skipped` before Step 5. When source-only outnumbers captured, name the blocked phases in `deferred_human.json` whose fixture would move the most core pages to `captured`; the user may supply it first.
214
233
  - **Reached but not recognised is not done.** Read the explorer `report.md` phases and uncovered list before accepting the coverage. A `recD-*` phase blocked `state-probe-failed` or a core page listed `target-unverified` means the device got there and identity or the probe failed, not that the state is unreachable; nothing about it lands in `deferred_human.json`. `run_cycle.mjs` offers each probe failure back once as a `probe-revision` item: answer it from the screen's `visible_texts`. A page still `target-unverified` after that gets a `page_rules` entry (`family` = its static node id, anchors present in the captured tree AND cited from source) in `config.json`, then one more `run_cycle.mjs` call. Otherwise the page converts source-only even though the device reached it.
215
234
  - **The entry page's direct successors must not stay source-only silently.** When the page the app lands on after launch (here Main, behind Splash) or any page reached from it in one step is still source-only, Step 7 names it, the phase/reason from `report.md`, and what was tried; record it in `deferred_human.json` as well so a later run can pick it up.
@@ -38,9 +38,12 @@ Index pages by Activity name. Each Activity's `BASE_UI_INFO` is its first snapsh
38
38
  | `class` / `lane` | `host-chain` / `entry` (writes or mounts onto the entry page, or shares a predicted write with an entry group: the queue serialises equal lane names only), `serial` / `lane-Gxxx` (shares another predicted write, no entry group in its lane), `self-contained` / `null` |
39
39
  | `verify_only` | every predicted write is owned by an earlier group of its lane (e.g. a source-only `MainActivity` whose `pages/MainPage.ets` the `MainFragment` group writes). It converts nothing; its prompt asks for a host-shell check (entry registration, routes, window layer, leftover scaffold) and a `## REPORT <GID>`, which `group_queue.mjs` accepts as its deliverable. It is still leased and dispatched: `Q verified` refuses a group that is not `returned`. One class mounted as several destinations (`view-page:X#courses` / `view-page:X#query`) is not this case: each anchor predicts its own `pages/X<Instance>Page.ets` and converts |
40
40
  | `legacy_writes` | only on such per-instance groups: each per-instance write → the shared name it had before the split. An incremental run on a project converted before the split edits the existing shared file (both instances, serialised in the `entry` lane) instead of creating a parallel one. That shared file usually came from the old bug (the later instance was `verify_only`, so the file shows only the first instance's content): the group must turn it into **one page that switches by mode / instance** (the Android class's own `modes` parameter) and mount each destination with its own mode — not leave both tabs showing the same content |
41
+ | `supplement` | only in an incremental run whose `scope.json` is v2 with `SUP` (supplement) or `CHG` (changed behavior) work: per page, the feature, the work type and the `page_gap.mjs` missing list (or the change). The page already exists: the group pack's "Supplement only" section lists exactly what to add, and the converter edits the existing file in place — never a whole-page conversion over it, never a backup-and-overwrite |
41
42
  | `stage` | 0 = entry group; 1 = groups with any capture; 2 = source-only |
42
43
  | `after` | same-stage groups that must finish first (the leader of a shared base class / layout / pref-dialog family builds the shared component) |
43
44
  | `reuse_from` | families this group reuses read-only, and from which group |
45
+ | `overlays_owned_elsewhere` | overlays a member opens that another group converts: `{node, group, file}`. The host imports that file and never writes a copy; it waits for that group (`after` in the same stage, `waits_for` when the owner is on a lower stage) |
46
+ | `waits_for` | lower-stage groups this one must wait for although the stage rules would let it start: the entry group when the contract has `theme.runtime_slots`, a lower-stage overlay owner. group_queue.mjs adds them to the group's dependencies |
44
47
  | `warning` | more than 8 members — review |
45
48
 
46
49
  How members are assigned:
@@ -20,16 +20,18 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
20
20
  10. The Step 4.4 facts: `项目事实(...)` headings, the shell contract `.md`, `MEASUREMENT_PACK` + the `--probe` block (captured), and `SOURCE_PACK`.
21
21
  11. **`EVIDENCE_TIER` per member**, from `meta.json`; a group can mix tiers.
22
22
  - `REUSE_FROM` = the group's `reuse_from`: the files the leader wrote, stated **read-only** (extend by composition, never edit).
23
+ - `OVERLAYS_OWNED_ELSEWHERE` = the group's `overlays_owned_elsewhere`, whenever non-empty: overlays a member opens that another group converts (a shared overlay is a group of its own). The prompt says: import `<file>` from group `<group>` and mount it; never write your own copy under another name; if the file does not exist yet or lacks something this page needs, report it under `shell requests`. Two groups writing one dialog in parallel is how CoolMall got two captcha dialogs, one fixed and one not.
23
24
  - `ATTACHED_NODES`, whenever non-empty (both tiers). Menu → the page's overflow/context menu; ui-state/mode → a state of this page; panel/embedded fragment → a component this page hosts. Mark each one **captured** (it has a `###` state in `REFERENCE_SCREENSHOTS`: convert it against those frames) or **uncaptured** (in `uncaptured[]`: convert it from its source branch per conversion-procedure.md §「source-only 档」, which then applies to that node only; "the data layer is not converted yet" is never a reason to degrade it).
24
25
  - For `source-only` members also pass `SOURCE_HINTS` (= `meta.json.source_hints`), `REACHED_FROM` / `NAVIGATES_TO`, `TEMPLATE_PAGES` + `TEMPLATE_MEASUREMENTS`, and the host-chain source file list (now the primary evidence, so resolve it before dispatch).
25
26
  12. **`LOTTIE_ENTRIES_FOR_THIS_PAGE`**, only when `lottie_by_page[suggested_page_name]` is non-empty: the matching rows verbatim as JSON, used per Phase 4.5. Otherwise omit the block and never mention Lottie.
26
27
  13. **`PRESENTATION` / `HOST_ACTIVITY`**, only when the group carries `presentation` in `conversion_set.json` → `plan` (the app has a shell host; otherwise omit both and say nothing about shells). State it as decided, with the host's `Shell hosts` entry from `项目事实(外壳契约)`:
27
28
  - `shell-content`: the group's pages are content the shell mounts. Prompt rules: no `@Entry`; no chrome of its own (bottom nav, tabs, drawer, persistent player bar); a jump to another fragment of the same host goes through a callback parameter the shell passes in, never `router.pushUrl` and never a `console.info('TODO: navigate')` stub; only a jump to another Activity uses `router.pushUrl`; transitions follow the host's declared `transitions`, and "NOT animated" means no `pageTransition()`. Anything the shell must provide goes under `shell requests`. Phase 4.2's chrome description of the screenshot is evidence about the **shell**, not something to draw again.
28
29
  - `shell`: the entry group. It additionally builds the shell (Step 5.5).
30
+ 14. **`RUNTIME_THEME`**, only when the contract's `theme.runtime_slots` is non-empty. The entry group (stage 0) creates `theme.state_module` (one observable theme state per PARADIGM, each slot initialised to the Android default colour and cited, exposed through getters); every other group carries the entry group in `waits_for` (build_conversion_set.mjs, from the contract), which group_queue.mjs honours even with `overlap_entry`, so the module exists when they start. Every other group's prompt says: read those slots from that module, never `$r('app.color.<slot>')` (a compile-time resource the user's choice never reaches), and never write a theme store of your own (GATE `theme-runtime-color-static`). Without this, the first group that needs the colour has no state to read and falls back to the static resource; CoolMall's tab pages did, and three theme stores appeared.
29
31
 
30
32
  **Tier statement.** For captured pages, the prompt must state that every path in `REFERENCE_SCREENSHOTS` / `REFERENCE_VIEW_TREES` was verified by exact-path reads. It must never claim "there is no screenshot". For a source-only page it states, explicitly: 「这是 source-only 页:没有截图和 view tree(采集阶段未到达,原因见 deferred_human),按 conversion-procedure.md §「source-only 档」执行,不得声称或编造任何像素实测值」. The tier always comes from `meta.json`, never from the agent's own Glob.
31
33
 
32
- ### Step 5.2 — Sub-agent contract (include items 1–6 in every prompt; item 7 comes with `lease`'s message)
34
+ ### Step 5.2 — Sub-agent contract (include items 1–6 and 8 in every prompt; item 7 comes with `lease`'s message, which also repeats item 8)
33
35
 
34
36
  1. **Write each file to disk the moment it is complete.** Never batch writes to the end.
35
37
  2. **Never write scratch, probe or temp files under `${harmony_project_dir}/${ui_module}/src/main/resources/`.** The resource compiler expects only qualifier subdirectories; a stray file fails the whole build with `Error 11211101: Failed to scan resources: invalid path ..., not a directory`.
@@ -52,6 +54,14 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
52
54
  - From that point the interface is frozen. Internal fixes are allowed; a changed signature is not. If it must change, say so in the report: `release` reports every provided file changed afterwards as `provided_changed`.
53
55
  - **Chrome shared by several `@Entry` pages is provided as a host container, not as a bare bar.** With no `shell_hosts` (each destination its own `@Entry` page), the group that writes the persistent chrome (bottom nav, tab strip, player bar) also provides the scaffold that places it: `XxxScaffold({ currentTab, onNavigate }) { @BuilderParam content }` with the `Stack({ alignContent: … })`, floating margins and `hitTestBehavior` fixed inside. Pages fill the content slot and never re-create the placement. A bar plus a usage comment leaves the placement to every page, and a page that writes `Stack()` + `.align(Alignment.Bottom)` on the bar's wrapper gets its nav floating mid-screen (GATE `stack-child-align-noop` now catches that shape; the scaffold removes it).
54
56
 
57
+ 8. **A component written into a shared module (`common/*`, the design system, `uicomponents`) follows its Android component's signature, parameter by parameter.** Any group can be the first to write one, a leader or not, and every later group reuses it as is. One wrong default here repeats on every page. Before the first page uses it, check these four points against the Android source of the component (its `@Composable fun` / custom View):
58
+ - **Nullable callbacks stay optional.** `onClick: (() -> Unit)? = null` becomes `@Event onClick: (() => void) | undefined = undefined`, and the node joins hit testing only when it is set. Never write an empty-function default bound unconditionally with `.onClick`: the component then takes every tap meant for a clickable parent (GATE `event-default-click-swallows-parent`).
59
+ - **No weight or size the source does not have.** `Modifier.weight` lives at the call site in Compose, so the component root gets no `.layoutWeight()` (GATE `layout-weight-on-shared-component-root`). Likewise no `'100%'` on an axis the source wraps.
60
+ - **Slots are @BuilderParam filled with @Builder content.** Callers pass `() => { this.X() }` and nothing else (GATE `builder-param-arrow-inline-component`).
61
+ - **Defaults equal the source's defaults** (padding, colors, maxLines, showDivider …), each written with its `file:line`.
62
+
63
+ Write the result in the report as one line per parameter: `<param>: Android <signature> → <ArkTS declaration>`. When the parent verifies the group, it treats a shared-module file without these lines as a missing report section.
64
+
55
65
  Non-entry prompts also carry the Step 4.4 shell rules. Self-contained prompts carry Scheduling rule 3. Every prompt also forbids running `git` (the parent commits each group, Step 5.4) and dispatching sub-agents (Step 0.1 item 5).
56
66
  ### Step 5.3 — Scheduling: serialize on the actual conflict surface
57
67
 
@@ -128,7 +138,7 @@ Only true dependencies make a group wait (`after`, lane, `reuse_from`, `template
128
138
  3. **Verify** every group in `summary.returned_unverified` (below). Then update `batch_progress.json`, run `Q verified … --group <GID>` (only a `returned` group: never mark a group done in `batch_progress.json` by hand to close it), and, when `harmony_project_dir` is in a git work tree, `node <this skill>/scripts/group_commit.mjs ${harmony_project_dir} --group <GID>`. The commit takes only the files that group changed and holds other unsettled groups' predicted writes; a file shared by several groups goes to the first one committed.
129
139
  - `missing` non-empty: `Q requeue … --group <GID> --resume --message "<missing files; written files are read-only context>"`.
130
140
  - Verification failed: `Q requeue … --group <GID> --message "<what to fix>"`. If the group's bound session had stalled, this resumes that session automatically. Use `--fresh` only after that session's completion notice has arrived.
131
- 4. **Capture track** (Step 3.2) work, if any. Then `Q wait ${harmony_project_dir} [--job run_cycle]` (bound reviewers are followed; `--answers` only for unbound files). It returns within seconds of a report, a silent unit, an ended job, or complete answers. It also returns when a free slot has a ready or backfill unit. Otherwise it returns after 9 min. Give the shell call a timeout above that (e.g. 600000 ms). Never sleep in a loop instead.
141
+ 4. **Capture track** (Step 3.2) work, if any. Then `Q wait ${harmony_project_dir} [--job run_cycle]` (bound reviewers are followed; `--answers` only for unbound files). It returns within seconds of a report, a silent unit, an ended job, complete answers, or an evidence-intake ack that now covers every file (`reasons: ["intake"]`, `intake_acked: [GID…]` — release those groups). It also returns when a free slot has a ready or backfill unit. Otherwise it returns after 9 min. Give the shell call a timeout above that (e.g. 600000 ms). Never sleep in a loop instead.
132
142
  4. **What `release` decides** (no user involved):
133
143
  - a group's written files are its predicted writes plus the `.ets` files its report names. A file named in the report counts even at another path than predicted, and even when it was written before a resume. `written` / `missing` in the row come from this;
134
144
  - a network failure or stall resumes the same session, at most 3 attempts. A second stall of the same session fails the group (a fresh dispatch starts the count at 0), and the row carries `needs: 'human'` with a `hint`. Do not requeue it fresh while that session may be alive: resume it (`Q requeue` does so by default) or wait for its completion notice.
@@ -161,7 +171,7 @@ Parent-side re-verification checks the sub-agent's claims independently of its n
161
171
 
162
172
  | Check | How |
163
173
  |---|---|
164
- | Lexical checks, in one call | `node ./scripts/phase5_check.mjs ${harmony_project_dir} --group <GID>` (or `--files` with what the report lists). It covers GATE for the group's files, unresolved `$r`/`$rawfile`, misnamed / missing / over-budget `EVIDENCE()`, forbidden patterns (`.position(`/`.offset(`, `` $r(` ``, V1 decorators in a V2 project) and brace balance. With `--group` it also runs `[text_color]`. That compares each measured text colour in the group's `measure_pack.json` files with the colour the matching `Text`/`Span` actually renders; `text-color-unset` / `-mismatch` block. Exit 1 = blocking finding; a static-checker run with no verdict (non-0/1 exit, no report, 0 files scanned) is `[static] …` and blocks too. `--group` covers the predicted writes plus every `.ets` named in the group's report and in its `provides/` markers, so a leader's shared files need no separate `--files` run |
174
+ | Lexical checks, in one call | `node ./scripts/phase5_check.mjs ${harmony_project_dir} --group <GID>` (or `--files` with what the report lists). It covers GATE for the group's files, unresolved `$r`/`$rawfile`, misnamed / missing / over-budget `EVIDENCE()`, forbidden patterns (`.position(`/`.offset(`, `` $r(` ``, V1 decorators in a V2 project) and brace balance. With `--group` it also runs `[text_color]`. That compares each measured text colour in the group's `measure_pack.json` files with the colour the matching `Text`/`Span` actually renders; `text-color-unset` / `-mismatch` block. It also runs `[icons]`: every visible ImageView in `measure_pack.json` `icon_inventory` (sampled at the drift-corrected position) needs a `// ICON: <key>` marker on its Image/SymbolGlyph line; `icon-uncovered` / `icon-omit-refused` / `icon-marker-detached` block, and `[drift]` lines mean the screenshot was captured mid-animation. Exit 1 = blocking finding; a static-checker run with no verdict (non-0/1 exit, no report, 0 files scanned) is `[static] …` and blocks too. `--group` covers the predicted writes plus every `.ets` named in the group's report and in its `provides/` markers, so a leader's shared files need no separate `--files` run |
165
175
  | No SDK API that does not exist | GATE `sdk-api-nonexistent` (inside the call above) must be 0. These are compile errors the lexical items cannot see.
166
176
  | Claimed output files exist and are complete | file exists, non-trivial length, no truncated tail |
167
177
  | Cited `file:line` really contains the claimed fact | read that exact line; never accept a citation on faith |
@@ -180,6 +190,8 @@ When a full build shows an ArkTS error of the form "Property X does not exist on
180
190
 
181
191
  Never add an entry you cannot confirm in the `.d.ts`: GATE must stay free of false positives.
182
192
 
193
+ **Supplement groups** (incremental feature scope: the group carries `supplement` — SUP / CHG pages that already exist). The pack's "Supplement only" section is the whole job: the sub-agent adds exactly those items to the existing file (resources, texts, controls; for CHG the changed behavior) and touches nothing else — no reformatting, reordering, renaming or restyling of what is there, no backup-and-overwrite. Verifying such a return: the diff of each written file contains only additions / edits for the listed items (anything else is a rejection with the line), each listed item is present (`page_gap.mjs` on the file no longer lists it), and the visual comparison is judged on the supplemented region only — the rest of the page was not converted this round and is not graded against the capture.
194
+
183
195
  ### Step 5.5 — Wiring (after all groups return, before Step 6, in one background sub-agent)
184
196
 
185
197
  The parent dispatches this section as one background sub-agent (SKILL.md Step 0.1), the way Step 2 is dispatched. The prompt file `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` carries this section verbatim plus its inputs: `harmony_project_dir`, `android_project_dir`, `ui_info_root`, `ALL_MODULES`, `PARADIGM`, the paths of `conversion_set.json`, `shell_contract.json` and every group report (their `registry_requests` and `shell requests`). It forbids `git` and dispatching sub-agents. The agent writes `${harmony_project_dir}/.hometrans/work/wiring.report.md` with every file it edited, every request applied or rejected as a conflict, and every `TODO` route left with its `skip` reason, one line each (a table per kind). A defect it found and fixed gets its cause, evidence `file:line` and fix in a few lines, not a narrative (a long report costs a long turn). Every group has been released by now, so Scheduling rule 7 no longer reserves the registry surface for the parent and the agent edits it directly. "The parent" in the rest of this section means this agent. After the join, the parent re-runs the gate at the end of this section on every file `git status --porcelain` shows as modified or untracked (not only the files the report lists), then commits.
@@ -205,6 +217,16 @@ Then wire navigation to real pages:
205
217
  - every edge whose target is a converted page gets a real `router.pushUrl` or component toggle;
206
218
  - register each target in `main_pages.json`.
207
219
 
208
- A remaining `TODO` route is legitimate only when its target is a `skip` row; cite the reason in the report. Also apply the `shell requests` the groups reported. A request that sets shell or shared **structure** state (chrome visibility, badge, drawer, selected tab, AppStorage flag) is applied with the **Android source's initial state**, never a group's mock data-state. Example: a player bar that a source-only group mocked as visible, set as the shell default, appears on a captured home page whose reference has none. A request that mocks **content data** on a shared VM/Model (list items, forecast entries) is applied when every captured page that reads the field shows it populated in its reference, and rejected otherwise. "Pages that read the field" come from the Android source: every observer / collector / binding of that field, mapped to its UTG page, not only the pages of the group that asked. Several groups may request the same field; apply it once, in the VM/Model file, with values that reproduce every reader's reference. Either way, check it against every captured host page's reference screenshot first.
220
+ A remaining `TODO` route is legitimate only when its target is a `skip` row; cite the reason in the report. Also apply the `shell requests` the groups reported. **They come as a ledger**: the parent runs `node scripts/shell_requests.mjs collect --hp ${harmony_project_dir}` before dispatching this step and pastes its table into the prompt. The report answers every id `<GID>#<n>` on its own row with `applied`, `rejected: <reason>` or `deferred:<stage>: <reason>`. A row answered by a different request ("via unification (below)") is not an answer: say what this request asked and what now does it. `deferred` is for work another stage owns (persistence, a data-layer call); the UI-visible half is still applied here. Example: G003 asked for a runtime theme colour, the row was ticked by another group's store merge, and four tab pages kept the static colour. A request that sets shell or shared **structure** state (chrome visibility, badge, drawer, selected tab, AppStorage flag) is applied with the **Android source's initial state**, never a group's mock data-state. Example: a player bar that a source-only group mocked as visible, set as the shell default, appears on a captured home page whose reference has none. A request that mocks **content data** on a shared VM/Model (list items, forecast entries) is applied when every captured page that reads the field shows it populated in its reference, and rejected otherwise. "Pages that read the field" come from the Android source: every observer / collector / binding of that field, mapped to its UTG page, not only the pages of the group that asked. Several groups may request the same field; apply it once, in the VM/Model file, with values that reproduce every reader's reference. Either way, check it against every captured host page's reference screenshot first.
221
+
222
+ **Merging duplicate implementations.** When two groups wrote the same component (same Android source, different file names), the kept file is the **union** of both, never one side taken as a whole: list each side's exported members and behaviour branches (decode, loading state, error path, parameters) and keep the working one of each. Deleting the other file needs one report line `deleted <file> → merged into <file>: <what each side had, what was kept>`. Example: G029 had fixed the captcha decode in its copy, G033's copy still passed a Uint8Array, and this step kept G033's copy whole because it was "calibrated to capture" and deleted the fix.
223
+
224
+ **Theme closure.** When the contract's `theme.mode` is not `static`, wiring is where the theme takes effect, so it is done here, not left half-wired. Close each of these and list it in the report's `runtime_risks` table (`item | file:line | done / deferred:<stage>: <reason>`):
225
+ - every write of the theme mode (settings page, startup read) reaches `getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK / _LIGHT / _NOT_SET)`;
226
+ - the entry ability reads the stored mode on launch and applies it again (`setColorMode` is not persisted);
227
+ - every runtime slot in `theme.runtime_slots` is read from `theme.state_module` on every page that shows it.
228
+ A choice that only lives in this agent's reasoning ("dark mode is handled by resource qualifiers") is not a decision: GATE `theme-mode-closure` fires when a mode is stored and nothing calls `setColorMode`.
229
+
230
+ **Global state contract.** For every `AppStorageV2` / `PersistenceV2` key shared across modules, write one row in the report: `key | class | owning module | connect sites`. The class and its connect (with a default creator) live once, in a shared HAR under `common/*` that every user imports. A feature module does not declare its own copy of the class to avoid importing the entry HAP: a same-named class in another file is a different type for the same key, and leaving the key uncreated to dodge that makes the first connect without a creator crash. GATE `appstoragev2-connect-creator` covers both shapes.
209
231
 
210
232
  **Gate:** run `scripts/arkts_static_check.ts` (Step 6.1 command). `orphan-component` must be **zero** before Step 6. An exported struct that no file imports or instantiates can never render: every file is legal and the build is green, but every trigger is dead. Also, **every GATE in a file this step edited must be zero**. Wiring is new code that no group's Phase 5 ever saw.