@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
@@ -5,15 +5,20 @@ import os from "node:os";
5
5
  import path from "node:path";
6
6
 
7
7
  import {
8
+ ALLOWED_CATALOGS,
8
9
  DOCS,
10
+ DOCS_API,
9
11
  RETRY_DELAYS_MS,
10
12
  _impl,
11
13
  _reset,
12
14
  cleanOutput,
15
+ isAllowedDocId,
13
16
  list2cmdline,
14
17
  main,
15
18
  matchEntry,
16
19
  parseSearch,
20
+ searchDocs,
21
+ sliceDoc,
17
22
  } from "../scripts/state_doc.mjs";
18
23
 
19
24
  const realRun = _impl.run;
@@ -70,6 +75,18 @@ test("matchEntry can never return a page from the other paradigm", () => {
70
75
  assert.equal(matchEntry(v1, both).documentId, 'x/\u72b6\u6001\u7ba1\u7406_V1/y/arkts-track');
71
76
  });
72
77
 
78
+ // mihon-more-tab round 1 (devecocli 1.3.12): the V1 -> V2 chapter was renamed to the V1/V2 form
79
+ test("mix keys match the V1 -> V2 chapter under its old and its new name", () => {
80
+ const old = { title: 'x', documentId: 'x/\u72b6\u6001\u7ba1\u7406V1-V2\u8fc1\u79fb\u6307\u5bfc/V1-V2/arkts-v1-v2-migration' };
81
+ const renamed = { title: 'x', documentId: 'x/\u72b6\u6001\u7ba1\u7406V1/V2\u8fc1\u79fb\u6307\u5bfc/V1/V2/arkts-v1-v2-migration' };
82
+ assert.equal(matchEntry(DOCS['mix-migration'], [old]).documentId, old.documentId);
83
+ assert.equal(matchEntry(DOCS['mix-migration'], [renamed]).documentId, renamed.documentId);
84
+ assert.equal(matchEntry(DOCS['mix-migration'], [{ title: 'x', documentId: 'x/other/arkts-v1-v2-migration' }]), null);
85
+ // API keys carry no `under` and still match on the slug alone
86
+ const api = { title: 'x', documentId: 'harmonyos-references/a/b/js-apis-http' };
87
+ assert.equal(matchEntry(DOCS_API['api-http'], [api]).documentId, api.documentId);
88
+ });
89
+
73
90
  test("matchEntry requires the key's under segment", () => {
74
91
  const key = DOCS['v2-local'];
75
92
  assert.equal(matchEntry(key, [{ documentId: 'x/\u72b6\u6001\u7ba1\u7406_V1/y/arkts-new-local' }]), null);
@@ -350,3 +367,231 @@ test("the key table stays identical to the a2h-batch-ui-align copy", async (t) =
350
367
  }
351
368
  assert.deepEqual(DOCS, batch.DOCS);
352
369
  });
370
+
371
+ // ---------------------------------------------------------------------------------------------------
372
+ // Platform API lookups: a second catalogue, a separate cache, and bounded reads.
373
+ // ---------------------------------------------------------------------------------------------------
374
+
375
+ const HTTP_ID = 'harmonyos-references/harmonyos-references/API_ref/System/Network/Network_Kit_network_service/ArkTS_API/ohos_net_http_data_request/js-apis-http';
376
+
377
+ test("api keys resolve from the references catalogue into their own cache", async () => {
378
+ const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-'));
379
+ mockCli({
380
+ search: () => [{ documentId: HTTP_ID, title: '@ohos.net.http (data request)' }],
381
+ read: (id) => `BODY ${id}`,
382
+ });
383
+ const { io, out } = capture();
384
+ assert.equal(await main(['read', 'api-http', '--project', project], io), 0);
385
+ const text = out.join('\n');
386
+ assert.match(text, /state_doc key=api-http catalog=harmonyos-references/);
387
+ assert.match(text, /BODY harmonyos-references\/.*\/js-apis-http/);
388
+
389
+ const apiCache = JSON.parse(fs.readFileSync(path.join(project, '.hometrans', 'work', 'api_docs.json'), 'utf8'));
390
+ assert.equal(apiCache.ids['api-http'], HTTP_ID);
391
+ assert.equal(
392
+ fs.existsSync(path.join(project, '.hometrans', 'work', 'state_docs.json')),
393
+ false,
394
+ 'an API lookup must not touch the state-management cache',
395
+ );
396
+ });
397
+
398
+ test("api slugs match regardless of the case the catalogue publishes", () => {
399
+ // devecocli lowercases the ID tail for several references pages.
400
+ const entry = DOCS_API['api-rdb'];
401
+ assert.ok(matchEntry(entry, [{ documentId: 'refs/ArkData/ohos_data_relationalStore/js-apis-data-relationalStore' }]));
402
+ assert.equal(matchEntry(entry, [{ documentId: 'refs/ArkData/js-apis-data-preferences' }]), null);
403
+ });
404
+
405
+ test("list --api prints every api key with its catalogue", async () => {
406
+ const { io, out } = capture();
407
+ assert.equal(await main(['list', '--api'], io), 0);
408
+ assert.equal(out.length, Object.keys(DOCS_API).length);
409
+ assert.ok(out.every((line) => line.split('\t')[1] === 'harmonyos-references'));
410
+ });
411
+
412
+ test("search returns capped compact hits from an allowed catalogue only", async () => {
413
+ mockCli({
414
+ search: () => [
415
+ { documentId: 'refs/a/js-apis-http', title: 'A', sectionTitle: 'request', snippet: `device: phone\n${'x'.repeat(400)}` },
416
+ { documentId: 'refs/b/js-apis-http', title: 'B' },
417
+ { documentId: 'refs/c/js-apis-http', title: 'C' },
418
+ ],
419
+ });
420
+ const { io, out, err } = capture();
421
+ assert.equal(await main(['search', '@ohos.net.http', '--limit', '2'], io), 0);
422
+ const report = JSON.parse(out.join('\n'));
423
+ assert.equal(report.catalog, 'harmonyos-references');
424
+ assert.equal(report.hits.length, 2);
425
+ assert.equal(report.hits[0].section, 'request');
426
+ assert.ok(report.hits[0].snippet.length <= 200);
427
+ assert.match(report.hits[0].snippet, /\.\.\.$/);
428
+
429
+ await assert.rejects(() => searchDocs('x', { catalog: 'harmonyos-faqs' }), /catalog not allowed/);
430
+ const { io: io2, err: err2 } = capture();
431
+ assert.equal(await main(['search', 'x', '--catalog', 'harmonyos-faqs'], io2), 2);
432
+ assert.match(err2.join('\n'), /--catalog must be one of/);
433
+ assert.equal(err.length, 0);
434
+ });
435
+
436
+ test("--limit reaches devecocli instead of being clamped to ten", async () => {
437
+ const seen = [];
438
+ _impl.which = () => 'devecocli';
439
+ _impl.sleep = async () => {};
440
+ _impl.run = async (_exe, args) => {
441
+ seen.push(args);
442
+ return { status: 0, stdout: JSON.stringify([{ documentId: 'refs/x/js-apis-http' }]), stderr: '' };
443
+ };
444
+ const { io, out } = capture();
445
+ assert.equal(await main(['search', '@ohos.net.http', '--limit', '20'], io), 0);
446
+ assert.deepEqual(seen.at(-1).slice(-2), ['--limit', '20']);
447
+ assert.equal(JSON.parse(out.join('\n')).hits.length, 1);
448
+
449
+ const bad = capture();
450
+ assert.equal(await main(['search', '@ohos.net.http', '--limit', '21'], bad.io), 2);
451
+ assert.match(bad.err.join('\n'), /--limit must be an integer 1\.\.20/);
452
+ });
453
+
454
+ test("--occurrence needs a positive integer", async () => {
455
+ const { io, err } = capture();
456
+ assert.equal(await main(['read-id', HTTP_ID, '--section', 'request', '--occurrence', '0'], io), 2);
457
+ assert.match(err.join('\n'), /--occurrence must be an integer >= 1/);
458
+ });
459
+
460
+ test("read-id refuses a document id outside the allowed catalogues", async () => {
461
+ let called = false;
462
+ _impl.which = () => { called = true; return 'devecocli'; };
463
+ _impl.run = async () => { called = true; return { status: 0, stdout: '', stderr: '' }; };
464
+ assert.equal(isAllowedDocId(HTTP_ID), true);
465
+ assert.equal(isAllowedDocId('harmonyos-faqs/x/y'), false);
466
+ assert.deepEqual(ALLOWED_CATALOGS, ['harmonyos-guides', 'harmonyos-references']);
467
+ const { io, err } = capture();
468
+ assert.equal(await main(['read-id', 'harmonyos-faqs/x/y'], io), 1);
469
+ assert.equal(called, false);
470
+ assert.match(err.join('\n'), /documentId must start with one of/);
471
+ });
472
+
473
+ test("read-id prints only the requested section", async () => {
474
+ const body = [
475
+ '# @ohos.net.http (data request)',
476
+ 'intro',
477
+ '## Importing the module',
478
+ "import { http } from '@kit.NetworkKit';",
479
+ '## createHttp',
480
+ 'createHttp(): HttpRequest',
481
+ '## HttpRequest',
482
+ 'class HttpRequest {',
483
+ ].join('\n');
484
+ mockCli({ read: () => body });
485
+ const { io, out } = capture();
486
+ assert.equal(await main(['read-id', HTTP_ID, '--section', 'createHttp', '--max-lines', '0'], io), 0);
487
+ const text = out.join('\n');
488
+ assert.match(text, /createHttp\(\): HttpRequest/);
489
+ assert.doesNotMatch(text, /## HttpRequest/);
490
+ assert.doesNotMatch(text, /import \{ http \}/);
491
+ });
492
+
493
+ test("sliceDoc truncates a long page and says how to narrow it", () => {
494
+ const page = ['# A', ...Array.from({ length: 50 }, (_, i) => `line ${i}`)].join('\n');
495
+ const out = sliceDoc(page, { maxLines: 5 });
496
+ assert.equal(out.split('\n').length, 6);
497
+ assert.match(out, /truncated at 5 lines; re-run with --section/);
498
+ assert.equal(sliceDoc(page, { maxLines: 0 }), page);
499
+ assert.throws(() => sliceDoc(page, { section: 'nope' }), /section not found: nope; headings: A/);
500
+ });
501
+
502
+ test("sliceDoc returns every overload with the same heading, not just the first", () => {
503
+ const page = [
504
+ '# @ohos.net.http',
505
+ '## HttpRequest',
506
+ '### request',
507
+ 'callback body',
508
+ '### request',
509
+ 'options body',
510
+ '### request',
511
+ 'promise body, the one a coder needs',
512
+ '### requestInStream',
513
+ 'stream body so the last request cannot swallow it',
514
+ ].join('\n');
515
+ const out = sliceDoc(page, { section: 'request', maxLines: 0 });
516
+ assert.match(out, /<!-- section "request" 1\/3 -->\n### request\ncallback body/);
517
+ assert.match(out, /<!-- section "request" 2\/3 -->\n### request\noptions body/);
518
+ assert.match(out, /<!-- section "request" 3\/3 -->\n### request\npromise body/);
519
+ assert.doesNotMatch(out, /stream body/, 'a same-level section still ends the last overload');
520
+ assert.doesNotMatch(out, /## HttpRequest/, 'the parent heading is not part of the section');
521
+ });
522
+
523
+ test("sliceDoc keeps an outer heading once when two levels share its title", () => {
524
+ const page = ['## request', '### request', 'inner body', '## tail', 'x'].join('\n');
525
+ const out = sliceDoc(page, { section: 'request', maxLines: 0 });
526
+ assert.equal(out, '## request\n### request\ninner body');
527
+ });
528
+
529
+ test("--occurrence selects one overload and rejects an out-of-range index", () => {
530
+ const page = ['## request', 'callback body', '## request', 'promise body'].join('\n');
531
+ const second = sliceDoc(page, { section: 'request', occurrence: 2, maxLines: 0 });
532
+ assert.match(second, /<!-- section "request" 2\/2 -->/);
533
+ assert.match(second, /promise body/);
534
+ assert.doesNotMatch(second, /callback body/);
535
+ assert.throws(
536
+ () => sliceDoc(page, { section: 'request', occurrence: 3 }),
537
+ /section request occurs 2 time\(s\); --occurrence must be an integer 1\.\.2/,
538
+ );
539
+ });
540
+
541
+ test("sliceDoc ignores heading-like lines inside fenced code blocks", () => {
542
+ const page = [
543
+ '## request',
544
+ '```ts',
545
+ '# this is a comment, not a heading',
546
+ 'let x = 1;',
547
+ '```',
548
+ 'after the fence',
549
+ '## next',
550
+ 'other',
551
+ ].join('\n');
552
+ const out = sliceDoc(page, { section: 'request', maxLines: 0 });
553
+ assert.match(out, /after the fence/);
554
+ assert.match(out, /# this is a comment/);
555
+ assert.doesNotMatch(out, /other/);
556
+
557
+ // A longer outer fence keeps a shorter inner one from closing it early.
558
+ const nested = ['## request', '````md', '```ts', '# still inside', '```', '````', 'tail', '## next', 'x'].join('\n');
559
+ const nestedOut = sliceDoc(nested, { section: 'request', maxLines: 0 });
560
+ assert.match(nestedOut, /tail/);
561
+ assert.doesNotMatch(nestedOut, /^x$/m);
562
+ });
563
+
564
+ test("sliceDoc keeps a single occurrence byte-identical to the old output", () => {
565
+ const page = ['# A', '## createHttp', 'createHttp(): HttpRequest', '## B', 'b'].join('\n');
566
+ assert.equal(sliceDoc(page, { section: 'createHttp', maxLines: 0 }), '## createHttp\ncreateHttp(): HttpRequest');
567
+ });
568
+
569
+ test("check --api proves the api table resolves and writes the api cache", async () => {
570
+ const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-'));
571
+ const byQuery = new Map();
572
+ for (const e of Object.values(DOCS_API)) {
573
+ const id = `harmonyos-references/x/${e.slug}`;
574
+ byQuery.set(e.query, id);
575
+ byQuery.set(e.slug, id);
576
+ }
577
+ mockCli({ search: (q) => (byQuery.has(q) ? [{ documentId: byQuery.get(q), title: q }] : []) });
578
+ const { io, out } = capture();
579
+ assert.equal(await main(['check', '--api', '--project', project], io), 0);
580
+ const report = JSON.parse(out.join('\n'));
581
+ assert.equal(report.ok, true);
582
+ assert.equal(report.catalog, 'harmonyos-references');
583
+ assert.equal(report.cache, 'written');
584
+ const apiCache = JSON.parse(fs.readFileSync(path.join(project, '.hometrans', 'work', 'api_docs.json'), 'utf8'));
585
+ assert.equal(Object.keys(apiCache.ids).length, Object.keys(DOCS_API).length);
586
+ });
587
+
588
+ // N18: --max-lines caps each occurrence, so the third (Promise) overload is not cut off
589
+ test("sliceDoc caps each occurrence of a repeated section, not the joined result", () => {
590
+ const block = (name, kind) => [`### ${name}`, `${kind} overload`, ...Array.from({ length: 50 }, (_, i) => `line ${i}`)].join("\n");
591
+ const page = ["# http", block("request", "callback"), block("request", "options callback"), block("request", "Promise")].join("\n");
592
+ const out = sliceDoc(page, { section: "request", maxLines: 20 });
593
+ assert.match(out, /section "request" 3\/3/);
594
+ assert.match(out, /Promise overload/);
595
+ assert.match(out, /occurrence 3\/3 truncated at 20 lines; read it whole with --section "request" --occurrence 3 --max-lines 0/);
596
+ assert.doesNotMatch(out, /re-run with --section/);
597
+ });
@@ -42,7 +42,7 @@ Full batch mode also needs (incremental mode: the device is optional; without on
42
42
  | One online device/emulator | `adb devices` lists the serial you will pass (the explorer requires an explicit serial). If the caller passed `ADB_SERIAL` (and `ADB_PATH`), use that device and that adb | ask the user which device; do not pick one |
43
43
  | `homegraph` | `homegraph --version` | Step 3.1 cannot index the source; ask the user |
44
44
 
45
- Both modes also need **background sub-agents** and **pre-approved writes**. Run `node ./scripts/host_env.mjs check` and follow its `action`: `none` means go on; `enable` / `restart` (opencode v1, DevEco) means the user must restart the host session with the flag set, so stop until they do, or continue with blocking waves if they decline. The session must be allowed to edit under `harmony_project_dir` and run `node <this skill>/scripts/*`, `node <a2h-utg-*>/scripts/*` and `adb` without asking, because sub-agents inherit the parent's permissions. Host-by-host detail (version checks, `verify`, the flags): [references/host-dispatch.md](references/host-dispatch.md).
45
+ Both modes also need **background sub-agents** and **pre-approved writes**. Run `node ./scripts/host_env.mjs check` and follow its `action`: `none` means go on; `enable` / `restart` (opencode v1, DevEco) means the user must restart the host session with the flag set, so stop until they do, or continue with blocking waves if they decline (a caller that pre-answers, e.g. the migrate workflow in auto, means declined). The session must be allowed to edit under `harmony_project_dir` and run `node <this skill>/scripts/*`, `node <a2h-utg-*>/scripts/*` and `adb` without asking, because sub-agents inherit the parent's permissions. Host-by-host detail (version checks, `verify`, the flags): [references/host-dispatch.md](references/host-dispatch.md).
46
46
 
47
47
  ### Step 0.1 — How sub-agents are dispatched (every step)
48
48
 
@@ -55,7 +55,7 @@ Every sub-agent of this skill (Step 2 resources, Step 3 reviewers, Step 5 groups
55
55
  5. **Sub-agents cannot dispatch sub-agents**; every prompt says so.
56
56
  5a. **`image_read=false` (Step 1)**: every prompt opens with the `NO_IMAGE` block of `scripts/group_queue.mjs` (`lease` adds it to group messages; the parent adds it to the others), and the parent never opens an image either.
57
57
  6. **Without background sub-agents** each `lease` is dispatched as one blocking wave; say so in Step 7.
58
- 7. **One parent per campaign.** A new session re-runs `group_queue.mjs init`, which keeps results. Before writing anything under `.hometrans/`, check that no other parent is still driving the campaign (`Q init` refuses with `another parent session may still be driving this campaign`); if one may be, ask the user: monitor only, or `init --takeover`. A monitoring session never calls `Q wait` / `lease` / `reap` / `refresh`.
58
+ 7. **One parent per campaign.** A new session re-runs `group_queue.mjs init`, which keeps results. Before writing anything under `.hometrans/`, check that no other parent is still driving the campaign (`Q init` refuses with `another parent session may still be driving this campaign`); if one may be, ask the user: monitor only, or `init --takeover`. A monitoring session never calls `Q wait` / `lease` / `reap` / `refresh`. The previous parent's heartbeat (`.hometrans/queue_parent.json`, written by every queue command and each `wait` poll) settles a crash: when it is older than 10 min and no group or reviewer activity followed it, `init` resumes without `--takeover` and returns that parent's still-running background jobs as `adopt_jobs` (wait on them with `wait --job`; do not restart or kill them). A refusal that a crash could explain ends with `retry_after_s=N`: a session that cannot ask the user re-runs `init` after N s instead of giving up.
59
59
 
60
60
  ## Step 1 — Parse User Request
61
61
 
@@ -73,7 +73,8 @@ Extract from the user's message (natural language, no fixed format):
73
73
  | `reuse_static_workspace` (optional) | A finished static-UTG workspace from this run's `discover.utg_static`. When set, Step 3.1 may copy it into `.hometrans/utg_static` and skip the pipeline. Omit it whenever that discover step did not run | — |
74
74
  | `image_read` (optional) | `true` \| `false`: whether this host's sub-agents can read image files. a2h-app-migrate may probe at bootstrap for a tip only and **must not** pass the result here — when called from migrate, **probe again** (below). Standalone callers may pass it; **when not passed, probe it** before the first dispatch; never assume `true`, and never probe by opening an image in the parent | — |
75
75
  | `MODE` | `full` \| `incremental`, per Mode Routing | existing Harmony version + a named page/module ⇒ `incremental` |
76
- | `scope_request` | **Incremental only, required.** The user's own words for the range | "short-video player page", "all missing pages of the short-video module" |
76
+ | `scope_request` | **Incremental only, required unless `scope_file` is given.** The user's own words for the range | "short-video player page", "all missing pages of the short-video module" |
77
+ | `scope_file` | Incremental only. A `scope.json` already confirmed per feature (a2h-app-migrate `discover.feature_scope`); skips I1–I4 (`references/incremental-scope.md` "Confirmed scope") | `<harmony>/.hometrans/incremental/scope.json` |
77
78
 
78
79
  If `android_project_dir`, `harmony_project_dir` or `apk_path` is missing, **ask the user**, and do not guess. In incremental mode, also ask if no page or module was named; do not fall back to converting everything. `ui_info_root` and `pages` have defaults, so never ask for them.
79
80
 
@@ -92,7 +93,7 @@ Then, once in the parent, resolve these and pass them to every later step and su
92
93
  - **`ALL_MODULES`**: every module under `${harmony_project_dir}` with `src/main/ets` or `src/main/resources`.
93
94
  - **`PARADIGM = V1 | V2`**: run `node ./scripts/detect_paradigm.mjs ${harmony_project_dir}` and use its `paradigm` field as-is (rule: `./references/state-mgmt/_paradigm-selection.md`). Do not grep decorators by hand: the DevEco scaffold `pages/Index.ets` (`@Component` + `@State message`) is not evidence of an existing V1 project, and the script ignores it, so a freshly created project correctly defaults to V2. It is project-level, so sub-agents must not re-detect it.
94
95
  - **References**: always skill-bundled, with no user override: mappings `./references/mappings/` and the state-management cheat sheet `./references/state-mgmt/_decorator-quickref.md` (one file for both paradigms). They are loaded lazily. The official V1/V2 state-management docs are **not** bundled: a sub-agent reads one with `node ./scripts/state_doc.mjs read <key> --project ${harmony_project_dir}` (keys in the cheat sheet's "Deep read" columns, `list` prints them all), and only for what the cheat sheet doesn't cover. Prompts must never tell an agent to read a whole doc directory, and never to run `devecocli docs search` itself.
95
- - **`STATE_DOCS`**: run `node ./scripts/state_doc.mjs check --project ${harmony_project_dir}` once (it resolves every key through `devecocli docs` and caches the IDs in `.hometrans/work/state_docs.json`). On exit 1 (meaning of each message: [references/host-dispatch.md](references/host-dispatch.md)), **stop and ask the user before Step 5**: fix it, or explicitly accept converting without the official docs. Only on that explicit acceptance, tell every prompt `STATE_DOCS=unavailable`; agents then use the cheat sheet alone, and the Step 7 report says so.
96
+ - **`STATE_DOCS`**: run `node ./scripts/state_doc.mjs check --project ${harmony_project_dir}` once (it resolves every key through `devecocli docs` and caches the IDs in `.hometrans/work/state_docs.json`). On exit 1 (meaning of each message: [references/host-dispatch.md](references/host-dispatch.md)), **stop and ask the user before Step 5**: fix it, or explicitly accept converting without the official docs (a caller's pre-answer counts as acceptance). Only on that explicit acceptance, tell every prompt `STATE_DOCS=unavailable`; agents then use the cheat sheet alone, and the Step 7 report says so.
96
97
 
97
98
  ## Step 2 — Resource Conversion
98
99
 
@@ -105,11 +106,13 @@ Run the `a2h-resource-convert` skill with:
105
106
 
106
107
  It decodes the APK and converts strings, colors, drawables, images, Lottie and code-defined vector icons into `${harmony_project_dir}/${ui_module}/src/main/resources/`. It writes the mapping document and resolves `${app_module}` (Android application module) and `${ui_module}` (Harmony target module from `build-profile.json5`, e.g. `entry` or `products/phone`). Take both from its report for later steps.
107
108
 
108
- **Full mode — run it as a background sub-agent (Step 0.1) and go on to Step 3.** Its outputs are not needed before Step 4.4, and a blocking sub-agent would hold the parent the whole time. Write the task above to `${harmony_project_dir}/.hometrans/work/prompts/resources.md` and dispatch one background sub-agent with: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/resources.report.md` and reply with one line `DONE resources`."
109
+ **Full mode — run it as a background sub-agent (Step 0.1) and go on to Step 3.** Its outputs are not needed before Step 4.4, and a blocking sub-agent would hold the parent the whole time. Write the task above to `${harmony_project_dir}/.hometrans/work/prompts/resources.md` and dispatch one background sub-agent with: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/resources.report.md` and reply with one line `DONE resources`." Then bind it so `wait` follows it: `Q review-bind ${harmony_project_dir} --name resources --kind skill-agent --answers <that report path>` (the 5.5 wiring and Step 6 verify agents likewise, with their report).
109
110
 
110
111
  **Join before Step 4.4.** The join is the report file existing; an early host notice only means "check it now". While the file is missing and the agent still runs, do other work. If the agent ended without the file, resume it in its own session once (Step 0.1 item 4), and if that fails, run Step 2 blocking.
111
112
 
112
- **Incremental mode — run it blocking, after I4's user confirmation.** Use that skill's incremental mode (`<a2h-resource-convert skill>/references/incremental-page-migration.md`) with the page source files from I1/I2 as `page_files`. It already handles reference closure, the already-migrated check, never auto-overwriting a same-name-different-value conflict, and merging element JSON; do not re-implement any of it here. It must finish before Step 4.3.
113
+ **Incremental mode — run it blocking, after I4's user confirmation.** Use that skill's incremental mode (`<a2h-resource-convert skill>/references/incremental-page-migration.md`) with the page source files from I1/I2 as `page_files` and `resource_mapping_path` = `${harmony_project_dir}/.hometrans/resource_mapping.md`, so its toolchain step 5 merges this scope's rows into the document Steps 4.3 and 4.4 read. It already handles reference closure, the already-migrated check, never auto-overwriting a same-name-different-value conflict, and merging element JSON; do not re-implement any of it here. It must finish before Step 4.3. Then check that the merge ran: `resource_mapping.md` exists and holds a Mapping Details row for a resource of the scope's pages (grep one name from the run's `converter_mapping.md`). If it does not, re-run that step 5 before Step 4.3, or Step 4.3 finds no Lottie section and the group packs resolve no `$r(...)` for this scope's resources.
114
+
115
+ **Incremental mode — record the static-check baseline before the first write.** The checker scans every module, so the user's own code can already fail a GATE (an orphaned component, a permission without `reason`). Before Step 2 writes anything into `harmony_project_dir`, first run Step 4.4's `shell_contract.mjs` command (`references/step4-prepare.md` "App shell"), then run the Step 6.1 command once with `--write-baseline ${harmony_project_dir}/.hometrans/work/static_baseline.<scope_id>.json` added (`scope_id` from `progress_identity.mjs resume`); it always exits 0. The contract comes first because the theme rules (`theme-color-literal`, `theme-sheet-background-default`, `theme-runtime-color-static`) read `.hometrans/shell_contract.json` and are skipped without it: a baseline recorded without the contract misses the user's pre-existing theme findings, and the first `phase5_check.mjs` then blocks on code this run never touched. Running it this early is safe: it writes only under `.hometrans/`, and its inputs are there (the static UTG is an I1 prerequisite; the theme and shell-host facts come from the Android source alone). Step 4.4 still runs it again, which fills in what only exists later (`conversion_set.json`'s `entry_node` / `launcher_host`, fonts Step 2 adds). Never re-record it later in the campaign, not even on resume: a baseline taken after a group wrote would excuse that group's defects. A new scope (another `scope_id`) records a fresh one under its own name; another scope's file is never read.
113
116
 
114
117
  **Resource-fidelity gate (before Step 5, both modes).** If the report's **Vector Fidelity Issues** section has `error` rows, fix those resources first. A drawable with a dropped `clip-path`, or a stroke-only path given a solid `fill`, keeps its file name, so every page using it passes reference checks and compiles while rendering wrong. If no fresh report exists, run the checker directly (static, no device):
115
118
 
@@ -157,7 +160,7 @@ The parent drives `a2h-utg-explorer`'s `run_cycle.mjs` from its `scripts/` direc
157
160
  ```
158
161
 
159
162
  **Convert while exploring.** Once Step 2's report exists: the first time run Step 4.4's `shell_contract.mjs`, Step 4.3 and `group_queue.mjs init`; every time, build packs and prompts for new groups and run one pass of the Step 5.4 loop before the next reviewer wave. When `finished` is true, run both commands once more without `--exploring`.
160
- 6. **Stop the fixture server** once `finished: true`, or when Step 3.2 is abandoned: `detach.mjs stop ${harmony_project_dir} --name fixture_server`, then `d_prereqs.mjs release --config $C/config.json`.
163
+ 6. **Stop the fixture server** once `finished: true`, or when Step 3.2 is abandoned: `detach.mjs stop ${harmony_project_dir} --name fixture_server`, then `d_prereqs.mjs release --config $C/config.json`. Step 7 repeats this unconditionally (after stopping `run_cycle`), so a run that ends before `finished` does not leave it running.
161
164
 
162
165
  Record for Step 7: coverage from `report.md`, phase states and `skipped` stages, `export_manifest.json` counts, `deferred_human.json`, and `conversion_set.json`'s `summary`.
163
166
 
@@ -173,6 +176,33 @@ Install the APK first (`adb [-s <ADB_SERIAL>] install -r -t <apk_path>`); the ex
173
176
 
174
177
  **Coverage gate.** `pages_captured == 0`: stop and report (incremental mode without a device proceeds source-only and says so in Step 7). Otherwise report `captured / source-only / attached / skipped` before Step 5, and review the `skip` rows once; only the user re-includes a skipped page. Report `pages_tree_only` too: these are captured pages whose every screenshot was FLAG_SECURE-blocked, so only their view trees exist (step4-prepare.md item 6).
175
178
 
179
+ **Evidence quality gate** (`scripts/capture_verify.mjs`). Coverage counts directories; it does not ask whether a frame shows anything. Run it on the ui_info root and report the three numbers:
180
+
181
+ ```bash
182
+ node <this skill>/scripts/capture_verify.mjs <ui_info_root> --write --json <ui_info_root>/capture_quality.json
183
+ ```
184
+
185
+ - `capture_verify` decodes each primary frame and classifies it `rich` / `sparse` / `none` by pixels — the only readiness signal that works for every shell (a hybrid page's view tree is a single WebView node, so the `%1$s` loading test and the explorer's spinner test are blind there). `export_ui_info.mjs` writes the same record into `meta.capture_quality`; this command re-checks captures made by another tool and is what a resume runs before Step 4.
186
+ - `rejected` (`level: none`) = the frame draws nothing below the title/action bars. `build_conversion_set.mjs` demotes the page to `source-only` (`summary.pages_capture_rejected`, `row.pixels: "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) and `group_pack.mjs` prints an **EMPTY FRAME** banner. Do not re-include it by hand: re-capture it in Step 3.2 when a device is available, otherwise convert from source and say so.
187
+ - `sparse` = only a few elements (an empty state, or a page captured before its data arrived). Keep it as a state reference and take the body layout from source; do not treat whitespace as the design.
188
+ - Report both `captured` and `captured - rejected` before Step 5, and list the rejected page dirs in the Step 7 report.
189
+
190
+ **Capture contract gate** (`scripts/capture_audit.mjs`) — a machine gate, not advice. It stops a capture directory from being called `captured` just because it exists. Run it after `capture_verify.mjs` and before Step 4:
191
+
192
+ ```bash
193
+ node <this skill>/scripts/capture_audit.mjs <ui_info_root> \
194
+ --source <android_project_dir> --json <ui_info_root>/capture_audit.json
195
+ ```
196
+
197
+ Exit 0 is required. It checks, per page, that every declared screenshot/view tree exists and is paired, that the primary frame is not blank, that `pages.json` still lists every captured page, and — the failure this gate was written for — that **a page with a vertical scroll container has either proven scroll frames (`scroll_frames > 0` + `scroll_completeness: complete`) or a probe that proved there is no overflow (`not-scrollable`)**. The scroll rule is one function (`scripts/scroll_verdict.mjs`), shared by the audit, `build_conversion_set.mjs` and `group_pack.mjs`:
198
+ - **hard gap** (exit 1, not waivable; `scroll_gap` on the group, `group_queue.mjs` will not lease it): fake completion only, i.e. `complete` with 0 frames (`scroll_false_complete`), `not-scrollable` contradicted by the probe (`scroll_probe_conflict`), or a scroll container with no verdict at all (`scroll_unverified`);
199
+ - **degraded** (exit 0, head `DEGRADED`; `scroll_degraded` on the group, not held, the prompt carries the SINGLE VIEWPORT warning): an honest partial record, i.e. `truncated` (`scroll_truncated`), `not-swept`, `no-effect`, `aborted`, `unreached` (`scroll_partial`). The first viewport is real evidence and the rest comes from the Android source. `--allow-degraded --reason <text>` (or a `capture_waivers.json` entry) records the decision.
200
+
201
+ - Fix a gap with `scripts/capture_fast.mjs`: it jumps the route, waits for content, probes the real scroll element, writes `screenshot_scroll_N.png` / `view_scroll_N.xml`, sets `scroll_completeness`, runs the pixel gate, and merges `pages.json` / `export_manifest.json` without shrinking them.
202
+ - If the page genuinely does not need a sweep, capture the probe (`not-scrollable`). **Hard evidence gaps cannot be waived**: `scroll_unverified`, `scroll_false_complete`, `scroll_probe_conflict`, `blank_capture`, `screenshot_missing`, `view_tree_missing`, `pages_json_gap` and `manifest_gap` must be fixed by capturing frames, recapturing the blank page, demoting it to source-only, or rebuilding `pages.json`. `--allow-degraded` records only degraded findings and non-evidence decisions; `auto` mode may not invent one. A `scroll_unverified` waiver in `capture_waivers.json` is ignored. In `a2h-app-migrate`, a hard gap neither stops the pipeline nor counts as a failed UI batch: `review.ui_batch` records `ui_status=evidence_gaps` with the gap list, and the final report lists it.
203
+ - Membership: `pages.json`, `pages_captured.json` (a `--scope` build's out-of-scope captures) and `export_manifest.json` `pages` + `earlier` all count. Only `page_*` dirs take part in `pages_json_gap` / `manifest_gap`; `activity_*` / `route_*` / `overlay_*` / `mode_*` / `dyn_*` / `manual_*` are read through the Step 4 Glob fallback.
204
+ - `naming_legacy` (e.g. `screen.png`) is a warning: consumers pair by `meta.screenshots`, but `capture_fast.mjs` writes the canonical `screenshot.png`.
205
+
176
206
  ## Step 4 — Prepare the Conversion Set
177
207
 
178
208
  **Read [references/step4-prepare.md](references/step4-prepare.md) in full before starting Step 4.** It holds the page-set priority, exact-path validation, the plan field table, manual grouping, the Lottie index format, and the Step 4.4 pack commands with how to read and pass each pack.
@@ -193,8 +223,8 @@ Progress persists in `${harmony_project_dir}/.hometrans/batch_progress.json`:
193
223
  "scope_id": "<incremental only: stable digest of the confirmed SCOPE member list>",
194
224
  "updated_at": "<ISO timestamp>",
195
225
  "stages": {
196
- "resources": { "done": true, "at": "<ISO>" },
197
- "capture": { "done": true, "mode": "explorer", "at": "<ISO>" }
226
+ "resources": { "done": true, "at": "<ISO>", "scope_id": "<the scope_id it was set under; null in full mode>" },
227
+ "capture": { "done": true, "at": "<ISO>", "scope_id": "<same>" }
198
228
  },
199
229
  "pages": {
200
230
  "page_0001_<A>Activity": { "status": "done", "output": "pages/<A>Page.ets", "summary": "..." },
@@ -206,15 +236,17 @@ Progress persists in `${harmony_project_dir}/.hometrans/batch_progress.json`:
206
236
  ```
207
237
 
208
238
  - `status` is `pending` | `done` | `failed`; `tier` is `captured` | `source-only`.
209
- - **Resume identity** is `harmony_project_dir` + `mode` + `scope_id`.
210
- - All three match: merge the file into the discovered set. `done` pages are skipped in Step 5, and `pending`/`failed` pages are (re)processed.
211
- - Any one differs: this is a different run. Archive the old file as `batch_progress.<scope_id>.json` and start fresh with every page `pending`.
239
+ - **Resume identity** is `harmony_project_dir` + `mode` + `scope_id`. Never compare or compute it by hand: run `node ./scripts/progress_identity.mjs resume ${harmony_project_dir} --mode <full|incremental> [--scope ${harmony_project_dir}/.hometrans/incremental/scope.json]` before Step 2 and act on its one-line JSON. In incremental mode, `scope.json` (I5's format) is therefore written as soon as I4 is confirmed, not at I5. `scope_id` is a digest of the scope's node ids, independent of order; `conversion_set.json` `plan.scope_id` carries the same value, and `group_queue.mjs init` refuses a `batch_progress.json` whose `mode` / `scope_id` differ from the plan's (it never marks pages `done` from another run's file).
240
+ - `action: resume` (all three match): merge the file into the discovered set. `done` pages are skipped in Step 5, and `pending`/`failed` pages are (re)processed.
241
+ - `action: restart` (any one differs; `why` says which): this is a different run. The script has archived the old file (`archived`, named after the old `scope_id`, or `full`) and written a fresh one with every page `pending` and no stages.
242
+ - `action: restore` (full mode only): the identity differs, but an archived full run (`batch_progress.full[.<n>].json`) matches it, as after full → incremental → full. The script archived the current file (`archived`) and put that run back (`restored`); treat it as `resume`, including `skip`. Skipping Step 2 here is what keeps the element JSON the full run's pages merged into.
243
+ - `action: new`: no progress yet; the script wrote one with the identity.
212
244
  - Before skipping a `done` page, check that its `output` still exists, otherwise treat it as `pending`.
213
245
  - A page recorded `source-only` whose node is now `captured` resets to `pending`. It is re-converted against the capture, using the existing `.ets` as the starting point.
214
- - **Stage markers: a resume does not redo finished stages.** The parent sets `stages.resources` after Step 2 succeeds, and `stages.capture` only once capture has ended: full mode when `run_cycle.mjs` returned `finished: true` and Step 3.3 confirmed `pages.json`; incremental mode when I5's capture wrote `pages.json`. A `pages.json` written mid-exploration does not count. On a matching resume:
215
- - `stages.resources.done` and `resource_mapping.md` exists: **skip Step 2**. Re-running it rewrites `resources/**/element/*.json`, wiping the entries page conversions and Scheduling rule 7 merged in, and media the Phase 5 fixes replaced.
216
- - `stages.capture.done` and `${ui_info_root}/pages.json` exists: **skip Step 3 (3.1–3.3)**. A fresh capture renumbers `page_NNNN_*` / re-promotes captures, so the `pages` keys recorded as `done` would point at different snapshots. Without the marker, full mode resumes the campaign (`run_cycle.mjs` continues from `cycle_state.json`) instead of starting over.
217
- - Re-run either stage only on an explicit user request ("re-convert resources" / "re-capture"). Doing so invalidates the resume: archive `batch_progress.json` and start fresh.
246
+ - **Stage markers: a resume does not redo finished stages.** The parent sets them with `node ./scripts/progress_identity.mjs mark ${harmony_project_dir} --stage <resources|capture> [--scope <scope.json>]`, never by editing the file: `resources` after Step 2 succeeds, and `capture` only once capture has ended (full mode when `run_cycle.mjs` returned `finished: true` and Step 3.3 confirmed `pages.json`; incremental mode when I5's capture wrote `pages.json`). A `pages.json` written mid-exploration does not count. Each marker carries the `scope_id` it was set under, so one scope's finished stages never count for another: a second scope always runs its own Step 2 (its `page_files` differ) and records its own static-check baseline. `mark` exits 1 when the file belongs to another run. On a matching resume, `resume`'s `skip` says what to skip:
247
+ - `stages.resources.done` and `resource_mapping.md` exists: **skip Step 2** (`resume` reports it as `skip.resources`, and only for a marker set under this `scope_id`). Re-running it rewrites `resources/**/element/*.json`, wiping the entries page conversions and Scheduling rule 7 merged in, and media the Phase 5 fixes replaced.
248
+ - `stages.capture.done` and `${ui_info_root}/pages.json` exists: **skip Step 3 (3.1–3.3)** (`resume` reports it as `skip.capture`, only for a marker set under this `scope_id`; pass `--ui-info` when `ui_info_root` is not the default). A fresh capture renumbers `page_NNNN_*` / re-promotes captures, so the `pages` keys recorded as `done` would point at different snapshots. Without the marker, full mode resumes the campaign (`run_cycle.mjs` continues from `cycle_state.json`) instead of starting over.
249
+ - Re-run either stage only on an explicit user request ("re-convert resources" / "re-capture"). Doing so invalidates the resume: archive `batch_progress.json` and start fresh. Name the archive `batch_progress.rerun-<ISO time>.json`: a `batch_progress.full*.json` name would be restored by the next full-mode `resume`.
218
250
 
219
251
  If a task-tracking tool is available, create one task per page, with already-`done` pages marked completed. Report the split to the user (e.g. "Resuming: 7 done, 12 remaining").
220
252
 
@@ -228,11 +260,11 @@ If a task-tracking tool is available, create one task per page, with already-`do
228
260
 
229
261
  7. **The shared registry surface is parent-owned while any other group is in flight.** Every concurrently dispatched group's prompt states: do not edit `main_pages.json`, `resources/**/element/*.json`, `oh-package*.json5`, `module.json5` or the ability's `loadContent()`. Instead, list the additions in the report under `registry_requests`. The parent applies each group's requests when that group is released, one group at a time. Merge, never overwrite: an existing name with a different value is a conflict, so keep the existing value and record it in the report.
230
262
  - **5.4** Never dispatch blocking waves. `Q init` once, then one pass per parent turn: release (`Q reap` → `Q release`), lease and dispatch (`Q lease`, pass `message` verbatim, `Q bind`), verify every `returned_unverified` group (`phase5_check.mjs --group`, `Q verified`, `group_commit.mjs`), then `Q wait` with a shell timeout above 9 min. Go on only when `summary.idle` is true, nothing is unverified and `summary.stuck` is empty.
231
- - **5.5** One background sub-agent (Step 0.1) does the wiring: confirm every `registry_requests` was applied, wire self-contained components and shell hosts, and wire navigation from `navigates_to`. No group is in flight any more, so this agent may edit the registry surface of Rule 7. The parent writes `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` (the Step 5.5 procedure of step5-convert.md plus its inputs), dispatches it the way Step 2 is dispatched, and joins on `.hometrans/work/wiring.report.md`. **Gate (parent re-checks after the join):** `orphan-component` is zero, and `phase5_check.mjs --files <every file changed since the last group commit>` has `blocking` 0, before Step 6. Take that file list from `git status --porcelain` (modified and untracked), not from the report: a file the agent edited but left out of the report would otherwise skip the gate and still be committed. The parent then commits the wiring.
263
+ - **5.5** One background sub-agent (Step 0.1) does the wiring: confirm every `registry_requests` was applied, wire self-contained components and shell hosts, and wire navigation from `navigates_to`. No group is in flight any more, so this agent may edit the registry surface of Rule 7. The parent writes `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` (the Step 5.5 procedure of step5-convert.md plus its inputs), dispatches it the way Step 2 is dispatched, and joins on `.hometrans/work/wiring.report.md`. **Gate (parent re-checks after the join):** `orphan-component` is zero, and `phase5_check.mjs --files <every file changed since the last group commit>` has `blocking` 0, and `node scripts/shell_requests.mjs verify --hp ${harmony_project_dir}` exits 0 (every ledger id answered, every deleted `.ets` has its merge line), before Step 6. Run `shell_requests.mjs collect` before writing `wiring.md` and put its table in the prompt; carry every `deferred` row into Step 7's Manual Follow-up TODOs. Take that file list from `git status --porcelain` (modified and untracked), not from the report: a file the agent edited but left out of the report would otherwise skip the gate and still be committed. The parent then commits the wiring.
232
264
 
233
265
  ## Step 6 — Static Check, Build, Smoke Gate
234
266
 
235
- **Steps 6.1–6.4 run in one background sub-agent (Step 0.1), dispatched after the Step 5.5 gate passes and the wiring is committed.** The parent writes `${harmony_project_dir}/.hometrans/work/prompts/verify.md` with this whole Step 6 section, `harmony_project_dir`, `android_project_dir`, `ui_module`, `ALL_MODULES`, `DEVECO_HOME`, `ADB_SERIAL` / `ADB_PATH` and `ui_info_root`, and dispatches it the way Step 2 is dispatched: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/verify.report.md` and reply with one line `DONE verify`." The agent itself runs the `a2h-fix-build-errors` and `a2h-coldstart-smoke-gate` skills (neither dispatches sub-agents). It never asks the user. A login in the smoke gate comes back as its `DEPLOY_ERROR` with the instruction. Where `a2h-fix-build-errors` would ask (no DevEco path resolves, `devecocli` is not on PATH), the agent stops, writes `BLOCKED: <the human step>` at the top of the report and ends; the parent relays that step to the user and resumes the agent once it is done. The prompt forbids `git` and dispatching sub-agents. The report carries, for Step 7: the 6.1 `[GATE]` count of the last run and every `[CANDIDATES]` item reviewed but deliberately not fixed, with the reason; the 6.2 outcome; the 6.3 verdict with evidence path; the 6.4 screenshot paths, the fixes made and what is left; and every file edited.
267
+ **Steps 6.1–6.3 run in one background sub-agent (Step 0.1), dispatched after the Step 5.5 gate passes and the wiring is committed.** The parent writes `${harmony_project_dir}/.hometrans/work/prompts/verify.md` with this whole Step 6 section, `harmony_project_dir`, `android_project_dir`, `ui_module`, `ALL_MODULES`, `DEVECO_HOME`, `ADB_SERIAL` / `ADB_PATH` and `ui_info_root`, and dispatches it the way Step 2 is dispatched: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/verify.report.md` and reply with one line `DONE verify`." The agent itself runs the `a2h-fix-build-errors` and `a2h-coldstart-smoke-gate` skills (neither dispatches sub-agents). It never asks the user. A login in the smoke gate comes back as its `DEPLOY_ERROR` with the instruction. Where `a2h-fix-build-errors` would ask (no DevEco path resolves, `devecocli` is not on PATH), the agent stops, writes `BLOCKED: <the human step>` at the top of the report and ends; the parent relays that step to the user and resumes the agent once it is done. The prompt forbids `git` and dispatching sub-agents. The report carries, for Step 7: the 6.1 `[GATE]` count of the last run and every `[CANDIDATES]` item reviewed but deliberately not fixed, with the reason; the 6.2 outcome; the 6.3 verdict with evidence path; and every file edited.
236
268
 
237
269
  **Join** on the report file, as in Step 2. Then the parent re-runs the 6.1 command once (it takes under a second); a non-zero `[GATE]` means the agent's report is wrong, so resume the agent in its own session with that output. The parent also runs `phase5_check.mjs --files` on every file `git status --porcelain` shows since the wiring commit (`blocking` 0), for the same reason as in 5.5. The parent commits the agent's fixes and writes Step 7 from the report.
238
270
 
@@ -261,6 +293,7 @@ node ./scripts/arkts_static_check.ts \
261
293
  - **Union of roots.** Cross-module facts are resolved over the union of the roots passed: `orphan-component`'s import surface, `entry-route-not-converted`'s `loadContent` target, and resource lookups. Pass every participating module.
262
294
  - **`--android`** enables the immersive cross-check. It greps for `enableEdgeToEdge` / `setDecorFitsSystemWindows` and, when no Harmony component extends into the bars (`ignoresLayoutSafeAreaEdges` / `expandSafeArea`), lists the call sites under `[CANDIDATES]`. This defect is invisible on the Harmony side alone, because an edge-to-edge page looks the same shape as a bar-avoiding one. It also enables the GATE `framework-picker-appearance`: an Android `TimePicker` / `DatePicker` (or their dialogs) in its default clock / calendar mode, converted to the ArkUI wheel of the same name (conversion-procedure.md Phase 4.3 "Appearance Substitution"). Omitted, both checks are skipped silently. Independent of `--android`, `window-fullscreen-layout` and `system-bar-height-read` are GATEs: a window-level full-screen layout, or any read of a bar height, breaks the `system_bars` policy.
263
295
  - **`--resources`** enables three GATE rules that read the *content* of referenced SVGs, because a resource that exists can still render as a black, white or grey box (icon tiering: conversion-procedure.md Phase 4.3). Omitted, they are skipped silently.
296
+ - **`--baseline`** (incremental mode): pass `--baseline ${harmony_project_dir}/.hometrans/work/static_baseline.<scope_id>.json` (Step 2). Findings the project had before this run are printed under `[BASELINE]` and do not count; every other finding gates as usual. Matching ignores line numbers, so edits above an old finding do not turn it into a new one. `phase5_check.mjs` applies the same file by itself when `batch_progress.json` says `mode: incremental`, picking it by that file's `scope_id`. Full mode never passes it.
264
297
 
265
298
  Output has two sections, and the exit code is `1` only when the first is non-empty:
266
299
 
@@ -276,7 +309,7 @@ Once Step 6.1 has zero `[GATE]`, call the `a2h-fix-build-errors` skill with `har
276
309
 
277
310
  ### Step 6.3 — Cold-Start Smoke Gate
278
311
 
279
- Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir`, then record:
312
+ Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir` and `image_read` (Step 1), then record:
280
313
  - the verdict, always, in Step 7's Build status;
281
314
  - **every verdict other than `PASS`** in Manual Follow-up TODOs as well, never only in Build status:
282
315
  - `FAIL_*`: the verdict + evidence path; a human takes over;
@@ -285,6 +318,18 @@ Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir`, then record
285
318
 
286
319
  ## Step 7 — Final Report
287
320
 
321
+ **Teardown first, every exit path.** Before writing the report, and also whenever the run stops early (user abort, a gate stops the run, the session hands off with groups still `pending`), stop the background cycle and then the fixture server, unconditionally:
322
+
323
+ ```bash
324
+ node ./scripts/detach.mjs stop ${harmony_project_dir} --name run_cycle # 1. the cycle first
325
+ node ./scripts/detach.mjs stop ${harmony_project_dir} --name fixture_server # 2. then the server
326
+ node <a2h-utg-explorer>/scripts/d_prereqs.mjs release --config ${harmony_project_dir}/.hometrans/utg_explore/config.json # only if that config.json exists
327
+ ```
328
+
329
+ **Order matters.** On an early exit `run_cycle` may still be running in the background (converting while exploring, a gate stops the run, a hand-off with groups `pending`). Stopping the server under it makes every recovery D recipe hit a closed URL and be recorded as "state cannot be built" (cf. Step 3.2's `check` rule). So end the cycle first: `stop` returns only after the wrapper has recorded the cycle's exit (or after 15 s, when it kills the wrapper too), and it is a no-op when the cycle is not `running`. To keep the cycle's results instead, wait until `detach.mjs status ${harmony_project_dir} --name run_cycle` no longer shows `running`, then stop the server.
330
+
331
+ The fixture server is a `--service` job: nothing else ends it, and Step 3.2.6 fires only on `finished: true`, which a run that converts while exploring may never reach. `stop` is idempotent (`state: unknown` / not `running` → no-op), so call it blindly. A later re-run of Step 3.2 starts the server again on the same port.
332
+
288
333
  Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.md`:
289
334
 
290
335
  0. **Scope of this run** (incremental only) — how `scope_request` was resolved:
@@ -299,6 +344,7 @@ Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.m
299
344
  - `error` for failed pages;
300
345
  - a mark on every page whose evidence was parent-reconstructed.
301
346
  2. **Build status** — the outcomes of Steps 6.1, 6.2 and 6.3, including `[CANDIDATES]` reviewed but deliberately not "fixed", with the reason.
347
+ In incremental mode, also list the 6.1 `[BASELINE]` section: defects that were in the project before this run, left as they were.
302
348
  3. **Manual Follow-up TODOs** — items that need a human, each with enough context to act on:
303
349
  - **Unassigned Lottie animations** — `lottie_by_page["Unknown"]` plus multi-host entries. Give `source`, `target`, `load_path`, `host_android`, `host_layout`, `notes` verbatim, and what is needed (the hosting page and the start/stop trigger).
304
350
  - **Source-only pages awaiting visual calibration** — these were converted from source. List each with its uncertain items (template-borrowed or framework-default values). Re-running Step 3.2 with a fixture, then `build_conversion_set.mjs`, flips them to `captured`, and resume resets them to `pending`.
@@ -317,7 +363,10 @@ Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.m
317
363
 
318
364
  - **Use the right resource.** Find it in `harmony_project_dir`; if it is missing, find it in `android_project_dir` and transfer it. Never invent one.
319
365
  - **Never fabricate a measurement for a source-only page.** No px/vp from "typical" screens, and no colour picked by eye from a template's screenshot for a region the template does not share. Use XML dp, theme/style resolution, template-shared values or framework defaults, each labelled as such.
320
- - **Work through the Common Mistranslations Cheat Sheet table** at the end of Phase 5 before declaring a page done. It is the static backstop; Step 6.4 is the runtime one.
366
+ - **Work through the Common Mistranslations Cheat Sheet table** at the end of Phase 5 before declaring a page done. It is the static backstop; the only runtime check is Step 6.3's cold start.
321
367
  - **Edit `.ets` / `.json5` / `.json` only with the file edit/write tools, or a script that reads and writes UTF-8 explicitly.** Never `Get-Content … -replace … | Set-Content` or `(Get-Content f) -replace` in Windows PowerShell 5.1: it reads UTF-8 without BOM as the ANSI code page (GBK) and writes it back mangled.
322
- - **Incremental mode never overwrites a `placeholder` page without a backup.** Copy the existing `.ets` to `<same dir>/<name>.bak.<timestamp>` before the sub-agent writes, and report the path in §0b. The backup never goes under `resources/` (contract item 2).
368
+ - **Do not hand-roll a route loop; use `scripts/capture_fast.mjs`.** It is the compliant fast path for a hybrid/uni-app shell: route jump, content-stable wait, real scroll probe, every scroll frame, `capture_quality`, and a resumable state file. If Step 3.2's route/task machinery cannot finish, this is the replacement — not a `screencap` + one `uiautomator dump` loop.
369
+ - **Any capture path must pass `scripts/capture_audit.mjs` (exit 0) before Step 4.** That includes a capture made by another tool and a directory the user supplied. The audit is what makes `captured` a verified claim: every declared screenshot/view tree exists and is paired, the primary frame is not blank, `pages.json` still lists every captured page, and no scrolling page claims a completion it cannot prove (a partial sweep is listed as degraded, not hidden). A hand-rolled loop that writes "captured" dirs with blank frames or only the first viewport is how 26 pages were converted from a white rectangle and the `life` page lost its below-fold sections. Waiting for a fixed `sleep` after a route jump is not a readiness test: the frame has to *show* content, and the scroll has to *move*.
370
+ - **Never treat a route jump or a settled view tree as "page rendered".** For a hybrid app the view tree is one WebView node, so "stable" is immediate and "no `%1$s` placeholder" is always true. Readiness for those pages is decided by the frame (pixels), never by the tree.
371
+ - **Incremental mode never overwrites a `placeholder` page without a backup.** Copy the existing `.ets` to `${harmony_project_dir}/.hometrans/backup/<timestamp>/<path relative to the project>` before the sub-agent writes, and report the path in §0b. Backups never go into the source tree: a `.bak` next to the page, or under `resources/` (contract item 2), would be committed with the conversion and shipped in the patch; `.hometrans/` is gitignored.
323
372
  - **Incremental mode may edit `loadContent()` and the app entry, and GATE `entry-route-not-converted` stays in force.** A migrated page that is routable but never reachable from the ability is invisible work. But if reconciling the route would change which screen an existing app opens on, say so and let the user decide.
@@ -8,7 +8,8 @@
8
8
  **The property for that axis has a different name in the two containers and must be chosen by container type**: in a `Column` the horizontal direction is the cross axis → `.alignItems(HorizontalAlign.*)`; in a `Row` the horizontal direction is the main axis → `.justifyContent(FlexAlign.*)`.
9
9
  `.alignItems(VerticalAlign.*)` on a `Row` governs the **vertical axis** and **does not satisfy this item** — it is often perfectly correct in itself (matching Android's `verticalAlignment`/`gravity="center_vertical"`), which is exactly why it is so easily let through as "alignment already written": a correct vertical setting masks a missing horizontal one, and neither looks wrong on its own. The real miss looked like date separator rows and section titles centered while Android had them left-aligned. Criterion: in a full-width `Row` containing a shrink-wrapped `Text`, you must be able to point to the property that pins it to the left. **ArkUI `Column` centers by default, while Android `LinearLayout`/Compose `Column` default to start** — when Android writes no gravity, it must be explicitly translated to `.alignItems(HorizontalAlign.Start)`; "not writing it" on both sides is not the same. Not declaring it explicitly without stating a basis is a failure (when centering is really intended, a stated reason passes, e.g. an empty-state illustration or an icon inside a button). The typical sign of missing this item is section titles and list item text centered as a whole while Android left-aligns them, and the attribute-by-attribute comparison confirms it as "correctly translated".
10
10
  **Alignment depends on the parent container, not just the container holding the Text**: as soon as a `Column` has a **shrink-wrapped** child container (a `Row`/`Column`/`Stack` with no `.width()` / `.layoutWeight()`, typically an "icon + title" row), what determines its horizontal position is the **parent** `Column`'s `alignItems`; the child `Row`'s own `justifyContent(FlexAlign.Start)` governs only the **inside** of the Row, not the Row's position in its parent. Real miss: the card title row `Row() { Image; Text }` was reported as `container-align-unset`, the answer "a Row's main axis defaults to Start" was correct in itself, so it was let through, while what actually centered it was the card `Column` with no `alignItems`. Fix: give the parent `Column` an explicit `.alignItems(HorizontalAlign.Start)`, or give the child row `.width('100%')`. Checker CAND `column-shrink-child-centered`.
11
- **`Scroll`'s `.align()` determines where the content sits when it is shorter than the viewport**; the default is `Alignment.Center`. **`Alignment.Start` = left + vertically centered, not top-left**. Content in Android `ScrollView`/`NestedScrollView`/`RecyclerView` starts at the top by default, so this should usually be `Alignment.TopStart` (or `Top`/`TopEnd`). Exceptions need an Android basis: `fillViewport="true"` + child layout `gravity="center"` (login pages, centered empty-state pages) corresponds to `Alignment.Center`; `stackFromEnd`/`reverseLayout` (chat pages anchored to the bottom) correspond to `Bottom*`. Checker: `Alignment.Start` reports GATE `scroll-align-not-top` (almost certainly mistaken for top-left); other non-Top values report CAND `scroll-align-not-top`, and an unset value reports CAND `scroll-align-default-center`; with one of the bases above, just state it.
11
+ **`Scroll`'s `.align()` determines where the content sits when it is shorter than the viewport**; the default is `Alignment.Center`. **`Alignment.Start` = left + vertically centered, not top-left**. Content in Android `ScrollView`/`NestedScrollView`/`RecyclerView` starts at the top by default, so this should usually be `Alignment.TopStart` (or `Top`/`TopEnd`). Exceptions need an Android basis: `fillViewport="true"` + child layout `gravity="center"` (login pages, centered empty-state pages) corresponds to `Alignment.Center`; `stackFromEnd`/`reverseLayout` (chat pages anchored to the bottom) correspond to `Bottom*`. **`align` is a universal attribute (API reference "Location"); the docs list `Scroll` among the components it takes effect on, default `Alignment.Center`** — `align` is missing from `scroll.d.ts` because it lives in `CommonMethod`, not because Scroll lacks it, so that is no reason to skip it. "The content always exceeds the viewport" is no reason either: when the content comes from `ForEach`/`LazyForEach`/`Repeat`, a short list (after filtering, a single first page, back from the empty state) is the normal case. Checker: `Alignment.Start` reports GATE `scroll-align-not-top` (almost certainly mistaken for top-left); other non-Top values report CAND `scroll-align-not-top`; no `.align()` over data-driven content reports GATE `scroll-align-default-center`, downgraded only by `// SCROLL-CENTER: <basis>` above the Scroll (EVIDENCE text does not close it); static content without `.align()` is CAND.
12
+ **A horizontal `Scroll` (`LazyRow` / `HorizontalScrollView`) is about the horizontal position**: without a width it shrinks to its content, and a parent `Column` (default `HorizontalAlign.Center`) pushes the whole row to the middle ("My footprints" centered with one or two items while Android starts at the left). Write `.width('100%').align(Alignment.Start)` (horizontally `Start` = left + vertically centered, which is what is wanted), or `.alignItems(HorizontalAlign.Start)` on the parent `Column`. GATE/CAND `hscroll-centered-in-column`.
12
13
  **Per-child alignment of Compose `Box` children (`Modifier.align(X)`)**: when a child inside `Box(contentAlignment = C)` writes `Modifier.align(X)` (X ≠ C), that child is placed by X and the rest by C. ArkUI `Stack` has no per-child alignment, and a child's `.align()` only arranges its own content, so X must be expressed separately: wrap that child in a container the same size as the Stack and arrange it by X inside that container (`BottomCenter` + `padding(bottom = 5.dp)` → `Column() { … }.width('100%').height('100%').justifyContent(FlexAlign.End).padding({ bottom: 5 })`; `CenterStart` → `Row()…justifyContent(FlexAlign.Start)`), or position it with `.position` / `.markAnchor`. **Leaving only the `padding` turned into a one-sided `margin` does not count as translating the alignment**: the Stack still centers it, and it sits on top of the centered siblings. The "Box children with their own alignment" section of the group pack lists every occurrence in this group (`file:line`); for each one, this item gives the HarmonyOS-side `file:line` and the form used. Checker: an explicit `alignContent: Alignment.Center` goes through GATE `stack-overlay-default-center` / `stack-child-align-noop` just like an unwritten one.
13
14
 
14
15
  ### Phase 5 "Horizontal Inset Evidence" — criteria
@@ -26,6 +27,9 @@
26
27
  | **Pinning to the bottom inside `Stack()` with the child's `.align(Alignment.Bottom)`** | Treating `.align` as "this node's alignment within its parent" | `.align` only arranges the child's own content; `Stack` defaults to `alignContent: Center`, so the bottom navigation floats in the middle of the screen | Pinning to the bottom/edge is decided by `Stack({ alignContent })`; cross-page shared chrome uses a host container component (step5-convert.md contract item 7). GATE `stack-child-align-noop` |
27
28
  | **Copying a chrome call from another page but missing the parent `Stack`'s `alignContent`** | Copying only `Bar(...).margin({ bottom })` and writing the root container as `Stack()` | Under the default Center, `margin.bottom` only moves it up a few vp and the navigation bar stays in the middle of the screen; every page that copied the same call is like this | Copy `Stack({ alignContent })` together with it; when the host Activity draws only one chrome, build a shell (step5-convert.md Step 5.5). GATE `stack-overlay-default-center` / `shared-chrome-placement-drift` |
28
29
  | **Container alignment defaults are opposite on the two sides** | ArkUI `Column`/`Row` center by default, Android defaults to start; when neither side writes it, they read the same | Shrink-wrapped `Text` and titles are centered as a whole while Android left-aligns them | → Phase 5 "Text Alignment Evidence" (including the parent-container paragraph); CAND `container-align-unset` / `column-shrink-child-centered` |
30
+ | **ConstraintLayout / MotionLayout layered into a bare `Stack()`** | A collapsing header or stacked backgrounds are awkward in `RelativeContainer`, so they become a `Stack` of "background layer + scroll layer + header overlay"; every in-layer coordinate is written with `.position` from view.xml and checks out one by one | Android children are anchored to the top by constraints, while `Stack` defaults to `alignContent: Center` (Stack API doc): an overlay that does not fill (a custom component whose root is `Stack().height(346)`) is centred vertically as a whole, every inner `.position` coordinate moves down by about (Stack height − component height)/2, and the header text covers the content below | Root `Stack({ alignContent: Alignment.TopStart })`; or `.position({ x: 0, y: 0 })` at the call site; or make the component root `.width('100%').height('100%')`. Check where the layer itself lands before checking the coordinates inside it. GATE `stack-custom-child-default-center` |
29
31
  | **Compose `Box` translated as a bare `Stack()`** | The component mapping table says "Box → Stack", and when neither side writes alignment they read the same | Compose `Box` defaults to top-left, `Stack` to center: top-bar icons and badges end up in the middle of the screen/card | `Box()` → `Stack({ alignContent: Alignment.TopStart })`, `Box(contentAlignment = X)` → X; GATE `stack-bar-default-center` |
30
32
  | **`Modifier.align(X)` of a `Box` child dropped** | After mapping to `Stack({ alignContent: C })`, only `.padding(…)` is left on the child, and it gets casually translated as a one-sided `margin` | Labels/badges stay in the middle of the Stack, overlapping the centered numbers and icons ("UV" on top of the number) | Wrap the child in a `Column`/`Row` the same size as the Stack and arranged by X, or use `.position`/`.markAnchor`; check one by one against the group pack's "Box children with their own alignment"; GATE `stack-overlay-default-center` |
31
33
  | **`Alignment.Start` taken as "top-left"** | In ArkUI's nine-grid, `Start` = left + vertically centered; top-left is `TopStart` | `Scroll` content shorter than the viewport floats in the middle of the screen | → the `Scroll` paragraph of Phase 5 "Text Alignment Evidence"; GATE `scroll-align-not-top` |
34
+ | **Vertical `Scroll` left without `.align()` because "the SDK has no Scroll.align" or "the content always exceeds the viewport"** | `align` is not in `scroll.d.ts` (it is in `CommonMethod`); the reference frame happens to be a full page of data | With few items the whole list floats mid-viewport (category goods start at left-middle, Android at top-left) | `.align(Alignment.TopStart)`; data-driven content is GATE `scroll-align-default-center`, downgraded only by `// SCROLL-CENTER:` |
35
+ | **`LazyRow` translated to an unsized horizontal `Scroll`** | Only the scroll direction was considered, not the width; the parent card `Column` has no `alignItems` | Less than a screen of content sits centered, Android starts at the left | Horizontal Scroll `.width('100%').align(Alignment.Start)`; GATE `hscroll-centered-in-column` |
@@ -24,6 +24,7 @@ Every row of the table below gives the wrong translation and its consequence —
24
24
  | Negative margin (e.g. `layout_marginTop="-30dp"`) | Keep it negative: `.margin({top:-30})` or `.offset({y:-30})`, and explain its purpose in the report | Dropped → this block and everything after it shift down, common in "top region moved up to hug the status bar" scenarios |
25
25
  | The element's own `margin` | Stays on **that element** | Promoted to the parent's `padding` → affects every sibling, pushing them all together |
26
26
  | `layout_constraintStart_toEndOf="parent"` (pushed out of the visible area) | Not rendered in that state, or `.visibility()` as needed | Translated as an ordinary constraint → the element wrongly stays on screen |
27
+ | ConstraintLayout card with `layout_height="wrap_content"` (children `Top_toTopOf="parent"` / `Bottom_toBottomOf="parent"`, e.g. "icon vertically centred + two text lines on the right") | `Row { Image; Column { title; value } }` (`alignItems(VerticalAlign.Center)` gives the vertical centring), corner elements with `Stack` + `Alignment`; when a `RelativeContainer` is really needed, anchor vertically only on siblings (the first child has no vertical alignRules and sits at the top by default) and write `.height('auto')`, or write the height measured in the reference view tree | Translating each alignRule that anchors top/bottom on `'__container__'` → RelativeContainer doc: when a child is anchored to the container in that direction, `"auto"` / `wrapContent` **does not take effect** and the height counts as unset (the container height and the child layout depend on each other in a cycle, FAQ faqs-arkui-318); inside a Scroll the container is stretched far taller than the Android content height. Adding `.height('auto')` does not fix it either. GATE `relative-container-unsized-in-scroll` |
27
28
  | Two-dimensional constraints: an element shares a vertical interval with only **some** of its siblings (e.g. the bottom-right "arrow + difference" chain hugs only the `parent` bottom and is `start_toEndOf` the second text line; the right side of the first-line title is unconstrained) | Keep the two-dimensional relation: `RelativeContainer` + `.alignRules()`; or a `Stack`, placing the corner element separately with `Alignment.BottomEnd` etc. and letting the main `Row/Column` fill | Split into a one-dimensional `Row [icon][Column(title, value).layoutWeight(1)][corner element]` → the corner element takes a column over the **whole height**, the title's available width shrinks, the single-line `wrap_content` title wraps onto two lines and the card gets taller; every copied attribute is right, and compilation and checks all pass |
28
29
  | **Fixed dp size** + `layout_constraintEnd_toEndOf="parent"` + `layout_marginEnd` (right-anchored; `Bottom_toBottomOf` likewise means bottom-anchored) | Express it as an **alignment relation**, not coordinates: `RelativeContainer` + `.alignRules()` (see `ConstraintLayout → RelativeContainer` in the layout mapping table); or a parent `Stack` with `Alignment.TopEnd` + child `.margin({right})`; or derive `x = parentWidth - marginEnd - childWidth` from the parent's measured width | An absolute offset computed at the reference resolution written as `.position({x: <constant>})` → the constant **only holds at the reference device's width**; on a narrower screen the element's right side **moves out of the visible area and is clipped**. The size dimension is unambiguous (the dp is explicit), so this is the easiest to miss; or the anchoring is carried by a container that fills the parent (`width('100%')` + `height('100%')` + edge alignment) → visually correct, but it becomes the **topmost** of its siblings and swallows hit testing for every clickable element beneath it (`hitTestBehavior` at its default responds to hits), so all clicks in that area stop working |
29
30
 
@@ -65,6 +66,8 @@ and compare it with the intervals of the other siblings in the same `Stack` and
65
66
  | `.width('100%')` combined with `.margin({left,right})` | Intuition says `100%` automatically subtracts the margin | Actual width = parent width + left/right margin, **overflowing on the right**, rounded corners clipped | Search for `width('100%')` and left/right `margin` on the same element; switch to parent `padding` or `layoutWeight(1)` |
66
67
  | **`0dp` + `layout_weight` translated as several siblings all `width('100%')`** | In evenly split tabs each one "fills its own cell", and each looks right on its own | The first sibling takes the whole row and the rest are pushed off screen | Weights always use `.layoutWeight(n)`, `@Builder` root nodes too. GATE `main-axis-pct-siblings` |
67
68
  | **Cards in a vertical `LinearLayout` given no width** | Android child Views are full width even without LayoutParams, so no `MATCH_PARENT` is visible in the source | Children of an ArkUI `Column` shrink to content by default: each card has a different width with ragged right edges, and the whole page looks "messily laid out" | Cards get `.width('100%')`; for tree-only pages check against the group pack's geometry table (`full` rows). GATE `card-width-wraps` |
69
+ | **`wrap_content` card translated as an unsized `RelativeContainer` whose children anchor the container's top and bottom** | Every two-dimensional constraint is translated into a RelativeContainer (the "Two-dimensional constraints" row of the table above), on the assumption that it sizes to its content like ConstraintLayout | The card is stretched inside the Scroll (weather home sunrise/sunset and info cards); `.height('auto')` is just as ineffective while children anchor the container vertically | → the "ConstraintLayout card with `layout_height="wrap_content"`" row of the table above. GATE `relative-container-unsized-in-scroll` |
70
+ | **Whole-card mask written as `.overlay('<colour>')`** | After `percent-height-in-scroll` blocks the Stack mask's `'100%'`, the mask moves to overlay on the assumption that the string is a colour | The colour value is drawn as text at the card's top-left corner ("transparent", "#66FFFFFF") and no mask is painted | `.overlay(@Builder)`, builder root `width/height('100%')` + `backgroundColor` + `hitTestBehavior(HitTestMode.Transparent)`. GATE `overlay-string-color` |
68
71
  | **WRAP parent + MATCH child translated as a `constraintSize({ minHeight })` parent + `'100%'` child** | Android's two-pass measurement makes a MATCH_PARENT child inside a WRAP_CONTENT parent fall back to the content height, so the attribute-by-attribute translation looks equivalent | ArkUI resolves percentages against the upper constraint, roughly the viewport inside a Scroll, so the component is stretched very long; a mistake in a shared component breaks several places at once | Remove the child's `'100%'` and use `alignItems` + `min…`. GATE `pct-in-auto-size-parent` |
69
72
  | Using the parent's size as the child's constrained size | Android `0dp` + constraints taken as "fill the parent" | The region is too big/tall and squeezes the content after it | Compare the measured size in the reference view tree with the parent; if they differ, `'100%'` must not be used |
70
73
  | Negative margins dropped | A negative value looks like a typo | The whole block of content moves down (common for tops hugging the status bar) | Grep `margin.*="-` in the Android layouts and confirm each one has been translated |
@@ -77,4 +80,6 @@ and compare it with the intervals of the other siblings in the same `Stack` and
77
80
  | **Two-dimensional constraints split into three columns of a one-dimensional `Row`** | ConstraintLayout writes it all in one container, and the handiest translation is "left icon / middle text / right badge" | An element that occupies only one corner eats width over the whole height, the single-line title wraps and the card gets taller | → the "two-dimensional constraints" row of the ConstraintLayout rewrite table; `RelativeContainer` or `Stack` + corner alignment |
78
81
  | A fill container carrying a bottom/right anchor swallows the clicks beneath it | It both satisfies "no hard-coded coordinates" and is visually correct | Clickable elements beneath it **do not respond to taps**, with no console output either | → Phase 5 "Interaction Reachability Evidence": confirm each fill container is interactive or has `hitTestBehavior(HitTestMode.None)` set |
79
82
  | **Inverted `padding` semantics**: Android's "N dp icon + P dp padding" translated literally as `.width(N).padding(P)` | Android's `padding` is **outside** the declared size (total footprint N+2P), ArkUI's is **inside**. In an attribute-by-attribute translation the two sides read exactly the same, which looks most "faithful" | The content area is squeezed to `N-2P` (**0** when P≥N/2) — the element **takes up space as usual but is completely invisible**. Neighboring elements are positioned correctly; only it disappears; compilation, `[GATE]` and resource reference checks all pass | List every element that has both `.width()/.height()` and `.padding()` and check whether the declared value **already includes** the padding (Android `src` N dp + `padding` P dp ⇒ ArkUI should write `N+2P`). Styles like `Image` + round icon button ("icon + inner padding") are hot spots. A literal size whose padding is ≥ the size is caught by GATE `padding-consumes-fixed-size`; non-literal sizes and partial shrinking still need a manual check |
83
+ | **`BasicTextField` translated to a fixed-height `TextInput` with no `.padding()`** | Compose `BasicTextField` / an undecorated `EditText` have no inner padding, so copying `height(24)` looks 1:1 | ArkUI `TextInput`/`TextArea` default padding is 8vp top/bottom and 16vp left/right (12vp top/bottom in underline mode): a 24vp height leaves 8vp for 16fp text, so **the typed text shows only its top half**, and the left edge gains 16vp | Map to `.padding(0)` (the docs suggest `.borderRadius(0)` too, so the caret is not cut); to keep an inset, make the height line height + padding. GATE `text-input-default-padding-clips` |
84
+ | **An empty container shown only through its background has no width or height** | An Android `View`'s `match_parent` / constraint size comes from the parent layout and the background is drawn at the View's size; ArkUI width/height default to the size of the children, which is 0 for an empty container, and `.background()` / `.backgroundImage()` do not take part in measuring | The background layer is 0 wide: a header image, base colour or divider strip simply does not show | Every container with no children that is shown only through background* / a gradient needs a size source on both axes (`'100%'` / explicit value / `layoutWeight` / `size`); GATE `bg-only-container-collapsed` |
80
85
  | **`layout_weight` translated onto a custom component's build() root node** | Android's `layout_weight` is written on the View itself, so an attribute-by-attribute translation lands it on the component's inner root node; and it actually works when the call site chains no attributes | As soon as the call site chains an attribute (`.margin()`, `.onClick()` both count), the component is wrapped in a `__Common__` node and the parent `Row`/`Column` can no longer read the weight: the component shrinks to its content, **leaving blank space at the end of the row** | Write the weight at the **call site** `Cell({ … }).layoutWeight(1)`, **and** make the inner root node fill along the parent's main axis (parent Row → `.width('100%')`); moving only the weight without filling leaves the background shrunk to the content. `@Builder` is inlined and unaffected. GATE `layout-weight-on-component-root` |