@buaa_smat/hometrans 26.0.2 → 26.0.3

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 (1053) hide show
  1. package/README.md +7 -6
  2. package/agents/code-reviewer.md +25 -138
  3. package/dist/cli/index.js +4 -1
  4. package/dist/cli/init.js +131 -26
  5. package/dist/cli/uninstall.js +5 -5
  6. package/dist/platform/language.js +77 -0
  7. package/env-requirements.json +30 -5
  8. package/i18n/FILE-NAMES.md +9 -0
  9. package/i18n/agents/code-reviewer.md +364 -0
  10. package/i18n/agents/model-render-worker.md +38 -0
  11. package/i18n/agents/specgen-worker.md +18 -0
  12. package/i18n/commands/hometrans.md +17 -0
  13. package/i18n/skills/a2h-app-migrate/SKILL.md +198 -0
  14. package/i18n/skills/a2h-app-migrate/references/config.example.json +28 -0
  15. package/i18n/skills/a2h-app-migrate/references/specs.example.json +19 -0
  16. package/i18n/skills/a2h-app-migrate/references/stage-map.md +50 -0
  17. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +1760 -0
  18. package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
  19. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1588 -0
  20. package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +657 -0
  21. package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +541 -0
  22. package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +131 -0
  23. package/i18n/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
  24. package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
  25. package/i18n/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
  26. package/i18n/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
  27. package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -0
  28. package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
  29. package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
  30. package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
  31. package/i18n/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
  32. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
  33. package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
  34. package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
  35. package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
  36. package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
  37. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
  38. package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
  39. package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
  40. package/i18n/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
  41. package/i18n/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
  42. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +171 -0
  43. package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
  44. package/i18n/skills/a2h-arch-generate/SKILL.md +375 -0
  45. package/i18n/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
  46. package/i18n/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
  47. package/i18n/skills/a2h-arch-generate/references/arkts-mvvm-v2.md +1407 -0
  48. package/i18n/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
  49. package/i18n/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
  50. package/i18n/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
  51. package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
  52. package/i18n/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
  53. package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
  54. package/i18n/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
  55. package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
  56. package/i18n/skills/a2h-arch-generate/references/source-baseline.md +93 -0
  57. package/i18n/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +360 -0
  58. package/i18n/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +798 -0
  59. package/i18n/skills/a2h-arch-generate/scripts/lib/contract_terms.mjs +40 -0
  60. package/i18n/skills/a2h-arch-generate/scripts/module_create/generate.mjs +639 -0
  61. package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
  62. package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
  63. package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
  64. package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
  65. package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
  66. package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
  67. package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1261 -0
  68. package/i18n/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
  69. package/i18n/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +851 -0
  70. package/i18n/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +982 -0
  71. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +9 -0
  72. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +192 -0
  73. package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +303 -0
  74. package/i18n/skills/a2h-arkts-logic-coder/scripts/design/move_spec_technical_reference.mjs +162 -0
  75. package/i18n/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +298 -0
  76. package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +587 -0
  77. package/i18n/skills/a2h-arkts-logic-coder/scripts/test_check_units.ts +149 -0
  78. package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
  79. package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
  80. package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
  81. package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
  82. package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
  83. package/i18n/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
  84. package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
  85. package/i18n/skills/a2h-batch-ui-align/SKILL.md +323 -0
  86. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +31 -0
  87. package/i18n/skills/a2h-batch-ui-align/references/cards/build.md +13 -0
  88. package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +17 -0
  89. package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +27 -0
  90. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +80 -0
  91. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +22 -0
  92. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +87 -0
  93. package/i18n/skills/a2h-batch-ui-align/references/cards/state-v1.md +29 -0
  94. package/i18n/skills/a2h-batch-ui-align/references/cards/state.md +14 -0
  95. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +57 -0
  96. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +29 -0
  97. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +705 -0
  98. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +417 -0
  99. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
  100. package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
  101. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2549 -0
  102. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +560 -0
  103. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +148 -0
  104. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +220 -0
  105. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +28 -0
  106. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +216 -0
  107. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +203 -0
  108. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +210 -0
  109. package/i18n/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +2005 -0
  110. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1748 -0
  111. package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
  112. package/i18n/skills/a2h-batch-ui-align/scripts/detect_paradigm.mjs +245 -0
  113. package/i18n/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
  114. package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1787 -0
  115. package/i18n/skills/a2h-batch-ui-align/scripts/gen_rule_docs.mjs +100 -0
  116. package/i18n/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
  117. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1836 -0
  118. package/i18n/skills/a2h-batch-ui-align/scripts/image_probe.mjs +405 -0
  119. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1406 -0
  120. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1226 -0
  121. package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +1220 -0
  122. package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +412 -0
  123. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/cli.ts +134 -0
  124. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +18 -0
  125. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +173 -0
  126. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +629 -0
  127. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +125 -0
  128. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +67 -0
  129. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/block_comment_break.ts +64 -0
  130. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +134 -0
  131. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_call_sites.ts +242 -0
  132. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +136 -0
  133. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/canvas.ts +255 -0
  134. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +109 -0
  135. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/column_shrink.ts +154 -0
  136. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +39 -0
  137. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/container_align.ts +140 -0
  138. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_root_builtin.ts +69 -0
  139. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_route.ts +114 -0
  140. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/fixed_size_safe_area.ts +103 -0
  141. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/format_string.ts +157 -0
  142. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
  143. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +115 -0
  144. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +551 -0
  145. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +138 -0
  146. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +374 -0
  147. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/offset_in_scroll.ts +163 -0
  148. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/orphan_component.ts +119 -0
  149. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
  150. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/page_reachability.ts +94 -0
  151. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/path_commands_vp.ts +50 -0
  152. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +80 -0
  153. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +137 -0
  154. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/r_template_string.ts +37 -0
  155. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/request_permission.ts +98 -0
  156. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/resource_as_string.ts +68 -0
  157. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +97 -0
  158. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/safe_area_clipping.ts +168 -0
  159. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -0
  160. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
  161. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sdk_api.ts +195 -0
  162. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shared_chrome.ts +73 -0
  163. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_blur.ts +95 -0
  164. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shell_content.ts +198 -0
  165. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/stack_occluding.ts +118 -0
  166. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_decorators.ts +73 -0
  167. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_name_shadows.ts +93 -0
  168. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/string_quote_leak.ts +73 -0
  169. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/surface_stroke.ts +50 -0
  170. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
  171. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/track_getter.ts +132 -0
  172. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +53 -0
  173. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +67 -0
  174. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
  175. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
  176. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
  177. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
  178. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
  179. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
  180. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
  181. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
  182. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
  183. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
  184. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +560 -0
  185. package/i18n/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +245 -0
  186. package/i18n/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
  187. package/i18n/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
  188. package/i18n/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
  189. package/i18n/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
  190. package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -0
  191. package/i18n/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
  192. package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +325 -0
  193. package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
  194. package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
  195. package/i18n/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
  196. package/i18n/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
  197. package/i18n/skills/a2h-batch-ui-align/scripts/text_color_diff.mjs +470 -0
  198. package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +59 -0
  199. package/i18n/skills/a2h-dashboard-render/SKILL.md +73 -0
  200. package/i18n/skills/a2h-dashboard-render/references/artifact-contract.jsonc +117 -0
  201. package/i18n/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
  202. package/i18n/skills/a2h-dashboard-render/references/dashboard-guide.md +91 -0
  203. package/i18n/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
  204. package/i18n/skills/a2h-dashboard-render/scripts/dashboard.mjs +3245 -0
  205. package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +2048 -0
  206. package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
  207. package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
  208. package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
  209. package/i18n/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
  210. package/i18n/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
  211. package/i18n/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
  212. package/i18n/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +154 -0
  213. package/i18n/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
  214. package/i18n/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
  215. package/i18n/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
  216. package/i18n/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
  217. package/i18n/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
  218. package/i18n/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
  219. package/i18n/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
  220. package/i18n/skills/a2h-fix-build-errors/SKILL.md +304 -0
  221. package/i18n/skills/a2h-fix-build-errors/references/arkts-strict-patterns.md +219 -0
  222. package/i18n/skills/a2h-fix-build-errors/references/rdb-entity-pattern.md +131 -0
  223. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +227 -0
  224. package/i18n/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
  225. package/i18n/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
  226. package/i18n/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
  227. package/i18n/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
  228. package/i18n/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
  229. package/i18n/skills/a2h-page-specgen/SKILL.md +136 -0
  230. package/i18n/skills/a2h-page-specgen/references/body-language.md +177 -0
  231. package/i18n/skills/a2h-page-specgen/references/gates.md +262 -0
  232. package/i18n/skills/a2h-page-specgen/references/page-inventory.md +173 -0
  233. package/i18n/skills/a2h-page-specgen/references/spec-template.md +207 -0
  234. package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
  235. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
  236. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +576 -0
  237. package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +138 -0
  238. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +262 -0
  239. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +176 -0
  240. package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +248 -0
  241. package/i18n/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
  242. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +506 -0
  243. package/i18n/skills/a2h-page-specgen/scripts/render.mjs +299 -0
  244. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +616 -0
  245. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +234 -0
  246. package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1166 -0
  247. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
  248. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +8 -0
  249. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +7 -0
  250. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +8 -0
  251. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
  252. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
  253. package/i18n/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
  254. package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
  255. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +271 -0
  256. package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
  257. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
  258. package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
  259. package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +83 -0
  260. package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
  261. package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
  262. package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
  263. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +77 -0
  264. package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +419 -0
  265. package/i18n/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
  266. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
  267. package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
  268. package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +511 -0
  269. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
  270. package/i18n/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
  271. package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
  272. package/i18n/skills/a2h-resource-convert/SKILL.md +367 -0
  273. package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +335 -0
  274. package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
  275. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +219 -0
  276. package/i18n/skills/a2h-resource-convert/references/resource-mapping-rules.md +493 -0
  277. package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
  278. package/i18n/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
  279. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +2532 -0
  280. package/i18n/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
  281. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +278 -0
  282. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +260 -0
  283. package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +163 -0
  284. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +44 -0
  285. package/i18n/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
  286. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +589 -0
  287. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +506 -0
  288. package/i18n/skills/a2h-spec-generate/SKILL.md +375 -0
  289. package/i18n/skills/a2h-spec-generate/references/batch-mode.md +215 -0
  290. package/i18n/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
  291. package/i18n/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
  292. package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +184 -0
  293. package/i18n/skills/a2h-spec-generate/references/input-formats.md +27 -0
  294. package/i18n/skills/a2h-spec-generate/references/library-evidence.md +3 -0
  295. package/i18n/skills/a2h-spec-generate/references/method-discipline.md +64 -0
  296. package/i18n/skills/a2h-spec-generate/references/optional-gates.json +45 -0
  297. package/i18n/skills/a2h-spec-generate/references/recall-guide.md +84 -0
  298. package/i18n/skills/a2h-spec-generate/references/recall-terse.md +3 -0
  299. package/i18n/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
  300. package/i18n/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
  301. package/i18n/skills/a2h-spec-generate/references/review-checklist.md +22 -0
  302. package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
  303. package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
  304. package/i18n/skills/a2h-spec-generate/references/spec-samples.md +65 -0
  305. package/i18n/skills/a2h-spec-generate/references/specs.schema.json +85 -0
  306. package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +145 -0
  307. package/i18n/skills/a2h-spec-generate/references/transfer-file.md +5 -0
  308. package/i18n/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
  309. package/i18n/skills/a2h-spec-generate/references/worker-rules.md +129 -0
  310. package/i18n/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +702 -0
  311. package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +515 -0
  312. package/i18n/skills/a2h-spec-generate/scripts/collect-specs.mjs +727 -0
  313. package/i18n/skills/a2h-spec-generate/scripts/feature-stem.mjs +151 -0
  314. package/i18n/skills/a2h-spec-generate/scripts/parse_requirements.ts +515 -0
  315. package/i18n/skills/a2h-spec-generate/scripts/prepare-facts.mjs +313 -0
  316. package/i18n/skills/a2h-spec-generate/scripts/publish-specs.mjs +354 -0
  317. package/i18n/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +669 -0
  318. package/i18n/skills/a2h-spec-generate/scripts/render-tasks.mjs +385 -0
  319. package/i18n/skills/a2h-spec-generate/scripts/report.mjs +136 -0
  320. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
  321. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
  322. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
  323. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
  324. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1265 -0
  325. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1057 -0
  326. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +565 -0
  327. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +544 -0
  328. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
  329. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +317 -0
  330. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +707 -0
  331. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +436 -0
  332. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +608 -0
  333. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +650 -0
  334. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +178 -0
  335. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
  336. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +912 -0
  337. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +279 -0
  338. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +163 -0
  339. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
  340. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +256 -0
  341. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
  342. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
  343. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
  344. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
  345. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
  346. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
  347. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +340 -0
  348. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1857 -0
  349. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +262 -0
  350. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +722 -0
  351. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
  352. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
  353. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
  354. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
  355. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
  356. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
  357. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
  358. package/i18n/skills/a2h-spec-generate/template/REQ.txt +22 -0
  359. package/i18n/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
  360. package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +847 -0
  361. package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +415 -0
  362. package/i18n/skills/a2h-spec-generate/test/collect-specs.test.mjs +808 -0
  363. package/i18n/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
  364. package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
  365. package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
  366. package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
  367. package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
  368. package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
  369. package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
  370. package/i18n/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
  371. package/i18n/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
  372. package/i18n/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
  373. package/i18n/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
  374. package/i18n/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
  375. package/i18n/skills/a2h-spec-generate/test/report.test.mjs +47 -0
  376. package/i18n/skills/a2h-utg-explorer/SKILL.md +120 -0
  377. package/i18n/skills/a2h-utg-explorer/references/architecture.md +279 -0
  378. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +918 -0
  379. package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +446 -0
  380. package/i18n/skills/a2h-utg-explorer/scripts/hint_check.mjs +147 -0
  381. package/i18n/skills/a2h-utg-explorer/scripts/hint_source.mjs +119 -0
  382. package/i18n/skills/a2h-utg-explorer/scripts/recover_b.mjs +550 -0
  383. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +380 -0
  384. package/i18n/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
  385. package/i18n/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
  386. package/i18n/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
  387. package/i18n/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
  388. package/i18n/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
  389. package/i18n/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
  390. package/i18n/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
  391. package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
  392. package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
  393. package/i18n/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
  394. package/i18n/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
  395. package/i18n/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
  396. package/i18n/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
  397. package/i18n/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
  398. package/i18n/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
  399. package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
  400. package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
  401. package/i18n/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
  402. package/i18n/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
  403. package/i18n/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
  404. package/i18n/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
  405. package/i18n/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
  406. package/i18n/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
  407. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1412 -0
  408. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +2037 -0
  409. package/i18n/skills/a2h-utg-static/SKILL.md +368 -0
  410. package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
  411. package/i18n/skills/a2h-utg-static/references/view-interactions.md +215 -0
  412. package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +2120 -0
  413. package/i18n/skills/a2h-utg-static/scripts/audit.mjs +268 -0
  414. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +609 -0
  415. package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +250 -0
  416. package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +374 -0
  417. package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
  418. package/i18n/skills/a2h-utg-static/scripts/fragment_nav.mjs +1137 -0
  419. package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
  420. package/i18n/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
  421. package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +913 -0
  422. package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +517 -0
  423. package/i18n/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
  424. package/i18n/skills/a2h-utg-static/scripts/static_prior.mjs +956 -0
  425. package/i18n/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
  426. package/i18n/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
  427. package/i18n/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
  428. package/i18n/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
  429. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +108 -0
  430. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +289 -0
  431. package/i18n/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
  432. package/i18n/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
  433. package/i18n/skills/a2h-utg-static/scripts/tests/test_fresh_branch_guard.mjs +49 -0
  434. package/i18n/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +136 -0
  435. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
  436. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
  437. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
  438. package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
  439. package/i18n/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
  440. package/i18n/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
  441. package/i18n/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
  442. package/i18n/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +368 -0
  443. package/i18n/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
  444. package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
  445. package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
  446. package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
  447. package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_off_path.mjs +67 -0
  448. package/i18n/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
  449. package/i18n/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
  450. package/i18n/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
  451. package/i18n/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
  452. package/i18n/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
  453. package/i18n/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
  454. package/i18n/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +61 -0
  455. package/i18n/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
  456. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_data_table.mjs +340 -0
  457. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_relative_url.mjs +125 -0
  458. package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
  459. package/i18n/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +340 -0
  460. package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1351 -0
  461. package/i18n/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
  462. package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
  463. package/package.json +13 -160
  464. package/platforms/deveco/agents/code-reviewer.frontmatter.md +1 -1
  465. package/platforms/opencode/agents/code-reviewer.frontmatter.md +1 -1
  466. package/skills/a2h-app-migrate/SKILL.md +17 -6
  467. package/skills/a2h-app-migrate/references/config.example.json +1 -0
  468. package/skills/a2h-app-migrate/references/stage-map.md +3 -1
  469. package/skills/a2h-app-migrate/references/workflow.yaml +138 -47
  470. package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +1 -2
  471. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +105 -39
  472. package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +7 -8
  473. package/skills/a2h-app-migrate/scripts/ledger.mjs +17 -5
  474. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +43 -7
  475. package/skills/a2h-app-migrate/scripts/run_dir.mjs +127 -41
  476. package/skills/a2h-app-migrate/scripts/spec_layout.mjs +2 -0
  477. package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +38 -0
  478. package/skills/a2h-app-migrate/test/test_android_index.mjs +131 -0
  479. package/skills/a2h-app-migrate/test/test_apk_preflight.mjs +63 -0
  480. package/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
  481. package/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
  482. package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
  483. package/skills/a2h-app-migrate/test/test_devecocli_docs_preflight.mjs +32 -0
  484. package/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
  485. package/skills/a2h-app-migrate/test/test_entry_guards.mjs +102 -0
  486. package/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -0
  487. package/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
  488. package/skills/a2h-app-migrate/test/test_gate_checkpoint.mjs +146 -0
  489. package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +68 -0
  490. package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +51 -0
  491. package/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
  492. package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +91 -0
  493. package/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
  494. package/skills/a2h-app-migrate/test/test_json_io.mjs +32 -0
  495. package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +111 -0
  496. package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +53 -0
  497. package/skills/a2h-app-migrate/test/test_parse_args.mjs +69 -0
  498. package/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
  499. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
  500. package/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
  501. package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
  502. package/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
  503. package/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
  504. package/skills/a2h-app-migrate/test/test_spec_engine_acceptance.mjs +94 -0
  505. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +147 -0
  506. package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
  507. package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
  508. package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +344 -0
  509. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
  510. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +53 -0
  511. package/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
  512. package/skills/a2h-app-migrate/test/test_uniapp_preflight.mjs +83 -0
  513. package/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
  514. package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +41 -0
  515. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +178 -0
  516. package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
  517. package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
  518. package/skills/a2h-arch-generate/SKILL.md +1 -1
  519. package/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
  520. package/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
  521. package/skills/a2h-arch-generate/references/homegraph-workflow.md +15 -6
  522. package/skills/a2h-arch-generate/references/module-evidence-subagent.md +2 -2
  523. package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
  524. package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +35 -46
  525. package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +33 -40
  526. package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +2 -3
  527. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/build.gradle +11 -0
  528. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/AndroidManifest.xml +12 -0
  529. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/MainActivity.kt +8 -0
  530. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/NotesStore.kt +17 -0
  531. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/build.gradle +3 -0
  532. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/settings.gradle +1 -0
  533. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/AppScope/app.json5 +8 -0
  534. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/build-profile.json5 +14 -0
  535. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/build-profile.json5 +7 -0
  536. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/oh-package.json5 +1 -0
  537. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/src/main/ets/utils/Format.ets +3 -0
  538. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/build-profile.json5 +7 -0
  539. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/oh-package.json5 +1 -0
  540. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/src/main/ets/pages/Home.ets +3 -0
  541. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/build-profile.json5 +7 -0
  542. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/oh-package.json5 +1 -0
  543. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/src/main/ets/engine/SyncEngine.ets +3 -0
  544. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/hvigorfile.ts +1 -0
  545. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/oh-package.json5 +1 -0
  546. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/build-profile.json5 +7 -0
  547. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/oh-package.json5 +9 -0
  548. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/src/main/ets/pages/Index.ets +7 -0
  549. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/App.vue +10 -0
  550. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/manifest.json +6 -0
  551. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages/index/index.vue +16 -0
  552. package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
  553. package/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
  554. package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1260 -0
  555. package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +191 -0
  556. package/skills/a2h-arch-generate/scripts/tests/test_console_encoding.mjs +52 -0
  557. package/skills/a2h-arch-generate/scripts/tests/test_git_root.mjs +34 -0
  558. package/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
  559. package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
  560. package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +2 -5
  561. package/skills/a2h-arkts-logic-coder/SKILL.md +21 -2
  562. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -0
  563. package/skills/a2h-arkts-logic-coder/references/code-generation.md +62 -0
  564. package/skills/a2h-arkts-logic-coder/references/spec-design.md +4 -0
  565. package/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +22 -25
  566. package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +583 -0
  567. package/skills/a2h-arkts-logic-coder/test/golden/inspect_happy.json +20 -0
  568. package/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
  569. package/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
  570. package/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
  571. package/skills/a2h-arkts-logic-coder/test/golden/resolve_cases.json +36 -0
  572. package/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
  573. package/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
  574. package/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
  575. package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
  576. package/skills/a2h-batch-ui-align/SKILL.md +6 -4
  577. package/skills/a2h-batch-ui-align/references/cards/geometry.md +1 -1
  578. package/skills/a2h-batch-ui-align/references/cards/resources.md +4 -0
  579. package/skills/a2h-batch-ui-align/references/cards/widgets.md +22 -3
  580. package/skills/a2h-batch-ui-align/references/checker-rules.md +66 -3
  581. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +45 -8
  582. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -5
  583. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +2 -2
  584. package/skills/a2h-batch-ui-align/references/step4-prepare.md +4 -2
  585. package/skills/a2h-batch-ui-align/references/step5-convert.md +7 -5
  586. package/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +6 -7
  587. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +84 -7
  588. package/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
  589. package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +229 -0
  590. package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1 -2
  591. package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +4 -5
  592. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +88 -26
  593. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +305 -12
  594. package/skills/a2h-batch-ui-align/scripts/image_probe.mjs +231 -54
  595. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +8 -9
  596. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +18 -5
  597. package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +103 -3
  598. package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +231 -0
  599. package/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +1 -5
  600. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +14 -8
  601. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
  602. package/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +3 -3
  603. package/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +2 -2
  604. package/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +84 -19
  605. package/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +11 -4
  606. package/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +2 -2
  607. package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
  608. package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +5 -5
  609. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +2 -2
  610. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +66 -2
  611. package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
  612. package/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +81 -8
  613. package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
  614. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
  615. package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +2 -3
  616. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +6 -0
  617. package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +217 -0
  618. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
  619. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +312 -0
  620. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
  621. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
  622. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_canvas_pct.test.mjs +312 -0
  623. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
  624. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
  625. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
  626. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
  627. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +235 -0
  628. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
  629. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
  630. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_safearea.test.mjs +742 -0
  631. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +91 -0
  632. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +86 -0
  633. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
  634. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +567 -0
  635. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +290 -0
  636. package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +74 -0
  637. package/skills/a2h-batch-ui-align/scripts/tests/detect_paradigm.test.mjs +260 -0
  638. package/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +244 -0
  639. package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +420 -0
  640. package/skills/a2h-batch-ui-align/scripts/tests/export_scroll_states.test.mjs +31 -0
  641. package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
  642. package/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
  643. package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +126 -0
  644. package/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
  645. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1628 -0
  646. package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +215 -0
  647. package/skills/a2h-batch-ui-align/scripts/tests/harmony_index.test.mjs +95 -0
  648. package/skills/a2h-batch-ui-align/scripts/tests/host_env.test.mjs +115 -0
  649. package/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
  650. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -0
  651. package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
  652. package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +325 -0
  653. package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +297 -0
  654. package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
  655. package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
  656. package/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
  657. package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
  658. package/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
  659. package/skills/a2h-dashboard-render/scripts/dashboard.mjs +12 -14
  660. package/skills/a2h-dashboard-render/scripts/device_capture.mjs +29 -30
  661. package/skills/a2h-dashboard-render/test/fixtures/page_capture/broken.xml +1 -0
  662. package/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
  663. package/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
  664. package/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
  665. package/skills/a2h-dashboard-render/test/fixtures/page_capture/nested_scroll.xml +1 -0
  666. package/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
  667. package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
  668. package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
  669. package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
  670. package/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +203 -0
  671. package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
  672. package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
  673. package/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
  674. package/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
  675. package/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
  676. package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
  677. package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
  678. package/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
  679. package/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
  680. package/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
  681. package/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
  682. package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
  683. package/skills/a2h-page-specgen/SKILL.md +136 -0
  684. package/skills/a2h-page-specgen/references/body-language.md +177 -0
  685. package/skills/a2h-page-specgen/references/evidence.md +70 -0
  686. package/skills/a2h-page-specgen/references/execution-model.md +255 -0
  687. package/skills/a2h-page-specgen/references/footprint-and-grouping.md +250 -0
  688. package/skills/a2h-page-specgen/references/gates.md +255 -0
  689. package/skills/a2h-page-specgen/references/page-inventory.md +173 -0
  690. package/skills/a2h-page-specgen/references/spec-template.md +207 -0
  691. package/skills/a2h-page-specgen/scripts/dispatch.mjs +209 -0
  692. package/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
  693. package/skills/a2h-page-specgen/scripts/finalize.mjs +422 -0
  694. package/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
  695. package/skills/a2h-page-specgen/scripts/gate.mjs +558 -0
  696. package/skills/a2h-page-specgen/scripts/interactions.mjs +137 -0
  697. package/skills/a2h-page-specgen/scripts/inventory.mjs +269 -0
  698. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +255 -0
  699. package/skills/a2h-page-specgen/scripts/lib/deps-source.mjs +399 -0
  700. package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +137 -0
  701. package/skills/a2h-page-specgen/scripts/lib/footprint-roles.mjs +278 -0
  702. package/skills/a2h-page-specgen/scripts/lib/fsx.mjs +79 -0
  703. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +175 -0
  704. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +355 -0
  705. package/skills/a2h-page-specgen/scripts/lib/prose.mjs +234 -0
  706. package/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
  707. package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +391 -0
  708. package/skills/a2h-page-specgen/scripts/lib/symbols.mjs +125 -0
  709. package/skills/a2h-page-specgen/scripts/lib/utg-io.mjs +110 -0
  710. package/skills/a2h-page-specgen/scripts/lib/waker-event-store.mjs +658 -0
  711. package/skills/a2h-page-specgen/scripts/prepare.mjs +492 -0
  712. package/skills/a2h-page-specgen/scripts/render.mjs +317 -0
  713. package/skills/a2h-page-specgen/scripts/report.mjs +7 -0
  714. package/skills/a2h-page-specgen/scripts/submission.mjs +532 -0
  715. package/skills/a2h-page-specgen/scripts/submit.mjs +79 -0
  716. package/skills/a2h-page-specgen/scripts/test/acceptance/README.md +77 -0
  717. package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +590 -0
  718. package/skills/a2h-page-specgen/scripts/test/acceptance/cases.example.json +57 -0
  719. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +207 -0
  720. package/skills/a2h-page-specgen/scripts/test/dispatch.test.mjs +258 -0
  721. package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1164 -0
  722. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
  723. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Api.kt +20 -0
  724. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/BothAnnotations.kt +28 -0
  725. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Cache.kt +7 -0
  726. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Comments.kt +26 -0
  727. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Mmkv.kt +7 -0
  728. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Models.kt +19 -0
  729. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Pair.kt +7 -0
  730. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Prefs.kt +9 -0
  731. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Room.kt +11 -0
  732. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Sample.kt +43 -0
  733. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Templates.kt +34 -0
  734. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Timeouts.kt +8 -0
  735. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/androidTest/Helper.kt +5 -0
  736. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/build.gradle.kts +16 -0
  737. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/en.js.txt +5 -0
  738. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +4 -0
  739. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/libs.versions.toml +14 -0
  740. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/package.json +10 -0
  741. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values/strings.xml +10 -0
  742. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +4 -0
  743. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-land/strings.xml +5 -0
  744. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-night/strings.xml +5 -0
  745. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-v21/strings.xml +4 -0
  746. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +4 -0
  747. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/test/Legacy.kt +4 -0
  748. package/skills/a2h-page-specgen/scripts/test/fixtures/facts/weather.proto +11 -0
  749. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/AppPreferences.kt +13 -0
  750. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/SettingsViewModel.kt +16 -0
  751. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-dao/src/UserDao.kt +28 -0
  752. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/base/strings.xml +6 -0
  753. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/fil/strings.xml +6 -0
  754. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/arrays.xml +25 -0
  755. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/strings.xml +10 -0
  756. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/xml/prefs.xml +27 -0
  757. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Api.java +19 -0
  758. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Datastore.kt +12 -0
  759. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Settings.java +13 -0
  760. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/forecast.js +14 -0
  761. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/store.js +14 -0
  762. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/BasePreferences.kt +13 -0
  763. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/Screen.kt +14 -0
  764. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/UiPreferences.kt +8 -0
  765. package/skills/a2h-page-specgen/scripts/test/fixtures/facts-retrofit/src/AuthAPI.kt +26 -0
  766. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/AndroidManifest.xml +20 -0
  767. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/feature/auth/navigation/ScreenRoute.kt +8 -0
  768. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/pages.json +19 -0
  769. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/components/Widget.vue +11 -0
  770. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/detail/detail.vue +14 -0
  771. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/index/index.vue +24 -0
  772. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/store/userStore.js +11 -0
  773. package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/uni_modules/uview-ui/components/u-thing.js +5 -0
  774. package/skills/a2h-page-specgen/scripts/test/fixtures/fp.mkdb.mjs +144 -0
  775. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +94 -0
  776. package/skills/a2h-page-specgen/scripts/test/fixtures/src/MainFragment.java +6 -0
  777. package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyListeners.java +12 -0
  778. package/skills/a2h-page-specgen/scripts/test/fixtures/src/PlainActivity.java +3 -0
  779. package/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
  780. package/skills/a2h-page-specgen/scripts/test/fixtures/utg/fold-chain/utg.json +12 -0
  781. package/skills/a2h-page-specgen/scripts/test/fixtures/utg/utg.json +34 -0
  782. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
  783. package/skills/a2h-page-specgen/scripts/test/footprint-roles.test.mjs +172 -0
  784. package/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
  785. package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
  786. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +222 -0
  787. package/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
  788. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
  789. package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
  790. package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +45 -0
  791. package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
  792. package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
  793. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +464 -0
  794. package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
  795. package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +120 -0
  796. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +68 -0
  797. package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +390 -0
  798. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +167 -0
  799. package/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
  800. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
  801. package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
  802. package/skills/a2h-page-specgen/scripts/test/render.test.mjs +503 -0
  803. package/skills/a2h-page-specgen/scripts/test/source-text.test.mjs +181 -0
  804. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
  805. package/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
  806. package/skills/a2h-page-specgen/scripts/test/waker-event-store.test.mjs +1365 -0
  807. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
  808. package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +1979 -0
  809. package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +313 -0
  810. package/skills/a2h-page-specgen/scripts/waker.mjs +1234 -0
  811. package/skills/a2h-page-specgen/scripts/watchdog.mjs +298 -0
  812. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +49 -51
  813. package/skills/a2h-resource-convert/scripts/tests/adaptive_icon.test.mjs +182 -0
  814. package/skills/a2h-resource-convert/scripts/tests/app_identity.test.mjs +206 -0
  815. package/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
  816. package/skills/a2h-spec-design-pipeline/SKILL.md +79 -78
  817. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +51 -12
  818. package/skills/a2h-spec-design-pipeline/references/execution-model.md +24 -6
  819. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +3 -2
  820. package/skills/a2h-spec-design-pipeline/references/initialization.md +15 -4
  821. package/skills/a2h-spec-design-pipeline/references/merge-queue.md +82 -41
  822. package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +61 -0
  823. package/skills/a2h-spec-design-pipeline/references/scripts.md +19 -10
  824. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +267 -0
  825. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +61 -8
  826. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +62 -13
  827. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +8 -0
  828. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +8 -0
  829. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +55 -0
  830. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +60 -0
  831. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/HttpExtraDataEmptyStringCheck.js +488 -0
  832. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +11 -0
  833. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +17 -0
  834. package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +12 -38
  835. package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +40 -5
  836. package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +18 -0
  837. package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +74 -0
  838. package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +1 -1
  839. package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +1 -1
  840. package/skills/a2h-spec-design-pipeline/scripts/dispatch/worktree.mjs +2 -2
  841. package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +128 -5
  842. package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +98 -35
  843. package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +218 -37
  844. package/skills/a2h-spec-design-pipeline/scripts/lib/shared_classes.ts +113 -0
  845. package/skills/a2h-spec-design-pipeline/scripts/lib/shared_docs.ts +202 -0
  846. package/skills/a2h-spec-design-pipeline/scripts/lib/wiring.ts +58 -0
  847. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +6 -7
  848. package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +3 -0
  849. package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +348 -0
  850. package/skills/a2h-spec-design-pipeline/scripts/scan_shared.ts +642 -0
  851. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +15 -5
  852. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +7 -2
  853. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +104 -1
  854. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +24 -0
  855. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +394 -0
  856. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +24 -1
  857. package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +14 -0
  858. package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +163 -5
  859. package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +15 -7
  860. package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +14 -0
  861. package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +350 -0
  862. package/skills/a2h-spec-design-pipeline/scripts/test_scan_shared.ts +996 -0
  863. package/skills/a2h-spec-design-pipeline/scripts/test_shared_classes.ts +80 -0
  864. package/skills/a2h-spec-design-pipeline/scripts/test_shared_docs.ts +205 -0
  865. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +121 -0
  866. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_e2e.ts +85 -0
  867. package/skills/a2h-spec-design-pipeline/scripts/test_validate_shared_manifest.ts +720 -0
  868. package/skills/a2h-spec-design-pipeline/scripts/test_wiring.ts +40 -0
  869. package/skills/a2h-spec-design-pipeline/scripts/validate_shared_manifest.ts +566 -0
  870. package/skills/a2h-spec-generate/SKILL.md +87 -21
  871. package/skills/a2h-spec-generate/references/batch-mode.md +78 -17
  872. package/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
  873. package/skills/a2h-spec-generate/references/fusion-task-contract.md +7 -0
  874. package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
  875. package/skills/a2h-spec-generate/references/synthesis-rules.md +4 -2
  876. package/skills/a2h-spec-generate/references/worker-rules.md +6 -3
  877. package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +4 -5
  878. package/skills/a2h-spec-generate/scripts/check_spec.ts +145 -14
  879. package/skills/a2h-spec-generate/scripts/collect-specs.mjs +261 -19
  880. package/skills/a2h-spec-generate/scripts/dispatch-watch.mjs +1168 -0
  881. package/skills/a2h-spec-generate/scripts/feature-stem.mjs +1 -2
  882. package/skills/a2h-spec-generate/scripts/publish-specs.mjs +1 -2
  883. package/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +1 -2
  884. package/skills/a2h-spec-generate/scripts/render-tasks.mjs +25 -46
  885. package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +26 -27
  886. package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +3 -6
  887. package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +31 -32
  888. package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +2 -3
  889. package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +15 -26
  890. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +102 -81
  891. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +39 -19
  892. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +12 -13
  893. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
  894. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +35 -196
  895. package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +3 -1
  896. package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +22 -96
  897. package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +3 -4
  898. package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +1 -1
  899. package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +74 -7
  900. package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +51 -7
  901. package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +42 -111
  902. package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +1 -20
  903. package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1 -2
  904. package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +3 -4
  905. package/skills/a2h-spec-generate/scripts/reqgen/test/control-fact-join.test.ts +50 -0
  906. package/skills/a2h-spec-generate/scripts/reqgen/test/control-name-uniapp.test.ts +75 -0
  907. package/skills/a2h-spec-generate/scripts/reqgen/test/cross-area-anchor.test.ts +256 -0
  908. package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
  909. package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/zip.ts +63 -0
  910. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +650 -0
  911. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
  912. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
  913. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
  914. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-seed.test.ts +195 -0
  915. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
  916. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +347 -0
  917. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1948 -0
  918. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-library-evidence.test.ts +239 -0
  919. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +277 -0
  920. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +844 -0
  921. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
  922. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
  923. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
  924. package/skills/a2h-spec-generate/scripts/reqgen/test/model-cli-blockers.test.ts +117 -0
  925. package/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
  926. package/skills/a2h-spec-generate/scripts/reqgen/test/model-seeds.test.ts +175 -0
  927. package/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
  928. package/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
  929. package/skills/a2h-spec-generate/scripts/reqgen/test/specgen-completeness.test.ts +286 -0
  930. package/skills/a2h-spec-generate/scripts/reqgen/test/stagem-stored-path.test.ts +25 -0
  931. package/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
  932. package/skills/a2h-spec-generate/scripts/reqgen/test/zip.test.ts +61 -0
  933. package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +879 -0
  934. package/skills/a2h-spec-generate/test/check-spec.test.ts +430 -0
  935. package/skills/a2h-spec-generate/test/collect-specs.test.mjs +811 -0
  936. package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
  937. package/skills/a2h-spec-generate/test/dispatch-watch.test.mjs +606 -0
  938. package/skills/a2h-spec-generate/test/ensure-index.test.mjs +230 -0
  939. package/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
  940. package/skills/a2h-spec-generate/test/fixtures/android/app/src/main/AndroidManifest.xml +3 -0
  941. package/skills/a2h-spec-generate/test/fixtures/android/build.gradle +3 -0
  942. package/skills/a2h-spec-generate/test/fixtures/android/settings.gradle +3 -0
  943. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/package.json +9 -0
  944. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/App.vue +8 -0
  945. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
  946. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
  947. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/main.ts +6 -0
  948. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/manifest.json +4 -0
  949. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
  950. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
  951. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
  952. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
  953. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/services/items.ts +3 -0
  954. package/skills/a2h-spec-generate/test/fixtures/uniapp-src/tsconfig.json +8 -0
  955. package/skills/a2h-spec-generate/test/fixtures/unknown/README.txt +1 -0
  956. package/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
  957. package/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
  958. package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +182 -0
  959. package/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
  960. package/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
  961. package/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
  962. package/skills/a2h-spec-generate/test/report.test.mjs +47 -0
  963. package/skills/a2h-utg-explorer/references/architecture.md +4 -0
  964. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +64 -80
  965. package/skills/a2h-utg-explorer/scripts/hint_check.mjs +1 -2
  966. package/skills/a2h-utg-explorer/scripts/recover.mjs +1 -1
  967. package/skills/a2h-utg-explorer/scripts/rejudge.mjs +5 -3
  968. package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
  969. package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +244 -0
  970. package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
  971. package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
  972. package/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
  973. package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +104 -0
  974. package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +231 -0
  975. package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +160 -0
  976. package/skills/a2h-utg-explorer/scripts/tests/device_locale_identity.test.mjs +77 -0
  977. package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +187 -0
  978. package/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
  979. package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +137 -0
  980. package/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
  981. package/skills/a2h-utg-explorer/scripts/tests/first_round_phases.test.mjs +16 -0
  982. package/skills/a2h-utg-explorer/scripts/tests/fresh_state_plan.test.mjs +78 -0
  983. package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
  984. package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
  985. package/skills/a2h-utg-explorer/scripts/tests/holds_without_data_parity.test.mjs +26 -0
  986. package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
  987. package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
  988. package/skills/a2h-utg-explorer/scripts/tests/launch_failure.test.mjs +40 -0
  989. package/skills/a2h-utg-explorer/scripts/tests/node_coverage.test.mjs +193 -0
  990. package/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
  991. package/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
  992. package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
  993. package/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
  994. package/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
  995. package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
  996. package/skills/a2h-utg-explorer/scripts/tests/recover.test.mjs +212 -0
  997. package/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
  998. package/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
  999. package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +213 -0
  1000. package/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
  1001. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +454 -0
  1002. package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
  1003. package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
  1004. package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +336 -0
  1005. package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
  1006. package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +142 -0
  1007. package/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
  1008. package/skills/a2h-utg-explorer/scripts/tests/string_tables_twin_ties.test.mjs +83 -0
  1009. package/skills/a2h-utg-explorer/scripts/tests/tar_fixture.mjs +12 -0
  1010. package/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
  1011. package/skills/a2h-utg-explorer/scripts/tests/u2_backend.test.mjs +346 -0
  1012. package/skills/a2h-utg-explorer/scripts/tests/ui_state_anchors.test.mjs +112 -0
  1013. package/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
  1014. package/skills/a2h-utg-explorer/scripts/tests/worklist_parts.test.mjs +24 -0
  1015. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +13 -3
  1016. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +107 -65
  1017. package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +155 -0
  1018. package/skills/a2h-utg-static/scripts/assemble.mjs +28 -3
  1019. package/skills/a2h-utg-static/scripts/click_paths.mjs +19 -20
  1020. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +102 -2
  1021. package/skills/a2h-utg-static/scripts/fragment_nav.mjs +2 -3
  1022. package/skills/a2h-utg-static/scripts/nl_hints.mjs +2 -3
  1023. package/skills/a2h-utg-static/scripts/presenter_nav.mjs +1 -2
  1024. package/skills/a2h-utg-static/scripts/route_interceptor.mjs +21 -7
  1025. package/skills/a2h-utg-static/scripts/static_prior.mjs +26 -29
  1026. package/skills/a2h-utg-static/scripts/tests/test_activity_gates.mjs +84 -0
  1027. package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +38 -0
  1028. package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +29 -1
  1029. package/skills/a2h-app-migrate/scripts/i18n-term.d.mts +0 -5
  1030. package/skills/a2h-app-migrate/scripts/i18n-term.mjs +0 -54
  1031. package/skills/a2h-arch-generate/scripts/i18n-term.d.mts +0 -5
  1032. package/skills/a2h-arch-generate/scripts/i18n-term.mjs +0 -54
  1033. package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.d.mts +0 -5
  1034. package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.mjs +0 -54
  1035. package/skills/a2h-batch-ui-align/references/source-only-tier.md +0 -38
  1036. package/skills/a2h-batch-ui-align/scripts/i18n-term.d.mts +0 -5
  1037. package/skills/a2h-batch-ui-align/scripts/i18n-term.mjs +0 -54
  1038. package/skills/a2h-dashboard-render/scripts/i18n-term.d.mts +0 -5
  1039. package/skills/a2h-dashboard-render/scripts/i18n-term.mjs +0 -54
  1040. package/skills/a2h-resource-convert/scripts/i18n-term.d.mts +0 -5
  1041. package/skills/a2h-resource-convert/scripts/i18n-term.mjs +0 -54
  1042. package/skills/a2h-spec-design-pipeline/scripts/i18n-term.d.mts +0 -5
  1043. package/skills/a2h-spec-design-pipeline/scripts/i18n-term.mjs +0 -54
  1044. package/skills/a2h-spec-design-pipeline/scripts/test_i18n_term.ts +0 -70
  1045. package/skills/a2h-spec-generate/scripts/i18n-term.d.mts +0 -5
  1046. package/skills/a2h-spec-generate/scripts/i18n-term.mjs +0 -54
  1047. package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.d.mts +0 -5
  1048. package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.mjs +0 -54
  1049. package/skills/a2h-utg-explorer/scripts/i18n-term.d.mts +0 -5
  1050. package/skills/a2h-utg-explorer/scripts/i18n-term.mjs +0 -54
  1051. package/skills/a2h-utg-static/scripts/i18n-term.d.mts +0 -5
  1052. package/skills/a2h-utg-static/scripts/i18n-term.mjs +0 -54
  1053. package/skills/a2h-utg-static/scripts/tests/test_i18n_term.mjs +0 -155
@@ -0,0 +1,352 @@
1
+ import { test, afterEach } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import fs from "node:fs";
4
+ import os from "node:os";
5
+ import path from "node:path";
6
+
7
+ import {
8
+ DOCS,
9
+ RETRY_DELAYS_MS,
10
+ _impl,
11
+ _reset,
12
+ cleanOutput,
13
+ list2cmdline,
14
+ main,
15
+ matchEntry,
16
+ parseSearch,
17
+ } from "../scripts/state_doc.mjs";
18
+
19
+ const realRun = _impl.run;
20
+ const realWhich = _impl.which;
21
+ const realSleep = _impl.sleep;
22
+ const realCallTimeoutMs = _impl.callTimeoutMs;
23
+
24
+ afterEach(() => {
25
+ _impl.run = realRun;
26
+ _impl.which = realWhich;
27
+ _impl.sleep = realSleep;
28
+ _impl.callTimeoutMs = realCallTimeoutMs;
29
+ _reset();
30
+ });
31
+
32
+ function mockCli({ search = () => [], read = () => '# doc', version = '1.3.3' } = {}) {
33
+ _impl.which = () => 'devecocli';
34
+ _impl.sleep = async () => {};
35
+ _impl.run = async (_exe, args) => {
36
+ if (args[0] === '--version') return { status: 0, stdout: version, stderr: '' };
37
+ if (args[0] === 'docs' && args[1] === 'search') {
38
+ return { status: 0, stdout: JSON.stringify(search(args[2])), stderr: '' };
39
+ }
40
+ if (args[0] === 'docs' && args[1] === 'read') {
41
+ return { status: 0, stdout: read(args[2]), stderr: '' };
42
+ }
43
+ return { status: 1, stdout: '', stderr: `unexpected args: ${args.join(' ')}` };
44
+ };
45
+ }
46
+
47
+ function capture() {
48
+ const out = [];
49
+ const err = [];
50
+ return { io: { log: (s) => out.push(String(s)), err: (s) => err.push(String(s)) }, out, err };
51
+ }
52
+
53
+ test("parseSearch skips warning lines and returns document entries", () => {
54
+ const stdout = '[WARN] something\n[\n {"documentId": "a/b/c", "title": "C"}\n]\n';
55
+ assert.deepEqual(parseSearch(stdout), [{ documentId: "a/b/c", title: "C" }]);
56
+ });
57
+
58
+ test("parseSearch refuses output with no JSON array", () => {
59
+ assert.throws(() => parseSearch('no results here'), /unparseable devecocli docs search output/);
60
+ });
61
+
62
+ test("matchEntry can never return a page from the other paradigm", () => {
63
+ const v1 = DOCS['v1-track'];
64
+ const v2Only = [{ documentId: 'x/状态管理_V2/y/arkts-track', title: 'track' }];
65
+ assert.equal(matchEntry(v1, v2Only), null);
66
+ const both = [
67
+ ...v2Only,
68
+ { documentId: 'x/状态管理_V1/y/arkts-track', title: 'track' },
69
+ ];
70
+ assert.equal(matchEntry(v1, both).documentId, 'x/状态管理_V1/y/arkts-track');
71
+ });
72
+
73
+ test("matchEntry requires the key's under segment", () => {
74
+ const key = DOCS['v2-local'];
75
+ assert.equal(matchEntry(key, [{ documentId: 'x/状态管理_V1/y/arkts-new-local' }]), null);
76
+ assert.ok(matchEntry(key, [{ documentId: 'x/状态管理_V2/y/arkts-new-local' }]));
77
+ });
78
+
79
+ test("list prints every key with its paradigm", async () => {
80
+ const { io, out } = capture();
81
+ assert.equal(await main(['list'], io), 0);
82
+ assert.equal(out.length, Object.keys(DOCS).length);
83
+ assert.match(out[0], /\t(V1|V2|mix)\t/);
84
+ });
85
+
86
+ test("read resolves a key, prints the document and caches the id", async () => {
87
+ const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-'));
88
+ mockCli({
89
+ search: () => [{ documentId: 'guide/状态管理_V2/x/arkts-new-local', title: 'local' }],
90
+ read: (id) => `BODY ${id}`,
91
+ });
92
+ const { io, out } = capture();
93
+ assert.equal(await main(['read', 'v2-local', '--project', project], io), 0);
94
+ const text = out.join('\n');
95
+ assert.match(text, /state_doc key=v2-local paradigm=V2/);
96
+ assert.match(text, /BODY guide\/状态管理_V2\/x\/arkts-new-local/);
97
+
98
+ const cache = JSON.parse(fs.readFileSync(path.join(project, '.hometrans', 'work', 'state_docs.json'), 'utf8'));
99
+ assert.equal(cache.devecocli, '1.3.3');
100
+ assert.equal(cache.ids['v2-local'], 'guide/状态管理_V2/x/arkts-new-local');
101
+ });
102
+
103
+ test("read falls back to the other search source when the title query misses", async () => {
104
+ const seen = [];
105
+ mockCli({
106
+ search: (q) => {
107
+ seen.push(q);
108
+ return q === DOCS['v1-state'].slug
109
+ ? [{ documentId: 'guide/状态管理_V1/x/arkts-state' }]
110
+ : [{ documentId: 'guide/FAQ/arkts-state-faq' }];
111
+ },
112
+ });
113
+ const { io } = capture();
114
+ assert.equal(await main(['read', 'v1-state'], io), 0);
115
+ assert.deepEqual(seen, [DOCS['v1-state'].query, DOCS['v1-state'].slug]);
116
+ });
117
+
118
+ test("read of an unknown key exits 1 without touching devecocli", async () => {
119
+ let called = false;
120
+ _impl.which = () => { called = true; return 'devecocli'; };
121
+ _impl.run = async () => { called = true; return { status: 0, stdout: '', stderr: '' }; };
122
+ const { io, err } = capture();
123
+ assert.equal(await main(['read', 'nope'], io), 1);
124
+ assert.equal(called, false);
125
+ assert.match(err.join('\n'), /unknown key/);
126
+ });
127
+
128
+ test("read of a stale cached id re-resolves once", async () => {
129
+ const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-'));
130
+ fs.mkdirSync(path.join(project, '.hometrans', 'work'), { recursive: true });
131
+ fs.writeFileSync(
132
+ path.join(project, '.hometrans', 'work', 'state_docs.json'),
133
+ JSON.stringify({ devecocli: '1.3.3', ids: { 'v1-state': 'old/id' } }),
134
+ );
135
+ let reads = 0;
136
+ mockCli({
137
+ search: () => [{ documentId: 'guide/状态管理_V1/x/arkts-state' }],
138
+ read: (id) => {
139
+ reads++;
140
+ if (id === 'old/id') {
141
+ // devecocli's "Document not found" arrives on a failed call.
142
+ return undefined;
143
+ }
144
+ return `BODY ${id}`;
145
+ },
146
+ });
147
+ const real = _impl.run;
148
+ _impl.run = async (exe, args) => {
149
+ if (args[0] === 'docs' && args[1] === 'read' && args[2] === 'old/id') {
150
+ return { status: 1, stdout: '', stderr: 'Document not found: old/id' };
151
+ }
152
+ return real(exe, args);
153
+ };
154
+ const { io, out } = capture();
155
+ assert.equal(await main(['read', 'v1-state', '--project', project], io), 0);
156
+ assert.equal(reads, 1);
157
+ assert.match(out.join('\n'), /BODY guide\/状态管理_V1\/x\/arkts-state/);
158
+ });
159
+
160
+ test("check runs every key and reports unresolved ones", async () => {
161
+ mockCli({
162
+ search: (q) => (q.includes('@State') ? [] : [{ documentId: `guide/状态管理_V2/x/${q}` }]),
163
+ });
164
+ const { io, out } = capture();
165
+ assert.equal(await main(['check'], io), 1);
166
+ const report = JSON.parse(out.at(-1));
167
+ assert.equal(report.ok, false);
168
+ assert.ok(report.failed.some((f) => f.key === 'v1-state'));
169
+ });
170
+
171
+ test("cleanOutput removes ansi codes and update notices", () => {
172
+ assert.equal(cleanOutput('\x1b[31mred\x1b[0m\nNew cli version 9.9.9 available\nbody\n'), 'red\nbody');
173
+ });
174
+
175
+ test("list2cmdline quotes cmd.exe metacharacters", () => {
176
+ assert.equal(list2cmdline(['docs', 'read', 'a&b'], true), 'docs read "a&b"');
177
+ });
178
+
179
+ test("read retries the docs index lock, then succeeds", async () => {
180
+ let reads = 0;
181
+ const delays = [];
182
+ _impl.which = () => 'devecocli';
183
+ _impl.sleep = async (ms) => { delays.push(ms); };
184
+ _impl.run = async (_exe, args) => {
185
+ if (args[0] === '--version') return { status: 0, stdout: '1.3.3', stderr: '' };
186
+ if (args[1] === 'search') {
187
+ return { status: 0, stdout: JSON.stringify([{ documentId: 'guide/状态管理_V1/x/arkts-state' }]), stderr: '' };
188
+ }
189
+ if (args[1] === 'read') {
190
+ reads++;
191
+ return reads === 1
192
+ ? { status: 1, stdout: '', stderr: 'Lock file is already being held' }
193
+ : { status: 0, stdout: 'BODY', stderr: '' };
194
+ }
195
+ return { status: 1, stdout: '', stderr: 'unexpected' };
196
+ };
197
+ const { io } = capture();
198
+ assert.equal(await main(['read', 'v1-state'], io), 0);
199
+ assert.equal(reads, 2);
200
+ assert.deepEqual(delays, [RETRY_DELAYS_MS[0]]);
201
+ });
202
+
203
+ test("read gives up after the lock retry budget and exits 1", async () => {
204
+ let reads = 0;
205
+ const delays = [];
206
+ _impl.which = () => 'devecocli';
207
+ _impl.sleep = async (ms) => { delays.push(ms); };
208
+ _impl.run = async (_exe, args) => {
209
+ if (args[0] === '--version') return { status: 0, stdout: '1.3.3', stderr: '' };
210
+ if (args[1] === 'search') {
211
+ return { status: 0, stdout: JSON.stringify([{ documentId: 'guide/状态管理_V1/x/arkts-state' }]), stderr: '' };
212
+ }
213
+ if (args[1] === 'read') {
214
+ reads++;
215
+ return { status: 1, stdout: '', stderr: 'Lock file is already being held' };
216
+ }
217
+ return { status: 1, stdout: '', stderr: 'unexpected' };
218
+ };
219
+ const { io, err } = capture();
220
+ assert.equal(await main(['read', 'v1-state'], io), 1);
221
+ assert.equal(reads, RETRY_DELAYS_MS.length + 1);
222
+ assert.equal(delays.length, RETRY_DELAYS_MS.length);
223
+ assert.match(err.join('\n'), /Lock file is already being held/);
224
+ });
225
+
226
+ test("--project rejects a missing value and a non-existent directory", async () => {
227
+ const missingValue = capture();
228
+ assert.equal(await main(['read', 'v1-state', '--project'], missingValue.io), 2);
229
+ assert.match(missingValue.err.join('\n'), /--project needs a value/);
230
+
231
+ const missingDir = capture();
232
+ assert.equal(
233
+ await main(['read', 'v1-state', '--project', path.join(os.tmpdir(), 'no-such-state-doc-dir')], missingDir.io),
234
+ 2,
235
+ );
236
+ assert.match(missingDir.err.join('\n'), /not an existing directory/);
237
+ });
238
+
239
+ test("read retries a timed-out docs call, then succeeds", async () => {
240
+ let reads = 0;
241
+ const delays = [];
242
+ _impl.which = () => 'devecocli';
243
+ _impl.sleep = async (ms) => { delays.push(ms); };
244
+ _impl.run = async (_exe, args) => {
245
+ if (args[0] === '--version') return { status: 0, stdout: '1.3.3', stderr: '' };
246
+ if (args[1] === 'search') {
247
+ return { status: 0, stdout: JSON.stringify([{ documentId: 'guide/状态管理_V1/x/arkts-state' }]), stderr: '' };
248
+ }
249
+ if (args[1] === 'read') {
250
+ reads++;
251
+ if (reads === 1) {
252
+ const err = new Error('Command failed: timed out');
253
+ err.killed = true;
254
+ return { status: null, error: err, stdout: '', stderr: '' };
255
+ }
256
+ return { status: 0, stdout: 'BODY', stderr: '' };
257
+ }
258
+ return { status: 1, stdout: '', stderr: 'unexpected' };
259
+ };
260
+ const { io } = capture();
261
+ assert.equal(await main(['read', 'v1-state'], io), 0);
262
+ assert.equal(reads, 2);
263
+ assert.deepEqual(delays, [RETRY_DELAYS_MS[0]]);
264
+ });
265
+
266
+ test("a stale cache lock is reclaimed instead of disabling the cache", async () => {
267
+ const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-lock-'));
268
+ mockCli({
269
+ search: () => [{ documentId: 'guide/状态管理_V2/x/arkts-new-local' }],
270
+ read: () => 'BODY',
271
+ });
272
+ const lock = path.join(project, '.hometrans', 'work', 'state_docs.json.lock');
273
+ fs.mkdirSync(path.dirname(lock), { recursive: true });
274
+ fs.writeFileSync(lock, '');
275
+ const old = new Date(Date.now() - 60_000);
276
+ fs.utimesSync(lock, old, old);
277
+ const { io } = capture();
278
+ assert.equal(await main(['read', 'v2-local', '--project', project], io), 0);
279
+ assert.equal(fs.existsSync(lock), false);
280
+ assert.ok(fs.existsSync(path.join(project, '.hometrans', 'work', 'state_docs.json')));
281
+ });
282
+
283
+ test("a stale cache lock directory is reclaimed, not spun on forever", async () => {
284
+ const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-lockdir-'));
285
+ mockCli({
286
+ search: () => [{ documentId: 'guide/状态管理_V2/x/arkts-new-local' }],
287
+ read: () => 'BODY',
288
+ });
289
+ const lock = path.join(project, '.hometrans', 'work', 'state_docs.json.lock');
290
+ fs.mkdirSync(lock, { recursive: true });
291
+ const old = new Date(Date.now() - 60_000);
292
+ fs.utimesSync(lock, old, old);
293
+ const { io } = capture();
294
+ assert.equal(await main(['read', 'v2-local', '--project', project], io), 0);
295
+ assert.equal(fs.existsSync(lock), false);
296
+ assert.ok(fs.existsSync(path.join(project, '.hometrans', 'work', 'state_docs.json')));
297
+ });
298
+
299
+ test("read gives up after the separate timeout retry budget", async () => {
300
+ let reads = 0;
301
+ const delays = [];
302
+ _impl.which = () => 'devecocli';
303
+ _impl.sleep = async (ms) => { delays.push(ms); };
304
+ _impl.run = async (_exe, args) => {
305
+ if (args[0] === '--version') return { status: 0, stdout: '1.3.3', stderr: '' };
306
+ if (args[1] === 'search') {
307
+ return { status: 0, stdout: JSON.stringify([{ documentId: 'guide/状态管理_V1/x/arkts-state' }]), stderr: '' };
308
+ }
309
+ if (args[1] === 'read') {
310
+ reads++;
311
+ const err = new Error('Command failed: timed out');
312
+ err.killed = true;
313
+ return { status: null, error: err, stdout: '', stderr: '' };
314
+ }
315
+ return { status: 1, stdout: '', stderr: 'unexpected' };
316
+ };
317
+ const { io, err } = capture();
318
+ assert.equal(await main(['read', 'v1-state'], io), 1);
319
+ assert.equal(reads, 3);
320
+ assert.deepEqual(delays, [RETRY_DELAYS_MS[0], RETRY_DELAYS_MS[1]]);
321
+ assert.match(err.join('\n'), /timed out/);
322
+ });
323
+
324
+ test("run kills a hung child at the call timeout", async () => {
325
+ _impl.callTimeoutMs = 300;
326
+ const started = Date.now();
327
+ const r = await _impl.run(process.execPath, ['-e', 'setTimeout(() => {}, 10000)']);
328
+ assert.ok(Date.now() - started < 5000, 'the timeout must not wait for the child');
329
+ assert.equal(r.status, null);
330
+ assert.equal(r.error.killed, true);
331
+ assert.match(r.error.message, /timed out/);
332
+ });
333
+
334
+ test("list rejects an invalid --project instead of ignoring it", async () => {
335
+ const { io, err } = capture();
336
+ assert.equal(await main(['list', '--project', path.join(os.tmpdir(), 'no-such-state-doc-dir')], io), 2);
337
+ assert.match(err.join('\n'), /not an existing directory/);
338
+ });
339
+
340
+ test("the key table stays identical to the a2h-batch-ui-align copy", async (t) => {
341
+ let batch;
342
+ try {
343
+ // The translated tree ships the batch skill's docs table but not its helper modules, so this
344
+ // parity guard only runs in the source tree; skip rather than fail the English build.
345
+ batch = await import("../../a2h-batch-ui-align/scripts/state_doc.mjs");
346
+ } catch (e) {
347
+ if (e?.code !== 'ERR_MODULE_NOT_FOUND') throw e;
348
+ t.skip("a2h-batch-ui-align implementation modules are not present in this tree");
349
+ return;
350
+ }
351
+ assert.deepEqual(DOCS, batch.DOCS);
352
+ });
@@ -71,7 +71,7 @@ Extract from the user's message (natural language, no fixed format):
71
71
  | `pages` (optional) | A page subset the user listed explicitly | "1. .../page_0001_X" ... |
72
72
  | `android_index_ready` (optional) | `true` when the caller has just built and synced `android_project_dir`'s HomeGraph index and other agents read it concurrently (a2h-app-migrate does). Step 3.1 then skips `homegraph init` / `homegraph index` | — |
73
73
  | `reuse_static_workspace` (optional) | A finished static-UTG workspace from this run's `discover.utg_static`. When set, Step 3.1 may copy it into `.hometrans/utg_static` and skip the pipeline. Omit it whenever that discover step did not run | — |
74
- | `image_read` (optional) | `true` \| `false`: whether this host's sub-agents can read image files (a2h-app-migrate probes it at bootstrap and passes it). **When not passed, probe it** (below) before the first dispatch; never assume `true`, and never probe by opening an image in the parent | — |
74
+ | `image_read` (optional) | `true` \| `false`: whether this host's sub-agents can read image files. a2h-app-migrate may probe at bootstrap for a tip only and **must not** pass the result here — when called from migrate, **probe again** (below). Standalone callers may pass it; **when not passed, probe it** before the first dispatch; never assume `true`, and never probe by opening an image in the parent | — |
75
75
  | `MODE` | `full` \| `incremental`, per Mode Routing | existing Harmony version + a named page/module ⇒ `incremental` |
76
76
  | `scope_request` | **Incremental only, required.** The user's own words for the range | "短视频播放页", "短视频模块所有缺失页面" |
77
77
 
@@ -81,11 +81,13 @@ Then, once in the parent, resolve these and pass them to every later step and su
81
81
 
82
82
  - **`host_caps.json`**: `${harmony_project_dir}/.hometrans/work/host_caps.json` must hold `image_read` before the first dispatch (Step 2). `group_queue.mjs` reads it on every lease (Step 0.1 item 5a).
83
83
  - **Passed by the caller**: write `{"image_read": <true|false>}` as given.
84
- - **Not passed → probe it with one throwaway sub-agent, before any other dispatch** (resources, reviewers and groups all wait for it, so a text-only host never loses a real unit to its first PNG):
84
+ - **Not passed → probe it with one throwaway sub-agent, before any other dispatch** (resources, reviewers and groups all wait for it, so a text-only host never loses a real unit to its first PNG; do this even if a2h-app-migrate already probed at bootstrap — that tip is not this campaign's verdict):
85
85
  1. `node ./scripts/image_probe.mjs prepare --hp ${harmony_project_dir}` → one JSON line `{image, state, prompt}`.
86
86
  2. Dispatch **one** fresh sub-agent with `prompt` verbatim, and wait for its reply in the foreground (it takes seconds; no `bind`, never resumed or reused). **The parent never reads the probe image itself**: on a text-only host that breaks the parent's own session.
87
- 3. Write its reply verbatim to a file, then `node ./scripts/image_probe.mjs verify --hp ${harmony_project_dir} --reply-file <that file>`. If the sub-agent call errored (e.g. `messages.content.type` invalid), write the error text as the reply. Never put the reply on the command line: error texts are JSON with quotes, `$` and backticks that break shell quoting. The verdict is `true` only for the right 6 digits, and `verify --hp` writes it with its `probe_reason` to `host_caps.json`.
87
+ 3. Write its reply verbatim to a file, then `node ./scripts/image_probe.mjs verify --hp ${harmony_project_dir} --reply-file <that file> --cleanup`. Write the reply file inside the probe directory (`.hometrans/work/image_probe/`, the `image` path's directory) so `--cleanup` removes it with the directory. If the sub-agent call errored (e.g. `messages.content.type` invalid), write the error text as the reply. Never put the reply on the command line: error texts are JSON with quotes, `$` and backticks that break shell quoting. The verdict is `true` for the right 4 digits or a one-digit near match (OCR slip ≠ host dropped the image), and `verify --hp` writes it with its `probe_reason` to `host_caps.json`.
88
88
  4. Anything unexpected (the script exits non-zero, no sub-agent tool) → write `{"image_read": false}` and note why. Never fall back to `true`.
89
+ 4a. Always finish with `node ./scripts/image_probe.mjs cleanup --hp ${harmony_project_dir}`, whatever happened above (it does nothing when `--cleanup` already removed everything). If its `left` is not null, delete that directory with the shell; if that also fails, note the path for Step 7 and continue.
90
+ 5. If the verdict is `false`: tip the user once and **continue immediately** (no hard stop, no waiting) — this session cannot recognise images, so conversion will use view trees / measurements without screenshot visual comparison; to enable model screenshot recognition, switch to a multimodal model (Qwen3.8-Max, Kimi-K3, Opus-5 recommended), enable vision/image input, then **open a new session** and re-enter the original command. Do not tip the user to pass `image_read=`.
89
91
  Step 7 reports how `image_read` was decided (passed / probed + `probe_reason`).
90
92
  - **`ALL_MODULES`**: every module under `${harmony_project_dir}` with `src/main/ets` or `src/main/resources`.
91
93
  - **`PARADIGM = V1 | V2`**: run `node ./scripts/detect_paradigm.mjs ${harmony_project_dir}` and use its `paradigm` field as-is (rule: `./references/state-mgmt/_范式选择说明.md`). Do not grep decorators by hand: the DevEco scaffold `pages/Index.ets` (`@Component` + `@State message`) is not evidence of an existing V1 project, and the script ignores it, so a freshly created project correctly defaults to V2. It is project-level, so sub-agents must not re-detect it.
@@ -306,7 +308,7 @@ Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.m
306
308
  - **Uncaptured popups and menus** — attached `panel` nodes with no capture directory, such as a menu that only appears after a tap. Give each one's Harmony implementation (`bindMenu` / dialog). Any custom-drawn overlay must carry its `APPEARANCE-ESCALATED` ruling.
307
309
  - **No visual comparison (`image_read=false`)** — say how it was decided (passed by the caller, or the Step 1 probe and its `probe_reason`). This host's sub-agents could not read images, so no page was compared with its screenshots by eye; geometry, alignment and pull/transition visuals rest on view trees and measurements only. List every captured page, and name the items a reviewer should check on screen first (indicator positions, left/right alignment of buttons, deviations the reports noted).
308
310
  - **Captured but not converted** (full mode) — `export_manifest.json`'s `dynamic_only` count and `foreign_tree_captures`.
309
- - **Degraded items (`已降级`)** — icons that could not be sourced (Phase 4.3 L3), and transitions declared but not implemented (过渡实现证据). They may ship degraded, but not unmentioned.
311
+ - **Degraded items (`已降级`)** — icons that could not be sourced (Phase 4.3 L3), and transitions declared but not implemented (过渡实现证据). They may ship degraded, but not unmentioned: paste the output of `node <skill>/scripts/draw_coverage.mjs degraded ${harmony_project_dir}` (every such line of every group report, verbatim) instead of choosing items by hand.
310
312
  - **Pending fetch (`待拉取`)** — Phase 4.3 **L2.5-Remote** icons. Give the original web path, the absolute URL, the suggested media name, and what the page renders meanwhile. Keep this list separate from `已降级`: these need only a download, whereas an L3 needs new artwork.
311
313
  - **Unfixed `error`-severity resource-fidelity rows** — anything the Step 2 gate flagged that was accepted rather than repaired.
312
314
  - **Smoke-gate items** — every non-`PASS` verdict: unresolved `FAIL_*` (verdict + evidence path + fixes attempted), `SKIPPED_*` (the reason) and `DEPLOY_ERROR` (the gate's message and any instruction it carries).
@@ -76,5 +76,5 @@ measure_summary 的 `dialog panel` 行为准(不是带背景 inset 的 window
76
76
  | **「相对兄弟」的偏移写进 `Stack` 子节点** | 按 `Top_toBottomOf=@sibling` 算出「距兄弟底边 N」,结构却改成 `Stack` 兄弟(便于叠背景/做折叠) | `Stack` 里 margin 从容器顶算起,元素整体上移一个兄弟高度;插值到另一端点(常为负值)时与兄弟完全重叠(折叠后两行文字叠在一起),首帧往往看不出 | → Phase 4.2「硬性要求(坐标系)」原点一段:逐个写明原点,起止端点回代纵向区间 |
77
77
  | **二维约束拆成一维 `Row` 的三列** | ConstraintLayout 写在一个容器里,最顺手的译法是「左图标 / 中文字 / 右角标」 | 只占一角的元素在整个高度上吃掉宽度,单行标题折行、卡片变高 | → 约束布局转写表「二维约束」行;`RelativeContainer` 或 `Stack` + 角落对齐 |
78
78
  | 撑满容器承载底/右锚定,吞掉其下点击 | 既满足「不写死坐标」又视觉正确 | 其下可点击元素**点击无响应**,控制台亦无输出 | → Phase 5「交互可达性证据」:逐个确认撑满容器可交互或已设 `hitTestBehavior(HitTestMode.None)` |
79
- | **`padding` 语义反向**:把 Android 的「N dp 图标 + P dp padding」直译成 `.width(N).padding(P)` | Android 的 `padding` 在声明尺寸**之外**(总占位 N+2P),ArkUI 在**之内**。逐属性对照翻译时两边字面完全一致,最像"忠实" | 内容区被压成 `N-2P`(P≥N/2 时为 **0**)——元素**照常占位、完全不可见**。相邻元素位置全对,只有它消失;编译、`[GATE]`、资源引用检查全过 | 逐个列出同时带 `.width()/.height()` 与 `.padding()` 的元素,核对声明值**是否已包含** padding(Android 侧 `src` N dp + `padding` P dp ⇒ ArkUI 应写 `N+2P`)。`Image` + 圆形图标按钮这类"图标 + 内边距"样式是高发处 |
79
+ | **`padding` 语义反向**:把 Android 的「N dp 图标 + P dp padding」直译成 `.width(N).padding(P)` | Android 的 `padding` 在声明尺寸**之外**(总占位 N+2P),ArkUI 在**之内**。逐属性对照翻译时两边字面完全一致,最像"忠实" | 内容区被压成 `N-2P`(P≥N/2 时为 **0**)——元素**照常占位、完全不可见**。相邻元素位置全对,只有它消失;编译、`[GATE]`、资源引用检查全过 | 逐个列出同时带 `.width()/.height()` 与 `.padding()` 的元素,核对声明值**是否已包含** padding(Android 侧 `src` N dp + `padding` P dp ⇒ ArkUI 应写 `N+2P`)。`Image` + 圆形图标按钮这类"图标 + 内边距"样式是高发处。字面量尺寸且 padding ≥ 尺寸时由 GATE `padding-consumes-fixed-size` 拦截;非字面量或部分压缩仍需人工核对 |
80
80
  | **`layout_weight` 译到自定义组件的 build() 根节点上** | Android 的 `layout_weight` 写在 View 自己身上,逐属性照译恰好落到组件内部根节点;调用处不链属性时它还真能生效 | 调用处一链属性(`.margin()`、`.onClick()` 都算),组件被套上 `__Common__` 节点,父 `Row`/`Column` 读不到权重:组件按内容收缩,**行尾留白** | 权重写在**调用处** `Cell({ … }).layoutWeight(1)`,**同时**内部根节点在父主轴上撑满(父 Row → `.width('100%')`);只移权重不撑满,背景仍按内容收缩。`@Builder` 内联展开,不受影响。GATE `layout-weight-on-component-root` |
@@ -5,6 +5,8 @@
5
5
 
6
6
  **字符串资源取值 —— `$r()` 不是字符串**:`$r('app.string.x')` 返回 `Resource` 对象(资源令牌),没有重写 `toString()`。Android `getString(R.string.x)` / Compose `stringResource(R.string.x)` 返回的是真 `String`,**不能**译成 `$r('app.string.x').toString()`、`String($r(…))`、模板插值或与字符串 `+` 拼接,这些写法都得到字面量 `"[object Object]"`,编译与运行都不报错。只展示时把 `Resource` 直接交给 `Text()` / `promptAction.showToast({ message })` 等(它们接受 `Resource`);带参数用 `$r('app.string.x', arg)`;必须拼接或在逻辑里用时,先取真字符串:`this.getUIContext().getHostContext()!.resourceManager.getStringSync($r('app.string.x').id[, arg])`(`getStringSync(resource)` 重载自 API 20 起废弃,传 `.id`)。ViewModel 没有 UIContext,由页面传入 context 或已取好的字符串。GATE `resource-as-string`。
7
7
 
8
+ **主题会变的颜色 —— 写成资源,不写死**:先读 `项目事实(外壳契约)` 的 Theme mechanism。`theme.mode` 不是 `static` 时(安卓有 `darkColorScheme` / `isSystemInDarkTheme` / night mode / `values-night`,或配色方案的 `primary` 取自变量),安卓主题会改变的每个颜色都用 `$r('app.color.<name>')`:浅色值进 `base/element/color.json`,深色值进 `dark/element/color.json`,名字相同,深色值引用安卓深色方案的 `文件:行号`(截图只有浅色,深色值不从截图取)。原因是 `ApplicationContext.setColorMode` 只切换资源限定词目录(官方《深色模式适配》),`'#FFFFFF'` 字符串和 `static readonly` 十六进制常量都不会跟着变。Compose 把调色板写在 Kotlin 常量里时,资源转换不会产出这些颜色,由本 skill 的颜色令牌层建立:令牌类成员返回 `$r(...)`,不返回十六进制串。`bindSheet` 显式传 `backgroundColor`(默认 `Color.White`)。运行时主题色(`hits_runtime` 非空)从一个可观测主题状态通过 getter 读取,UI 组只读取,持久化由逻辑阶段接上。两套方案取值相同的颜色可以保留字面量,上方写 `// THEME-FIXED: <两处方案行号>`。GATE `theme-color-literal` / `theme-sheet-background-default`。
9
+
8
10
  **颜色运算 —— 不手写混色函数**:Android 的 `ColorUtils.blendARGB` / `setAlphaComponent` / `Color.parseColor`,以及 Compose 的 `Color.copy(alpha = x)` / `Color(0x…).copy(alpha = …)` / `colorResource(…).copy(alpha = …)`,一律用本 skill 的 `assets/ColorUtils.ets`(`copy(alpha = x)` = `setAlphaComponent(c, x)`)。ArkUI 颜色串是 `#AARRGGBB`,**alpha 在前**;把 alpha 两位拼在 `#RRGGBB` **后面**得到的 `#RRGGBBAA` 合法、不报错,但会被读成另一种颜色(`'#000000' + '1A'` = `#0000001A` → alpha 00,全透明;`'#FFFFFF1A'` → 不透明黄)。GATE `color-alpha-appended`。工程里没有 `<module>/src/main/ets/common/ColorUtils.ets` 时**原样复制**过去,不改写、不另起一份。它已对 androidx 逐位测过(含 `(int)` 截断:`blend(#FFFFFF, #E5E5EA, .62)` = `#EEEEF1`,四舍五入会得 `#EFEFF2`)。输入全是固定 Palette 值的混色,优先**预计算成字面量常量**并在注释写出来源公式。EVIDENCE 里的「公式回代一致」必须是**跑出来的**输出(如 `node -e`),不接受心算。
9
11
 
10
12
  **图标来源分级 —— 逐个图标判定并在报告中标注级别**:
@@ -78,6 +80,8 @@
78
80
  | **`.fillColor()` 染 `stroke` 着色的 SVG** | SVG 按规则写成 `fill="none"`,染色按直觉用 `fillColor`,两边都对 | 颜色**完全不生效**(`renderMode(Template)` 也无效),常只在选中态显形 | → Phase 5「资源引用错用」染色通道子项:首选 `.supportSvg2(true)` + `.colorFilter(...)`;`Image(参数)` 追到调用点。GATE `fillcolor-on-stroke-svg` |
79
81
  | **`stringResource()` 译成 `$r(…).toString()`** | Android 取到的是 String,`.toString()` 看起来只是显式化 | `Resource` 无 `toString()`,界面显示 `[object Object]`,零报错 | 展示直接传 `Resource`;拼接用 `resourceManager.getStringSync($r(…).id)`;GATE `resource-as-string` |
80
82
  | **alpha 拼在颜色串末尾** | Compose `Color.copy(alpha = x)` 直觉译成 `'#RRGGBB' + hex(x)` | `#RRGGBBAA` 被按 `#AARRGGBB` 读:底色全透明或变色,零报错 | `setAlphaComponent()`(`assets/ColorUtils.ets`);GATE `color-alpha-appended` |
83
+ | **`.fillColor()` 染位图(png/webp/jpg)** | Android 对 `mipmap`/`drawable` 位图用 `tint`,直译成 `fillColor` | SDK:fillColor 仅对 SVG 图源生效,位图保持原色(如白色加号在浅色背景下看不见),零报错 | 改用 `.colorFilter(...)`(矩阵同上)或把 `<vector>` 转成 SVG;GATE `fillcolor-on-raster-media`(查所有限定目录,不只 base/) |
81
84
  | **凭记忆手写图标 SVG** | 图标是库编译的 `ImageVector`,`res/` 里没有 | 包围盒 path 被 `fillColor` 染成**实心色块** | → Phase 4.3 图标来源分级(拿不到素材就登记 `已降级`);GATE `fillcolor-on-full-viewport-path` |
85
+ | **主题色抄成十六进制常量** | 截图只有浅色,按「1:1 抄录」把 Compose 调色板写成 `static readonly '#…'` | 切到深色或换主题色后页面不变,只有显式读主题状态的少数组件变 | 读外壳契约 theme;令牌返回 `$r('app.color.*')` + base/dark 两份 color.json;GATE `theme-color-literal` |
82
86
  | **消费了内容画不出来的 media** | 只用 `ls media/` 确认"存在" | 残留 `?attr/...` → 白框;占位 SVG → 灰框 | → Phase 5「资源引用错用」;GATE `media-unresolved-theme-attr` / `media-placeholder-in-use` |
83
87
  | 手写颜色混合/拼接函数 | `blendARGB` 看着只是几行算术,EVIDENCE 心算「回代一致」就过了 | 算错的串(如 `'#FFEDF2EDF2F109'`)被 ArkUI **静默忽略**:背景透明、描边变黑,零报错 | → 4.3「颜色运算」:用 `assets/ColorUtils.ets` 或预计算字面量。GATE `color-literal-malformed`、CAND `color-built-at-runtime` |
@@ -1,6 +1,6 @@
1
1
  # 知识卡 — 框架复合控件与外观
2
2
 
3
- > 必读。Phase 4.3 的部件归属、外观替换、系统菜单;Phase 5「装饰重复检查」(A 档)的依据。
3
+ > 必读。Phase 4.3 的部件归属、外观替换、系统弹窗与菜单;Phase 5「装饰重复检查」(A 档)的依据。
4
4
  > 本卡由 `conversion-procedure.md` 拆出,规则原文不变;卡内提到的 Phase 编号指 `conversion-procedure.md` 的对应阶段。
5
5
 
6
6
  **框架复合控件的部件归属 —— 逐个判定,不要照抄 view tree**:
@@ -26,13 +26,32 @@
26
26
 
27
27
  **外观替换 —— 参照已捕获的外观不得自行「降级」**:框架控件(选择器、弹窗、开关、进度条……)若参照截图里的**图形结构**与目标 ArkUI 同名组件不同,第 2 问的结论只能是 (b2) 覆写或 (a) 自绘,或标 `需上报`;**不得**写「ArkUI 无此形态,已降级为 X」了事。这与 Phase 5「过渡实现证据」的捕获态规则同理:截图拍到的外观本身就是验收目标。典型实例是 Android `TimePicker` / `TimePickerDialog` 默认表盘、`DatePicker` / `DatePickerDialog` 默认月历,而 ArkUI 同名组件都是滚轮(映射表「按模式映射」行;GATE `framework-picker-appearance`)。父流程接受差异时,在该行上方写 `// APPEARANCE-ESCALATED(<Widget>): <裁决出处>`,并在报告里登记 `需上报`。
28
28
 
29
- **系统菜单 —— PopupMenu 一律 `bindMenu`,不自绘**:Android `PopupMenu` / `ContextMenu`,以及锚定在按钮上的 `ListPopupWindow`,都是锚定触发控件、使用系统外观的菜单。ArkUI 的对应物是在**触发组件上**写 `.bindMenu(...)`(长按菜单用 `.bindContextMenu(...)`):纯文本菜单项用 `MenuElement[]`,保留系统菜单外观;带图标或分组时用 `@Builder` 返回 `Menu(){ MenuItem() }`。**禁止**用状态变量驱动的 overlay 自绘菜单:这样做时菜单宽度、圆角、分隔线、阴影、位置全都没有来源,也不会锚定按钮。菜单面板通常没有被采集(tap 后才出现),**没有截图的浮层一律优先用原生组件,不得自定尺寸**。机械兜底:GATE `popup-menu-not-bound`(需要 `--android`);父流程接受差异时用 `// APPEARANCE-ESCALATED(PopupMenu): <裁决出处>` 降为 CAND。
29
+ **系统弹窗与菜单 —— 锚定用原生机制,外观跟源主题走**:Android `PopupMenu` / `ContextMenu` / 锚定在按钮上的 `ListPopupWindow`、`AlertDialog.Builder` / `MaterialAlertDialogBuilder` 是框架控件,**外观由 Android 应用主题决定**,不是由「系统」决定;换到 ArkUI 后,「系统外观」就成了鸿蒙的外观。映射表写「直接映射」只说明 API 对得上,外观并不一致。
30
+
31
+ - **菜单**:锚定一律在**触发组件上**写 `.bindMenu(...)`(长按菜单用 `.bindContextMenu(...)`),**禁止**用状态变量驱动的 overlay 自绘(宽度、圆角、分隔线、阴影、位置都没有来源,也不锚定按钮;GATE `popup-menu-not-bound`)。外观上,参数传 `@Builder` 返回 `Menu(){ MenuItem() }`,按下面的优先级取值,**不传 `MenuElement[]`**,因为那样渲染的是鸿蒙系统菜单(GATE `popup-menu-default-look`)。
32
+ - **对话框**:不用 `showAlertDialog` / `AlertDialog.show` / `showActionSheet` 的默认外观(标题居中、按钮均分整行),按源主题画一个**共享对话框组件**(标题、正文、0–3 个文字按钮),用 `getUIContext().getPromptAction().openCustomDialog(ComponentContent)` 或 `CustomDialogController` 弹出(GATE `framework-dialog-appearance`)。先查 `harmony_index.md` / 已有 `components/`,已有就复用;没有时由本组在 `components/` 新建,并在报告里写明组件名,供后续组复用。
33
+ - **取值优先级**:① 该浮层的 capture(`measure_pack`:面板宽度占比、行高、文字内缩、前景/背景色);② 同一应用里**已采集**的同类浮层(别的页面的菜单/对话框,`模板页实测`);③ 下表按源主题给出的默认值(主题链读 application 模块 `src/main` 的 AndroidManifest `android:theme` → `res/values/` 的 `<style parent>`;检查器输出里会给出解析出的主题链。`values-v21/` / `values-night/` 把同一主题改成别的家族时,实际外观由设备决定,检查器只报 CAND 并给出两条链,以 capture 为准)。**三者都没有时不要套用鸿蒙默认值。**
34
+
35
+ | 源主题(parent 链) | AlertDialog | PopupMenu |
36
+ |---|---|---|
37
+ | `Theme.Material*`(framework,`android:style/Theme.Material.*`) | 圆角 2dp;左右 24dp;标题 20sp medium 靠起始边;正文 16sp 次要色;**无边框文字按钮**,全大写 14sp medium,`colorAccent`,靠结束边排列(确定在最右);无分隔线 | 圆角 2dp + 阴影;行高 48dp;16sp 文字、左右内缩 16dp;无分隔线;宽度随内容 |
38
+ | `Theme.AppCompat*` | 同上(圆角 2dp、按钮全大写、强调色、靠结束边) | 同上 |
39
+ | `Theme.MaterialComponents*` | 圆角 4dp;标题 20sp;正文 16sp;全大写 `colorPrimary` 文字按钮,靠结束边 | 圆角 4dp;行高 48dp;16sp;内缩 16dp |
40
+ | `Theme.Material3*` | 圆角 28dp;内边距 24dp;标题 24sp 靠起始边;正文 14sp `onSurfaceVariant`;**句首大写**(不转大写)`colorPrimary` 文字按钮,靠结束边 | 圆角 4dp;`surfaceContainer` 底;上下内边距 8dp;行高 48dp;16sp(BodyLarge);内缩 16dp |
41
+ | `Theme.Holo*` / `Theme.DeviceDefault*` / 无法识别 | 厂商外观,以 capture 为准;没有 capture 时标 `需上报` | 同左 |
42
+
43
+ 表中 Material3 / MaterialComponents 两行取自 MDC 源码(`theme/res/values/themes_base.xml` 及 `menu/`、`dialog/` 资源),Theme.Material / AppCompat 两行是 AOSP framework / AppCompat 默认值;有 capture 时一律以 `measure_pack` 为准。
44
+
45
+ **主题来源的已知局限**:检查器只读 `<application android:theme>`(SplashScreen 启动主题会沿 `postSplashScreenTheme` 找到真正的应用主题)。Activity 自己的 `android:theme`、以及 `AlertDialog.Builder(context, R.style.X)` / `MaterialAlertDialogBuilder(context, R.style.X)` 显式传入的对话框主题都**不会**被读到,这时报告里的主题链可能与实际不符:转换时先看该对话框/菜单所在 Activity 与构造参数,有显式主题就按它取值。
46
+
47
+ 二、三级浮层(菜单项打开的确认框、列表对话框)几乎都没有被采集:它们用**和同一应用一级浮层相同的主题**,因此取值按 ②/③,不要「没截图就用原生默认」。父流程接受差异时,在该行上方写 `// APPEARANCE-ESCALATED(PopupMenu|AlertDialog): <裁决出处>` 降为 CAND,并在报告里登记 `需上报`。
30
48
 
31
49
  ## 常见误译(编译期无法发现)
32
50
 
33
51
  | 误译 | 为什么会发生 | 后果 | 自查方法 |
34
52
  |---|---|---|---|
35
- | **`PopupMenu` 自绘成 overlay 面板** | 统一套用"浮层 = 状态驱动 overlay"的写法 | 菜单尺寸、圆角、分隔线、位置都是凭空设定,也不锚定按钮 | 触发组件上写 `.bindMenu(MenuElement[])`。GATE `popup-menu-not-bound` |
53
+ | **`PopupMenu` 自绘成 overlay 面板** | 统一套用"浮层 = 状态驱动 overlay"的写法 | 菜单尺寸、圆角、分隔线、位置都是凭空设定,也不锚定按钮 | 触发组件上写 `.bindMenu(this.xxxMenu)`(`@Builder` + `Menu/MenuItem`)。GATE `popup-menu-not-bound` |
54
+ | **`PopupMenu` / `AlertDialog` 用鸿蒙系统默认外观** | 映射表「直接映射」+「没截图的浮层优先用原生组件」 | 菜单圆角/宽度/字号、对话框标题对齐与按钮排布都换成了鸿蒙样式;二、三级弹窗没有 capture,全过 | 按「系统弹窗与菜单」的源主题表取值:菜单用 `@Builder Menu`,对话框用共享的源主题对话框组件。GATE `popup-menu-default-look` / `framework-dialog-appearance` |
36
55
  | **定宽定高的文字字形按钮**(`'•••'`、`'‹'`、`'×'`) | Android 同字号同盒宽放得下 | HarmonyOS 回退字体的 `•` 等符号更宽,无 `maxLines` 时折行,「•••」排成「⁘」 | 定宽 `Text` 加 `.maxLines(1)`,估算 CJK/符号按 1em;GATE `fixed-box-text-wraps` |
37
56
  | **框架选择器"同名直接映射"** | 映射表写着 `TimePicker → TimePicker` | Android 默认表盘/月历,ArkUI 是滚轮,整体外观不同 | 先判 Android 侧模式(`timePickerMode`/`datePickerMode`/主题),非 spinner 就按 Phase 4.3「外观替换」处理。GATE `framework-picker-appearance` |
38
57
  | **在原子组件之外重建它自带的装饰** | view tree 暴露了框架复合控件的内部件,逐个映射显得更「忠实」 | 同一视觉元素画两遍,多出的线/框常落在组件**外部** | → Phase 4.3「框架复合控件的部件归属」、Phase 5「装饰重复检查」 |
@@ -89,6 +89,15 @@
89
89
  - 修法: `main-axis-pct-siblings`(GATE:`Row`/`Column` 里 ≥2 个直接子节点在主轴上都是 `'100%'`,含 `@Builder` 根节点;只有 1 个且有其他兄弟时为 CAND)→ 改 `.layoutWeight(n)`
90
90
  - 降级标记: 无
91
91
 
92
+ ### padding-consumes-fixed-size
93
+
94
+ - 级别: GATE / CAND
95
+ - 需要: —
96
+ - 知识卡: `references/cards/geometry.md`
97
+ - 触发: 同一组件声明了字面量 `.width()`/`.height()`(或 `.size()`)与 `.padding()`,且某一轴两侧 padding 之和 ≥ 该轴(非 0)尺寸 —— 内容区为 0。
98
+ - 修法: ArkUI 的 width/height 已包含 padding(Android 的 padding 在声明尺寸之外)。Android「N dp 图标 + P dp padding」应写成外层容器 `N+2P` + 内层图标 `N`,或把尺寸写成 `N+2P` 再加 padding;`IconButton` 对应 48×48 容器 + 内部图标尺寸。确有依据时在 `.padding(` 行或组件上方写 `// PADDING-IN-SIZE: <依据>`,降为 CAND。
99
+ - 降级标记: `// PADDING-IN-SIZE: <依据>`
100
+
92
101
  ### path-commands-vp
93
102
 
94
103
  - 级别: GATE / CAND
@@ -226,6 +235,15 @@
226
235
  - 修法: `color-literal-malformed`(GATE)/ `color-built-at-runtime`(CAND):颜色串改成合法字面量或改用 `assets/ColorUtils.ets`;CAND 命中的拼接若是单纯补 `#` 前缀等安全形态,在报告里说明即可。
227
236
  - 降级标记: 无
228
237
 
238
+ ### framework-dialog-appearance
239
+
240
+ - 级别: GATE / CAND
241
+ - 需要: `--android`
242
+ - 知识卡: `references/cards/widgets.md`
243
+ - 触发: Android 源用 `AlertDialog.Builder` / `MaterialAlertDialogBuilder`,应用主题属 Material / AppCompat / MaterialComponents / Material3,引用该源文件的鸿蒙文件却用 `showAlertDialog` / `AlertDialog.show` / `promptAction.showDialog` / `showActionSheet` 的系统默认外观(主题为 Holo / DeviceDefault / 无法识别、或 `values-v*` / `values-night` 里同名主题换了家族时为 CAND)。
244
+ - 修法: 按 widgets 卡「系统弹窗与菜单 —— 外观跟源主题走」处理:复用(没有则新建)一个按源主题绘制的共享对话框组件,用 `openCustomDialog` / `CustomDialogController` 承载;父流程接受差异时用 `APPEARANCE-ESCALATED(AlertDialog)` 降为 CAND。
245
+ - 降级标记: `// APPEARANCE-ESCALATED(AlertDialog): <依据>`
246
+
229
247
  ### framework-picker-appearance
230
248
 
231
249
  - 级别: GATE / CAND
@@ -235,13 +253,22 @@
235
253
  - 修法: 按 Phase 4.3「外观替换」处理;父流程已接受差异时用 `APPEARANCE-ESCALATED` 标记降为 CAND。
236
254
  - 降级标记: `// APPEARANCE-ESCALATED(<Widget>): <依据>`
237
255
 
256
+ ### popup-menu-default-look
257
+
258
+ - 级别: GATE / CAND
259
+ - 需要: `--android`
260
+ - 知识卡: `references/cards/widgets.md`
261
+ - 触发: Android 源用 `PopupMenu(`,应用主题属 Material / AppCompat / MaterialComponents / Material3,引用该源文件的鸿蒙文件 `.bindMenu(...)` 传的是 `MenuElement[]`(数组字面量或非 @Builder 的成员),渲染为 ArkUI 系统菜单外观(主题无法识别时为 CAND)。
262
+ - 修法: 改成 `.bindMenu(this.xxxMenu)`,`@Builder xxxMenu() { Menu() { MenuItem(...) } }`,宽度、圆角、行高、字号、内缩、分隔线取 measure_pack 实测;菜单没被采集时按 widgets 卡的源主题表。父流程接受差异时用 `APPEARANCE-ESCALATED(PopupMenu)` 降为 CAND。
263
+ - 降级标记: `// APPEARANCE-ESCALATED(PopupMenu): <依据>`
264
+
238
265
  ### popup-menu-not-bound
239
266
 
240
267
  - 级别: GATE / CAND
241
268
  - 需要: `--android`
242
269
  - 知识卡: `references/cards/widgets.md`
243
270
  - 触发: Android 源文件里有 `PopupMenu(`,正文引用该源文件的鸿蒙文件里都没有 `.bindMenu()` / `.bindContextMenu()`。
244
- - 修法: 按 Phase 4.3「系统菜单」处理;降级标记同上,写作 `APPEARANCE-ESCALATED(PopupMenu)`。
271
+ - 修法: 按 Phase 4.3「系统弹窗与菜单」处理;降级标记同上,写作 `APPEARANCE-ESCALATED(PopupMenu)`。
245
272
  - 降级标记: `// APPEARANCE-ESCALATED(PopupMenu): <依据>`
246
273
 
247
274
  ### sheet-blur-under-opaque-bg
@@ -280,6 +307,24 @@
280
307
  - 修法: 回源码查同一分支里的 `setTextColor`;确实是默认色时,在上方写 `// TEXT-COLOR-DEFAULT: <依据>`。
281
308
  - 降级标记: `// TEXT-COLOR-DEFAULT: <依据>`
282
309
 
310
+ ### theme-color-literal
311
+
312
+ - 级别: GATE / CAND
313
+ - 需要: `shell-plan`
314
+ - 知识卡: `references/cards/resources.md`
315
+ - 触发: 外壳契约 theme.mode 不是 static(安卓有深色方案或运行时主题色)时,.ets 里出现 `'#…'` 颜色字面量,或颜色属性实参是 `Color.White` / `Color.Black` 等固定枚举。
316
+ - 修法: 改成 `$r('app.color.<name>')`,同名定义在 base 与 dark 两份 color.json(dark 值引安卓深色方案 / values-night 的行号),经 registry_requests 的 `color` / `dark_color` 提交;运行时主题色从可观测主题状态的 getter 读取。两套安卓方案里取值相同的颜色在上方写 `// THEME-FIXED: <两处方案行号>`(降为 CAND)。
317
+ - 降级标记: `// THEME-FIXED: <依据>`
318
+
319
+ ### theme-sheet-background-default
320
+
321
+ - 级别: GATE
322
+ - 需要: `shell-plan`
323
+ - 知识卡: `references/cards/resources.md`
324
+ - 触发: 外壳契约 theme.mode 不是 static 时,`bindSheet(` 的选项里没有 `backgroundColor`。
325
+ - 修法: SheetOptions.backgroundColor 默认 Color.White,深色模式下仍是白底:显式传 `backgroundColor: $r('app.color.<surface>')`。
326
+ - 降级标记: 无
327
+
283
328
  ### transition-pair-mismatch
284
329
 
285
330
  - 级别: GATE
@@ -318,6 +363,15 @@
318
363
  - 修法: - 读 SVG/资源文件内容的几条(需要 `--resources`)对应「资源引用错用」的各子项:`fillcolor-on-stroke-svg`、`fillcolor-on-full-viewport-path`、`media-unresolved-theme-attr` / `media-placeholder-in-use`、`media-duplicate-attribute`。它们正是"只跑 `ls media/` 确认名字存在"漏掉的那一类。
319
364
  - 降级标记: 无
320
365
 
366
+ ### fillcolor-on-raster-media
367
+
368
+ - 级别: GATE
369
+ - 需要: `--resources`
370
+ - 知识卡: `references/cards/resources.md`
371
+ - 触发: 被 `.fillColor()` 染色的 `app.media.*` 在任何资源限定目录下都只有位图(png/webp/jpg/bmp/gif),没有 SVG。
372
+ - 修法: SDK:fillColor「仅对SVG图源生效…如需对png图片进行修改颜色,可以使用colorFilter」。去掉 fillColor,改用 `.colorFilter(new ColorFilter([0,0,0,0,r, 0,0,0,0,g, 0,0,0,0,b, 0,0,0,1,0]))`(r/g/b 取 0~1,保留 alpha,= Android `tint` / `ColorFilter SRC_IN`);或把该图标从 Android `<vector>` 转成 SVG。
373
+ - 降级标记: 无
374
+
321
375
  ### fillcolor-on-stroke-svg
322
376
 
323
377
  - 级别: GATE
@@ -464,6 +518,15 @@
464
518
  - 修法: self-contained 调度的对话框/面板组件必须在 Step 5.5 由接线子代理被 import 并挂到触发器上(见 SKILL.md Step 5.5)。
465
519
  - 降级标记: 无
466
520
 
521
+ ### scroll-delta-as-offset
522
+
523
+ - 级别: GATE / CAND
524
+ - 需要: —
525
+ - 知识卡: `references/cards/dynamics.md`
526
+ - 触发: `onDidScroll` / `onScroll` / `onWillScroll` 回调把**当前帧滚动增量**参数直接赋给状态(GATE),或拿它与非 0 阈值比较(CAND)。
527
+ - 修法: 回调参数是本帧增量,不是累计位移。需要累计位移(折叠头部、顶栏渐隐、对应 Compose `firstVisibleItemScrollOffset` / View `getScrollY()`)时读 `this.scroller.currentOffset().yOffset`,或在状态上 `+=` 累加;只判断滚动方向时与 0 比较不受影响。确为增量语义时在回调或赋值语句上方写 `// SCROLL-DELTA: <依据>`,降为 CAND。
528
+ - 降级标记: `// SCROLL-DELTA: <依据>`
529
+
467
530
  ### shell-content-has-entry
468
531
 
469
532
  - 级别: GATE
@@ -601,8 +664,8 @@
601
664
  - 级别: GATE
602
665
  - 需要: —
603
666
  - 知识卡: `references/cards/build.md`
604
- - 触发: @Builder 的形参声明为 `() => void`,并在体内被裸调用 `x();`。
605
- - 修法: 改用 @BuilderParam 传入 @Builder 引用,或把该子内容内联展开
667
+ - 触发: @Builder 的形参声明为 `() => void`,并在 UI 语句层被裸调用 `x();`(Builder 体顶层、if/else 块、ForEach 等子项闭包内)。事件回调(`.onClick(() => { x(); })`)与对象字面量里的回调(`MenuElement.action`)在事件时执行,不算。
668
+ - 修法: 要传子内容:改用 @BuilderParam 传入 @Builder 引用,或把该子内容内联展开。只是要点击行为:把调用挪进事件回调 `.onClick(() => { x(); })`。不要为过本规则把回调改成按 id 分发,那样改写容易把某个调用点映射到别的行为上
606
669
  - 降级标记: 无
607
670
 
608
671
  ### entry-root-not-builtin