@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
@@ -0,0 +1,46 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { mkdtempSync, mkdirSync, writeFileSync } from 'node:fs';
4
+ import { tmpdir } from 'node:os';
5
+ import path from 'node:path';
6
+ import { spawnSync } from 'node:child_process';
7
+ import { fileURLToPath } from 'node:url';
8
+ import { checkDesignMap, parseDesignMap } from './check_design_map.ts';
9
+
10
+ const SCRIPT = path.join(path.dirname(fileURLToPath(import.meta.url)), 'check_design_map.ts');
11
+ const HEADER = '| G | Group (dir) | Specs | Scenarios | Design File | UI Sequence | Start | End |\n|---|---|---|---|---|---|---|---|\n';
12
+
13
+ function fixture(rows: string, groups: any[]) {
14
+ const hmos = mkdtempSync(path.join(tmpdir(), 'dmap-'));
15
+ const dd = path.join(hmos, '.hometrans', 'spec_design');
16
+ mkdirSync(dd, { recursive: true });
17
+ writeFileSync(path.join(dd, 'SPEC_DESIGN_G1_c1.md'), '# d\n');
18
+ writeFileSync(path.join(dd, 'design_map.md'), HEADER + rows);
19
+ writeFileSync(path.join(hmos, '.hometrans', 'spec_pipeline_state.json'), JSON.stringify({ schema: 'spec_pipeline_state/v2', config: { design_dir: dd }, groups }));
20
+ return { hmos, dd };
21
+ }
22
+
23
+ test('parseDesignMap reads the table by header', () => {
24
+ const rows = parseDesignMap(HEADER + '| 1 | a | so-1 | 3 | SPEC_DESIGN_G1_c1.md | x | 2026-11-10T01:00:00Z | 2026-11-10T02:00:00Z |\n');
25
+ assert.equal(rows.length, 1);
26
+ assert.equal(rows[0].Scenarios, '3');
27
+ assert.equal(rows[0].End, '2026-11-10T02:00:00Z');
28
+ });
29
+
30
+ test('a consistent map passes; placeholders, reversed times, missing files and rows are reported (T7)', () => {
31
+ const good = fixture('| 1 | a | so-1 | 3 | SPEC_DESIGN_G1_c1.md | x | 2026-11-10T01:00:00Z | 2026-11-10T02:00:00Z |\n',
32
+ [{ G: 1, status: 'done' }]);
33
+ const ok = spawnSync(process.execPath, [SCRIPT, good.hmos], { encoding: 'utf8' });
34
+ assert.equal(ok.status, 0, ok.stdout + ok.stderr);
35
+
36
+ const bad = checkDesignMap({ groups: [{ G: 1, status: 'done' }, { G: 2, status: 'done' }, { G: 3, status: 'failed' }] },
37
+ HEADER + '| 1 | a | so-1 | 若干 | SPEC_DESIGN_G9_c1.md | x | 2026-11-10T03:00:00Z | 2026-11-10T02:00:00Z |\n'
38
+ + '| 2 | b | so-2 | 2 | SPEC_DESIGN_G1_c1.md | x | 待填 | 进行中 |\n', good.dd);
39
+ const text = bad.problems.map((p) => `${p.G}: ${p.problem}`).join('\n');
40
+ assert.match(text, /1: Scenarios is not a number/);
41
+ assert.match(text, /1: Start .* is after End/);
42
+ assert.match(text, /1: Design File SPEC_DESIGN_G9_c1\.md does not exist/);
43
+ assert.match(text, /2: Start is not a timestamp/);
44
+ assert.match(text, /2: End is not a timestamp/);
45
+ assert.match(text, /3: no row/);
46
+ });
@@ -0,0 +1,201 @@
1
+ // skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts
2
+ //
3
+ // B2's permission completeness step must use F0's own discipline, not a
4
+ // "the name is in the index" shortcut:
5
+ //
6
+ // - restricted / ACL names, system_basic names and F0-judged names are held,
7
+ // never added (a normal-APL signature cannot be granted them, and the store
8
+ // review rejects them);
9
+ // - the reverse check spans every merged group + F0's notes, so an earlier
10
+ // wave's permission is not reported unused on every later wave;
11
+ // - a name absent from the index is report-only (never written);
12
+ // - the report tells the orchestrator exactly what to apply (toAdd) and
13
+ // whether the runtime consent call sites exist.
14
+ //
15
+ // Run with: node --experimental-strip-types --test test_check_permissions.ts
16
+ import { spawnSync } from 'node:child_process';
17
+ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
18
+ import * as os from 'node:os';
19
+ import * as path from 'node:path';
20
+ import { fileURLToPath } from 'node:url';
21
+ import { test, type TestContext } from 'node:test';
22
+ import assert from 'node:assert/strict';
23
+
24
+ const HERE = path.dirname(fileURLToPath(import.meta.url));
25
+ const SCRIPT = path.join(HERE, 'check_permissions.ts');
26
+
27
+ const MODULE_JSON5 = `{
28
+ "module": {
29
+ "name": "entry",
30
+ "type": "entry",
31
+ "requestPermissions": [
32
+ // an earlier wave's permission: still used by wave 1's spec
33
+ { "name": "ohos.permission.ACCESS_BLUETOOTH" },
34
+ { "name": "ohos.permission.VIBRATE" },
35
+ // a restricted ACL name a coder slipped in: reported, never auto-removed
36
+ { "name": "ohos.permission.READ_CONTACTS" }
37
+ ]
38
+ }
39
+ }`;
40
+
41
+ function fixture(t: TestContext, opts: { notes?: string } = {}) {
42
+ const root = mkdtempSync(path.join(os.tmpdir(), 'perm-check-'));
43
+ t.after(() => rmSync(root, { recursive: true, force: true }));
44
+ const hmos = path.join(root, 'hmos');
45
+ const ht = path.join(hmos, '.hometrans');
46
+ const design = path.join(hmos, '.hometrans', 'design');
47
+ mkdirSync(path.join(hmos, 'entry', 'src', 'main'), { recursive: true });
48
+ mkdirSync(path.join(hmos, 'entry', 'src', 'main', 'ets', 'pages'), { recursive: true });
49
+ mkdirSync(path.join(ht, 'spec_group_1'), { recursive: true });
50
+ mkdirSync(path.join(ht, 'spec_group_2'), { recursive: true });
51
+ mkdirSync(path.join(ht, 'wave_1'), { recursive: true });
52
+ mkdirSync(design, { recursive: true });
53
+ writeFileSync(path.join(hmos, 'entry', 'src', 'main', 'module.json5'), MODULE_JSON5);
54
+
55
+ // Wave 1 (already merged): needs ACCESS_BLUETOOTH.
56
+ writeFileSync(
57
+ path.join(ht, 'spec_group_1', 'merged_spec.md'),
58
+ '## 场景1\n蓝牙扫描需要 `ohos.permission.ACCESS_BLUETOOTH`。\n',
59
+ );
60
+ // Wave 2 (this wave): two addable, one restricted, one F0-judged, one unknown.
61
+ writeFileSync(
62
+ path.join(ht, 'spec_group_2', 'merged_spec.md'),
63
+ [
64
+ '## 场景1',
65
+ '联网 `ohos.permission.INTERNET`。',
66
+ '拍照 `ohos.permission.CAMERA`。',
67
+ '相册读取 `ohos.permission.READ_IMAGEVIDEO`(受限)。',
68
+ '粘贴板 `ohos.permission.READ_PASTEBOARD`(走系统粘贴板 UI)。',
69
+ '悬浮窗 `ohos.permission.SYSTEM_FLOAT_WINDOW`。',
70
+ '未知能力 `ohos.permission.NOT_A_REAL_ONE`。',
71
+ ].join('\n'),
72
+ );
73
+ writeFileSync(
74
+ path.join(design, 'SPEC_DESIGN_G2_c0.md'),
75
+ '## 技术说明\n`requestPermissionsFromUser(context, ["ohos.permission.CAMERA"])`\n',
76
+ );
77
+ writeFileSync(
78
+ path.join(hmos, 'entry', 'src', 'main', 'ets', 'pages', 'Index.ets'),
79
+ 'import { abilityAccessCtrl } from "@kit.AbilityKit";\n' +
80
+ 'abilityAccessCtrl.createAtManager().requestPermissionsFromUser(context, perms);\n',
81
+ );
82
+ writeFileSync(
83
+ path.join(ht, 'wave_1', 'shared_manifest.json'),
84
+ JSON.stringify({
85
+ schema: 'spec_shared_manifest/v1',
86
+ campaign_id: 'c1',
87
+ wave: 1,
88
+ status: 'done',
89
+ commit: null,
90
+ base: null,
91
+ modules: [],
92
+ notes: opts.notes ??
93
+ 'ohos.permission.READ_PASTEBOARD | skip | contact-selection | picker\n' +
94
+ 'ohos.permission.ACCESS_BLUETOOTH -> ohos.permission.ACCESS_BLUETOOTH | 申请蓝牙权限 | user_grant',
95
+ }),
96
+ );
97
+ writeFileSync(
98
+ path.join(ht, 'spec_pipeline_state.json'),
99
+ JSON.stringify({
100
+ schema: 'spec_pipeline_state/v2',
101
+ config: { design_dir: design, design_granularity: 'chunk' },
102
+ groups: [
103
+ {
104
+ G: 1, status: 'done', wave: 1,
105
+ merged_spec: path.join(ht, 'spec_group_1', 'merged_spec.md'),
106
+ chunks: [],
107
+ },
108
+ {
109
+ G: 2, status: 'merged', wave: 2,
110
+ merged_spec: path.join(ht, 'spec_group_2', 'merged_spec.md'),
111
+ chunks: [{ spec_file: path.join(ht, 'spec_group_2', 'merged_spec.md'), design_file: 'SPEC_DESIGN_G2_c0.md' }],
112
+ },
113
+ ],
114
+ specs: [],
115
+ }),
116
+ );
117
+ return { root, hmos, ht };
118
+ }
119
+
120
+ function run(fx: { hmos: string }, args: string[] = []) {
121
+ const r = spawnSync(process.execPath, ['--experimental-strip-types', SCRIPT, fx.hmos, '--wave', '2', ...args], {
122
+ encoding: 'utf8',
123
+ timeout: 120_000,
124
+ });
125
+ let json: any;
126
+ try {
127
+ json = JSON.parse(r.stdout.trim());
128
+ } catch {
129
+ json = null;
130
+ }
131
+ return { status: r.status, json, stdout: r.stdout, stderr: r.stderr };
132
+ }
133
+
134
+ test('reports only F0-allowed permissions as toAdd; restricted / judged / unknown are held', (t) => {
135
+ const fx = fixture(t);
136
+ const { status, json, stderr } = run(fx);
137
+ assert.equal(status, 0, stderr);
138
+ const added = (json.toAdd as Array<{ name: string }>).map((p) => p.name);
139
+ assert.deepEqual(added, ['ohos.permission.CAMERA', 'ohos.permission.INTERNET']);
140
+
141
+ const held = new Map((json.held as Array<{ name: string; reason: string; source: string }>)
142
+ .map((h) => [h.name, `${h.source}:${h.reason}`]));
143
+ assert.equal(held.get('ohos.permission.READ_IMAGEVIDEO'), 'index:restricted');
144
+ assert.equal(held.get('ohos.permission.SYSTEM_FLOAT_WINDOW'), 'index:restricted');
145
+ // F0 already judged the pasteboard name: the wiring step must not resurrect it.
146
+ assert.equal(held.get('ohos.permission.READ_PASTEBOARD'), 'f0:picker');
147
+
148
+ assert.deepEqual((json.unknown as Array<{ name: string }>).map((u) => u.name),
149
+ ['ohos.permission.NOT_A_REAL_ONE']);
150
+ assert.equal(json.counts.missing, 1, 'only the unknown name stays missing');
151
+ assert.equal(json.counts.held, 3);
152
+ assert.equal(json.counts.added, 2);
153
+ assert.equal(json.counts.required, 6);
154
+
155
+ // A user_grant add needs reason + usedScene; the consent call sites exist here.
156
+ assert.equal(json.toAdd.find((p: any) => p.name === 'ohos.permission.CAMERA').needsReason, true);
157
+ assert.equal(json.consent.ok, true);
158
+ assert.ok(json.consent.callSites >= 1);
159
+ });
160
+
161
+ test('the reverse check spans every merged group, not just this wave', (t) => {
162
+ const fx = fixture(t);
163
+ const { json } = run(fx);
164
+ // ACCESS_BLUETOOTH is wave 1's permission — it must never look unused in wave 2.
165
+ assert.equal(json.unused.includes('ohos.permission.ACCESS_BLUETOOTH'), false);
166
+ // VIBRATE is declared and used by no merged spec → report-only.
167
+ assert.deepEqual(json.unused, ['ohos.permission.VIBRATE']);
168
+ // A restricted name already in module.json5 is flagged for the final report.
169
+ assert.deepEqual((json.declaredForbidden as Array<{ name: string }>).map((p) => p.name),
170
+ ['ohos.permission.READ_CONTACTS']);
171
+ });
172
+
173
+ test('module.json5 comments/trailing commas parse, and a missing state is a usage error', (t) => {
174
+ const fx = fixture(t);
175
+ const { json } = run(fx);
176
+ assert.deepEqual(json.declared, [
177
+ 'ohos.permission.ACCESS_BLUETOOTH',
178
+ 'ohos.permission.VIBRATE',
179
+ 'ohos.permission.READ_CONTACTS',
180
+ ]);
181
+ rmSync(path.join(fx.ht, 'spec_pipeline_state.json'));
182
+ const bad = run(fx);
183
+ assert.equal(bad.status, 2);
184
+ assert.match(bad.stderr, /state file does not exist/);
185
+ });
186
+
187
+ test('the doc contract: F0 records a machine-readable skip line; wiring applies only toAdd', () => {
188
+ const refs = path.join(HERE, '..', 'references');
189
+ const shared = readFileSync(path.join(refs, 'shared-layer.md'), 'utf8');
190
+ assert.ok(shared.includes('| skip |'), 'shared-layer.md must record the judged-name line');
191
+ for (const token of ['restricted|picker|none', 'check_permissions.ts']) {
192
+ assert.ok(shared.includes(token), `shared-layer.md missing ${token}`);
193
+ }
194
+ const merge = readFileSync(path.join(refs, 'merge-queue.md'), 'utf8');
195
+ for (const token of ['check_permissions.ts', 'toAdd', 'held', 'permission-unused',
196
+ 'permission-missing-not-in-index', 'restricted: false', 'level: normal']) {
197
+ assert.ok(merge.includes(token), `merge-queue.md missing ${token}`);
198
+ }
199
+ const skill = readFileSync(path.join(refs, '..', 'SKILL.md'), 'utf8');
200
+ assert.ok(skill.includes('check_permissions.ts'));
201
+ });
@@ -82,7 +82,6 @@ test("release promotes the winning attempt files", () => {
82
82
  ok(run(root, "submit", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token, "--kind", "completed"));
83
83
  const dir = join(root, ".hometrans", "spec_group_2", "chunk_1", "attempt_1");
84
84
  writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n");
85
- ok(run(root, "queue-merge", "2"));
86
85
  ok(run(root, "release", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token, "--outcome", "done"));
87
86
  assert.ok(existsSync(join(root, ".hometrans", "spec_group_2", "chunk_1", "commit-info.md")));
88
87
  });
@@ -100,7 +99,6 @@ test("submit is idempotent and release is the only done exit", () => {
100
99
  const zombie = run(root, "submit", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", "deadbeef", "--kind", "completed");
101
100
  assert.equal(zombie.status, 1, zombie.stdout + zombie.stderr);
102
101
  assert.match(zombie.stdout, /"stale":true/, "a stale identity must surface as stale, not as a duplicate");
103
- ok(run(root, "queue-merge", "2"));
104
102
  ok(run(root, "release", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token, "--outcome", "done"));
105
103
  const s = ok(run(root, "status"));
106
104
  assert.equal(s.units["chunk:g2c1"].state, "done");
@@ -487,6 +485,13 @@ test("group-merge removes generations older than the merged one", () => {
487
485
  ok(run(root, "group-reset", "2", "--mode", "fresh", "--base", "HEAD", "--reason", "hop-b"));
488
486
  assert.ok(existsSync(join(wtRoot, "g2r1")), "gen 1 worktree missing");
489
487
  const wt1 = join(wtRoot, "g2r1");
488
+ for (const k of [1, 2]) {
489
+ const c = ok(run(root, "claim", `chunk:g2c${k}`));
490
+ ok(run(root, "intent", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token));
491
+ ok(run(root, "confirm", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token, "--session", "ses_1"));
492
+ ok(run(root, "submit", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token, "--kind", "completed"));
493
+ ok(run(root, "release", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token, "--outcome", "done"));
494
+ }
490
495
  writeFileSync(join(wt1, "f.txt"), "f\n");
491
496
  execFileSync("git", ["-C", wt1, "add", "."]);
492
497
  execFileSync("git", ["-C", wt1, "commit", "-qm", "work"]);
@@ -526,6 +531,14 @@ test("group-reset refuses a merged group before touching its branch", () => {
526
531
  const root = mk();
527
532
  ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
528
533
  provision(root);
534
+ // The landing gate requires every planned chunk done; finish both first.
535
+ for (const k of [1, 2]) {
536
+ const c = ok(run(root, "claim", `chunk:g2c${k}`));
537
+ ok(run(root, "intent", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token));
538
+ ok(run(root, "confirm", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token, "--session", "ses_1"));
539
+ ok(run(root, "submit", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token, "--kind", "completed"));
540
+ ok(run(root, "release", `chunk:g2c${k}`, "--expect-gen", c.claimGen, "--token", c.token, "--outcome", "done"));
541
+ }
529
542
  const wtRoot = join(dirname(root), "wt", root.split(/[\\/]/).pop());
530
543
  const wt0 = join(wtRoot, "g2r0");
531
544
  writeFileSync(join(wt0, "next.txt"), "next\n");
@@ -571,4 +584,15 @@ test("reconcile reads a BOM-prefixed pipeline state", () => {
571
584
  "\uFEFF" + JSON.stringify({ schema: "spec_pipeline_state/v2", config: {}, specs: [], groups: [] }));
572
585
  const r = run(root, "reconcile", "--check");
573
586
  assert.notEqual(r.status, 3, r.stderr);
574
- });
587
+ });
588
+ test("init --new-run --resume keeps the pipeline state in place; --resume alone is refused", () => {
589
+ const root = mk();
590
+ ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
591
+ const stateFile = join(root, ".hometrans", "spec_pipeline_state.json");
592
+ writeFileSync(stateFile, JSON.stringify({ sentinel: true }));
593
+ assert.equal(run(root, "init", "--wave", "1", "--resume").status, 2);
594
+ const r = ok(run(root, "init", "--wave", "1", "--new-run", "--resume", "--run-id", "r-2"));
595
+ assert.equal(r.runId, "r-2");
596
+ assert.equal(JSON.parse(readFileSync(stateFile, "utf8")).sentinel, true, "the same campaign keeps its state");
597
+ assert.ok(existsSync(join(root, ".hometrans", "spec_pipeline_archive")), "an audit copy is archived");
598
+ });
@@ -172,17 +172,23 @@ test("scenario 04: two content failures close the unit and the wave still comple
172
172
 
173
173
  test("scenario 05: an orphaned resolver drops mergeQueued on a reuse reset", () => {
174
174
  const { root } = setup();
175
- close(root, "chunk:g1c1", 0, "--reason", "blocked");
176
- close(root, "chunk:g1c2", 0, "--reason", "blocked");
177
- ok(run(root, "queue-merge", "1", "--now", iso(0)));
175
+ // Queue only after a clean coding finish (the queue and landing gates now
176
+ // share the same completeness predicate).
177
+ const c1 = live(root, "chunk:g1c1", 0);
178
+ submit(root, "chunk:g1c1", c1, "completed", 1);
179
+ release(root, "chunk:g1c1", c1, "done", 2);
180
+ const c2 = live(root, "chunk:g1c2", 2);
181
+ submit(root, "chunk:g1c2", c2, "completed", 3);
182
+ release(root, "chunk:g1c2", c2, "done", 4);
183
+ ok(run(root, "queue-merge", "1", "--now", iso(4)));
178
184
  assert.equal(status(root).groups["1"].mergeQueued, true);
179
185
 
180
- live(root, "resolver:g1", 1);
181
- const rec = reconcile(root, 31);
186
+ live(root, "resolver:g1", 5);
187
+ const rec = reconcile(root, 35);
182
188
  assert.equal(rec.units["resolver:g1"].state, "orphaned");
183
189
 
184
- ok(run(root, "dequeue-merge", "1", "--now", iso(32)));
185
- ok(run(root, "group-reset", "1", "--mode", "reuse", "--base", "HEAD", "--now", iso(33)));
190
+ ok(run(root, "dequeue-merge", "1", "--now", iso(36)));
191
+ ok(run(root, "group-reset", "1", "--mode", "reuse", "--base", "HEAD", "--now", iso(37)));
186
192
  const s = status(root);
187
193
  assert.equal(s.units["resolver:g1"].state, "pending");
188
194
  assert.equal(s.groups["1"].mergeQueued, false);
@@ -328,6 +334,13 @@ test("scenario 11: a beat pushes the lease deadline forward", () => {
328
334
 
329
335
  test("scenario 12: a real --no-ff merge is landed and reconciles as merged", () => {
330
336
  const { root, w1 } = setup();
337
+ // The landing gate requires the group's coding to be finished; finish both
338
+ // planned chunks before the git merge / group-merge.
339
+ for (const [unit, m] of [["chunk:g1c1", 0], ["chunk:g1c2", 1]]) {
340
+ const c = live(root, unit, m);
341
+ submit(root, unit, c, "completed", m);
342
+ release(root, unit, c, "done", m);
343
+ }
331
344
  writeFileSync(join(w1.worktree, "g1.txt"), "g1\n");
332
345
  execFileSync("git", ["-C", w1.worktree, "add", "."]);
333
346
  execFileSync("git", ["-C", w1.worktree, "commit", "-qm", "g1 commit"]);
@@ -6,6 +6,8 @@ import { tmpdir } from "node:os";
6
6
  import { join } from "node:path";
7
7
  import { chunkEvidence, parseCommitInfo, parseStateDocs, attemptDir, promoteAttempt, ensureAttemptDir } from "./dispatch/evidence.mjs";
8
8
 
9
+ const HG = "\n## HomeGraph evidence\n- start | hmos | explore a.txt:1\n- hmos: a.txt:1\n";
10
+
9
11
  function repo() {
10
12
  const root = mkdtempSync(join(tmpdir(), "ev-"));
11
13
  execFileSync("git", ["init", "-q", "-b", "main", root]);
@@ -60,13 +62,33 @@ test("parseStateDocs lets unavailable win over an earlier available line", () =>
60
62
  assert.equal(parseStateDocs("state-docs: not-applicable\nstate-docs: available\n"), "available");
61
63
  });
62
64
 
65
+ test("an api-docs line never changes the state-docs verdict", () => {
66
+ // The coder records the soft platform-API gate in the same artifact; its verdict is a separate,
67
+ // softer signal and must not leak into the state-management gate's hard gate.
68
+ const doc = [
69
+ "# state_docs_used.md",
70
+ "| value | scope | decorator | doc key |",
71
+ "| count | component-local | @Local | v2-local |",
72
+ "state-docs: available",
73
+ "",
74
+ "## Platform API lookups",
75
+ "| api | catalog | documentId or key | section | API level | conclusion |",
76
+ "| @ohos.net.http | harmonyos-references | api-http | createHttp | 12+ | async request via task |",
77
+ "api-docs: unavailable",
78
+ ].join("\n");
79
+ assert.equal(parseStateDocs(doc), "available");
80
+ assert.equal(parseStateDocs("api-docs: unavailable\nstate-docs: not-applicable\n"), "not-applicable");
81
+ assert.equal(parseStateDocs("| api-docs | available |\n"), null);
82
+ assert.equal(parseStateDocs("## Platform API lookups\napi-docs: available\n"), null);
83
+ });
84
+
63
85
  test("all three state-docs verdicts reach the completed evidence", () => {
64
86
  const root = repo();
65
87
  const base = head(root);
66
88
  const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
67
89
  const dir = attemptDir(root, 2, "chunk", 1, 1);
68
90
  mkdirSync(dir, { recursive: true });
69
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
91
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n` + HG);
70
92
  const claim = { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] };
71
93
  for (const verdict of ["available", "unavailable", "not-applicable"]) {
72
94
  writeFileSync(join(dir, "state_docs_used.md"), `state-docs: ${verdict}\n| value | scope | decorator | doc key |\n`);
@@ -84,7 +106,7 @@ test("a commit in range with a fresh attempt commit-info is completed", () => {
84
106
  const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
85
107
  const dir = attemptDir(root, 2, "chunk", 1, 1);
86
108
  mkdirSync(dir, { recursive: true });
87
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
109
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n` + HG);
88
110
  writeFileSync(join(dir, "state_docs_used.md"), "state-docs: available\n| value | scope | decorator | doc key |\n");
89
111
  const out = chunkEvidence({
90
112
  hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
@@ -103,7 +125,7 @@ test("commit-id outside the range is invalid", () => {
103
125
  commit(root, "so-1: add", "a.txt", "a\nb\n");
104
126
  const dir = attemptDir(root, 2, "chunk", 1, 1);
105
127
  mkdirSync(dir, { recursive: true });
106
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${old}\nchange-type: code\n`);
128
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${old}\nchange-type: code\n` + HG);
107
129
  const out = chunkEvidence({
108
130
  hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
109
131
  claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
@@ -116,7 +138,7 @@ test("none is completed only when the range is empty", () => {
116
138
  const base = head(root);
117
139
  const dir = attemptDir(root, 2, "chunk", 1, 1);
118
140
  mkdirSync(dir, { recursive: true });
119
- writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n");
141
+ writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n" + HG);
120
142
  const out = chunkEvidence({
121
143
  hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
122
144
  claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
@@ -131,7 +153,7 @@ test("missing state_docs_used.md warns on the evidence branch too", () => {
131
153
  const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
132
154
  const dir = attemptDir(root, 2, "chunk", 1, 1);
133
155
  mkdirSync(dir, { recursive: true });
134
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
156
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n` + HG);
135
157
  const claim = { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] };
136
158
  const out = chunkEvidence({ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root, claim });
137
159
  assert.equal(out.kind, "completed");
@@ -144,7 +166,7 @@ test("a malformed state_docs_used.md warns but still completes", () => {
144
166
  const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
145
167
  const dir = attemptDir(root, 2, "chunk", 1, 1);
146
168
  mkdirSync(dir, { recursive: true });
147
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
169
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n` + HG);
148
170
  writeFileSync(join(dir, "state_docs_used.md"), "state-docs: guessed\n");
149
171
  const out = chunkEvidence({
150
172
  hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
@@ -159,7 +181,7 @@ test("none with an unreadable range is invalid, never completed", () => {
159
181
  const base = head(root);
160
182
  const dir = attemptDir(root, 2, "chunk", 1, 1);
161
183
  mkdirSync(dir, { recursive: true });
162
- writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n");
184
+ writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n" + HG);
163
185
  const out = chunkEvidence({
164
186
  hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
165
187
  claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: "no-such-ref", baseDirty: [] },
@@ -181,7 +203,7 @@ test("promoteAttempt copies the winning files to the chunk dir", () => {
181
203
  const root = repo();
182
204
  const dir = attemptDir(root, 2, "chunk", 1, 2);
183
205
  mkdirSync(dir, { recursive: true });
184
- writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n");
206
+ writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n" + HG);
185
207
  writeFileSync(join(dir, "state_docs_used.md"), "state-docs: not-applicable\n");
186
208
  promoteAttempt(root, 2, "chunk", 1, 2);
187
209
  assert.ok(existsSync(join(root, ".hometrans", "spec_group_2", "chunk_1", "commit-info.md")));
@@ -192,7 +214,7 @@ test("promoteAttempt copies resolver artifacts and drops a stale destination ver
192
214
  const root = repo();
193
215
  const dir = attemptDir(root, 2, "resolver", null, 1);
194
216
  mkdirSync(dir, { recursive: true });
195
- writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n");
217
+ writeFileSync(join(dir, "commit-info.md"), "commit-id: none\nchange-type: none\n" + HG);
196
218
  writeFileSync(join(dir, "state_docs_used.md"), "state-docs: unavailable\n");
197
219
  promoteAttempt(root, 2, "resolver", null, 1);
198
220
  const dest = join(root, ".hometrans", "spec_group_2", "resolver");
@@ -201,7 +223,7 @@ test("promoteAttempt copies resolver artifacts and drops a stale destination ver
201
223
  // A later winning attempt without the file must clear the superseded verdict.
202
224
  const next = attemptDir(root, 2, "chunk", 1, 2);
203
225
  mkdirSync(next, { recursive: true });
204
- writeFileSync(join(next, "commit-info.md"), "commit-id: none\nchange-type: none\n");
226
+ writeFileSync(join(next, "commit-info.md"), "commit-id: none\nchange-type: none\n" + HG);
205
227
  const chunkDest = join(root, ".hometrans", "spec_group_2", "chunk_1");
206
228
  mkdirSync(chunkDest, { recursive: true });
207
229
  writeFileSync(join(chunkDest, "state_docs_used.md"), "state-docs: available\n");
@@ -215,7 +237,7 @@ test("so-id coverage is a token match, not a substring", () => {
215
237
  const first = commit(root, "so-10: only ten", "b.txt", "b\n");
216
238
  const dir = attemptDir(root, 2, "chunk", 1, 1);
217
239
  mkdirSync(dir, { recursive: true });
218
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${first}\nchange-type: code\n`);
240
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${first}\nchange-type: code\n` + HG);
219
241
  const claim = { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] };
220
242
  const gap = chunkEvidence({ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1", "so-10"], taskBase: base, worktree: root, claim });
221
243
  assert.deepEqual([gap.kind, gap.reason], ["incomplete", "so-id-gap"]);
@@ -234,7 +256,7 @@ test("issues.md newer than a fresh commit-info.md fails the attempt", () => {
234
256
  mkdirSync(dir, { recursive: true });
235
257
  const info = join(dir, "commit-info.md");
236
258
  const issues = join(dir, "issues.md");
237
- writeFileSync(info, `commit-id: ${sha}\nchange-type: code\n`);
259
+ writeFileSync(info, `commit-id: ${sha}\nchange-type: code\n` + HG);
238
260
  writeFileSync(issues, "build broke\n");
239
261
  const claim = { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] };
240
262
  const older = new Date(Date.now() - 30_000);
@@ -257,8 +279,116 @@ test("evidence refuses a claim with no baseHead instead of skipping the range ch
257
279
  const sha = commit(root, "so-1: one", "b.txt", "b\n");
258
280
  const dir = attemptDir(root, 2, "chunk", 1, 1);
259
281
  mkdirSync(dir, { recursive: true });
260
- writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
282
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n` + HG);
261
283
  const claim = { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: "", baseDirty: [] };
262
284
  const r = chunkEvidence({ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root, claim });
263
285
  assert.deepEqual([r.kind, r.reason], ["invalid", "no-base-head"]);
264
286
  });
287
+
288
+ test("auto mode warns on a missing HomeGraph evidence section", () => {
289
+ const prev = process.env.ENGINE_MODE;
290
+ process.env.ENGINE_MODE = "auto";
291
+ try {
292
+ const root = repo();
293
+ const base = head(root);
294
+ const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
295
+ const dir = attemptDir(root, 2, "chunk", 1, 1);
296
+ mkdirSync(dir, { recursive: true });
297
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
298
+ writeFileSync(join(dir, "state_docs_used.md"), "state-docs: available\n");
299
+ const out = chunkEvidence({
300
+ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
301
+ claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
302
+ });
303
+ assert.equal(out.kind, "completed");
304
+ assert.ok(out.warnings.includes("homegraph-evidence-missing"));
305
+ } finally {
306
+ if (prev === undefined) delete process.env.ENGINE_MODE; else process.env.ENGINE_MODE = prev;
307
+ }
308
+ });
309
+
310
+ test("required mode fails the attempt on a missing HomeGraph evidence section", () => {
311
+ const prev = process.env.ENGINE_MODE;
312
+ process.env.ENGINE_MODE = "required";
313
+ try {
314
+ const root = repo();
315
+ const base = head(root);
316
+ const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
317
+ const dir = attemptDir(root, 2, "chunk", 1, 1);
318
+ mkdirSync(dir, { recursive: true });
319
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
320
+ const out = chunkEvidence({
321
+ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
322
+ claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
323
+ });
324
+ assert.equal(out.kind, "failed");
325
+ assert.equal(out.reason, "homegraph-evidence-missing");
326
+ } finally {
327
+ if (prev === undefined) delete process.env.ENGINE_MODE; else process.env.ENGINE_MODE = prev;
328
+ }
329
+ });
330
+
331
+ test("auto mode warns when the start hmos query is missing", () => {
332
+ const prev = process.env.ENGINE_MODE;
333
+ process.env.ENGINE_MODE = "auto";
334
+ try {
335
+ const root = repo();
336
+ const base = head(root);
337
+ const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
338
+ const dir = attemptDir(root, 2, "chunk", 1, 1);
339
+ mkdirSync(dir, { recursive: true });
340
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n\n## HomeGraph evidence\n- hmos: a.txt:1\n`);
341
+ writeFileSync(join(dir, "state_docs_used.md"), "state-docs: available\n");
342
+ const out = chunkEvidence({
343
+ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
344
+ claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
345
+ });
346
+ assert.equal(out.kind, "completed");
347
+ assert.ok(out.warnings.includes("homegraph-start-missing"));
348
+ } finally {
349
+ if (prev === undefined) delete process.env.ENGINE_MODE; else process.env.ENGINE_MODE = prev;
350
+ }
351
+ });
352
+
353
+ test("required mode fails when the start hmos query is missing", () => {
354
+ const prev = process.env.ENGINE_MODE;
355
+ process.env.ENGINE_MODE = "required";
356
+ try {
357
+ const root = repo();
358
+ const base = head(root);
359
+ const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
360
+ const dir = attemptDir(root, 2, "chunk", 1, 1);
361
+ mkdirSync(dir, { recursive: true });
362
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n\n## HomeGraph evidence\n- hmos: a.txt:1\n`);
363
+ const out = chunkEvidence({
364
+ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
365
+ claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
366
+ });
367
+ assert.equal(out.kind, "failed");
368
+ assert.equal(out.reason, "homegraph-start-missing");
369
+ } finally {
370
+ if (prev === undefined) delete process.env.ENGINE_MODE; else process.env.ENGINE_MODE = prev;
371
+ }
372
+ });
373
+
374
+ test("off mode never adds a HomeGraph warning", () => {
375
+ const prev = process.env.ENGINE_MODE;
376
+ process.env.ENGINE_MODE = "off";
377
+ try {
378
+ const root = repo();
379
+ const base = head(root);
380
+ const sha = commit(root, "so-1: add", "a.txt", "a\nb\n");
381
+ const dir = attemptDir(root, 2, "chunk", 1, 1);
382
+ mkdirSync(dir, { recursive: true });
383
+ writeFileSync(join(dir, "commit-info.md"), `commit-id: ${sha}\nchange-type: code\n`);
384
+ writeFileSync(join(dir, "state_docs_used.md"), "state-docs: available\n");
385
+ const out = chunkEvidence({
386
+ hmos: root, G: 2, k: 1, attempt: 1, specIds: ["so-1"], taskBase: base, worktree: root,
387
+ claim: { claimedAt: new Date(Date.now() - 60_000).toISOString(), baseHead: base, baseDirty: [] },
388
+ });
389
+ assert.equal(out.kind, "completed");
390
+ assert.ok(!(out.warnings ?? []).includes("homegraph-evidence-missing"));
391
+ } finally {
392
+ if (prev === undefined) delete process.env.ENGINE_MODE; else process.env.ENGINE_MODE = prev;
393
+ }
394
+ });