@buaa_smat/hometrans 26.0.5 → 26.0.6

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 (472) hide show
  1. package/README.md +249 -279
  2. package/agents/code-reviewer.md +1 -1
  3. package/dist/cli/editors.json +20 -0
  4. package/dist/platform/registry.js +1 -0
  5. package/dist/platform/validate.js +2 -1
  6. package/i18n/agents/code-reviewer.md +1 -1
  7. package/i18n/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  8. package/i18n/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  9. package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  10. package/i18n/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  11. package/i18n/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  12. package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  13. package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
  14. package/i18n/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  15. package/i18n/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  16. package/i18n/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  17. package/i18n/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  18. package/i18n/skills/a2h-app-migrate/SKILL.md +32 -15
  19. package/i18n/skills/a2h-app-migrate/references/stage-map.md +4 -2
  20. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +148 -89
  21. package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
  22. package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
  23. package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +1 -1
  24. package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
  25. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  26. package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
  27. package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  28. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +9 -3
  29. package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
  30. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
  31. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
  32. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
  33. package/i18n/skills/a2h-batch-ui-align/SKILL.md +14 -12
  34. package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
  35. package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
  36. package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
  37. package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
  38. package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
  39. package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
  40. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
  41. package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
  42. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
  43. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
  44. package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
  45. package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
  46. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
  47. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
  48. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
  49. package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +1 -1
  50. package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
  51. package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
  52. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
  53. package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
  54. package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
  55. package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
  56. package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
  57. package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
  58. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
  59. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
  60. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
  61. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
  62. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
  63. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
  64. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
  65. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
  66. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
  67. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
  68. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
  69. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
  70. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
  71. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
  72. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
  73. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
  74. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
  75. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
  76. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
  77. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
  78. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
  79. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
  80. package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
  81. package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
  82. package/i18n/skills/a2h-module-semantic-docs/SKILL.md +3 -2
  83. package/i18n/skills/a2h-page-specgen/SKILL.md +36 -5
  84. package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +89 -21
  85. package/i18n/skills/a2h-page-specgen/references/gates.md +33 -7
  86. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
  87. package/i18n/skills/a2h-page-specgen/references/spec-example.md +166 -32
  88. package/i18n/skills/a2h-page-specgen/references/spec-template.md +8 -5
  89. package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +37 -1
  90. package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
  91. package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
  92. package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +32 -0
  93. package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
  94. package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
  95. package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +19 -10
  96. package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +62 -3
  97. package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
  98. package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +116 -6
  99. package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
  100. package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +26 -14
  101. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +118 -25
  102. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +104 -19
  103. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +118 -25
  104. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +104 -19
  105. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +216 -216
  106. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
  107. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
  108. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +118 -25
  109. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +100 -15
  110. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +118 -25
  111. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +104 -19
  112. package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +155 -3
  113. package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
  114. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
  115. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
  116. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
  117. package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
  118. package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
  119. package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +75 -3
  120. package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
  121. package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +124 -0
  122. package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
  123. package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +106 -1
  124. package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
  125. package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +12 -0
  126. package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
  127. package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +11 -3
  128. package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
  129. package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
  130. package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
  131. package/i18n/skills/a2h-resource-convert/SKILL.md +1 -1
  132. package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
  133. package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
  134. package/i18n/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
  135. package/i18n/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
  136. package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +15 -12
  137. package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
  138. package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
  139. package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
  140. package/i18n/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
  141. package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
  142. package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +5 -3
  143. package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
  144. package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
  145. package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
  146. package/i18n/skills/a2h-spec-generate/references/input-formats.md +1 -1
  147. package/i18n/skills/a2h-utg-explorer/SKILL.md +11 -5
  148. package/i18n/skills/a2h-utg-explorer/references/architecture.md +37 -19
  149. package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +48 -3
  150. package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
  151. package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
  152. package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
  153. package/i18n/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
  154. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
  155. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +143 -14
  156. package/i18n/skills/a2h-utg-static/SKILL.md +3 -3
  157. package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
  158. package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
  159. package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
  160. package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
  161. package/package.json +2 -1
  162. package/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  163. package/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  164. package/platforms/codebuddy/agents/build-fixer.frontmatter.md +5 -0
  165. package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +5 -0
  166. package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +5 -0
  167. package/platforms/codebuddy/agents/model-worker.frontmatter.md +5 -0
  168. package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +5 -0
  169. package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  170. package/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  171. package/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  172. package/platforms/deveco/agents/build-fixer.frontmatter.md +2 -0
  173. package/platforms/deveco/agents/code-reviewer.frontmatter.md +2 -0
  174. package/platforms/deveco/agents/model-render-worker.frontmatter.md +2 -0
  175. package/platforms/deveco/agents/model-worker.frontmatter.md +2 -0
  176. package/platforms/deveco/agents/specgen-worker.frontmatter.md +2 -0
  177. package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  178. package/platforms/opencode/agents/build-fixer.frontmatter.md +2 -0
  179. package/platforms/opencode/agents/code-reviewer.frontmatter.md +2 -0
  180. package/platforms/opencode/agents/model-render-worker.frontmatter.md +2 -0
  181. package/platforms/opencode/agents/model-worker.frontmatter.md +2 -0
  182. package/platforms/opencode/agents/specgen-worker.frontmatter.md +2 -0
  183. package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
  184. package/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  185. package/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
  186. package/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  187. package/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
  188. package/skills/a2h-app-migrate/SKILL.md +31 -14
  189. package/skills/a2h-app-migrate/references/stage-map.md +4 -2
  190. package/skills/a2h-app-migrate/references/workflow.yaml +152 -89
  191. package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +1 -1
  192. package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +28 -11
  193. package/skills/a2h-app-migrate/scripts/dag_action_catalog.mjs +76 -0
  194. package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +60 -5
  195. package/skills/a2h-app-migrate/scripts/dag_runner.mjs +184 -4
  196. package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
  197. package/skills/a2h-app-migrate/scripts/ledger.mjs +2 -2
  198. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -3
  199. package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
  200. package/skills/a2h-app-migrate/test/test_dag_blocked_guard.mjs +291 -0
  201. package/skills/a2h-app-migrate/test/test_dag_production.mjs +40 -0
  202. package/skills/a2h-app-migrate/test/test_dag_runner.mjs +4 -3
  203. package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +1 -1
  204. package/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
  205. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  206. package/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
  207. package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +1 -1
  208. package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
  209. package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +36 -0
  210. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +19 -6
  211. package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
  212. package/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
  213. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
  214. package/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
  215. package/skills/a2h-batch-ui-align/SKILL.md +14 -12
  216. package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
  217. package/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
  218. package/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
  219. package/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
  220. package/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
  221. package/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
  222. package/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
  223. package/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
  224. package/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
  225. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
  226. package/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
  227. package/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
  228. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
  229. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
  230. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
  231. package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +1 -1
  232. package/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
  233. package/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
  234. package/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
  235. package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
  236. package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +6 -1
  237. package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
  238. package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +270 -0
  239. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +134 -16
  240. package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +39 -8
  241. package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
  242. package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
  243. package/skills/a2h-batch-ui-align/scripts/module_placement.mjs +189 -0
  244. package/skills/a2h-batch-ui-align/scripts/overlay_effects.mjs +205 -0
  245. package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
  246. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
  247. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +28 -0
  248. package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
  249. package/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
  250. package/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
  251. package/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
  252. package/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
  253. package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
  254. package/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
  255. package/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
  256. package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
  257. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
  258. package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
  259. package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
  260. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
  261. package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
  262. package/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
  263. package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
  264. package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
  265. package/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
  266. package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
  267. package/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
  268. package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +28 -0
  269. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_chrome_defaults.test.mjs +328 -0
  270. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_click_handler.test.mjs +127 -0
  271. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_compose_semantics.test.mjs +150 -0
  272. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +117 -0
  273. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
  274. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
  275. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +413 -0
  276. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +159 -0
  277. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_sheet_builder.test.mjs +192 -0
  278. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +4 -2
  279. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
  280. package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_compose.test.mjs +106 -0
  281. package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +15 -0
  282. package/skills/a2h-batch-ui-align/scripts/tests/group_pass.test.mjs +150 -0
  283. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +125 -0
  284. package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +56 -0
  285. package/skills/a2h-batch-ui-align/scripts/tests/measure_pack_icon_leaf.test.mjs +143 -0
  286. package/skills/a2h-batch-ui-align/scripts/tests/module_placement.test.mjs +248 -0
  287. package/skills/a2h-batch-ui-align/scripts/tests/overlay_effects.test.mjs +214 -0
  288. package/skills/a2h-fix-build-errors/references/known-patterns.md +5 -5
  289. package/skills/a2h-module-semantic-docs/SKILL.md +3 -2
  290. package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +10 -0
  291. package/skills/a2h-module-semantic-docs/scripts/design_baseline.mjs +158 -0
  292. package/skills/a2h-module-semantic-docs/test/test_design_baseline.mjs +128 -0
  293. package/skills/a2h-page-specgen/SKILL.md +36 -5
  294. package/skills/a2h-page-specgen/references/behavior-ledger.md +88 -21
  295. package/skills/a2h-page-specgen/references/evidence.md +2 -1
  296. package/skills/a2h-page-specgen/references/execution-model.md +13 -5
  297. package/skills/a2h-page-specgen/references/gates.md +33 -7
  298. package/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
  299. package/skills/a2h-page-specgen/references/spec-example.md +166 -32
  300. package/skills/a2h-page-specgen/references/spec-template.md +8 -5
  301. package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +40 -2
  302. package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
  303. package/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
  304. package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +35 -2
  305. package/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
  306. package/skills/a2h-page-specgen/scripts/finalize.mjs +55 -2
  307. package/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
  308. package/skills/a2h-page-specgen/scripts/gate.mjs +20 -11
  309. package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +56 -3
  310. package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
  311. package/skills/a2h-page-specgen/scripts/lib/hg.mjs +114 -5
  312. package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +20 -3
  313. package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
  314. package/skills/a2h-page-specgen/scripts/prepare.mjs +25 -14
  315. package/skills/a2h-page-specgen/scripts/report.mjs +26 -5
  316. package/skills/a2h-page-specgen/scripts/submission.mjs +69 -2
  317. package/skills/a2h-page-specgen/scripts/submit.mjs +105 -4
  318. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +110 -18
  319. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +97 -12
  320. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +110 -18
  321. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +97 -12
  322. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +224 -224
  323. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
  324. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
  325. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +110 -18
  326. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +97 -12
  327. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +110 -18
  328. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +97 -12
  329. package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +153 -3
  330. package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
  331. package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
  332. package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
  333. package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
  334. package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
  335. package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
  336. package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +82 -3
  337. package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
  338. package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +11 -0
  339. package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
  340. package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +94 -1
  341. package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
  342. package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +14 -0
  343. package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +49 -1
  344. package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
  345. package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +12 -4
  346. package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
  347. package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
  348. package/skills/a2h-page-specgen/scripts/test/report.test.mjs +80 -1
  349. package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
  350. package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +23 -0
  351. package/skills/a2h-page-specgen/scripts/waker.mjs +8 -1
  352. package/skills/a2h-resource-convert/SKILL.md +1 -1
  353. package/skills/a2h-resource-convert/data/framework-strings/NOTICE +10 -0
  354. package/skills/a2h-resource-convert/data/framework-strings/manifest.json +90 -0
  355. package/skills/a2h-resource-convert/data/framework-strings/strings.json +382 -0
  356. package/skills/a2h-resource-convert/references/conversion-rules.md +7 -1
  357. package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
  358. package/skills/a2h-resource-convert/references/step5-reference-resolution.md +16 -0
  359. package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
  360. package/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
  361. package/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
  362. package/skills/a2h-spec-design-pipeline/SKILL.md +14 -11
  363. package/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
  364. package/skills/a2h-spec-design-pipeline/references/execution-model.md +3 -0
  365. package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -3
  366. package/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
  367. package/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
  368. package/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
  369. package/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
  370. package/skills/a2h-spec-design-pipeline/references/scripts.md +4 -3
  371. package/skills/a2h-spec-design-pipeline/references/shared-layer.md +24 -19
  372. package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
  373. package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +12 -5
  374. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
  375. package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
  376. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +27 -3
  377. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +46 -1
  378. package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +2511 -295
  379. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +27 -72
  380. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +39 -83
  381. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +132 -101
  382. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +158 -115
  383. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +60 -93
  384. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +73 -100
  385. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-cn.md +52 -0
  386. package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-en.md +59 -0
  387. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +57 -8
  388. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +475 -18
  389. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +472 -4
  390. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/RoutePageSideEffectImportCheck.js +570 -0
  391. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/arkui/RouteParamCarrierSubCheck.js +1053 -0
  392. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/sql/SqlIdentifierAnalysis.js +427 -0
  393. package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +7 -1
  394. package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
  395. package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
  396. package/skills/a2h-spec-design-pipeline/scripts/settle.ts +785 -0
  397. package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +286 -0
  398. package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +166 -2
  399. package/skills/a2h-spec-design-pipeline/scripts/test_docs_refresh_contract.ts +40 -0
  400. package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
  401. package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +350 -7
  402. package/skills/a2h-spec-design-pipeline/scripts/test_route_page_side_effect_import.ts +185 -0
  403. package/skills/a2h-spec-design-pipeline/scripts/test_route_param_carrier.ts +341 -0
  404. package/skills/a2h-spec-design-pipeline/scripts/test_settle.ts +593 -0
  405. package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +92 -1
  406. package/skills/a2h-spec-design-pipeline/scripts/test_sql_identifier_analysis.ts +137 -0
  407. package/skills/a2h-spec-generate/references/input-formats.md +1 -1
  408. package/skills/a2h-utg-explorer/SKILL.md +11 -5
  409. package/skills/a2h-utg-explorer/references/architecture.md +37 -19
  410. package/skills/a2h-utg-explorer/scripts/audit.mjs +6 -2
  411. package/skills/a2h-utg-explorer/scripts/close_phases.mjs +8 -5
  412. package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +95 -19
  413. package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +192 -4
  414. package/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
  415. package/skills/a2h-utg-explorer/scripts/panel_routes.mjs +1 -1
  416. package/skills/a2h-utg-explorer/scripts/plan.mjs +16 -1
  417. package/skills/a2h-utg-explorer/scripts/predicates.mjs +270 -0
  418. package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +2 -0
  419. package/skills/a2h-utg-explorer/scripts/recover.mjs +4 -3
  420. package/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
  421. package/skills/a2h-utg-explorer/scripts/rejudge.mjs +4 -3
  422. package/skills/a2h-utg-explorer/scripts/report.mjs +32 -2
  423. package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +103 -36
  424. package/skills/a2h-utg-explorer/scripts/run_device.mjs +3 -8
  425. package/skills/a2h-utg-explorer/scripts/schedule_states.mjs +189 -0
  426. package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +9 -0
  427. package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +11 -0
  428. package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +31 -2
  429. package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +1 -1
  430. package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
  431. package/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
  432. package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +4 -1
  433. package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +6 -28
  434. package/skills/a2h-utg-explorer/scripts/tests/in_route_surface.test.mjs +125 -0
  435. package/skills/a2h-utg-explorer/scripts/tests/list_probe_target_wait.test.mjs +86 -0
  436. package/skills/a2h-utg-explorer/scripts/tests/multi_host.test.mjs +167 -0
  437. package/skills/a2h-utg-explorer/scripts/tests/nested_list.test.mjs +58 -0
  438. package/skills/a2h-utg-explorer/scripts/tests/overlay_opener.test.mjs +100 -0
  439. package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +8 -1
  440. package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +1 -0
  441. package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +2 -31
  442. package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +1 -1
  443. package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +56 -7
  444. package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +117 -6
  445. package/skills/a2h-utg-explorer/scripts/tests/state_inventory.test.mjs +414 -0
  446. package/skills/a2h-utg-explorer/scripts/tests/tree_unreliable.test.mjs +197 -0
  447. package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +196 -30
  448. package/skills/a2h-utg-explorer/scripts/utg_explorer/hosts.mjs +146 -0
  449. package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
  450. package/skills/a2h-utg-explorer/scripts/utg_explorer/states.mjs +286 -0
  451. package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +197 -19
  452. package/skills/a2h-utg-static/SKILL.md +3 -3
  453. package/skills/a2h-utg-static/references/extractors.md +7 -0
  454. package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
  455. package/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
  456. package/skills/a2h-utg-static/scripts/compose_overlay.mjs +642 -22
  457. package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
  458. package/skills/a2h-utg-static/scripts/tests/test_in_route_surface.mjs +123 -0
  459. package/skills/a2h-utg-static/scripts/tests/test_overlay_host_effects.mjs +239 -0
  460. package/skills/a2h-utg-static/scripts/tests/test_shared_host_depths.mjs +48 -0
  461. package/skills/a2h-utg-static/scripts/utg_html.mjs +2 -0
  462. package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
  463. package/i18n/skills/a2h-app-migrate/references/specs.example.json +0 -19
  464. package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
  465. package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
  466. package/resource/convert_pipeline_process.svg +0 -114
  467. package/resource/project_architecture.svg +0 -120
  468. package/resource/set_environment.png +0 -0
  469. package/resource/set_multimodel.png +0 -0
  470. package/skills/a2h-app-migrate/references/specs.example.json +0 -19
  471. package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
  472. package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
@@ -1,7 +1,7 @@
1
1
  # Behavior Evidence Ledger Protocol (English)
2
2
 
3
3
  This document is the worker-facing protocol for `behavior-ledger-v3` with the
4
- `static-source-v2` coverage profile in the English install. It describes the
4
+ `static-source-v3` coverage profile in the English install. It describes the
5
5
  immutable evidence that `prepare.mjs` writes, the discovery document a worker
6
6
  owns, both audits, the exact draft fields that bind authoring to discovery, and
7
7
  the digest fences that protect submission and finalization.
@@ -13,7 +13,7 @@ domain, and the English gate keeps its word-count rules (`summary` at least 40
13
13
  words, every step at least 5 words) independently of behavior coverage.
14
14
 
15
15
  `complete` is bounded by the active discovery adapter's capabilities. The
16
- `static-source-v2` adapter proves static structure — sources, composition,
16
+ `static-source-v3` adapter proves static structure — sources, composition,
17
17
  scannable interaction registrations, and the behavior it can state faithfully.
18
18
  Constructs the adapter cannot represent remain semantic-review or partial
19
19
  territory; no worker may claim completeness beyond what the adapter observed.
@@ -37,6 +37,7 @@ behavior/attempt-<n>/<group_id>/
37
37
  | `evidence/<stemOf(page_id)>/candidates.json` | `prepare.mjs` | Immutable input |
38
38
  | `evidence/<stemOf(page_id)>/assertions.json` | `prepare.mjs` | Immutable input |
39
39
  | `evidence/<stemOf(page_id)>/unknowns.json` | `prepare.mjs` | Immutable input |
40
+ | `evidence/<stemOf(page_id)>/contracts.json` | `prepare.mjs` | Immutable input |
40
41
  | `behavior/attempt-<n>/<group_id>/discovery.json` | Worker | Written once per attempt before drafting |
41
42
  | `behavior/attempt-<n>/<group_id>/pre-audit.json` | Pre-audit CLI | Written by the CLI only |
42
43
  | `drafts/attempt-<n>/<stemOf(spec_id)>.json` | Worker | Canonical draft for the attempt |
@@ -71,9 +72,14 @@ paths directly. A worker never writes or edits anything under `evidence/`.
71
72
  {
72
73
  "schema_version": "behavior-ledger-v3",
73
74
  "profile": {
74
- "id": "static-source-v2",
75
+ "id": "static-source-v3",
75
76
  "interaction_rules": "interaction-rules-v2",
76
- "composition_depth": 3
77
+ "composition_depth": 2,
78
+ "composition_edges": ["imports", "references", "instantiates"],
79
+ "composition_inheritance": "body-chain",
80
+ "reach_depth": 3,
81
+ "selection_policy": "direct-then-module-v1",
82
+ "resolution_policy": "producer-reserved-v1"
77
83
  },
78
84
  "snapshot_digest": "sha256-of-the-evidence-document",
79
85
  "composition_roots": ["src/primary.ext"],
@@ -99,7 +105,7 @@ paths directly. A worker never writes or edits anything under `evidence/`.
99
105
  }
100
106
  ],
101
107
  "current_snapshot": {
102
- "profile_id": "static-source-v2",
108
+ "profile_id": "static-source-v3",
103
109
  "snapshot_digest": "sha256-of-profile-and-source-units",
104
110
  "source_units": ["…same SourceUnit objects…"]
105
111
  },
@@ -126,7 +132,10 @@ no page owns the file, to nobody: that case is never silent, it is recorded as a
126
132
  always surfaces as an open question instead of vanishing.
127
133
 
128
134
  `candidates.json`, `assertions.json`, and `unknowns.json` carry the three raw
129
- lists. An assertion is:
135
+ lists. `contracts.json` carries the contract-only call inventory: the call targets
136
+ that are not SourceUnits but still carry an HTTP, UI-construction or persistence
137
+ contract, together with their URL/parameter/resource signals, dispositions, and
138
+ explicit deferred or omitted entries. An assertion is:
130
139
 
131
140
  ```json
132
141
  {
@@ -145,11 +154,11 @@ lists. An assertion is:
145
154
  "uri": "src/primary.ext",
146
155
  "span": {"start": 12, "end": 14},
147
156
  "snapshot_digest": "sha256-of-the-current-snapshot",
148
- "profile_id": "static-source-v2"
157
+ "profile_id": "static-source-v3"
149
158
  }
150
159
  ],
151
160
  "candidate_ids": ["cand_…"],
152
- "provenance": {"method": "structural", "profile": "static-source-v2"}
161
+ "provenance": {"method": "structural", "profile": "static-source-v3"}
153
162
  }
154
163
  ```
155
164
 
@@ -171,7 +180,7 @@ A candidate is a structural signal without a proven user-observable outcome:
171
180
  "trigger": {"kind": "widget", "widget": "primaryAction", "is_trigger": true},
172
181
  "evidence_refs": ["…same reference shape as an assertion…"],
173
182
  "review_status": "pending",
174
- "provenance": {"method": "structural", "profile": "static-source-v2"}
183
+ "provenance": {"method": "structural", "profile": "static-source-v3"}
175
184
  }
176
185
  ```
177
186
 
@@ -231,6 +240,9 @@ add one synthetic review unknown. These are the actual producer contracts:
231
240
  | `interaction` | `review-incomplete` | `no_source` | the page has no scannable source at all; a readable non-code SourceUnit does not produce this |
232
241
  | `interaction` | `source-unread` | `skipped` | the scan was skipped because the page source was unreadable |
233
242
  | `interaction` | `review-incomplete` | `truncated` | a bounded scan left interaction signals unexamined |
243
+ | `operation` | `operation-discovery-partial` | — | the graph read or a request/transport resolution failed, so operation evidence stays partial |
244
+ | `operation` | `operation-discovery-partial` | `reach-truncated` | the bounded call-closure traversal hit its node limit, so a gated call site may be reachable in truth |
245
+ | `operation` | `operation-ownership-unresolved` | `page-reachability` | the page's call closure never expands past its seeds, so every request call site in its footprints was gated away (`gated_call_sites` records how many); a page that still has surviving candidates keeps its gated sites silent, because the gate is an ownership decision, not evidence loss |
234
246
  | `behavior` | `review-incomplete` | `missing-trigger-locator`, `unattachable-trigger-evidence`, or `unrepresentable-guard` | a navigation candidate could not become an assertion but has attachable source evidence |
235
247
  | `behavior` | `review-incomplete` | a computed wrapper argument/default or a scoped wrapper call/declaration resolution failure | literal and independently known default values remain available, but the unresolved entry arguments block the trigger field |
236
248
  | `composition` | `review-incomplete` | `missing-trigger-locator`, `unattachable-trigger-evidence`, or `unrepresentable-guard` | the same navigation candidate has no attachable evidence location |
@@ -274,7 +286,8 @@ review, and `reviewed_digest` must equal its current `content_digest`.
274
286
 
275
287
  `inventory_status` and `unresolved_references` are immutable producer facts and
276
288
  are reported as diagnostics only. Delivery is decided by whether a composition
277
- **unknown** is still open: a lawful resolution (§3.4) closes it, and a reference
289
+ **unknown** is still open: a lawful resolution (§3.4) closes it, unless the gap
290
+ is producer-reserved (`cause:"source-unit-limit"`), and a reference
278
291
  that no longer has an open unknown no longer blocks delivery. This is what makes
279
292
  "resolve the reference" a meaningful instruction instead of a permanent partial.
280
293
 
@@ -291,13 +304,48 @@ uniapp/Vue it means a module specifier that resolves to a project file
291
304
  props, type parameters (`T`), and raw parser expressions are external
292
305
  diagnostics — they never enter `unknowns` and never keep a page partial.
293
306
 
294
- To bound pathological traversal breadth, at most 200 traversal-expanded shared
295
- SourceUnits are snapshotted per page. Every page body, folded overlay, embedded
296
- origin, and instance-peer origin is always retained regardless of this bound.
297
- Each omitted traversal locator is recorded in a composition
307
+ To bound pathological traversal breadth, at most 200 kept traversal-expanded
308
+ shared SourceUnits are snapshotted per page. The composition scope is the page
309
+ body's depth-2 closure over `imports`, `references`, and `instantiates`, plus
310
+ the body's transitive `extends`/`implements` chain; call-only reach is recorded
311
+ as diagnostics (`reach_only`, `behavior_reach_unresolved`) but is not snapshotted.
312
+ Before the bound, composition units another page owns are trimmed: they are that
313
+ page's evidence, not this page's, and the drop is frozen in `trim_exclusions`.
314
+ Every page body, folded overlay, embedded origin, instance-peer origin, direct
315
+ base class, and required entry/operation evidence is always retained regardless
316
+ of this bound. Each omitted traversal locator is recorded in a composition
298
317
  `review-incomplete` unknown with `cause:"source-unit-limit"` and
299
318
  `omitted_source_units`; inventory remains partial. The bound never silently
300
- shrinks the reviewed composition scope.
319
+ shrinks the reviewed composition scope. A `source-unit-limit` gap is
320
+ producer-reserved: no worker `resolutions[]` entry may close it; only a fresh
321
+ prepare with a wider bound or a page split can remove it. A page with any
322
+ omitted SourceUnit is never `delivered-complete`, even when a resolution was
323
+ written.
324
+
325
+ Contract-only call evidence has its own fail-closed gaps. A deferred target
326
+ (unreadable, unclassified wrapper, or one beyond the traversal bound) whose call
327
+ site is inside this page's reviewed scope is frozen as a `scope:"contract"`,
328
+ `reason:"review-incomplete"` unknown with `cause:"contract-call-deferred"`. A
329
+ deferred target reached only through an out-of-scope chain (`from_scope:false`)
330
+ stays a diagnostic in `contract_inventory`/`contracts.json` and does not block the
331
+ page by itself. A target beyond the per-page contract-evidence budget is recorded
332
+ with `cause:"contract-evidence-limit"`. Both unknown causes are producer-reserved,
333
+ keep `inventory_status` partial, and no worker resolution may close them.
334
+
335
+ ### 2.4 Interactions the page does not register itself
336
+
337
+ `interaction_scans` only sees listener registration. When a component or library provides the
338
+ interaction, three pieces of evidence together support one assertion:
339
+
340
+ 1. an interaction interface implemented by the page's code — an empty callback is not
341
+ counter-evidence, because the behavior lives in the component or library;
342
+ 2. a configuration call that produces visible feedback when the user interacts (a selected state,
343
+ an overlay, a touch listener, a gesture detector);
344
+ 3. the rendering source of that feedback — the view, field or text it displays.
345
+
346
+ All three present: write the assertion (trigger = the interaction, outcome = `visible-change`,
347
+ evidence refs to both the configuration call and the rendering source). Configuration without a
348
+ rendering source stays a candidate; do not state what is shown without it.
301
349
 
302
350
  ## 3. Worker Discovery Document
303
351
 
@@ -677,6 +725,7 @@ run behavior-audit.mjs <output> pre <group_id> --attempt <n>
677
725
  write drafts/attempt-<n>/<stem>.json
678
726
  write behavior/attempt-<n>/<group_id>/post-review.json
679
727
  run behavior-audit.mjs <output> post <group_id> --attempt <n>
728
+ submit.mjs <output> <group_id> --token <t> --dry-run --draft <file> ... # gates only; writes nothing
680
729
  submit immediately through submit.mjs
681
730
  ```
682
731
 
@@ -685,6 +734,7 @@ The CLI signatures are:
685
734
  ```bash
686
735
  node scripts/behavior-audit.mjs <output> pre <group_id> --attempt <n>
687
736
  node scripts/behavior-audit.mjs <output> post <group_id> --attempt <n>
737
+ node scripts/submit.mjs <output> <group_id> --token <t> --dry-run --draft <file> ...
688
738
  ```
689
739
 
690
740
  Rules:
@@ -717,7 +767,11 @@ Rules:
717
767
  - G4 recomputes each page's pre-audit from Evidence and discovery and rejects
718
768
  `pre-audit-mismatch`; the editable pre-audit file is a receipt, not a verdict.
719
769
  - Submit immediately after the post-audit through `submit.mjs`; do not keep
720
- editing after submission.
770
+ editing after submission. Run the same command with `--dry-run` first: it
771
+ executes the same G1–G8 gates and writes nothing. A gate-failing submit
772
+ appends `precheck-failed`, keeps the attempt live, and allows up to 3 failed
773
+ submits; after that the attempt is abandoned and retried. A `token mismatch`
774
+ means this attempt is no longer current: stop editing its directory.
721
775
  - Workers cannot reclassify an unknown as specified without new evidence. An
722
776
  unresolved blind spot remains unknown, a refuted review only supports a
723
777
  no-user-observable waiver, and an insufficient review only supports an
@@ -757,6 +811,18 @@ A behavior-enabled draft carries the page discovery digest and explicit links:
757
811
  `discovery.json`; the pre-audit page digest, the post-review `page_digests`
758
812
  value, and every draft for the page must use the same value.
759
813
 
814
+ `coverage.edges[]` entries may carry an optional `claim_token`:
815
+
816
+ ```json
817
+ {"item": "compose-route:OrderSummary", "by_scenario": 3, "claim_token": "order history"}
818
+ ```
819
+
820
+ A supplied token replaces stem derivation and must appear exactly
821
+ (case-insensitively, like every other token) in that scenario's `steps`; a blank
822
+ value is ignored. This is the escape hatch for Compose routes and overlay names
823
+ whose derived token is meaningless (e.g. `OrderSummary` → `summary`,
824
+ `overlay:OptionsDialog`).
825
+
760
826
  `coverage.behaviors[]` accepts exactly these link shapes:
761
827
 
762
828
  ```json
@@ -1049,12 +1115,13 @@ Missing artifacts are distinguished by the submission phase:
1049
1115
  throws.
1050
1116
 
1051
1117
  A page is complete only when composition is closed with no open composition
1052
- unknown, every SourceUnit was read and reviewed at its current digest, no
1118
+ unknown, no SourceUnit was omitted by the producer bound, every SourceUnit was
1119
+ read and reviewed at its current digest, no
1053
1120
  unknown remains, every evidence reference is valid, both audits completed, and
1054
1121
  every assertion is specified or legally waived. Raw
1055
1122
  `unresolved_references`/`inventory_status` are immutable producer diagnostics and
1056
1123
  do not participate in this verdict; a lawful resolution closes the composition
1057
- unknown they describe. A run with any unresolved page
1124
+ unknown they describe unless it is producer-reserved. A run with any unresolved page
1058
1125
  or run-level behavior unknown is `delivered-partial`; the finalize summary
1059
1126
  reports `delivered-partial` and `unresolved_evidence_areas`.
1060
1127
 
@@ -1073,9 +1140,10 @@ plus the four attempt artifacts before evaluation and again after evaluation.
1073
1140
  The maps must be exactly equal, including `null`/missing states; any difference
1074
1141
  is a retryable conflict and that round performs no submit, abandon, or
1075
1142
  publication. The map carried into `commitSubmission` is the pre-evaluation map.
1076
- The four fixed evidence files (`composition.json`, `candidates.json`,
1077
- `assertions.json`, `unknowns.json`) of every behavior page are always seeded as
1078
- digest-or-null, so a missing file cannot appear later as a newly accepted key.
1143
+ The five fixed evidence files (`composition.json`, `candidates.json`,
1144
+ `assertions.json`, `unknowns.json`, `contracts.json`) of every behavior page are
1145
+ always seeded as digest-or-null, so a missing file cannot appear later as a newly
1146
+ accepted key.
1079
1147
 
1080
1148
  `commitSubmission` rechecks under the submission lock:
1081
1149
 
@@ -9,7 +9,7 @@ This document defines the gate identifiers enforced by a2h-page-specgen (`script
9
9
  | ID | Check | Failure handling |
10
10
  |---|---|---|
11
11
  | G1 | Each unit in `plan.json.spec_units[]` has exactly one SPEC; there are no extra SPECs; and expanding `spec_units[]` covers every page in `pages[]`, with no missing or duplicate pages | Hard error |
12
- | G2 | The H1 is `# <title> SPEC` (one space before `SPEC`); there is at least one `## Scenario <N>`; the final section is `## Android Code Reference`; and no `Deviations from Requirement` section is present. Any `Implementation Contract` heading (any level) is rejected: facts live in the steps. Any declared page-level `contracts` container is rejected, even an empty array or object (`{"endpoints": []}` is a declaration, not silence). Every non-empty but unusable `scenarios[].contracts` declaration is an error, even when mixed with usable content; a non-`rules` entry must yield at least one fact token to be usable, so an entry resting on unread fields (`{"note": "…"}`) is reported instead of vanishing. Every fact token of a usable declaration must appear in that scenario's `steps` (the authoring pass merges the facts naturally; the gate proves nothing was dropped; a value the body rules forbid verbatim is rewritten and exempt). Values that start with an ASCII word character (`0`, `1`, `10`, `latitude`, `50%`) match on token boundaries, so one value cannot stand in for another; scheme-qualified URLs match as substrings; a unit label may touch its number (`25°C`); a value starting with a non-ASCII character (a Chinese label or unit) is still a substring match, because running Chinese prose has no word boundary to test. Free-form `rules[].statement` text is not token-checked and stays a review item, as does "the merge did not renumber or reorder the existing steps" (G2 reads the merged draft only, so it cannot compare against the pre-merge step list) | Hard error |
12
+ | G2 | The H1 is `# <title> SPEC` (one space before `SPEC`); there is at least one `## Scenario <N>`; the final section is `## Android Code Reference`; and no `Deviations from Requirement` section is present. Any `Implementation Contract` heading (any level) is rejected: facts live in the steps. Any declared page-level `contracts` container is rejected, even an empty array or object (`{"endpoints": []}` is a declaration, not silence). Every non-empty but unusable `scenarios[].contracts` declaration is an error, even when mixed with usable content; a non-`rules` entry must yield at least one fact token to be usable, so an entry resting on unread fields (`{"note": "…"}`) is reported instead of vanishing. Every fact token of a usable declaration must appear in that scenario's `steps` (the authoring pass merges the facts naturally; the gate proves nothing was dropped; a value the body rules forbid verbatim is rewritten and exempt). Values that start with an ASCII word character (`0`, `1`, `10`, `latitude`, `50%`) match on token boundaries, so one value cannot stand in for another; scheme-qualified URLs match as substrings; a unit label may touch its number (`25°C`); a value starting with a non-ASCII character (a Chinese label or unit) is still a substring match, because running Chinese prose has no word boundary to test. The numeric literals of a `rules[].statement` are facts: every value the rule can be wrong about — a coefficient, an offset, a threshold, an enum value (`1.8`, `32`, `0.446944`, `2`) — must appear in that scenario's `steps`, in the shape the steps would state it (a thousands separator is grouping, not two values: `10,000` is `10000`; a sign is expressed in words, so `-32` is `32`; an exponent is written out: `1e3` is `1000`). A literal that only states how a value is printed is not a fact, because changing it changes the display and not the rule's result, so a field width (zero padding, `00`) and a decimal-place count (the `2` in a rule that keeps two decimal places) are skipped. Every other literal stays required. A rule stated only in numerals written as words stays a review item, as does "the merge did not renumber or reorder the existing steps" (G2 reads the merged draft only, so it cannot compare against the pre-merge step list) | Hard error |
13
13
  | G3 | The body contains no `file:line`, no match against the project symbol table, no framework type names, no `dp/sp/px`/`dip` (with or without a number), no `#hex`, and no assignment or comparison expressions. A scheme-qualified URL that contains `:port` is a URL, not a `file:line`, even when prose is glued to it (`Requesting https://api.x.com:8443/v1`); a name the gate requires as a fact token is not reported as a symbol leak. The same strict rules apply to steps carrying merged endpoint, key, field, and rule facts: data values keep their source spelling and are written as ordinary sentences ("the code field is 1001"), never as `key=value` assignments, and visual values are rewritten as business descriptions. There is no exempt zone | Hard error, with match locations and rewriting guidance |
14
14
  | G4 | Coverage: for behavior-enabled pages, assertion links are the primary authoring-coverage contract and must cover every planned assertion; the legacy UTG denominator (every `out_edges` entry, every `is_trigger` widget, and every interaction signal claimed by a scenario or recorded in `excluded`) remains a secondary check. An interaction signal owned by an immutable interaction-signal candidate defers to that candidate's disposition instead of a standalone token claim: promoted → claim, waived → exclusion, unknown or unfinished → partial. G4 also derives semantic categories from evidence-backed entry assertions and each operation's response roles, requiring the exact operation/category claim in operation-review-owned steps. A missing category is `semantic-category-missing`; unresolved semantic evidence or ownership stays partial. **Evaluate coverage per `page_id`, not per SPEC**—if several SPEC-units share a `page_id`, their combined coverage is sufficient | Hard error; an incomplete audit or unresolved blind spot stays partial and is not a G4 failure |
15
15
  | G5 | Every `file:line` in `anchors` exists under `<source-project>`, and its line number is valid | Hard error |
@@ -17,6 +17,8 @@ This document defines the gate identifiers enforced by a2h-page-specgen (`script
17
17
  | G7 | For page SPECs, the difference between `est(P)` and the actual scenario count exceeds 2×; shared SPECs are exempt because their fixed `est` is not a scenario estimate | Add a G7 entry to `warnings` and record it in `report.md` |
18
18
  | G8 | `deps` is non-empty but has no non-empty `deps_reason` entry | Add a G8 entry to `warnings` and record it in `report.md` |
19
19
 
20
+ **Request-body field tables are step text.** A table whose rows carry four labels (`field:` / `type/encoding:` / `default:` / `send:`) lives inside the request step, so G2, G3 and G6 read it as that step's own text: the parameter-name, default and value-source tokens that `contracts.endpoints[].params` declares must appear inside the table; G3's prose rules apply to every table line (a path glued to `:0` reads as a `file:line`, and `default=false` reads as an assignment); and the step keeps its single `- N. ` marker with the table as a top-level fenced block.
21
+
20
22
  **Core gates**: G3, G4, and G5 are the core gates.
21
23
  - **G3** ensures that the SPEC describes implementable business behavior rather than restating source code.
22
24
  - **G4** ensures that every discovered assertion and every claimable interaction is accounted for, and that genuine blind spots stay partial rather than silently passing.
@@ -62,10 +64,12 @@ their existing delivery outcomes and do not also fail as
62
64
  `semantic-category-missing`; invalid records still fail.
63
65
 
64
66
  An incomplete pre-audit or post-review, an unresolved unknown, an **open
65
- composition unknown**, or an unread SourceUnit remains partial. Raw
67
+ composition unknown**, a producer-omitted SourceUnit, or an unread SourceUnit remains partial. Raw
66
68
  `unresolved_references` and `inventory_status` are immutable producer diagnostics:
67
69
  they never decide delivery by themselves, because only a composition unknown can
68
- be closed by a lawful resolution. Closure is therefore "no unresolved
70
+ be closed by a lawful resolution, and `source-unit-limit`,
71
+ `contract-call-deferred` and `contract-evidence-limit` gaps are producer-reserved
72
+ and cannot be closed by discovery at all. Closure is therefore "no unresolved
69
73
  composition unknown", not "the producer recorded no reference". It is never
70
74
  converted into a G4 failure merely because it is partial, and it is never
71
75
  reported as complete. G7 estimate and G8 dependency warnings keep their
@@ -121,7 +125,13 @@ Every `by_scenario` must be a **valid 1-based index** into `scenarios[]`.
121
125
 
122
126
  The `claim_token` for each item must appear in the referenced scenario's steps — the text formed by joining that scenario's `steps` array with single spaces. The scenario title is **not** searched. When several interactions share one source line, the claim is satisfied by the `claim_token` of any interaction at that line; a line carrying a single interaction still requires that interaction's own token.
123
127
 
124
- The script derives `claim_token` from the item; the LLM does not supply it. If the token is absent from the body, the result is a **hard error**, with the message "scenario N does not describe X".
128
+ A draft may supply the token for an `edges` claim. Compose routes and overlay names (`compose-route:OrderSummary`, `overlay:OptionsDialog`, …) derive a meaningless trailing segment, so the claim itself may carry `claim_token`:
129
+
130
+ ```json
131
+ {"item": "compose-route:OrderSummary", "by_scenario": 3, "claim_token": "order history"}
132
+ ```
133
+
134
+ A supplied token is trimmed and matched exactly (case-insensitively, like every other token) against that scenario's `steps`; an empty or whitespace-only value is ignored and derivation applies. Without a supplied token the script derives `claim_token` from the item. If the token is absent from the body, the result is a **hard error**, with the message "scenario N does not describe X".
125
135
 
126
136
  This is the substance of G4: the LLM cannot pass merely by saying "I listed it in coverage"; it must write the item into the visible body of a scenario.
127
137
 
@@ -129,15 +139,17 @@ This is the substance of G4: the LLM cannot pass merely by saying "I listed it i
129
139
 
130
140
  Listing an item in `coverage` does not claim it. The visible body of the corresponding scenario must contain that item's `claim_token`, ensuring that the user-perceivable behavior is actually written into the SPEC.
131
141
 
142
+ Run the gates without consuming the attempt by adding `--dry-run` to the submit command: it executes the same G1–G8 checks, writes no ledger event, and publishes nothing. A real gate-failing submit appends `precheck-failed` and keeps the attempt live for up to three failed submits; only the exhausted budget abandons the attempt.
143
+
132
144
  ---
133
145
 
134
146
  ## 3. `claim_token` Derivation Table
135
147
 
136
- The script derives `claim_token` from each item; the LLM does not supply it.
148
+ The script derives `claim_token` from each item unless the draft supplies one. A draft-supplied token is currently accepted only on `edges` claims; widgets keep stem derivation and interactions keep their predefined signal token.
137
149
 
138
150
  | Item type | `claim_token` derivation | Example |
139
151
  |---|---|---|
140
- | `edges` | The `target` node's `label`: strip the page-kind prefix (`fragment:` / `activity:` / `screen:` / `page:` / `compose-route:` / `compose-route-variant:` / `hybrid-page:` / `pager-page:` / `view-page:` / `voyager-screen:`), strip the type suffix (`Fragment` / `Activity` / `Screen` / `Controller` / `ViewController` / `Page` / `Dialog` / `Service`), split camelCase and acronym boundaries, prefer a known concept word and otherwise take the last segment, then lowercase | `fragment:SearchMenuFragment` → `search` |
152
+ | `edges` | A draft-supplied `claim_token` wins; otherwise the `target` node's `label`: strip the page-kind prefix (`fragment:` / `activity:` / `screen:` / `page:` / `compose-route:` / `compose-route-variant:` / `hybrid-page:` / `pager-page:` / `view-page:` / `voyager-screen:`), strip the type suffix (`Fragment` / `Activity` / `Screen` / `Controller` / `ViewController` / `Page` / `Dialog` / `Service`), split camelCase and acronym boundaries, prefer a known concept word and otherwise take the last segment, then lowercase | `fragment:SearchMenuFragment` → `search` |
141
153
  | `widgets` | The widget id — the coverage item before `@` — with a trailing widget-type suffix (`Btn` / `Button` / `Tv` / `TextView` / `Iv` / `ImageView` / `View` / `Layout`) stripped, then derived the same way as an edge label. Widget records carry **no** `label` field, so there is nothing else to fall back to | `searchBtn@layout/home_fragment.xml:65` → `search` |
142
154
  | `interactions` | The `claim_token` predefined for that signal in the interaction-signal rules (fixed for each signal when it is collected) | `setOnRefreshListener` → `pull to refresh` |
143
155
 
@@ -157,6 +169,14 @@ Derivation never returns an empty string: when nothing survives the prefix strip
157
169
 
158
170
  **Validation**: The word `search` must appear in the text formed by joining scenario two's `steps`. The scenario title does not count.
159
171
 
172
+ #### Example 1b: Compose route with a draft-supplied token (edges)
173
+
174
+ **Item**: `{"item": "compose-route:OrderSummary", "by_scenario": 3, "claim_token": "order history"}`
175
+
176
+ **Derivation**: `OrderSummary` would derive `summary`, which does not name the page's subject.
177
+
178
+ **Validation**: The exact string `order history` (case-insensitive) must appear in scenario three's `steps`.
179
+
160
180
  #### Example 2: Widget (widgets)
161
181
 
162
182
  **Item**: `{"item": "searchBtn@layout/home_fragment.xml:65", "by_scenario": 2}`
@@ -274,6 +294,12 @@ coverage.edges is missing the outgoing edge "fragment:SettingsFragment"
274
294
  - Add the step "open the settings page" to a scenario's steps.
275
295
  - Add the corresponding entry to `coverage.edges` and point it to that scenario.
276
296
 
297
+ If the failure is `No claim token derivable for edge "compose-route:…"` (a Compose route or overlay name), do **not** hide the edge in `coverage.excluded`. Give the claim its own token and write that phrase into the step:
298
+
299
+ ```json
300
+ {"item": "compose-route:OrderSummary", "by_scenario": 2, "claim_token": "order history"}
301
+ ```
302
+
277
303
  ### 7.3 G5 Failure: Nonexistent Android Code Reference
278
304
 
279
305
  **Failure example**:
@@ -307,7 +333,7 @@ After drafting, review the following checklist:
307
333
  - [ ] G2: No `Implementation Contract` heading at any level is present; facts are merged into the consuming steps.
308
334
  - [ ] G2: Non-empty page-level `contracts` is absent — any declared container counts, even `{"endpoints": []}`; every non-empty `scenarios[].contracts` declaration is usable and every fact token (URL, method, parameter name, response field, key, default, enum value, field name, unit) appears in that scenario's steps, and every numeric enum value appears as its own value (`10` does not cover `1` or `0`).
309
335
  - [ ] G2: The merge rewrote step text without deleting, merging, reordering, or renumbering existing steps (append-only at the end); the gate cannot verify this, so it is a review item.
310
- - [ ] Contracts: Enumerations are complete, with no vague endings such as "etc." or "and so on"; rule statements are checked against the steps by review because they are not token-matched.
336
+ - [ ] Contracts: Enumerations are complete, with no vague endings such as "etc." or "and so on"; every numeric literal in a rule statement that the rule can be wrong about (coefficient, offset, threshold, enum value) appears in the consuming steps in the shape the steps state it (a thousands separator groups, a sign is written in words, an exponent is written out), while display-only literals (field width, decimal-place count) are not required; non-numeric rule prose is checked against the steps by review.
311
337
  - [ ] G4: For behavior-enabled pages, `discovery.json` contains every immutable assertion unchanged plus only validated semantic additions.
312
338
  - [ ] G4: `pre-audit.json` and `post-review.json` exist for the same attempt, and the group discovery, every page entry, the pre-audit, and the post-review `attempt` values agree.
313
339
  - [ ] G4: The group discovery digest, each page discovery digest, the post-review `page_digests`, and every draft `discovery_digest` agree; the post-review `drafts_digest` covers all canonical group drafts.
@@ -9,19 +9,20 @@ The final SPEC must follow these rules:
9
9
  - Atomic scenarios must be comprehensive and non-redundant.
10
10
  - The SPEC must contain a requirement semantic description, scenario semantic descriptions, and scenario flow descriptions.
11
11
  - The scenario flow description must contain the trigger operation sequence and the logical execution steps for that scenario.
12
+ - Every interactive element must name its observable result, including interactions provided by a component or a library (a missing listener in application code does not mean there is no interaction); when there is genuinely no interaction, state "no response" and cite the evidence.
12
13
 
13
14
  The sections below define how to apply them. The rules constrain only the final SPEC prose; evidence collection still keeps source symbols, paths, and `file:line`.
14
15
 
15
16
  ## Evidence-First Expansion
16
17
 
17
- Expand only branches that the source actually implements and that affect user-observable behavior. Every scenario, step, and outcome must be traceable to source evidence. Do not fill gaps with behavior that is merely common in similar products.
18
+ Expand only branches that the source actually implements and that affect user-observable behavior. Every scenario, step, and outcome must be traceable to a source location or an evidence entry; when it cannot be traced, do not write it — record an unknown rather than filling the gap from experience or with behavior that is merely common in similar products.
18
19
 
19
20
  - Do not add timeout, permission, retry, or empty-state scenarios without evidence just because software of this kind usually has them.
20
21
  - Fixed copy, the source of dynamic copy, counts, thresholds, formats, retention policies, and recovery behavior all require evidence. Never invent fixed error copy or replace dynamic copy with an unsupported literal value.
21
22
  - When the source implements dynamic error copy, state its real source, for example: “Show an error message using the text returned by the server.”
22
23
  - A failure without a textual message is valid. Write only the actual observable outcomes, such as loading ending, old content remaining, or another real result; for example: “When the request finishes, stop loading and retain the old content without showing an additional message.”
23
24
  - An internal failure with no user-observable outcome does not become a UI scenario. Never invent a message, navigation, or state change just to cover a failure category.
24
- - **Evidence for "what the UI shows" comes from the render branch, not from a state assignment**. A ViewModel assigning a state value (e.g. `loadMoreState = PullToLoad` on an empty list) only says the value exists, not that it is drawn. Before writing a "shows / displays / appears" step, find the UI code that renders in that state (the Compose `when (state)` / `if` branch, the View `visibility` setting, the adapter item type) and confirm that branch reads the value and draws the element. If the branch does not read it, do not write it as a visible element; when it must be recorded, write it as an invisible state fact (e.g. "the load-more state is reset to its initial value"), without "shows". The CoolMall order list: `BaseNetWorkListView`'s `Empty` branch draws only `EmptyData`, and the load-more footer exists only inside the `Success` list content. The SPEC turned the `PullToLoad` assignment on an empty list into "the tab's bottom shows the pull-to-load initial state", the review judged it PARTIAL, and after the fix every empty tab showed "pull up to load more" at the bottom.
25
+ - **Evidence for "what the UI shows" comes from the render branch, not from a state assignment**. A ViewModel assigning a state value (e.g. the load state reset to its initial value on an empty list) only says the value exists, not that it is drawn. Before writing a "shows / displays / appears" step, find the UI code that renders in that state (the Compose `when (state)` / `if` branch, the View `visibility` setting, the adapter item type) and confirm that branch reads the value and draws the element. If the branch does not read it, do not write it as a visible element; when it must be recorded, write it as an invisible state fact (e.g. "the load-more state is reset to its initial value"), without "shows". One app's list page: the list base class's `Empty` branch draws only an empty-state view, and the load-more footer exists only inside the `Success` list content. The SPEC turned the load-state assignment on an empty list into "the tab's bottom shows the pull-to-load initial state", the review judged it PARTIAL, and after the fix every empty tab showed "pull up to load more" at the bottom.
25
26
 
26
27
  ## Atomic Scenarios
27
28
 
@@ -39,12 +40,13 @@ An atomic scenario is the smallest independently verifiable user-perceivable pat
39
40
  | Normal | representative happy path with typical data | entry and first frame, data ready, primary interaction |
40
41
  | Edge/boundary | the edge of the valid domain | empty, minimum, maximum, duplicate, conflict, denied, timeout, interrupted |
41
42
 
42
- Do not compress normal, empty-data, failure, timeout, or recovery paths into multiple “if” alternatives within one scenario merely to shorten the SPEC. Each of these paths still requires source evidence. Consecutive display steps under the same data-ready state may remain in one scenario.
43
+ Do not compress normal, empty-data, failure, timeout, or recovery paths into multiple “if” alternatives within one scenario merely to shorten the SPEC. Each of these paths still requires source evidence. Continuous display steps inside the same submodule may remain in one scenario; different visible submodules must not be merged merely because they share a data-ready state.
43
44
 
44
45
  - Keep one scenario for one trigger plus one outcome.
45
46
  - Do not split fields or items that share source, format, visibility, and empty behavior.
46
47
  - A noun-only change (“the first song” / “the second song”) is data, not a scenario.
47
48
  - Split when success and failure are mixed in one scenario, or when two unrelated outcomes appear.
49
+ - A shared data state is not a merge license: display that lands in different source containers, adapters, custom views, child fragments, or independent layout regions is a different submodule, and each submodule's observable result needs its own scenario.
48
50
 
49
51
  ## Source Inspection Axes for Scenario Expansion
50
52
 
@@ -52,7 +54,7 @@ Before drafting, inspect the source for the page's actual behavior along every a
52
54
 
53
55
  | Axis | Source checks |
54
56
  |---|---|
55
- | Input and submission | Empty input, whitespace-only input, leading/trailing whitespace, valid input, length boundaries, over-limit input, invalid characters, clearing, repeated submission, rapid consecutive submission |
57
+ | Input and submission | Empty input, whitespace-only input, leading/trailing whitespace, valid input, length boundaries, over-limit input, invalid characters, clearing, repeated submission, rapid consecutive submission; for a numeric input also confirm integer versus decimal and whether a negative value is accepted |
56
58
  | Data display | No cache, existing cache, loading, complete data, missing fields, empty fields, data-source precedence, fallback, conditional hiding, formatting boundaries |
57
59
  | Network requests | No network, connection failure, connection/read timeout, service or business failure, empty response, malformed response, missing fields, retries implemented in source, old-content policy |
58
60
  | Lists and pagination | Initial load, empty list, exactly one page, more than one page, append/replace, loading completion, pagination failure, relationship between refresh and pagination |
@@ -77,8 +79,11 @@ A scenario flow description consists of the trigger operation sequence and the l
77
79
  “Precondition → user/system trigger → validation/processing → in-progress state → observable outcome → completion” is an optional inspection order, not a set of slots every scenario must fill. Organize steps around the stages the scenario actually passes through; never add unsupported content to complete the sequence.
78
80
 
79
81
  - Each step expresses one verifiable action, processing rule, or observable outcome; do not compress independent branches into one step.
82
+ - Write every decision with three things: how it is determined (which key, field, or response, which value counts as true, when it is read), what happens when it holds, and what happens when it does not; state the branch with no observable result too.
83
+ - A state word ("signed in", "authorized", "enabled") is not a test: name what is read, what it is compared against, and when. For example, "signed in" becomes "reads the login credential from local storage on entry; non-empty means signed in, empty sends the user to the login page".
80
84
  - Name the actor, target, and result so a reviewer can tell who does what to which object under which state, and what is observed afterward.
81
85
  - State source-backed fixed copy, dynamic-copy sources, counts, thresholds, formats, units, and ordering. Never supply a value that lacks evidence.
86
+ - Self-check a numeric step: from that sentence, can a reader tell whether `-1`, `0.5` and `12.345` are accepted? If not, the step is not yet assertable.
82
87
  - A pure display scenario must state at least its entry condition or data state, its data source or derivation, and the concrete display result.
83
88
  - Both dynamic error copy and silent failure are valid when they match the source; not every error needs a fixed literal message.
84
89
  - Do not replace necessary steps with abbreviated cross-scenario references such as “same as above,” “follow scenario 1,” or “same as scenario 2.” Every scenario must independently state its own trigger, processing, and outcome.
@@ -88,6 +93,22 @@ A scenario flow description consists of the trigger operation sequence and the l
88
93
 
89
94
  Do not introduce a minimum of two steps per scenario or a minimum of 12 characters per step. English retains the existing floors of at least 5 words per step and at least 40 words in the summary. A complete, concise one-step scenario is valid.
90
95
 
96
+ ### Data Sources and Processing Destinations
97
+
98
+ Every data boundary names **two sides**.
99
+
100
+ **Present side**: where it comes from (a full response field path, a local-storage key, a page input, a fixed value, or a computed value) and what happens to it afterwards (the display region, the computation, the key it is written to, the request field it is sent as).
101
+
102
+ **Absent side**: the sibling data this step does **not carry, write or send**, and where an empty, missing or default value goes.
103
+
104
+ The absent side cannot be dropped: a reader cannot infer “the rest is absent” from “one item was mentioned”, and an implementation fills the “nothing” with a plausible value (`-1`, `0`, an empty string) that the downstream treats as a filter. Name the absent item itself (“does not carry <item>”, “does not send <field>”, “does not write <key>”); “the rest is unchanged”, “as needed” or “depending on the case” are not substitutes.
105
+
106
+ When one data set is used by several entries or branches, the carried items line up one by one; an item that only one entry carries must be written as “not carried” by the others.
107
+
108
+ **Three-part closure**: every value states where it comes from, how it is processed and where it is consumed - a near-synonym field follows the one the consuming code reads, never the field name; processing names the inputs that can change the result and the difference after they change; consumption names the display region, computation, key or parameter. When two inputs produce the same result, that assertion does not prove the input takes effect.
109
+
110
+ When a scenario has several sources, each step states which one it reads.
111
+
91
112
  ### Natural merge: contract facts enter the steps
92
113
 
93
114
  Before submitting the draft, do one merge pass: rewrite every fact in that scenario's `contracts` into the step that consumes it, as a natural English sentence. The drafting model performs this step; it is not a mechanical appendix.
@@ -100,6 +121,7 @@ Real `response_spans` map `callback`, `promise`, `complete`, and `response-inter
100
121
  - Copy data facts with their source spelling; do not write class or method names, `file:line`, assignment expressions, `dp`/`sp`/`px`/`dip` (including a bare unit name), or colour values; a field, parameter, or key name the contract requires verbatim is a fact the steps must carry, not a source symbol; rewrite visual values as business descriptions ("the size is large").
101
122
  - Never write a sub-heading or note paragraph, and never use "same as above" or "as in scenario 1".
102
123
  - Self-check: walk the `contracts` entries and confirm that the URL, method, every parameter name, response field, every key name, default, all enum values, and every field name appear in this scenario's steps.
124
+ - Self-check the numbers in a rule: every value in `rules[].statement` that the rule can be wrong about (a conversion coefficient, an offset, a threshold, an enum value such as `1.8`, `32`, `2`) must appear in the step that consumes the rule, in the shape the step states it — a thousands separator only groups digits (`10,000` is written `10000`), a sign is written in words (`-32` becomes "subtract 32"), and an exponent is written out (`1e3` becomes `1000`); a literal that only describes how a value is printed (a zero-padded field width, the count in "keep 2 decimal places") is not a fact, and G2 does not require it.
103
125
 
104
126
  **Cross-boundary implementation facts**: a method or gRPC service and method, a URL or service endpoint, headers or metadata, field names, protocol commands, and keys are first written into the consuming scenario's `contracts`, then merged into the same scenario's steps together with the observable behaviour they produce.
105
127
 
@@ -110,6 +132,8 @@ Real `response_spans` map `callback`, `promise`, `complete`, and `response-inter
110
132
  | Persistence | Key, type, default, all values, fields | The step that reads or writes persistence |
111
133
  | Callback / observer / event | Registration, trigger condition, payload fields, ordering and timing | The step that triggers and refreshes |
112
134
 
135
+ Every row above also states the absent side: which fields are not queried or sent, which keys are not written, which payload fields are absent. Stating only the present ones is not complete.
136
+
113
137
  **Localizable copy and enums**: when copy or an enum label comes from a localizable resource (`strings.xml` / `plurals` / `string-array`, UniApp `i18n/*.js`, etc.) that is not marked `translatable="false"`, the body still carries assertable text: give the logical name and every language's value, e.g. “show localizable copy `confirm_text` (zh: `确定` / en: `OK`)”, with the current UI language selecting which one is displayed. Never keep only the `default` or one language column, and never drop the per-language values in favour of just “displayed per the current UI language”. An enum fixes only its language-neutral values and lists labels per language. Write the mapping into that scenario's steps, e.g. “the confirm copy's logical name is confirm_text, zh is 确定 and en is OK; Android reads strings.xml confirm_text, and HarmonyOS resolves the same logical name into string.json — never assume the resource name matches Android”. Only a `translatable="false"` resource may be copied verbatim; a hardcoded non-resource literal is still copied as-is.
114
138
 
115
139
  **Flow anti-patterns**:
@@ -165,16 +189,39 @@ Timing wording follows the source: "refreshes immediately" when it takes effect
165
189
 
166
190
  ## Request Bodies and Responses
167
191
 
168
- When a scenario performs a network request, its request body must be written key by key in `contracts.endpoints` — never “call the endpoint” or a bare URL; the response should also be described key by key where possible. The contracts are the fact base: the method, the complete URL, every parameter name and every response field must be merged into the consuming request step as natural sentences (see `spec-template.md` 1.4).
192
+ When a scenario performs a network request, write the request body as a **tree-shaped field table inside the request step that sends it**. Write the response key by key.
193
+
194
+ The table has four fixed, labelled segments in a fixed order and is a top-level fenced code block, so every renderer keeps its line breaks:
195
+
196
+ ```text
197
+ <Request body name>
198
+ ├─ field:<path> type/encoding:<type> default:<value> send:<rule>
199
+ ```
200
+
201
+ - **Write every key**: list each key of the source's request-body construction, including keys that are **always the default**, **always sent**, or **never sent on this page**; dropping one is a failure, and fields may not be picked by scenario. **A field with a default is not necessarily sent** — whether it appears must be confirmed from the source's serializer or request-construction site.
202
+ - `field:` a top-level field is written with its plain name; a nested leaf is `a.b`; an array element is `a[].b`; the array itself is `a[]` (type `array<T>`). A parent object appears together with its children; give it its own `object` row only when the parent itself carries a send rule.
203
+ - `type/encoding:` only the closed vocabulary `string`, `int`, `int64`, `float`, `double`, `bool`, `object`, `array<T>`; put a time format, a byte encoding or a radix in parentheses (`string(yyyy-MM-dd HH:mm)`, `string(Base64)`, `int(>=1)`). Never write "text" or "number" as loose prose, and keep the token byte-identical to the contract's `type`.
204
+ - `default:` `—` means the field has no default value; strings are quoted; write only the value, never whether the key is sent.
205
+ - `send:` one decidable English sentence stating when the key appears on the wire, starting with exactly one of:
206
+ - `required`: the key is always present. Stop there when a missing source value is a defect; add ", falls back to the default" when the default fills it, and name the source or failure when it matters, for example ", falls back to the default unknown when it cannot be read";
207
+ - `optional`: the key may be absent, immediately followed by a decidable condition written as ", not sent when <condition>" or ", sent only when <condition>", for example ", not sent when it has no value", ", not sent when the array is empty", ", not sent when it equals the default 0", ", not sent when the source cannot be determined", ", not sent when the user specifies no insert position";
208
+ - `never`: never appears; the field stays in the data model and is skipped when serializing.
209
+ - Whether a key is sent follows the source's serializer or request-construction site: a nullable field, a field with a default, and a model-required field do not mean "always sent"; a field with a default may be omitted when it equals the default, and may also always be sent.
210
+ - The condition must be writable as a single `if`: name a concrete condition such as "has no value", "the array is empty", "equals the default", "the control is off", "nothing is selected", "cannot be read", "the source cannot be determined". Never write "as needed", "depending on", "generally", "maybe"; list every condition separately instead of "except in special cases".
211
+ - `required` and `optional` differ only in whether the key is always present; the `default:` segment says what value fills a missing value and never whether the key appears, so the two segments never substitute for each other. A boolean that uses `false` for "the user set nothing" must say "not sent when it equals the default false", not "not sent when it has no value".
212
+ - When writing a condition, "no value" means unassigned or `null`; for strings and arrays a length of 0 also counts as no value; `0` and `false` count as values.
213
+ - Start the step with an executable action, not a caption such as "the structure is as follows": "the request body is serialized field by field from the table below and then sent; the key order follows the table's row order and whether a key appears follows the send segment".
214
+ - Separate the segments with at least one space: the path after `field:` must not be glued to the next segment, or the path and `default:` read as a `file:line`; write `default:false`, never `default=false`; no table line starts with `#`.
215
+ - Name the table root in business terms (for example "sync request body"), never with the request type name from the source.
216
+ - When a field's value does not come from this page's input (local storage, the previous response, a fixed value, a computed value), add one line after the table naming each such field, for example: "Value sources: `userId` is the current signed-in user number in local storage, `deviceId` is the device identifier in local storage, and `payload` is the pending-queue record count." Fields fed by page input need no entry.
217
+
218
+ **Relation to the contracts.** Each table row is also declared once in that scenario's `contracts.endpoints[].params` with `in: "body"`, byte-identical. The contracts are the audited fact base: G2 compares every parameter name, default and value source against the step text, and one missing token fails the gate. The table is what the reader and the downstream coder see. Query parameters, path parameters and headers are listed the same way with their own `in`; key names, defaults and fixed values follow the source — never guess, and never drop a key that has a default.
219
+
220
+ **Response.** List one field path per string in `response_fields[]` (`current_temperature`, `hourly.temperatures[]`); the envelope (code/data/message), types, nullability and the handling of a missing or default-valued field go into that endpoint's `note` and are merged into the step — never into a `response_fields` element, because G2 requires each element to appear verbatim in the step.
169
221
 
170
- - For each request-body key, state its name, type, required flag, default value (what is sent when absent), nested structure, and value source (UI input, local storage, the previous response, or a fixed value); list query parameters, path parameters, and headers the same way, marking each one's `in`.
171
- - **State per field whether it is sent on the wire**: mark every parameter required or not; for a non-required one, write in its `note` the send rule — when it is not sent (no selection, empty, equals its default, the control is off, and so on), or that it is always sent with its default. When the source platform's serializer omits defaults, empty strings or empty arrays, write “the request body does not contain this field while it equals its default”; never summarize as “empty when absent” or send the default as an empty value — a receiver may treat the field's presence as a filter condition; when a field really is always sent, write “always sent, uses the default value” instead of inventing an omission condition to fit the format. HarmonyOS keeps the same send semantics.
172
- - Use only the keys listed in `spec-template.md`: write the default and the value source into that parameter's `default` and `source`, and write nested keys as a path (e.g. `data.list[].id`) in `name`; any other key cannot reach the steps and is rejected by G2.
173
- - When the body is an object or an array, state the nesting and every child key; never write “other fields,” “etc.,” or a single sample value.
174
- - For the response, try to list one field path per string in `response_fields` (e.g. `current_temperature`, `hourly.temperatures[]`), naming only the field or its path; the envelope (e.g. code/data/message), types, nullability, and how a missing or default-valued field is handled go into that endpoint's `note` and are merged into the steps — never into a `response_fields` element, because G2 requires each element to appear verbatim in the steps.
175
- - Key names, defaults, and fixed values follow the source: when the SPEC does not state them, read the place in the source that builds the request and parses the response and fill them in — never guess, and never drop a key that has a default.
222
+ **G2 checks verbatim.** A method, URL, parameter name, parameter default, value source or response field present in the contracts but absent from the steps fails the gate. The envelope, types, nullability and missing-value handling are outside that check and must still be written into the steps, not left in `contracts` alone.
176
223
 
177
- G2 checks the method, URL, parameter names, parameter defaults, value sources and response fields verbatim: a fact present in the contracts but absent from the steps fails the gate. The envelope, types, nullability and missing-value handling are outside that check and must still be written into the steps, not left in `contracts` alone.
224
+ When the same request appears in several scenarios, each scenario repeats the complete table; never write "same as above" or "see scenario 1". The send condition lives only in the table; the steps state the server behaviour or the user-visible result once the condition holds. When the body is an object or an array, state the nesting and every child key; never write "other fields", "etc.", or a single sample value.
178
225
 
179
226
  ## Platform-Neutral Body Text
180
227
 
@@ -215,6 +262,8 @@ The SPEC is a contract for reimplementation: a statement that cannot become code
215
262
  | “show the corresponding message” / “give a prompt” | Show the toast “Added to playlist” (copy the UI text verbatim) |
216
263
  | “prompt the user when the name is too long” | When the trimmed name is longer than 100 characters, show the toast “Playlist name is too long” |
217
264
  | “several” / “a certain number” / “relatively large” / “relatively long” | 100 characters / 500 milliseconds / at most 20 items |
265
+ | “accepts digits only” / “numeric keyboard” | State the numeric type and sign: integer or decimal, and whether a negative value is accepted; also state the decimal places, bounds, leading zeros, thousands separators, whitespace and invalid-character handling that the source implements |
266
+ | “signed in” / “signed out” with no test | State the test: which storage key or field is read, which value counts as signed in, and when it is read |
218
267
  | “sort by a certain rule” | Sort by time added to the playlist, descending |
219
268
  | “perform the corresponding handling” / “run the necessary validation” | Validate in order: trim whitespace → check empty → check length ≤ 100 |
220
269
  | “store locally” | Write to the playlist persistent storage; it still applies after the page is reopened |
@@ -265,11 +314,16 @@ Before submission, confirm all of the following:
265
314
  - Every "shows / displays / appears" step maps to the UI branch that actually renders it in that state (`file:line`), not only to a ViewModel state assignment. Check empty, error and loading states especially: their branches usually draw a single placeholder component.
266
315
  - Asynchronous operations were checked for in-progress, success, and the failure states implemented in source.
267
316
  - Persistent operations were checked for write outcomes and read-back behavior.
317
+ - Numeric inputs state integer versus decimal and whether a negative value is accepted, with no “accepts digits only” standing in for the type; the decimal places, bounds, whitespace and invalid-character handling the source implements are written out, and no unimplemented constraint is written as existing behavior.
318
+ - Every data boundary names both sides — present (source and destination) and absent (what it does not carry, write or send, and where empty, missing or default goes); entries over one data set line up item by item, absent items are written out, and absence is never written as -1, 0 or an empty string.
319
+ - Every value answers where it comes from (including the field’s origin in the consuming code), how it is processed (including the inputs that change the result and the difference after they change), and where it is consumed; missing any of the three leaves the scenario incomplete.
320
+ - Every branch states how its condition is determined and both outcomes; every step traces to a source location or an evidence entry; whether a key is sent follows the source serializer, never a nullable field, a default value, or a model-required flag.
268
321
  - Scenarios that create, read, update, or delete data, or synchronize state or data, list every affected piece of data and how it changes, with no vague “related data updates in sync.”
269
- - Network scenarios give every request-body key's name, type, required-or-not flag, default value, value source and send rule (when a non-required field is absent, or that it is always sent with its default) in `contracts.endpoints`, describe the response structure as fully as possible, and merge those facts into the request step.
322
+ - Network scenarios write the request body as a field table inside the sending step, each row carrying the four labelled segments `field:`, `type/encoding:`, `default:` and `send:`; declare the same fields in `contracts.endpoints[].params`, list every value source that is not page input, start every send segment with `required`/`optional`/`never` and follow it with a decidable condition (never "as needed" or "depending on"), describe the response structure as fully as possible, and keep all of these facts in that same step.
270
323
  - No vague phrase such as “handle all other errors uniformly” substitutes for concrete branches.
271
324
  - Every scenario is independently readable, with no abbreviated cross-scenario references and no unsupported copy, branches, thresholds, or outcomes added to fill gaps.
272
325
  - Each scenario is exactly one normal or one edge/boundary case, with no success/failure mix.
326
+ - Every independent visible submodule (different source container, adapter, custom view, child fragment, or layout region) has its own scenario; none is merged merely because it shares a data state.
273
327
  - Every scenario flow starts with its trigger operation sequence and ends with the observable outcome.
274
328
  - The body carries no leftover source symbols, framework types, resources, package names, paths, or carrier detail.
275
329
  - No banned wording; numbers instead of quantifiers; complete enumerations; verbatim toast copy (localizable resources give the logical name and every language's value; non-resource literals stay verbatim).