@buaa_smat/hometrans 26.0.3 → 26.0.4-devecocli.1

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 (780) hide show
  1. package/agents/code-reviewer.md +91 -21
  2. package/devecocli-plugin/common.ts +2271 -0
  3. package/devecocli-plugin/content-resolver.ts +363 -0
  4. package/devecocli-plugin/install.ts +72 -0
  5. package/devecocli-plugin/uninstall.ts +26 -0
  6. package/devecocli-plugin/update.ts +77 -0
  7. package/i18n/agents/code-reviewer.md +93 -21
  8. package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
  9. package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
  10. package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
  11. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
  12. package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
  13. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
  14. package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
  15. package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
  16. package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
  17. package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
  18. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
  19. package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
  20. package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
  21. package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
  22. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
  23. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
  24. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
  25. package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
  26. package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
  27. package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
  28. package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
  29. package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
  30. package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
  31. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
  32. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
  33. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
  34. package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
  35. package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
  36. package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
  37. package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
  38. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
  39. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
  40. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
  41. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
  42. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
  43. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
  44. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
  45. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
  46. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
  47. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
  48. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
  49. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
  50. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
  51. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
  52. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
  53. package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
  54. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
  55. package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
  56. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
  57. package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
  58. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
  59. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
  60. package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
  61. package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
  62. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
  63. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
  64. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
  65. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
  66. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
  67. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
  68. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
  69. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
  70. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
  71. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
  72. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
  73. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
  74. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
  75. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
  76. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
  77. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
  78. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
  79. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
  80. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
  81. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
  82. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
  83. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
  84. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
  85. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
  86. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
  87. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
  88. package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
  89. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
  90. package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
  91. package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
  92. package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
  93. package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
  94. package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
  95. package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
  96. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
  97. package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
  98. package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
  99. package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
  100. package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
  101. package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
  102. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
  103. package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
  104. package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
  105. package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
  106. package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
  107. package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
  108. package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
  109. package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
  110. package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
  111. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
  112. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
  113. package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
  114. package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
  115. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
  116. package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
  117. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
  118. package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
  119. package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
  120. package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
  121. package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
  122. package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
  123. package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
  124. package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
  125. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
  126. package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
  127. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
  128. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
  129. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
  130. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
  131. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
  132. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
  133. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
  134. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
  135. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
  136. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
  137. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
  138. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
  139. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
  140. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
  141. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
  142. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
  143. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
  144. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
  145. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
  146. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
  147. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
  148. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
  149. package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
  150. package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
  151. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
  152. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
  153. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
  154. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
  155. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
  156. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
  157. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
  158. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
  159. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
  160. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
  161. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
  162. package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
  163. package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
  164. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
  165. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
  166. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
  167. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
  168. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
  169. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
  170. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
  171. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
  172. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
  173. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
  174. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
  175. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
  176. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
  177. package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
  178. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
  179. package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
  180. package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
  181. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
  182. package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
  183. package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
  184. package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
  185. package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
  186. package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
  187. package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
  188. package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
  189. package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
  190. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
  191. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
  192. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
  193. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
  194. package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
  195. package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
  196. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
  197. package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
  198. package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
  199. package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
  200. package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
  201. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
  202. package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
  203. package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
  204. package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
  205. package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
  206. package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
  207. package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
  208. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
  209. package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
  210. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
  211. package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
  212. package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
  213. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
  214. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
  215. package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
  216. package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
  217. package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
  218. package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
  219. package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
  220. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
  221. package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
  222. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
  223. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
  224. package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
  225. package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
  226. package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
  227. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
  228. package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
  229. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
  230. package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
  231. package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
  232. package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
  233. package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
  234. package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
  235. package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
  236. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
  237. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
  238. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
  239. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
  240. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
  241. package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
  242. package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
  243. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
  244. package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
  245. package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
  246. package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
  247. package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
  248. package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
  249. package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
  250. package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
  251. package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
  252. package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
  253. package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
  254. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
  255. package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
  256. package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
  257. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
  258. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
  259. package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
  260. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
  261. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
  262. package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
  263. package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
  264. package/index.js +1643 -0
  265. package/package.json +10 -13
  266. package/plugin.jsonc +12 -0
  267. package/skills/a2h-app-migrate/SKILL.md +19 -11
  268. package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
  269. package/skills/a2h-app-migrate/references/stage-map.md +2 -2
  270. package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
  271. package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
  272. package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
  273. package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
  274. package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
  275. package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
  276. package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
  277. package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
  278. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
  279. package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
  280. package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
  281. package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
  282. package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
  283. package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
  284. package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
  285. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
  286. package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
  287. package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
  288. package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
  289. package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
  290. package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
  291. package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
  292. package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
  293. package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
  294. package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
  295. package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
  296. package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
  297. package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
  298. package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
  299. package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
  300. package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
  301. package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
  302. package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
  303. package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
  304. package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
  305. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
  306. package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
  307. package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
  308. package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
  309. package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
  310. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
  311. package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
  312. package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
  313. package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
  314. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  315. package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
  316. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
  317. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
  318. package/skills/a2h-arch-generate/SKILL.md +20 -17
  319. package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
  320. package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
  321. package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
  322. package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
  323. package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
  324. package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
  325. package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
  326. package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
  327. package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
  328. package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
  329. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
  330. package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
  331. package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
  332. package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
  333. package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
  334. package/skills/a2h-batch-ui-align/SKILL.md +72 -22
  335. package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
  336. package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
  337. package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
  338. package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
  339. package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
  340. package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
  341. package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
  342. package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
  343. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
  344. package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
  345. package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
  346. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
  347. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
  348. 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
  349. package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
  350. package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
  351. package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
  352. package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
  353. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
  354. package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
  355. package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
  356. package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
  357. package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
  358. package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
  359. package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
  360. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
  361. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
  362. package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
  363. package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
  364. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
  365. package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
  366. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
  367. package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
  368. package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
  369. package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
  370. package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
  371. package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
  372. package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
  373. package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
  374. package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
  375. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
  376. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
  377. package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
  378. package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
  379. package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
  380. package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
  381. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
  382. package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
  383. package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
  384. package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
  385. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
  386. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
  387. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
  388. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
  389. package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
  390. package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
  391. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
  392. package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
  393. package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
  394. package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
  395. package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
  396. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
  397. package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
  398. package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
  399. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
  400. package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
  401. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
  402. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
  403. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
  404. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
  405. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
  406. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
  407. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
  408. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
  409. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
  410. package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
  411. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
  412. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
  413. package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
  414. package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
  415. package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
  416. package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
  417. package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
  418. package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
  419. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
  420. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
  421. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
  422. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
  423. package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
  424. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
  425. package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
  426. package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
  427. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
  428. package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
  429. package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
  430. package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
  431. package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
  432. package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
  433. package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
  434. package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
  435. package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
  436. package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
  437. package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
  438. package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
  439. package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
  440. package/skills/a2h-page-specgen/SKILL.md +124 -20
  441. package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
  442. package/skills/a2h-page-specgen/references/body-language.md +11 -9
  443. package/skills/a2h-page-specgen/references/evidence.md +35 -0
  444. package/skills/a2h-page-specgen/references/execution-model.md +135 -26
  445. package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
  446. package/skills/a2h-page-specgen/references/gates.md +120 -52
  447. package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
  448. package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
  449. package/skills/a2h-page-specgen/references/spec-example.md +312 -0
  450. package/skills/a2h-page-specgen/references/spec-template.md +112 -109
  451. package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
  452. package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
  453. package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
  454. package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
  455. package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
  456. package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
  457. package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
  458. package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
  459. package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
  460. package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
  461. package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
  462. package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
  463. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
  464. package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
  465. package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
  466. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
  467. package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
  468. package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
  469. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
  470. package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
  471. package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
  472. package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
  473. package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
  474. package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
  475. package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
  476. package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
  477. package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
  478. package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
  479. package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
  480. package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
  481. package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
  482. package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
  483. package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
  484. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
  485. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
  486. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
  487. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
  488. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
  489. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
  490. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
  491. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
  492. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
  493. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
  494. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
  495. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
  496. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
  497. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
  498. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
  499. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
  500. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
  501. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
  502. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
  503. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
  504. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
  505. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
  506. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
  507. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
  508. package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
  509. package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
  510. package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
  511. package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
  512. package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
  513. package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
  514. package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
  515. package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
  516. package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
  517. package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
  518. package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
  519. package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
  520. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
  521. package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
  522. package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
  523. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
  524. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
  525. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
  526. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
  527. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
  528. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
  529. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
  530. package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
  531. package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
  532. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
  533. package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
  534. package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
  535. package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
  536. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
  537. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
  538. package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
  539. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
  540. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
  541. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
  542. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
  543. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
  544. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
  545. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
  546. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
  547. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
  548. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
  549. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
  550. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
  551. package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
  552. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
  553. package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
  554. package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
  555. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
  556. package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
  557. package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
  558. package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
  559. package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
  560. package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
  561. package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
  562. package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
  563. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
  564. package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
  565. package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
  566. package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
  567. package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
  568. package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
  569. package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
  570. package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
  571. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
  572. package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
  573. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
  574. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
  575. package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
  576. package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
  577. package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
  578. package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
  579. package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
  580. package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
  581. package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
  582. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
  583. package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
  584. package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
  585. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
  586. package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
  587. package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
  588. package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
  589. package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
  590. package/skills/a2h-resource-convert/SKILL.md +9 -1
  591. package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
  592. package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
  593. package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
  594. package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
  595. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
  596. package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
  597. package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
  598. package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
  599. package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
  600. package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
  601. package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
  602. package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
  603. package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
  604. package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
  605. package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
  606. package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
  607. package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
  608. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
  609. package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
  610. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
  611. package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
  612. package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
  613. package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
  614. package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
  615. package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
  616. package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
  617. package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
  618. package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
  619. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
  620. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
  621. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
  622. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
  623. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
  624. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
  625. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
  626. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
  627. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
  628. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
  629. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
  630. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
  631. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
  632. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
  633. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
  634. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
  635. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
  636. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
  637. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
  638. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
  639. package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
  640. package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
  641. package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
  642. package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
  643. package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
  644. package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
  645. package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
  646. package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
  647. package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
  648. package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
  649. package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
  650. package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
  651. package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
  652. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
  653. package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
  654. package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
  655. package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
  656. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
  657. package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
  658. package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
  659. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
  660. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
  661. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
  662. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
  663. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
  664. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
  665. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
  666. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
  667. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
  668. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
  669. package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
  670. package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
  671. package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
  672. package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
  673. package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
  674. package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
  675. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
  676. package/skills/a2h-spec-generate/SKILL.md +2 -2
  677. package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
  678. package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
  679. package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
  680. package/skills/a2h-utg-explorer/SKILL.md +9 -3
  681. package/skills/a2h-utg-explorer/references/architecture.md +3 -0
  682. package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
  683. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
  684. package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
  685. package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
  686. package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
  687. package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
  688. package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
  689. package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
  690. package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
  691. package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
  692. package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
  693. package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
  694. package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
  695. package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
  696. package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
  697. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
  698. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
  699. package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
  700. package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
  701. package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
  702. package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
  703. package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
  704. package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
  705. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
  706. package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
  707. package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
  708. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
  709. package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
  710. package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
  711. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
  712. package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
  713. package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
  714. package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
  715. package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
  716. package/skills/a2h-utg-static/SKILL.md +6 -2
  717. package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
  718. package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
  719. package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
  720. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
  721. package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
  722. package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
  723. package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
  724. package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
  725. package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
  726. package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
  727. package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
  728. package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
  729. package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
  730. package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
  731. package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
  732. package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
  733. package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
  734. package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
  735. package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
  736. package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
  737. package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
  738. package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
  739. package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
  740. package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
  741. package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
  742. package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
  743. package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
  744. package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
  745. package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
  746. package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
  747. package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
  748. package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
  749. package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
  750. package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
  751. package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
  752. package/README.md +0 -440
  753. package/dist/cli/config-store.js +0 -128
  754. package/dist/cli/config.js +0 -48
  755. package/dist/cli/editors.json +0 -114
  756. package/dist/cli/env-vars.js +0 -127
  757. package/dist/cli/index.js +0 -76
  758. package/dist/cli/init.js +0 -2618
  759. package/dist/cli/uninstall.js +0 -406
  760. package/dist/platform/compose.js +0 -228
  761. package/dist/platform/frontmatter.js +0 -151
  762. package/dist/platform/installer.js +0 -417
  763. package/dist/platform/language.js +0 -77
  764. package/dist/platform/registry.js +0 -337
  765. package/dist/platform/transform.js +0 -363
  766. package/dist/platform/types.js +0 -9
  767. package/dist/platform/validate.js +0 -152
  768. package/dist/utils/regex.js +0 -7
  769. package/env-requirements.json +0 -536
  770. package/resource/choose_editor.png +0 -0
  771. package/resource/convert_pipeline_process.svg +0 -114
  772. package/resource/project_architecture.svg +0 -120
  773. package/resource/set_environment.png +0 -0
  774. package/resource/set_multimodel.png +0 -0
  775. package/resource/set_sdk.png +0 -0
  776. package/resource/title_dark.png +0 -0
  777. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
  778. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
  779. package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
  780. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
@@ -84,6 +84,13 @@ function main() {
84
84
  let r = decide(src, path.join(root, "absent"), null);
85
85
  check("absent target → generate (fresh)", r.mode === "generate" && !("resume" in r), r);
86
86
 
87
+ // M22: the orchestrator's bookkeeping (.hometrans) written before the shell does not block it
88
+ const booked = path.join(root, "booked");
89
+ fs.mkdirSync(path.join(booked, ".hometrans", "app-migrate"), { recursive: true });
90
+ fs.writeFileSync(path.join(booked, ".hometrans", "app-migrate", "stage-ledger.jsonl"), "{}\n");
91
+ r = decide(src, booked, null);
92
+ check(".hometrans-only target → generate (fresh)", r.mode === "generate", r);
93
+
87
94
  const t = shell(root);
88
95
  r = decide(src, t, null);
89
96
  check("shell without marker → reconcile (legacy behaviour kept)", r.mode === "reconcile", r);
@@ -128,6 +135,25 @@ function main() {
128
135
  "--target-project-dir", path.join(root, "absent3"), "--mode", "auto"]);
129
136
  check("CLI --mode auto is accepted",
130
137
  cli.returncode === 0 && cli.stdout.includes('"mode": "generate"'), cli.stderr.slice(-300));
138
+
139
+ // D8: a partial formal-document set is rebuilt, not skipped; the CLI archives the partial set first
140
+ const p = path.join(root, "partial");
141
+ fs.mkdirSync(p);
142
+ for (const rel of ["build-profile.json5", "oh-package.json5"]) fs.writeFileSync(path.join(p, rel), "{}\n", "utf8");
143
+ fs.mkdirSync(path.join(p, ".hometrans"));
144
+ fs.writeFileSync(path.join(p, ".hometrans", "project_design.md"), "# x\n", "utf8");
145
+ r = decide(src, p, null);
146
+ check("partial docs → routed reconcile with rebuild (not skipped)",
147
+ r.status === "routed" && r.mode === "reconcile"
148
+ && JSON.stringify(r.rebuild) === JSON.stringify({ existing: ["project_design.md"],
149
+ missing: ["database_design.md", "preferences_design.md"] }), r);
150
+ const pc = runCapture([process.execPath, path.join(SCRIPTS, "inspect_and_route.mjs"), src, "--target-project-dir", p]);
151
+ const archived = JSON.parse(pc.stdout).rebuild?.archived_to;
152
+ check("CLI archives the partial set",
153
+ pc.returncode === 0 && /^\.hometrans\/arch_archive\/\d{8}T\d{6}Z$/.test(archived || "")
154
+ && fs.existsSync(path.join(p, archived, "project_design.md"))
155
+ && !fs.existsSync(path.join(p, ".hometrans", "project_design.md")), pc.stdout.slice(-300));
156
+ check("after archiving: plain reconcile, no rebuild", !("rebuild" in decide(src, p, null)));
131
157
  } finally {
132
158
  fs.rmSync(tmp, { recursive: true, force: true });
133
159
  }
@@ -185,8 +185,9 @@ function checkAnnotations(annotatedPaths, projectRoot, targetDirs, report) {
185
185
  { path: pathStr },
186
186
  );
187
187
  }
188
+ // existing-target-annotation.md rule 5 (age check): a stale inspection is an error, not a warning
188
189
  if (!targetDirs.has(pathStr)) {
189
- report.warning(
190
+ report.error(
190
191
  "annotation_not_in_inspection",
191
192
  `Annotated path ${pyRepr(pathStr)} exists on disk but was not in target_inspection.json; `
192
193
  + "the inspection may be stale",
@@ -240,7 +241,8 @@ function checkReconciliationCoverage(annotatedPaths, archReconciliation, report)
240
241
  }
241
242
 
242
243
  for (const pathStr of [...existingTargets].filter((p) => p && !annotatedPaths.has(p)).sort(compareCodePoints)) {
243
- report.warning(
244
+ // rule 6 checks both directions; this one is as blocking as annotation_missing_in_reconcile
245
+ report.error(
244
246
  "reconcile_target_not_annotated",
245
247
  `architecture_reconciliation.json names ${pyRepr(pathStr)} as an existing target, `
246
248
  + "but it carries no # EXISTING annotation in project_design.md",
@@ -30,7 +30,19 @@ extraction to the commit.
30
30
  `a2h-spec-design-pipeline` verified `devecocli docs` at Initialization. `unavailable` means the
31
31
  wrapper may stall on a cold or busy docs index, so skip it, use `references/ISSUES.md`, and
32
32
  record `state-docs: unavailable`; the chunk is never blocked on the docs.
33
- - `harmonyos-project-path` (abs) — target HarmonyOS project.
33
+ - `api-docs-mode` (optional `available` / `unavailable`, default `available`) — whether the
34
+ **API-reference** catalogue answered during the same Initialization probe. This gate is soft:
35
+ `unavailable` skips the API lookups (use the local `.d.ts` and `references/ISSUES.md`) and
36
+ records `api-docs: unavailable`. It never gates the chunk and never changes the
37
+ `state-docs` verdict.
38
+ - `harmonyos-project-path` (abs) — target HarmonyOS project (the worktree under a pipeline dispatch): the
39
+ tree you edit, and the only truth for what exists on this branch.
40
+ - `android-project-path` (optional, abs) — Android source project root, consulted as a **reference**
41
+ when the spec's description of a detail is uncertain (the spec stays the implementation baseline).
42
+ It is the join base for the spec's `## 安卓代码参考` anchors, which are project-root-relative
43
+ (`app/src/main/java/…/MainFragment.java:45`). Absent or not a directory → implement from the spec
44
+ alone: never hunt the disk for a look-alike source file and never claim "the source says" — see
45
+ Scenario Principles 3–4 in `references/code-generation.md`.
34
46
  - `unitId` (optional) — the dispatch ledger unit (`chunk:g<G>c<k>`) this run implements; echo it in the final JSON and logs. It is **not** a credential: the coder never writes the ledger.
35
47
  - `output-path` (abs) — the per-attempt output directory `.../spec_group_<G>/chunk_<k>/attempt_<n>`; where `commit-info.md`, `issues.md` (when blocked), `state_docs_used.md`, and `wiring.md` (wiring-mode) are written. The orchestrator owns every ledger write (claim/intent/confirm/beat/submit/release); the coder only writes its artifacts.
36
48
  - `wiring-mode` (optional, `true`/`false`, default `false`) — batch-wave mode flag. When `true`,
@@ -41,14 +53,55 @@ extraction to the commit.
41
53
  - `shared-layer-list`: cumulative shared-layer inventory from the orchestrator
42
54
  (`none` if absent). Advisory only: prefer these APIs; append to the shared
43
55
  module when insufficient; never skip a scenario because it is "shared".
44
- - worktree HomeGraph index (implicit, optional) — when the dispatcher reports a usable index for this worktree (the dispatcher passes this clause only in that case; `<harmonyos-project-path>/.homegraph/` alone is not the signal), a **read-only** index built when the worktree was created (a2h-spec-design-pipeline does this). Query it with
45
- `homegraph explore -p <harmonyos-project-path> "<query>"` and prefer the CLI: the MCP tool only
46
- works when the MCP session's bound root is this worktree (a mismatched `projectPath` is ignored by
47
- the server and answers from the bound tree). Never run `homegraph init` / `sync` / `index`, and never
48
- query the main tree's index — it answers from a different branch and the CLI prints no mismatch
49
- warning. (This restriction is about an a2h-spec-design-pipeline dispatch, where the main tree is a
50
- sibling checkout; run standalone, `<harmonyos-project-path>` may itself be the main checkout, and
51
- its index is then simply your local one.) Absent → plain Grep/Read.
56
+ - `hmos-project-path` (optional, abs) — the shared `<HMOS>` main checkout: the HomeGraph **index root** for
57
+ existing APIs, shared layers and call chains. Never the worktree. Absent on a standalone run → the
58
+ HomeGraph project is `harmonyos-project-path` itself.
59
+ - `hmos-index-ready` / `android-index-ready` (optional `true`/`false`) — the dispatcher's verdict for each
60
+ shared index. `true` → that index is queryable; `false`/absent → omit that index and use plain
61
+ `Read`/`Grep` for it.
62
+ - `homegraph-guide` (optional, abs, pipeline dispatch) — the `a2h-spec-design-pipeline` skill's
63
+ `references/homegraph-cli.md` (the dispatcher passes its absolute path): the shared CLI query discipline and
64
+ evidence format. Read it before the first HomeGraph query.
65
+ - `engine-mode` (optional, `auto`/`off`/`required`, default `auto`) and `engine-degraded-reason` (optional,
66
+ `null` when none) — the engine verdict for this chunk. `required` + an unusable `<HMOS>` index → stop
67
+ before generating. A non-null reason means the snapshot may lag HEAD: do not retry or rebuild it, fall
68
+ back to `Read`/`Grep` where it looks stale, and record `degraded: <reason>`.
69
+ - **HomeGraph rule** (pipeline dispatch: `hmos-project-path` + `homegraph-guide` present). The shared
70
+ indexes are **read-only** and **CLI-only**:
71
+ - `<hmos-project-path>` = architecture, existing APIs, shared layers, call chains;
72
+ `<android-project-path>` = the reference implementation.
73
+ - Locate code with `homegraph explore -p "<hmos-project-path>" "<TypeA TypeB Type.member>"` and
74
+ `homegraph explore -p "<android-project-path>" "<Symbol>"`; add `impact` / `callers` only when the
75
+ change's blast radius matters (2–5 names per `explore`; `-j` only on
76
+ `status`/`query`/`callers`/`callees`/`impact`/`affected`/`files` — `explore` and `node` take no `-j`).
77
+ - **Start with `<HMOS>`, before reading source.** One `explore` on `<hmos-project-path>` with this chunk's
78
+ modules / pages / VMs / shared-layer symbols establishes what the main checkout already implements. Query
79
+ `<android-project-path>` during design only when the SPEC's `## 安卓代码参考` anchor is missing, ambiguous,
80
+ or the scenario needs a cross-file call chain; when the anchor gives `file:line`, `read` that file. Do
81
+ **not** query once per scenario. Add `impact`/`callers` when the change touches a shared layer or public
82
+ API.
83
+ - **Never truncate `explore` output** (`| Select-Object -First N`). The first screenfuls are often
84
+ `Partial locator` / import-resolution notes; truncating them makes a present file look unindexed. Use
85
+ `query -l` or `node -f ... --symbols-only` for targeted facts and `files --pattern` to check presence.
86
+ - Never run `homegraph init` / `sync` / `index` / `unlock`: the orchestrator owns both indexes and is
87
+ their only writer. There is **no worktree index** — never create or query one.
88
+ - **`index_ahead`**: a symbol an index lists but this worktree lacks is another group's merged code or a
89
+ later commit — **never import, copy or re-implement it**; cite the worktree. The reverse (`trust the
90
+ worktree`): a symbol present here but absent from the index is real — re-query once, then read the file
91
+ and cite `file:line`.
92
+ - Record the queries **by phase** — the first line is `start | hmos`, then `design | android` for SPEC
93
+ anchor gaps and `code | hmos` for impact — and their `file:line` anchors, or `degraded: <reason>` /
94
+ `fallback: <reason>` / `not-applicable: <files>` when no query was possible, inside `commit-info.md`'s
95
+ `## HomeGraph evidence` section (see step 6). A section with anchors but **without** a `start | hmos`
96
+ line is `homegraph-start-missing` (warning under `auto`, failure under `required`); an anchor written
97
+ outside that section does not count.
98
+ - **Standalone exception**: only a **standalone coder run** — one whose prompt carries neither
99
+ `hmos-project-path` nor `homegraph-guide`, so `references/spec-design.md` is not dispatched with
100
+ `homegraph_project`/`homegraph_guide` at all — is outside the read-only rule. There,
101
+ `harmonyos-project-path` may itself be the main checkout, and its index is then simply your local one
102
+ (the engine step of `references/spec-design.md` may probe, `init`/`sync` it). A pipeline dispatch always
103
+ sends both fields; the design step's fallback of `homegraph_project` to `harmonyos-project-path` is only
104
+ a path default, never an opt-out. Absent → plain `Grep`/`Read`.
52
105
 
53
106
  ## Procedure
54
107
 
@@ -64,6 +117,14 @@ extraction to the commit.
64
117
  - `database_design` / `preferences_design` = `design-database-design` /
65
118
  `design-preferences-design` (pass `--database-design` / `--preferences-design`
66
119
  only when provided)
120
+ - `homegraph_project` = `hmos-project-path` when present, otherwise `harmonyos-project-path` (standalone coder run)
121
+ - `android_project` = `android-project-path`
122
+ - `homegraph_guide` = `homegraph-guide`
123
+
124
+ `homegraph_project` / `android_project` / `homegraph_guide` are **prompt inputs** to
125
+ `references/spec-design.md`, not CLI options: never append them to the
126
+ `inspect_spec_design_inputs.mjs` invocation (it accepts only its documented flags and exits with
127
+ `unrecognized arguments` on anything else).
67
128
  If the Step 1 inspect command exits non-zero, write `{output-path}/issues.md`
68
129
  with type `design_gap_blocked` when `project_design.md` is missing, otherwise
69
130
  `validation_failure`; never commit, and stop. If validation writes an issue
@@ -73,7 +134,9 @@ extraction to the commit.
73
134
  1. **Generate the code.** Follow `references/code-generation.md` with:
74
135
  - spec document = `spec-file`
75
136
  - design document = `spec-design-file`
76
- - `<HMOS>` in the hook-check commands = `harmonyos-project-path`
137
+ - Android source root = `android-project-path` (may be absent)
138
+ - `<HMOS>` in the hook-check commands = `harmonyos-project-path` (the worktree); the HomeGraph queries
139
+ in Design Principle 2 use `hmos-project-path` / `android-project-path` as described above.
77
140
 
78
141
  **State-management doc gate (mandatory when the chunk touches UI state).** Before choosing any
79
142
  state variable or decorator, run the gate in `references/code-generation.md` Step 2 — it owns the
@@ -83,9 +146,33 @@ extraction to the commit.
83
146
  (unresolved key, lock budget, moved document) takes the same fallback with the key and error
84
147
  recorded. Never guess silently and never block the chunk on the docs.
85
148
 
149
+ **Platform API doc gate (soft).** When the chunk calls a platform API whose call shape the
150
+ worktree does not already show, run the gate in `references/code-generation.md` Step 2 — it owns
151
+ the trigger, the `state_doc.mjs search` / `read-id --section` commands, the
152
+ worktree > `.d.ts` > docs precedence, the per-chunk budget and the API-level check. Record the
153
+ rows plus `api-docs: available` / `unavailable` / `not-applicable` in the same
154
+ `state_docs_used.md`. With `api-docs-mode: unavailable`, skip the wrapper and record
155
+ `api-docs: unavailable`; this gate never blocks the chunk and never changes the `state-docs`
156
+ verdict.
157
+
86
158
  Do the code generation, its scenario self-check (up to 3 iterations), and its
87
159
  MVVM + px/vp unit hook checks. Do not re-plan or override that workflow.
88
160
 
161
+ **Network verification (soft).** For a scenario that performs a network exchange or decodes its
162
+ response — HTTP(S) request, WebSocket frame, socket/private-protocol message, or gRPC call —
163
+ Implementation Principle 9 in `references/code-generation.md` recommends a real check of both the
164
+ sent and the decoded payload when reachable. Confirm each request's body/query/headers, defaults and
165
+ encoding and its response field mapping from the spec, or from the anchored Android source where
166
+ the spec leaves them open — never guess a body key or a default. Only idempotent read-only exchanges
167
+ (HTTP GET/HEAD, or a query/command the source declares read-only) may be replayed; a side-effecting
168
+ request is never sent and is recorded as `network-evidence: unavailable (side-effecting)`. A spec
169
+ may contain several requests (even chained): each request has its own 3-attempt budget, and one
170
+ request's failure never skips the next. A request that consumes an earlier response (including a
171
+ token) is recorded as `network-evidence: unavailable (upstream … unavailable)` instead of being
172
+ retried when that upstream has no evidence. It is best-effort: skip after 3 failed attempts **for
173
+ that request**, note `network-evidence: unavailable (<reason>)` per request in the self-check, and
174
+ never block the chunk.
175
+
89
176
  **Absolute-path discipline**: use only the `spec-file` and `spec-design-file` absolute paths
90
177
  passed in. When the working directory is a git worktree (batch-wave mode), the project may
91
178
  contain same-named design-file copies from earlier runs — **never** search for, or act on, any
@@ -152,21 +239,63 @@ extraction to the commit.
152
239
  - `commit-id: <full hex hash>` (or `commit-id: none` for an honest verification-only pass).
153
240
  - `change-type: code` | `change-type: comment-only` | `change-type: none` — the verified
154
241
  classification from step 5.
155
- This is the sole output the **build/review** stages consume (`state_docs_used.md` is the audit
156
- artifact of the state-management gate). The pipeline trusts `change-type` directly:
157
- a `none`/`comment-only` value skips the Stage-2 build when a reusable HAP exists, with no
158
- independent re-verification — the step-5 counter is the only safeguard, so run it; never
242
+ - plus a `## Spec 偏差` section whenever the implementation deliberately departs from the spec
243
+ (a Scenario Principle 4 conflict, or an unavailable Android source that left a behavior
244
+ unclear). It is the canonical record of the departure — a local code comment may point to it,
245
+ nothing else replaces it — and the review and fix stages read it so a deliberate port is not
246
+ fixed back to the spec's wording:
247
+
248
+ ```markdown
249
+ ## Spec 偏差
250
+
251
+ - android-source: available | unavailable (one-line reason)
252
+
253
+ | scenario | spec says | implemented | basis |
254
+ |---|---|---|---|
255
+ | so-26 | default page is 0 | default page is 1 | app/src/main/java/…/Pager.java:45 |
256
+ | so-27 | label from strings.xml | label computed in page | design §技术参考: LabelUtil |
257
+ ```
258
+ Omit the section when there is no deviation.
259
+ - plus a `## HomeGraph evidence` section — the canonical record of the queries this chunk ran. The
260
+ orchestrator's `parseHomeGraphEvidence` scans **only inside this section**, so the anchor,
261
+ `degraded:`, `fallback:` or `not-applicable:` must be written here (an anchor anywhere else does not
262
+ count). Omit it only under the standalone exception, where no shared index exists:
263
+
264
+ ```markdown
265
+ ## HomeGraph evidence
266
+
267
+ - `explore -p "<hmos-project-path>" "LoginPage LoginViewModel AuthRepository"` → `LoginViewModel.ets:88`
268
+ - `explore -p "<android-project-path>" "LoginActivity LoginViewModel AuthRepository"` → `LoginActivity.kt:104`
269
+ - anchors: `LoginViewModel.ets:88`, `AuthRepository.ets:41`
270
+ - index_ahead: none
271
+ - degraded: none
272
+ ```
273
+
274
+ At least one `file:line` anchor, `degraded: <reason>`, `fallback: <reason>` or
275
+ `not-applicable: <files>` must appear inside the section; otherwise the chunk's evidence is
276
+ `homegraph-evidence-missing` (a warning under `engine-mode: auto`, a failure under `required`).
277
+ `commit-id` and `change-type` are the fields the **build/review** stages consume for scoping
278
+ (`state_docs_used.md` is the audit artifact of the state-management gate; `## Spec 偏差` is what
279
+ keeps a deliberate departure from being reviewed as a defect). The pipeline trusts `change-type`
280
+ directly: a `none`/`comment-only` value skips the Stage-2 build when a reusable HAP exists, with
281
+ no independent re-verification — the step-5 counter is the only safeguard, so run it; never
159
282
  write the field from memory or intent.
160
283
 
161
284
  ## Output
162
285
 
163
286
  - `{output-path}/commit-info.md` — required on success; contains `commit-id` (full hex hash, or
164
- `none`) and `change-type` (`code` / `comment-only` / `none`).
287
+ `none`), `change-type` (`code` / `comment-only` / `none`), a `## HomeGraph evidence` section (the
288
+ queries plus at least one `file:line` anchor, or `degraded:` / `fallback:` / `not-applicable:`, all
289
+ inside that section), and a `## Spec 偏差` section only when a deliberate deviation from the spec must be
290
+ recorded.
165
291
  - `{output-path}/issues.md` — written only when blocked; diagnostic. Type limited to
166
292
  `design_gap_blocked` / `missing_proof` / `validation_failure`.
167
- - `{output-path}/state_docs_used.md` — written by the state-management doc gate: one row per state
293
+ - `{output-path}/state_docs_used.md` — written by the doc gates: one row per state
168
294
  value (`value | scope | decorator | doc key`) plus `state-docs: available` / `unavailable` /
169
- `not-applicable` (the last when the chunk touches no UI state).
295
+ `not-applicable` (the last when the chunk touches no UI state), and a `## Platform API lookups`
296
+ section (one row per lookup, or "none") plus `api-docs: available` / `unavailable` /
297
+ `not-applicable`. The two verdict lines are independent: a missing or `unavailable` API line never
298
+ changes the `state-docs` verdict the pipeline reads.
170
299
 
171
300
  Do not fabricate a commit or a `commit-id`. If the work cannot be honestly closed, `issues.md` is the
172
301
  correct output and `commit-info.md` must be absent (or carry `commit-id: none` for a safe partial).
@@ -2,8 +2,9 @@
2
2
  * ArkTS 自定义组件的成员名不得与 CustomComponent 基类的内置通用属性方法同名。
3
3
  * `@Builder` 参数默认按值传递:调用处传 `this.xxx` 后,`xxx` 再变化(如异步加载完成、偏好值回填)不会刷新 Builder 内的 UI。需要随状态刷新时,在 Builder 内直接读 `this.xxx`,或改为按引用传参:Builder 只声明一个 class/interface 类型参数,调用处传对象字面量(如 `this.row({ isOn: this.incognito })`)。
4
4
  * `ForEach` 的 key 生成函数必须包含所有会影响该项渲染的字段:只用 `id` 作 key 时,原地修改该项其他字段(状态、文案)后 ArkUI 会复用旧节点,界面不更新。key 应拼接影响显示的字段(如 `${item.id}:${item.status}`),或在修改时整体替换该项对象并触发数组更新。
5
- * 把父组件的 `@Builder` 方法传给子组件的 `@BuilderParam` 时,不能写成方法引用(如 `content: this.listContent`):Builder 实际在子组件里执行,`this` 指向子组件,读父组件的状态变量或 ViewModel 会得到 `undefined`,渲染时直接崩溃。这类问题常出在加载态/空态容器上,只有数据返回、首次渲染内容态时才触发,冷启动看不出来。传参时用箭头函数包一层以保留父组件的 `this`:`content: (): void => { this.listContent() }`。
5
+ * 把父组件的 `@Builder` 方法传给子组件的 `@BuilderParam` 时,不能写成方法引用(如 `content: this.listContent`):Builder 实际在子组件里执行,`this` 指向子组件,读父组件的状态变量或 ViewModel 会得到 `undefined`,渲染时直接崩溃。这类问题常出在加载态/空态容器上,只有数据返回、首次渲染内容态时才触发,冷启动看不出来。传参时用箭头函数包一层以保留父组件的 `this`:`content: (): void => { this.listContent() }`。箭头函数体里**只能调用 @Builder**,不能直接写组件:`content: () => { RefreshLayout({…}) }` 能编译,但只有 @Builder 函数体会被编译成 UI 代码,箭头函数里的 `RefreshLayout({…})` 是对组件类的普通调用,渲染到该槽位即抛 `class constructor cannot called without 'new'` 闪退。组件写进 `@Builder listContent()`(或 `@LocalBuilder`),箭头函数只调它。
6
6
  * `@ComponentV2` 中,没有 `@Trace` 的字段被修改时 UI 不刷新,也不报错。在 `aboutToAppear` 里根据 `@Param` 算出来的值只算一次,父组件之后传入新值也不会更新:这类值放到 `build` 里计算,或用 `@Computed`;必须存成本地状态的,用 `@Monitor` 监听对应的 `@Param` 再赋值。
7
7
  * 文本测量结果是 px,不是 vp:`MeasureText.measureText` / `measureTextSize`(`@ohos.measure`)和 `getUIContext().getMeasureUtils()` 的同名方法,入参 `fontSize` 是 fp,但返回的宽高都是 **px**(`.d.ts` `@returns`:"both in px")。拿它和 vp 预算比较、或传给 `.width()` 之前,必须先 `this.getUIContext().px2vp(...)` 换算。实测(where-to-study 底部导航):把 `measureTextSize().width`(px)直接与 vp 格宽比较,在 3.5 倍密度下永远判定“放不下”,标签文字在任何设备上都不显示,而评审信了代码注释里“vp 输出”的说法。Canvas 的 `context.measureText()` 默认返回 vp,和它不同,不要混用经验。其他 API 的单位以 `.d.ts` 为准,见 code-generation.md Implementation Principle 6 的单位表;`scripts/check_units.ts` 会拦截这类写法。
8
8
  * 大量列表(歌曲、消息、动态等可能上百条的列表/网格)不要用 `ForEach`:它首次加载就创建全部子节点,条目多时首帧卡顿明显甚至白屏超时。优先 `LazyForEach` + `IDataSource` 按需创建屏幕内节点;注意数据源变更必须经 `notifyDataReload` / `notifyDataAdd` / `notifyDataChange` 等接口通知,整体替换数组而不通知时 UI 不刷新(配合 `@Observed`/`@ObjectLink` 时是已见过的坑)。固定少量选项(菜单、页签)仍用 `ForEach` 即可。
9
9
  * 跨「无类型边界」进入强类型代码的值一律按可空归一,不允许假设有值:反序列化结果、数据库行、本地缓存、跨页传参都算。ArkTS 的类型只是编译期标注,运行时不做校验,`as T` 不会补默认值,`null` 会原样进入实体;映射只判 `=== undefined` 就漏了它——读侧在 `.length`、遍历、方法调用处抛 `TypeError`(闪退),数值比较则把 `null` 静默当 0;写侧被非空约束拒绝而写不进库,或写进 JSON 后读回缺值(对象内的 `null` 仍是 `null`,`undefined` 属性的键直接消失)。规则:归一一律写在做「外部数据→实体」映射的那个函数里,没有就先补一个;字段声明成 `?: T | null`,缺失时用 `??` 取类型默认值(字符串 `''`、数值 `0`、数组 `[]`、对象 `{}`),整体兜住后再逐项、逐字段归一;读库按列的可空声明取值,不要用空串或 0 冒充缺失;兜底只用 `??`,不要 `||` 或 `if (!v)`,它们会把合法的 `0`、`''` 当空值。非空字段上写 `=== null` 不算兜底:漏掉 `undefined`,还会被判为无重叠比较;正解是先把声明改成 `?: T | null`。
10
+ * 平台 API 别凭记忆写,也别凭一次搜索结果选页:参数顺序、同步/异步、生命周期(create → use → destroy/off)和返回值单位以本地 `.d.ts` 为准,调用顺序与用法用 `scripts/state_doc.mjs search "<模块或方法>"` + `read-id "<documentId>" --section "<小节标题>" --max-lines 80` 取一段(API 页动辄两三千行,整页读会把正文上下文挤掉;重载会重复同名小节,`--section` 会把几个同名小节全带出来并标 `<!-- section "request" 2/3 -->`,要挑某一个时加 `--occurrence <n>`)。工作区里已有同一 API 的可用调用点时直接照抄,不再查文档;文档与 `.d.ts` 冲突时以 `.d.ts` 为准;小节标题旁的 `phone 12+` 之类标签高于工程 `compatibleSdkVersion` 时改用低版本重载或 `canIUse`。查不到就记 `api-docs: unavailable`,走 `.d.ts` 和本文件,不要静默猜。
@@ -7,6 +7,7 @@ Reference for generating ArkTS logic code of a given spec document and a design
7
7
  |--------------------|---|----------------------|
8
8
  | `spec-file` | Yes | spec document path |
9
9
  | `spec-design-file` | Yes | design document path |
10
+ | `android-project-path` | No | Android source project root — the join base of the spec's `## 安卓代码参考` anchors; absent → spec-only implementation (Scenario Principles 3–4) |
10
11
 
11
12
  ---
12
13
 
@@ -22,10 +23,12 @@ Implementation principles conclude the principles that must be strictly followed
22
23
  ### Scenario Principles
23
24
  1. A scenario is an atomic requirement, thus all scenarios must be implemented in the spec document without omission.
24
25
  2. The logic steps of each scenario are defined in the spec document, thus the generated code must follow the logic steps.
26
+ 3. **The spec is the baseline; consult the Android source only where it is uncertain.** When `android-project-path` exists and the spec leaves a scenario's detail unsettled — an exact condition, default, ordering, failure path, constant or label — read the anchored source (`## 安卓代码参考` paths are relative to that root: `app/src/main/java/…/MainFragment.java:45`, ranges 1-based and inclusive, `整页` = the whole page, `场景N` = that scenario, union of bullets sharing a label) and fill just that detail from what the source does; never transliterate the file, and never replace spec behavior the spec does state. The anchors are the only lookup channel — never search outside `android-project-path` for a same-named file, and never cite a source you did not open. Without the path, or when an anchor does not resolve, implement from the spec alone and record `android-source: unavailable (<reason>)` in `commit-info.md`'s `## Spec 偏差`; block (`issues.md`, type `missing_proof`) only when a scenario is genuinely undecidable without it.
27
+ 4. **A conflict between the two is a spec gap, so the detail comes from the source.** Where the spec's wording and the source disagree on something the spec does not state clearly, implement what the source does and record one row in `commit-info.md`'s `## Spec 偏差` plus a code comment at the divergence. Where the spec states the behavior explicitly, the spec wins — URLs follow Implementation Principle 7 (the spec's literal URL is kept and the mismatch recorded), HarmonyOS-side decisions (API, module, state management, UI anchor) follow the design document, and a capability gap follows Implementation Principle 4, which owns that case.
25
28
 
26
29
  ### Design Principles
27
30
  1. If the design document contains "## 技术参考", make sure that the generated code use the references (such as API, permission and so on) in "技术参考".
28
- 2. Before generating code, use the content in "## 相关 UI", "## 相关数据", and "## 相关逻辑" as the exploring anchor point in the design document for exploring the code context of scenarios. Agentic search (such as grep and glob) is allowed to expand the code context — and so is this worktree's own read-only HomeGraph index, when the dispatcher's prompt tells you the worktree has a usable one (`homegraph explore -p <harmonyos-project-path> "<query>"`; never `init`/`sync`/`index`, and never an index outside this project — under a2h-spec-design-pipeline dispatch the sibling `<HMOS>` main-tree index answers from another branch).
31
+ 2. Before generating code, use the content in "## 相关 UI", "## 相关数据", and "## 相关逻辑" as the exploring anchor point in the design document for exploring the code context of scenarios. Agentic search (such as grep and glob) is allowed to expand the code context — and so are the shared read-only HomeGraph indexes when the dispatch advertises them: `homegraph explore -p "<hmos-project-path>" "<query>"` for existing APIs, shared layers and call chains, and `homegraph explore -p "<android-project-path>" "<query>"` for the reference implementation. Never `init`/`sync`/`index`/`unlock` a shared index (`-j` only on `status`/`query`/`callers`/`callees`/`impact`/`affected`/`files`; `explore` and `node` take no `-j`). The index answers from the main checkout, so an `index_ahead` symbol — listed there but absent from this worktree — is never imported, copied or re-implemented; the worktree's own `Read`/`Grep` is the truth for what exists here.
29
32
 
30
33
  ### Implementation Principles
31
34
  1. **No placeholders in the chain**: any business-observable chain (page rendering, callback firing, data persistence, device state change, etc.) must never end in empty implementations, log-only TODO stubs, or placeholder comments. Every scenario step must be fully implemented — no fake endings.
@@ -59,7 +62,14 @@ Implementation principles conclude the principles that must be strictly followed
59
62
 
60
63
  Observed: a coder read only the `fontSize` doc ("fp since API 12"), concluded the result was vp too, and compared `measureTextSize().width` (px) with a vp budget. The check failed at every density, and the bottom navigation labels never rendered. A code comment claiming "fp in, vp out" was believed by the reviewers as well. `scripts/check_units.ts` (Step 4) blocks this pattern.
61
64
 
62
- 7. **URLs are literal — never rewrite them**: copy every URL/endpoint from the spec (or 技术参考) exactly — scheme, host, port, path, query. No `http` → `https` upgrade, no host/slash/port/path normalization. A different origin is a spec gap: keep the spec's URL or report it in `issues.md`.
65
+ 7. **URLs are literal — never rewrite them**: copy every URL/endpoint from the spec (or 技术参考) exactly — scheme, host, port, path, query. No `http` → `https` upgrade, no host/slash/port/path normalization. This rule outranks Scenario Principle 4 for URLs: when the Android source carries a different URL, keep the spec's URL and record the mismatch as a `## Spec 偏差` row — never port the Android URL. A spec that states no URL for a chain needing one is a gap: report it in `issues.md` rather than inventing one from the source.
66
+ 8. **Implement it the HarmonyOS project's way**: reuse the existing project's modules, data/state layer, utilities, naming and ArkTS/ArkUI idioms — read the neighbouring code first. Android constructs (Activity/Fragment lifecycle, `dp`/`px` math, Java collections, Gson/Room/OkHttp) are evidence of *intent*, not an implementation: realize the same logic with real HarmonyOS APIs, following Scenario Principle 4 for behavior and this project's own conventions for structure.
67
+ 9. **Prefer a real read-only exchange to confirm a network chain (best-effort, 3 attempts per request)**: when a scenario sends a network request or decodes its response, check it against reality where the endpoint is reachable — replay exactly what the spec/design gives (literal URL/method/headers/body for HTTP(S); handshake URL and subprotocol for WebSocket; direction/command/version/length/payload for a private protocol; service/method/message for gRPC) with a protocol-appropriate probe (`curl -i` or a small `node` fetch for HTTP(S), `grpcurl` for gRPC, a small `node` WebSocket or `net`/`dgram` client for WebSocket or raw sockets). Every probe runs under a hard timeout of **30 s** (`curl --max-time 30`, an abort timer in a `node` client; `grpcurl -max-time 30`): a probe that hangs — a socket server that never answers — counts as one failed attempt for that request and is never left running, because a silent probe produces no progress and the unit's lease expires. **No device probes:** an endpoint only the device can reach is recorded as `network-evidence: unavailable (device-only)` and left to the post-merge build and smoke check; the coder never builds, installs or logs on a device for it (worktrees forbid `devecocli build` / `hvigorw` / `ohpm install`, see the pipeline's coding-loop). Confirm both the exchange as sent and the response as decoded (message or envelope, field names, types, nullability), and fix the model to what came back where the spec leaves it open (Scenario Principle 4; any URL stays literal, Principle 7).
68
+ **Settle the request body and the response parsing before sending.** A request is only "sent right" when its body/query/path parameters/headers and encoding are exact — key names, types, nesting, required/optional, default values, and which response field maps to which model field. When the spec leaves any of that open, read the anchored Android source that builds the request and parses the response (Scenario Principle 3) and fill just that detail. Never invent a body key, drop a key the source sends, or guess a default.
69
+ **Each request has its own 3-attempt budget.** One spec/chunk may carry several requests, sometimes chained (a response feeding the next request). Count attempts per request: an exhausted budget on one request neither consumes another request's attempts nor skips it — every request still gets its own 3 attempts and its own verification record.
70
+ **A dependent request inherits an unavailable upstream.** A request is dependent when its URL, headers or body use a value from an earlier response (including a credential such as a login token). When that upstream produced no evidence, do not attempt the dependent request and do not spend its budget: record `network-evidence: unavailable (upstream <request> unavailable)` and name the blocked chain in the self-check.
71
+ **Probe only idempotent read-only exchanges.** Only HTTP GET/HEAD, or a query/command the source declares read-only, may be replayed. Never send a side-effecting exchange to a real service — POST/PUT/PATCH/DELETE, login, SMS/verification code, order, payment, delete, a notification push, or any state-changing command/frame: batch waves may hit the same endpoint from several chunks and duplicate the effect. Record `network-evidence: unavailable (side-effecting)` for it, take its body from the spec or, where the spec is open, from the anchored source (read the code that fills the payload; never send it); when neither settles it, report the gap instead of probing.
72
+ This is never a gate: skip it when no route exists or no protocol-appropriate probe is available, and stop after 3 failed attempts **for that request** (retry only after correcting the request's own inputs; a protocol-level rejection — a non-2xx status, a non-OK gRPC status, or an error command/frame — is evidence, not a retry). Record one `network-evidence: <request> → <result> (verified)` line per request, where `<result>` is the status code, gRPC status, or response command/frame, or `network-evidence: unavailable (<reason>)` (again one per request) in the Step 3 self-check; only a scenario truly undecidable without the response becomes `issues.md` `missing_proof`. Never commit probe-only code, a token, or a captured payload.
63
73
 
64
74
  ## ArkTS Code Generate Workflow
65
75
 
@@ -127,6 +137,51 @@ rendered value, write `state-docs: not-applicable` to `{output-path}/state_docs_
127
137
  dispatcher's field) → skip step 2, use `references/ISSUES.md`, write `state-docs: unavailable`,
128
138
  and continue; the chunk is never blocked on the docs.
129
139
 
140
+ **Platform API doc gate (soft, before writing a platform call whose shape you do not know).**
141
+ A platform API guessed by analogy compiles and misbehaves at runtime (wrong param order, a missing
142
+ `await`, a callback that fires before the resource is ready). Run this gate when the chunk calls an
143
+ API imported from `@kit.*` / `@ohos.*` and **the worktree does not already contain a working call
144
+ site for it**, and any of these is unclear: parameter order/types, sync vs async, lifecycle
145
+ (`create`/`destroy`, unregister), the return value's shape or unit, or the throwing/error path.
146
+ Otherwise skip it — a local, already-used call site beats any doc — and record
147
+ `api-docs: not-applicable`.
148
+
149
+ Source precedence, always: **worktree code > local SDK `.d.ts` > docs**. The `.d.ts` wins on what
150
+ exists, its signature, defaults, units and since-level; the doc wins on usage, parameter meaning,
151
+ lifecycle and a runnable example. Both may be right about the signature and the doc still decide
152
+ the `await`.
153
+
154
+ 1. Search once for the module, not for prose: `node <skill-dir>/scripts/state_doc.mjs search
155
+ "@ohos.net.http request" --limit 3`. Only the `harmonyos-guides` and `harmonyos-references`
156
+ catalogues are allowed — a raw `devecocli docs search` also returns FAQ / error-code / release
157
+ pages, and a cold index can make the first call wait; never run `devecocli docs` yourself.
158
+ 2. Read one section of the page, never the page (an API page runs to a few thousand lines —
159
+ `js-apis-http` is ~2.8k): `node <skill-dir>/scripts/state_doc.mjs read-id "<documentId>"
160
+ --section "request" --max-lines 80`. An overload list repeats the heading (`### request`
161
+ appears three times on that page: callback, options+callback, Promise), so a section read
162
+ returns **every** occurrence, each marked `<!-- section "request" 2/3 -->` (`--max-lines` caps each
163
+ occurrence, not the whole answer; a truncated one ends with the exact command that reads it whole): read them all
164
+ before deciding between the callback and the `Promise` form, and pass `--occurrence <n>` when
165
+ only one is relevant. A keyed read of a known module (`api-http`, `api-preferences`, `api-rdb`,
166
+ `api-fs`, `api-picker`, `api-media`, `api-image`, `api-request`, `api-permission`,
167
+ `api-notification`, `api-prompt`, `api-router`, `api-uicontext`, `api-window`, `api-worker`,
168
+ `api-taskpool`, `api-crypto`, `api-i18n`, `api-webview`, `api-socket`, `api-common-event`,
169
+ `api-background-task`; `list --api` prints the table) resolves the ID for you and is capped at
170
+ 400 lines by default.
171
+ 3. Budget: at most 3 `search` calls and 2 section reads per chunk, batched into one turn. If that
172
+ is not enough, re-read the local `.d.ts` instead of searching further.
173
+ 4. Guard the API level: the doc tags a section `phone 12+ | 2in1 13+ …`. If the tag is above the
174
+ project's `compatibleSdkVersion` (or the module's `minAPIVersion`), use the fallback the doc
175
+ names (`canIUse`, an older overload, or a different API) instead of the newer call.
176
+ 5. Record one row per lookup in the `## Platform API lookups` section of `state_docs_used.md`
177
+ (`api | catalog | documentId or key | section | API level | conclusion`), plus one verdict line
178
+ `api-docs: available`.
179
+ - Not needed → `api-docs: not-applicable`.
180
+ - `api-docs-mode: unavailable` (the dispatcher's field), the wrapper exits non-zero, or the
181
+ section is not found → `api-docs: unavailable`, record the failed query/ID and the error, then
182
+ continue from the `.d.ts` and `references/ISSUES.md`. Never block the chunk and never guess
183
+ silently.
184
+
130
185
  Before writing any code, run the mock sweep (Implementation Principle 3):
131
186
  1. From the design document anchors ("## 相关 UI", "## 相关数据", "## 相关逻辑"), list every file on the scenario chains, including the modules those files import from on the chain.
132
187
  2. Search those files for the sweep markers: `mock` / `Mock` / `MOCK`, `simulate`, `seed`, `TODO`, `loadMockData`.
@@ -141,6 +196,8 @@ For each scenario in the spec document, check it one by one:
141
196
  4. whether every API-returned number used in layout math has its unit confirmed from the `.d.ts` `@returns` (Implementation Principle 6), and every comparison or assignment has the same unit on both sides. For each `check_units.ts` CANDIDATE, state the unit of both sides.
142
197
  5. whether every state value that changes at runtime uses the decorator/observation path the official page says triggers a refresh (cross-check `state_docs_used.md`), including nested-object properties and arrays mutated in place.
143
198
  6. whether every URL matches the spec byte-for-byte (scheme/host/port/path/query) — a `http` → `https` rewrite is a failure (Implementation Principle 7).
199
+ 7. whether every platform API call the chunk introduced matches the signature, parameter order, sync/async shape and lifecycle (create → use → destroy/unregister) of its `.d.ts` and, where consulted, the doc section recorded in `state_docs_used.md`, and whether no call exceeds the project's API level.
200
+ 8. whether each idempotent network exchange/decode chain was checked against a real response where reachable, each side-effecting chain was left unsent and recorded as `network-evidence: unavailable (side-effecting)`, and any remaining unreachable chain was recorded as `network-evidence: unavailable (<reason>)` (Implementation Principle 9), with no probe-only code left in the change; whether **every** request in the spec got its own 3 attempts with its own `network-evidence` line (a failure on one request must not skip the next), whether each request body/parameter/header/default and its response field mapping came from the spec or the anchored source rather than a guess, and whether a dependent request was recorded as `unavailable (upstream … unavailable)` instead of being retried without its upstream input.
144
201
 
145
202
  Output the check report in the following format:
146
203
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Generate the chunk's design document at `--output-file` for an input SPEC.
6
6
 
7
- Inputs are the SPEC file, the raw UI operation sequence, `project_design.md`, optional `database_design.md`, optional `preferences_design.md`, selected `module_design.md`, Homegraph engine evidence (controlled by `--engine-mode`), and directed local source lookup when needed.
7
+ Inputs are the SPEC file, the raw UI operation sequence, `project_design.md`, optional `database_design.md`, optional `preferences_design.md`, selected `module_design.md`, Homegraph engine evidence (controlled by `--engine-mode`), directed local source lookup when needed, and the HomeGraph **prompt** fields `homegraph_project` / `android_project` / `homegraph_guide` supplied by the coder.
8
8
 
9
9
  All generated content in the design document must be in Chinese.
10
10
 
@@ -19,7 +19,7 @@ All generated content in the design document must be in Chinese.
19
19
  ## Invocation
20
20
 
21
21
  ```text
22
- node "${CLAUDE_SKILL_DIR}/scripts/design/inspect_spec_design_inputs.mjs" <target_directory> <input_file> --task spec --engine-mode auto|off|required [--database-design <file>] [--preferences-design <file>] [--mvvm true|false] --output-file <design_output_file> --display-root <project_dir_name>
22
+ node "${SKILL_DIR}/scripts/design/inspect_spec_design_inputs.mjs" <target_directory> <input_file> --task spec --engine-mode auto|off|required [--database-design <file>] [--preferences-design <file>] [--mvvm true|false] --output-file <design_output_file> --display-root <project_dir_name>
23
23
  ```
24
24
 
25
25
  Arguments:
@@ -33,7 +33,13 @@ Arguments:
33
33
  * `--preferences-design`: optional Preferences design file. Default is resolved by the validation script.
34
34
  * `--mvvm`: `true` or `false`. Default is `false`. When `true`, related UI files and related logic files must be orthogonal.
35
35
  * `--display-root`: the `<path_display_root>/` prefix written into every design path. Default is `basename(target_directory)`. The worktree basename (`g<G>`) must never leak into the design.
36
- * No index-ready flag: the coder's worktree index is the only index used, read-only (never `homegraph init` / `sync` / `index`).
36
+ * `homegraph_project` / `android_project` / `homegraph_guide`: **prompt inputs** from the coder (Procedure 0
37
+ of `SKILL.md`), never CLI options of this script. Do not append them to the
38
+ `inspect_spec_design_inputs.mjs` invocation: it accepts only the flags shown above and exits
39
+ `unrecognized arguments` on anything else. `homegraph_project` is the shared `<HMOS>` main checkout — the
40
+ coder's `hmos-project-path`, or `target_directory` on a standalone coder run (one not dispatched with these
41
+ fields at all). `android_project` is the Android source root (may be absent); `homegraph_guide` is the
42
+ coder's `homegraph-guide` (may be absent).
37
43
  * `--output-file`: exact output file path (required); the design is always written here.
38
44
 
39
45
  ## Output
@@ -52,7 +58,7 @@ After generation, run output validation. Deterministic issues are written to
52
58
  Run:
53
59
 
54
60
  ```bash
55
- node "${CLAUDE_SKILL_DIR}/scripts/design/inspect_spec_design_inputs.mjs" "<target_directory>" "<input_file>" --task spec --engine-mode <engine_mode> --mvvm <mvvm_mode> [--database-design <database_design_file>] [--preferences-design <preferences_design_file>] --output-file <output_file> --display-root <project_dir_name>
61
+ node "${SKILL_DIR}/scripts/design/inspect_spec_design_inputs.mjs" "<target_directory>" "<input_file>" --task spec --engine-mode <engine_mode> --mvvm <mvvm_mode> [--database-design <database_design_file>] [--preferences-design <preferences_design_file>] --output-file <output_file> --display-root <project_dir_name>
56
62
  ```
57
63
 
58
64
  Stop if validation fails. Do not check design-file existence yourself (Hard Rules).
@@ -103,7 +109,7 @@ Each iteration:
103
109
  2. Resolve their `module_design.md` files in one call:
104
110
 
105
111
  ```bash
106
- node "${CLAUDE_SKILL_DIR}/scripts/design/resolve_module_design.mjs" "<target_directory>" "<candidate_module_1>" ["<candidate_module_2>" ...] --display-root <project_dir_name>
112
+ node "${SKILL_DIR}/scripts/design/resolve_module_design.mjs" "<target_directory>" "<candidate_module_1>" ["<candidate_module_2>" ...] --display-root <project_dir_name>
107
113
  ```
108
114
 
109
115
  The script performs the layered lookup itself and returns a `modules` array containing each module path, resolved `module_design` path (`null` when absent), and layout.
@@ -123,20 +129,45 @@ After loading the batch, analyze its modules together. Use the Homegraph and dir
123
129
 
124
130
  #### Homegraph
125
131
 
126
- Use the Homegraph code-analysis engine according to `--engine-mode`:
132
+ Use the HomeGraph code-analysis engine according to `--engine-mode`:
127
133
 
128
134
  * `auto`: attempt the engine with timeout `120000ms`. If it times out, or starts but does not complete, retry once with timeout `300000ms`. Use the successful output as auxiliary evidence. If both attempts fail, continue with local analysis.
129
135
  * `off`: skip engine evidence entirely.
130
- * `required`: the engine is mandatory. Verify `homegraph` is on PATH and a usable index exists **before** starting Step 3; stop generation if the engine cannot provide usable evidence.
136
+ * `required`: the engine is mandatory. Before starting Step 3, confirm `homegraph` is on PATH and that `homegraph_project` is a directory with a usable shared index (see the shared-index rule below); stop generation if the engine cannot provide usable evidence.
131
137
 
132
138
  The CLI binary is `homegraph`; ArkTS analysis additionally requires `arkanalyzer`. Both are provisioned globally by `ht init` — never install or fetch them from this skill. If `homegraph` is not on PATH, stop and ask the user to run `ht init` (or manually `npm install -g homegraph arkanalyzer`).
133
139
 
134
- Use the worktree's own HomeGraph index, read-only. Never run `homegraph init`, `sync`, or `index`; never query the main tree's index. When `--engine-mode` is `required`, verify a usable worktree index exists before Step 3 and stop if it does not.
140
+ Read `homegraph_guide` (the `a2h-spec-design-pipeline` skill's `references/homegraph-cli.md`; the dispatcher
141
+ passes its absolute path) before the first query; it owns the query discipline, the output reading rules and
142
+ the evidence format. Without it, follow the rules below.
135
143
 
136
- When this worktree has an index, use `mcp__homegraph__search` / `explore` / `node` / `impact` / `callers` / `callees` / `files` only when needed, each scoped with `projectPath: "<target_directory>"`.
144
+ **Shared-index rule (pipeline dispatch).** There is no worktree index. Read the shared indexes only, both read-only:
145
+
146
+ * `<homegraph_project>` (`<HMOS>` main checkout) — architecture, existing APIs, shared layers, call chains.
147
+ * `<android_project>` (`<ANDROID>` source root, when present) — the reference implementation and the spec's source anchors.
148
+
149
+ Query them with the CLI only:
150
+
151
+ ```bash
152
+ homegraph explore -p "<homegraph_project>" "<TypeA TypeB Type.member>"
153
+ homegraph explore -p "<android_project>" "<Symbol>"
154
+ ```
155
+
156
+ Add `impact` / `callers` only when a symbol's blast radius or caller chain matters (2–5 names per `explore`; `-j` only on `status`/`query`/`callers`/`callees`/`impact`/`affected`/`files` — `explore` and `node` take no `-j`). Never run `homegraph init` / `sync` / `index` / `unlock`: the orchestrator owns these indexes and is their only writer; `homegraph status` is diagnostics only, never a freshness gate.
157
+
158
+ **Start with `homegraph_project` before reading source**: one `explore` with this chunk's modules / pages / VMs / shared-layer symbols establishes what the main checkout already implements. Query `android_project` only when the SPEC's `## 安卓代码参考` anchor is missing, ambiguous, or the scenario needs a cross-file call chain; when the anchor gives `file:line`, read that file directly — do not query once per scenario. Never truncate `explore` output (`| Select-Object -First N`); `Partial locator` means the call was budget-limited, not that the file is missing — confirm with `files --pattern` or `query`.
159
+
160
+ **The worktree is the truth for what exists on this branch.**
161
+
162
+ * `index_ahead`: a symbol an index lists but the worktree lacks is another group's merged code or a later commit — never import, copy or re-implement it; that fact alone is not evidence the code exists here. Only design anchors that exist in `target_directory` may enter the document.
163
+ * Reverse case: a symbol present in the worktree but absent from the index is real — re-query once, then read the file and cite `file:line`.
164
+
165
+ **Standalone exception.** Only a design step that was **not dispatched with `homegraph_project`/`homegraph_guide` at all** — a standalone coder run — has no shared index to read; there `target_directory` may itself be the main checkout, so under `auto`/`required` you may probe it and run `homegraph init`/`sync`/`index` for your local index. A pipeline dispatch always supplies the pair, so the read-only rule above still governs `homegraph_project`: the fallback to `target_directory` is only a path default, never an opt-out from the read-only rule.
137
166
 
138
167
  Engine evidence may only locate related UI, data entity, database, Preferences, logic files, table structures, Preferences keys, symbols, and their relationships. The engine **must not** rewrite semantic descriptions copied from `project_design.md` or `module_design.md`.
139
168
 
169
+ Record the queries you ran by phase in `commit-info.md`'s `## HomeGraph evidence` section — first line `start | hmos`, then `design | android` for SPEC anchor gaps and `code | hmos` for impact — with at least one `file:line` anchor, or `degraded: <reason>` / `fallback: <reason>`, **inside that section** — `parseHomeGraphEvidence` stops at the next `##` heading, so the same text written outside the section does not count. Anchors without a `start | hmos` line are `homegraph-start-missing` (warning under `auto`, failure under `required`).
170
+
140
171
  #### Directed Source Lookup
141
172
 
142
173
  Use local source lookup only when foundational design evidence, confirmed module evidence, and Homegraph evidence are insufficient.
@@ -263,7 +294,7 @@ For database table metadata, omit `关联数据实体` when it is `None`, and om
263
294
  After writing the design document, run:
264
295
 
265
296
  ```bash
266
- node "${CLAUDE_SKILL_DIR}/scripts/design/move_spec_technical_reference.mjs" "<input_file>" "<design_path>"
297
+ node "${SKILL_DIR}/scripts/design/move_spec_technical_reference.mjs" "<input_file>" "<design_path>"
267
298
  ```
268
299
 
269
300
  If the input SPEC contains an exact level-2 section named `## 技术参考`, the script moves the complete section from the input SPEC to the design document immediately before `## 相关 UI`.
@@ -275,7 +306,7 @@ If the section does not exist, leave both files unchanged.
275
306
  After Step 5, run:
276
307
 
277
308
  ```bash
278
- node "${CLAUDE_SKILL_DIR}/scripts/design/validate_spec_design_output.mjs" "<target_directory>" "<design_path>" --display-root <project_dir_name>
309
+ node "${SKILL_DIR}/scripts/design/validate_spec_design_output.mjs" "<target_directory>" "<design_path>" --display-root <project_dir_name>
279
310
  ```
280
311
 
281
312
  If the script reports issues, keep the generated design file unchanged and report the issue file path.