@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
@@ -106,6 +106,8 @@ closeReason/lastSubmitKey/lateEvents`.
106
106
  {"t":"…","ev":"queue-merge","group":2}
107
107
  {"t":"…","ev":"dequeue-merge","group":2}
108
108
  {"t":"…","ev":"group-merge","group":2,"landed":"<merge-sha>"}
109
+ {"t":"…","ev":"group-reopen","group":2,"wtGen":1,"base":"<sha>","worktree":"…/g2r1",
110
+ "branch":"specpipe/g2r1","reason":"premature-merge"}
109
111
  {"t":"…","ev":"group-fail","group":2}
110
112
  {"t":"…","ev":"artifact","unit":"chunk:g2c1","path":"…/attempt_1/commit-info.md"}
111
113
  ```
@@ -133,10 +135,11 @@ Every event carries `runId`. The allowed-transitions table is the contract `fold
133
135
  | `close(content-exhausted\|dead\|ladder-exhausted)` | `failed`/`orphaned` | `closed` | same identity; records `closeReason` |
134
136
  | `retry` | `failed` (content<2) / `abandoned` (force) | `pending` | clears identity, preserves `attempt`; `force` also resets `dispatchAttempts`/`contentAttempts` |
135
137
  | `group-reset` | no active unit in the group | every unit `pending` | reuse keeps the generation; fresh needs new worktree+branch; clears `mergeQueued` |
136
- | `group-merge` | any except `failed` | `merged` | clears `mergeQueued`; records the canonical `landed` merge commit and `noop` (zero-commit only when tip == the group's base, queued, all planned chunks done); **means already landed**; removes older-generation worktrees/branches; CLI-refused while `MERGE_HEAD` exists and re-checked under the ledger lock |
138
+ | `group-merge` | any except `failed` | `merged` | clears `mergeQueued`; requires every planned chunk `done`/`accepted` (`chunks-incomplete` otherwise); records the canonical `landed` merge commit and `noop` (zero-commit only when tip == the group's base, queued, all planned chunks done); **means already landed**; removes older-generation worktrees/branches; CLI-refused while `MERGE_HEAD` exists and re-checked under the ledger lock |
139
+ | `group-reopen` | `merged`/`done` with ≥1 open chunk | `pending` on a **new** generation | the sanctioned repair for a premature landing: finished chunks stay `done`, the rest **and the resolver unit** become `pending`, the group and its chunk units are re-admitted to `state.plan`, `landed`/`noop`/`mergeQueued` are cleared, `wtGen+1` + new worktree/branch recorded in `history`; a row with no recorded landing is verified against generation `wtGen` first (`landing-unrecorded`/`landing-unverifiable` otherwise); refuses `not-merged`/`nothing-to-reopen`/`active-units`/`max-generations`/`wtGen-mismatch` |
137
140
  | `group-fail` | any | `failed` | clears `mergeQueued` |
138
141
  | `group-worktree` | any | records base/worktree/branch/history, sets `provisioned` | `wtGen` required and equal to the group's current value |
139
- | `queue-merge`/`dequeue-merge` | non-terminal group | sets/clears `mergeQueued` | terminal groups rejected |
142
+ | `queue-merge`/`dequeue-merge` | non-terminal group | sets/clears `mergeQueued` | terminal groups rejected; `queue-merge` requires the same completeness as landing — every planned chunk `done`/`accepted` (`chunks-incomplete` otherwise), checked before any `git merge` |
140
143
  | `artifact` | `dispatched`/`live`/`orphaned` | sets `lastArtifact`, refreshes `lastProgress` | observation; no identity |
141
144
 
142
145
  ## Write discipline and CAS
@@ -185,6 +188,10 @@ pending --claim--> claimed(no intent) --intent--> dispatched(no session) --confi
185
188
  pending abandoned
186
189
  ```
187
190
 
191
+ Group level: `pending → coding → merged → done`, or `failed`. `merged`/`done` are terminal for
192
+ `claim`/`group-reset`; the only sanctioned way back is `group-reopen` (new generation; finished chunks
193
+ stay `done`, the rest become `pending`).
194
+
188
195
  ## Timeouts, counters, and runId
189
196
 
190
197
  | Knob | Default | Anchor | Trigger | Action |
@@ -197,7 +204,7 @@ pending --claim--> claimed(no intent) --intent--> dispatched(no session) --confi
197
204
  | `EVIDENCE_TTL` | 60 min | `submittedAt` | submitted but not released | `reject(evidence-expired)` |
198
205
  | `contentAttempts` | max 2 | — | submit/release `failed`, `reject` | one retry; the second closes |
199
206
  | `dispatchAttempts` | max 3 | — | abandon / orphan | ≥3 → `abandoned`; an orphaned unit stays orphaned for late evidence |
200
- | `MAX_GENERATIONS` | 3 | — | `group-reset fresh` | `wtGen+1 >= 3` rejected (generations 0..2) |
207
+ | `MAX_GENERATIONS` | 3 | — | `group-reset fresh` / `group-reopen` | `wtGen+1 >= 3` rejected (generations 0..2) |
201
208
 
202
209
  Progress evidence for `beat`: the maximum of the last commit's committer date, the current attempt
203
210
  directory's artifact mtimes, and the mtimes of every currently dirty path. Only mtime counts, and only
@@ -227,6 +234,7 @@ node dispatch.mjs <HMOS> release <unitId> --expect-gen <claimGen> --token <t> --
227
234
  node dispatch.mjs <HMOS> accept <unitId> --expect-gen <claimGen> --reason wave-end
228
235
  node dispatch.mjs <HMOS> close <unitId> [--expect-gen <claimGen> --token <t>] --reason content-exhausted|dead|ladder-exhausted|blocked
229
236
  node dispatch.mjs <HMOS> group-reset <G> --mode reuse|fresh --base <sha> --reason hop-b|dead [--worktree <abs> --branch <name>]
237
+ node dispatch.mjs <HMOS> group-reopen <G> [--base <sha>] [--wt-gen <n>] [--reason <text>]
230
238
  node dispatch.mjs <HMOS> group-merge <G> [--landed <merge-sha>]
231
239
  node dispatch.mjs <HMOS> group-merge <G> # zero-commit no-op only (records noop:true)
232
240
  node dispatch.mjs <HMOS> group-fail <G>
@@ -272,7 +280,10 @@ node dispatch.mjs <HMOS> progress
272
280
  if `M` is a first-parent merge on main whose subject names the generation branch (`landed-mismatch`
273
281
  otherwise). It refuses while main is mid-merge (`merge-in-progress`; git exit 1 is the only
274
282
  "no merge", any other status is `merge-head-unknown`), when the landing cannot be computed
275
- (`landed-unverifiable`), for a `failed` group (`group-failed`), and it never appends a second row: the
283
+ (`landed-unverifiable`), for a `failed` group (`group-failed`), while any planned chunk of the group is
284
+ not `done`/`accepted` (`chunks-incomplete`: while the group is still `coding`, `dequeue-merge` and finish
285
+ the rest — or `group-fail` on a `closed`/`abandoned` chunk; only an already `merged`/`done` group is a
286
+ `group-reopen` candidate; never retry), and it never appends a second row: the
276
287
  pre-append re-check under the ledger lock rejects a gen/branch/base swap (`generation-changed`) and a
277
288
  concurrent duplicate (`merge-already-recorded`). An already-landed group answers
278
289
  `{duplicate:true,verified:true}`, a legacy `merged` row without a recorded landing answers
@@ -281,6 +292,25 @@ node dispatch.mjs <HMOS> progress
281
292
  `cleaned: {removed, failed}` and removes the group's older-generation worktrees and branches after the
282
293
  merge lands; the current generation's tree is left for the audit. The orchestrator writes the group
283
294
  state marks **after** this succeeds.
295
+ - `group-reopen` is the repair for a **premature landing** (`merged`/`done` while a planned chunk is still
296
+ open; a shape an older release could write). It opens generation
297
+ `wtGen+1` from `--base` (default `HEAD`, i.e. current main), keeps `done`/`accepted` chunks untouched,
298
+ resets every other chunk unit **and the resolver unit** to `pending` (clears identity/budgets/artifacts),
299
+ re-admits the group and its chunk units to `state.plan` (a later wave's plan must not hide the reopened
300
+ group from `dispatchable`/`isComplete`), clears `landed`/`noop`/`mergeQueued`, and records the new
301
+ generation in `history` (the old one stays as the audit/cleanup record). A row with no recorded landing
302
+ (`landed == null && noop !== true`) is re-verified with `branch_landed.ts` first: `landing-unrecorded`
303
+ (nothing landed) and `landing-unverifiable` (branch state unreadable) refuse the repair, because the
304
+ post-reopen cleanup would otherwise delete the old generation's unlanded commits. It refuses a group that
305
+ is not `merged`/`done` (`not-merged`), one whose chunks are all finished (`nothing-to-reopen`), one with an
306
+ active unit (`active-units`), exhaustion of `MAX_GENERATIONS`, and a `--wt-gen` that is not `wtGen+1`
307
+ (`wtGen-mismatch`, exit 2); every refusal is judged before the tree moves. The finished chunks' code is
308
+ already on main; the reopened chunks use the new tree, and the second landing covers the complete group.
309
+ - `queue-merge` uses the **same** completeness predicate as `group-merge --landed`: every planned chunk must
310
+ be `done`/`accepted`, checked before any `git merge` (`chunks-incomplete`, exit 2). This stops an
311
+ incomplete branch before main holds a partial merge commit. A group with a `closed`/`abandoned` chunk can
312
+ never land → `group-fail <G>` instead of queueing. If an older ledger queued such a group anyway,
313
+ `dequeue-merge <G>` and fail it; `group-reopen` is only for an already-`merged`/`done` row.
284
314
  - `status` includes `cache: fresh|stale|absent|corrupt`, comparing `dispatch/state.json` with a fresh fold.
285
315
  - Lock acquisition prunes orphaned `*.stale.*`/`*.tmp`/`*.renew` files older than an hour.
286
316
 
@@ -299,11 +329,13 @@ Output: `runId`, `wave`, `complete`, `units`, `groups`, `submitted`, `failed`, `
299
329
  `spec_pipeline_state.json` — the orchestrator repairs state one way (unit terminal → chunk
300
330
  `done`/`failed`; group status; chunk rows), then reconciles once more.
301
331
 
302
- `dispatchable` enforces one chunk per group, `chunk k-1` `done` in the **ledger**, no active unit in the
332
+ `dispatchable` enforces one chunk per group, `chunk k-1` `done`/`accepted` in the **ledger**, no active unit in the
303
333
  group, no active resolver anywhere, and a free chunk slot. `groupResidue` reports `all-units-terminal`
304
- (an open group whose units are all terminal) and `failed-group-residue` (a failed group still holding a
305
- non-terminal unit, with its `units`) — both are report-only, but they are the signal that the wave cannot
306
- finish as-is. `--check` is strictly read-only: fatal → exit
334
+ (an open group whose units are all terminal), `failed-group-residue` (a failed group still holding a
335
+ non-terminal unit, with its `units`), `terminal-group-open-chunks` (a `merged`/`done` group that still owns
336
+ an open chunk — a premature landing to repair with `group-reopen`), and `open-chunks-outside-plan` (a
337
+ non-terminal group whose open chunks are no longer in `state.plan`, so dispatch and completion cannot see
338
+ them) — all are report-only, but they are the signal that the wave cannot finish as-is. `--check` is strictly read-only: fatal → exit
307
339
  2; any actionable verdict, residue, dead group, or state mismatch → exit 1; otherwise 0. It does not leak
308
340
  the claim identity: `units` carry no `claimGen`/`token`.
309
341
 
@@ -6,12 +6,13 @@ The orchestrator prints this at Finalization step 4, filling every placeholder.
6
6
  ## Spec Pipeline Overview (grouped, wave-parallel)
7
7
  - Specs: N Groups: G Scenarios: S Waves: W
8
8
  - Designed (per-chunk, in B1): A Coded+Merged (B1/B2): K Docs refreshed (B5): D Groups committed (C): C
9
- - Final build: SUCCESS / PARTIAL; Smoke: <verdict>
10
- - Static defect check (before smoke): PASS / FAIL / SKIPPED — pass→PASS; fail / build_failed / scan_error / scan_timeout→FAIL; skipped / preflight_failed / infra_error→SKIPPED; errors X → Y; fixed F; suppressed S; remaining R; build SUCCESS / FAILED
9
+ - Final build: SUCCESS / FAILED (Finalization step 1, `a2h-fix-build-errors`; `state.finalization.final_build` takes the same value, SKIPPED only for a carried-only run); Smoke: <verdict> (PASS / FAIL_CRASH / FAIL_BLANK / SKIPPED_NO_DEVICE / SKIPPED_NO_CLI / SKIPPED_HOMECHECK_BUILD_FAILED / DEPLOY_ERROR — `SKIPPED_HOMECHECK_BUILD_FAILED` is the orchestrator's own marker, written when the post-Homecheck build is still red; the smoke skill never returns it)
10
+ - Static defect check (before smoke): PASS / FAIL / SKIPPED — pass→PASS; fail / build_failed / scan_error / scan_timeout→FAIL; skipped / preflight_failed / infra_error→SKIPPED; errors X → Y; warnings X → Y (accepted A); fixed F; suppressed S; remaining R; build SUCCESS / FAILED
11
11
  - Actual-write audit: registry edits Y (coder) + R (resolver), cross-group overlaps Z, empty-diff groups (per-wave details: .hometrans/wave_<k>/claim_audit.json)
12
12
  - Dispatch-hold: held-then-released groups [G...], cycle edges ignored [G→G...] (per-wave details in the wave log); flat waves (deps forecast collapsed concurrency): waves [k...] sliced `mode: "flat"` — deps ignored, overlaps handled at B2
13
13
  - Shared layer (F0): per wave — Infra(wave K) | <commit | skipped(reason)> | docs=<sha | none> | modules=N | foundation_overlaps_after=<n> (foundation_overlaps_after: the wave's claim_audit.cross_group_overlaps files filtered against the cumulative inventory's `modules[].files`, not `wiring`)
14
- - Review (B4): per wave — rounds run R, groups reviewed per round [r1: n, r2: n, ...], groups still open after the last round [G (open scenarios)...], fix-mode Remaining Issues per group (count)
14
+ - Review (B4): per wave — rounds run R, groups reviewed per round [r1: n, r2: n, ...], groups still open after the verification review of the last round's fixes [G (open scenarios)...] (a group whose fixer or verification review failed is listed as `fixed, not re-reviewed`, never as closed), fix-mode Remaining Issues per group (count); HomeGraph evidence warnings / review_contract_violation [G...]
15
+ - HomeGraph: syncs N (I2 x, W0 y, B2 a, B3 b, B4 c, resume/build-breaker r), degraded [index: reason...], circuit-open [index...] (per-wave details in the wave log)
15
16
  - Failed groups: [...] (with downstream impact notes)
16
17
 
17
18
  ### Per-Group Results
@@ -23,5 +24,5 @@ The orchestrator prints this at Finalization step 4, filling every placeholder.
23
24
  |---|---|---|---|---|---|
24
25
 
25
26
  ### Manual Follow-up TODOs
26
- - (design issues, unfixed review defects — groups still open after the last review round, with their open scenarios and last review-fix-report —, build issues, cross-group and audit findings, state-docs evidence warnings (`state-docs-missing` / `state-docs-invalid` / `state-docs-unavailable` from the per-chunk artifacts), unfixed Homecheck errors, smoke-gate FAIL_*/SKIPPED_* outcomes)
27
+ - (design issues, unfixed review defects — groups still open after the last review round, with their open scenarios and last review-fix-report —, build issues, cross-group and audit findings, state-docs evidence warnings (`state-docs-missing` / `state-docs-invalid` / `state-docs-unavailable` from the per-chunk artifacts), unfixed Homecheck errors, Homecheck warnings left by the gate's judgement (ruleId + reason), smoke-gate FAIL_*/SKIPPED_* outcomes)
27
28
  ```
@@ -0,0 +1,229 @@
1
+ # HomeGraph CLI Guide
2
+
3
+ 本文件是 coder / reviewer / fixer / resolver / docs 子代理共用的**唯一** HomeGraph 使用指南。只允许调用 `homegraph` CLI,
4
+ 禁止使用 HomeGraph 的 MCP 工具(本仓库的文档与派发里不再出现任何 MCP 工具名);`read`/`grep` 只作为 CLI 之外的补充证据。
5
+
6
+ ## 1. Indexes
7
+
8
+ | 索引 | 归属 | 生命周期 |
9
+ |---|---|---|
10
+ | `<ANDROID>/.homegraph` | orchestrator | I2 由 `ensure_index.ts <ANDROID> --create --sync` 建一次(trigger `i2-android`),此后只读 |
11
+ | `<HMOS>/.homegraph` | orchestrator | 不存在时 I2 建(`i2-hmos`);主树每次变更之后 `sync` |
12
+ | worktree `.homegraph` | 无 | 已移除;**绝不创建、绝不查询** |
13
+
14
+ 只有 orchestrator 写索引。被 `a2h-spec-design-pipeline` 派发的 coder / reviewer / fixer / resolver / docs 子代理一律只读:
15
+ 不跑 `init`、不跑 `sync`、不跑 `index`、不跑 `unlock`。独立(未被 pipeline 派发)运行自己的 SKILL 时,仍按该 SKILL 原有规则自行探测。
16
+
17
+ `<HMOS>` 索引回答的是**主树分支**的架构、既有 API 和调用链;worktree 里正在编辑的文件只以 worktree 的 `read`/`grep` 为准(见 §4 的两条规则)。
18
+
19
+ ## 2. Lifecycle
20
+
21
+ ### 2.1 Existence
22
+
23
+ 用字面 db 路径判断索引是否存在:
24
+
25
+ ```powershell
26
+ Test-Path "<repo>/.homegraph/homegraph.db"
27
+ ```
28
+
29
+ 不要用 `homegraph status` 判断存在性:引擎会向上解析到祖先工作区的索引,对一个本地没有 db 但祖先工作区有索引的仓库也报 `initialized: true`。
30
+
31
+ ### 2.2 Initialize
32
+
33
+ ```powershell
34
+ homegraph init "<repo>"
35
+ ```
36
+
37
+ 默认上限 **300000 ms**(5 分钟);`ensure_index.ts --create` 就是它的带超时封装,默认值与之一致(`--init-timeout-ms` 可按调用覆盖)。
38
+ `init` 在目录里已经有索引 db 时什么都不做,所以**残留但不可用的索引要 `index` 重建,不是 `init`**。
39
+ `init` 超时按失败记账(`reason: "timeout"`),不要原地重试;下一次 pipeline 事件再试。
40
+
41
+ ### 2.3 Sync
42
+
43
+ ```powershell
44
+ homegraph sync -q "<repo>"
45
+ ```
46
+
47
+ `-q`(`--quiet`)只保留必要输出。pipeline 事件里**无条件**执行 `sync`(`ENGINE_MODE=off` 除外)。
48
+ 原因:`homegraph status` 的 `pendingChanges` 走 git fast path(`git status --porcelain`),只统计**未提交**改动;pipeline 的一次 commit / merge / reset 之后工作区是干净的,`status` 会报 `Index is up to date`,而索引其实落后于 HEAD。
49
+ `sync` 走文件系统扫描(先比 size/mtime,再比 content hash),能看见已提交的变更——所以是否 `sync` 永远不以 `status` 为准。
50
+
51
+ ### 2.4 Rebuild fallback
52
+
53
+ 索引不可用(`lastIndexed` 为空、`fileCount` 为 0、`index.state` 为 `indexing`/`failed`、`builtWithVersion` 与引擎版本不一致,或 `status` 根本读不出来),或一次 `sync` 失败之后,才按 holder 状态走重建:
54
+
55
+ 1. 读 `<repo>/.homegraph/homegraph.lock`。
56
+ 2. holder 不存在或进程已死 → `homegraph unlock "<repo>"`,再 `homegraph index --inplace "<repo>"`。
57
+ 3. holder 仍活着(无论能否识别出是本仓库的 builder)→ `lock_busy`,degraded:**不 kill、不 unlock、不 index**。主树的活 writer 永远不杀;等 holder 退出或下一个 pipeline 事件再试。
58
+ 4. 重建一律 `--inplace`;只有确认没有读者且调用方明确要求时才允许整库重来。
59
+
60
+ 每次失败之后**先回读 `status`**:引擎可能在行都写完之后才非零退出,只要索引完整就按成功记账,不重复重建。
61
+ `sync` 失败但旧快照仍可用时:退出 0、`reason: "sync_incomplete"`——按 degraded 记账(见 §9),本回合继续用旧快照。
62
+ db 损坏(`status` 读不出,或首次非超时的 `index --inplace` 失败且失败后回读的快照不可用):把 `<repo>/.homegraph/homegraph.db` 改名为 `<repo>/.homegraph/homegraph.corrupt-<ts>.db`,再 `init`;旧文件保留待查,绝不删除。
63
+
64
+ ### 2.5 Status
65
+
66
+ `status` 只做统计与诊断,不是新鲜度证明:
67
+
68
+ ```powershell
69
+ homegraph status --json "<repo>"
70
+ ```
71
+
72
+ (注意:`status` 的仓库是**位置参数**,其他命令用 `-p`。)读它的 `projectPath` / `indexPath` / `lastIndexed` / `fileCount` / `index.state` / `builtWithVersion` / `pendingChanges`。
73
+
74
+ - `initialized`(`ensure_index.ts` 的 JSON 字段,仅用于记账)= 本地 `homegraph.db` 存在 **且** `status` 的 `projectPath` 解析回本仓库。只查 db 文件会被祖先索引骗过。
75
+ - `status` 超时或读不出 → `unknown`,绝不写成“已初始化”。
76
+ - `pendingChanges` 只在关心“工作区有没有未提交改动”时有意义;任何 pipeline 事件都不拿它决定是否 `sync`。
77
+
78
+ ### 2.6 Pipeline sync points
79
+
80
+ 每一行都是 `node <skill-dir>/scripts/ensure_index.ts <repo> ...`;`ENGINE_MODE=off` 时**整表跳过**(一个引擎进程都不许起)。
81
+
82
+ | 时点 | 参数 | trigger |
83
+ |---|---|---|
84
+ | I2,`<ANDROID>` | `<ANDROID> --create --sync` | `i2-android` |
85
+ | I2,`<HMOS>` | `<HMOS> --create --sync` | `i2-hmos` |
86
+ | 中途重入 / resume | `<HMOS> --sync` | `resume` |
87
+ | W0,`WAVE_BASE` 固定之后、worktree 创建/分类之前 | `<HMOS> --sync` | `w0` |
88
+ | B2,每次 `group-merge` 成功之后 | `<HMOS> --sync` | `b2-merge` |
89
+ | B2 hop-b,落地/reset 改了主树代码之后 | `<HMOS> --sync` | `b2-hop-b` |
90
+ | B3,build-fixer 提交之后 | `<HMOS> --sync` | `b3-fix` |
91
+ | build breaker,其 build-fixer 提交之后 | `<HMOS> --sync` | `build-breaker` |
92
+ | B4 step 0,每一轮 | `<HMOS> --sync`(取代原来的 `status --json` 门) | `b4-step0` |
93
+ | B4,每次 review-fix 提交之后 | `<HMOS> --sync` | `b4-fix` |
94
+ | B4,该轮 rebuild 之后 | `<HMOS> --sync` | `b4-rebuild` |
95
+ | B5 docs refresh | 默认不写;只有当本轮改了 wiring 文件时才 `<HMOS> --sync` | `b5` |
96
+
97
+ 每次调用都在 wave log 追加一行,并把快照写进 `state.engine`(`android` / `hmos` / `lastSyncAt`)。
98
+
99
+ ## 3. Commands
100
+
101
+ | 目的 | 命令 |
102
+ |---|---|
103
+ | 一次问 2–5 个符号的定义、签名、调用关系 | `homegraph explore -p "<repo>" "<TypeA TypeB Type.member>"` |
104
+ | 按关键字(非精确符号名)搜 | `homegraph query -p "<repo>" "<keyword>" -l 20` |
105
+ | 谁调用它 | `homegraph callers -p "<repo>" "<Type.member>"` |
106
+ | 它调用谁 | `homegraph callees -p "<repo>" "<Type.member>"` |
107
+ | 影响面(默认深度 2,`-d` 指定跳数) | `homegraph impact -p "<repo>" -d 2 "<Type>"` |
108
+ | 某文件的符号清单 | `homegraph node -p "<repo>" -f "<file>" --symbols-only` |
109
+ | 这些文件改动会波及哪些测试文件(只列测试) | `homegraph affected -p "<repo>" "<file>..."` |
110
+ | 按模式列文件 | `homegraph files -p "<repo>" --pattern "*.ets"` |
111
+
112
+ `-j`(JSON 输出)只适用于 `status`、`query`、`callers`、`callees`、`impact`、`affected`、`files`;
113
+ **`explore` 和 `node` 没有 `-j`**(传了会报 `error: unknown option '-j'`),直接读它们的文本输出,或用 `read` 核对文件(见 §4)。
114
+
115
+ **`node` 的 CLI allowlist。** HomeGraph 1.6.4 默认只放行 `explore,project`,所以 `node` 会被引擎拒绝并提示该 tool 已 disabled。这属于 `homegraph` 二进制内部的 **CLI allowlist 检查,不是 MCP 调用**,CLI-only 规则不变。当前会话里放行 `node`:
116
+
117
+ ```powershell
118
+ $env:HOMEGRAPH_MCP_TOOLS = "explore,node"
119
+ ```
120
+
121
+ (`all` 同样可以。)放行后仍拿不到结果时,退回 `explore` + `read`,并在证据块里记 `degraded: node unavailable`。不要为了 `node` 去启用任何 MCP server。
122
+
123
+ ## 4. Query discipline
124
+
125
+ - 用**声明时的 CamelCase 符号名**(`LoginViewModel`、`AuthRepository.login`),不要用文件路径、自然语言或小写猜测。
126
+ - 成员用 `Type.member`;只问类型时用裸 `Type`。
127
+ - 一次 `explore` 放 2–5 个名字(空格分隔、整体加引号),比连发五条 `query` 更省时也更准。
128
+ - 要程序化解析时,对 `status` / `query` / `callers` / `callees` / `impact` / `affected` / `files` 加 `-j`,再用 `ConvertFrom-Json` / `Select-Object` 处理,不要解析人类可读的截断输出。`explore` 与 `node` 不接受 `-j`(`error: unknown option '-j'`):直接读文本输出,或对文件再 `read`。
129
+ - **不查 worktree**:worktree 没有索引。`<HMOS>` 索引 = 架构 / 既有 API / 调用链;`<ANDROID>` 索引 = 参考实现;worktree 的 `read`/`grep` = 本分支实际文件。
130
+ - **查询顺序**(coder):开工先对 `<HMOS>` 做一次 `explore` 建立“主仓已实现什么”的基线(本 chunk 的模块/页面/VM/共享层符号),再去读源码;设计阶段只在 **SPEC 的 `## 安卓代码参考` 缺 anchor / anchor 模糊 / 需要跨文件调用链** 时对 `<ANDROID>` 查询,不要按场景机械地逐个查;改动共享层/公共 API 时再补 `impact`/`callers`。
131
+ - **不要截断 `explore` 输出**:禁止 `homegraph explore ... | Select-Object -First N`。explore 的输出前半段常是 `Partial locator` / import 解析说明,截断后会误判“文件不在索引里”。需要定点信息时改用 `query -l` 或 `node -f ... --symbols-only`;需要确认文件是否存在时用 `files --pattern`。
132
+ - 分支隔离规则(适用于在分支 worktree 工作的 coder/resolver;reviewer 在主树上,见 §6):
133
+ - **`index_ahead`**:索引里有、worktree 里没有。这通常是别组已合并的代码或更晚的提交。**不要 import、不要复制、不要重写**;记 `index_ahead`,确实依赖它时等依赖组合并。`shared-layer-list` / `wiring-list` 仍是权威清单——索引里没有符号永远不构成重写共享代码的理由。
134
+ - 反向情况:符号在这里存在、索引里却没有 → **trust the worktree**。worktree 是这些文件的唯一真相;把名字再传给 `explore` 一次(可能只是快照落后),仍没有就 `read` 该文件并引用 `file:line`。
135
+
136
+ ## 5. Reading the output
137
+
138
+ - `stale`:这份答案涉及的文件比快照新,行号可能已经漂移。记下来,下一轮开始前由 orchestrator `sync`;本次先用 `read` 核对 anchor。
139
+ - `ambiguous_anchor`:查询命中多个声明,CLI 替你挑了一个。改用 `Type.member` 或更长的限定名重问。
140
+ - `scope_limit`:索引覆盖的根/文件比查询范围小(例如模块根之外)。**不要据此断言“不存在”**,用 `read`/`grep` 补。
141
+ - `Partial locator`:explore 本轮只覆盖了预算内的部分上下文(并列出 `Unresolved` / `context expansion limit`)。**它不代表文件不在索引里**;用 `files --pattern` 或 `query` 确认,再决定是否 `read`,绝不因为 partial 输出就断言“索引缺文件”。
142
+ - `unavailable`:没有可用索引(缺失、degraded 或引擎报错)。退回 `read`/`grep`,并在证据块记下降级原因。
143
+ - **footer 不是新鲜度证明**:一次性 CLI 运行会在同一个回答里既列出 `stale` 又打印 `complete and up to date`,因为 footer 读的是只有 MCP watcher 才会填充的 pending 集合。以 `stale` 条目为准,永远不要信 footer。
144
+ - 空结果 ≠ 不存在:`explore` 没命中时先用 `query` 搜关键字,再 `files` + `read`。
145
+
146
+ ## 6. Role recipes
147
+
148
+ ### Coder
149
+
150
+ 1. 读本指南。
151
+ 2. **开工先查 `<HMOS>`**:在写设计/读源码之前,对 `<HMOS>` 做一次 `explore`,用本 chunk 的模块/页面/VM/共享层符号(2–5 个)建立“主仓已实现什么”的基线。这一步是强制的(`ENGINE_MODE != off` 且 `<HMOS>` ready 时);没查就在证据段记 `fallback: <原因>` 或 `degraded: <原因>`。
152
+ 3. **设计阶段查 `<ANDROID>` 的时机**:只有 SPEC 的 `## 安卓代码参考` 缺 anchor、anchor 指向不明确,或一个场景涉及跨文件调用链时,才对 `<ANDROID>` 做一次 `explore`(用该场景涉及的符号);anchor 已经给出文件:line 的,直接 `read` 那个文件,不要为“每个场景都查一次”而重复查询。
153
+ 4. **改动共享层/公共 API 时**再补 `impact`/`callers`;否则 `explore` 足够。
154
+ 5. 需要确认的文件一律以 worktree `read`/`grep` 为准(§4 的两条规则)。
155
+ 6. 把查询按阶段写进 `commit-info.md` 的 `## HomeGraph evidence` 段;第一行必须是 `start | hmos`:
156
+
157
+ ```markdown
158
+ ## HomeGraph evidence
159
+ - start | hmos | `explore -p "<HMOS>" "LoginPage LoginViewModel AuthRepository"` → `LoginViewModel.ets:88`
160
+ - design | android | `explore -p "<ANDROID>" "LoginActivity LoginViewModel AuthRepository"` (SPEC so-2 场景三 anchor 缺失) → `LoginActivity.kt:104`, `AuthRepository.kt:57`
161
+ - code | hmos | `impact -p "<HMOS>" -d 2 "LoginViewModel"` (共享层改动) → `RouteTable.ets:31`
162
+ - anchors: `LoginViewModel.ets:88`, `AuthRepository.ets:41`
163
+ - degraded: none
164
+ ```
165
+
166
+ 缺这一段、段内没有任何 `file:line`、或**有 anchor 但没有 `start | hmos` 行** → `homegraph-evidence-missing` / `homegraph-start-missing`(`auto` 警告,`required` 失败)。派发里带了 `engine-degraded-reason` 时,把原因写进同一段并继续;`ENGINE_MODE=required` 且 `<HMOS>` 索引缺失,则在 step 0 停下。
167
+
168
+ ### Reviewer
169
+
170
+ 1. `explore` on `<HMOS>`:本轮改动的符号。
171
+ 2. `impact` 或 `callers` on `<HMOS>`:启动路径 / 回归面。
172
+ 3. `explore` on `<ANDROID>`:与原实现对照(parity)。
173
+ 4. 索引是主树快照,可能落后于主树(尤其 B4 step 0 的 `sync` 失败或 `sync_incomplete`):索引命中的符号可能已在树里删除,树里的符号也可能尚未进索引。不要仅凭索引命中判定场景——用 `Read`/`Grep` 核对并引用树的 `file:line`。reviewer 不适用 `index_ahead`(那是分支 worktree 的规则)。
174
+ 5. 不要截断 `explore` 输出(`| Select-Object -First N`);`Partial locator` 只表示本轮预算没覆盖全,不代表文件不在索引里——用 `files --pattern` 或 `query` 确认后再决定是否 `read`。
175
+ 6. 在 `code-review-report.md` 写 `## HomeGraph evidence`(查询、`file:line`、`stale`/degraded 注记);orchestrator 在 B4 step 5 会把这一段原样复制进 `findings.md`。
176
+
177
+ ```markdown
178
+ ## HomeGraph evidence
179
+ - `explore -p "<HMOS>" "LoginViewModel AuthRepository"` → `LoginViewModel.ets:88`
180
+ - `impact -p "<HMOS>" -d 2 "LoginPage"` → `RouteTable.ets:31`
181
+ - `explore -p "<ANDROID>" "LoginActivity AuthRepository"` → `AuthRepository.kt:57`
182
+ - stale: none
183
+ - degraded: none
184
+ ```
185
+
186
+ 唯一的跳过理由:资源/JSON-only 改动,可写 `not-applicable` 并列出文件。缺段在 `auto` 下是 warning;`required` 下重派一次,仍缺则记 `review_contract_violation`,保留本轮 verdict,绝不要变成空的“missing report”。
187
+
188
+ ### Fixer
189
+
190
+ `review-fix-report.md` 至少记录一条用于定位缺陷的 `explore`/`impact`(命令 + 结果 + `file:line`)。reviewer 的 `## HomeGraph evidence` 已随 `findings.md` 下传,可直接引用。
191
+
192
+ ### Resolver
193
+
194
+ 只读 `<HMOS>` 与 `<ANDROID>`(禁止任何 init/sync/index/unlock);把用过的查询写进 `resolver/attempt_<n>/notes.md`,并可在 merge commit body 里复述。
195
+
196
+ ## 7. Concurrency
197
+
198
+ **范围**:本节这些只读规则 **scoped to `a2h-spec-design-pipeline` dispatch**;独立运行(未被 pipeline 派发)的 coder / reviewer / docs skill 保留自己的 init/sync 行为。
199
+
200
+ - 单写者:只有 orchestrator 的 `ensure_index.ts` 写索引,同一时刻至多一个写操作。
201
+ - 读者走 WAL:查询看到的是最近一次已提交快照,所以 `sync` 进行中的查询可能返回上一版;不要据此判定索引坏了。
202
+ - engine lock(`.homegraph/homegraph.lock`)是唯一的互斥手段;没有别的锁文件,也不要自己加。
203
+ - 任何命令返回 `lock_busy` 就立即退化(记 degraded、本次用旧快照或 `read`),**不要循环重试、不要 kill、不要 unlock**;下一个 pipeline 事件自然会再试。
204
+
205
+ ## 8. Windows / PowerShell
206
+
207
+ - 路径和查询都加引号:`homegraph explore -p "C:\path with space" "TypeA TypeB"`;路径末尾别再带 `\`,否则会把收尾引号转义掉。
208
+ - 用 `ConvertFrom-Json` + `Select-Object`(必要时 `-First N`)处理 `-j` / `--json` 输出,不要用 `head`。
209
+ - `status` 的仓库是位置参数;其余命令用 `-p`。不要把一种写法套到另一种上。
210
+ - 超时**不会**杀掉 writer:PowerShell / `spawnSync` 只结束 `cmd.exe` shim,引擎的 writer 可能活下来并继续持有 `homegraph.lock`;下一次调用读到“活的 holder”就返回 `lock_busy`。主树上永远不要手工 kill 它。
211
+ - 需要静音 stderr 用 `2>$null`;判断原生命令结果看 `$LASTEXITCODE`,不要看 `$?`。
212
+ - Windows 上的替换/占用问题(EPERM)正是重建只用 `--inplace`、且从不删除 db 的原因。
213
+
214
+ ## 9. Degradation
215
+
216
+ - `init` 失败或超时(默认 300000 ms):记 `action:"init"`, `reason:"init_failed"`/`"timeout"`, `degraded:true`。`auto` 下继续(子代理退回 `read`/`grep`);`required` 下硬停。
217
+ - `sync` 失败且重建也失败:记 `reason:"sync_failed"`/`"index_failed"`/`"index_incomplete"`, `degraded:true`;旧索引保留。
218
+ - 活着的未识别 holder:`lock_busy`,不 unlock、不 index;degraded,等下一个 pipeline 事件。
219
+ - `sync` 之后仍 `stale`:文件在扫描之后又变了(worktree 的编辑本来就不进主索引),或引擎漏扫;记录后继续,下一轮开始前再 `sync`。
220
+ - `reason:"sync_incomplete"`:JSON 的 `degraded` 可能是 `false`、退出码是 0,但**按 degraded 记账**(快照可用但已陈旧)——orchestrator 必须用 `reason === 'sync_incomplete'` 判断,不能只看 `degraded`。
221
+ - 熔断:同一索引在一个 campaign 内连续两次**非 `lock_busy`** 的 init/sync 失败 → 置 `state.engine.hmos.degraded = true`,本 campaign 后续跳过所有 sync,记 `circuit_open`;resume 或下一 wave 重置。
222
+ - `ENGINE_MODE=required`:required 引擎失败 = campaign 硬停:写 `state.engine_blocked = {index, reason, at}`、wave log,停 waker,保留 ledger/worktree 供检查;`resume` 重试成功后清除。
223
+
224
+ ## 10. Performance
225
+
226
+ - 单次查询通常 1–2 s;索引已建好时 `explore` 是最划算的一次调用。
227
+ - `sync` 是唯一的重调用:把 `durationMs` 记进 `state.engine.lastSyncAt` / wave log;单次超过 5 s 时在同一轮内合并后续触发。
228
+ - 一次 `explore` 问 2–5 个名字,优于多次 `query`;同一回合不要对同一 anchor 重复查询,直接复用证据块。
229
+ - `-j` 只用于 `status` / `query` / `callers` / `callees` / `impact` / `affected` / `files`:一次拿结构化结果,避免为了解析再跑第二遍;`explore` / `node` 直接读文本。
@@ -19,9 +19,15 @@ stable and cross-referenced by the rest of the skill (I5 continues them in `SKIL
19
19
 
20
20
  Resume compares exactly `specs_json / specs_json_sha256 / android / hmos / design_dir / grouping / wave_width / max_scenarios_per_chunk / engine_mode / design_granularity / shared_layer / source_kind` — a legacy state missing either F0 field compares as its default (`auto` / `android`), never as a divergence (see 8c).
21
21
 
22
- - **Resume** (state exists): run the same command **without** `--emit-state` (idempotent; exit 3 = specs.json content changed → stop; exit 4 = legacy campaign (no per-chunk design marker) → archive with check_spec_pipeline_done.mjs --archive-stale and restart **only when the campaign is unfinished**: a legacy campaign whose groups are all done is reused as-is (check_spec_pipeline_done.mjs exits 0) and must NOT be archived/re-run — its output is already merged. Archiving an unfinished legacy campaign loses its progress (groups are re-designed and re-coded from scratch): say so in the report); then verify the state's `config` matches the resolved inputs (diverged → stop and tell the user, never mix two runs; the I2 probe result `state_docs_mode` is excluded, see 7b).
22
+ - **Resume** (state exists): run the same command **without** `--emit-state` (idempotent; exit 3 = specs.json content changed → stop; exit 4 = legacy campaign (no per-chunk design marker) → archive with check_spec_pipeline_done.mjs --archive-stale and restart **only when the campaign is unfinished**: a legacy campaign whose groups are all done is reused as-is (check_spec_pipeline_done.mjs exits 0) and must NOT be archived/re-run — its output is already merged. Archiving an unfinished legacy campaign loses its progress (groups are re-designed and re-coded from scratch): say so in the report); then verify the state's `config` matches the resolved inputs (diverged → stop and tell the user, never mix two runs; the I2 probe results `state_docs_mode` / `api_docs_mode` are excluded, see 7b/7c).
23
23
 
24
24
  It writes `<HMOS>/.hometrans/spec_group_plan.json` (groups with their group-level `deps`, per-spec rows, merged-spec paths, chunks), one `spec_group_<G>/merged_spec.md` per group, one `spec_group_<G>/chunk_<k>_spec.md` per chunk, and on a fresh run the state seed (schema `spec_pipeline_state/v2`, `config.design_granularity: "chunk"`). If it reports `[ERROR]` (missing spec file, bad JSON), resolve with the user **now**. Surface its `warnings` (non-contiguous directory blocks, zero-scenario specs, oversized specs) in the plan announcement.
25
+
26
+ **Incremental migration** (a2h-app-migrate `PROFILE=incremental`): when specs.json carries `scope.scope_id` and `<HMOS>/.hometrans/ui_info/conversion_set.json` (override: `--conversion-set <path>`) is an incremental plan with the **same** `scope_id`, `plan_groups.ts` maps each row's `spec_id` to the `existing_writes` a2h-batch-ui-align recorded for that page's group — the HarmonyOS files that existed **before** this run (enumerated at I3, before any write). They appear as `existing` on the spec row of `spec_group_plan.json` (`existing_specs` counts them in its stdout) and as an "existing HarmonyOS code — edit, never recreate" block after that spec in `merged_spec.md` and its chunk spec, so the designer and coder extend those files in place instead of creating a parallel file. A conversion set of another scope, or a full run, marks nothing.
27
+
28
+ With a v2 feature scope, `plan_groups.ts` also reads `<HMOS>/.hometrans/incremental/scope.json` (same `scope_id` only) and appends, after each SUP / CHG spec, a "this round's features" block listing the features (and, for CHG, the change): the coder implements exactly those inside the existing code, modifies a changed behavior's implementation instead of adding a second one, and leaves the rest of the page as it is.
29
+
30
+ **Carry-over (incremental phase 2).** On a fresh run (`--emit-state`) `plan_groups.ts` looks at the latest archived campaign (`<HMOS>/.hometrans/spec_pipeline_archive/<ts>/spec_pipeline_state.json`) whose specs.json still has the sha256 it was seeded from. A row of the new specs.json with the same `spec_id` and `content_sha256` as a spec that campaign finished (or itself carried) is **carried**: its code is already merged, so it is planned in no group, a dep on it counts as satisfied, and it is listed in `state.carried` / the plan's `carried` (stdout `carried`). Changed and new specs are planned as usual; a resume keeps the recorded decision; `--no-carry` re-plans everything. When every spec is carried there is no group: the state is seeded with `finalization.carried_only` (stdout `carried_only: true`) — skip I2 onward and report "nothing to re-code: every spec is unchanged since it was landed"; `check_spec_pipeline_done.mjs` counts such a campaign as done.
25
31
  2b. Resolve the wiring surface (deterministic, single source of truth):
26
32
 
27
33
  ```
@@ -34,7 +40,26 @@ stable and cross-referenced by the rest of the skill (I5 continues them in `SKIL
34
40
  ### I2 — Resolve environment prerequisites
35
41
 
36
42
  4. Confirm `DEVECO_HOME` (`--deveco-home`, else env `DEVECO_HOME`/`DEVECO_SDK_HOME`) resolves (build-fixer needs it). Confirm `HMOS` is a git repository. Confirm **Node ≥ 22.18** (`node --version`; `--experimental-strip-types` is also acceptable). Missing → resolve **now** or abort. Soft note (never a stop): **git ≥ 2.38** enables the wave-end audit's resolver hand-edit layer (`merge-tree --write-tree`); older git degrades that one layer fail-soft (stderr warning).
37
- 5. Confirm the Homegraph engine is runnable with a **read-only, fast** probe: `homegraph --version` and `homegraph status --json <HMOS>` — `status` is the readiness verdict (`initialized: true`) and never writes. **Skip this step entirely when `ENGINE_MODE=off`** (no engine command may run at all). Do **not** use `homegraph init`/`index` as the probe: on Harmony projects the 1.6.x engine can finish writing the index in seconds and then spin forever before its finalize step, so the probe blocks until the shell timeout and leaves `index.state: "indexing"`. Run one bounded `homegraph init -i <HMOS>` **only** when `status` reports `initialized: false`, with a **120000 ms** timeout, and treat a timeout as degraded (`ENGINE_MODE=auto`, record it, continue without the graph). If not runnable, set `ENGINE_MODE=auto` with the user **now**.
43
+ 5. Ensure both HomeGraph indexes, **CLI only**. **Skip this step entirely when `ENGINE_MODE=off`**.
44
+ Otherwise run, in this order (triggers `i2-android`, then `i2-hmos`):
45
+ ```
46
+ node <skill-dir>/scripts/ensure_index.ts <ANDROID> --create --sync
47
+ node <skill-dir>/scripts/ensure_index.ts <HMOS> --create --sync
48
+ ```
49
+ `--create` initializes the local `.homegraph/homegraph.db` only when it is absent; `--sync`
50
+ refreshes an existing one. `ensure_index.ts` owns the **300000 ms** `init` bound, the holder-aware
51
+ `unlock`/`index --inplace` fallback, quarantine of a corrupt db, and the `lock_busy` refusal.
52
+ Do **not** use `homegraph status` as a freshness gate: it reads git's uncommitted set, so after a
53
+ pipeline commit it reports "up to date" while the index is behind HEAD; pipeline events sync
54
+ unconditionally. Record both JSON lines in `state.engine.{android,hmos}`. Exit 1 under
55
+ `ENGINE_MODE=auto` → record `reason`/`detail`, mark that index degraded and continue;
56
+ exit 0 with `reason: "sync_incomplete"` also counts as a degraded refresh. Under `ENGINE_MODE=required` → hard stop with `state.engine_blocked = { index: "android" | "hmos", reason, at }`
57
+ (the index whose call failed — resume retries exactly that one). The `<ANDROID>` index is a
58
+ write into the source repository: announce it at I4, and only an existing `<ANDROID>/.gitignore`
59
+ may gain a `.homegraph/` entry. If the engine is not runnable at all, set `ENGINE_MODE=auto` with
60
+ the user **now**. If `state.config.homegraph.init_timeout_ms` is set (a number, or
61
+ `{ "android": N, "hmos": M }`), pass it as `--init-timeout-ms` for the corresponding repo; the
62
+ default stays 300000 ms.
38
63
  6. Confirm the semantic docs the B1 design step reads: `project_design.md` (required; resolved from `<HMOS>/.hometrans/`), `database_design.md` / `preferences_design.md` (optional). If `project_design.md` is absent the I3 baseline seed **must** run.
39
64
  6b. Validate `DESIGN_DIR`: it may be absent (I3 creates it), must not be a file, must not equal `HMOS`, must not be a symlink/junction pointing outside `HMOS`; when it exists inside `HMOS`, `git -C <HMOS> ls-files -- <rel>` must be empty. Abort on violation.
40
65
  7. Resolve `DOCS_MODE` (`skill` | `script` | `off`) by trial-invoking the semantic-docs path; record it run-wide.
@@ -45,8 +70,15 @@ stable and cross-referenced by the rest of the skill (I5 continues them in `SKIL
45
70
  ```
46
71
 
47
72
  Exit 0 → `available`; `devecocli` missing, an empty result, or any permanent failure → `unavailable`. While the output contains `Lock file is already being held`, another devecocli process is building the index: retry with backoff for about 2 minutes before deciding. Record the verdict in `state.config.state_docs_mode`; a resume reuses it when present and runs this probe when the field is absent (a state seeded before this feature) — never abort, never ask — and announce it at I4. `unavailable` only downgrades the coder gate — the coder falls back to `references/ISSUES.md` and records `state-docs: unavailable`; it never stops the run. `state_docs_mode` is a probe result, not a resolved input: exclude it from the resume `config` divergence comparison.
73
+ 7c. Resolve `API_DOCS_MODE` (`available` | `unavailable`) once, for the coder's platform-API doc gate (`a2h-arkts-logic-coder` → `references/code-generation.md` Step 2, the "Platform API doc gate" block). Probe the **second** catalogue — 7b only proves the guides index is built:
74
+
75
+ ```
76
+ devecocli docs search "@ohos.net.http" --catalog harmonyos-references --format json --limit 1
77
+ ```
78
+
79
+ Exit 0 with at least one hit → `available`; otherwise `unavailable` (same lock-retry budget as 7b). Record it in `state.config.api_docs_mode`: a resume reuses it when present and runs this probe again when the field is absent (a state seeded before this feature), so an older campaign never resumes with the gate silently off — never abort, never ask. Exclude it from the resume `config` divergence comparison (it is a probe result, not an input), and announce it at I4 together with `state_docs_mode`. The two are independent: `api_docs_mode` only softens the API lookup, and a coder that writes `api-docs: unavailable` reports its `state-docs` verdict unchanged.
48
80
  8. Resolve run-wide knobs: `MVVM_MODE` (default `true`), `MAX_ROUNDS_REVIEW` (default `2`).
49
- 8b. Resolve the Homecheck static-defect check: locate the installed `homecheck` package (`HOMECHECK_HOME` env, else `npm root -g`, else the `homecheck` binary on `PATH` — the same chain `homecheck_scan.ts` uses), confirm `config/ruleSet.json` contains `@arkui-semantic-correctness`, `@correctness`, and `@compatibility`, confirm the skill's own `rules/migration-rules` package is present (the scan's fourth rule set), and resolve the OpenHarmony/HMS ETS SDK paths from `DEVECO_SDK_HOME` / `DEVECO_HOME` (or the legacy `OHOS_SDK_PATH` / `HMS_SDK_PATH`; OS environment only). If any of these cannot be resolved, record the skip now: `state.post_homecheck = { status: "skipped", note: <what was missing>, at }` (the orchestrator's own write — no gate dispatch this campaign, the final report shows SKIPPED, the smoke gate still runs, and the skip is never retried on resume). Homecheck unavailability is a skip, never an abort.
81
+ 8b. Resolve the Homecheck static-defect check: locate the installed `homecheck` package (`HOMECHECK_HOME` env, else `npm root -g`, else the `homecheck` binary on `PATH` — the same chain `homecheck_scan.ts` uses), confirm `config/ruleSet.json` contains `@arkui-semantic-correctness` and `@correctness`, confirm the skill's own `rules/migration-rules` package is present (the scan's additional rule set), and resolve the OpenHarmony/HMS ETS SDK paths from `DEVECO_SDK_HOME` / `DEVECO_HOME` (or the legacy `OHOS_SDK_PATH` / `HMS_SDK_PATH`; OS environment only). If any of these cannot be resolved, record the skip now: `state.post_homecheck = { status: "skipped", note: <what was missing>, at }` (the orchestrator's own write — no dispatch this campaign; the final report shows SKIPPED, the smoke gate still runs, the skip is never retried on resume, and it satisfies Finalization's precondition). Homecheck unavailability is a skip, never an abort.
50
82
  8c. Resolve the optional `SOURCE_KIND` (`android|uniapp`, default `android`) and store it in
51
83
  `state.config.source_kind`. Resolve `SHARED_LAYER` (`auto|off`, default `auto`) into
52
84
  `state.config.shared_layer`. Both are input-divergence items; a legacy state missing them uses
@@ -61,11 +93,11 @@ stable and cross-referenced by the rest of the skill (I5 continues them in `SKIL
61
93
  node <skill-dir>/scripts/git_baseline.ts <HMOS> --design-dir <DESIGN_DIR>
62
94
  ```
63
95
 
64
- Gitignores `.hometrans/` + `.homegraph/` (an in-repo custom design dir is appended to `.gitignore`); before the first wave, commits an unborn-HEAD / dirty tree (a fresh scaffold: only `git init`, upstream output uncommitted) as `pre-campaign baseline` so W0 has a `WAVE_BASE` and a clean tree. No-op once a wave exists (mid-campaign dirt stays W0's to judge). Keep `head` / `files` for I4 and the final report. Exit 1 → abort, like an I2 miss. The committed `.homegraph/` rule is load-bearing beyond the main tree: `ensure_wt_index.ts` refuses to write a worktree index when the rule is missing there (an unignored index would dirty the tree and leak into coder commits) — do not remove it.
96
+ Gitignores `.hometrans/` + `.homegraph/` (an in-repo custom design dir is appended to `.gitignore`); before the first wave, commits an unborn-HEAD / dirty tree (a fresh scaffold: only `git init`, upstream output uncommitted) as `pre-campaign baseline` so W0 has a `WAVE_BASE` and a clean tree. No-op once a wave exists (mid-campaign dirt stays W0's to judge). Keep `head` / `files` for I4 and the final report. Exit 1 → abort, like an I2 miss. The committed `.homegraph/` rule stays load-bearing: `ensure_index.ts` refuses to write an index whose database would be tracked, and amends an existing `.gitignore` instead of committing a db — do not remove it.
65
97
  10. **Seed the semantic-docs baseline once** (via the `DOCS_MODE` path), commit as `semantic-docs baseline`. Skip if the baseline state already exists.
66
98
  10b. **Campaign identity.** If `state.config.campaign_id` is absent, generate one and persist it with the state write: `node -e "process.stdout.write(crypto.randomUUID())"`. A resume keeps the existing value — it identifies this campaign, not this process. This nonce (never `specs_json_sha256`, which is identical when the same specs.json starts a new campaign) is the `runId` the Homecheck gate dispatch carries.
67
99
 
68
100
  ### I4 — Announce, then commit to autonomous execution
69
101
 
70
- 11. Announce the resolved plan: group table (G, group_id, spec count, scenario count, chunk count), `ANDROID`/`HMOS`/`DESIGN_DIR`, all flags, `state_docs_mode`, warnings, the git baseline (`git_baseline.ts` head + committed file count, or "already clean"), the wiring-surface summary (framework/abilities/database/routes counts from `resolve_wiring.ts` — the user may correct the list now, the one interactive window), and the wave-loop outline (S0 → F0 → W0 → B1..C per wave).
102
+ 11. Announce the resolved plan: group table (G, group_id, spec count, scenario count, chunk count), `ANDROID`/`HMOS`/`DESIGN_DIR`, all flags, `state_docs_mode`, `api_docs_mode`, the two HomeGraph index paths with their I2 verdicts (`<ANDROID>/.homegraph`, `<HMOS>/.homegraph`; the `<ANDROID>` index is a write into the source repository, and only an existing `<ANDROID>/.gitignore` may gain a `.homegraph/` entry), warnings, the git baseline (`git_baseline.ts` head + committed file count, or "already clean"), the wiring-surface summary (framework/abilities/database/routes counts from `resolve_wiring.ts` — the user may correct the list now, the one interactive window), and the wave-loop outline (S0 → F0 → W0 → B1..C per wave).
71
103
  12. From here the run is autonomous: no prompts, no mid-run branching. Per-group failures are recorded (state + final report) and skipped.