@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
package/README.md CHANGED
@@ -352,7 +352,7 @@ devecocli plugin uninstall hometrans [--agent <name>] [--project <project_dir>]
352
352
  | 语义文档 | HarmonyOS项目下 | `project_design.md`、各模块`module_design.md`(每波增量刷新) |
353
353
  | git提交 | HarmonyOS项目 | 每组以`group G (specs so-a..so-b)`标记提交收尾;另有每波`wiring`提交与构建修复提交 |
354
354
 
355
- > **流程:** 初始化做一次性准备(`a2h-module-semantic-docs`生成语义文档基线),随后进入波循环直至无剩余组。每波:切片(S0,按组顺序做依赖感知的回填扫描,取至多`--wave-width`个未分配组;依赖预测会导致并发严重塌缩时退化为纯按顺序的 flat 切片)→ 并行编码与串行合并交织(B1⇄B2:每组独立git worktree、分块后台派发;共享注册文件经wiring.md只记录不编辑;组完成即合并、主树串行写入、冲突恢复阶梯)→ 波末统一应用wiring → 一次构建(B3)→ 按组评审与修复(B4,`code-reviewer`按组评审;第二轮起只复审仍有问题的组;每个有问题的组单独一次 `code-reviewer` fix 模式修复,整轮修完统一构建一次;最后一轮只读复核)→ 语义文档增量刷新(B5)→ 每组标记提交(C)。波循环结束后运行冷启动冒烟门禁(`a2h-coldstart-smoke-gate`:真机装启检测闪退/白屏,按证据自动修复,最多5轮),随后收尾运行一次`a2h-fix-build-errors`兜底并输出汇总报告。组失败不中断运行(fail-soft):该组及其全部spec标记为failed,记录后继续,全部问题汇总到运行结束后的报告。
355
+ > **流程:** 初始化做一次性准备(`a2h-module-semantic-docs`生成语义文档基线),随后进入波循环直至无剩余组。每波:切片(S0,按组顺序做依赖感知的回填扫描,取至多`--wave-width`个未分配组;依赖预测会导致并发严重塌缩时退化为纯按顺序的 flat 切片)→ 并行编码与串行合并交织(B1⇄B2:每组独立git worktree、分块后台派发;共享注册文件经wiring.md只记录不编辑;组完成即合并、主树串行写入、冲突恢复阶梯)→ 波末统一应用wiring → 一次构建(B3)→ 按组评审与修复(B4,`code-reviewer`按组评审;第二轮起只复审仍有问题的组;每个有问题的组单独一次 `code-reviewer` fix 模式修复,整轮修完统一构建一次;最后一轮只读复核)→ 语义文档增量刷新(B5)→ 每组标记提交(C)。波循环结束后按固定顺序收尾:homecheck 静态缺陷检查(必做)→ 冷启动冒烟门禁(`a2h-coldstart-smoke-gate`,最多5轮)→ `a2h-fix-build-errors` 兜底并输出汇总报告;前两步各自先写 state 标记(`post_homecheck` / `post_smoke`),缺一不得进入收尾。组失败不中断运行(fail-soft):该组及其全部spec标记为failed,记录后继续,全部问题汇总到运行结束后的报告。
356
356
 
357
357
  ---
358
358
 
@@ -26,7 +26,21 @@ The two modes are never combined in one dispatch. Review runs may be dispatched
26
26
 
27
27
  - `mode`: `review` or absent.
28
28
 
29
- - `harmonyos_project_path`: Path to the HarmonyOS project directory to review.
29
+ - `harmonyos_project_path`: Path to the HarmonyOS project directory to review. This is the **review
30
+ target** — the tree whose code the verdicts are about — and, when the dispatch carries `homegraph_guide`,
31
+ the **HomeGraph index root** (the shared `<HMOS>` main checkout) for APIs, shared layers and call chains.
32
+ - `android_project_path` (optional): the Android source project — the `<ANDROID>` parity index root and the
33
+ join base of the spec's `## 安卓代码参考` anchors.
34
+ - `hmos_index_ready` / `android_index_ready` (optional `true`/`false`): the dispatcher's readiness verdict
35
+ for each shared index. `false`/absent → omit that index (no probing, no rebuild) and record why in the
36
+ evidence section.
37
+ - `homegraph_guide` (optional, pipeline dispatch): the `a2h-spec-design-pipeline` skill's
38
+ `references/homegraph-cli.md` (the dispatcher passes its absolute path) — the shared CLI query discipline
39
+ and evidence format. Its presence marks a pipeline dispatch, so Step 2's
40
+ read-only index rule applies.
41
+ - `engine_mode` / `engine_degraded_reason` (optional): `<ENGINE_MODE>` (`auto`/`off`/`required`) and the
42
+ recorded degradation (`null` when none). A non-null reason goes into the evidence section as
43
+ `degraded: <reason>`; under `required` a missing evidence section is a contract failure.
30
44
  - `test_case_path`: Path to the requirement specification document, which declares all scenarios. Two shapes:
31
45
  - **Single spec**: declares the scenarios of one spec.
32
46
  - **Group merged spec** (parallel wave mode): contains `## Spec so-<id>: <title>` section headers, each section being one member spec's scenario set. The scenario checklist expands per spec (Step 3).
@@ -62,7 +76,7 @@ In `harmonyos_project_path`, resolve the change scope and extract the change:
62
76
 
63
77
  Then classify and analyze the change:
64
78
  - If the affected file types are code files, e.g. ArkTS/TS/C/CPP/H/HPP, extract from the diff the **changed symbol names** (functions, methods, `struct`/`class`/component names) and the changed files, and continue with Step 2.
65
- - If the affected file types are non-code files, e.g. images (`.png`, `.jpg`), JSON/resource files (`.json`, `.json5`, resources under `entry/src/main/resources/`), or config files (`build-profile.json5`, `oh-package.json5`, `module.json5`, `.gitignore`, etc.), then **skip homegraph entirely**. Analyze the change content directly from the diff above; for binary/image assets, record the add/modify/delete and the size change. Treat this diff as the **code context** and go straight to Step 3.
79
+ - If the affected file types are non-code files, e.g. images (`.png`, `.jpg`), JSON/resource files (`.json`, `.json5`, resources under `entry/src/main/resources/`), or config files (`build-profile.json5`, `oh-package.json5`, `module.json5`, `.gitignore`, etc.), then **skip graph queries and record `not-applicable: <changed files>`** inside the report's `## HomeGraph evidence` section. Analyze the change content directly from the diff above; for binary/image assets, record the add/modify/delete and the size change. Treat this diff as the **code context** and go straight to Step 3.
66
80
 
67
81
  ## Step 2 — Use homegraph to Expand the Code Context from the Raw Diff
68
82
 
@@ -72,10 +86,10 @@ homegraph provides program-analysis capability by building an index of the targe
72
86
 
73
87
  | Interface | Description |
74
88
  |--------------------|------------------------------------------|
75
- | homegraph init -i [path] | Initialize and index the project. |
76
- | homegraph index [path] | Full indexing (`--force` forces a rebuild). |
77
- | homegraph sync [path] | Incrementally sync changes. |
78
- | homegraph status [path] | Check index status. |
89
+ | homegraph init [path] | Initialize and index the project (standalone only). |
90
+ | homegraph index [path] | Full rebuild (standalone only); `--inplace` rebuilds into the existing db. `-f`/`--force` only bypasses the home-dir/root guard — it is not a rebuild. |
91
+ | homegraph sync [path] | Incrementally sync changes (standalone only). |
92
+ | homegraph status [path] | Check index status (diagnostics only). |
79
93
 
80
94
  - **Code queries**.
81
95
 
@@ -89,37 +103,62 @@ homegraph provides program-analysis capability by building an index of the targe
89
103
  | homegraph impact <symbol> | The blast radius of modifying this symbol. |
90
104
  | homegraph files | The tree of indexed files. |
91
105
 
92
- **Canonical invocation** (do not improvise other forms): every command runs as `homegraph <cmd> …`. Index-management commands (`status` / `init` / `sync` / `index`) take the project path **positionally**; query commands (`query` / `explore` / `node` / `callers` / `callees` / `impact`) take it via the **`-p <path>` flag** (the flag is `-p` / `--path`, not `--project`), with `-j` when JSON output helps parsing.
106
+ **Canonical invocation** (do not improvise other forms): every command runs as `homegraph <cmd> …`. Index-management commands (`status` / `init` / `sync` / `index`) take the project path **positionally**; query commands (`query` / `explore` / `node` / `callers` / `callees` / `impact`) take it via the **`-p <path>` flag** (the flag is `-p` / `--path`, not `--project`). `-j` is supported **only** on `status` / `query` / `callers` / `callees` / `impact` / `affected` / `files`; `explore` and `node` reject it (`error: unknown option '-j'`).
93
107
 
94
- ### Ensure the index homegraph uses, built from the target repository, is up to date
108
+ ### Ensure the index HomeGraph uses is the right one — read-only under a pipeline dispatch
95
109
 
96
- **Concurrency rule (check first).** When dispatched with `commit_range` (the wave pipeline's group review — its reviewers run in parallel, and it never sends `commit_id`), never run the index-management commands `init` / `sync` / `index` — concurrent index writes race. Run `status` only; if the index is stale or missing, take the **Fallback** below. With `commit_id` (single-spec pipeline, one reviewer at a time) or holistic review, index management is fine.
110
+ **Pipeline dispatch (check first).** When the dispatch carries `homegraph_guide`, the
111
+ orchestrator owns both shared indexes and is their only writer. Read them, never write them:
97
112
 
98
- 1. Run `homegraph status <harmonyos_project_path>` to check the index status.
99
- 2. Decide based on the command output:
100
- - **Not indexed** (no `.homegraph/`) → run `homegraph init -i <harmonyos_project_path>`, wait for completion.
101
- - **Stale index** (output does NOT contain `[OK] Index is up to date`) → run `homegraph sync <harmonyos_project_path>` (incremental) or `homegraph index <harmonyos_project_path> --force` (full rebuild).
102
- - **Index up to date** → proceed to the next step.
103
- **Timeout (required).** Indexing a large project can run long — when invoking `init` / `sync` / `index` via the Bash tool, pass an explicit `timeout` of **600000** ms (10 minutes); do not rely on the tool's implicit default.
104
- If the command is killed for exceeding it, treat it as a failure and take the fallback.
113
+ | Index | Root | What it answers |
114
+ |---|---|---|
115
+ | `<HMOS>` main index | `harmonyos_project_path` | existing APIs, shared layers, call chains |
116
+ | `<ANDROID>` index | `android_project_path` | parity with the reference implementation |
117
+
118
+ - **Never run `init` / `sync` / `index` / `unlock`** on either root — not with `commit_id`, and never on a
119
+ worktree. Concurrent index writes race; the orchestrator re-syncs at every B2/B3/B4 step. A query that
120
+ errors or looks stale falls through to **Fallback** and is recorded as `fallback: <reason>`.
121
+ - `homegraph status` is **diagnostics only, never a freshness gate**: `pendingChanges` reads uncommitted
122
+ edits, so a clean tree reports "up to date" while the index lags HEAD. Do not sync because of it, and do
123
+ not treat its footer as proof of freshness.
124
+ - A `hmos_index_ready` / `android_index_ready` that is `false`/absent omits that index entirely — do not
125
+ probe or rebuild it; record the omission in the evidence section.
126
+ - `engine_degraded_reason` non-null means the snapshot may lag HEAD: do not retry or repair it; prefer the
127
+ worktree's `Read` where it looks stale and record `degraded: <reason>`.
128
+
129
+ **Standalone exception.** With no `homegraph_guide` in the dispatch you are not
130
+ pipeline-driven: `harmonyos_project_path` is your own checkout, so the classic lifecycle applies. With
131
+ `commit_id` (single-spec pipeline, one reviewer at a time) or holistic review, index management is fine; with
132
+ `commit_range` (parallel group reviewers) never write concurrently. Standalone lifecycle:
133
+
134
+ 1. Run `homegraph status <harmonyos_project_path>`.
135
+ 2. **Not indexed** (no local `.homegraph/homegraph.db`) → `homegraph init <harmonyos_project_path>`.
136
+ **Stale** (output does NOT contain `[OK] Index is up to date`) → `homegraph sync
137
+ <harmonyos_project_path>` or `homegraph index --inplace <harmonyos_project_path>` (a full rebuild into the
138
+ existing db; `-f`/`--force` only bypasses the home-dir/root guard).
139
+ 3. **Timeout (required).** Pass an explicit `timeout` of **600000** ms to a write command; a command killed
140
+ for exceeding it is a failure → **Fallback**.
105
141
 
106
142
  ### Expand the changed symbols into the code context
107
143
 
108
- For the symbols and files collected in the previous step, using the changed line ranges from the diff as anchors:
144
+ For the symbols and files collected in the previous step, using the changed line ranges from the diff as anchors, query the **index roots** — `harmonyos_project_path` for the main index and `android_project_path` for parity:
109
145
 
110
146
  - Call `homegraph explore <names…> -p <harmonyos_project_path>` with the concrete changed symbol / file basenames (**several names in one explore — one explore beats a chain of search → node → grep**). It returns the line-numbered source of those symbols plus the call paths between them.
111
- - Only when explore does not give enough information, supplement with the following commands:
147
+ - Call `homegraph explore <names…> -p <android_project_path>` to compare the changed logic against the Android original (parity for a scenario whose behavior the spec leaves to the source).
148
+ - Only when explore does not give enough information, supplement with the following commands (all against `<harmonyos_project_path>`):
112
149
  - `homegraph callers <symbol> -p <harmonyos_project_path>` / `homegraph callees <symbol> -p <harmonyos_project_path>` — who invokes a changed function and what it invokes (which pages/components a change reaches).
113
150
  - `homegraph impact <symbol> -p <harmonyos_project_path>` -j — the blast radius of a changed symbol, i.e. which other scenarios the commit may affect.
114
151
  - `homegraph node <symbol> -p <harmonyos_project_path>` — one specific symbol body, or a bounded `offset`/`limit` read of one indexed file.
115
152
  - For non-code literals that live outside the graph (resource names in `string.json`, routes in `main_pages.json`, permissions in `module.json5`), use `Grep` on the exact literal.
116
153
 
154
+ **The index is a snapshot, not the tree.** After a failed or partial B4 sync the index can lag the main checkout: a symbol it lists may already be deleted, and a symbol present in the tree may be missing from it. Never judge a scenario on an index hit alone — confirm with `Read`/`Grep` and cite the tree's `file:line`. Likewise, **never truncate an `explore` response** (`| Select-Object -First N`): a `Partial locator` result means the call was budget-limited, not that the file is unindexed — confirm with `files --pattern` or `query` before concluding it is missing.
155
+
117
156
  **Read only what the analysis points at — do not read whole files.** When you need extra surrounding context (an import, a type declaration a changed range depends on), read just that span with the Read tool's `offset`/`limit`.
118
157
  First determine whether **the project** involves multiple programming languages such as ArkTS and CPP (not just the diff). If it does, then while analyzing the changed code, use `Grep` and similar means to work out the ArkTS-CPP and CPP-ArkTS call traces. Once a cross-language hop is identified, keep going with homegraph on the symbols at the **other** end (e.g. `homegraph explore` on the ArkTS entry when the change is in CPP, and vice versa) to expand that side as well. Add both the call traces and the expanded other-side symbols to the code context.
119
158
 
120
159
  ### Fallback
121
160
 
122
- If homegraph is unavailable (commands error out and cannot be resolved, or a command was killed for exceeding 600000 ms), fall back to analyzing the diff directly: based on the raw diff information, read the changed files directly from the project, assemble the code context by hand, and continue the review with this manually assembled context.
161
+ If HomeGraph is unavailable (commands error out and cannot be resolved, an index root is missing, or a command was killed for exceeding 600000 ms), fall back to analyzing the diff directly: based on the raw diff information, read the changed files directly from the project, assemble the code context by hand, and continue the review with this manually assembled context. Record the reason as `fallback: <reason>` **inside the report's `## HomeGraph evidence` section** — `parseHomeGraphEvidence` treats `fallback` exactly like `degraded`, but only inside that section; a reason written elsewhere is not evidence.
123
162
 
124
163
  ---
125
164
 
@@ -139,6 +178,8 @@ Read `test_case_path`. If `scenarios` is given, restrict the checklist to those
139
178
 
140
179
  **Group merged specs.** If `test_case_path` contains `## Spec so-<id>: <title>` section headers: treat each `## Spec so-N` section as an independent spec's scenario set, additionally recording the owning spec for every scenario (citation format "so-N 场景X"); the scenario checklist expands grouped by spec.
141
180
 
181
+ **Declared spec deviations (read before judging).** The coder records a deliberate departure from the spec in `commit-info.md`'s `## Spec 偏差` section. Before assigning verdicts, look for it in the reviewed change's evidence: `<harmonyos_project_path>/.hometrans/spec_group_*/chunk_*/commit-info.md` reachable from the reviewed group (fall back to the coder's `output_path` when the dispatcher provides one). A deviation row that fills a detail the spec left uncertain, backed by an Android-source anchor, is legitimate: with `android_project_path` available, read that anchor and judge the scenario against what it shows. A row that contradicts a behavior the spec states explicitly, a row whose basis cannot be verified, and a departure with no row at all are still reported as defects.
182
+
142
183
  **Build a scenario checklist** — a numbered list of all extracted scenarios (group mode: grouped by spec). This list drives the rest of the review.
143
184
 
144
185
  ---
@@ -268,6 +309,17 @@ Every PASS row must cite, for each asserted observable, the file:line that produ
268
309
  ### Theming Support — <...>
269
310
  ### Known Coding Mistakes — <...>
270
311
 
312
+ ## HomeGraph evidence
313
+
314
+ - `<command>` → `file:line` anchor (one line per query: `<HMOS>` explore/impact/callers, then the `<ANDROID>` parity explore)
315
+ - stale: none | degraded: none | fallback: <reason or none>
316
+
317
+ `check_review_evidence.ts <report> --engine-mode <auto|off|required>` validates exactly this section: it must
318
+ exist and carry at least one `file:line` anchor, `degraded:`, `fallback:`, or `not-applicable:` **inside it**
319
+ (the parser stops at the next `##` heading). Under `required` a missing/thin section is a contract failure.
320
+ Place the section after the last `###` subsection, never between `## Cross-Cutting Issues` and its
321
+ subsections — the orchestrator copies this exact block into `findings.md`.
322
+
271
323
  ## Residual Gaps (not closable statically)
272
324
 
273
325
  List anything you could not settle statically, each with the reason it could not be closed and what would settle it (device run, spec clarification, fixture change). Scenarios marked UNABLE TO VERIFY must appear here.
@@ -302,8 +354,13 @@ Fix the issues listed in a review report, then build once.
302
354
  - `mode`: `fix`.
303
355
  - `review_report_path`: The review report to act on — **required**. Either a `code-review-report.md` produced by Review Mode, or (wave pipeline) one group's `findings.md`.
304
356
  - `carry_over_report_path`: **optional** — the previous round's `review-fix-report.md` for the same scope. Its Remaining Issues rows are fixed in this run as well.
305
- - `harmonyos_project_path`: HarmonyOS project root — **required**.
306
- - `android_project_path`: Android source project — **optional**.
357
+ - `harmonyos_project_path`: HarmonyOS project root — **required** (the tree you fix and commit; with `homegraph_guide`, also the HomeGraph index root).
358
+ - `android_project_path`: Android source project — **optional** (parity / anchor base).
359
+ - `homegraph_guide` (optional, pipeline dispatch): the `a2h-spec-design-pipeline` skill's
360
+ `references/homegraph-cli.md`. When present, the shared indexes are
361
+ read-only and CLI-only — never `init` / `sync` / `index` / `unlock` them.
362
+ - `engine_mode` / `engine_degraded_reason` (optional): `<ENGINE_MODE>` and the recorded degradation; a
363
+ non-null reason is copied into the fix report's evidence section as `degraded: <reason>`.
307
364
  - `output_path`: Directory for `review-fix-report.md` — **optional** (defaults to cwd).
308
365
  - `build`: **optional**, default `true`. `false` → skip the build: the dispatcher builds once after several fix runs.
309
366
 
@@ -325,6 +382,10 @@ Fix the issues listed in a review report, then build once.
325
382
 
326
383
  Fix every issue the review report lists, plus the Remaining Issues rows of `carry_over_report_path` when given.
327
384
 
385
+ **Permissions are allowlisted.** A missing-permission finding is fixed in `module.json5` `requestPermissions` only with a name that appears in the pipeline's `references/permission-index.json` (`a2h-spec-design-pipeline`; read it, do not guess) **and** is not `"restricted": true` there. A name absent from the index (an invented or misspelled permission) or a restricted (ACL) permission is never written: list it under Remaining Issues as `permission <name>: not in permission-index` / `restricted (ACL) — needs a manual application`, exactly as B2's wiring step and F0 skip them. Append only; never rewrite or reorder the existing entries.
386
+
387
+ **Do not revert a legitimate deviation.** A detail recorded in `commit-info.md`'s `## Spec 偏差` (search `<harmonyos_project_path>/.hometrans/spec_group_*/chunk_*/commit-info.md`) was filled from the Android source because the spec left it uncertain: when `android_project_path` is available, check the anchor and keep that behavior; change it only when the basis no longer holds (the anchor is unrelated, the spec actually settles the detail, or the report shows the implementation is wrong), and re-record the row when you do.
388
+
328
389
  ## Step F2 — Build Once
329
390
 
330
391
  `build: false` → skip this step.
@@ -352,6 +413,15 @@ Write `<output_path>/review-fix-report.md`:
352
413
  | # | Issue | Reason |
353
414
  |---|-------|--------|
354
415
  | 1 | ... | Failed to fix — <detail> |
416
+
417
+ ## HomeGraph evidence
418
+
419
+ - `<command>` → `file:line` anchor (at least one `explore`/`impact` that located a defect; the reviewer's
420
+ section arrived in `findings.md` and may be cited directly)
421
+ - stale: none | degraded: none | fallback: <reason or none>
422
+
423
+ Same section format as the review report. `check_review_evidence.ts` validates only the review report; the
424
+ final report verifies this one.
355
425
  ```
356
426
 
357
427
  Then commit, when at least one issue was fixed:
@@ -317,7 +317,7 @@
317
317
  "level": "optional"
318
318
  }
319
319
  ],
320
- "note": "Step 4: Spec design + implement pipeline (grouped waves). node required for the deterministic pipeline scripts (type stripping); hdc optional for the B6 self-test stage (skippable via --skip-test); git >= 2.38 optional — the wave-end audit's resolver hand-edit layer uses merge-tree --write-tree, older git degrades that one layer fail-soft (stderr warning). homecheck 2.0.0-next.0+ is required for the post-loop static-defect check: ht init installs it and preflight installs or upgrades it in place when missing/too old (a global change reported as WARN); a CLI still missing/too old afterwards, an unresolvable package, or a ruleSet.json without the three fixed domains (`@arkui-semantic-correctness`, `@correctness`, `@compatibility` — the first was renamed from `@arkui-reliability` in 2.0.0-next.0) hard-fails preflight — the check is never skipped."
320
+ "note": "Step 4: Spec design + implement pipeline (grouped waves). node required for the deterministic pipeline scripts (type stripping); hdc optional for the B6 self-test stage (skippable via --skip-test); git >= 2.38 optional — the wave-end audit's resolver hand-edit layer uses merge-tree --write-tree, older git degrades that one layer fail-soft (stderr warning). homecheck 2.0.0-next.0+ is required for the post-loop static-defect check: ht init installs it and preflight installs or upgrades it in place when missing/too old (a global change reported as WARN); a CLI still missing/too old afterwards, an unresolvable package, or a ruleSet.json without the two fixed domains (`@arkui-semantic-correctness`, `@correctness` — the first was renamed from `@arkui-reliability` in 2.0.0-next.0) hard-fails preflight — the check is never skipped."
321
321
  },
322
322
  {
323
323
  "name": "a2h-arkts-logic-coder",
@@ -26,7 +26,21 @@ The two modes are never combined in one dispatch. Review runs may be dispatched
26
26
 
27
27
  - `mode`: `review` or absent.
28
28
 
29
- - `harmonyos_project_path`: Path to the HarmonyOS project directory to review.
29
+ - `harmonyos_project_path`: Path to the HarmonyOS project directory to review. This is the **review
30
+ target** — the tree whose code the verdicts are about — and, when the dispatch carries `homegraph_guide`,
31
+ the **HomeGraph index root** (the shared `<HMOS>` main checkout) for APIs, shared layers and call chains.
32
+ - `android_project_path` (optional): the Android source project — the `<ANDROID>` parity index root and the
33
+ join base of the spec's `## Android Code Reference` anchors.
34
+ - `hmos_index_ready` / `android_index_ready` (optional `true`/`false`): the dispatcher's readiness verdict
35
+ for each shared index. `false`/absent → omit that index (no probing, no rebuild) and record why in the
36
+ evidence section.
37
+ - `homegraph_guide` (optional, pipeline dispatch): the `a2h-spec-design-pipeline` skill's
38
+ `references/homegraph-cli.md` (the dispatcher passes its absolute path) — the shared CLI query discipline
39
+ and evidence format. Its presence marks a pipeline dispatch, so Step 2's
40
+ read-only index rule applies.
41
+ - `engine_mode` / `engine_degraded_reason` (optional): `<ENGINE_MODE>` (`auto`/`off`/`required`) and the
42
+ recorded degradation (`null` when none). A non-null reason goes into the evidence section as
43
+ `degraded: <reason>`; under `required` a missing evidence section is a contract failure.
30
44
  - `test_case_path`: Path to the requirement specification document, which declares all scenarios. Two shapes:
31
45
  - **Single spec**: declares the scenarios of one spec.
32
46
  - **Group merged spec** (parallel wave mode): contains `## Spec so-<id>: <title>` section headers, each section being one member spec's scenario set. The scenario checklist expands per spec (Step 3).
@@ -62,7 +76,7 @@ In `harmonyos_project_path`, resolve the change scope and extract the change:
62
76
 
63
77
  Then classify and analyze the change:
64
78
  - If the affected file types are code files, e.g. ArkTS/TS/C/CPP/H/HPP, extract from the diff the **changed symbol names** (functions, methods, `struct`/`class`/component names) and the changed files, and continue with Step 2.
65
- - If the affected file types are non-code files, e.g. images (`.png`, `.jpg`), JSON/resource files (`.json`, `.json5`, resources under `entry/src/main/resources/`), or config files (`build-profile.json5`, `oh-package.json5`, `module.json5`, `.gitignore`, etc.), then **skip homegraph entirely**. Analyze the change content directly from the diff above; for binary/image assets, record the add/modify/delete and the size change. Treat this diff as the **code context** and go straight to Step 3.
79
+ - If the affected file types are non-code files, e.g. images (`.png`, `.jpg`), JSON/resource files (`.json`, `.json5`, resources under `entry/src/main/resources/`), or config files (`build-profile.json5`, `oh-package.json5`, `module.json5`, `.gitignore`, etc.), then **skip graph queries and record `not-applicable: <changed files>`** inside the report's `## HomeGraph evidence` section. Analyze the change content directly from the diff above; for binary/image assets, record the add/modify/delete and the size change. Treat this diff as the **code context** and go straight to Step 3.
66
80
 
67
81
  ## Step 2 — Use homegraph to Expand the Code Context from the Raw Diff
68
82
 
@@ -72,10 +86,10 @@ homegraph provides program-analysis capability by building an index of the targe
72
86
 
73
87
  | Interface | Description |
74
88
  |--------------------|------------------------------------------|
75
- | homegraph init -i [path] | Initialize and index the project. |
76
- | homegraph index [path] | Full indexing (`--force` forces a rebuild). |
77
- | homegraph sync [path] | Incrementally sync changes. |
78
- | homegraph status [path] | Check index status. |
89
+ | homegraph init [path] | Initialize and index the project (standalone only). |
90
+ | homegraph index [path] | Full rebuild (standalone only); `--inplace` rebuilds into the existing db. `-f`/`--force` only bypasses the home-dir/root guard — it is not a rebuild. |
91
+ | homegraph sync [path] | Incrementally sync changes (standalone only). |
92
+ | homegraph status [path] | Check index status (diagnostics only). |
79
93
 
80
94
  - **Code queries**.
81
95
 
@@ -89,37 +103,64 @@ homegraph provides program-analysis capability by building an index of the targe
89
103
  | homegraph impact <symbol> | The blast radius of modifying this symbol. |
90
104
  | homegraph files | The tree of indexed files. |
91
105
 
92
- **Canonical invocation** (do not improvise other forms): every command runs as `homegraph <cmd> …`. Index-management commands (`status` / `init` / `sync` / `index`) take the project path **positionally**; query commands (`query` / `explore` / `node` / `callers` / `callees` / `impact`) take it via the **`-p <path>` flag** (the flag is `-p` / `--path`, not `--project`), with `-j` when JSON output helps parsing.
106
+ **Canonical invocation** (do not improvise other forms): every command runs as `homegraph <cmd> …`. Index-management commands (`status` / `init` / `sync` / `index`) take the project path **positionally**; query commands (`query` / `explore` / `node` / `callers` / `callees` / `impact`) take it via the **`-p <path>` flag** (the flag is `-p` / `--path`, not `--project`). `-j` is supported **only** on `status` / `query` / `callers` / `callees` / `impact` / `affected` / `files`; `explore` and `node` reject it (`error: unknown option '-j'`).
93
107
 
94
- ### Ensure the index homegraph uses, built from the target repository, is up to date
108
+ ### Ensure the index HomeGraph uses is the right one — read-only under a pipeline dispatch
95
109
 
96
- **Concurrency rule (check first).** When dispatched with `commit_range` (the wave pipeline's group review — its reviewers run in parallel, and it never sends `commit_id`), never run the index-management commands `init` / `sync` / `index` — concurrent index writes race. Run `status` only; if the index is stale or missing, take the **Fallback** below. With `commit_id` (single-spec pipeline, one reviewer at a time) or holistic review, index management is fine.
110
+ **Pipeline dispatch (check first).** When the dispatch carries `homegraph_guide`, the
111
+ orchestrator owns both shared indexes and is their only writer. Read them, never write them:
97
112
 
98
- 1. Run `homegraph status <harmonyos_project_path>` to check the index status.
99
- 2. Decide based on the command output:
100
- - **Not indexed** (no `.homegraph/`) → run `homegraph init -i <harmonyos_project_path>`, wait for completion.
101
- - **Stale index** (output does NOT contain `[OK] Index is up to date`) → run `homegraph sync <harmonyos_project_path>` (incremental) or `homegraph index <harmonyos_project_path> --force` (full rebuild).
102
- - **Index up to date** → proceed to the next step.
103
- **Timeout (required).** Indexing a large project can run long — when invoking `init` / `sync` / `index` via the Bash tool, pass an explicit `timeout` of **600000** ms (10 minutes); do not rely on the tool's implicit default.
104
- If the command is killed for exceeding it, treat it as a failure and take the fallback.
113
+ | Index | Root | What it answers |
114
+ |---|---|---|
115
+ | `<HMOS>` main index | `harmonyos_project_path` | existing APIs, shared layers, call chains |
116
+ | `<ANDROID>` index | `android_project_path` | parity with the reference implementation |
117
+
118
+ - **Never run `init` / `sync` / `index` / `unlock`** on either root — not with `commit_id`, and never on a
119
+ worktree. Concurrent index writes race; the orchestrator re-syncs at every B2/B3/B4 step. A query that
120
+ errors or looks stale falls through to **Fallback** and is recorded as `fallback: <reason>`.
121
+ - `homegraph status` is **diagnostics only, never a freshness gate**: `pendingChanges` reads uncommitted
122
+ edits, so a clean tree reports "up to date" while the index lags HEAD. Do not sync because of it, and do
123
+ not treat its footer as proof of freshness.
124
+ - A `hmos_index_ready` / `android_index_ready` that is `false`/absent omits that index entirely — do not
125
+ probe or rebuild it; record the omission in the evidence section.
126
+ - `engine_degraded_reason` non-null means the snapshot may lag HEAD: do not retry or repair it; prefer the
127
+ worktree's `Read` where it looks stale and record `degraded: <reason>`.
128
+
129
+ **Standalone exception.** With no `homegraph_guide` in the dispatch you are not
130
+ pipeline-driven: `harmonyos_project_path` is your own checkout, so the classic lifecycle applies. With
131
+ `commit_id` (single-spec pipeline, one reviewer at a time) or holistic review, index management is fine; with
132
+ `commit_range` (parallel group reviewers) never write concurrently. Standalone lifecycle:
133
+
134
+ 1. Run `homegraph status <harmonyos_project_path>`.
135
+ 2. **Not indexed** (no local `.homegraph/homegraph.db`) → `homegraph init <harmonyos_project_path>`.
136
+ **Stale** (output does NOT contain `[OK] Index is up to date`) → `homegraph sync
137
+ <harmonyos_project_path>` or `homegraph index --inplace <harmonyos_project_path>` (a full rebuild into the
138
+ existing db; `-f`/`--force` only bypasses the home-dir/root guard).
139
+ 3. **Timeout (required).** Pass an explicit `timeout` of **600000** ms to a write command; a command killed
140
+ for exceeding it is a failure → **Fallback**.
105
141
 
106
142
  ### Expand the changed symbols into the code context
107
143
 
108
- For the symbols and files collected in the previous step, using the changed line ranges from the diff as anchors:
144
+ For the symbols and files collected in the previous step, using the changed line ranges from the diff as anchors, query the **index roots** — `harmonyos_project_path` for the main index and `android_project_path` for parity:
109
145
 
110
146
  - Call `homegraph explore <names…> -p <harmonyos_project_path>` with the concrete changed symbol / file basenames (**several names in one explore — one explore beats a chain of search → node → grep**). It returns the line-numbered source of those symbols plus the call paths between them.
111
- - Only when explore does not give enough information, supplement with the following commands:
147
+ - Call `homegraph explore <names…> -p <android_project_path>` to compare the changed logic against the Android original (parity for a scenario whose behavior the spec leaves to the source).
148
+ - Only when explore does not give enough information, supplement with the following commands (all against `<harmonyos_project_path>`):
112
149
  - `homegraph callers <symbol> -p <harmonyos_project_path>` / `homegraph callees <symbol> -p <harmonyos_project_path>` — who invokes a changed function and what it invokes (which pages/components a change reaches).
113
150
  - `homegraph impact <symbol> -p <harmonyos_project_path>` -j — the blast radius of a changed symbol, i.e. which other scenarios the commit may affect.
114
151
  - `homegraph node <symbol> -p <harmonyos_project_path>` — one specific symbol body, or a bounded `offset`/`limit` read of one indexed file.
115
152
  - For non-code literals that live outside the graph (resource names in `string.json`, routes in `main_pages.json`, permissions in `module.json5`), use `Grep` on the exact literal.
116
153
 
154
+ **The index is a snapshot, not the tree.** After a failed or partial B4 sync the index can lag the main checkout: a symbol it lists may already be deleted, and a symbol present in the tree may be missing from it. Never judge a scenario on an index hit alone — confirm with `Read`/`Grep` and cite the tree's `file:line`. Likewise, **never truncate an `explore`
155
+ response** (`| Select-Object -First N`): a `Partial locator` result means the call was budget-limited, not
156
+ that the file is unindexed - confirm with `files --pattern` or `query` before concluding it is missing.
157
+
117
158
  **Read only what the analysis points at — do not read whole files.** When you need extra surrounding context (an import, a type declaration a changed range depends on), read just that span with the Read tool's `offset`/`limit`.
118
159
  First determine whether **the project** involves multiple programming languages such as ArkTS and CPP (not just the diff). If it does, then while analyzing the changed code, use `Grep` and similar means to work out the ArkTS-CPP and CPP-ArkTS call traces. Once a cross-language hop is identified, keep going with homegraph on the symbols at the **other** end (e.g. `homegraph explore` on the ArkTS entry when the change is in CPP, and vice versa) to expand that side as well. Add both the call traces and the expanded other-side symbols to the code context.
119
160
 
120
161
  ### Fallback
121
162
 
122
- If homegraph is unavailable (commands error out and cannot be resolved, or a command was killed for exceeding 600000 ms), fall back to analyzing the diff directly: based on the raw diff information, read the changed files directly from the project, assemble the code context by hand, and continue the review with this manually assembled context.
163
+ If HomeGraph is unavailable (commands error out and cannot be resolved, an index root is missing, or a command was killed for exceeding 600000 ms), fall back to analyzing the diff directly: based on the raw diff information, read the changed files directly from the project, assemble the code context by hand, and continue the review with this manually assembled context. Record the reason as `fallback: <reason>` **inside the report's `## HomeGraph evidence` section** — `parseHomeGraphEvidence` treats `fallback` exactly like `degraded`, but only inside that section; a reason written elsewhere is not evidence.
123
164
 
124
165
  ---
125
166
 
@@ -139,6 +180,8 @@ Read `test_case_path`. If `scenarios` is given, restrict the checklist to those
139
180
 
140
181
  **Group merged specs.** If `test_case_path` contains `## Spec so-<id>: <title>` section headers: treat each `## Spec so-N` section as an independent spec's scenario set, additionally recording the owning spec for every scenario (citation format "so-N Scenario X", matching the spec's `## Scenario N` headings); the scenario checklist expands grouped by spec.
141
182
 
183
+ **Declared spec deviations (read before judging).** The coder records a deliberate departure from the spec in `commit-info.md`'s `## Spec deviations` section. Before assigning verdicts, look for it in the reviewed change's evidence: `<harmonyos_project_path>/.hometrans/spec_group_*/chunk_*/commit-info.md`, reachable from the reviewed group (fall back to the coder's `output_path` when the dispatcher provides one). A deviation row that fills a detail the spec left uncertain, backed by an Android-source anchor, is legitimate: with `android_project_path` available, read that anchor and judge the scenario against what it shows. A row that contradicts a behavior the spec states explicitly, a row whose basis cannot be verified, and a departure with no row at all are still reported as defects.
184
+
142
185
  **Build a scenario checklist** — a numbered list of all extracted scenarios (group mode: grouped by spec). This list drives the rest of the review.
143
186
 
144
187
  ---
@@ -268,6 +311,17 @@ Every PASS row must cite, for each asserted observable, the file:line that produ
268
311
  ### Theming Support — <...>
269
312
  ### Known Coding Mistakes — <...>
270
313
 
314
+ ## HomeGraph evidence
315
+
316
+ - `<command>` → `file:line` anchor (one line per query: `<HMOS>` explore/impact/callers, then the `<ANDROID>` parity explore)
317
+ - stale: none | degraded: none | fallback: <reason or none>
318
+
319
+ `check_review_evidence.ts <report> --engine-mode <auto|off|required>` validates exactly this section: it must
320
+ exist and carry at least one `file:line` anchor, `degraded:`, `fallback:`, or `not-applicable:` **inside it**
321
+ (the parser stops at the next `##` heading). Under `required` a missing/thin section is a contract failure.
322
+ Place the section after the last `###` subsection, never between `## Cross-Cutting Issues` and its
323
+ subsections — the orchestrator copies this exact block into `findings.md`.
324
+
271
325
  ## Residual Gaps (not closable statically)
272
326
 
273
327
  List anything you could not settle statically, each with the reason it could not be closed and what would settle it (device run, spec clarification, fixture change). Scenarios marked UNABLE TO VERIFY must appear here.
@@ -302,8 +356,13 @@ Fix the issues listed in a review report, then build once.
302
356
  - `mode`: `fix`.
303
357
  - `review_report_path`: The review report to act on — **required**. Either a `code-review-report.md` produced by Review Mode, or (wave pipeline) one group's `findings.md`.
304
358
  - `carry_over_report_path`: **optional** — the previous round's `review-fix-report.md` for the same scope. Its Remaining Issues rows are fixed in this run as well.
305
- - `harmonyos_project_path`: HarmonyOS project root — **required**.
306
- - `android_project_path`: Android source project — **optional**.
359
+ - `harmonyos_project_path`: HarmonyOS project root — **required** (the tree you fix and commit; with `homegraph_guide`, also the HomeGraph index root).
360
+ - `android_project_path`: Android source project — **optional** (parity / anchor base).
361
+ - `homegraph_guide` (optional, pipeline dispatch): the `a2h-spec-design-pipeline` skill's
362
+ `references/homegraph-cli.md`. When present, the shared indexes are
363
+ read-only and CLI-only — never `init` / `sync` / `index` / `unlock` them.
364
+ - `engine_mode` / `engine_degraded_reason` (optional): `<ENGINE_MODE>` and the recorded degradation; a
365
+ non-null reason is copied into the fix report's evidence section as `degraded: <reason>`.
307
366
  - `output_path`: Directory for `review-fix-report.md` — **optional** (defaults to cwd).
308
367
  - `build`: **optional**, default `true`. `false` → skip the build: the dispatcher builds once after several fix runs.
309
368
 
@@ -325,6 +384,10 @@ Fix the issues listed in a review report, then build once.
325
384
 
326
385
  Fix every issue the review report lists, plus the Remaining Issues rows of `carry_over_report_path` when given.
327
386
 
387
+ **Permissions are allowlisted.** A missing-permission finding is fixed in `module.json5` `requestPermissions` only with a name that appears in the pipeline's `references/permission-index.json` (`a2h-spec-design-pipeline`; read it, do not guess) **and** is not `"restricted": true` there. A name absent from the index (an invented or misspelled permission) or a restricted (ACL) permission is never written: list it under Remaining Issues as `permission <name>: not in permission-index` / `restricted (ACL) — needs a manual application`, exactly as B2's wiring step and F0 skip them. Append only; never rewrite or reorder the existing entries.
388
+
389
+ **Do not revert a legitimate deviation.** A detail recorded in `commit-info.md`'s `## Spec deviations` (search `<harmonyos_project_path>/.hometrans/spec_group_*/chunk_*/commit-info.md`) was filled from the Android source because the spec left it uncertain: when `android_project_path` is available, check the anchor and keep that behavior; change it only when the basis no longer holds (the anchor is unrelated, the spec actually settles the detail, or the report shows the implementation is wrong), and re-record the row when you do.
390
+
328
391
  ## Step F2 — Build Once
329
392
 
330
393
  `build: false` → skip this step.
@@ -352,6 +415,15 @@ Write `<output_path>/review-fix-report.md`:
352
415
  | # | Issue | Reason |
353
416
  |---|-------|--------|
354
417
  | 1 | ... | Failed to fix — <detail> |
418
+
419
+ ## HomeGraph evidence
420
+
421
+ - `<command>` → `file:line` anchor (at least one `explore`/`impact` that located a defect; the reviewer's
422
+ section arrived in `findings.md` and may be cited directly)
423
+ - stale: none | degraded: none | fallback: <reason or none>
424
+
425
+ Same section format as the review report. `check_review_evidence.ts` validates only the review report; the
426
+ final report verifies this one.
355
427
  ```
356
428
 
357
429
  Then commit, when at least one issue was fixed:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: a2h-app-migrate
3
- description: "Production Android→HarmonyOS migration orchestrator. Loads references/workflow.yaml declarative DAG: probe + fixed serial schedule then INTERACTION_MODE, with INTERACTIVE_GATES asked only after interactive and never shown for auto, plus reuse/config + env_preflight, staged human gates, discover parallel group, frozen UTG snapshot, then post_utg ui.batch→enrich.spec_gen serially; enrich.spec_gen runs a2h-page-specgen by default (one SPEC per page, strict all-or-nothing: a failed finalize fails the node), or the optional a2h-spec-generate engine when SPEC_ENGINE=spec-generate. Use for full migration with resume, a manifest and a final report. Triggers: a2h-app-migrate, full migration orchestration, production-grade migration workflow."
3
+ description: "Production Android→HarmonyOS migration orchestrator. Loads references/workflow.yaml declarative DAG: probe + fixed serial schedule then INTERACTION_MODE, with INTERACTIVE_GATES asked only after interactive and never shown for auto, plus reuse/config + env_preflight, staged human gates, discover parallel group, frozen UTG snapshot, then post_utg ui.batch→enrich.spec_gen serially; enrich.spec_gen runs a2h-page-specgen by default (one SPEC per page, publishing with holes instead of hard-stopping: a partial or gate-failed run still publishes `specs.json` with `completeness:"incomplete-known"` and downstream continues), or the optional a2h-spec-generate engine when SPEC_ENGINE=spec-generate. Use for full migration with resume, a manifest and a final report. Triggers: a2h-app-migrate, full migration orchestration, production-grade migration workflow."
4
4
  ---
5
5
 
6
6
  # a2h-app-migrate — workflow executor
@@ -29,11 +29,16 @@ Parsed from the user's message (in any order). Paths must be absolute.
29
29
  | `WORK` | Pipeline workspace; default `${HMOS}/.hometrans/app-migrate` | No |
30
30
  | `RUN_DIR` | Run directory of enrich.spec_gen (the pipeline passes `output=`); managed by `scripts/run_dir.mjs` by default: each fresh run gets `${WORK}/reqgen/run-<timestamp>`, the pointer `${WORK}/reqgen/current.json` records the current one, and an unfinished run is resumed and reused | No |
31
31
  | `SPECS_JSON` | Ordered spec manifest; default `${SPEC_DIR}/specs.json` (produced by Step 5b's page-grouped root of enrich.spec_gen). **Explicitly provided = use this manifest directly**: `SKIP_SPEC_GENERATE` is set to true, spec generation and review.spec_gen are skipped, and preflight strictly validates the file | No |
32
- | `PROFILE` | `full` \| `ui-only` \| `resume`. | No |
32
+ | `PROFILE` | `full` \| `ui-only` \| `incremental` \| `resume`. `incremental` = migrate the pages `SCOPE` names into an **existing** HarmonyOS project (scenario 3): ui.batch runs I1–I5 with `MODE=incremental`, and the `${HMOS}/.hometrans/incremental/scope.json` confirmed at I4 also scopes SPEC generation (`page-specgen` only); the previous round's UI / SPEC / logic outputs are not reused | No |
33
+ | `SCOPE` | The incremental scope: pages (page names / class names / UTG node ids, resolved by ui.batch I1–I4), `auto` (migrate "migrated pages whose source changed + pages new since the last migration", found by fingerprints; usable under auto) or one feature description (resolved by `discover.feature_scope` per `references/feature-scope.md`). Incremental needs at least one of `SCOPE` / `SCOPE_DOC` / `ANDROID_DIFF` / `SCOPE_FILE`, or preflight FAILs. Under auto the model settles the scope itself without asking the user (work types are computed by the scripts); under interactive it stops at the confirmation table | One of four when incremental |
34
+ | `SCOPE_DOC` | Requirement / feature documents (comma-separated; `.md` / `.txt` / `.docx` / `.pdf`), resolved into features | No |
35
+ | `ANDROID_DIFF` | An Android version range (git range, e.g. `v2.3..v2.4`): migrate what it added / changed | No |
36
+ | `REQ_HISTORY` | Requirements already described, excluded as whole features | No |
37
+ | `SCOPE_FILE` | A confirmed `scope.json` (v1 / v2), validated and used as is | No |
33
38
  | `FROM_NODE` | Node id to resume from (`profile=resume`). Resume inherits the original run's profile (read from the ledger; cannot be changed); ancestors the original run completed must be reused and their artifacts must be complete, skipped / soft-failed ones keep their original results, and FROM_NODE and its downstream run as usual (`resume_plan.mjs`, see `policy.resume_from`) | No |
34
39
  | `RESUME_BASE_PROFILE` | The original run's profile when resuming; required only when the ledger is missing (WORK deleted) | No |
35
40
  | `ENGINE_MODE` | Homegraph evidence strictness, passed to design-pipeline / module-docs; `auto`\|`off`\|`required`, default `auto` | No |
36
- | `SPEC_ENGINE` | SPEC generation engine: `page-specgen` (default, one SPEC per page, strict all-or-nothing: a failed leaf fails the node, no publishing with holes) \| `spec-generate` (optional, the fused a2h-spec-generate chain); written into the run pointer and the ledger, a resume inherits it and an explicit switch is a Hard-Stop | No |
41
+ | `SPEC_ENGINE` | SPEC generation engine: `page-specgen` (default, one SPEC per page, publishes with holes instead of hard-stopping: a partial or gate-failed run records `completeness:"incomplete-known"` and the node still succeeds) \| `spec-generate` (optional, the fused a2h-spec-generate chain); written into the run pointer and the ledger, a resume inherits it and an explicit switch is a Hard-Stop | No |
37
42
  | `DESIGN_DIR` | Chunk design document directory (`SPEC_DESIGN_G<G>_c<k>.md`, `design_map.md`); default `${HMOS}/.hometrans/spec_design` | No |
38
43
  | `WAVE_WIDTH` | Passed to design-pipeline: number of parallel groups per wave; default `10` | No |
39
44
  | `MAX_SCENARIOS_PER_CHUNK` | Passed to design-pipeline: maximum scenarios per coding chunk; default `32` | No |
@@ -64,13 +69,14 @@ Render each argument as a single `--key=<value>` (pass `--key=` even when the va
64
69
  node ${SKILLS_ROOT}/a2h-app-migrate/scripts/env_preflight.mjs \
65
70
  --android=<ANDROID> --hmos=<HMOS> --work=<WORK> \
66
71
  --run-dir=<RUN_DIR> --ui-info-root=<UI_INFO_ROOT> \
67
- --skills-root=${SKILLS_ROOT} --profile=<PROFILE> \
72
+ --skills-root=${SKILLS_ROOT} --profile=<PROFILE> --scope-request=<SCOPE, empty unless incremental> \
73
+ --scope-doc=<SCOPE_DOC> --android-diff=<ANDROID_DIFF> --scope-file=<SCOPE_FILE> \
68
74
  --engine-mode=<ENGINE_MODE> --wave-width=<WAVE_WIDTH> \
69
75
  --max-scenarios-per-chunk=<MAX_SCENARIOS_PER_CHUNK> --spec-concurrency=<SPEC_CONCURRENCY> \
70
76
  --spec-engine=<SPEC_ENGINE> \
71
77
  --specs-json=<SPECS_JSON> --specs-json-is-default=<true|false> --specs-json-required=<true|false> \
72
- --skip-logic=<b> --skip-spec-gen=<b> --skip-utg-static=<b> --skip-arch=<b> \
73
- --skip-module-docs=<b> --skip-logic-pipeline=<b> --ui-reused=<b> \
78
+ --skip-logic=<b> --skip-spec-gen=<b> --skip-arch=<b> \
79
+ --skip-logic-pipeline=<b> --ui-reused=<b> \
74
80
  --apk=<APK_PATH> --app-module=<APP_MODULE> --adb-serial=<ADB_SERIAL> \
75
81
  --interaction-mode=<auto|interactive> --interactive-gates=<whitelist; if empty, --interactive-gates=> \
76
82
  --report
@@ -82,7 +88,7 @@ Output = a Markdown table + a final line `PREFLIGHT_VARS {json}`. Show the table
82
88
 
83
89
  Add `--specs-json-is-default` only when the user did **not** explicitly provide `specs.json`; add `--specs-json-required` when enrich.spec_gen does not run this round (`SKIP_SPEC_GENERATE` or reuse) but the logic chain will.
84
90
 
85
- exit≠0 → **Hard-Stop**. `--ui-reused` / `--skip-logic` / `--skip-spec-gen` / `--skip-utg-static` / `--skip-module-docs` **must be forwarded as the yaml says** — preflight treats as hard requirements only what the nodes running this round need (APK / adb / DEVECO_HOME / the global homegraph CLI / devecocli logged in for real-device or non-emulator scenarios / a pure-ASCII path for a new project / the existing HMOS being a git repository root when the logic chain requires it). All main-flow leaves are Node; preflight no longer probes for Python. Both full and incremental capture are done by a2h-utg-explorer and need no model key; pass `--ui-reused` when the user chooses to reuse UI artifacts.
91
+ exit≠0 → **Hard-Stop**. `--ui-reused` / `--skip-logic` / `--skip-spec-gen` / `--skip-arch` **must be forwarded as the yaml says** — preflight treats as hard requirements only what the nodes running this round need (APK / adb / DEVECO_HOME / the global homegraph CLI / devecocli logged in for real-device or non-emulator scenarios / a pure-ASCII path for a new project / the existing HMOS being a git repository root when the logic chain requires it). All main-flow leaves are Node; preflight no longer probes for Python. Both full and incremental capture are done by a2h-utg-explorer and need no model key; pass `--ui-reused` when the user chooses to reuse UI artifacts.
86
92
  devecocli login: a prerequisite only when **the project has no signing config yet** and it is not the "emulators only" case (signing is generated by `adopt.signing`'s `devecocli signature generate`, which requires login). All hdc targets start with `127.0.0.1:` → **login is not checked** (emulators can install unsigned HAPs, and the cold-start smoke test does no signing preflight); if a real device is also connected, the real-device rules still apply. The logic pipeline runs this round, it is not emulators only, and the project is unsigned → not logged in means **Hard-Stop**; only a real device connected and unsigned → WARN (the cold-start smoke test will record DEPLOY_ERROR); already signed, or the logic pipeline is reused / skipped (`--skip-logic-pipeline`) and there is no real device → not checked. `devecocli auth status` also exits 0 when not logged in (body text `Not logged in`), so decide by the three states of the body text: if it cannot be recognized, WARN with the raw text attached; never pretend to be logged in.
87
93
  Emulator network: when an online hdc target is an **emulator** (`127.0.0.1:`), preflight probes that emulator's internet connectivity via `hdc -t <target> shell ping`; unreachable is only a WARN (the host's VPN / proxy / firewall often cuts the emulator's NAT). Real devices are not checked.
88
94
  `ask_run_config_once` must come **before** preflight; workspace disk writes must come **after** preflight (see `policy.human_interaction`).
@@ -101,7 +107,7 @@ The full text lives only in `workflow.yaml` → `policy.*`. The executor must co
101
107
  3. **post_utg** — fixed serial: `ui.batch` → `enrich.spec_gen`; spec_gen always reads only `${UTG_SNAPSHOT}` → `policy.parallel_rule`.
102
108
  4. **Scheduling** — fixed serial (no scheduling variable). post_utg and `discover.utg_static` both run inline in the primary; workers inside leaves may still use the main session's Task. `logic.spec_pipeline` **always runs inline in the primary**: in B1/B2 it ends the turn to wait for background notifications, and after being woken it continues its event loop; the node ends only when it outputs its final report; completion is judged by `check_spec_pipeline_done.mjs` (the state file existing does not count).
103
109
  5. **Gates** — do not skip a node because of an `auto` confirmation (otherwise nobody writes the checkpoint); `auto` or the gate not in `INTERACTIVE_GATES` → `--write-confirmed --confirmed-by auto`; on the whitelist, stop and wait, and after the user confirms, `--write-confirmed --confirmed-by user` → `policy.human_interaction`. `review.arch` does **not** `skip_if` on `REUSE_DISCOVER_ARCH` (reusing the docs ≠ confirmation; a missing checkpoint must be rewritten / re-asked — see `policy.human_gate_protocol`). Producer nodes (`discover.arch` / `enrich.spec_gen` / `ui.batch`) must run their `before_run` **before actually executing** (`--clear-checkpoint` invalidates the corresponding gate); when reusing artifacts or skipping, clearing is **forbidden**. For a node with `after_run`, the primary runs it first after the leaf returns, then judges success.
104
- 6. **spec boundary** — `specs.json` is written only by enrich.spec_gen's leaf picked by `SPEC_ENGINE` (`spec-generate` → a2h-spec-generate's `publish-specs`; `page-specgen` → a2h-page-specgen's `finalize`); do not expand the leaf's internals; do not change the `${RUN_DIR}` layout → `policy.spec_order_boundary`. When semantics are incomplete, publish with gaps per the **deveco-cli contract**: the three steps use `--allow-incomplete`, specs.json records `completeness: "incomplete-known"` + `incomplete{...}`, the node still succeeds, downstream consumes as usual, and the gaps must be written into the finalize report (see enrich.spec_gen's invoke). `page-specgen` has no publishing with holes: a failed `finalize` is a failed node; switching engines = a new run.
110
+ 6. **spec boundary** — `specs.json` is written only by enrich.spec_gen's leaf picked by `SPEC_ENGINE` (`spec-generate` → a2h-spec-generate's `publish-specs`; `page-specgen` → a2h-page-specgen's `finalize`); do not expand the leaf's internals; do not change the `${RUN_DIR}` layout → `policy.spec_order_boundary`. When semantics are incomplete, publish with gaps per the **deveco-cli contract**: the three steps use `--allow-incomplete`, specs.json records `completeness: "incomplete-known"` + `incomplete{...}`, the node still succeeds, downstream consumes as usual, and the gaps stay in specs.json incomplete; they are not written into the final report (see enrich.spec_gen's invoke); the one exception: on an incremental run, scope pages that got no SPEC (`incomplete.scopeUnmatched` / `scope.unmatched`) are the outcome of the incremental scope, not a SPEC quality gap, and logic.finalize's "Incremental scope" section (`scope_report.mjs`) lists them under "what was skipped". `page-specgen` publishes with holes the same way: `finalize` exits 0 whenever it published a `specs.json`; a partial or gate-failed run writes `incomplete{areas,pages,failedShards,...}` into the manifest and the ledger, not the final report, and downstream consumes it as usual; only "no SPEC published at all" fails the node. Switching engines = a new run.
105
111
 
106
112
  7. **module_docs** — pass only `--engine-mode` / `--incremental preserve` / `--scope project-source` (no `--hometrans-dir` / `--doc-layout`); it refreshes the `.hometrans/project_design.md` written by arch, and completion is judged by `module_understanding/.module_semantic_docs_state.json`.
107
113
  8. **soft_continue** — a failed node is recorded in the ledger and downstream is scheduled as usual (`policy.failure_semantics`); when `ui.batch` fails, `review.ui_batch` switches to `--upstream-failed` (the user chooses "drop UI, continue" / "rerun"; auto confirms directly), and the logic chain **must not** be hard-stopped because of a UI failure.
@@ -117,9 +123,8 @@ The full text lives only in `workflow.yaml` → `policy.*`. The executor must co
117
123
  `page-specgen` is the default engine; selecting `spec-generate` instead has these known downstream differences:
118
124
 
119
125
  - grouping is `g<NN>-<slug>` buckets (one group holds several pages), so downstream has fewer wave groups and each group is larger;
120
- - `--chunk-budget` comes from `MAX_SCENARIOS_PER_CHUNK` — one migration has only this one chunk knob, shared by both engines;
121
126
  - this engine does **not** publish `artifact-registry.jsonl`: the board's `spec_root` may still point at the previous run (a known limitation);
122
- - this engine never publishes with holes: a failed `finalize` fails the node, and `completeness: "incomplete-known"` is never written.
127
+ - this engine publishes with holes: when the `coverage-report.json` is `delivered-partial` or a gate failed, `finalize` still publishes and writes `completeness: "incomplete-known"` + `incomplete{...}`; the node succeeds, downstream consumes it as usual, and the gaps stay in specs.json incomplete and the run record, not the final report. Only "no SPEC published at all" (finalize exit 2) fails the node.
123
128
 
124
129
  ---
125
130
 
@@ -155,10 +160,13 @@ See workflow.yaml → `observability`.
155
160
  | `scripts/run_dir.mjs` | Run directory for spec generation: `--show` reads the pointer / decides between resuming and creating a new one (`--fresh`) / `--record` takes the actual directory as authoritative (pointer `${WORK}/reqgen/current.json` records the current one) |
156
161
  | `scripts/spec_layout.mjs` | The single implementation of the enrich.spec_gen artifact layout (`<run>/generation/pages` page-grouped root, location of specs.json); both engines share that publish root (page-specgen's private workspace also lives under the root) |
157
162
  | `scripts/check_signing.mjs` | adopt.signing: whether build-profile.json5 can do a signed build (`app.signingConfigs` non-empty, and the built product's `signingConfig` references one of them; only the reference missing → exit 3) |
158
- | `scripts/check_spec_pipeline_done.mjs` | Completion check for logic.spec_pipeline (all groups terminal, no unfinished chunks, Finalization has written `state.finalization`; all failed → exit 3; hard fingerprint `specs_json_sha256`/paths mismatch → exit 4; soft knobs like `wave_width` go to `soft_stale` only and do not archive; `--archive-stale` / `--archive-failed` archive only on exit 4/3 so before_run can start a new round) |
163
+ | `scripts/check_spec_pipeline_done.mjs` | Completion check for logic.spec_pipeline (all groups terminal, no unfinished chunks, Finalization has written `state.finalization` **with both gate markers** `finalization.homecheck` / `finalization.smoke` — `done` alone is not completion; all failed → exit 3; hard fingerprint `specs_json_sha256`/paths mismatch → exit 4; soft knobs like `wave_width` go to `soft_stale` only and do not archive; `--archive-stale` / `--archive-failed` archive only on exit 4/3 so before_run can start a new round) |
159
164
  | `scripts/check_module_docs_done.mjs` | Completion check for enrich.module_docs (`--mark` records the start time; the state file must be no older than it — the state file is the incremental baseline and is kept across runs) |
160
165
  | `scripts/check_ui_batch_done.mjs` | Probe 4: whether ui.batch is reusable (batch_report.md exists, batch_progress.json's mode is full, no pending pages) |
161
166
  | `scripts/ledger.mjs` | Reads/writes `${LEDGER}`: append only, kept across runs; `--start` records run_start, `--node … --status` records a node's terminal state, `--failures` lists this run's soft failures |
167
+ | `scripts/diagnose.mjs` | Incremental start-up diagnosis (read-only): scenario 1 / 2 / 3, reuse / repair / rebuild per artifact, migrated pages whose source changed and new pages, the scope `SCOPE=auto` recommends |
168
+ | `scripts/source_fp.mjs` | Per-page Android source fingerprint (UTG anchors + referenced layouts, line endings normalised); written into the ledger at finalize, so the diagnosis finds migrated pages whose source changed |
169
+ | `scripts/migration_manifest.mjs` | logic.finalize step 4: merges this round's UI / business-logic status per UTG page id into `${HMOS}/.hometrans/migration_manifest.json` (kept across runs and scopes; a failed retry never overwrites a migrated record; never fails the node) |
162
170
  | `scripts/write_resume_summary.mjs` | Write/clear resume summaries; `--show` reads a one-line progress handoff (`JSON.line`) |
163
171
  | `scripts/resume_plan.mjs` | Reuse decisions for profile=resume: inherits the original run's profile and, based on ancestors / downstream / original terminal states, yields each REUSE_*, the probe items that must be complete, and the failures carried over |
164
172
  | `scripts/android_index.mjs` | discover.android_index: the Android-side homegraph index is built / synced only here, once (init the first time, index only when incomplete, sync every time; `--check` verifies read-only); downstream only reads |