@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
@@ -20,15 +20,15 @@ Neither source alone is sufficient. Use both when available.
20
20
 
21
21
  ## Inspecting with HomeGraph
22
22
 
23
- Prefer the `mcp__homegraph__*` tools when they are loaded. Fall back to the `homegraph` CLI, which accepts the same project path.
23
+ All queries run through the `homegraph` CLI with `-p "<target_project_dir>"` — the same invocation the other a2h skills use.
24
24
 
25
25
  | Question | Approach |
26
26
  |---|---|
27
- | What does this module do? | `homegraph_explore` on the module's main symbols |
28
- | What are the real dependencies? | `homegraph_explore` across module boundaries |
29
- | Who writes this store? | `homegraph_callers` on the storage API helpers |
30
- | What is the module tree? | `homegraph_files` |
31
- | Is the index usable and current? | `homegraph_status` |
27
+ | What does this module do? | `homegraph explore -p "<target_project_dir>" "<symbols>"` on the module's main symbols |
28
+ | What are the real dependencies? | `homegraph explore -p "<target_project_dir>" "<symbols>"` across module boundaries |
29
+ | Who writes this store? | `homegraph callers -p "<target_project_dir>" "<symbol>"` on the storage API helpers |
30
+ | What is the module tree? | `homegraph files -p "<target_project_dir>" --filter <module dir>` |
31
+ | Is the index usable and current? | `homegraph status "<target_project_dir>" --json` |
32
32
 
33
33
  Run every query against `target_project_dir`.
34
34
 
@@ -42,7 +42,7 @@ HomeGraph needs a `.homegraph/` index at the project root. Three cases:
42
42
 
43
43
  Never index the HarmonyOS project without asking. When the user declines, degrade to local inspection only, record `homegraph.available=false` with the reason in `target_inspection.json`, and state plainly in the run summary that dependency and ownership facts are structurally derived rather than call-path verified. Degradation is recorded only in artifacts and reports, never in the formal documents.
44
44
 
45
- There is no install step in this skill. HomeGraph CLI availability is a user-side concern; when neither the tools nor the CLI are usable, degrade and say so.
45
+ There is no install step in this skill. HomeGraph CLI availability is a user-side concern; when the CLI is not usable, degrade and say so.
46
46
 
47
47
  ## target_inspection.json contract
48
48
 
@@ -88,7 +88,7 @@ There is no install step in this skill. HomeGraph CLI availability is a user-sid
88
88
  },
89
89
  "homegraph": {
90
90
  "available": true,
91
- "mode": "mcp | cli | unavailable",
91
+ "mode": "cli | unavailable",
92
92
  "index_present": true,
93
93
  "reason": null
94
94
  },
@@ -1,10 +1,10 @@
1
1
  # HomeGraph Workflow
2
2
 
3
- HomeGraph is the semantic source for reconstructing the source architecture in **both modes** (generate and reconcile). It is a local code knowledge graph reached through its `homegraph` CLI (Node.js 18+) and the optional `mcp__homegraph__*` MCP tools. HomeGraph itself is never modified. The adapter scripts (`dump_core_facts.mjs`, `extract_core_components.mjs`, `compute_processing_order.mjs`, `validate_homegraph_artifacts.mjs`, `check_module_staleness.mjs`) work over its CLI output and index. Run it against the repository reported by `scope.json`'s `effective_android_repo` field, not an umbrella repository root.
3
+ HomeGraph is the semantic source for reconstructing the source architecture in **both modes** (generate and reconcile). It is a local code knowledge graph reached through its `homegraph` CLI (Node.js 18+). HomeGraph itself is never modified. The adapter scripts (`dump_core_facts.mjs`, `extract_core_components.mjs`, `compute_processing_order.mjs`, `validate_homegraph_artifacts.mjs`, `check_module_staleness.mjs`) work over its CLI output and index. Run it against the repository reported by `scope.json`'s `effective_android_repo` field, not an umbrella repository root.
4
4
 
5
5
  The reconcile mode additionally uses HomeGraph for the **target side** (the existing HarmonyOS project's current state). That usage is defined by `references/harmony-project-inspection.md` and is separate from this pipeline.
6
6
 
7
- When neither the CLI nor the MCP tools are usable, degrade to local analysis as defined by the Preflight step in SKILL.md.
7
+ When the CLI is not usable, degrade to local analysis as defined by the Preflight step in SKILL.md.
8
8
 
9
9
  ## Source-side pipeline protocol (both modes)
10
10
 
@@ -15,14 +15,15 @@ HG="<target_project_dir>/.hometrans/arch_generate/source_homegraph"
15
15
  mkdir -p "$HG"
16
16
  SRC_REPO=$(node -p "JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).effective_android_repo" "<target_project_dir>/.hometrans/arch_generate/scope.json")
17
17
 
18
- Bash: homegraph init "$SRC_REPO" # deterministic index (no LLM); ASK THE USER FIRST (writes .homegraph/ into the source repository)
19
- Bash: homegraph status "$SRC_REPO"
20
- Bash: <core-facts step below> # emits "$HG/core_facts.json"
21
- node "${CLAUDE_SKILL_DIR}/scripts/extract_core_components.mjs" "$HG/core_facts.json" --out "$HG/potential_core_components.txt"
18
+ homegraph init "$SRC_REPO" # deterministic index (no LLM); ASK THE USER FIRST (writes .homegraph/ into the source repository)
19
+ homegraph status "$SRC_REPO"
20
+ # core-facts step below emits "$HG/core_facts.json"
21
+ node "${SKILL_DIR}/scripts/extract_core_components.mjs" "$HG/core_facts.json" --out "$HG/potential_core_components.txt"
22
22
  → cluster the candidate leaves into a nested module tree (read references/clustering-guidance.md first); Write "$HG/module_map.json"
23
- node "${CLAUDE_SKILL_DIR}/scripts/compute_processing_order.mjs" "$HG/module_map.json" --core-facts "$HG/core_facts.json" --out "$HG/processing_order.json"
24
- → for each module in leaf-first order, gather evidence: homegraph_explore / homegraph_node,
25
- plus homegraph_callers / homegraph_callees / homegraph_impact, or the equivalent `homegraph` CLI subcommand via Bash
23
+ node "${SKILL_DIR}/scripts/compute_processing_order.mjs" "$HG/module_map.json" --core-facts "$HG/core_facts.json" --out "$HG/processing_order.json"
24
+ → for each module in leaf-first order, gather evidence through the `homegraph` CLI (always
25
+ with `-p "<SRC_REPO>"`): `homegraph explore` for how-wired and symbol/file reads,
26
+ plus `homegraph callers` / `homegraph callees` / `homegraph impact` for relationships and blast radius
26
27
  → Write "$HG/docs/<module>.md"
27
28
  ```
28
29
 
@@ -37,7 +38,7 @@ HG="<target_project_dir>/.hometrans/arch_generate/source_homegraph"
37
38
  SRC_REPO=$(node -p "JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).effective_android_repo" "<target_project_dir>/.hometrans/arch_generate/scope.json")
38
39
 
39
40
  # Read .homegraph/homegraph.db directly (read-only) and produce core_facts.json
40
- node "${CLAUDE_SKILL_DIR}/scripts/dump_core_facts.mjs" -p "$SRC_REPO" --json > "$HG/core_facts.json"
41
+ node "${SKILL_DIR}/scripts/dump_core_facts.mjs" -p "$SRC_REPO" --json > "$HG/core_facts.json"
41
42
  ```
42
43
 
43
44
  The downstream adapters (`extract_core_components.mjs`, `compute_processing_order.mjs`, `check_module_staleness.mjs`) consume only the contract, so they are agnostic to the producer.
@@ -52,9 +53,17 @@ Reconcile HomeGraph findings with `inspection.json`. Deterministic repository sc
52
53
 
53
54
  When HomeGraph cannot meaningfully interpret the current ecosystem's source tree, treat that as optional degradation. Proceed by reconstructing the source architecture from `inspection.json`, the resolved scope, deliberate `Glob`, `Grep`, and `Read` inspection, and the source-ecosystem reference's evidence vocabulary. Record degraded local analysis only in artifacts and validation reports, never in the formal documents.
54
55
 
55
- ## MCP surface note
56
+ ## CLI subcommands
56
57
 
57
- HomeGraph gates its MCP tools by index size. On projects under 500 indexed files, only `homegraph_explore`, `homegraph_search`, and `homegraph_node` are exposed over MCP. The `homegraph` CLI always provides every subcommand, so run the rest through `Bash` whenever the MCP tool is not available. `homegraph_explore` and `homegraph_node` are always exposed and are sufficient as the evidence backbone.
58
+ All queries run through the `homegraph` CLI with `-p "<project_path>"` — the same invocation the other a2h skills use. The frequently used subcommands are:
59
+
60
+ - `homegraph explore -p "<path>" "<query>"` — reverse-lookup callers and pull matching source and call trails
61
+ - `homegraph callers -p "<path>" "<symbol>"` / `homegraph callees -p "<path>" "<Class.method>"` — dependency edges in each direction
62
+ - `homegraph impact -p "<path>" "<symbol>"` — blast radius
63
+ - `homegraph query -p "<path>" "<term>"` — locate symbols by name
64
+ - `homegraph files -p "<path>" --filter <dir>` — module structure (files under a directory)
65
+
66
+ Every subcommand above runs with no environment setup. For a precise file read, use `Read` on the repo-relative paths `explore` reports.
58
67
 
59
68
  ## Persistence layout
60
69
 
@@ -89,7 +98,7 @@ Persist usable results under:
89
98
  Validate the persisted result.
90
99
 
91
100
  ```bash
92
- node "${CLAUDE_SKILL_DIR}/scripts/validate_homegraph_artifacts.mjs" \
101
+ node "${SKILL_DIR}/scripts/validate_homegraph_artifacts.mjs" \
93
102
  --homegraph-dir "<target_project_dir>/.hometrans/arch_generate/source_homegraph" \
94
103
  --scope "<target_project_dir>/.hometrans/arch_generate/scope.json" \
95
104
  --required "false" \
@@ -104,7 +113,7 @@ When re-running against a source repository whose module documents may already e
104
113
  HG="<target_project_dir>/.hometrans/arch_generate/source_homegraph"
105
114
  SRC_REPO=$(node -p "JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).effective_android_repo" "<target_project_dir>/.hometrans/arch_generate/scope.json")
106
115
 
107
- node "${CLAUDE_SKILL_DIR}/scripts/check_module_staleness.mjs" \
116
+ node "${SKILL_DIR}/scripts/check_module_staleness.mjs" \
108
117
  "$HG/module_map.json" \
109
118
  --core-facts "$HG/core_facts.json" \
110
119
  --repo "$SRC_REPO" \
@@ -113,6 +122,8 @@ node "${CLAUDE_SKILL_DIR}/scripts/check_module_staleness.mjs" \
113
122
 
114
123
  The first run records a sha256 baseline, and subsequent runs report changed files and the affected modules (exit 1 when stale). Regenerate only the affected module documents, then re-run with `--update` to re-baseline.
115
124
 
125
+ After `cleanup_intermediates.mjs` the four inputs live in `<target_project_dir>/.hometrans/arch_baseline/` (flat: `module_map.json`, `core_facts.json`, `source_hashes.json`, `scope.json`); use `HG=<target_project_dir>/.hometrans/arch_baseline` and read `scope.json` from there.
126
+
116
127
  ## Failure behavior
117
128
 
118
129
  When HomeGraph is unavailable or fails, always record a degradation warning (`status: unavailable` plus a reason in `status.json`) and continue by reconstructing the source architecture from `inspection.json`, the resolved build/module or source structure, manifests, navigation declarations, and deliberate `Glob`, `Grep`, and `Read` inspection. Record degraded local analysis only in artifacts and validation reports, never in the formal documents.
@@ -48,7 +48,7 @@ inspect_project.mjs (Step 2, already ran)
48
48
  Run the baseline generator.
49
49
 
50
50
  ```bash
51
- node "${CLAUDE_SKILL_DIR}/scripts/generate_source_baseline.mjs" \
51
+ node "${SKILL_DIR}/scripts/generate_source_baseline.mjs" \
52
52
  --scope "<target_project_dir>/.hometrans/arch_generate/scope.json" \
53
53
  --inspection "<target_project_dir>/.hometrans/arch_generate/inspection.json"
54
54
  ```
@@ -66,7 +66,7 @@ Deterministic facts in these documents must not be hand-edited. When the workflo
66
66
  The Android inspector recovers preference keys but cannot resolve a store whose name is computed at runtime. Before baseline generation, run:
67
67
 
68
68
  ```bash
69
- node "${CLAUDE_SKILL_DIR}/scripts/resolve_android_stores.mjs" \
69
+ node "${SKILL_DIR}/scripts/resolve_android_stores.mjs" \
70
70
  --android-repo "<source_repo>" \
71
71
  --inspection "<target_project_dir>/.hometrans/arch_generate/inspection.json" \
72
72
  --report "<target_project_dir>/.hometrans/arch_generate/store_resolution_report.json"
@@ -76,9 +76,9 @@ The script follows class hierarchies (`SourceConfigStore(context, id)` → `over
76
76
 
77
77
  ## HomeGraph
78
78
 
79
- When HomeGraph is available (CLI or MCP tools), run the source-side pipeline defined by `references/homegraph-workflow.md`, which derives the repository and artifact paths from `scope.json` itself. Index the repository (with user consent), emit `core_facts.json` with `dump_core_facts.mjs` (reads the index read-only), extract candidate leaves, cluster them into `module_map.json`, and write the leaf-first module documents under `source_homegraph/docs/`. The `Semantic Enrichment` section of `source_semantics.md` is written from those module documents.
79
+ When the HomeGraph CLI is available, run the source-side pipeline defined by `references/homegraph-workflow.md`, which derives the repository and artifact paths from `scope.json` itself. Index the repository (with user consent), emit `core_facts.json` with `dump_core_facts.mjs` (reads the index read-only), extract candidate leaves, cluster them into `module_map.json`, and write the leaf-first module documents under `source_homegraph/docs/`. The `Semantic Enrichment` section of `source_semantics.md` is written from those module documents.
80
80
 
81
- Prefer targeted evidence queries. Use `homegraph_explore` for how-wired and usage-inventory questions, `homegraph_node` to read a symbol or file, and `homegraph_callers` / `homegraph_callees` / `homegraph_impact` to trace relationships and blast radius. When an MCP tool is not exposed, run the same subcommand through the `homegraph` CLI via Bash. Reconcile HomeGraph findings with `inspection.json`, where deterministic inspection facts remain authoritative until contradictions are resolved.
81
+ Prefer targeted evidence queries. Use `homegraph explore` for how-wired and usage-inventory questions, and `homegraph callers` / `homegraph callees` / `homegraph impact` to trace relationships and blast radius — all with `-p "<source repo>"`. For precise file reads, use `Read` on the repo-relative paths `explore` reports. Reconcile HomeGraph findings with `inspection.json`, where deterministic inspection facts remain authoritative until contradictions are resolved.
82
82
 
83
83
  When HomeGraph is unavailable, continue with `inspection.json` and deliberate read-only `Glob`, `Grep`, and `Read` inspection. Record the degradation in analysis artifacts, never in the formal documents.
84
84
 
@@ -411,9 +411,9 @@ function testIncremental(tmp) {
411
411
  root = path.join(tmp, "inc04");
412
412
  buildFakeProject(root, recon, { staleInspection: true });
413
413
  [code, data] = runIncremental(root);
414
- check("I04 stale inspection (on disk but not recorded) → warning annotation_not_in_inspection",
415
- code === 0 && data.passed === true
416
- && incWarningCodes(data).has("annotation_not_in_inspection"),
414
+ check("I04 stale inspection (on disk but not recorded) → error annotation_not_in_inspection",
415
+ code === 1 && data.passed === false
416
+ && incErrorCodes(data).has("annotation_not_in_inspection"),
417
417
  `exit=${code} errors=${deepRepr(incErrorCodes(data))} warnings=${deepRepr(incWarningCodes(data))}`);
418
418
 
419
419
  root = path.join(tmp, "inc05");
@@ -0,0 +1,304 @@
1
+ ---
2
+ name: a2h-arkts-logic-coder
3
+ description: "ArkTS logic coder. Generates ArkTS logic code from a spec document and a design document (spec + design → ArkTS code), then commits and emits commit-info.md."
4
+ ---
5
+
6
+ ## Role
7
+
8
+ Generate the ArkTS logic code per **`references/code-generation.md`**, which also runs its own
9
+ self-check plus MVVM/px-vp-unit hook checks. Then do the pipeline handoff: **commit the generated
10
+ code and write `commit-info.md`** so downstream stages (Stage 3 code review) can scope their
11
+ extraction to the commit.
12
+
13
+ ## Inputs
14
+
15
+ - `spec-file` (abs) — requirement spec document. Enumerates every scenario.
16
+ - `spec-design-file` (abs) — the design document for this chunk (UI/data/logic
17
+ evidence anchors). When `design-mode == true`, it is the file Step 0 generates.
18
+ - `design-mode` (optional `true`/`false`, default `false`) — when `true`, generate
19
+ `spec-design-file` for this chunk before coding. The dispatcher decides this
20
+ from disk state; the coder never decides it itself.
21
+ - `design-ui-sequence` (required when `design-mode == true`) — the chunk's UI
22
+ operation sequence, preserved verbatim in the design.
23
+ - `design-display-root` (required when `design-mode == true`) — the main project
24
+ directory name; the design's `<path_display_root>/` prefix uses it (the
25
+ worktree basename is `g<G>` and must not leak into the design).
26
+ - `design-engine-mode` (optional, default `auto`), `design-mvvm` (optional,
27
+ default `false`), `design-database-design` / `design-preferences-design`
28
+ (optional; default under the worktree's `.hometrans/`).
29
+ - `state-docs-mode` (optional `available` / `unavailable`, default `available`) — whether
30
+ `a2h-spec-design-pipeline` verified `devecocli docs` at Initialization. `unavailable` means the
31
+ wrapper may stall on a cold or busy docs index, so skip it, use `references/ISSUES.md`, and
32
+ record `state-docs: unavailable`; the chunk is never blocked on the docs.
33
+ - `api-docs-mode` (optional `available` / `unavailable`, default `available`) — whether the
34
+ **API-reference** catalogue answered during the same Initialization probe. This gate is soft:
35
+ `unavailable` skips the API lookups (use the local `.d.ts` and `references/ISSUES.md`) and
36
+ records `api-docs: unavailable`. It never gates the chunk and never changes the
37
+ `state-docs` verdict.
38
+ - `harmonyos-project-path` (abs) — target HarmonyOS project (the worktree under a pipeline dispatch): the
39
+ tree you edit, and the only truth for what exists on this branch.
40
+ - `android-project-path` (optional, abs) — Android source project root, consulted as a **reference**
41
+ when the spec's description of a detail is uncertain (the spec stays the implementation baseline).
42
+ It is the join base for the spec's `## Android Code Reference` anchors, which are project-root-relative
43
+ (`app/src/main/java/…/MainFragment.java:45`). Absent or not a directory → implement from the spec
44
+ alone: never hunt the disk for a look-alike source file and never claim "the source says" — see
45
+ Scenario Principles 3–4 in `references/code-generation.md`.
46
+ - `unitId` (optional) — the dispatch ledger unit (`chunk:g<G>c<k>`) this run implements; echo it in the final JSON and logs. It is **not** a credential: the coder never writes the ledger.
47
+ - `output-path` (abs) — the per-attempt output directory `.../spec_group_<G>/chunk_<k>/attempt_<n>`; where `commit-info.md`, `issues.md` (when blocked), `state_docs_used.md`, and `wiring.md` (wiring-mode) are written. The orchestrator owns every ledger write (claim/intent/confirm/beat/submit/release); the coder only writes its artifacts.
48
+ - `wiring-mode` (optional, `true`/`false`, default `false`) — batch-wave mode flag. When `true`,
49
+ **record only, never edit** shared registry files (Procedure step 3) and write
50
+ the registration intent to `{output-path}/wiring.md`. Set to `true` by a2h-spec-design-pipeline
51
+ wave dispatches.
52
+ - `wiring-list` (required when `wiring-mode == true`) — the wiring surface in compact form (Procedure step 3).
53
+ - `shared-layer-list`: cumulative shared-layer inventory from the orchestrator
54
+ (`none` if absent). Advisory only: prefer these APIs; append to the shared
55
+ module when insufficient; never skip a scenario because it is "shared".
56
+ - `hmos-project-path` (optional, abs) — the shared `<HMOS>` main checkout: the HomeGraph **index root** for
57
+ existing APIs, shared layers and call chains. Never the worktree. Absent on a standalone run → the
58
+ HomeGraph project is `harmonyos-project-path` itself.
59
+ - `hmos-index-ready` / `android-index-ready` (optional `true`/`false`) — the dispatcher's verdict for each
60
+ shared index. `true` → that index is queryable; `false`/absent → omit that index and use plain
61
+ `Read`/`Grep` for it.
62
+ - `homegraph-guide` (optional, abs, pipeline dispatch) — the `a2h-spec-design-pipeline` skill's
63
+ `references/homegraph-cli.md` (the dispatcher passes its absolute path): the shared CLI query discipline and
64
+ evidence format. Read it before the first HomeGraph query.
65
+ - `engine-mode` (optional, `auto`/`off`/`required`, default `auto`) and `engine-degraded-reason` (optional,
66
+ `null` when none) — the engine verdict for this chunk. `required` + an unusable `<HMOS>` index → stop
67
+ before generating. A non-null reason means the snapshot may lag HEAD: do not retry or rebuild it, fall
68
+ back to `Read`/`Grep` where it looks stale, and record `degraded: <reason>`.
69
+ - **HomeGraph rule** (pipeline dispatch: `hmos-project-path` + `homegraph-guide` present). The shared
70
+ indexes are **read-only** and **CLI-only**:
71
+ - `<hmos-project-path>` = architecture, existing APIs, shared layers, call chains;
72
+ `<android-project-path>` = the reference implementation.
73
+ - Locate code with `homegraph explore -p "<hmos-project-path>" "<TypeA TypeB Type.member>"` and
74
+ `homegraph explore -p "<android-project-path>" "<Symbol>"`; add `impact` / `callers` only when the
75
+ change's blast radius matters (2–5 names per `explore`; `-j` only on
76
+ `status`/`query`/`callers`/`callees`/`impact`/`affected`/`files` — `explore` and `node` take no `-j`).
77
+ - **Start with `<hmos-project-path>`, before reading source.** One `explore` with this chunk's
78
+ modules / pages / VMs / shared-layer symbols establishes what the main checkout already implements.
79
+ Query `<android-project-path>` during design only when the SPEC's `## Android Code Reference` anchor is
80
+ missing, ambiguous, or the scenario needs a cross-file call chain; when the anchor gives `file:line`,
81
+ `read` that file. Do **not** query once per scenario. Add `impact`/`callers` when the change touches a
82
+ shared layer or public API.
83
+ - **Never truncate `explore` output** (`| Select-Object -First N`). The first screenfuls are often
84
+ `Partial locator` / import-resolution notes; truncating them makes a present file look unindexed. Use
85
+ `query -l` or `node -f ... --symbols-only` for targeted facts and `files --pattern` to check presence.
86
+ - Never run `homegraph init` / `sync` / `index` / `unlock`: the orchestrator owns both indexes and is
87
+ their only writer. There is **no worktree index** — never create or query one.
88
+ - **`index_ahead`**: a symbol an index lists but this worktree lacks is another group's merged code or a
89
+ later commit — **never import, copy or re-implement it**; cite the worktree. The reverse (`trust the
90
+ worktree`): a symbol present here but absent from the index is real — re-query once, then read the file
91
+ and cite `file:line`.
92
+ - Record the queries **by phase** - the first line is `start | hmos`, then `design | android` for SPEC
93
+ anchor gaps and `code | hmos` for impact - and their `file:line` anchors, or `degraded: <reason>` /
94
+ `fallback: <reason>` / `not-applicable: <files>` when no query was possible, inside `commit-info.md`'s
95
+ `## HomeGraph evidence` section (see step 6). A section with anchors but **without** a `start | hmos`
96
+ line is `homegraph-start-missing` (warning under `auto`, failure under `required`); an anchor written
97
+ outside that section does not count.
98
+ - **Standalone exception**: only a **standalone coder run** — one whose prompt carries neither
99
+ `hmos-project-path` nor `homegraph-guide`, so `references/spec-design.md` is not dispatched with
100
+ `homegraph_project`/`homegraph_guide` at all — is outside the read-only rule. There,
101
+ `harmonyos-project-path` may itself be the main checkout, and its index is then simply your local one
102
+ (the engine step of `references/spec-design.md` may probe, `init`/`sync` it). A pipeline dispatch always
103
+ sends both fields; the design step's fallback of `homegraph_project` to `harmonyos-project-path` is only
104
+ a path default, never an opt-out. Absent → plain `Grep`/`Read`.
105
+
106
+ ## Procedure
107
+
108
+ 0. **Design this chunk (only when `design-mode == true`).** Apply
109
+ `references/spec-design.md` verbatim with:
110
+ - `target_directory` = `harmonyos-project-path`
111
+ - `input_file` = `spec-file` (the chunk spec slice)
112
+ - `ui_operation_sequence` = `design-ui-sequence`
113
+ - `engine_mode` = `design-engine-mode`
114
+ - `mvvm` = `design-mvvm`
115
+ - `output_file` = `spec-design-file`
116
+ - `display_root` = `design-display-root`
117
+ - `database_design` / `preferences_design` = `design-database-design` /
118
+ `design-preferences-design` (pass `--database-design` / `--preferences-design`
119
+ only when provided)
120
+ - `homegraph_project` = `hmos-project-path` when present, otherwise `harmonyos-project-path` (standalone coder run)
121
+ - `android_project` = `android-project-path`
122
+ - `homegraph_guide` = `homegraph-guide`
123
+
124
+ `homegraph_project` / `android_project` / `homegraph_guide` are **prompt inputs** to
125
+ `references/spec-design.md`, not CLI options: never append them to the
126
+ `inspect_spec_design_inputs.mjs` invocation (it accepts only its documented flags and exits with
127
+ `unrecognized arguments` on anything else).
128
+ If the Step 1 inspect command exits non-zero, write `{output-path}/issues.md`
129
+ with type `design_gap_blocked` when `project_design.md` is missing, otherwise
130
+ `validation_failure`; never commit, and stop. If validation writes an issue
131
+ file, write `{output-path}/issues.md` with type `validation_failure`, do not
132
+ commit, and stop. When `design-mode` is `false`, read `spec-design-file`
133
+ (missing → `issues.md` with type `design_gap_blocked`, do not commit, stop).
134
+ 1. **Generate the code.** Follow `references/code-generation.md` with:
135
+ - spec document = `spec-file`
136
+ - design document = `spec-design-file`
137
+ - Android source root = `android-project-path` (may be absent)
138
+ - `<HMOS>` in the hook-check commands = `harmonyos-project-path` (the worktree); the HomeGraph queries
139
+ in Design Principle 2 use `hmos-project-path` / `android-project-path` as described above.
140
+
141
+ **State-management doc gate (mandatory when the chunk touches UI state).** Before choosing any
142
+ state variable or decorator, run the gate in `references/code-generation.md` Step 2 — it owns the
143
+ trigger, the `<skill-dir>/scripts/state_doc.mjs` read command, the decorator rules, and the
144
+ `{output-path}/state_docs_used.md` record. With `state-docs-mode: unavailable`, skip the wrapper,
145
+ use `references/ISSUES.md`, and record `state-docs: unavailable`. A wrapper failure at chunk time
146
+ (unresolved key, lock budget, moved document) takes the same fallback with the key and error
147
+ recorded. Never guess silently and never block the chunk on the docs.
148
+
149
+ **Platform API doc gate (soft).** When the chunk calls a platform API whose call shape the
150
+ worktree does not already show, run the gate in `references/code-generation.md` Step 2 — it owns
151
+ the trigger, the `state_doc.mjs search` / `read-id --section` commands, the
152
+ worktree > `.d.ts` > docs precedence, the per-chunk budget and the API-level check. Record the
153
+ rows plus `api-docs: available` / `unavailable` / `not-applicable` in the same
154
+ `state_docs_used.md`. With `api-docs-mode: unavailable`, skip the wrapper and record
155
+ `api-docs: unavailable`; this gate never blocks the chunk and never changes the `state-docs`
156
+ verdict.
157
+
158
+ Do the code generation, its scenario self-check (up to 3 iterations), and its
159
+ MVVM + px/vp unit hook checks. Do not re-plan or override that workflow.
160
+
161
+ **Network verification (soft).** For a scenario that performs a network exchange or decodes its
162
+ response — HTTP(S) request, WebSocket frame, socket/private-protocol message, or gRPC call —
163
+ Implementation Principle 9 in `references/code-generation.md` recommends a real check of both the
164
+ sent and the decoded payload when reachable. Confirm each request's body/query/headers, defaults and
165
+ encoding and its response field mapping from the spec, or from the anchored Android source where
166
+ the spec leaves them open — never guess a body key or a default. Only idempotent read-only exchanges
167
+ (HTTP GET/HEAD, or a query/command the source declares read-only) may be replayed; a side-effecting
168
+ request is never sent and is recorded as `network-evidence: unavailable (side-effecting)`. A spec
169
+ may contain several requests (even chained): each request has its own 3-attempt budget, and one
170
+ request's failure never skips the next. A request that consumes an earlier response (including a
171
+ token) is recorded as `network-evidence: unavailable (upstream … unavailable)` instead of being
172
+ retried when that upstream has no evidence. It is best-effort: skip after 3 failed attempts **for
173
+ that request**, note `network-evidence: unavailable (<reason>)` per request in the self-check, and
174
+ never block the chunk.
175
+
176
+ **Absolute-path discipline**: use only the `spec-file` and `spec-design-file` absolute paths
177
+ passed in. When the working directory is a git worktree (batch-wave mode), the project may
178
+ contain same-named design-file copies from earlier runs — **never** search for, or act on, any
179
+ design document you discover on your own.
180
+ 2. **Verify the generation closed honestly.** If it was blocked (
181
+ design gap, MVVM boundary violation it could not fix, or unresolved validation failures), do
182
+ **not** commit. Write `{output-path}/issues.md` describing the gap (type one of:
183
+ `design_gap_blocked` / `missing_proof` / `validation_failure`), and if a safe
184
+ partial result exists, name the unimplemented scenarios precisely. Then stop.
185
+ 3. **Honor wiring-mode for shared registry files** (only when `wiring-mode == true`). The wiring
186
+ surface is **never edited directly**: with multiple groups coding in parallel inside a wave,
187
+ direct edits to these files overwrite each other (every group appends to the tail of the same
188
+ lists/registries — guaranteed same-hunk conflicts). The wiring surface arrives from the
189
+ dispatcher in **compact form** (derived from `state.config.wiring_files`: the framework
190
+ category rules below + the discrete project-specific entries of the list that match no
191
+ category + the lock-file rule; the raw full path list is never sent):
192
+
193
+ - **All** `Index.ets` (entry route registration + per-HAR-module export registration)
194
+ - `resources/base/profile/main_pages.json`, `route_map.json`
195
+ - Any `module.json5`, any `oh-package.json5`
196
+ - Resource dictionaries `resources/**/element/*.json` (string/color/float etc., **including
197
+ all locale variants** — one logically new string records one row for base plus one per
198
+ language variant)
199
+ - Project-specific surfaces (given in the dispatch list): ability source files (the
200
+ `module.json5` srcEntry target), the database registration file (wherever `getRdbStore`
201
+ lives, e.g. `AppDatabase.ets`), route tables (`*Routes.ets`)
202
+ - **Lock files** (`oh-package-lock.json5`): never edit and **never write wiring rows** —
203
+ regenerated by the end-of-wave build
204
+
205
+ When a scenario requires registering a route/page/permission/dependency/entity/export/
206
+ lifecycle wiring/string resource, append one row to `{output-path}/wiring.md` instead:
207
+
208
+ ```markdown
209
+ | target-file | change-type | content | reason (spec so-id) |
210
+ |---|---|---|---|
211
+ | entry/src/main/ets/pages/Index.ets | append-route | add 'cart' → pages/CartPage | so-26 |
212
+ | common/database/src/main/ets/AppDatabase.ets | register-entity | entities: [CartEntity] | so-28 |
213
+ | products/app/src/main/resources/base/element/string.json | add-string | cart_title: Cart | so-26 |
214
+ ```
215
+
216
+ `change-type` is one of `append-route` / `register-page` / `add-permission` / `add-dependency`
217
+ / `register-entity` / `export-symbol` / `wire-ability` / `add-string`; `content` states the
218
+ concrete entry to append or modify. The orchestrator applies all wiring serially at the end of
219
+ the wave. The scenario itself is not shortchanged by the deferred wiring — the code side is
220
+ implemented as usual; only the registration action is externalized into the record.
221
+ 4. **Commit the generated code.** On a clean, honest completion:
222
+ - Before the first `git add`, capture the task baseline: `TASK_BASE = git rev-parse HEAD`.
223
+ - Stage **only** the files changed by this task, one at a time (`git add <file>`). **Never** use
224
+ `git add -A` or `git add .`.
225
+ - Commit non-interactively with a message that names the scenarios implemented. Multiple commits
226
+ are fine — step 5 classifies the cumulative `TASK_BASE..HEAD` delta.
227
+ 5. **Classify your delta mechanically, not from memory.** In one shell command over
228
+ `git diff TASK_BASE HEAD --unified=0` — no pathspec filtering: this range contains only your
229
+ own commits, and any non-`.ets`/`.ts` file classifies as `code` by the rules below —
230
+ count the `+`/`-` lines that are NOT `+++ b/…` / `--- a/…` / `/dev/null` headers and whose body —
231
+ after stripping the marker and trimming — is non-empty and does not start with `//`, `/*`, `*`,
232
+ or `*/`; also list the changed files. Print only the verdict and the file list, never the patch.
233
+ - No commit was created → `change-type: none`.
234
+ - Count is 0 AND every changed file ends with `.ets` or `.ts` → `change-type: comment-only`.
235
+ - Otherwise → `change-type: code`.
236
+ Do not classify from intent — a formatting tweak or import move you forgot about must surface
237
+ here, not downstream.
238
+ 6. **Write `{output-path}/commit-info.md`** containing both machine-parseable fields:
239
+ - `commit-id: <full hex hash>` (or `commit-id: none` for an honest verification-only pass).
240
+ - `change-type: code` | `change-type: comment-only` | `change-type: none` — the verified
241
+ classification from step 5.
242
+ - plus a `## Spec deviations` section whenever the implementation deliberately departs from the
243
+ spec (a Scenario Principle 4 detail the spec left open and the source settled, or an unavailable
244
+ Android source that left a behavior unclear). It is the canonical record of the departure — a
245
+ local code comment may point to it, nothing else replaces it — and the review and fix stages read
246
+ it so a deliberate detail fill is not fixed back to the spec's wording:
247
+
248
+ ```markdown
249
+ ## Spec deviations
250
+
251
+ - android-source: available | unavailable (one-line reason)
252
+
253
+ | scenario | spec says | implemented | basis |
254
+ |---|---|---|---|
255
+ | so-26 | default page is 0 | default page is 1 | app/src/main/java/…/Pager.java:45 |
256
+ | so-27 | label from strings.xml | label computed in page | design §Technical Reference: LabelUtil |
257
+ ```
258
+ Omit the section when there is no deviation.
259
+ - plus a `## HomeGraph evidence` section — the canonical record of the queries this chunk ran. The
260
+ orchestrator's `parseHomeGraphEvidence` scans **only inside this section**, so the anchor,
261
+ `degraded:`, `fallback:` or `not-applicable:` must be written here (an anchor anywhere else does not
262
+ count). Omit it only under the standalone exception, where no shared index exists:
263
+
264
+ ```markdown
265
+ ## HomeGraph evidence
266
+
267
+ - `explore -p "<hmos-project-path>" "LoginPage LoginViewModel AuthRepository"` → `LoginViewModel.ets:88`
268
+ - `explore -p "<android-project-path>" "LoginActivity LoginViewModel AuthRepository"` → `LoginActivity.kt:104`
269
+ - anchors: `LoginViewModel.ets:88`, `AuthRepository.ets:41`
270
+ - index_ahead: none
271
+ - degraded: none
272
+ ```
273
+
274
+ At least one `file:line` anchor, `degraded: <reason>`, `fallback: <reason>` or
275
+ `not-applicable: <files>` must appear inside the section; otherwise the chunk's evidence is
276
+ `homegraph-evidence-missing` (a warning under `engine-mode: auto`, a failure under `required`).
277
+ `commit-id` and `change-type` are the fields the **build/review** stages consume for scoping
278
+ (`state_docs_used.md` is the audit artifact of the doc gates; `## Spec deviations` is what keeps a
279
+ deliberate departure from being reviewed as a defect). The pipeline trusts `change-type` directly:
280
+ a `none`/`comment-only` value skips the Stage-2 build when a reusable HAP exists, with no
281
+ independent re-verification — the step-5 counter is the only safeguard, so run it; never write the
282
+ field from memory or intent.
283
+
284
+ ## Output
285
+
286
+ - `{output-path}/commit-info.md` — required on success; contains `commit-id` (full hex hash, or
287
+ `none`), `change-type` (`code` / `comment-only` / `none`), a `## HomeGraph evidence` section (the
288
+ queries plus at least one `file:line` anchor, or `degraded:` / `fallback:` / `not-applicable:`, all
289
+ inside that section), and a `## Spec deviations` section only when a deliberate deviation from the spec
290
+ must be recorded.
291
+ - `{output-path}/issues.md` — written only when blocked; diagnostic. Type limited to
292
+ `design_gap_blocked` / `missing_proof` / `validation_failure`.
293
+ - `{output-path}/state_docs_used.md` — written by the doc gates: one row per state
294
+ value (`value | scope | decorator | doc key`) plus `state-docs: available` / `unavailable` /
295
+ `not-applicable` (the last when the chunk touches no UI state), and a `## Platform API lookups`
296
+ section (one row per lookup, or "none") plus `api-docs: available` / `unavailable` /
297
+ `not-applicable`. The two verdict lines are independent: a missing or `unavailable` API line never
298
+ changes the `state-docs` verdict the pipeline reads.
299
+
300
+ Do not fabricate a commit or a `commit-id`. If the work cannot be honestly closed, `issues.md` is the
301
+ correct output and `commit-info.md` must be absent (or carry `commit-id: none` for a safe partial).
302
+ The pipeline treats a missing or malformed `change-type` as `code` (conservative). A `none`/
303
+ `comment-only` value skips the Stage-2 build (when a reusable HAP exists) — the field steers both
304
+ the optimization and the skip decision, which is why step 5 requires the mechanical counter.
@@ -2,8 +2,9 @@ Common implementation pitfalls:
2
2
  * Member names of an ArkTS custom component must not clash with the built-in universal attribute methods of the CustomComponent base class.
3
3
  * `@Builder` parameters are passed by value by default: after the call site passes `this.xxx`, later changes to `xxx` (e.g. async loading finishing, a preference value being back-filled) do not refresh the UI inside the Builder. When it must refresh with the state, read `this.xxx` directly inside the Builder, or switch to pass-by-reference: the Builder declares a single parameter of a class/interface type, and the call site passes an object literal (e.g. `this.row({ isOn: this.incognito })`).
4
4
  * The key generator of `ForEach` must include every field that affects how the item renders: if only `id` is used as the key, modifying the item's other fields in place (status, text) makes ArkUI reuse the old node and the UI does not update. The key should concatenate the fields that affect display (e.g. `${item.id}:${item.status}`), or replace the whole item object on modification and trigger an array update.
5
- * When passing a parent component's `@Builder` method to a child component's `@BuilderParam`, do not write it as a method reference (e.g. `content: this.listContent`): the Builder actually runs inside the child component, `this` points to the child, and reading the parent's state variables or ViewModel yields `undefined`, crashing at render time. This often shows up in loading/empty-state containers and only triggers when data comes back and the content state renders for the first time, so it is invisible on cold start. Wrap it in an arrow function when passing it to keep the parent's `this`: `content: (): void => { this.listContent() }`.
5
+ * When passing a parent component's `@Builder` method to a child component's `@BuilderParam`, do not write it as a method reference (e.g. `content: this.listContent`): the Builder actually runs inside the child component, `this` points to the child, and reading the parent's state variables or ViewModel yields `undefined`, crashing at render time. This often shows up in loading/empty-state containers and only triggers when data comes back and the content state renders for the first time, so it is invisible on cold start. Wrap it in an arrow function when passing it to keep the parent's `this`: `content: (): void => { this.listContent() }`. The arrow body may **only call a @Builder**, never write a component directly: `content: () => { RefreshLayout({…}) }` compiles, but only @Builder bodies are compiled into UI code, so `RefreshLayout({…})` in an arrow body is a plain call of the component class and the slot crashes on render with `class constructor cannot called without 'new'`. Put the component in `@Builder listContent()` (or `@LocalBuilder`) and let the arrow only call it.
6
6
  * In `@ComponentV2`, modifying a field without `@Trace` does not refresh the UI and does not raise an error. A value computed from `@Param` in `aboutToAppear` is computed only once and will not update when the parent later passes a new value: compute such values in `build`, or use `@Computed`; if it must be stored as local state, watch the corresponding `@Param` with `@Monitor` and assign it there.
7
7
  * Text measurement results are px, not vp: `MeasureText.measureText` / `measureTextSize` (`@ohos.measure`) and the methods of the same name on `getUIContext().getMeasureUtils()` take `fontSize` in fp, but the returned width and height are both **px** (`.d.ts` `@returns`: "both in px"). Before comparing the result with a vp budget or passing it to `.width()`, convert it with `this.getUIContext().px2vp(...)`. Observed (where-to-study bottom navigation): comparing `measureTextSize().width` (px) directly with a vp cell width always concluded "does not fit" at 3.5x density, so the tab labels never showed on any device, and reviewers trusted a code comment claiming "vp output". Canvas `context.measureText()` returns vp by default; it is different, so do not carry experience over between them. For other APIs the `.d.ts` is authoritative; see the unit table in code-generation.md Implementation Principle 6. `scripts/check_units.ts` blocks this pattern.
8
8
  * Do not use `ForEach` for large lists (lists/grids of songs, messages, feeds, etc. that may have hundreds of entries): it creates all child nodes on first load, so with many entries the first frame stutters noticeably or even times out with a blank screen. Prefer `LazyForEach` + `IDataSource` to create on-screen nodes on demand; note that data-source changes must be notified through interfaces such as `notifyDataReload` / `notifyDataAdd` / `notifyDataChange` — replacing the whole array without notifying does not refresh the UI (a pitfall already seen when combined with `@Observed`/`@ObjectLink`). A small fixed set of options (menus, tabs) can still use `ForEach`.
9
9
  * Every value that crosses an "untyped boundary" into strongly typed code must be normalized as nullable; never assume it has a value: deserialization results, database rows, local caches and cross-page parameters all count. An ArkTS type is a compile-time annotation only — nothing is validated at runtime, `as T` fills in no default, and `null` enters the entity as-is; a mapping that tests only `=== undefined` misses it. On the read side that throws `TypeError` (a crash) at `.length`, iteration or a method call, and in numeric comparisons `null` is silently taken as 0; on the write side it is rejected by the non-null constraint and never reaches the database, or it is written to JSON and read back with missing values (a `null` inside an object stays `null`, while the key of an `undefined` property disappears entirely). Rule: always normalize inside the function that maps external data to the entity — add one first if it does not exist; declare the field `?: T | null` and use `??` to supply the type's default when it is missing (string `''`, number `0`, array `[]`, object `{}`); catch the whole object first, then normalize item by item, field by field; when reading a database, read per the column's nullable declaration instead of substituting an empty string or 0 for missing; use only `??` for fallbacks, never `||` or `if (!v)`, which treat a legitimate `0` or `''` as empty. Writing `=== null` on a non-null field is not a fallback: it misses `undefined` and is also reported as a comparison with no type overlap; the fix is to first change the declaration to `?: T | null`.
10
+ * Never write a platform API from memory, and never pick a page from a single search-result list: parameter order, sync/async, the lifecycle (`create` → use → `destroy`/`off`) and the returned unit come from the local `.d.ts`; the call order and usage come from one section of the page via `scripts/state_doc.mjs search "<module or method>"` + `read-id "<documentId>" --section "<heading>" --max-lines 80` (an API page runs to a few thousand lines; reading all of it crowds out the code context; an overload list repeats the same heading, so `--section` returns every occurrence marked `<!-- section "request" 2/3 -->` — add `--occurrence <n>` to pick one). When this worktree already has a working call site for the same API, copy it and skip the lookup; when the doc and the `.d.ts` disagree, the `.d.ts` wins; when the `phone 12+`-style tag beside the heading is above the project's `compatibleSdkVersion`, use the older overload or `canIUse` instead. When nothing resolves, record `api-docs: unavailable`, fall back to the `.d.ts` and this file, and never guess silently.