@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,120 @@
1
+ ---
2
+ name: a2h-utg-explorer
3
+ description: Build a state-aware Android UTG by compiling a static UTG into phased obligations, running deterministic or external explorers, and merging only evidence-backed observations and transitions. Use for maximum page/edge coverage across login, permission, empty/populated, network, and device states.
4
+ ---
5
+
6
+ # Android UTG Explorer
7
+
8
+ Use this skill after `a2h-utg-static` (or with an existing static `utg.json`). It is an orchestrator, not a page-specific crawler.
9
+
10
+ ## Run it end to end, without pausing
11
+
12
+ The first round and every recovery class (A → retry → B/C → adopt → D → direct launch → report) run as ONE uninterrupted cycle. Never stop between stages to ask the user whether to continue; stop only for a genuine blocker (an account, another build, hardware). Drive it with:
13
+
14
+ ```bash
15
+ node scripts/run_cycle.mjs <campaign> --config <config.json> --static <utg.json> \
16
+ --project <src> --package <app id> [--part-size 8] [--budget-per-task 6] [--max-rounds 2] [--skip D] [--later-rounds direct|all] [--review overlap|serial] [--retry-failed]
17
+ ```
18
+
19
+ Stdout JSON appears only when the call ends; follow a running call in `<campaign>/cycle_progress.jsonl` (one JSON line per stage start/end, device phase start/end with its result, and call start/end/failure).
20
+
21
+ All stages, D included, run by default without asking the user. D needs `config.snapshot_dir` (and, for recipes that add feeds or other served files, `fixture_server_dir`, with `scripts/d_prereqs.mjs serve <dir> --config <config.json>` running: it picks the port, writes `fixture_server_url` for the device, sets up `adb reverse` on a real device, and `d_prereqs.mjs check` / `release` confirm it is up and drop the reverse afterwards); the cycle takes the base snapshot itself with `d_prereqs.mjs snapshot` when the directory has none (a `.tar` via `run-as` for a debuggable build, otherwise a `.replay.json` step chain rebuilt by `pm clear` + replay; see architecture.md), and skips D with a recorded reason when `snapshot_dir` is unset. `--skip D` (or `direct`) is an opt-out: it marks that stage done without running it and lists it under `skipped` in the output, for a run where the user has asked not to change app data.
22
+
23
+ Each call advances as far as existing answers allow. It prints `waiting`: the worklist parts that still need answers, each with the `answers` path its reviewer must write. Reviews overlap (`--review overlap`, the default). Every stage of the round is extracted up front, so `waiting` lists the parts of **all** of them at once. The stages still apply and run on the device in order. `blocked_on` names the worklists the next stage needs. Then, immediately:
24
+
25
+ 1. Dispatch one parallel reviewer agent per waiting part not yet dispatched (all in one message), the parts of `blocked_on` first. Tell each to copy every item's `key` verbatim, to save its answers file (a list, or `{"items": [...]}`) incrementally every ~4 items, and to rely on component trees, opening at most one screenshot per item.
26
+ 2. **Watchdog**: a part with no answers file after ~15 minutes, or an agent that ended with a connection error, is re-dispatched (resume the agent, or a new one on the same part) without asking. Dropped connections are normal; plan for them.
27
+ 3. Re-run `run_cycle.mjs` as soon as the parts of the `blocked_on` worklists are in, while the other reviewers keep going. It merges, applies, runs the device phases and stops at the next stage that waits. Repeat until it prints `"finished": true`.
28
+ - A stage extracted before the earlier stages' device phases ran is re-extracted once its answers are in. Answers to items still offered are kept as `<x>_answers.seed.json`, and covered items are dropped. Only new items come back in `waiting`.
29
+ - A `waiting` entry with `error` holds answers that do not merge; fix those parts.
30
+
31
+ `--review serial` lists one stage at a time.
32
+
33
+ **Device watchdog.** Before every device phase the cycle runs `scripts/device_health.mjs ensure`. That is a bounded `adb shell echo`, and when the device does not answer it escalates: `adb reconnect`, then an adb server restart, then an emulator restart. Every step has a timeout.
34
+ - The emulator restart happens only when `config.emulator.avd` is set, or `config.emulator.auto_avd: true` (the AVD name is then read with `adb emu avd name`, and remembered per boot of the emulator while it is healthy, so a hung one can still be restarted and another AVD later booted on the same port never inherits the name): `emu kill`, a detached cold start (`-no-snapshot-load`) on the same port, then a wait for `sys.boot_completed` within `boot_timeout_s` (300). A real device is never restarted.
35
+ - A phase that died because the device went away runs once more after recovery.
36
+ - A device that never comes back ends the call with `DeviceDown`, and that phase is not marked done. Restart the cycle once the device is back.
37
+ - While another explorer holds the device lock, `ensure` skips every recovery step (reconnect, adb restart, emulator restart would break its run) and reports it busy. The call ends with `DeviceDown` the same way, and a scheduled restart between rounds is skipped and noted.
38
+ - A stage that runs past `UTG_STAGE_TIMEOUT_S` is killed. The cycle then kills what it left running (on Windows: `taskkill /T`, then its orphaned `adb shell` children) and removes the adb forwards it held.
39
+ - `config.emulator.restart_every_h` restarts the emulator between rounds before it degrades. Measured on AntennaPod 10-15: after 9 h the emulator stopped answering, and ~45 min passed before anyone noticed.
40
+
41
+ Never restart the emulator from a foreground shell yourself: `device_health.mjs ensure --config <config.json> [--restart]` does it within a bounded time.
42
+
43
+ **Answers carried across rounds.** At the end of a round, its direct-launch answers that schedule nothing (`skip` and the like) are kept with the item they answered. In the next round an unchanged item is merged from them and offered to no reviewer; `carried` in the cycle state counts them. A `launch` answer is reviewed again, because its node is still uncovered, so the launch failed. An item whose label, kind, `declared_at` or click path changed is reviewed again too. Measured on AntennaPod 10-15: round 2 re-reviewed all 78 items from scratch in 63 min.
44
+
45
+ Phase budgets are sized to their task counts (`--budget-per-task`), so a phase does not stop early and need a rerun. A phase's cleanup never counts against its budget. A device phase that still fails after the first round is recorded under `failed_phases` and skipped, and the rest of its stage runs. `MAX_PHASE_FAILS` (3) failures in a row still end the call. Its `error` keeps the first and last 300 characters. A device lock held by another explorer is waited for (`config.device_lock_wait_s`, default 300 s); one still held ends the call with `DeviceDown` naming the owner (`Another explorer owns this device: pid N, campaign <path>, since <time>`), and the phase is not marked done. Such a phase is never listed in `failed_phases`; a plain re-run of the cycle runs it. Never hand-edit `cycle_state.json`: after a device failure listed in `failed_phases` is fixed, `--retry-failed` runs those phases again at the start of the call, even when their stage is already done, then rebuilds the report. One that fails again is listed again. Every apply and phase is checkpointed in `cycle_state.json`, so a re-run after a crash never re-applies a stage or re-runs a finished phase.
46
+
47
+ The cycle repeats while a round still adds a covered node, up to `--max-rounds`:
48
+ - Round 1 runs A–D and direct launch.
49
+ - Later rounds run direct launch only (`--later-rounds direct`, the default), because a second A–D round has been measured as hours of review for a few captures. `--later-rounds all` repeats A–D in every round.
50
+
51
+ Every pass writes `<campaign>/capture_pending.json`. Its fields are `pending` (the static node ids the cycle can still capture), `reviews` (the answers files it waits on), `final` and `finished`. While a pass runs (`running: true`), `reviews` keeps the list the last finished pass computed (`reviews_at`). Before the last round's direct-launch answers, `pending` lists every uncovered in-scope node; after them, only the nodes answered `launch`. A consumer may treat any node not listed as final.
52
+
53
+ The steps below describe the individual stages that `run_cycle.mjs` runs.
54
+
55
+ 1. Create a campaign with `scripts/plan.mjs <static-utg> <campaign-dir> [--environment ...]`. Inspect the generated phase/state plan while writing config.json (fixtures and probes for each phase); this is not a stop to ask the user.
56
+ 2. Compile with `scripts/compile_tasks.mjs <static-utg> <campaign-dir> --project <source-project> --locale <device-locale>`. Adjacent click_paths/ui_elements files are loaded automatically.
57
+ Automatic/non-gesture and default-page steps require no selector; tap, long-press, double-tap and bounded screen-swipe steps compile to native actions. A static `trigger_id` compiles as a package-independent Android resource-name selector (the runtime adapter matches the tail of `package:id/name`), so campaigns remain valid across application-id/build variants.
58
+ A `code-name` label is never treated as live text: it must have an explicit NL hint, a real catalog label, or a structural `trigger_id`; otherwise the task is `needs_external` with a precise compile issue. Every `needs_external` task carries `compile_issues` explaining the exact missing evidence. Source-owned Preference rows and dialog titles form an automatic page catalog; no app-specific mapping table is needed for these surfaces.
59
+ Text selectors are emitted in the **device** locale: every static label is mapped through the project's `res/values*/strings.xml` (by its `label_key` when known, else by value) to the `--locale` value, with the original text kept as a fallback candidate — so a static pass that resolved labels in another language still taps the right control.
60
+ Pages that inflate the same layout (`layout-twin`) are resolved by their static opener: if the screen before was verified as a page with an edge to exactly one twin, that twin is verified (`layout-twin-opener`); `rejudge`/`recover apply` re-apply this to recorded evidence.
61
+ Source recovery presses Back only when it can land on the task's source: the source must be a static ancestor of the current verified page (`opened_from`, a menu's owner, a panel's host), and the page must not be one where a Back has already left the app (learned from the event log, so it carries across phases and rounds); otherwise it relaunches directly. A fixture's `snapshot_app_data` / `save_replay` step whose archive already exists (written by an earlier run of the same phase) is kept and skipped, never overwritten.
62
+ 3. Configure device serial, package, launch_component, state probes and fixtures in `config.json`. Keep app data in campaign configuration. `page_rules[].family` may name a static node id; a unique positive rule then becomes auditable static mapping evidence. Unknown family ids remain dynamic-only. Never equate an incoming click label with the landing page; unresolved/ambiguous identity remains a gap.
63
+ 4. Run `node scripts/run_device.mjs <campaign-dir> --config <config.json> --phase <phase-id> --tasks --budget 50`. Device I/O defaults to the fast path (u2 backend via the bundled `assets/u2.jar`, persistent adb shell, stable-UI settle; no extra install, see architecture.md to opt out). Screenshots always come from `adb exec-out screencap -p`. Keep one device session serialized; every action captures before/after package, window, UI tree, screenshot, and outcome. UIAutomator dumps use bounded retry by default (`ui_dump_retries: 3`, configurable) and verify the remote file before pulling it; transient dump/pull/parse failures are classified separately. Use verified fixtures to enter each phase rather than carrying state between unrelated phases.
64
+ 5. Run `scripts/report.mjs <campaign-dir>` for a baseline audit, then perform the recovery cycle below for every unresolved obligation. Do not stop at the first report or treat a screenshot count as page coverage.
65
+ 6. Supplement remaining gaps with `scripts/variant.mjs <campaign-dir> <variant.json> --config <config.json>`: verified fixtures, selected targets, bounded discovery routes, and explicit cleanup. For generic discovery, opt in with `discovery.enabled`, finite depth/state/action bounds, and positive `allow_actions` rules; unlisted actions are denied unless `allow_unlisted_actions` is explicitly true. Discovered endpoints remain separate from confirmed static edges. External adapters must emit `utg-event/1`; replay imported discoveries before confirming edges.
66
+ 7. Run `scripts/report.mjs <campaign-dir> [--static <newer-utg.json>]` again after recovery and variants to export audit.json, gaps.json, runtime UTG, gallery (index.html), and merged `utg.final.json` / interactive `utg.html`. Compare the final mapped node/edge counts with the baseline and account for every remaining gap. Click nodes for state-specific viewport screenshots and component trees. Preserve every observation; deduplicate visible trees only for display, never stitch unrelated states. Full scroll coverage is claimed only per node, by a `scroll_sweep` whose outcome is `complete` (see "Scroll sweep" below). Newer static graphs retain the campaign snapshot and edge provenance.
67
+ 8. Budgets count every atomic action. Attempt exhaustion with unresolved obligations is `exhausted-with-gaps`, not full coverage. An orphan means a missing route, not a login requirement.
68
+
69
+ ## Required recovery cycle
70
+
71
+ Use the existing screenshots, UI trees, action history, static page ownership, source declarations, and click paths before collecting more screenshots. The agent reviews the generated worklists and writes the corresponding answer JSON itself; do not leave a worklist unanswered merely because its script calls the reviewer a model. Read [references/architecture.md](references/architecture.md) for answer schemas and validation rules. Record `cannot-tell` or `unreachable` with source evidence when the available evidence cannot support a rule or gesture. Never infer a landing page solely from the incoming click label.
72
+
73
+ 1. **A: recover page identity offline.** Run `node scripts/recover.mjs extract <campaign-dir> --static <static-utg> --project <source-project> --package <app-package>`. For each `recovery_worklist.json` item, inspect its example screenshots and trees, the page's source and layouts, and conflicting captures. Write `recovery_answers.json` using source-owned positive anchors and any needed negative anchors. A `modal_title` anchor matches source text only in a dialog's `alertTitle` or `dialog_title`, avoiding a same-text preference row or menu item. Run `node scripts/recover.mjs apply <campaign-dir> --static <static-utg> --project <source-project> --package <app-package>`, then `node scripts/report.mjs <campaign-dir>`. Inspect `recovery_report.json`: repair rejected answers where evidence permits; leave genuinely ambiguous captures unresolved. Applying accepted rules rejudges all observations and can recover downstream replay obligations without device input. Skip `apply` when the worklist is empty.
74
+ 2. **Retry newly recognized replay hops.** Run `node scripts/recover_b.mjs retry-identities <campaign-dir> --config <config.json>` after A. It places tasks whose failed replay capture now proves the expected page into `recA-*` phases without altering their gestures. Execute every phase in `recovery_a_retry_phases.txt` with `run_device.mjs --tasks`, then report. Do not train a new gesture for an identity failure already resolved by A. A retry that gets one hop further can fail there on identity again: re-extract A, answer the new items, apply and retry again (`run_cycle.mjs` does this up to `A_PASSES` = 3 times per round). Such failures belong to A, not to B.
75
+ 3. **B and C: recover actions.** After A retries, run `node scripts/recover_b.mjs extract <campaign-dir> --static <static-utg> --project <source-project>` and the same command with `--class C`. Review the failed-step screenshot/tree, static trigger, source window and available controls; write `recovery_b_answers.json` and `recovery_c_answers.json`. For each nonempty class, run `node scripts/recover_b.mjs apply <campaign-dir> --config <config.json> --class <B-or-C>` (substitute `B` or `C`). Execute every phase listed in its `recovery_b_phases.txt` or `recovery_c_phases.txt` with `node scripts/run_device.mjs <campaign-dir> --config <config.json> --phase <phase-id> --tasks --budget <bounded-budget>`. Then run `node scripts/recover_b.mjs adopt <campaign-dir>` and `node scripts/report.mjs <campaign-dir>`. Only device-confirmed steps become learned steps; a proposed gesture is not coverage.
76
+ 4. **D: recover data states.** Run `node scripts/recover_d.mjs extract <campaign-dir> --config <config.json>` after B/C verdicts. `recovery_d_worklist.json` holds keyed `items`: one per B/C item answered `unreachable`, and one per group of phases sharing the same `requires`, covering phases already `blocked` and still-`pending` phases that the config gives no fixture or probe. Large worklists split with `worklist_parts.mjs` like A–C. Answer each item by `key` with `verdict: "recipe"` (`tasks` default to the item's) or `verdict: "skipped"` and the reason; recipe ids and new fixture file names start with the item key. Write recipes only for states constructible with verified in-app steps and positive probes. When a recipe depends on background work with a network constraint (e.g. WorkManager requiring connectivity), verify that Android considers the device network `VALIDATED`; fixture-server reachability alone does not satisfy that constraint. Probe a source-backed completion signal, not text that also appears while the work is still pending. Probe texts must be on the target screen at rest: a sticky section title that only appears while scrolling, or a dialog's text, never matches after relaunch. When a recipe's steps run but its probe misses, the phase blocks `state-probe-failed` and `run_cycle.mjs` offers it back once as a `probe-revision` item carrying the screen's `visible_texts` and `screenshot`; answer `verdict: "revise"` with `probes` whose texts are all in `visible_texts` and tell the target state apart from the base one (apply rejects any other text), or `skipped` when that screen is not the wanted state. Run `node scripts/recover_d.mjs apply <campaign-dir> --config <config.json>`, execute the phases in `recovery_d_phases.txt`, then rerun the report. Record account, hardware, external-app, or build-flavor requirements that cannot be established in this environment as explicit limitations.
77
+ 5. If recovered identities expose new B/C candidates, or verified state fixtures expose new tasks, repeat the affected extraction and replay while evidence-backed candidates remain and the device budget permits. Finish with the final report and the remaining gap reasons. Do not force-match unresolved screenshots or count unsupported tasks as confirmed pages.
78
+
79
+ 6. **Direct launch for pages no route reached.** Run `node scripts/direct_launch.mjs extract <campaign> --static <static-utg> --project <source-project>`. It lists each uncovered page and the exported Activities with the intent extras their own source reads (for example a host's fragment-selector key, an item id or a mode flag). Answer `direct_launch_answers.json` with `launch` (component, extras from `reads_extras` with values taken from source, at most 5 class-B steps, the configured phase whose state the page needs, and the dispatching source line) or `skip`. Then run `direct_launch.mjs apply <campaign> --config <config.json>` and execute `direct_launch_phases.txt`. These tasks confirm the page's own capture only and write no edge mapping. The report lists pages confirmed only this way under `mapped_via_direct_launch`. Build flavors, accounts, hardware and source-dead branches cannot be launched; record them as `skip`. A host Activity whose own source reads no intent extra, and whose bare launch was already verified to show one of its child pages, is answered `skip` by `extract` itself (`auto_skipped` in the worklist, `auto: true` in `direct_launch_report.json`). A reviewer could only reach that verdict, since any key would be invented, so reviewing such an item is pure cost.
80
+
81
+ 7. **Promote recurring unmapped surfaces (Window-class gap, dynamic side).** After the final round — or whenever `export_ui_info` reports many unmapped dynamic observations — run `node scripts/promote_dynamic.mjs extract <campaign> --static <static-utg> [--min-cluster 3]`. It clusters the observations no static node claimed (mapped ones and probe/restore sweep frames excluded) by view signature and writes `dynamic_promote_worklist.json`: per cluster the sample screenshot, tree excerpt, activity, host hints (last mapped page before each observation) and widget ids. Answer `dynamic_promote_answers.json` (raw array): `real-surface` (label, host node, identity rule whose anchors appear in the tree AND cite project source, widget_ids) only when the cluster carries anchors no mapped page has; scroll frames / viewport variants / transient chain screens are `variant-of:<node>` or `duplicate-of:<node>`; system chrome (IME, system assistants, gesture hints) is `noise`. `promote_dynamic.mjs apply <campaign> --static <static-utg>` appends accepted surfaces as kind `window` nodes (provenance `dynamic-discovery`) plus host `open-overlay` edges to the static workspace's `nodes.jsonl`/`edges.jsonl` and `utg.json`; the next `export_ui_info` then maps their observations and `build_conversion_set` converts them (single host → overlay member of the host group). With `a2h-utg-static`'s `window_nav.mjs` (convention-bearing popups, static side) this closes the Window-class coverage gap: statics catch what source declares, promotion catches what actually rendered.
82
+
83
+ ## Evidence classes in the report
84
+
85
+ - **Mapped** (counted): a capture verified as the page by a source-owned anchor, including selected-tab captions (`tab "X"` / `"X" tab` hints), learned rules and source relations.
86
+ - **Mapped via direct launch** (counted as a page, no edge): see step 6.
87
+ - **Attested** (NOT counted, listed separately): either a `trigger-chain` (the edge's own trigger control was tapped on the exact source page, and the target's own layout ids newly appeared, with no strong anchor claiming another page), or a reviewer's `attest` verdict in recovery A when the screenshot clearly shows the page but no checkable rule can separate it from a twin. Never fold attested pages into the mapped total.
88
+
89
+ ## Runner vocabulary for twins and gestures
90
+
91
+ Selectors may scope twins that share id and text: `{"resource_name": "<button_id>", "within": {"resource_name": "<container_id>"}}` (descendant of exactly one container) or `{"text": "<label>", "index": 1}` (N-th match in reading order). Class B/C/D and direct-launch steps may use `drag` (`selector` → `to`, via `input draganddrop`) for ItemTouchHelper reordering, and `scroll` with `direction` `left`/`right` for horizontal strips. Selector search also scrolls horizontal containers once the vertical search fails. A launch whose UI is not ready is retried once (`launch_retries`).
92
+
93
+ ## Scoped campaigns (incremental)
94
+
95
+ `plan.mjs <utg.json> <campaign> --scope <scope.json | id,id,…>` limits a campaign to the listed static nodes plus the nodes living on them, transitively: `embedded_in` / `host_node`, else for a menu / ui-state / mode / panel the page its `…@<Host>` suffix names, else the source of its first inbound edge (`plan.mjs` `hostResolver`, the same rules as a2h-batch-ui-align `Graph.directHost`). The scope is stored as `campaign.json` `scope` (`scope_request` keeps the ids as given); unknown ids are refused. `--extend --scope` replaces it, `--scope ""` clears it, and `--extend` alone re-resolves `scope_request` over the newer static UTG (a scoped id it no longer has is a warning).
96
+
97
+ Every node outside the scope is settled, whatever the coverage mode:
98
+ - the runner skips a task whose target is outside (`task_skipped`, reason `target-out-of-scope`), and such a node is not a missing phase obligation. Routes to scoped pages still pass through the others;
99
+ - the A, B/C, D and direct-launch extracts keep only items naming an in-scope node (`coverage.mjs` `nodeFilter`); D offers no blocked phase without an in-scope task;
100
+ - `capture_pending.json` `pending` lists only uncovered scoped nodes;
101
+ - the scroll-sweep backlog skips mapped pages outside the scope, and launch-rooted `discovery` does not run;
102
+ - another round is started only on progress inside the scope (`audit.json` `mapped_scope_nodes`).
103
+
104
+ Review and device time therefore scale with the scope, not the app. No model key is involved.
105
+
106
+ ## Coverage mode (default: nodes)
107
+
108
+ The goal by default is pairing every static node with its own screenshot and component tree; edge verification is secondary. In node mode, the default, the runner skips any task whose target node already has a capture verified as that node, recording a `task_skipped` event, not a failure. Coverage grows during a phase, so a node first captured on a replay hop retires its own tasks. Relation-confirmed nodes (host/default-child) are not covered, because their own screen was never captured. `recover.mjs extract`, `recover_b.mjs extract` / `retry-identities` and `recover_d.mjs extract` likewise keep only items that can add an uncovered node.
109
+
110
+ **Scroll sweep (default on).** Whenever a page is verified at a safe point (a task's source page before its action, a confirmed target, a direct-launch target) and has not been swept, the runner scrolls its largest visible, app-owned, vertical scroll container (≥ `sweep_min_height_px`, default 200; an id-less container whose class is shared is selected by class plus reading-order `index`) downward, capturing each swipe, until two consecutive screens are identical (`complete`) or `max_sweep_scrolls` (default 20) frames are taken (`truncated`). It then scrolls back to the top. Leaving the page (different activity, window or package, or the container no longer resolving alone) ends the sweep as `aborted`. A page that could not be restored is marked dirty, and the next task relaunches instead of reusing it. Before discovery, pages mapped in the phase but never swept are reached through a compiled task of the phase and swept (`sweep-backlog`, else `unreached`). Each sweep writes one `scroll_sweep` event (frames in order, container, outcome, `also_covers` for child pages that resolved below the fold). Sweep actions use task id `sweep:<page>` and count against `max_campaign_actions`, not `max_tasks`. A sweep never fails a task. `final_utg.mjs` binds the frames to the swept page as `evidence.scroll`. Set `"scroll_sweep": false` to opt out.
111
+
112
+ For edge verification, set `"coverage_mode": "edges"` in config.json or pass `run_device.mjs --coverage edges`; the command line overrides config. Pass `--all-items` to the recovery extracts to keep items whose target is already covered.
113
+
114
+ Split large A/B/C worklists for parallel reviewers with `node scripts/worklist_parts.mjs split <worklist.json> --size 10`, then merge with `worklist_parts.mjs merge <worklist.json> [--seed <carried answers>]`. Merge refuses missing, duplicate or unknown keys. Review D as a single worklist. Run device phases in the foreground when host memory is short, because background shells can be reaped while the session is idle. Events carry `ts` (epoch seconds) for stage timing.
115
+
116
+ The trade-off is that edges whose target is already covered are not attempted, so a node-mode campaign verifies fewer edges. Node mode typically reaches almost the same nodes as edge mode with markedly fewer verified edges and about half the device time. Run an edge-mode pass (`--coverage edges`, `--all-items`) afterwards if edges are needed.
117
+
118
+ Read [references/protocol.md](references/protocol.md) for the event contract and state/phase model. `scripts/utg_explorer/adapters.mjs` provides ADB/UIAutomator and safe external-command adapters; it has no AutoGLM dependency.
119
+
120
+ Read [references/architecture.md](references/architecture.md) for implementation boundaries and runnable configuration. Import with `node scripts/evidence.mjs <campaign-dir> --events <events.jsonl>` or `--droidbot <output-dir> --environment <environment-id>`. Export is `utg.runtime.json`.
@@ -0,0 +1,279 @@
1
+ # Stateful Capture Architecture
2
+
3
+ ```mermaid
4
+ flowchart LR
5
+ S[Static UTG and original phased plan] --> P[plan.mjs assigns state obligations]
6
+ P --> F[Fixture setup and positive-probe verification]
7
+ F --> D[run_device.mjs bounded execution]
8
+ X[External explorer] --> E[evidence.mjs evidence import]
9
+ D --> E
10
+ E --> G[Runtime UTG]
11
+ G --> A[audit.mjs coverage gaps]
12
+ ```
13
+
14
+ Pages, states and environments are stored separately. Multiple guards belong to one precondition set; you cannot take only the first one. The plan reuses the static directory's `phase_plan_nodes.json` and keeps original hints such as BYPASS, but never uses them to declare a page unreachable.
15
+
16
+ ## Files and Responsibilities
17
+
18
+ |File|Responsibility|
19
+ |---|---|
20
+ |plan.mjs|Turns the static graph and the old plan into state phases, node/edge obligations and plan.md|
21
+ |compile_tasks.mjs|Reads click_paths/ui_elements and compiles every static edge into selectors, a replay path and guard constraints|
22
+ |utg_explorer/semantics.mjs|Automatically parses source Preference XML, localized strings and Activities; identifies a page uniquely by modal title or by a combination of the page's own widgets|
23
+ |utg_explorer/task_runner.mjs|Reuse after parent-page verification, bidirectional bounded scrolling, atomic action budget, task results and static mapping|
24
+ |report.mjs|Independently verifies evidence references, unique node/edge coverage, gap classification, offline screenshot gallery|
25
+ |variant.mjs|Clones state phases from gaps; configures setup actions, positive probes, supplementary routes and restore actions|
26
+ |final_utg.mjs + assets/final_viewer.html|Union of static versions, dynamic evidence attachment, offline node graph, multi-viewport screenshots and widget trees|
27
+ |run_device.mjs|Device mutex, fixtures, state probes, pre-action bookkeeping, before/after capture, bounded exit|
28
+ |utg_explorer/adapters.mjs|ADB/UIAutomator, optional android layout, external process protocol, DroidBot raw-state import|
29
+ |evidence.mjs|External event verification, duplicate-event elimination, runtime graph kept per environment and state|
30
+ |audit.mjs|Summary of observation counts, complete transitions and phase states|
31
+
32
+ ## Configuration Example
33
+
34
+ ```json
35
+ {
36
+ "serial": "emulator-5554",
37
+ "page_rules": [{"id":"home", "family":"home", "activity":"example.MainActivity", "all":[{"resource_id":"example:id/home"}]}],
38
+ "state_rules": [{"id":"authenticated", "activity":"example.MainActivity", "all":[{"resource_id":"example:id/account"}], "values":{"auth":"logged_in"}}],
39
+ "phase_probes": {"p0-fresh":[{"activity":"example.MainActivity"}]},
40
+ "fixtures": {},
41
+ "actions": {"p0-fresh":[{"type":"click","selector":{"resource_id":"example:id/settings"}}, {"type":"back"}]}
42
+ }
43
+ ```
44
+
45
+ **The three speedups below are enabled by default** (`DeviceAdapter.DEFAULTS`); fields of the same name in the campaign config take precedence. To restore the old behavior: `{"layout_backend": "uiautomator", "adb_persistent_shell": false, "settle_mode": "fixed"}`. The u2 server ships with the skill (`assets/u2.jar`, the u2.jar 0.4.0 from uiautomator2 3.7.0, MIT, see `assets/u2.LICENSE`), so nothing extra needs installing; if the server fails to start it reports `ui-dump-failed: u2 …`, classified as a transient device error.
46
+
47
+ `"layout_backend": "u2"`: the widget tree is served by a resident uiautomator2 server on the device (`utg_explorer/adapters.mjs` pushes `assets/u2.jar` to `/data/local/tmp`, starts it with `app_process`, and calls JSON-RPC `dumpWindowHierarchy` over `adb forward`; screenshots use `adb exec-out screencap -p` on every backend). It takes only the current active window, the same scope as `uiautomator dump`. Foreground Activity and input still go through adb. Measured on an emulator, each observation drops from about 2.6–2.9s to about 0.4s. It holds the device's single UiAutomation connection and stops automatically when the process exits; Fastbot or `uiautomator dump` cannot be used while it runs.
48
+
49
+ The other two (also on by default, each can be turned off independently):
50
+
51
+ - `"adb_persistent_shell": true`: all `_shell` commands (dumpsys, input, am) reuse one resident `adb shell`, cutting each command from about 160ms to about 15–20ms. Exit codes and stderr error reporting are unchanged; a disconnected or timed-out shell is reported as a retryable device error and reconnects automatically on the next call. `exec-out`/`exec-in`/`pull` still spawn their own processes.
52
+ - `"settle_mode": "stable"` (u2 backend only): instead of sleeping a fixed `settle_seconds` after an action, it polls the current window's widget tree and returns once two consecutive dumps are identical; `settle_seconds` remains the upper bound. `settle_min_seconds` (default 0.1) is the minimum wait and `settle_poll_seconds` (default 0.05) the poll interval. Animations that change the picture but not the widget tree (pure drawing, video) cannot be detected; raise `settle_min_seconds` when needed.
53
+
54
+ Measured (Anki home page, 10 steps alternating open-menu / back, `settle_seconds=0.8`, each step including before/after observations): adb 7.03s → u2 1.96s → plus persistent shell 1.37s → plus stable 0.84s, with identical judgments across all configurations.
55
+
56
+ The package name, resource-ids and fixtures here are per-campaign inputs and do not go into the generic scripts. Login credentials can reference environment variables through an input's `value_env` field; screenshots and layouts may themselves contain account content and should be stored in the test workspace.
57
+
58
+ `phase_probes` check the phase entry after the fixture; the `invariant_probes` of `--tasks` are checked before each task starts and do not reuse the entry probes by default. Anchors of the entry page such as a preview or the home title are unsuitable as phase-wide constraints; otherwise normal navigation would be treated as state drift. Foreground identification uses the full `dumpsys window` and falls back to the resumed Activity when there is no focus field.
59
+
60
+ `state_anchors`: in-page states (`ui-state` / `mode` nodes, such as a calendar's day/week/month/year or a query page's shuttle/event modes) do not take part in page identity; they are distinguished by anchors only on observations whose host page has already been determined: `{"<state node id>": {"all": [{"resource_name": "calendar_year_view"}], "none": [...]}}`, with the same selectors as `learned_rules`. A matching observation gets an extra mapping with `method: ui-state-anchor`, and the final UTG attaches the screenshot to the state node as well; if two states of the same host both match, neither counts. At runtime they are written into the campaign's `state_anchors` and reused by later compile / rejudge / report. Rules that recovery A learns for state nodes are likewise converted into state anchors and no longer compete with host rules for identity. Tabs themselves often lack `selected`, so anchors should use content widgets that appear only in that state.
61
+
62
+ `page_rules[].family` may use a static node ID directly. A runtime observation is mapped to a static node only when the rule contains an Activity or a positive widget anchor, matches globally uniquely, and the ID exists in the static catalog; temporary families in the config do not raise static coverage.
63
+ A static `host-activity` is navigation context rather than a standalone screenshot page: it is allowed as an edge source only when the runtime Activity exactly equals the static component, and the current Fragment's page identity is kept, so confirming a container edge does not wrongly overwrite the child page's mapping.
64
+
65
+ Generic bounded exploration is an explicit opt-in, for example:
66
+
67
+ ```json
68
+ {
69
+ "discovery": {
70
+ "p0-fresh": {
71
+ "enabled": true,
72
+ "max_depth": 3,
73
+ "max_states": 30,
74
+ "max_expansions": 60,
75
+ "max_actions_per_state": 8,
76
+ "allow_actions": [{"all": [{"resource_id": "example:id/navigation"}]}]
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ Without `allow_actions`, unlisted widgets are not clicked by default; only an explicit `allow_unlisted_actions:true` enumerates all unique, actionable widgets. Exploration results are kept as discovery evidence; only static tasks that replay successfully and pass page-identity verification can confirm static edges.
83
+
84
+ An external wrapper receives two file arguments, reads request.json and writes `{"events": [...]}` to response.json. Config example: `{"argv":["python","wrapper.py","{request}","{response}"],"timeout":120,"budget":100}`. Run `evidence.mjs <campaign> --external-config <config> --environment <id>`. Maestro/Appium/CDP and similar tools need a wrapper written for the tool version; no dedicated implementations for them ship today. DroidBot already has a raw states importer, which imports only observations that have screenshots and never fabricates click edges.
85
+
86
+ ## Practical Boundaries
87
+
88
+ The current implementation can compile static edges into bounded selector/replay tasks, skip non-gesture/default path steps, replay tap/long-press/double-tap/screen-swipe, perform limited scrolling over visible list items, and audit the before/after observations and action references of mappings; it still cannot guarantee that every source-code label has a runtime widget. Automatic state-fixture synthesis, SQLite concurrent transactions and generic snapshot restore are not implemented yet. Unresolvable labels go into `needs_external` with explicit `compile_issues`; failed tasks keep their evidence and are never claimed complete. Campaign saves use a unique temporary file in the same directory, atomic replace and bounded backoff to tolerate brief read locks on Windows.
89
+
90
+ By default it does not clear app data, make payments or guess logins. If a state probe fails, the phase stays blocked. ADB backup cannot serve as a generic restore mechanism on modern Android; reproducible states should use explicit fixtures or test-emulator snapshots and be re-verified after restore.
91
+
92
+ Runtime structural fingerprints may only be used for candidate deduplication; they do not prove two semantic pages are the same, and dynamic observations do not automatically increase static coverage. A successful action does not equal target-page confirmation either. The current audit only summarizes recorded facts and does not yet claim that all pages are covered.
93
+
94
+ `--tasks` uses the new task_runner. Every launch, back, scroll and click counts against the budget and leaves before/after evidence. The parent page must re-match its source signature; on failure it does not blindly press back to reuse it. OS file locks are released with the process; Windows `os.kill(pid, 0)` probing is not used. Automatic mapping compares all candidates: list-entry text cannot prove a dialog opened; when a modal title matches several nodes the ambiguity is kept; an untitled PreferenceScreen is identified by at least two of its own row labels, one of which is unique to it. The report keeps candidates that exist in source only inside XML comments, rather than deleting them from the denominator to flatter coverage.
95
+
96
+ ## State Recapture and Routes Outside the Static Graph
97
+
98
+ A variant JSON requires `id`, `requires`, `fixtures`, `probes` and `cleanup`; `from_phase`, `targets`, `only_unconfirmed` and `basis` are optional. By default it clones only tasks of the original phase that are unconfirmed and not comment false positives. The command may only run after device execution has stopped, to avoid overwriting a running campaign.
99
+
100
+ `routes` is `[{"id":"route-name","actions":[...]}]`. Each route should start from an explicit launch or restore action and verify key checkpoints with `{"type":"assert","rule":{"all":[{"resource_id":"example:id/expected"}]}}`. Atomic actions and click_candidates are available; an action's optional `when` uses the same positive rules. Routes run in order; when one fails, a route_result is recorded and the next route continues, still bound by the action and time budgets.
101
+
102
+ `cleanup` runs in finally and proves the restore with assertions. Reserve action budget for it; if restore is impossible, keep the error and never claim it was restored. The report outputs discoveries.json and route screenshots; route endpoints are not automatically counted in static coverage. The same static edge across states counts once, and the screenshot gallery is shown per static node and environment.
103
+
104
+ ## Final UTG and Long Pages
105
+
106
+ `node scripts/final_utg.mjs <campaign> [--static <newer-utg.json>]` can export on its own, and report also calls it. By default it uses the static snapshot embedded in the campaign; when a newer static graph is given, it keeps the union of node IDs and the original attributes of both versions, and merges edges by their full semantic attributes. Edge confirmation must match the original task's static edge index, actual source and target, and action evidence; old evidence is never re-applied by the new graph's index.
107
+
108
+ `utg.final.json` and the `utg.json` meant for generic consumers have the same content: standard `nodes/links` plus captures, runtime_transitions, issues and metadata. A node's evidence includes capture_ids, variants, cover_capture, capture_count and viewport_count. Nodes with static `widgets` also get `runtime_widget_status`, which stores per static widget the match status, matching rule, runtime index, screenshot ID, coordinates and enabled/clickable/checked/selected state; `matched`, `ambiguous` and `unseen` are all valid results, and a missing runtime widget is never treated as success. Matching prefers resource ID, then widget name to resource ID, then text/content-desc, and confirms only a unique top-scoring candidate. Variants are grouped by environment and abstract state, viewports are deduplicated by the fingerprint of the visible widget tree including positions, and capture_ids always keep all raw observations. Each capture has relative paths to its screenshot and raw tree, normalized nodes (with parent_index), capture order, entry action and identification basis. Unmapped observations are kept as dynamic candidate nodes and do not raise static coverage.
109
+
110
+ Long pages use multi-viewport evidence instead of overwriting same-named screenshots or stitching by default. utg.html can switch states, viewports and all raw observations, enlarge the original image on click, and expand the corresponding widget tree. The image may change under an identical widget tree, so every raw capture remains viewable. The existing capture is target-navigation capture and cannot prove the page was scrolled from top to bottom; multiple images are not equivalent to a full long screenshot. The offline HTML embeds its data, with no CDN or fetch; include the artifacts directory when sharing.
111
+
112
+ ## Additional Capabilities (2026-09 AntennaPod regression fixes)
113
+
114
+ - **NL hint compilation**: on-screen text quoted with `"…"`/`'…'` in `nl_hints` is compiled, in clause order, into multi-step clicks; intermediate steps (such as a bottom bar's "More" popup menu) are marked `intermediate` and their page is not verified; "any one / the first … row/item/cover" compiles to `click_list_item` (tap the first actionable row of the only scrollable list); `[id:name]` compiles to a resource-ID selector; a hint starting with "(no action)" is treated as an automatic step. Leading description clauses that repeat the previous hop are removed to avoid duplicate clicks.
115
+ - **`restore_app_data` fixture**: `{"type":"restore_app_data","archive":"<tar>","clear_dirs":[...]}` restores a debuggable package's private data snapshot via `run-as` (after a force-stop), used to enter content phases such as “has subscriptions / currently playing” reproducibly; the snapshot is a campaign input and is not generated automatically.
116
+ - **Replay snapshots for non-debuggable packages**: when `run-as` is unavailable (release builds, closed-source APKs), the snapshot becomes `<name>.replay.json`, whose content is the step chain that rebuilds the state from cleared data. Restore = `clear_app_data` (`pm clear`, which also resets runtime permissions) → launch → replay the step chain; save = `save_replay` (step chain + this recipe's steps, written only to `snapshot_dir`, never overwriting). A D recipe's output is of the same kind as its base; the step chain is capped at 60 steps in total. `d_prereqs.mjs snapshot` probes `run-as` to choose the mode automatically; `config.snapshot_mode` (`auto`/`tar`/`replay`) can force it.
117
+ - **Launch isolation**: `restart` adds `-f 0x10008000` (NEW_TASK|CLEAR_TASK) to the launch, so system settings / browser pages left in the app's task stack do not sit in front of a “fresh launch”; implicit VIEW/action intents with a `component_fqn` are pinned to the target component with `-n`.
118
+ - **Additional page-identification tiers**: a foreground page from a different package is always `foreign-package` and is not mapped to a static node. The package is taken from the **captured widget tree** (majority vote over node `package`, `semantics.tree_package`), not from the foreground component in `dumpsys window`: the latter lags, and right after launch or when a system chooser pops up it still reports the app's Activity while the dump shows the file picker or the launcher. Such observations used to be misjudged as app pages by `exact-activity`. An observation record's `package` field is the tree's package; when the two disagree, the foreground component's package is stored separately as `component_package`. `rejudge.mjs` re-judges old evidence by the same rule; preference rows use only `android:id/title` (excluding persistent bar text such as bottom navigation); a unique toolbar-title match is `unique-toolbar-title` (including Compose top bars: a title TextView with no Toolbar class and no id, within the top 12% of the window, not in a scrollable container, with a clickable navigation icon to its left under the same parent, `semantics._composeTopBarTitle`); a unique combination of the page's own layout IDs is `own-layout-ids` (static `layout_ids` preferred); dialogs with runtime titles are identified by their own layout IDs. Strings and preference XML are resolved across all project modules.
119
+ - **Source-page reuse**: the current screen is reused only on an exact page-identity match; a host Activity component match no longer counts as already being on the source page. An automatic embedded section without its own anchor can be confirmed by `source_context` (the last gesture target).
120
+ - **`overflow_openers`**: configured positive rules (such as a bottom bar's "More") are each tried once after the selector is not found and scrolling yields nothing; if they miss, the runner goes back. Besides configured items, the runner also **derives** openers from the campaign's own routes: it takes the selector groups of `intermediate` hops in each task's replay that are within `derived_opener_depth` (default 1) steps of launch and still have steps after them, sorted by occurrence count, up to `max_derived_overflow_openers` (default 4). A container one route already has to open first (a bottom bar's "More", a toolbar menu) can thus be found even when another route omits that step. No app-specific vocabulary is written.
121
+ - If the target is still not found after tapping an opener: press Back only if the screen changed; if the opener switched Activity, or landed on a verified page that is not an overlay type (menu/dialog/panel/overlay/ui-state/mode), it is navigation rather than a container and is not tried again in this run.
122
+ - **Waiting for content to load** (`content_wait_seconds`, default 10): if a post-action screenshot has an identified page but still looks like it is loading (a visible near-square `ProgressBar`; visible text of the app under test still holding an unformatted placeholder `%1$s` / `%2$d` / `%.1f` / `%02d` / `%1$tY` / a standalone `%s` (`UNFORMATTED_TEXT`: the layout's `android:text` default, i.e. how the screen looks before data arrives; a non-positional specifier must not touch an ASCII letter or digit (`5%d`, a URL's `%20` do not count), while adjacent CJK text is fine (a CJK word right before `%s` or right after `%d`); text inputs (EditText, AutoCompleteTextView, SearchAutoComplete), text inside a list row or WebView (under a RecyclerView / ListView / GridView / WebView: bound data) and text longer than 40 characters (content, not a layout default) excluded; the WeatherApp home page shows `Feels like %1$s` for about 8 s after every launch while the widget tree stays still, so `settle()` cannot detect it); or the page source has 3+ fixed texts while the screen has at most 2 text nodes and at most 1 of them matches), it is not mapped yet and is re-captured every 0.5s until the content appears. If it is still loading after the full wait it is mapped anyway, with `loading: true` on the `mapping` event; once a page has waited out the full period, it is not waited for again until a capture shows it loaded (it was only slow, e.g. a first fetch that outlasted the wait), after which the next visit waits again; that grace is given once per page per run, and after a second full wait the page is not waited on again in that run. A page with a permanent spinner, a literal `%s`, or one that flips between a loading-looking and a loaded view (a scroll hides the spinner) therefore pays the wait at most twice per run. Pages captured only in a loading state are listed in `report.md` under "Pages captured only while loading". Wide bar-shaped `ProgressBar`s (storage usage, download progress) do not count as loading.
123
+ - **First-run page bridging** (`launch_chain_wait_seconds`, default 6): at compile time a task records the pages reached automatically after launch (`launch_chain`, e.g. Main in Splash → Main) and the launch landing page (`launch_page`, Splash). If `source()` is still on `launch_page` after launch, it waits for it to leave first; if it then lands on a page outside the chain (a first-run Guide) and there is a compiled task from that page into a chain page, that task is run first (event `launch_bridge`; on failure `launch_bridge_failed` is recorded and control passes to the source-page check). Every launch that lands outside the chain is bridged; the exit usually writes a first-run flag, so later launches no longer pass through that page.
124
+ - **Off-path edges**: answers that `a2h-utg-static` nl_hints gives for unlabeled edges with no click path ending on them are written to `click_paths.json` `edge_hints` (key `<source>|<target>|<trigger>`). With an `nl_hint` they compile to a click; an answer of `not_clickable` compiles to `needs_external` with `edge-not-clickable` in `compile_issues`, and class-C recovery skips it.
125
+ - **Prefix circuit breaker** (`prefix_memo`, on by default): within one run, once a task's “launch + first n replay steps” fails for a deterministic reason (`selector-not-found-after-bounded-scroll`, `replay-target-unverified:`, `ambiguous selector`, `list-item:`, missing single scroll container), later tasks sharing that prefix are judged by start (`fresh` after a data clear, else `warm`) plus landing page: when the landing is predictable (a fresh start; a warm start that last landed on a launch-chain page, or, with no chain, two warm starts in a row that landed the same) they are recorded as `failed` before any clear or launch; otherwise they launch once, wait past the launch page (Splash), take the landing before `launchBridge`, and are recorded directly as `failed` only when it matches with the same reason, plus `prefix_failed_from` (the first failing task), `prefix_key`, `replay_index` and `prefix_before` (the observation at the start of that step). The evidence points to the observation of the first failure. Class-B extraction locates the failing step by `replay_index` and `prefix_before`, so these tasks fall into the same item as the first task and need only one review. Transient failures such as device errors do not trip the breaker.
126
+ - **Unexpected dialogs (interruption)**: a widget tree whose single root node covers < `modal_max_screen_share` (default 0.85) of the screen and contains clickable widgets is treated as an overlay (AlertDialog, permission, rating, metered-refresh confirmation, etc.). If the overlay is not the current task's source page, target page or `source_context`, it is checked once before the selector lookup, after every search scroll and after replaying to the source page, and handled in order: first `interruption_rules` (`{id?, when: <rule>, action}`); next, the app under test's own first-launch consent dialog (text or content_desc naming a privacy policy / user agreement / terms of service, `CONSENT_RE`; a WebView body exposes its words only in content_desc; nodes without a package count as the app's) is accepted by tapping its positive control: `android:id/button1` (matched on its full id; not when its label declines, such as "Disagree" / "Decline" / "Exit", `CONSENT_DECLINE_RE`), else the one non-toggle node (not a CheckBox / Switch) in a custom layout whose whole text is "Agree" / "Agree and continue" / "I agree" / "Accept" (`CONSENT_POSITIVE_RE`, whole-label match, so "Disagree" / "I have read and agree" never count). Only when that control is present but disabled is a CheckBox ticked first ("I have read and agree"): the first one whose text names consent (one per pass, so two required boxes take two passes; ticks do not use up `max_interruption_dismissals`), else the only unticked one; several unticked boxes none of which names consent ("receive push notifications") are not guessed at (`consent_default`, on by default, event `rule: consent-default`). A dialog recognised as a consent dialog with no safe positive control that offers a way to decline (`android:id/button2`, or a control whose whole label is "Disagree" / "Decline and exit" and the like, `CONSENT_DECLINE_RE`) is left as it is rather than falling back to Back/button2, logged as an event with `outcome: unresolved`; one with no way to decline (a one-tap login sheet whose fine print says "logging in means you agree to the User Agreement") still gets the generic Back. This applies only after a launch and before any action other than a dismissal, a wait or a scroll (`_launched`, kept by `atom()`; cleared when a launch fails, at the start of every task and at the start of `run()`): such a dialog is one the app raises by itself on start; a dialog naming an agreement that appears after a task's click ("withdraw consent", "delete account", "logging in means you agree") confirms that click and still goes through Back/button2. A consent click with no effect is not retried and does not fall back to Back; then Back, and if Back does not dismiss it, tap `android:id/button2`. A consent dialog must not go through Back/button2: Back closes the Activity and button2 is usually "decline and exit" (measured on where2study 11-04: every task met the dialog after its data was cleared, and 0 of 64 tasks confirmed). When the positive control's label is outside that set, write an `interruption_rules` entry. Each overlay is handled at most `max_interruption_dismissals` times (default 2). Each handling records an `interruption` event containing the first 6 text segments and the action used, which can be used to write new rules.
127
+ - **Upward scroll stops at the origin**: when searching for a widget, it scrolls down first, then scrolls back up and stops at the origin (`_backAtOrigin`) instead of one extra swipe. Swiping up at the top of a list is pull-to-refresh (SwipeRefreshLayout and similar, common in open-source apps), which triggers network or metered-data dialogs. In AntennaPod round 1 this made 35/65 tasks fail and covered only 7 pages. When the origin is mid-list and the search must go upward, set `search_above_origin: true`.
128
+ - **Pager tab pages** (2026-11-10; measured on CoolMall, where the Category and Cart tabs were never captured):
129
+ - Reaching a tab: a `pager-swipe` edge whose click-path hint says to tap the tab (`tap the "X" tab`) compiles to that tap, which reaches any index in one step. Only without a hint does it swipe, once per page (`repeat` = the difference between the two `pager_index` values).
130
+ - Swipe start: a non-drawer swipe starts 1/5 of the screen width in from the edge, out of the system back-gesture zone. Only a drawer swipe (`from_edge`) starts at the edge.
131
+ - Identifying the tab: `tabLabelOf` takes `tab_label` from hints shaped like `… "X" tab … switch to the X page`. When a bottom row holds two or more known tab labels, the whole row (a Compose NavigationBar) is left out of body text, so the tab label "Cart" no longer makes the Category tab resolve as the goods-detail page.
132
+ - **Framework text localization**: AppCompat accessibility texts such as `More options` get localized selectors generated per `--locale`, with English kept as a fallback.
133
+ - **Undrivable entries**: `external-surface` entries compile to `entry-requires-external-surface`; components absent from the installed package are recorded as `unsupported: entry-component-not-installed`. Both are adapter limitations, not page unreachability.
134
+ - **Storage**: `events.jsonl` is appended per event; `campaign.json` is rewritten at most every `save_interval` seconds (default 15) and at each task verdict, so large campaigns are not fully serialized on every action.
135
+
136
+ ## Phase Partitioning and Unrunnable Phases (2026-09-29)
137
+
138
+ - **Task-level preconditions no longer split phases**: `plan.mjs`'s `TASK_LEVEL_KINDS` (`ui-state`, plus `launch-intent:` guards) are only recorded on the task's `task_preconditions` and do not take part in phase grouping. In-flow states (text entered, filter opened) are reached by the gesture sequence in the same environment; launch parameters are carried by the task's own launch action. On AntennaPod the phase count dropped from 63 to 19. On failure, `task_result.unmet_preconditions` names the in-flow states not reached.
139
+ - **Launch parameters**: static guards carry `launch_extras` (key constants resolved to literals, accessor type, branch-determined booleans). `compile_tasks.mjs --launch-values <json>` supplies values only the campaign knows (such as a particular episode id), optionally with `requires` so the task lands in a phase where that value exists; a missing value compiles to `launch-extra-value-required:<key>` without guessing. The adapter generates `--ez/--el/--ei/--es` arguments by type and validates them against a character whitelist.
140
+ - **Transitions triggered inside a panel (`panel_routes.mjs`, 2026-11-02)**: homegraph attributes a `startActivity` inside a helper function (such as `openNewTask()`) to the page that owns the helper, and the edge carries no trigger id, so the compiled task taps the target's label directly on that page. When every call site of the helper is a click listener of a view inside one static panel (evidence: the view variable appears in the panel's `declared_at`/`evidence` lines), `compile_tasks.mjs` inserts a "tap the panel's open-overlay trigger" step (`intermediate: true`) into the edge task's `prelude` and before replay steps that cross this edge, and puts the in-panel views' resource names first in the selectors. If any call site is not a listener of a panel view, nothing is rewritten; a call in the opener's own listener (a FAB whose first tap opens the speed dial and whose second tap, with the panel open, creates an item) still counts as a panel call, because the panel has to be opened first. Nothing is rewritten either when the helper is not private and another source file calls it (`x.fn(`, `::fn`, or an unqualified `fn()` in a subclass). Routes are recorded per edge: when the same page pair has another edge without a trigger id (for example `editTask` from a menu), that edge's task gets no opener, and a replay step, which cannot tell the edges apart, gets none either. Replay first looks for a route from the current page; before any gesture it also accepts a route on a page the launch page reaches by itself through a lifecycle/startDestination or other automatic edge. A replay step rewritten by a hint gets the opener only when its final tap is still a panel member. Requires `--project`; the sources are read once per compile. Simple Calendar: `MainActivity → TaskActivity` first taps `calendar_fab`, then `fab_task_label`/`fab_task_icon`, covering 22 tasks.
141
+ - **`close_phases.mjs`**: runs after device phases end and marks phases without fixtures/probes as `blocked`, with a reason naming the unmet preconditions and the number of compiled tasks among them, so the report no longer shows them as `pending`. The predicate `unrunnable(phase, config)` is also reused by class-D extraction, so D can see these phases before this step.
142
+
143
+ ## Model-Assisted Recovery · Class A: Learning Page Identity Offline (2026-09-29)
144
+
145
+ For tasks whose target was not confirmed, or whose replay intermediate pages could not be confirmed, the evidence already exists (before/after screenshots, widget trees); only the identity verdict is missing. `recover.mjs` has the model look at screenshots, widget trees and source to propose identification rules; a rule is adopted only after deterministic verification, and the model's judgment itself is never treated as evidence.
146
+
147
+ 1. `recover.mjs extract <campaign> --static <utg.json> --project <src> --package <app>`: aggregates by “the static page expected to be reached” into `recovery_worklist.json`. Each item has at most 3 sample screenshots, with the pruned widget tree (occluded nodes removed), the current verdict and its basis, and the page's declaring file, layout file, title and widget IDs.
148
+ 2. The reviewer writes `recovery_answers.json`, giving per item a `verdict` (is-target / not-target / cannot-tell), the samples that belong to the target, a rule (`all`/`none` selectors, each containing exactly one of resource_name, text, content_desc), and `file:line` evidence for each anchor. Each item is judged for its own `page` only: anchors come from that item's `static.files` (declaration, layout, or the string resources those lines reference), never from a neighbouring item or the page that opens it. When a settings row opens a sheet with the same title, both show it: cite the line in the sheet's own file and add a second anchor that only the sheet's window shows (its options).
149
+ 3. `recover.mjs apply ...` verifies each rule:
150
+ - **Provenance**: the anchor value must appear on the cited line; IDs may only come from the page's own declaring file or layout file, and text only from string resources or the page's own files. Runtime data (titles, dates, counts) never enters source code and so can never become an anchor.
151
+ - **Coverage**: the rule matches every sample the reviewer identified.
152
+ - **Specificity**: the rule must not match any screenshot already judged to be another page (except that page's host or automatic sub-pages), nor screenshots of other apps.
153
+ - **Exclusivity**: it must not match together with an already adopted rule for another page.
154
+ - The reviewer can only overturn weak verdicts (`own-layout-ids` / `best-layout-cover` / `unique-toolbar-title`), not strong ones such as modal title, preference rows or selected tab.
155
+ 4. Passing rules are written to `campaign.learned_page_rules` and checked as the first tier during identification (`learned-rule:<id>`). Then `rejudge.mjs` re-judges all evidence with the new catalog: it adds a confirmation only when both the before and after screenshots satisfy the source and target pages, and withdraws existing confirmations that no longer hold. `recovery_report.json` lists the adoption result or rejection reason for each rule.
156
+
157
+ `rejudge.mjs` can run on its own (equivalent to the former ad-hoc script `reresolve.py`), and `compile_tasks.mjs` carries learned rules along when recompiling.
158
+
159
+ ## Multi-Step Gesture Edges (2026-09-29)
160
+
161
+ A static edge is often several gestures on the device; for example “page → dialog” first opens the overflow menu and then taps a menu item. The intermediate menu is a screen passed through, not the edge's source page, so the before/after screenshots of a single action cannot prove the edge. `utg_explorer/chain.mjs` requires a sequence of actions as proof, valid only when:
162
+ - all actions belong to the same task and the same environment;
163
+ - the actions are contiguous: the previous action's after is the next action's before;
164
+ - the screenshot before the first action shows the source page, and the screenshot after the last action shows the target page.
165
+
166
+ Intermediate screenshots may show anything; they are only the path and are not evidence for any page.
167
+
168
+ The runner records `action_chain` starting from the target phase's first action (pre-tap, opening the overflow menu, scrolling), and audit and the final UTG verify it with the same rules. For old evidence, `rejudge.mjs` traces back along the task's own target-phase actions to the source-page screenshot and records a complete chain (`supersedes` points to the superseded old record). The trace never goes past replay and restore actions, because those lead to the source page and do not belong to the edge.
169
+
170
+ ## Model-Assisted Recovery · Class B: New Gestures for Failed Steps (2026-09-29)
171
+
172
+ Applies when a task gets stuck on a step on the device: widget not found, “tap any row” finds no rows or several lists, a selector matches several widgets, or an intermediate page during replay is not recognized. The screenshot at the moment it got stuck has already been recorded. `recover_b.mjs` has the model read that screenshot and widget tree, plus the code behind the edge, and propose a gesture that completes the step. The model's suggestion is not evidence on its own; it is adopted only after it is confirmed on the device.
173
+
174
+ 1. **`recover_b.mjs extract <campaign> --static <utg.json> --project <src>`**
175
+ - Groups by “stuck step + page at the time” and produces `recovery_b_worklist.json`.
176
+ - Each item includes: the goal (the intermediate page to reach, or the edge to complete), the original failed step and its reason, the screenshot and widget tree before the step started, the screenshot at failure, the trigger code window, and the destination page's files.
177
+ 2. **The reviewer writes `recovery_b_answers.json`**
178
+ - Gives 1 to 5 gesture steps, chosen only from the runner's existing actions: tap or long-press by resource ID, text or description, tap the first row of the only list, back, scroll the page, wait.
179
+ - May instead answer `unreachable` (cannot be reached in this state) or `cannot-tell`.
180
+ 3. **`recover_b.mjs apply ... --config <config>`**: verifies offline first.
181
+ - The first step's selector must match exactly one visible widget in the screenshot “before this step started”.
182
+ - Only the action types listed above are allowed, and a selector may contain only one key.
183
+ - The gesture must not be identical to the original failed step.
184
+ - Gestures that pass replace the original step per task: if the failure was in the replay phase, the corresponding hop in `replay` is replaced, with the last step keeping that hop's original page identity and earlier steps marked intermediate; if it was in the target phase, `prelude` and `action` are replaced. A `recB-<phase>` retry phase is then created from the task's original snapshot (`task_overrides` of `variant.add_variant`).
185
+ 4. **Run these phases on the device**: the runner's checks apply as usual; every tap must match uniquely, coordinates are never guessed, and the landing page must be confirmed by identification rules.
186
+ 5. **`recover_b.mjs adopt`**: writes only the replacements confirmed successful on the device into `campaign.learned_task_steps`. `compile_tasks.mjs` applies them to the same task on the next compile.
187
+
188
+ The runner adds a `scroll_page` action: it finds the unique scrollable container on the current screen and scrolls it. If none or several are found, it refuses outright.
189
+
190
+ **Full-page scroll capture (scroll sweep, on by default, disabled with `scroll_sweep: false`).** Once a page is verified at a safe point, it gets one full-page scroll capture, and only once per page. There are three kinds of safe points: a task's source page before the action runs, a confirmed target page, and a direct-launch target page.
191
+
192
+ - **Choosing the container:** take the largest visible, unoccluded, app-owned vertical scrollable node whose height is at least `sweep_min_height_px` and whose selector matches it alone. Containers with no id and a non-unique class (such as a Compose page's scrollable `android.view.View`) are located by class plus reading-order `index`. Horizontal containers, ViewPagers and inner scroll areas that are too short are excluded; the latter are recorded in `unswept_containers`.
193
+ - **Process:** capture a frame after each downward scroll until two adjacent frames have the same visible-tree signature (bounds included, so a collapsing header that only changes height still counts as a new frame), recorded as `complete`. Reaching `max_sweep_scrolls` (default 20) frames is recorded as `truncated`. Leaving the page midway is recorded as `aborted`. On a device error or an exhausted budget, the capture just ends and is recorded; it never fails the current task.
194
+ - **Reset:** afterwards it scrolls up back to the initial signature. If the reset fails the page is marked dirty, and `source()` relaunches into it instead of reusing the scrolled page.
195
+ - **Backlog sweep:** before a phase ends, pages mapped in this environment but not yet swept are navigated to via this phase's compiled tasks and swept (`sweep-backlog`). Navigation failure is recorded as `unreached`.
196
+ - **Events:** each sweep writes one `scroll_sweep` event with fields static_id, origin_observation, frames (ordered), container, outcome, restored, also_covers, unswept_containers. The action's task_id is `sweep:<page>`, so audit and chain verification do not treat it as a planned task.
197
+ - **final_utg:** sweep frames always belong to the swept page, even when frames below the first screen are identified as embedded sub-pages, or are unmapped because the anchor scrolled off screen. Captures carry `sweep.index`, and nodes get `evidence.scroll`. `metadata.scroll_completeness` becomes `per-node`, with a `scroll_sweeps` count attached.
198
+
199
+ ## Model-Assisted Recovery · Class C: Finding the Trigger Widget (2026-09-29)
200
+
201
+ Static analysis found an edge in the code (source page → target page) but does not know which on-screen widget triggers it, for example a code-dispatched navigation, or a hint with no quoted text. Such tasks compile to the “not executable” state. `recover_b.mjs --class C` reuses the whole class-B flow, with only two differences:
202
+
203
+ - **`extract --class C`**: picks tasks that are not executable and whose source page already has a confirmed screenshot, preferring screenshots from the task's own phase, then from any phase. The screenshot serves as `screen_before`, with the trigger code, review hints and static edge arguments attached. Entries such as watch modules and external surfaces are excluded. Tasks whose source page has never been confirmed wait for the next round.
204
+ - **`apply --class C`**: a gesture that passes verification becomes the task's `prelude` and `action`, and the task status is set to `compiled`, but only within `recC-*` variant phases (`variant.add_variant` allows override fields to make a task executable). After device confirmation, `adopt` writes it into `learned_task_steps`, and on the next compile the task is directly executable.
205
+
206
+ ## Model-Assisted Recovery · Class D: Building the Required Data State (2026-09-29)
207
+
208
+ Some edges exist in the code but appear only in states the test snapshot does not have, such as a downloaded episode, an unsubscribed podcast, a refresh failure or search results. Class-B/C reviewers have already marked these `unreachable` and read the conditions for their appearance from the source. `recover_d.mjs` has the model provide a **recipe** for building that state inside the app, consisting of:
209
+ - which existing snapshot to start from;
210
+ - which steps to perform in the app. The action vocabulary is the same as class B, plus `type` (type ASCII text into the input field tapped in the previous step) and `key` (only ENTER, SEARCH, TAB, DEL);
211
+ - optionally: **adding** files to the local test feed server, but never modifying existing files;
212
+ - optionally: `probe_steps` to reach a screen where the state is visible;
213
+ - positive probes proving the state is in place.
214
+
215
+ Each recipe runs as a `recD-<id>` variant phase, in this order:
216
+ 1. restore the base snapshot;
217
+ 2. launch the app;
218
+ 3. run the recipe steps;
219
+ 4. `snapshot_app_data`: stop the app, pack only the private data directories that actually exist (tar's stderr is kept out of the archive), verify block by block and save as `<snapshot_dir>/recD-<id>.tar`. An existing complete archive is never overwritten; an incomplete archive is renamed to `*.corrupt-<ms>` and regenerated;
220
+ 5. relaunch the app;
221
+ 6. run `probe_steps`;
222
+ 7. check the probes;
223
+ 8. run the tasks.
224
+
225
+ If the probes fail the phase blocks and the tasks do not run. The resulting archive can serve as a test snapshot for any later campaign. Items that need a real account, an external service, another build variant or the system file picker go into `skipped` with a reason.
226
+
227
+ New runner actions:
228
+ - `key`: whitelisted keys;
229
+ - `snapshot_app_data`: may only write to `config.snapshot_dir`.
230
+ - `restore_app_data`: verifies the archive first and errors out directly if it is incomplete, without clearing device data (`adb exec-in` does not return the device-side tar's exit code). The base snapshot `fresh.tar` is produced by `d_prereqs.mjs snapshot` after `pm clear`.
231
+
232
+ `report.md` gains two sections:
233
+ - **Runner capability gaps**: the reviewer proved the edge exists, but the runner cannot do it within its own rules, e.g. a time window shorter than one observation;
234
+ - **Edges the source confirms unreachable**.
235
+
236
+ The class-B/C step vocabulary also gained `type` and `key`.
237
+
238
+ ### Worklist and Answers (2026-10-15)
239
+
240
+ D's worklist is `items` with a `key`, and can be split with `worklist_parts.mjs`:
241
+ - `requirement` (key `b-<B key>` / `c-<C key>`): an item judged `unreachable` by B/C, with its tasks and conditions.
242
+ - `blocked-phases` (key `p-<hash>`): a group of phases with identical `requires`, which one state can unlock together. It includes phases already `blocked`, plus those still `pending` whose config lacks a fixture or probe (the same predicate as `close_phases.mjs`'s `unrunnable`). Previously D only collected `blocked`, and since `close_phases` runs only at the end of a full round, these phases never entered the list at D extraction time.
243
+ - Sorted by task count, descending.
244
+
245
+ Each item is answered by `key`:
246
+ - `{"key", "verdict": "recipe", "id", "base", "steps", "probes", ...}`: if `tasks` is omitted it defaults to the item's tasks.
247
+ - `{"key", "verdict": "skipped", "reason"}`: written to the report's `skipped`, not treated as a rejected recipe.
248
+ - Recipe ids and new fixture file names start with the item's key, so answers written in parallel do not collide; duplicate recipe ids are rejected.
249
+ - The old format, a recipe list without `key`, still works.
250
+
251
+ ## Node Coverage Mode (2026-10-04, default)
252
+
253
+ Use it when the goal is “every static node has its own screenshot and widget tree”. With edge-based planning a node is run once per incoming edge, and the recovery classes repeatedly review items whose target page was captured long ago. Measured on AntennaPod (APL1_explore_1003): of 469 task results, 140 started with the target page already captured; in B, C and D, the items whose target page was already captured were 24/53, 29/38 and 39/55 respectively.
254
+
255
+ - **Node mode is the default.** For edge verification, set `"coverage_mode": "edges"` in config.json, or use `run_device.mjs --coverage edges` (the command line overrides config).
256
+ - **Definition of “covered”** (`covered_static_ids` in `utg_explorer/coverage.mjs`): the observation of some `mapping` event whose current `static_resolution` is verified as that node, the same rule audit.mjs uses to count mapped. Nodes confirmed via source relations (host, default sub-page, same-layout twin) do not count, because their own screens were never captured.
257
+ - **Runner**: when a task's target node is already covered, it records a `task_skipped` (`reason: target-already-covered`), without running it or recording a failure. The covered set grows live during a phase, so a node captured during replay also causes its own task to be skipped. The phase reason states the skip count and coverage mode.
258
+ - **Recovery-class extraction**: by default only items that can add uncovered nodes are kept; `--all-items` keeps all of them (edge mode). `--unmapped-only` is still accepted and is the same as the default.
259
+ - Class A: the page itself is uncovered, or a task it blocks has an uncovered target.
260
+ - Class B: the target of the repaired replay hop or of the edge is uncovered.
261
+ - Class C: the edge's target is uncovered.
262
+ - Class D: the requirement or blocked phase contains a task with an uncovered target.
263
+ - `retry-identities`: filtered the same way.
264
+ - **Review splitting**: `worklist_parts.mjs split <worklist> --size 10` splits the A, B, C, D and direct-launch worklists into small parts for parallel review, and `merge [--seed]` merges them; missing items, duplicates and unknown keys are all rejected. Class D is grouped by state before splitting (see the class D section).
265
+ - **Event timestamps**: every event carries `ts` (epoch seconds), so the report can compute phase durations; readers ignore the field.
266
+
267
+ Results of offline replay on the APL1 records (no device rerun):
268
+
269
+ | Metric | Result |
270
+ |---|---|
271
+ | In-task screenshots (runtime identity) | 26% fewer |
272
+ | In-task screenshots (offline rules available early) | 35% fewer |
273
+ | Of which classes C and D | about 75% fewer |
274
+ | Nodes lost because of the 138 skipped tasks | 1 (`menu:feeditemlist_context`; its own task is not skipped and is still attempted) |
275
+ | Worklists B/C/D | 53/38/55 items → 38/15/29 items |
276
+
277
+ The cost is that edges whose target is already covered are no longer attempted, so fewer edges get verified; when edges are needed, run another round of edge-based tasks.
278
+
279
+ On-device measurement (AntennaPod, APNODE_1004 vs. APL1_explore_1003): node mode confirmed 114/141 pages and verified 166/412 edges in about 50 minutes of device time; edge mode got 115/141 pages and 254/412 edges in about 107 minutes. The one missing page is `menu:feeditemlist_context`, matching the offline replay's prediction.