@buaa_smat/hometrans 26.0.3 → 26.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (750) hide show
  1. package/README.md +1 -1
  2. package/agents/code-reviewer.md +91 -21
  3. package/env-requirements.json +1 -1
  4. package/i18n/agents/code-reviewer.md +93 -21
  5. package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
  6. package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
  7. package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
  8. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
  9. package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
  10. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
  11. package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
  12. package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
  13. package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
  14. package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
  15. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
  16. package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
  17. package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
  18. package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
  19. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
  20. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
  21. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
  22. package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
  23. package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
  24. package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
  25. package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
  26. package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
  27. package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
  28. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
  29. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
  30. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
  31. package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
  32. package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
  33. package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
  34. package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
  35. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
  36. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
  37. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
  38. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
  39. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
  40. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
  41. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
  42. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
  43. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
  44. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
  45. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
  46. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
  47. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
  48. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
  49. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
  50. package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
  51. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
  52. package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
  53. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
  54. package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
  55. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
  56. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
  57. package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
  58. package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
  59. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
  60. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
  61. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
  62. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
  63. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
  64. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
  65. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
  66. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
  67. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
  68. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
  69. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
  70. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
  71. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
  72. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
  73. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
  74. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
  75. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
  76. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
  77. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
  78. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
  79. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
  80. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
  81. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
  82. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
  83. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
  84. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
  85. package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
  86. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
  87. package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
  88. package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
  89. package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
  90. package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
  91. package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
  92. package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
  93. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
  94. package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
  95. package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
  96. package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
  97. package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
  98. package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
  99. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
  100. package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
  101. package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
  102. package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
  103. package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
  104. package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
  105. package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
  106. package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
  107. package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
  108. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
  109. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
  110. package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
  111. package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
  112. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
  113. package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
  114. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
  115. package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
  116. package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
  117. package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
  118. package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
  119. package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
  120. package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
  121. package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
  122. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
  123. package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
  124. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
  125. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
  126. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
  127. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
  128. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
  129. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
  130. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
  131. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
  132. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
  133. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
  134. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
  135. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
  136. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
  137. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
  138. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
  139. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
  140. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
  141. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
  142. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
  143. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
  144. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
  145. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
  146. package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
  147. package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
  148. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
  149. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
  150. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
  151. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
  152. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
  153. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
  154. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
  155. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
  156. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
  157. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
  158. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
  159. package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
  160. package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
  161. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
  162. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
  163. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
  164. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
  165. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
  166. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
  167. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
  168. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
  169. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
  170. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
  171. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
  172. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
  173. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
  174. package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
  175. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
  176. package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
  177. package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
  178. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
  179. package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
  180. package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
  181. package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
  182. package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
  183. package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
  184. package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
  185. package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
  186. package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
  187. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
  188. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
  189. package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
  190. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
  191. package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
  192. package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
  193. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
  194. package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
  195. package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
  196. package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
  197. package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
  198. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
  199. package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
  200. package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
  201. package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
  202. package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
  203. package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
  204. package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
  205. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
  206. package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
  207. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
  208. package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
  209. package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
  210. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
  211. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
  212. package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
  213. package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
  214. package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
  215. package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
  216. package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
  217. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
  218. package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
  219. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
  220. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
  221. package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
  222. package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
  223. package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
  224. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
  225. package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
  226. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
  227. package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
  228. package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
  229. package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
  230. package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
  231. package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
  232. package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
  233. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
  234. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
  235. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
  236. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
  237. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
  238. package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
  239. package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
  240. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
  241. package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
  242. package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
  243. package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
  244. package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
  245. package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
  246. package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
  247. package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
  248. package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
  249. package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
  250. package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
  251. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
  252. package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
  253. package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
  254. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
  255. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
  256. package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
  257. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
  258. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
  259. package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
  260. package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
  261. package/package.json +3 -6
  262. package/skills/a2h-app-migrate/SKILL.md +19 -11
  263. package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
  264. package/skills/a2h-app-migrate/references/stage-map.md +2 -2
  265. package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
  266. package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
  267. package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
  268. package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
  269. package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
  270. package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
  271. package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
  272. package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
  273. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
  274. package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
  275. package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
  276. package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
  277. package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
  278. package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
  279. package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
  280. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
  281. package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
  282. package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
  283. package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
  284. package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
  285. package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
  286. package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
  287. package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
  288. package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
  289. package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
  290. package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
  291. package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
  292. package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
  293. package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
  294. package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
  295. package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
  296. package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
  297. package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
  298. package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
  299. package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
  300. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
  301. package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
  302. package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
  303. package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
  304. package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
  305. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
  306. package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
  307. package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
  308. package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
  309. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  310. package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
  311. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
  312. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
  313. package/skills/a2h-arch-generate/SKILL.md +20 -17
  314. package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
  315. package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
  316. package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
  317. package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
  318. package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
  319. package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
  320. package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
  321. package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
  322. package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
  323. package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
  324. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
  325. package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
  326. package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
  327. package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
  328. package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
  329. package/skills/a2h-batch-ui-align/SKILL.md +72 -22
  330. package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
  331. package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
  332. package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
  333. package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
  334. package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
  335. package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
  336. package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
  337. package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
  338. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
  339. package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
  340. package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
  341. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
  342. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
  343. package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
  344. package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
  345. package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
  346. package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
  347. package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
  348. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
  349. package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
  350. package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
  351. package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
  352. package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
  353. package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
  354. package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
  355. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
  356. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
  357. package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
  358. package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
  359. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
  360. package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
  361. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
  362. package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
  363. package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
  364. package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
  365. package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
  366. package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
  367. package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
  368. package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
  369. package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
  370. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
  371. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
  372. package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
  373. package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
  374. package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
  375. package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
  376. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
  377. package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
  378. package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
  379. package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
  380. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
  381. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
  382. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
  383. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
  384. package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
  385. package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
  386. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
  387. package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
  388. package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
  389. package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
  390. package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
  391. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
  392. package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
  393. package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
  394. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
  395. package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
  396. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
  397. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
  398. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
  399. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
  400. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
  401. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
  402. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
  403. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
  404. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
  405. package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
  406. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
  407. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
  408. package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
  409. package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
  410. package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
  411. package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
  412. package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
  413. package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
  414. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
  415. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
  416. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
  417. package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
  418. package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
  419. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
  420. package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
  421. package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
  422. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
  423. package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
  424. package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
  425. package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
  426. package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
  427. package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
  428. package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
  429. package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
  430. package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
  431. package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
  432. package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
  433. package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
  434. package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
  435. package/skills/a2h-page-specgen/SKILL.md +124 -20
  436. package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
  437. package/skills/a2h-page-specgen/references/body-language.md +11 -9
  438. package/skills/a2h-page-specgen/references/evidence.md +35 -0
  439. package/skills/a2h-page-specgen/references/execution-model.md +135 -26
  440. package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
  441. package/skills/a2h-page-specgen/references/gates.md +120 -52
  442. package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
  443. package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
  444. package/skills/a2h-page-specgen/references/spec-example.md +312 -0
  445. package/skills/a2h-page-specgen/references/spec-template.md +112 -109
  446. package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
  447. package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
  448. package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
  449. package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
  450. package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
  451. package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
  452. package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
  453. package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
  454. package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
  455. package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
  456. package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
  457. package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
  458. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
  459. package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
  460. package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
  461. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
  462. package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
  463. package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
  464. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
  465. package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
  466. package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
  467. package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
  468. package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
  469. package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
  470. package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
  471. package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
  472. package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
  473. package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
  474. package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
  475. package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
  476. package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
  477. package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
  478. package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
  479. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
  480. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
  481. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
  482. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
  483. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
  484. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
  485. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
  486. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
  487. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
  488. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
  489. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
  490. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
  491. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
  492. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
  493. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
  494. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
  495. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
  496. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
  497. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
  498. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
  499. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
  500. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
  501. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
  502. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
  503. package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
  504. package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
  505. package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
  506. package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
  507. package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
  508. package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
  509. package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
  510. package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
  511. package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
  512. package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
  513. package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
  514. package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
  515. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
  516. package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
  517. package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
  518. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
  519. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
  520. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
  521. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
  522. package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
  523. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
  524. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
  525. package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
  526. package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
  527. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
  528. package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
  529. package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
  530. package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
  531. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
  532. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
  533. package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
  534. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
  535. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
  536. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
  537. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
  538. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
  539. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
  540. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
  541. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
  542. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
  543. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
  544. package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
  545. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
  546. package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
  547. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
  548. package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
  549. package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
  550. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
  551. package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
  552. package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
  553. package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
  554. package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
  555. package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
  556. package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
  557. package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
  558. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
  559. package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
  560. package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
  561. package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
  562. package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
  563. package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
  564. package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
  565. package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
  566. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
  567. package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
  568. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
  569. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
  570. package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
  571. package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
  572. package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
  573. package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
  574. package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
  575. package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
  576. package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
  577. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
  578. package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
  579. package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
  580. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
  581. package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
  582. package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
  583. package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
  584. package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
  585. package/skills/a2h-resource-convert/SKILL.md +9 -1
  586. package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
  587. package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
  588. package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
  589. package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
  590. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
  591. package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
  592. package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
  593. package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
  594. package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
  595. package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
  596. package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
  597. package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
  598. package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
  599. package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
  600. package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
  601. package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
  602. package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
  603. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
  604. package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
  605. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
  606. package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
  607. package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
  608. package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
  609. package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
  610. package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
  611. package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
  612. package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
  613. package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
  614. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
  615. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
  616. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
  617. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
  618. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
  619. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
  620. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
  621. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
  622. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
  623. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
  624. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
  625. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
  626. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
  627. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
  628. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
  629. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
  630. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
  631. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
  632. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
  633. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
  634. package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
  635. package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
  636. package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
  637. package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
  638. package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
  639. package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
  640. package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
  641. package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
  642. package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
  643. package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
  644. package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
  645. package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
  646. package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
  647. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
  648. package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
  649. package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
  650. package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
  651. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
  652. package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
  653. package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
  654. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
  655. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
  656. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
  657. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
  658. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
  659. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
  660. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
  661. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
  662. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
  663. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
  664. package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
  665. package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
  666. package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
  667. package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
  668. package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
  669. package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
  670. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
  671. package/skills/a2h-spec-generate/SKILL.md +2 -2
  672. package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
  673. package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
  674. package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
  675. package/skills/a2h-utg-explorer/SKILL.md +9 -3
  676. package/skills/a2h-utg-explorer/references/architecture.md +3 -0
  677. package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
  678. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
  679. package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
  680. package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
  681. package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
  682. package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
  683. package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
  684. package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
  685. package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
  686. package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
  687. package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
  688. package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
  689. package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
  690. package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
  691. package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
  692. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
  693. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
  694. package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
  695. package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
  696. package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
  697. package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
  698. package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
  699. package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
  700. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
  701. package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
  702. package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
  703. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
  704. package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
  705. package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
  706. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
  707. package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
  708. package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
  709. package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
  710. package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
  711. package/skills/a2h-utg-static/SKILL.md +6 -2
  712. package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
  713. package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
  714. package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
  715. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
  716. package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
  717. package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
  718. package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
  719. package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
  720. package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
  721. package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
  722. package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
  723. package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
  724. package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
  725. package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
  726. package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
  727. package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
  728. package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
  729. package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
  730. package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
  731. package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
  732. package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
  733. package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
  734. package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
  735. package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
  736. package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
  737. package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
  738. package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
  739. package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
  740. package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
  741. package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
  742. package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
  743. package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
  744. package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
  745. package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
  746. package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
  747. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
  748. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
  749. package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
  750. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
@@ -34,6 +34,7 @@ policy:
34
34
  After the host compacts or summarizes the session, continue from the current step according to the ledger and node artifacts; do not treat compaction as completion.
35
35
  The invoke of every skill node must start with: context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish.
36
36
  If a leaf still returns citing the context budget, handle it per that node's fail_matrix; it must not be escalated into a voluntary wrap-up of the whole pipeline.
37
+ ledger.mjs refuses a failed record whose reason is the context / tokens / session length (exit 2): on that refusal keep running the node; do not reword the reason.
37
38
  # Meaning of each fail_matrix value (the executor interprets them only as written here; do not improvise).
38
39
  # What to do when a leaf skill "wants to ask the user" mid-run (referenced by the [unattended contract] in each node's invoke).
39
40
  leaf_questions: |
@@ -68,13 +69,14 @@ policy:
68
69
  ledger: ${LEDGER} is append-only and kept across runs (profile=resume relies on it to know the original run's profile and each node's terminal state). boot.workspace records run_start;
69
70
  **every node** records one line when it reaches a terminal state: node ${SKILLS_ROOT}/a2h-app-migrate/scripts/ledger.mjs --ledger ${LEDGER} --node <id>
70
71
  --status done|reused|skipped|failed [--reason <reason>] (skipped because artifacts are reused -> reused; skipped via skip_if / force_skip -> skipped).
71
- bootstrap itself records done after boot.workspace writes run_start (the ledger cannot be written to disk before that).
72
- ui.batch / enrich.spec_gen / logic.spec_pipeline: **immediately after** recording the ledger (within the same terminal-state step,
73
- with the terminal state already fixed) run write_resume_summary.mjs, passing the status just written to the ledger verbatim as --status,
74
- together with --ledger ${LEDGER} (writes run_at = this round's run_start.at, so the previous round is not misread):
75
- ui.batch → --work ${WORK} --node ui.batch --hmos ${HMOS} --status <s> --ledger ${LEDGER}
76
- enrich.spec_gen → --work ${WORK} --node enrich.spec_gen --run-dir ${RUN_DIR} --status <s> --ledger ${LEDGER}
77
- logic.spec_pipeline → --work ${WORK} --node logic.spec_pipeline --hmos ${HMOS} --status <s> --ledger ${LEDGER}
72
+ Before a node **starts** running (after the skip / reuse decision, before its first action) record `ledger.mjs --ledger ${LEDGER} --node <id> --begin`;
73
+ the terminal line then carries started_at / duration_s. Record a terminal state as soon as it is reached, never in a batch later; deferring is allowed only while the ledger cannot be written yet:
74
+ bootstrap records done after boot.workspace writes run_start, and must pass --started-at <ISO time bootstrap started> (note it when starting).
75
+ ui.batch / enrich.spec_gen / logic.spec_pipeline: the **same** ledger.mjs command that records the terminal state also writes the resume summary
76
+ (ledger.mjs calls write_resume_summary with the status it just wrote, run_at = this round's run_start.at); do not run it separately:
77
+ ui.batch → ... --node ui.batch --status <s> --work ${WORK} --hmos ${HMOS}
78
+ enrich.spec_gen → ... --node enrich.spec_gen --status <s> --work ${WORK} --run-dir ${RUN_DIR}
79
+ logic.spec_pipeline → ... --node logic.spec_pipeline --status <s> --work ${WORK} --hmos ${HMOS}
78
80
  status=skipped -> write an ok:false tombstone (do not project page counts / waves that may still be from the previous round in the leaf);
79
81
  done|failed|reused -> project from the leaf artifacts. If writing fails, try to write a tombstone instead; if that fails too, delete the old file.
80
82
  **Do not** hang it on after_run: success has not been judged then, so --status is not known yet; and the skip path never runs after_run.
@@ -86,7 +88,9 @@ policy:
86
88
  downstream nodes that depend on it are **scheduled as usual** and run in the degraded way written in their own invoke (if none is written, they are treated as unaffected);
87
89
  the final report of logic.finalize must list every soft_continue failure.
88
90
  Publishing with holes ≠ failure: when the run semantics of enrich.spec_gen are incomplete (holes inside an Area), it publishes with holes per the deveco-cli contract and records the gaps
89
- (specs.json `completeness: "incomplete-known"` + `incomplete{...}`); the node still succeeds and downstream consumes as usual; the gaps must also go into the final report.
91
+ (specs.json `completeness: "incomplete-known"` + `incomplete{...}`); the node still succeeds and downstream consumes as usual; the gaps stay in specs.json `incomplete{...}` and are not written into the final report.
92
+ The one exception: on an incremental run, scope pages that got no SPEC (`incomplete.scopeUnmatched` / `scope.unmatched`) are the
93
+ outcome of the incremental scope, not a SPEC quality gap; logic.finalize's "Incremental scope" section (scope_report.mjs) lists them under "what was skipped".
90
94
  ui.batch fails -> review.ui_batch takes the --upstream-failed branch (see that node); a UI failure must not hard-stop the logic chain.
91
95
  human_interaction: |
92
96
  adopt_fallback_only + staged_human_gates
@@ -224,8 +228,10 @@ policy:
224
228
  · Each fresh run gets a new ${WORK}/reqgen/run-<timestamp>; an unfinished run reuses the same directory when resumed
225
229
  (a2h-spec-generate prepare's rule: a new run must be an empty directory; a fingerprint mismatch requires a new run). Old runs are kept, not deleted.
226
230
  "**Atomic whole package** / rerun on the same output": when rerunning with the same output=${RUN_DIR}, prepare reuses existing artifacts if the input fingerprint
227
- matches; on fingerprint drift that run directory is **never reused** — there is no "rerun only some pages" granularity (when needed, use
228
- a2h-spec-generate directly + a --scope file placed outside the run directory to delimit the range).
231
+ matches; on fingerprint drift that run directory is **never reused** — a full profile has no "rerun only some pages" granularity.
232
+ Migrating only some pages = profile=incremental (SCOPE=…): ui.batch I4 confirms scope.json, enrich.spec_gen writes SPECs for those
233
+ pages only with page-specgen --scope, and the run directory belongs to its scope_id. Do not start a SPEC generation outside the
234
+ orchestration and feed it in as specs_json (see spec_order_boundary).
229
235
  resume_from: |
230
236
  profile=resume (or an explicit FROM_NODE≠bootstrap) = resume from FROM_NODE, decided by bootstrap.plan_resume (resume_plan.mjs):
231
237
  · FROM_NODE must be an id in nodes (not bootstrap), otherwise hard_stop (do not guess the closest node).
@@ -261,7 +267,7 @@ policy:
261
267
 
262
268
 
263
269
  ⚙ discover_par is fixed serial arch -> utg_static (both run inline in the primary, see policy.dispatch_inline):
264
- scaffold_new (HMOS does not exist / is empty / contains only .git·.DS_Store; emptiness is judged like create_project, ignoring those two; only .hometrans left -> preflight FAIL)
270
+ scaffold_new (HMOS does not exist / is empty / contains only .git·.DS_Store·.hometrans; emptiness is judged like create_project, ignoring those three; .hometrans is HomeTrans's own records, moved aside for the shell creation and put back)
265
271
  requires arch to build the shell first, otherwise boot.workspace / utg_static would dirty the directory. Handling: paths_preflight does a non-destructive probe;
266
272
  boot.workspace needs discover.arch when ${SERIALIZE_DISCOVER}; utg_static hangs off boot.workspace.
267
273
  So existing_project and scaffold_new both run arch -> utg_static (scaffold_new additionally goes through boot.workspace in between).
@@ -332,6 +338,11 @@ profiles:
332
338
  # The enrich lane holds both enrich.spec_gen / enrich.module_docs, so include_lanes alone cannot trim it;
333
339
  # it must be excluded precisely by **node id**.
334
340
  force_skip: [discover.utg_static, enrich.spec_gen, review.spec_gen, enrich.module_docs, barrier.l2_enrich, adopt, logic]
341
+ incremental:
342
+ description: Incremental (scenario 3) — migrate the pages SCOPE names into an existing HarmonyOS project; the UI and the feature-list / logic lanes share the scope.json ui.batch confirms at I4
343
+ # Same lanes and nodes as full; every difference lives inside the nodes (ui.batch MODE=incremental, enrich.spec_gen --scope,
344
+ # run_dir owned by scope_id). This round's UI / SPEC / logic outputs belong to another scope, so the previous round's are not reused (see ask_run_config_once.reuse).
345
+ include_lanes: [boot, discover, enrich, adopt, logic, finalize]
335
346
  resume:
336
347
  description: resume from FROM_NODE
337
348
  include_lanes: all
@@ -361,7 +372,23 @@ vars:
361
372
  # ↓ back-filled from the output of bootstrap's env_preflight (report.hmos_mode / report.serialize_discover)
362
373
  HMOS_MODE: { required: false, default: "", set_by: "env_preflight -> hmos_mode (scaffold_new | existing_project)" }
363
374
  SERIALIZE_DISCOVER: { required: false, default: false, set_by: "env_preflight -> serialize_discover (= HMOS_MODE == scaffold_new)" }
364
- PROFILE: { required: false, from: profile, default: full, choices: [full, ui-only, resume], set_by: "env_preflight -> profile (back-filled after validation)" }
375
+ PROFILE: { required: false, from: profile, default: full, choices: [full, ui-only, incremental, resume], set_by: "env_preflight -> profile (back-filled after validation)" }
376
+ # The scope request of profile=incremental (page descriptions / a module / UTG node ids): resolved only by ui.batch's I1–I4 and confirmed by the user;
377
+ # the confirmed ${HMOS}/.hometrans/incremental/scope.json is the scope of record for both lanes (enrich.spec_gen reads only it).
378
+ SCOPE: { required: false, required_when: "${PROFILE} == incremental and ${SCOPE_DOC} == '' and ${ANDROID_DIFF} == '' and ${SCOPE_FILE} == ''", from: [scope, scope_request], default: "" }
379
+ # back-filled by enrich.spec_gen before_run.incremental_scope (PROFILE=incremental)
380
+ SCOPE_ID: { required: false, default: "", set_by: "enrich.spec_gen before_run.incremental_scope → JSON.scope_id" }
381
+ SCOPE_JSON: { required: false, default: "", set_by: "enrich.spec_gen before_run.incremental_scope" }
382
+ # the other inputs of a feature-level increment (hometrans-incremental.html); any non-empty one replaces SCOPE; procedure references/feature-scope.md
383
+ SCOPE_DOC: { required: false, from: scope_doc, default: "" } # requirement / feature documents (comma-separated)
384
+ ANDROID_DIFF: { required: false, from: android_diff, default: "" } # an Android version range (git range, e.g. v2.3..v2.4)
385
+ REQ_HISTORY: { required: false, from: req_history, default: "" } # requirements already described, for exclusion
386
+ SCOPE_FILE: { required: false, from: scope_file, default: "" } # a scope.json the user already confirmed (v1 / v2); auto may skip the confirmation
387
+ # back-filled by discover.feature_scope
388
+ FEATURE_SCOPE: { required: false, default: false, set_by: "discover.feature_scope → JSON.feature_scope" }
389
+ SCOPE_PAGES: { required: false, default: "", set_by: "discover.feature_scope → JSON.pages (0 = no-UI logic only)" }
390
+ # back-filled by bootstrap.incremental_history: UTG page ids whose UI the migration ledger records as migrated (comma-separated), for ui.batch's I4 table
391
+ MIGRATED_PAGES: { required: false, default: "", set_by: "bootstrap.incremental_history → JSON.ui_done" }
365
392
  # Start node id for profile=resume (semantics in policy.resume_from); default bootstrap = run from the beginning.
366
393
  FROM_NODE: { required: false, from: [from_node, from_stage], default: bootstrap }
367
394
  # Profile of the original run when resuming: only needed when the ledger is missing (WORK deleted / old version); when the ledger has a record it is used only for cross-checking (see policy.resume_from).
@@ -379,7 +406,7 @@ vars:
379
406
  # asks the user to run a global ht init — in auto mode nobody can handle that mid-run, so FAIL early.
380
407
  # The leaf skill only accepts --engine-mode (no --engine); the in-project .homegraph/ index is still initialized by the leaf itself.
381
408
  ENGINE_MODE: { required: false, from: engine_mode, default: auto, choices: [auto, off, required], set_by: "env_preflight → engine_mode" }
382
- # SPEC generation engine: defaults to a2h-page-specgen (one SPEC per page, strict all-or-nothing: a failed leaf fails the node, no publishing with holes); spec-generate is the optional engine (the fused chain).
409
+ # SPEC generation engine: defaults to a2h-page-specgen (one SPEC per page, a published manifest is success and quality gaps never hard-stop: a partial or gate-failed run still writes completeness=incomplete-known into specs.json and downstream continues); spec-generate is the optional engine (the fused chain).
383
410
  # The engine is written into the run pointer and the ledger; a resume inherits it, and an explicit switch is a hard_stop (policy.resume_from).
384
411
  SPEC_ENGINE: { required: false, from: spec_engine, default: page-specgen, choices: [spec-generate, page-specgen], set_by: "env_preflight → spec_engine" }
385
412
  # Whether the user gave spec_engine explicitly; a resume only checks "the engine must not change" when it was explicit.
@@ -490,7 +517,7 @@ nodes:
490
517
  - infer_android_root:
491
518
  script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/infer_android_root.mjs"
492
519
  runner: node
493
- args: "--android ${ANDROID} --apk ${APK_PATH}"
520
+ args: "--android=${ANDROID} --apk=${APK_PATH}" # single tokens: an empty APK_PATH stays --apk=
494
521
  exit_0: |
495
522
  JSON.replaced is true -> ANDROID = JSON.android; tell the user JSON.note verbatim and do not ask about the path again.
496
523
  false -> keep the ANDROID the user gave (the APK path has no /build/outputs/apk, or the given path itself is a valid project root).
@@ -520,7 +547,7 @@ nodes:
520
547
  - probe_all_artifacts:
521
548
  entries:
522
549
  # Same criterion as success: file present ≠ finished (a failed stage / running only Phase A also leaves utg.json + click_paths.json).
523
- 1: { node: discover.utg_static, skill: a2h-utg-static, all: ["${UTG_DIR}/utg.json", "${UTG_DIR}/click_paths.json"], check: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_utg_static_done.mjs", args: "--workspace ${UTG_DIR}" } }
550
+ 1: { node: discover.utg_static, skill: a2h-utg-static, all: ["${UTG_DIR}/utg.json", "${UTG_DIR}/click_paths.json"], check: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_utg_static_done.mjs", args: "--workspace ${UTG_DIR} --project ${ANDROID}" } }
524
551
  2: { node: discover.arch, skill: a2h-arch-generate, all: ["${HOMETRANS_DIR}/project_design.md", "${HOMETRANS_DIR}/database_design.md", "${HOMETRANS_DIR}/preferences_design.md"], check: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_arch_done.mjs", args: "--hmos ${HMOS}" } }
525
552
  # specs.json present ≠ finished: publishing with holes is a legal terminal state (check still exits 0), but only parsing the list tells
526
553
  # complete / incomplete-known / no field, so file existence alone is not enough.
@@ -530,18 +557,21 @@ nodes:
530
557
  4: { node: ui.batch, skill: a2h-batch-ui-align, all: ["${HMOS}/.hometrans/batch_report.md"], check: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_ui_batch_done.mjs", args: "--hmos ${HMOS}" } }
531
558
  # Do not judge module_docs by ${HOMETRANS_DIR}/project_design.md: arch writes the same file first,
532
559
  # so module_docs would be misjudged as done as soon as arch finishes. Use the incremental state file that only module_docs Step 7 writes.
533
- 5: { node: enrich.module_docs, skill: a2h-module-semantic-docs, all: ["${HOMETRANS_DIR}/module_understanding/.module_semantic_docs_state.json"] }
560
+ # The state file is kept across runs: it must also be no older than project_design.md / batch_report.md, or an arch re-run / new UI pages would still read as reusable.
561
+ 5: { node: enrich.module_docs, skill: a2h-module-semantic-docs, all: ["${HOMETRANS_DIR}/module_understanding/.module_semantic_docs_state.json"], check: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_module_docs_done.mjs", args: "--hmos ${HMOS} --probe" } }
534
562
  6: { node: adopt.specs_json, skill: "(adopt)", any: ["${SPECS_JSON}", "${SPEC_DIR}/specs.json"] }
535
563
  # state is written in pipeline I1 (plan_groups --emit-state), so file present ≠ finished;
536
- # the check command must also exit 0 (all groups terminal, no unfinished chunk, Finalization has written state.finalization).
564
+ # the check command must also exit 0 (all groups terminal, no unfinished chunk, Finalization has written state.finalization with both gate markers finalization.homecheck / finalization.smoke).
537
565
  # exit 1 -> treated as unfinished; re-inline the pipeline and let its own Mid-flight resume pick up (do not delete state;
538
566
  # when only Finalization is missing it goes straight to smoke + Finalization). exit 3 (all groups failed) -> finished but failed, not reusable;
539
567
  # handled by before_run when the node runs (resuming as is can achieve nothing; only a new round or skipping this round).
540
568
  # exit 4 -> hard fingerprint mismatch (specs.json content sha256 / specs_json|android|design_dir paths;
541
569
  # e.g. so-ids reordered after spec_gen fills gaps): not reusable; before_run archives the old campaign before the node runs.
542
- # Exception (upgrade compatibility in check_spec_pipeline_done): for a **finished** campaign, a drift of the specs_json **path**
543
- # (layout upgrade from the idx root -> the Step 5b page root) is downgraded to soft_stale — the output is already merged, and archiving to rerun would only
544
- # produce duplicate code; same path but changed sha (list rewritten) is still exit 4. An unfinished campaign that changes root is still
570
+ # Exception (upgrade compatibility in check_spec_pipeline_done): for a **finished** campaign, moving from <run>/generation/specs
571
+ # to <run>/generation/pages **inside the same run directory** (layout upgrade) is downgraded to soft_stale — the output is already
572
+ # merged, and archiving to rerun would only produce duplicate code. A different run directory (a spec regeneration or a
573
+ # SPEC_ENGINE switch always starts a new run) is another manifest, not an upgrade: still exit 4, or the new SPECs would be
574
+ # taken as done and silently never migrated; same path but changed sha (list rewritten) is still exit 4. An unfinished campaign that changes root is still
545
575
  # exit 4 (so-id discipline: never resume under a new root).
546
576
  # Drift of soft knobs (wave_width / max_scenarios_per_chunk / engine_mode) only yields a soft_stale warning,
547
577
  # never raises exit 4 — an unfinished campaign still goes Mid-flight, and a finished one can still be REUSEd.
@@ -591,11 +621,15 @@ nodes:
591
621
  # REUSE_ALL=none -> all false;
592
622
  # per-item answers -> follow the user's answers, but an answer of true whose probe items are unfinished is forced to false and explained in the receipt;
593
623
  # a REUSE_X already given on the command line is not asked again; one still at ask (the user did not answer it) -> false (rerunning is safest).
624
+ # PROFILE=incremental -> REUSE_UI_BATCH / REUSE_SPEC_GENERATE / REUSE_LOGIC_PIPELINE are always false and not asked:
625
+ # the previous round's UI / feature list / logic outputs belong to another scope (or to a full run), so reusing them migrates nothing of this scope;
626
+ # arch / utg_static / module_docs are whole-project outputs and are probed and asked as usual.
627
+ force_false_when: { "${PROFILE} == incremental": [REUSE_UI_BATCH, REUSE_SPEC_GENERATE, REUSE_LOGIC_PIPELINE] }
594
628
  # With profile=resume it is decided by policy.resume_from, not asked here.
595
629
  # The UI chain always runs. There is no switch that skips the whole UI chain; reusing existing artifacts goes through REUSE_UI_BATCH.
596
630
  config_vars: []
597
631
  # When the UI chain will run (UI not reused) and the command line did not give apk_path, ask for it in the same round.
598
- ask_if_missing: { APK_PATH: "${APK_PATH} == null and ${REUSE_UI_BATCH} != true" }
632
+ ask_if_missing: { APK_PATH: "${APK_PATH} == null and ${REUSE_UI_BATCH} != true", SCOPE: "${PROFILE} == incremental and ${SCOPE} == '' and ${SCOPE_DOC} == '' and ${ANDROID_DIFF} == '' and ${SCOPE_FILE} == ''" }
599
633
  # Question script (user-visible options). Full rules in policy.human_interaction; this template must keep the validate assertion phrases.
600
634
  prompt_template: |
601
635
  [a2h-app-migrate startup config]
@@ -617,6 +651,8 @@ nodes:
617
651
  3) Whether to reuse the artifacts already detected (REUSE_* / reuse all / rerun all)
618
652
  May be in the same question as item 1; do not merge item 2 into it.
619
653
  4) If the UI chain will run and apk_path was not passed: the absolute path of the Android APK (the only source for resource conversion)
654
+ 5) If PROFILE=incremental and scope was not passed: which pages to migrate this time (page names / a module / UTG node ids;
655
+ the concrete page list is shown for your confirmation when UI conversion starts)
620
656
  (FYI, no reply needed) This run builds a .homegraph code index under both the Android project and the HarmonyOS project directories
621
657
  (arch / spec generation / semantic docs all depend on it).
622
658
  When only HarmonyOS emulators are connected (all hdc targets are 127.0.0.1:), devecocli login is not checked and devecocli auth login is not required.
@@ -630,7 +666,7 @@ nodes:
630
666
  - infer_android_root_after_config:
631
667
  script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/infer_android_root.mjs"
632
668
  runner: node
633
- args: "--android ${ANDROID} --apk ${APK_PATH}"
669
+ args: "--android=${ANDROID} --apk=${APK_PATH}" # single tokens: an empty APK_PATH stays --apk=
634
670
  exit_0: |
635
671
  Same rules as infer_android_root. JSON.replaced is true -> ANDROID = JSON.android; tell the user JSON.note,
636
672
  and rerun probe_all_artifacts (read-only) with the new ANDROID before entering preflight. Never wait for preflight to FAIL before asking for the Android path again.
@@ -656,6 +692,12 @@ nodes:
656
692
  ui_info_root: "${UI_INFO_ROOT}"
657
693
  skills_root: "${SKILLS_ROOT}"
658
694
  profile: "${PROFILE}"
695
+ # required for PROFILE=incremental (preflight FAILs without it); an empty string for any other profile
696
+ scope_request: "${SCOPE}"
697
+ # the other inputs of a feature-level increment: any non-empty one counts as a scope; preflight checks the files / range exist
698
+ scope_doc: "${SCOPE_DOC}"
699
+ android_diff: "${ANDROID_DIFF}"
700
+ scope_file: "${SCOPE_FILE}"
659
701
  # Run knobs: preflight validates enum / positive integer / cap and clamps (SPEC_CONCURRENCY per policy.max_spec_generate_concurrency),
660
702
  # normalized values are back-filled via PREFLIGHT_VARS — leaves only ever get legal values and never fail hours later in I1.
661
703
  engine_mode: "${ENGINE_MODE}"
@@ -670,10 +712,8 @@ nodes:
670
712
  # The following three make preflight check only what the nodes running this round need (will run and would fail if missing -> FAIL)
671
713
  skip_logic: "${SKIP_LOGIC}"
672
714
  skip_spec_gen: "${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true"
673
- skip_utg_static: "${REUSE_DISCOVER_UTG} == true or ${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == ui-only"
674
715
  skip_arch: "${REUSE_DISCOVER_ARCH} == true or ${SKIP_DISCOVER_ARCH}"
675
- # module_docs is not affected by SKIP_LOGIC (only ui-only's force_skip and the two items below trim it)
676
- skip_module_docs: "${SKIP_MODULE_DOCS} or ${REUSE_MODULE_DOCS} == true"
716
+ # skip_utg_static / skip_module_docs were removed (L2): no preflight item belongs to those two nodes alone.
677
717
  # Logic pipeline not run this round (reused / skipped) -> devecocli login not required; also not required when it runs but the project already has a signing config.
678
718
  # Emulator-only (all hdc targets are 127.0.0.1:) is likewise not required; preflight decides from the online targets, so no switch needs to be passed here.
679
719
  skip_logic_pipeline: "${SKIP_LOGIC_PIPELINE} or ${REUSE_LOGIC_PIPELINE} == true"
@@ -709,6 +749,38 @@ nodes:
709
749
  # Every later gate's "does it include review.xxx" check compares item by item exactly against this normalized value (comma-separated), never against the raw user input
710
750
  INTERACTION_MODE: interaction_mode
711
751
  INTERACTIVE_GATES: interactive_gates
752
+ # PROFILE=incremental: a read-only look at what this HarmonyOS project already migrated (migration ledger + leftover
753
+ # progress files); tell the user, and hand the migrated pages to ui.batch to mark in the I4 table. Never writes,
754
+ # never blocks; the verdicts are migration_manifest.mjs summarize().
755
+ - incremental_history:
756
+ when: "${PROFILE} == incremental"
757
+ script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/migration_manifest.mjs"
758
+ runner: node
759
+ args: "--hmos ${HMOS} --summary"
760
+ exit_0: |
761
+ Tell the user one sentence per JSON.history (never paste the JSON):
762
+ · none -> "This HarmonyOS project was not migrated with this tool before; treating this as a first incremental run."
763
+ · ledger -> "This project already has the UI of {len(JSON.ui_done)} pages and the business logic of {len(JSON.logic_done)} pages
764
+ migrated ({JSON.runs} rounds), with {len(JSON.features_done)} features completed; they are marked when you confirm the scope." and set MIGRATED_PAGES = JSON.ui_done (comma-separated) for ui.batch.
765
+ · unledgered -> "This project has earlier migration progress but no migration ledger; treating this as a first incremental run,
766
+ existing files are still recognised and never overwritten."
767
+ exit_nonzero: "warning only (the ledger is bookkeeping, it never blocks a migration); continue as none"
768
+ # PROFILE=incremental: full diagnosis (scenario 1 / 2 / 3, reuse / repair / rebuild per artifact, migrated pages whose
769
+ # source changed and new pages). Read-only; the only write is scenario 2's ledger rebuild, see exit_0.
770
+ - incremental_diagnose:
771
+ when: "${PROFILE} == incremental"
772
+ script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/diagnose.mjs"
773
+ runner: node
774
+ args: "--hmos ${HMOS} --work ${WORK} --android ${ANDROID} --out ${WORK}/diagnose.json"
775
+ exit_0: |
776
+ Tell the user one sentence per JSON.scenario and list every artifact whose action is repair / rebuild (name + detail):
777
+ · 3 -> a first incremental run; · 1 -> the previous migration's record is complete, only changes are handled; · 2 -> it is incomplete, repair first.
778
+ ledger action rebuild or repair -> first run
779
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/migration_manifest.mjs --hmos ${HMOS} --rebuild --ui-info ${UI_INFO_ROOT}
780
+ (rebuilds the ledger from earlier progress, records marked reconstructed), tell the user JSON.sources / JSON.unmapped, then run this diagnosis again.
781
+ A rebuild of the static page graph / architecture docs is done by discover.utg_static / discover.arch as usual, not here.
782
+ JSON.recommend present -> tell the user "{why.changed} migrated pages changed in source and {why.new} pages are new; scope=auto migrates them".
783
+ exit_nonzero: "warning only; continue as scenario 3"
712
784
  # Env image-read probe (semantics in policy.image_read). Skip when this run will not run ui.batch (REUSE_UI_BATCH) or IMAGE_READ is already not probe.
713
785
  # Verdict is for tip only — **never** pass it to ui.batch; the leaf Step 1 probes again.
714
786
  - probe_image_read:
@@ -808,7 +880,7 @@ nodes:
808
880
  script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/android_index.mjs"
809
881
  runner: node
810
882
  args: "--android ${ANDROID}"
811
- exit_nonzero: "failure: tell the user JSON.error verbatim (common: homegraph too old -> ht init; index locked -> homegraph unlock ${ANDROID})"
883
+ exit_nonzero: "failure: tell the user JSON.error verbatim (common: homegraph too old -> ht init; index locked -> homegraph unlock ${ANDROID}; one call timed out on a very large project -> tell the user to set HG_INDEX_TIMEOUT_MIN=<minutes> and resume from this node, default 30)"
812
884
  success:
813
885
  - script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/android_index.mjs", args: "--android ${ANDROID} --check" }
814
886
  on_fail: hard_stop
@@ -843,7 +915,7 @@ nodes:
843
915
  - any:
844
916
  - all:
845
917
  - file_exists: "${UTG_DIR}/utg.json"
846
- - script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_utg_static_done.mjs", args: "--workspace ${UTG_DIR}" }
918
+ - script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_utg_static_done.mjs", args: "--workspace ${UTG_DIR} --project ${ANDROID}" }
847
919
  - skipped: true
848
920
  invoke: |
849
921
  Context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish (policy.context_budget).
@@ -869,12 +941,21 @@ nodes:
869
941
  (carry_report.json lists carried / remaining); the rest are split into parts of 40 questions each, and the halt output lists line by line
870
942
  `<stage>_worklist.partN.json -> <stage>_answers.partN.json`.
871
943
  2) Answering (the review sections of SKILL.md; all three are REQUIRED):
872
- - Each part is answered independently, one reviewer per part, all dispatched at once. Answers are written as {"items": [...]}, copying each item's key verbatim.
873
- · This node is inline in the primary; dispatch reviewers with the primary session's Task / subagent.
944
+ - Each part is answered independently, one reviewer per part, dispatched in the **background** (the same protocol as a2h-batch-ui-align step3-capture.md "Reviewer waves").
945
+ Answers are written as {"items": [...]}, copying each item's key verbatim.
946
+ · This node is inline in the primary; dispatch reviewers with the primary session's Task / subagent; at most 10 reviewers run at once, the rest go as earlier ones complete.
947
+ · The answers file is the completion signal, not the agent: a part is done when
948
+ node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/answers_check.mjs <absolute answers path> reports complete;
949
+ an nl_hints / view_interactions part also needs
950
+ node ${SKILLS_ROOT}/a2h-utg-explorer/scripts/hint_check.mjs --project ${ANDROID} <absolute answers path> to exit 0 (bad=0).
951
+ Put both commands in the prompt; the reviewer runs them until they pass and quotes the result line before returning; put the rules hint_check prints into the prompt verbatim.
952
+ · An agent that ended with incomplete answers / bad>0 is resumed in its own session (with the lines hint_check printed), not replaced by a new agent;
953
+ only if it is still incomplete after that does the primary answer the remaining items unresolved. Never answer for an agent that is still running.
874
954
  · If the tool list has neither task nor subagent: do not answer everything yourself and return ok:true. Return
875
955
  { "ok": false, "note": "no task/subagent tool; worklist reviewers cannot be dispatched" }.
876
956
  - view_interactions: judge category per references/view-interactions.md; anything with insufficient evidence is unresolved;
877
957
  - nl_hints: fill nl_hint / action_override / evidence per item; evidence must be a single bare file:line, and hints use the App's own UI language;
958
+ leave action_override empty for a plain tap and fill it only for double_tap / long_press / swipe-* or default; default means "no gesture, the page opens by itself", not "the default tap";
878
959
  - state_guard: answer guard_kind + guard_text + evidence per page; evidence may only be one of the candidate lines given in that item's code_window;
879
960
  when unsure always abstain:true; do not guess.
880
961
  After all parts are answered, merge them (rejects missing questions / duplicates / unknown keys, naming the stage and the missing keys in the error; re-answer only those parts):
@@ -884,11 +965,13 @@ nodes:
884
965
  node run_pipeline.mjs ${ANDROID} --workspace ${UTG_DIR} --resume [--lang <the same locale>]
885
966
  --skip-llm is **forbidden** (degraded run: click instructions degrade to code names, and downstream spec_gen gets click_paths that "look complete but are not executable").
886
967
  4) Completion check (**mandatory**; driver exit 0 does not mean success):
887
- node ${SKILLS_ROOT}/a2h-app-migrate/scripts/check_utg_static_done.mjs --workspace ${UTG_DIR}
968
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/check_utg_static_done.mjs --workspace ${UTG_DIR} --project ${ANDROID}
888
969
  exit 0 -> done; exit 1 -> look at next in the JSON:
889
970
  · resume -> only Phase B is missing (including the case where Phase A did not really enter Phase B because the worklists were empty): run step 3 once more,
890
971
  then check again; still non-zero -> failure;
891
- · rerun -> a stage in failed_stages failed or was degraded by --skip-llm: read the corresponding ${UTG_DIR}/<stage>.log;
972
+ · fix_hints -> merged hints that hint_check rejects (bad_hints lists key / reason): they compile to needs_external and the page is never captured.
973
+ Rewrite those items in their part answers (or resume that part's reviewer), merge again, then run step 3 and step 4;
974
+ · rerun -> a stage in failed_stages failed or was degraded by --skip-llm: read the corresponding ${UTG_DIR}/<stage>.log;
892
975
  if fixable (e.g. blocked by security software) rerun 1)–4) as a whole (answered questions carry over automatically), otherwise fail with failed_stages in the note.
893
976
  exit 2 (summary missing / unparsable) -> failure. Write the sanity line from the JSON verbatim into the returned note.
894
977
  Do not modify ${HMOS} business source, and do not write ${ANDROID} (including .homegraph/).
@@ -959,7 +1042,7 @@ nodes:
959
1042
  A project_design.md previously refreshed by enrich.module_docs is archived with them; module_docs must run again to refresh it.
960
1043
  [Unattended contract (policy.leaf_questions)]
961
1044
  · The index of the source repo (${ANDROID}) has already been built and synced by discover.android_index: do **not** run homegraph
962
- init / sync / index on ${ANDROID} again (discover.utg_static, running in parallel, is reading it); just use it;
1045
+ init / sync / index on ${ANDROID} again (discover.android_index is its only maintainer; the later discover.utg_static / ui.batch / spec_gen only read it); just use it;
963
1046
  · For the HarmonyOS project (${HMOS}), "ask the user before running homegraph init / sync" (also sync when the index is stale) -> already permitted; run it directly without asking;
964
1047
  · When the generate-mode cold-start smoke test hits login -> auto / sub-agent records DEPLOY_ERROR and continues;
965
1048
  · Other questions follow policy.leaf_questions.
@@ -1044,6 +1127,54 @@ nodes:
1044
1127
  - when: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == ui-only"
1045
1128
  on_fail: hard_stop
1046
1129
 
1130
+ # Feature-level incremental scope (hometrans-incremental.html "feature-level increment" F-8): when the input is not a page
1131
+ # list, resolve it into features before UI conversion and write scope.json v2; a page list still goes to ui.batch's I1–I4
1132
+ # (this node only sets FEATURE_SCOPE=false).
1133
+ - id: discover.feature_scope
1134
+ lane: discover
1135
+ type: local
1136
+ needs: [discover.utg_snapshot]
1137
+ summary: resolve a feature description / requirement document / Android version diff / confirmed scope file into a feature-level scope.json (v2)
1138
+ user_facing:
1139
+ announce: always
1140
+ name: Settle the migration scope
1141
+ done: "The features to migrate are settled: {features} features over {pages} pages ({new} new, {sup} to supplement, {chg} changed behavior) and {logic} no-UI units; {skipped} features are not migrated (reasons listed)."
1142
+ failed: "The migration scope could not be settled: {reason}. Stopping here."
1143
+ skipped: "This round migrates a page list; the pages are listed for your confirmation when UI conversion starts."
1144
+ skip_if: "${PROFILE} != incremental"
1145
+ reads: { android: "${ANDROID}", utg: "${UTG_DIR}/utg.json" }
1146
+ writes:
1147
+ scope: "${HMOS}/.hometrans/incremental/"
1148
+ work: "${WORK}/feature_scope/"
1149
+ success:
1150
+ - any:
1151
+ # The file existing is not enough: NEW on a page HarmonyOS already has (that is SUP), a SUP without its gap, or auto confirming a feature-level scope all fail
1152
+ - script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/scope_model.mjs", args: "check ${HMOS}/.hometrans/incremental/scope.json --existing ${HMOS}/.hometrans/incremental/existing.json --ledger ${HMOS}/.hometrans/migration_manifest.json" }
1153
+ - when: "${FEATURE_SCOPE} == false"
1154
+ - skipped: true
1155
+ invoke: |
1156
+ Context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish (policy.context_budget).
1157
+ First decide the input (in this order, stop at the first hit):
1158
+ 0. SCOPE == auto -> rerun the diagnosis on the fresh page graph and build the scope from its recommendation (fingerprints, no semantic judgement: auto may adopt it):
1159
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/diagnose.mjs --hmos ${HMOS} --work ${WORK} --android ${ANDROID} --utg ${UTG_DIR}/utg.json --out ${WORK}/diagnose.json
1160
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/feature_scope.mjs recommend --diag ${WORK}/diagnose.json --utg ${UTG_DIR}/utg.json --out ${WORK}/feature_scope/draft.json
1161
+ A draft with no features (nothing changed, nothing new) -> fail with reason "nothing to migrate incrementally"; otherwise, under interactive, confirm per F5 (the user may edit),
1162
+ then scope_model.mjs write produces scope.json, FEATURE_SCOPE=true. Compute the gap / change of CHG pages per feature-scope.md F4 before confirming.
1163
+ 1. SCOPE_FILE given -> node ${SKILLS_ROOT}/a2h-app-migrate/scripts/scope_model.mjs validate ${SCOPE_FILE}
1164
+ exit 0 -> copy it as is to ${HMOS}/.hometrans/incremental/scope.json, FEATURE_SCOPE=true; exit≠0 -> fail (tell the user the text).
1165
+ It is a scope the user already confirmed; auto may use it directly.
1166
+ 2. SCOPE_DOC or ANDROID_DIFF given, or SCOPE describes a feature / behavior rather than pages -> FEATURE_SCOPE=true,
1167
+ run F1–F5 of ${SKILLS_ROOT}/a2h-app-migrate/references/feature-scope.md in full and write scope.json.
1168
+ Work types come only from feature_scope.mjs map / fill-gap; never hand-write the draft (a hand-written NEW lands on existing pages).
1169
+ Under auto F5 does not ask the user: settle it yourself per the auto rule of feature-scope.md F5 (work types as map / fill-gap computed them), write scope.json (confirmed_by=auto)
1170
+ and put the feature table in the reply; under interactive stop and wait for the user's confirmation.
1171
+ 3. SCOPE only names pages / classes / UTG node ids -> FEATURE_SCOPE=false; this node writes nothing and hands over to ui.batch's I1–I4.
1172
+ When unsure whether it is pages or a feature, treat it as a feature (the user sees it in the feature table and can turn it into pages).
1173
+ With FEATURE_SCOPE=true, back-fill from the written scope.json: SCOPE_PAGES = the number of pages (0 = no-UI logic only; ui.batch is skipped).
1174
+ Only read the ${ANDROID} and ${HMOS} sources; working files go to ${WORK}/feature_scope/. Return JSON:
1175
+ { "ok": true, "feature_scope": true|false, "scope_id": "<id>", "features": N, "pages": P, "new": a, "sup": b, "chg": c,
1176
+ "logic": L, "skipped": S } or { "ok": false, "note": "..." }.
1177
+
1047
1178
  # The leaf skill is dispatched by SPEC_ENGINE (skill_by_engine): spec-generate = a2h-spec-generate (internal steps of a single skill:
1048
1179
  # prepare -> fused per-Area worker -> check-fused-spec -> finalize -> collect-specs -> publish-specs);
1049
1180
  # page-specgen = a2h-page-specgen (prepare -> waker rearm -> event loop -> finalize); dispatch in policy.dispatch_inline.
@@ -1057,13 +1188,13 @@ nodes:
1057
1188
  name: Feature list
1058
1189
  doing: "Writing a list of what each feature must do, based on the Android source and page navigation. The HarmonyOS business code will be written from this list later. This step does not change the UI."
1059
1190
  done: "The feature list is written: {spec_count} specs, {manifest_items} items in the list. Nothing missing. The HarmonyOS business code will be written from this list next."
1060
- incomplete: "The feature list is written, but there are still gaps: {gaps}. We will continue with the current list, and these gaps will appear in the final report."
1191
+ incomplete: "The feature list is written, but there are still gaps: {gaps}. We will continue with the current list; these gaps stay in specs.json and the run record and are not written into the final report."
1061
1192
  failed: "The feature list could not be written: {reason}. Business logic cannot start without the list."
1062
1193
  reused: "The feature list was not rewritten this round; the existing one is reused."
1063
1194
  skipped: "No feature list this round."
1064
1195
  parallel_group: post_utg
1065
1196
  dispatch: "primary_skill_inline"
1066
- needs: [discover.utg_snapshot]
1197
+ needs: [discover.utg_snapshot, discover.feature_scope]
1067
1198
  skip_if: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true"
1068
1199
  # Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
1069
1200
  before_run:
@@ -1071,12 +1202,21 @@ nodes:
1071
1202
  script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/human_review_gate.mjs"
1072
1203
  runner: node
1073
1204
  args: "--gate spec_gen --checkpoint ${CHECKPOINT_DIR}/spec-gen-reviewed.ok --clear-checkpoint"
1205
+ # PROFILE=incremental: the scope of record is the scope.json ui.batch writes once I4 is confirmed (both lanes migrate the same pages).
1206
+ # Before resolve_run_dir: a run directory belongs to a scope_id, and another scope's unfinished run must never be resumed.
1207
+ - incremental_scope:
1208
+ when: "${PROFILE} == incremental"
1209
+ script: "${SKILLS_ROOT}/a2h-batch-ui-align/scripts/progress_identity.mjs"
1210
+ runner: node
1211
+ args: "scope-id --scope ${HMOS}/.hometrans/incremental/scope.json"
1212
+ exit_0: "SCOPE_ID = JSON.scope_id; SCOPE_JSON = ${HMOS}/.hometrans/incremental/scope.json"
1213
+ exit_nonzero: "scope.json missing or empty (ui.batch did not confirm an incremental scope, or it failed) -> this node is ok:false with reason \"incremental scope not confirmed\"; never resolve SCOPE yourself to make one up"
1074
1214
  # Decide this run's directory and write the pointer; the stdout JSON back-fills RUN_DIR (SPEC_DIR is derived from it).
1075
- # Unfinished run -> resumed; finished, or the user chose to rerun spec_gen / rerun everything (adds --fresh) -> new run-<timestamp>.
1215
+ # Unfinished run -> resumed (for PROFILE=incremental only under the same scope_id); finished, or the user chose to rerun spec_gen / rerun everything (adds --fresh) -> new run-<timestamp>.
1076
1216
  - resolve_run_dir:
1077
1217
  script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/run_dir.mjs"
1078
1218
  runner: node
1079
- args: "--work ${WORK} [--run-dir ${RUN_DIR} only when the user provided it explicitly] [--fresh when the user chose to rerun spec_gen or rerun everything] --engine ${SPEC_ENGINE}"
1219
+ args: "--work ${WORK} [--run-dir ${RUN_DIR} only when the user provided it explicitly] [--fresh when the user chose to rerun spec_gen or rerun everything] --engine ${SPEC_ENGINE} [--scope-id ${SCOPE_ID} only when PROFILE=incremental]"
1080
1220
  exit_0: "RUN_DIR = JSON.run_dir; SPEC_DIR = JSON.spec_dir; RUN_MODE = JSON.mode"
1081
1221
  exit_2: hard_stop
1082
1222
  # After the leaf returns and before judging success, executed by the **primary**: the run directory may have changed inside the leaf
@@ -1154,12 +1294,12 @@ nodes:
1154
1294
  and update RUN_DIR (later gates / adopt all read this one); note it in the report;
1155
1295
  · a2h-spec-generate stops because of "input fingerprint drift / workspace not empty" (prepare refuses to reuse that run directory) -> do not fail right away: run_dir.mjs --work ${WORK} --fresh --engine ${SPEC_ENGINE}
1156
1296
  creates a new directory and retries automatically **once**; only a second failure is handled per fail_matrix.
1157
- Publish gate (**following the deveco-cli contract**: incomplete semantics do **not abort**, but the gaps must be recorded and explained in the report;
1297
+ Publish gate (**following the deveco-cli contract**: incomplete semantics do **not abort**, but the gaps must be recorded in specs.json, not explained in the final report;
1158
1298
  when run-report.json is marked negative handle it per the branches below; hand-editing artifacts and skipping finalize are **forbidden**):
1159
1299
  · When marked negative (finalize itself exits non-zero and names the reason), collect-specs / publish-specs (idx root) and Step 5b's regroup-by-page / publish-specs (pages root) run to completion as usual —
1160
1300
  `--allow-incomplete` is added only to collect-specs and the two publish-specs runs; regroup-by-page has **no** gate flag, and passing that flag to it exits 2 (unknown argument);
1161
1301
  specs.json records `completeness: "incomplete-known"` + `incomplete{areas,failedShards,unresolved,unresolvedReasonCodes}`,
1162
- the node still counts as successful and **does not block downstream** (adopt / logic.spec_pipeline consume as usual; the gaps go into the finalize report).
1302
+ the node still counts as successful and **does not block downstream** (adopt / logic.spec_pipeline consume as usual; the gaps are not written into the final report).
1163
1303
  · finalize crashes before committing the marker (run-report.json missing -> verdict unknown; after H3/H6 it necessarily ends up here):
1164
1304
  collect-specs / the two publish-specs runs likewise complete with `--allow-incomplete` (regroup-by-page as usual, no gate flag), and specs.json records
1165
1305
  `completeness: "incomplete-known"` + `incomplete{unverified:true}` (a real run, marker not committed,
@@ -1173,7 +1313,7 @@ nodes:
1173
1313
  "completeness": "complete" | "incomplete-known",
1174
1314
  "incomplete": { areas, failedShards, unresolved, unresolvedReasonCodes } (or, when finalize did not commit the marker,
1175
1315
  only { unverified: true } — the run really exists but crashed before the marker, so the gaps cannot be named item by item)}.
1176
- The gaps must be named in the final reply (which Areas were not delivered / which candidates were not resolved); incomplete-known must not be described as a complete page set.
1316
+ The gaps must be named in enrich.spec_gen's returned JSON (which Areas were not delivered / which candidates were not resolved); incomplete-known must not be described as a complete page set, and the gaps are not written into the final report.
1177
1317
  ══ SPEC_ENGINE=page-specgen ══
1178
1318
  skill name: a2h-page-specgen (path `${SKILLS_ROOT}/a2h-page-specgen`; read its SKILL.md in full and
1179
1319
  follow its Orchestration Loop / event protocol exactly; the orchestrator does not restate or rewrite that protocol).
@@ -1185,35 +1325,51 @@ nodes:
1185
1325
  ${HMOS}
1186
1326
  --out ${SPEC_DIR}
1187
1327
  --concurrency ${SPEC_CONCURRENCY}
1188
- --chunk-budget ${MAX_SCENARIOS_PER_CHUNK}
1189
1328
  --engine-mode ${ENGINE_MODE}
1190
1329
  --design-dir ${DESIGN_DIR}
1330
+ [--scope ${SCOPE_JSON} only when PROFILE=incremental] # SPECs for the scoped pages only; an unmatched node is published as a hole (incomplete.scopeUnmatched)
1191
1331
  For this engine's forbidden arguments see stage-map.md "Notes on orchestrator arguments"; pass only the switches listed above.
1192
1332
  Execution order:
1193
1333
  1) node scripts/prepare.mjs ${ANDROID} ${UTG_SNAPSHOT} ${HMOS} --out ${SPEC_DIR}
1194
- --concurrency ${SPEC_CONCURRENCY} --chunk-budget ${MAX_SCENARIOS_PER_CHUNK}
1195
- --engine-mode ${ENGINE_MODE} --design-dir ${DESIGN_DIR}
1334
+ --concurrency ${SPEC_CONCURRENCY}
1335
+ --engine-mode ${ENGINE_MODE} --design-dir ${DESIGN_DIR} [--scope ${SCOPE_JSON} only when PROFILE=incremental]
1196
1336
  2) node scripts/waker.mjs ${SPEC_DIR} rearm # prepare writes waker.stop first, so this step is mandatory
1197
1337
  3) advance per SKILL.md's loop (watchdog --reconcile --json -> handle error/invalid -> claim ->
1198
1338
  background Agent (its prompt carries the token) -> dispatch confirm -> wait for the notification -> back to watchdog)
1199
1339
  4) complete with the evidence cleared -> node scripts/finalize.mjs ${SPEC_DIR}
1200
1340
  [Unattended contract (policy.leaf_questions)]
1201
- This engine does not ask; homegraph init/index/sync is allowed; a busy ledger is reported after three retries; lock/conflict -> hard-block.
1341
+ This engine does not ask; homegraph init/index/sync is allowed; a busy ledger is reported after three retries; lock/conflict -> hard-block (a .ledger.lock left by an exited process on the same host is taken over automatically; if the lock persists, verify the holder per a2h-page-specgen references/execution-model.md §2 and delete it by hand).
1202
1342
  ${SPEC_DIR} is the shared publish root: plan.json / facts/ / drafts/ / prompts/ / ledger.jsonl / state.json /
1203
1343
  waker.* / report.md / grouping-report.json are all this engine's private workspace; downstream only reads specs.json and */*-SPEC.md.
1204
- Completion:
1205
- · finalize exit 0 -> success (the success criteria are unchanged);
1206
- · finalize exit 1 (gate failure) -> the node fails: report the failing groups from ${SPEC_DIR}/report.md verbatim, then
1207
- node ${SKILLS_ROOT}/a2h-app-migrate/scripts/run_dir.mjs --work ${WORK} --abandon --engine ${SPEC_ENGINE};
1208
- never turn it into a success, never publish partial specs, never hand-edit specs.json;
1344
+ Completion (a published manifest is success; quality gaps never hard-stop):
1345
+ · finalize exit 0 -> read ${SPEC_DIR}/specs.json and ${SPEC_DIR}/coverage-report.json:
1346
+ - `completeness == "complete"` (or no completeness field) -> then check coverage-report:
1347
+ only `delivery_status == "delivered-complete"` is the complete page set; a
1348
+ `delivered-partial` / `failed` report (an older finalize manifest without the field)
1349
+ is adopted with holes, exactly as below;
1350
+ - `completeness == "incomplete-known"` (delivered-partial or gate failure) -> **adopt with holes**:
1351
+ copy `incomplete{areas,pages,failedShards,unresolvedReasonCodes,missingSpecIds,scopeUnmatched}` verbatim into the
1352
+ ledger and the resume summary (not the final report; the one exception is scopeUnmatched: it is the outcome of the incremental
1353
+ scope, and logic.finalize's "Incremental scope" section lists it under "what was skipped" via scope_report.mjs); downstream consumes the published SPECs as usual;
1354
+ never discard the run, never --abandon, never report a with-holes publish as a complete page set;
1355
+ · finalize exit 2 (operational abort such as a lock, plan/evidence fence, publication I/O failure,
1356
+ or no SPEC rendered at all) -> return to watchdog --reconcile to verify the current attempt, then retry
1357
+ finalize once; if it still exits 2 -> check whether ${SPEC_DIR}/specs.json still holds the previous
1358
+ successful publish: if it does, adopt it with holes per the completeness rules above and keep the run;
1359
+ if not, ok:false and
1360
+ `node ${SKILLS_ROOT}/a2h-app-migrate/scripts/run_dir.mjs --work ${WORK} --abandon --engine ${SPEC_ENGINE}`
1361
+ (nothing consumable exists; never hand-edit specs.json);
1209
1362
  · prepare non-zero (including plan_version drift / a non-empty non-strict-v2 workspace) -> first
1210
- node ${SKILLS_ROOT}/a2h-app-migrate/scripts/run_dir.mjs --work ${WORK} --fresh --engine ${SPEC_ENGINE}
1211
- to obtain a new RUN_DIR / SPEC_DIR and retry **once**; a second failure -> ok:false;
1363
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/run_dir.mjs --work ${WORK} --fresh --engine ${SPEC_ENGINE} [--scope-id ${SCOPE_ID} only when PROFILE=incremental]
1364
+ to obtain a new RUN_DIR / SPEC_DIR and retry **once**, adding `--carry-from <the old SPEC_DIR>` to the retried prepare (groups whose
1365
+ content is unchanged, that the previous run submitted and did not list in failedShards, are carried over instead of regenerated;
1366
+ only changed or failed groups are dispatched again); a second failure -> ok:false;
1212
1367
  · watchdog not complete / lock timeout / conflict -> not complete; do not rearm automatically.
1213
- · Before returning ok:false, run `run_dir.mjs --abandon` (the finalize-failure branch above already lists it);
1214
- skipping it leaves this run's partial specs.json to be judged finished by the next probe 3 and reused.
1368
+ · Only a run with NO published SPEC may `run_dir.mjs --abandon`; a run that published specs.json must stay
1369
+ available to review.spec_gen / adopt.specs_json.
1215
1370
  Returns JSON: { "ok": true, "run_dir": "${RUN_DIR}", "specs_json": "${SPEC_DIR}/specs.json",
1216
- "spec_count": M, "manifest_items": P } or { "ok": false, "note": "..." }.
1371
+ "spec_count": M, "manifest_items": P, "delivery_status": "...", "completeness": "...",
1372
+ "incomplete": {...} } or { "ok": false, "note": "..." }.
1217
1373
 
1218
1374
  # Spec chain human gate — dispatched after enrich.spec_gen reaches a terminal state.
1219
1375
  - id: review.spec_gen
@@ -1268,9 +1424,10 @@ nodes:
1268
1424
  reused: "The UI was not redone this round; the pages converted last time are reused."
1269
1425
  parallel_group: post_utg
1270
1426
  dispatch: "primary_skill_inline"
1271
- needs: [discover.utg_snapshot, discover.arch]
1427
+ needs: [discover.utg_snapshot, discover.arch, discover.feature_scope]
1272
1428
  also_needs_group: discover_par
1273
- skip_if: "${REUSE_UI_BATCH} == true"
1429
+ # a feature scope with no page at all (no-UI logic only) leaves UI conversion nothing to do
1430
+ skip_if: "${REUSE_UI_BATCH} == true or (${PROFILE} == incremental and ${FEATURE_SCOPE} == true and ${SCOPE_PAGES} == 0)"
1274
1431
  # Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
1275
1432
  before_run:
1276
1433
  - clear_gate_checkpoint:
@@ -1318,28 +1475,58 @@ nodes:
1318
1475
  · The app module for Step 2 a2h-resource-convert is the app_module passed above (the same as the spec chain); do not ask the user;
1319
1476
  · Step 0's DEVECO_HOME and Step 1's three paths are all given; do not ask again;
1320
1477
  · When the Step 6.3 cold-start smoke test hits login -> auto / sub-agent records DEPLOY_ERROR in the Step 7 TODOs and continues;
1478
+ · Step 1 `state_doc.mjs check` exits 1 (ui-align asks the user before Step 5) -> ask only when interactive and inline in primary;
1479
+ otherwise treat it as accepted: tell every prompt STATE_DOCS=unavailable, and the Step 7 report and TODOs say "official state-management docs unavailable: <check output>; redo UI conversion once fixed"; continue;
1480
+ · Step 0 `host_env.mjs check` action enable / restart (ui-align stops until the user restarts the host) -> ask only when interactive and inline in primary;
1481
+ otherwise treat it as "the user declined the restart": do not stop, use blocking waves (dispatch sub-agents in the foreground, finish one wave before the next), and say why in the Step 7 report;
1321
1482
  · `group_queue.mjs init` refuses to start ("another parent session may still be driving this campaign": a background job
1322
1483
  such as run_cycle is still running, reviewer answers bound within 20 minutes are incomplete, or a running group is still active) — ui-align requires asking the user:
1323
1484
  - interactive and this node is inline in the primary -> ask per ui-align's rules (only monitor / stop that session and then --takeover);
1324
1485
  - otherwise look at takeover_allowed: true (the signs come from this migrate's own previous ui.batch, which has already ended) -> first stop
1325
- the background jobs with state=running in ${HMOS}/.hometrans/jobs/*.json (by their pid: Windows `taskkill /T /F /PID <pid>`,
1326
- others `kill <pid>`), then `init --takeover`;
1327
- - no takeover_allowed (the signs may come from another session the user opened) -> **do not take over**; return { "ok": false, "note": "<init output verbatim>" }
1486
+ each background job that `node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/detach.mjs status ${HMOS}` lists with state=running and not service,
1487
+ with `node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/detach.mjs stop ${HMOS} --name <name>` (it checks the pid still belongs to the job before
1488
+ ending its tree; never taskkill / kill the pid from jobs/*.json directly: the OS may have handed it to an unrelated process), then `init --takeover`;
1489
+ - no takeover_allowed, but the refusal ends with `retry_after_s=N` (the signs may also be left by a crashed previous session:
1490
+ a crashed parent stops beating, and after 10 min with no group activity init can tell it is gone) -> wait N s and re-run `init`
1491
+ (no --takeover), at most twice; when init then returns adopt_jobs, pass `--job <name>` for each to every later `wait` and do
1492
+ not restart or stop them;
1493
+ - no takeover_allowed and no retry_after_s, or still refused after the retries (the signs may come from another session the user opened) -> **do not take over**; return { "ok": false, "note": "<init output verbatim>" }
1328
1494
  (soft_continue), and review.ui_batch's failure branch hands it to the user;
1329
1495
  · Other questions follow policy.leaf_questions.
1330
- [Checkpoint resume — decided before "full run"; never ignore existing progress because of "full mode"]
1496
+ [PROFILE=incremental — scenario 3: a few pages into an existing HarmonyOS project; replaces the two full-mode sections below]
1497
+ Extra arguments: MODE=incremental scope_request=${SCOPE} [migrated_pages=${MIGRATED_PAGES} only when non-empty]
1498
+ · FEATURE_SCOPE == true (discover.feature_scope wrote a confirmed scope.json) -> pass scope_file=${HMOS}/.hometrans/incremental/scope.json
1499
+ instead of scope_request: ui-align skips I1–I4's scope resolution (incremental-scope.md "Confirmed scope") and goes straight to Step 2;
1500
+ NEW pages convert whole, SUP / CHG pages add only what the group pack's "Supplement only" lists.
1501
+ · migrated_pages (pages whose UI the migration ledger records as migrated): the I4 table also marks these members
1502
+ "ledger: migrated"; the default action still follows I3's file verdict (exists -> skip). The ledger is a hint and never replaces I3 reading the disk.
1503
+ · ui-align runs I1–I5 per references/incremental-scope.md: I3 writes ${HMOS}/.hometrans/incremental/existing.json
1504
+ with list_existing.mjs; once I4 is confirmed it writes ${HMOS}/.hometrans/incremental/scope.json **at once** —
1505
+ the only scope of record this round. enrich.spec_gen reads only that file and must not resolve SCOPE on its own
1506
+ (both lanes must migrate the same pages).
1507
+ · I4 confirmation: interactive and this node inline in the primary -> stop and ask the user per ui-align's rules;
1508
+ auto (or a sub-agent) -> do not ask the user: settle on what I1–I3 resolved (a name with several candidates takes the one with the strongest evidence, the choice and its reason written in the I4 table)
1509
+ and write scope.json at once; only when a name has no candidate at all in the page graph return { "ok": false, "note": "<name> in the scope matches no page in the page graph" }.
1510
+ · Resume identity = harmony_project_dir + mode=incremental + scope_id, always decided by
1511
+ progress_identity.mjs resume --mode incremental --scope <scope.json> (never compare by hand; it archives a
1512
+ batch_progress.json that is not this scope's, and a full progress can be restored on the next full run).
1513
+ · Step 7 writes ${HMOS}/.hometrans/batch_report.md as usual. The returned JSON adds "scope_id": "<scope_id>".
1514
+ · Pages outside the scope are never touched; files existing.json hits are edited, never recreated (the group pack names them).
1515
+ [Checkpoint resume — decided before "full run"; never ignore existing progress because of "full mode"] (PROFILE≠incremental)
1331
1516
  Read ${HMOS}/.hometrans/batch_progress.json. If the file exists and the Resume identity matches
1332
- (harmony_project_dir=${HMOS} ∧ mode=full; this node only runs full and does not count incremental scope):
1517
+ (harmony_project_dir=${HMOS} ∧ mode=full; for PROFILE=incremental see the section above):
1333
1518
  it **must** go through a2h-batch-ui-align "Resume from progress"; archiving progress to start a new campaign is **forbidden**,
1334
1519
  and reading "run Step 0–7 in full" as recapturing/reconverting from scratch is **forbidden**:
1335
1520
  · pages with status=done whose output still exists -> Step 5 skipped; pending/failed -> redone;
1336
1521
  · stages.resources.done and resource_mapping.md present -> **skip Step 2** (rerunning would wipe already-merged resources);
1337
1522
  · stages.capture.done and ${UI_INFO_ROOT}/pages.json present -> **rerunning Step 3 (3.1–3.3) is forbidden**
1338
1523
  (recapturing changes the page_NNNN_* numbering, and none of the done pages keys would match);
1339
- · without stages.capture.done: within a full campaign run_cycle.mjs continues capturing from cycle_state; it is not a new round.
1524
+ · without stages.capture.done: within a full campaign run_cycle.mjs continues capturing from cycle_state; it is not a new round;
1525
+ when ${HMOS}/.hometrans/utg_explore/campaign.json exists (the capture has started) **skip Step 3.1 as well** (no copy, no
1526
+ run_pipeline) and continue Step 3.2: the campaign's tasks are keyed to the skeleton's node ids, a rebuilt skeleton orphans them.
1340
1527
  Only when the user explicitly asks this round to "reconvert resources" / "recapture" may progress be archived and restarted (this orchestration does not ask for that by default).
1341
1528
  progress missing, or not matching (different HMOS / mode≠full) -> run as a new campaign below; do not misuse someone else's progress.
1342
- [Step path for a new campaign / resume catch-up] mode=full (not ui-align's MODE=incremental):
1529
+ [Step path for a new campaign / resume catch-up] for PROFILE≠incremental, mode=full (not ui-align's MODE=incremental):
1343
1530
  - Step 0: resolve DEVECO_HOME (already passed);
1344
1531
  - Step 1: parse arguments, locate modules, decide the V1/V2 state management paradigm;
1345
1532
  - Step 2–6: skip or run according to the stages / pages above — resource conversion (Step 2 runs a2h-resource-convert,
@@ -1349,11 +1536,12 @@ nodes:
1349
1536
  - Step 7: **must** write ${HMOS}/.hometrans/batch_report.md (this node's success check and checkpoint probe only trust it),
1350
1537
  and write Step 3.2's deferred_human.json, unassigned Lottie, degraded/pending-fetch icons, and every non-PASS smoke verdict
1351
1538
  (FAIL_* / SKIPPED_* / DEPLOY_ERROR) into the Manual Follow-up TODOs — anything left out is silently lost.
1352
- Step 3.1 (only when Step 3 was **not** skipped this round because of stages.capture.done):
1539
+ Step 3.1 (only when Step 3 was **not** skipped this round because of stages.capture.done and ${HMOS}/.hometrans/utg_explore/campaign.json does not exist):
1353
1540
  when reuse_static_workspace is passed, first run, under ui-align's scripts conventions,
1354
1541
  node ${SKILLS_ROOT}/a2h-app-migrate/scripts/reuse_static_utg.mjs --from ${UTG_DIR} --to ${UI_UTG_DIR} --lang <device locale>
1355
1542
  (the locale comes from the same getprop used by discover). exit 0 -> already copied into ${UI_UTG_DIR}; skip Step 3.1's run_pipeline / reviewers and continue capturing from Step 3.2.
1356
- Non-zero (unfinished, lang mismatched or missing, directories overlapping) -> do not switch to ${UTG_DIR}; run the full Step 3.1 yourself in ${UI_UTG_DIR}.
1543
+ exit 3 (capture_in_progress) -> the capture has started: no copy, no Step 3.1; continue Step 3.2.
1544
+ exit 1 / 2 (unfinished, lang mismatched or missing, directories overlapping) -> do not switch to ${UTG_DIR}; run the full Step 3.1 yourself in ${UI_UTG_DIR}.
1357
1545
  When reuse_static_workspace is not passed, also run Step 3.1 yourself. In both cases only ${UI_UTG_DIR} is written, never back to ${UTG_DIR}
1358
1546
  (spec only reads ${UTG_SNAPSHOT}, see policy.parallel_rule).
1359
1547
  Per-page/group conversion sub-agents are managed by this skill itself (Task): this session is the primary; per a2h-batch-ui-align Step 0.1
@@ -1365,7 +1553,7 @@ nodes:
1365
1553
  { "ok": true, "pages_processed": N, "pages_failed": F, "build_status": "SUCCESS|PARTIAL|FAILED",
1366
1554
  "smoke_verdict": "<a2h-coldstart-smoke-gate verdict>", "batch_report": "${HMOS}/.hometrans/batch_report.md" }.
1367
1555
 
1368
- # UI human gate — after ui.batch reaches a terminal state (may interleave with the following enrich.spec_gen / module_docs).
1556
+ # UI human gate — after ui.batch reaches a terminal state, before enrich.spec_gen (policy.dispatch_inline: spec_gen waits for this gate; no interleaving).
1369
1557
  - id: review.ui_batch
1370
1558
  lane: enrich
1371
1559
  type: adopt
@@ -1379,6 +1567,21 @@ nodes:
1379
1567
  auto: "The UI conversion result was confirmed in auto mode."
1380
1568
  done: "The UI conversion result is confirmed."
1381
1569
  failed: "The UI conversion result is not confirmed yet: {reason}. The later join will not start until it is confirmed."
1570
+ # Capture contract gate: machine-checked, runs in auto mode too. human_review_gate.mjs also
1571
+ # invokes capture_audit.mjs; this action makes the dependency visible in the DAG and fails
1572
+ # before the human checkpoint is written. A blank frame or a single-viewport capture of a
1573
+ # scrolling page is not something "auto" may confirm.
1574
+ before_run:
1575
+ - run_capture_audit:
1576
+ script: "${SKILLS_ROOT}/a2h-batch-ui-align/scripts/capture_audit.mjs"
1577
+ runner: node
1578
+ args: "${UI_INFO_ROOT} --json ${UI_INFO_ROOT}/capture_audit.json"
1579
+ exit_0: "No hard evidence gap (a DEGRADED head = only partial scroll records / waivers: continue as usual and put the numbers into the user_facing sentence)"
1580
+ # The audit is deterministic and run_human_review_gate runs it again: the gaps go into the checkpoint
1581
+ # (ui_status=evidence_gaps) and the pipeline keeps going. Do not write the checkpoint here, do not take
1582
+ # on_upstream_failed, do not fail this node, and do not hard_stop.
1583
+ exit_1: "Hard evidence gaps: keep the gap list from stdout and run run_human_review_gate as usual (a confirmation records ui_status=evidence_gaps and the pipeline continues)"
1584
+ exit_2: "UI_INFO_ROOT missing / unreadable (ui.batch never reached capture): skip, leave it to run_human_review_gate or on_upstream_failed"
1382
1585
  gate_checkpoint: "${CHECKPOINT_DIR}/ui-batch-reviewed.ok"
1383
1586
  writes: { checkpoint: "${CHECKPOINT_DIR}/ui-batch-reviewed.ok" }
1384
1587
  actions:
@@ -1391,6 +1594,10 @@ nodes:
1391
1594
  # take the failure branch instead: same --checkpoint, plus --upstream-failed --reason "<failure reason / previous stderr>"
1392
1595
  # (under auto or when not in the allowlist also add --write-confirmed --confirmed-by auto). exit 2 must not directly fail this node.
1393
1596
  on_upstream_failed: "--gate ui_batch --hmos ${HMOS} --ui-info-root ${UI_INFO_ROOT} --checkpoint ${CHECKPOINT_DIR}/ui-batch-reviewed.ok --upstream-failed --reason <reason> [--write-confirmed --confirmed-by auto under the same condition as above]"
1597
+ # Hard capture_audit gaps (blank frame / faked scroll completion / missing file / missing pages.json rows)
1598
+ # change neither the exit code nor the flow: they are no upstream failure, so do not take on_upstream_failed
1599
+ # (auto would record a converted UI as ui_status=failed); a confirmation (auto or user) records
1600
+ # ui_status=evidence_gaps plus the capture_audit gap list, and the logic.finalize report lists them.
1394
1601
  success:
1395
1602
  - any:
1396
1603
  - file_exists: "${CHECKPOINT_DIR}/ui-batch-reviewed.ok"
@@ -1409,6 +1616,15 @@ nodes:
1409
1616
  `drop UI, continue` -> run once more with `--write-confirmed --confirmed-by user`; the checkpoint records ui_status=failed and the pipeline continues;
1410
1617
  `rerun` -> first set REUSE_UI_BATCH=false, go back to ui.batch (the skill resumes from the checkpoint in batch_progress.json).
1411
1618
  auto / not in the allowlist: go straight to --write-confirmed --confirmed-by auto without waiting.
1619
+ ── Capture evidence audit has hard gaps ──
1620
+ No hard_stop, no on_upstream_failed. The script prints a [WARN] gap list on stderr, and the interactive review screen gets a "Capture evidence gaps" section.
1621
+ auto / not in the allowlist: --write-confirmed --confirmed-by auto as usual; the checkpoint records ui_status=evidence_gaps (neither ok nor failed),
1622
+ the pipeline continues and the final report lists the gaps. interactive: give the gap list to the user; `confirm` also records evidence_gaps;
1623
+ `rerun` recaptures first, with these fix steps:
1624
+ faked / missing scroll record -> capture_fast.mjs (hybrid pages) or the explorer sweep fills the frames;
1625
+ blank frame -> capture_verify.mjs <ui_info> --write, then recapture, or demote the page to source-only;
1626
+ pages.json / manifest rows missing -> rerun build_conversion_set.mjs.
1627
+ Partial scroll records (truncated / not-swept / no-effect etc.) are only DEGRADED and are still recorded as ok.
1412
1628
 
1413
1629
  - id: enrich.module_docs
1414
1630
  lane: enrich
@@ -1544,6 +1760,10 @@ nodes:
1544
1760
  · `git -C ${HMOS} add -- build-profile.json5 && git -C ${HMOS} commit -m "signing config (app-migrate adopt.signing)"`;
1545
1761
  · build-profile.json5 already had the user's own uncommitted changes at step 0 -> do not commit on the user's behalf; this node still succeeds, and the report states
1546
1762
  "build-profile.json5 has uncommitted changes, which will stop W0 of the logic chain; please commit first".
1763
+ · add / commit fails (commonly: no git identity user.name / user.email; a hook refused) -> do not retry, do not change the git config for the user,
1764
+ do not add --no-verify / -c user.name=...; signing itself is in effect, so return { "ok": false, "note": "signing config not committed: <git output>" },
1765
+ recorded as a soft_continue failure (finalize lists it), and the report says "the signing change to build-profile.json5 is not committed: <git output>.
1766
+ Configure a git identity (git config user.name / user.email) and commit it in ${HMOS} by hand, otherwise W0 of the logic chain stops on the uncommitted change".
1547
1767
  This node only touches the signing config in build-profile.json5 (and the local exclude above), nothing else.
1548
1768
 
1549
1769
  - id: adopt.specs_json
@@ -1658,7 +1878,7 @@ nodes:
1658
1878
  recording the summary:
1659
1879
  { "ok": true, "specs_total": N, "specs_done": M, "specs_failed": K,
1660
1880
  "groups_total": G, "groups_done": Gd, "groups_failed": Gf,
1661
- "final_build": "SUCCESS|PARTIAL (taken from state.finalization.final_build, the same value as the pipeline's report template; only SUCCESS counts as a successful build)" }.
1881
+ "final_build": "SUCCESS|FAILED|SKIPPED (taken from state.finalization.final_build, the same value as the pipeline's report template; only SUCCESS counts as a successful build; SKIPPED only when this round had no new group and everything was carried)" }.
1662
1882
 
1663
1883
  - id: logic.finalize
1664
1884
  lane: finalize
@@ -1669,7 +1889,7 @@ nodes:
1669
1889
  announce: always
1670
1890
  name: Migration report
1671
1891
  doing: "Summarizing this round's migration results. The HarmonyOS project will be built once more if needed."
1672
- done: "The report for this round's migration is written: logic-convert-report.md in the workspace. The build verdict and whether UI conversion and the feature list have gaps are all in this report."
1892
+ done: "The report for this round's migration is written: logic-convert-report.md in the workspace. The build verdict, UI conversion and the feature list are all in this report."
1673
1893
  failed: "The wrap-up report was not finished: {reason}."
1674
1894
  invoke: |
1675
1895
  Present to the user per policy.user_facing: send user_facing.doing when starting, user_facing.done when written, user_facing.failed when it cannot be written.
@@ -1703,15 +1923,40 @@ nodes:
1703
1923
  ${DESIGN_DIR}/design_map.md, and each wave's
1704
1924
  ${HMOS}/.hometrans/wave_*/claim_audit.json (if present), written into ${LOGIC_REPORT} (what to read is in stage-map.md).
1705
1925
  3. Add a "UI conversion" section to the report: read ui_status /
1706
- page statistics / reason from ${CHECKPOINT_DIR}/ui-batch-reviewed.ok (when skipped write "No UI conversion this round"); list failed steps with their user_facing.name and failed copy
1926
+ page statistics / reason from ${CHECKPOINT_DIR}/ui-batch-reviewed.ok (when skipped write "No UI conversion this round"; when
1927
+ ui_status=evidence_gaps write "UI converted, but the capture evidence has gaps" and list capture_audit.gap_codes / gap_pages and the
1928
+ report path, never calling it a clean pass); list failed steps with their user_facing.name and failed copy
1707
1929
  (policy.failure_semantics; the ledger still holds node ids, which are replaced by names when writing for the user):
1708
1930
  node ${SKILLS_ROOT}/a2h-app-migrate/scripts/ledger.mjs --ledger ${LEDGER} --failures
1709
1931
  — the ledger is kept across runs; only records after the last run_start count.
1710
1932
  Also add a "Feature list" section (when ${PROFILE} == ui-only write only "This round only did the UI; no feature list was written"):
1711
- completeness / incomplete of ${SPEC_DIR}/specs.json (for incomplete-known list all of
1712
- areas / failedShards / unresolved / unresolvedReasonCodes; when the field is missing or complete write "nothing missing").
1713
- Publishing with holes must not be described as a complete page set; the gaps must go into the final report.
1714
- 4. Return only ok|fail and the report path.
1933
+ when ${SKIP_SPEC_GENERATE} == true (or the user supplied specs_json), regardless of whether ${SPEC_DIR}/specs.json exists,
1934
+ write "This round reused the externally supplied feature list (${SPECS_JSON}); it was not regenerated";
1935
+ otherwise, when ${SPEC_DIR}/specs.json is published, write "The feature list was generated: N specs";
1936
+ otherwise write "No feature list was generated or adopted this round".
1937
+ completeness / incomplete stay in specs.json and the ledger for downstream; do not write them into this report and do not describe the gaps;
1938
+ a with-holes publish must not be described as a complete page set.
1939
+ The one exception: an incremental run's "Incremental scope" section (end of step 4) still lists "scope pages no spec was generated for"
1940
+ (from incomplete.scopeUnmatched / scope.unmatched) — that is the outcome of the incremental scope (which scope pages were not migrated this round),
1941
+ not a SPEC quality gap; every other incomplete field still stays out of this report.
1942
+ 4. Write the project-level migration ledger (for every profile; on a resume PROFILE is already the original run's):
1943
+ First record the Android source each page was migrated from (page graph ${UTG_DIR}/utg.json, else ${UI_UTG_DIR}/utg.json; with neither, omit --source-fp):
1944
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/source_fp.mjs --android ${ANDROID} --utg <page graph> --out ${WORK}/source_fp.json
1945
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/migration_manifest.mjs --hmos ${HMOS} --profile ${PROFILE}
1946
+ --specs-json ${SPECS_JSON} --ui-info ${UI_INFO_ROOT} --run-id <this round's ledger run_start time> --source-fp ${WORK}/source_fp.json
1947
+ It merges this round's UI / business-logic status per UTG page id into ${HOMETRANS_DIR}/migration_manifest.json
1948
+ (kept across runs; the next incremental run uses it to tell migrated pages from new ones). It only reads the leaves'
1949
+ progress files, skips the half whose file is missing and says so in JSON.skipped, and never fails this node
1950
+ (the ledger is bookkeeping, not a deliverable). End the report with one line: the ledger records JSON.pages_total pages.
1951
+ On an incremental run (${PROFILE} == incremental and ${SCOPE_JSON} non-empty) also add an "Incremental scope" section —
1952
+ this round's scope and how each feature ended, what was skipped, the suggested next scope — generated
1953
+ deterministically; paste its stdout into the report as is (run it after the ledger of step 4; do not rewrite it).
1954
+ The scope pages that got no SPEC, under "what was skipped", are an explicit exception to the "Feature list" rule of step 3
1955
+ (a scope outcome, not a quality gap): paste them, do not drop them:
1956
+ node ${SKILLS_ROOT}/a2h-app-migrate/scripts/scope_report.mjs --hmos ${HMOS} --scope-json ${SCOPE_JSON}
1957
+ --specs-json ${SPECS_JSON} --android ${ANDROID} --utg <the same page graph> --work ${WORK} --lang en
1958
+ It never fails this node; a missing input only drops its part.
1959
+ 5. Return only ok|fail and the report path.
1715
1960
 
1716
1961
  schedule_hint:
1717
1962
  # discover_par conditional parallelism and the scaffold_new serial fallback are in policy.parallel_rule; not repeated here.
@@ -1723,6 +1968,7 @@ schedule_hint:
1723
1968
  - discover.utg_static
1724
1969
  - review.arch
1725
1970
  - discover.utg_snapshot
1971
+ - discover.feature_scope
1726
1972
  # Actual order: ui.batch -> enrich.spec_gen. The parallel shape is only for the maximum-parallel race check.
1727
1973
  - parallel: [ui.batch, enrich.spec_gen]
1728
1974
  # Actual order follows needs / parallel_rule (module_docs comes after enrich.spec_gen).
@@ -1741,7 +1987,8 @@ fail_matrix:
1741
1987
  discover.utg_static: hard_stop
1742
1988
  review.arch: hard_stop # ui.batch / spec_gen must not start before the architecture is confirmed
1743
1989
  discover.utg_snapshot: hard_stop # without the snapshot spec_gen has no stable UTG input
1744
- enrich.spec_gen: hard_stop_unless_logic_skipped # default engine: only ok:false fails (publishing with holes is legal); page-specgen: any finalize gate failure is ok:false (no publishing with holes)
1990
+ discover.feature_scope: hard_stop # without a settled scope nothing is known to migrate; a scope that fails its check (scope_model.mjs check) also stops here
1991
+ enrich.spec_gen: hard_stop_unless_logic_skipped # only "no published SPEC at all" fails; a published run (delivered-partial / gate failure included) is adopted with holes, and the gaps go into specs.json incomplete (not the final report)
1745
1992
  review.spec_gen: hard_stop_unless_logic_skipped
1746
1993
  ui.batch: soft_continue
1747
1994
  review.ui_batch: hard_stop # must not enter barrier / logic before the UI gate is confirmed; UI failure goes --upstream-failed and does not trigger this entry