@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.
- package/README.md +249 -279
- package/agents/code-reviewer.md +1 -1
- package/dist/cli/editors.json +20 -0
- package/dist/platform/registry.js +1 -0
- package/dist/platform/validate.js +2 -1
- package/i18n/agents/code-reviewer.md +1 -1
- package/i18n/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/i18n/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
- package/i18n/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/i18n/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +32 -15
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +148 -89
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +9 -3
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +14 -12
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +1 -1
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +3 -2
- package/i18n/skills/a2h-page-specgen/SKILL.md +36 -5
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +89 -21
- package/i18n/skills/a2h-page-specgen/references/gates.md +33 -7
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +166 -32
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +8 -5
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +37 -1
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +19 -10
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +62 -3
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +116 -6
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +26 -14
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +216 -216
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +100 -15
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +118 -25
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +104 -19
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +155 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +75 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +124 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +106 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +12 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +11 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
- package/i18n/skills/a2h-resource-convert/SKILL.md +1 -1
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
- package/i18n/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +15 -12
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +5 -3
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +1 -1
- package/i18n/skills/a2h-utg-explorer/SKILL.md +11 -5
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +37 -19
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +48 -3
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +143 -14
- package/i18n/skills/a2h-utg-static/SKILL.md +3 -3
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
- package/package.json +2 -1
- package/platforms/atomcode/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/claude-code/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/codebuddy/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/model-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/agents/specgen-worker.frontmatter.md +5 -0
- package/platforms/codebuddy/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/platforms/codex/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/cursor/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/deveco/agents/build-fixer.frontmatter.md +2 -0
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +2 -0
- package/platforms/deveco/agents/model-render-worker.frontmatter.md +2 -0
- package/platforms/deveco/agents/model-worker.frontmatter.md +2 -0
- package/platforms/deveco/agents/specgen-worker.frontmatter.md +2 -0
- package/platforms/deveco/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/opencode/agents/build-fixer.frontmatter.md +2 -0
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +2 -0
- package/platforms/opencode/agents/model-render-worker.frontmatter.md +2 -0
- package/platforms/opencode/agents/model-worker.frontmatter.md +2 -0
- package/platforms/opencode/agents/specgen-worker.frontmatter.md +2 -0
- package/platforms/opencode/skills/a2h-app-migrate/SKILL.unique.md +10 -0
- package/platforms/qoder/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/qoder-cn/skills/a2h-app-migrate/SKILL.unique.md +8 -0
- package/platforms/trae/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/platforms/trae-cn/skills/a2h-app-migrate/SKILL.unique.md +3 -0
- package/skills/a2h-app-migrate/SKILL.md +31 -14
- package/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +152 -89
- package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +1 -1
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +28 -11
- package/skills/a2h-app-migrate/scripts/dag_action_catalog.mjs +76 -0
- package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +60 -5
- package/skills/a2h-app-migrate/scripts/dag_runner.mjs +184 -4
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +2 -2
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -3
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +51 -2
- package/skills/a2h-app-migrate/test/test_dag_blocked_guard.mjs +291 -0
- package/skills/a2h-app-migrate/test/test_dag_production.mjs +40 -0
- package/skills/a2h-app-migrate/test/test_dag_runner.mjs +4 -3
- package/skills/a2h-app-migrate/test/test_i18n_engine_mirror.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_interaction.mjs +0 -2
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +19 -6
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +8 -7
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -2
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +33 -12
- package/skills/a2h-batch-ui-align/SKILL.md +14 -12
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +1 -0
- package/skills/a2h-batch-ui-align/references/cards/canvas.md +1 -0
- package/skills/a2h-batch-ui-align/references/cards/dynamics.md +32 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +3 -2
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +4 -0
- package/skills/a2h-batch-ui-align/references/cards/resources.md +19 -1
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +13 -1
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -2
- package/skills/a2h-batch-ui-align/references/checker-rules.md +205 -7
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +10 -17
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +3 -4
- package/skills/a2h-batch-ui-align/references/lottie-integration.md +47 -2
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +52 -328
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +1 -138
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +2 -11
- 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
- package/skills/a2h-batch-ui-align/references/step3-capture.md +8 -23
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +2 -1
- package/skills/a2h-batch-ui-align/references/step5-convert.md +17 -9
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +239 -16
- package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +6 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +6 -0
- package/skills/a2h-batch-ui-align/scripts/group_pass.mjs +270 -0
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +134 -16
- package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +39 -8
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +6 -3
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +170 -10
- package/skills/a2h-batch-ui-align/scripts/module_placement.mjs +189 -0
- package/skills/a2h-batch-ui-align/scripts/overlay_effects.mjs +205 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +42 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +20 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +28 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +81 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/click_handler.ts +140 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/collapsing_toolbar.ts +124 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/compose_semantics.ts +287 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/flowitem_width.ts +78 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +194 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/inset_stacked.ts +138 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/int_division.ts +181 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +62 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_path.ts +77 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_ready.ts +109 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +88 -18
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_cycle.ts +140 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/see_through_overlay.ts +149 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_builder.ts +139 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_show_close.ts +53 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/space_between_optional.ts +115 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +7 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/width_fill.ts +160 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +28 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_chrome_defaults.test.mjs +328 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_click_handler.test.mjs +127 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_compose_semantics.test.mjs +150 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +117 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_inset_stacked.test.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +60 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +413 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +159 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_sheet_builder.test.mjs +192 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +4 -2
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +38 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_compose.test.mjs +106 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pass.test.mjs +150 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +125 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack_icon_leaf.test.mjs +143 -0
- package/skills/a2h-batch-ui-align/scripts/tests/module_placement.test.mjs +248 -0
- package/skills/a2h-batch-ui-align/scripts/tests/overlay_effects.test.mjs +214 -0
- package/skills/a2h-fix-build-errors/references/known-patterns.md +5 -5
- package/skills/a2h-module-semantic-docs/SKILL.md +3 -2
- package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +10 -0
- package/skills/a2h-module-semantic-docs/scripts/design_baseline.mjs +158 -0
- package/skills/a2h-module-semantic-docs/test/test_design_baseline.mjs +128 -0
- package/skills/a2h-page-specgen/SKILL.md +36 -5
- package/skills/a2h-page-specgen/references/behavior-ledger.md +88 -21
- package/skills/a2h-page-specgen/references/evidence.md +2 -1
- package/skills/a2h-page-specgen/references/execution-model.md +13 -5
- package/skills/a2h-page-specgen/references/gates.md +33 -7
- package/skills/a2h-page-specgen/references/scenario-authoring.md +67 -13
- package/skills/a2h-page-specgen/references/spec-example.md +166 -32
- package/skills/a2h-page-specgen/references/spec-template.md +8 -5
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +40 -2
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +241 -22
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +29 -2
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +35 -2
- package/skills/a2h-page-specgen/scripts/contract-calls.mjs +715 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +55 -2
- package/skills/a2h-page-specgen/scripts/footprint.mjs +129 -2
- package/skills/a2h-page-specgen/scripts/gate.mjs +20 -11
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +56 -3
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +27 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +114 -5
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +20 -3
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +270 -29
- package/skills/a2h-page-specgen/scripts/prepare.mjs +25 -14
- package/skills/a2h-page-specgen/scripts/report.mjs +26 -5
- package/skills/a2h-page-specgen/scripts/submission.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/submit.mjs +105 -4
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +224 -224
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +1 -1
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +2 -2
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +110 -18
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +97 -12
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +153 -3
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +529 -1
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +27 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +158 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +11 -13
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +97 -0
- package/skills/a2h-page-specgen/scripts/test/contract-calls.test.mjs +737 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +82 -3
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +11 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +6 -2
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +94 -1
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +49 -1
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +6 -1
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +12 -4
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +1 -0
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +80 -1
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +159 -27
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +23 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +8 -1
- package/skills/a2h-resource-convert/SKILL.md +1 -1
- package/skills/a2h-resource-convert/data/framework-strings/NOTICE +10 -0
- package/skills/a2h-resource-convert/data/framework-strings/manifest.json +90 -0
- package/skills/a2h-resource-convert/data/framework-strings/strings.json +382 -0
- package/skills/a2h-resource-convert/references/conversion-rules.md +7 -1
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +2 -2
- package/skills/a2h-resource-convert/references/step5-reference-resolution.md +16 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +124 -8
- package/skills/a2h-resource-convert/scripts/sync-framework-strings.mjs +147 -0
- package/skills/a2h-resource-convert/scripts/tests/framework_strings.test.mjs +131 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +14 -11
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +38 -10
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +3 -0
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -3
- package/skills/a2h-spec-design-pipeline/references/initialization.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/reply-recovery.md +172 -0
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +2 -2
- package/skills/a2h-spec-design-pipeline/references/scripts.md +4 -3
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +24 -19
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +12 -5
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +5 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +4 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +27 -3
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +46 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +2511 -295
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +27 -72
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +39 -83
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +132 -101
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +158 -115
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +60 -93
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +73 -100
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-cn.md +52 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/route-page-side-effect-import-en.md +59 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +57 -8
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +475 -18
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +472 -4
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/RoutePageSideEffectImportCheck.js +570 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/arkui/RouteParamCarrierSubCheck.js +1053 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/sql/SqlIdentifierAnalysis.js +427 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +7 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/settle.ts +785 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +286 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +166 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_docs_refresh_contract.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +2 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +350 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_route_page_side_effect_import.ts +185 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_route_param_carrier.ts +341 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_settle.ts +593 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +92 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_sql_identifier_analysis.ts +137 -0
- package/skills/a2h-spec-generate/references/input-formats.md +1 -1
- package/skills/a2h-utg-explorer/SKILL.md +11 -5
- package/skills/a2h-utg-explorer/references/architecture.md +37 -19
- package/skills/a2h-utg-explorer/scripts/audit.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/close_phases.mjs +8 -5
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +95 -19
- package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +192 -4
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +21 -0
- package/skills/a2h-utg-explorer/scripts/panel_routes.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/plan.mjs +16 -1
- package/skills/a2h-utg-explorer/scripts/predicates.mjs +270 -0
- package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +2 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +4 -3
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +67 -8
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +4 -3
- package/skills/a2h-utg-explorer/scripts/report.mjs +32 -2
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +103 -36
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +3 -8
- package/skills/a2h-utg-explorer/scripts/schedule_states.mjs +189 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +9 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +11 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +31 -2
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +32 -0
- package/skills/a2h-utg-explorer/scripts/tests/dialog_own_layout.test.mjs +40 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +4 -1
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +6 -28
- package/skills/a2h-utg-explorer/scripts/tests/in_route_surface.test.mjs +125 -0
- package/skills/a2h-utg-explorer/scripts/tests/list_probe_target_wait.test.mjs +86 -0
- package/skills/a2h-utg-explorer/scripts/tests/multi_host.test.mjs +167 -0
- package/skills/a2h-utg-explorer/scripts/tests/nested_list.test.mjs +58 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_opener.test.mjs +100 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +8 -1
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +1 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +2 -31
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +56 -7
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +117 -6
- package/skills/a2h-utg-explorer/scripts/tests/state_inventory.test.mjs +414 -0
- package/skills/a2h-utg-explorer/scripts/tests/tree_unreliable.test.mjs +197 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +196 -30
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hosts.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +63 -2
- package/skills/a2h-utg-explorer/scripts/utg_explorer/states.mjs +286 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +197 -19
- package/skills/a2h-utg-static/SKILL.md +3 -3
- package/skills/a2h-utg-static/references/extractors.md +7 -0
- package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +4 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +1 -1
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +642 -22
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +25 -0
- package/skills/a2h-utg-static/scripts/tests/test_in_route_surface.mjs +123 -0
- package/skills/a2h-utg-static/scripts/tests/test_overlay_host_effects.mjs +239 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_host_depths.mjs +48 -0
- package/skills/a2h-utg-static/scripts/utg_html.mjs +2 -0
- package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +1 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +0 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/skills/a2h-app-migrate/references/specs.example.json +0 -19
- package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +0 -79
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +0 -47
|
@@ -23,8 +23,10 @@ node scripts/prepare.mjs <source-project> <utg-workspace> <hmos-project> \
|
|
|
23
23
|
node scripts/waker.mjs <output> rearm
|
|
24
24
|
|
|
25
25
|
# 2. Follow the sole valid loop below. When the state is normal and no stop exists,
|
|
26
|
-
# one background waker may be started:
|
|
26
|
+
# one background waker may be started (wait_mode=background, the default):
|
|
27
27
|
node scripts/waker.mjs <output> waker [--interval 30] [--poll 5]
|
|
28
|
+
# wait_mode=foreground runs the same waker as a blocking call instead (see Foreground Wait Mode):
|
|
29
|
+
node scripts/waker.mjs <output> waker --max-wait 480
|
|
28
30
|
|
|
29
31
|
# 3. When complete handling returns finalize-ready, immediately drain error/invalid
|
|
30
32
|
# as required before finalizing:
|
|
@@ -64,9 +66,37 @@ loop:
|
|
|
64
66
|
6. Only a normal path with no stop may waker probe/arm; do not arm a healthy inPlace
|
|
65
67
|
owner again.
|
|
66
68
|
7. Wait for a child-agent work notification or background-waker completion notification,
|
|
67
|
-
then return to 1.
|
|
69
|
+
then return to 1. (wait_mode=foreground replaces steps 6–7; see Foreground Wait Mode.)
|
|
68
70
|
```
|
|
69
71
|
|
|
72
|
+
## Foreground Wait Mode (`wait_mode=foreground`)
|
|
73
|
+
|
|
74
|
+
The default `wait_mode=background` is the loop above: arm a background waker, end the turn, and let a
|
|
75
|
+
notification wake the session. That only works where an ended turn can be woken again — the user's
|
|
76
|
+
primary session. When this skill runs **inside a dispatched sub-agent** (for example `a2h-app-migrate`
|
|
77
|
+
dispatching `enrich.spec_gen`), ending the turn returns the sub-agent to its caller with the work
|
|
78
|
+
unfinished. The caller then passes `wait_mode=foreground`, and steps 6–7 become:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
6'. Only on a normal path with no stop, run the waker in the FOREGROUND as one blocking shell call:
|
|
82
|
+
node scripts/waker.mjs <output> waker --max-wait 480 (shell timeout ≥ 600000 ms)
|
|
83
|
+
exit 0 / 2 → it published an event (relay at the latest after --max-wait) → return to 1.
|
|
84
|
+
exit 5 "event-pending" → return to 1 at once.
|
|
85
|
+
exit 5 "lock-held" (a live waker from an earlier background run still owns the lock) →
|
|
86
|
+
node scripts/waker.mjs <output> wait --max-wait 480 (observe only, no ownership)
|
|
87
|
+
then return to 1 whatever it returns.
|
|
88
|
+
exit 5 "stopped" / "lock-lost" → return to 1 (the stop / hard-block path handles it).
|
|
89
|
+
7'. Never end the turn while groups are live, claimed or awaiting dispatch. The only exits are
|
|
90
|
+
finalize (success or publish-with-holes) and hard-block; on either, reply with the final result.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- Workers are still dispatched as **background** Agents, so the concurrency slots keep refilling;
|
|
94
|
+
only the wait is in the foreground.
|
|
95
|
+
- The waker already watches the ledger and drafts that workers write, plus every deadline, so it
|
|
96
|
+
wakes on worker completion without any notification. Completion notifications that still arrive
|
|
97
|
+
are ignored: the disk is the only scheduling source, as in background mode.
|
|
98
|
+
- Choose `--max-wait` below the host's per-call shell timeout; 480 s fits a 600 s limit.
|
|
99
|
+
|
|
70
100
|
Fatal handling always preempts ordinary recovery. A reconcile failure for ordinary consuming work may remain retryable, but it must not hold up a subsequent error.
|
|
71
101
|
|
|
72
102
|
Each `claimWakerEvent` call independently uses `ownedIds/lostIds` to adjudicate the fixed claiming/consuming installation:
|
|
@@ -148,6 +178,7 @@ run behavior-audit.mjs <output> pre <group_id> --attempt <n>
|
|
|
148
178
|
write drafts/attempt-<n>/<stem>.json
|
|
149
179
|
write behavior/attempt-<n>/<group_id>/post-review.json
|
|
150
180
|
run behavior-audit.mjs <output> post <group_id> --attempt <n>
|
|
181
|
+
submit.mjs <output> <group_id> --token <t> --dry-run --draft <file> ... # gates only; writes nothing
|
|
151
182
|
submit immediately through submit.mjs
|
|
152
183
|
```
|
|
153
184
|
|
|
@@ -214,9 +245,9 @@ partial coverage. Only a run that produced no SPEC at all aborts. See
|
|
|
214
245
|
## Gates
|
|
215
246
|
|
|
216
247
|
- **G1:** Exactly one SPEC per page in a new run, exactly one page per SPEC, no extra SPECs, and coverage of every page
|
|
217
|
-
- **G2:** H1 is `# <title> SPEC` (one space before SPEC), there is at least one scenario, scenario headings are numbered in draft order, and the final section is `## 安卓代码参考`. A `实现契约` section is rejected. Any declared page-level `contracts` container is rejected (even `{"endpoints": []}`), every non-empty but unusable `scenarios[].contracts` declaration is an error (a non-`rules` entry must yield a fact token), and every fact token of a usable declaration must appear in that scenario's `steps`, matched on token boundaries so `10` does not stand in for `1` or `0` (the authoring pass merges facts naturally; the gate proves nothing was dropped). Keeping the existing step count and order is a review item, not a gate claim
|
|
248
|
+
- **G2:** H1 is `# <title> SPEC` (one space before SPEC), there is at least one scenario, scenario headings are numbered in draft order, and the final section is `## 安卓代码参考`. A `实现契约` section is rejected. Any declared page-level `contracts` container is rejected (even `{"endpoints": []}`), every non-empty but unusable `scenarios[].contracts` declaration is an error (a non-`rules` entry must yield a fact token), and every fact token of a usable declaration must appear in that scenario's `steps`, matched on token boundaries so `10` does not stand in for `1` or `0` (the authoring pass merges facts naturally; the gate proves nothing was dropped); a rule's numeric literals count as fact tokens, normalized to the shape the steps state them (thousands grouping, a sign written in words, an exponent written out), while a literal that only states how a value is printed (a zero-padded field width, a decimal-place count) is not required. Keeping the existing step count and order is a review item, not a gate claim
|
|
218
249
|
- **G3:** The body contains no `file:line` (a scheme-qualified URL with `:port` is a URL, not an anchor), project symbol-table matches (except names the gate requires as fact tokens), framework type names, `dp/sp/px`/`dip` (bare or with a number), `#hex`, or assignment/comparison expressions. The same rules apply to steps carrying merged endpoint, key, field, and rule facts: write them as ordinary sentences (`字段 code 为 1001`), never as `key=value` assignments
|
|
219
|
-
- **G4:** Coverage: for behavior-enabled pages, every planned assertion must have a valid explicit `coverage.behaviors` link (with valid scenario/step indices, a restated navigation gate, a legal waiver, or a related unresolved unknown) and pass semantic review. The legacy UTG denominator remains a secondary check: every `out_edges` entry and every `is_trigger` widget is claimed by a scenario (verified with `claim_token`) or has a reason recorded in `excluded`; an interaction signal follows its interaction-signal candidate disposition instead — promoted → claim, waived → exclusion, unknown or unfinished → partial with neither
|
|
250
|
+
- **G4:** Coverage: for behavior-enabled pages, every planned assertion must have a valid explicit `coverage.behaviors` link (with valid scenario/step indices, a restated navigation gate, a legal waiver, or a related unresolved unknown) and pass semantic review. The legacy UTG denominator remains a secondary check: every `out_edges` entry and every `is_trigger` widget is claimed by a scenario (verified with `claim_token`) or has a reason recorded in `excluded`; an `edges` claim may carry its own `claim_token` when the target stem is not derivable (Compose route, overlay name), and that token is matched verbatim in the scenario; an interaction signal follows its interaction-signal candidate disposition instead — promoted → claim, waived → exclusion, unknown or unfinished → partial with neither
|
|
220
251
|
- **G5:** Every `file:line` in `anchors` actually exists under `<source-project>` and has a valid line number
|
|
221
252
|
- **G6:** `scenarios` must be a non-empty array, and every scenario's `steps` must be a non-empty array; missing, `null`, non-array, and empty values are hard failures. Every step is in Chinese, contains at least 8 Chinese characters, and starts with `- N. `. After normalization, exact closed-list matching rejects vague steps, and exact full-step matching rejects the closed set of cross-scenario omission references; neither check uses substring or NLP matching. `summary` contains at least 60 Chinese characters. See [scenario and step authoring rules](references/scenario-authoring.md)
|
|
222
253
|
- **G7:** For page SPECs, warn in `warnings` and `report.md` when `est(P)` differs from the actual scenario count by more than 2×. Shared SPECs are exempt because their `est` is a fixed unit count, not a scenario estimate
|
|
@@ -233,7 +264,7 @@ Submission uses two-stage gates: run `runPartialGroupGates` while the group's SP
|
|
|
233
264
|
- **Evidence paths**: Shared fact-base paths under `facts/`, plus the `<source-project>` and `utg-workspace` paths
|
|
234
265
|
- **Output requirements**: Write to `drafts/attempt-{{attempt}}/<stem>.json` and follow the body-language requirements (prohibited symbols from `facts/symbols.json`; rewrite framework type names)
|
|
235
266
|
- **Behavior evidence**: Read `references/behavior-ledger.md` and the page evidence under `evidence/<stemOf(page_id)>/`; read `interaction_scans` and re-read failed/truncated units first, then write one `discovery.json` SourceUnit review per unit with its conclusion and exact `assertion_ids` attribution. Write `behavior/attempt-{{attempt}}/<group_id>/discovery.json`, run `node scripts/behavior-audit.mjs <output> pre <group-id> --attempt {{attempt}}` before drafting, write `post-review.json` after drafting, compute `drafts_digest` with the `digest` command, run `node scripts/behavior-audit.mjs <output> post <group-id> --attempt {{attempt}}`, then submit. Never edit `evidence/`
|
|
236
|
-
- **Heartbeat and submission**: Run `beat` while working; immediately after the post-audit passes, run `node scripts/submit.mjs <output> <group-id> --token {{token}} --draft <file>` (one `--draft` per page). Submission requires discovery, pre-audit and post-review for the attempt: a missing one is rejected as `Audit incomplete` without abandoning the group, so write it and submit again
|
|
267
|
+
- **Heartbeat and submission**: Run `beat` while working; immediately after the post-audit passes, run `node scripts/submit.mjs <output> <group-id> --token {{token}} --dry-run --draft <file>` (one `--draft` per page). The dry run executes the same G1–G8 gates and writes nothing: fix every reported failure first. Then submit with the same command without `--dry-run`. Submission requires discovery, pre-audit and post-review for the attempt: a missing one is rejected as `Audit incomplete` without abandoning the group, so write it and submit again. A gate-failing submit appends `precheck-failed` and keeps the attempt live for up to 3 failed submits; after that it abandons and the orchestrator retries. A `token mismatch` means the attempt was abandoned or retried: stop editing that attempt directory
|
|
237
268
|
- **Lock contention**: If start/beat/submit encounters `ledger busy`, make at most three attempts including the first, with bounded backoff of 50 ms and 100 ms. If it remains busy, report to the orchestrator. Busy is not a task failure and must not be used to mark the group as failed. A lock left by a killed holder on the same host is taken over automatically (see `references/execution-model.md` §2).
|
|
238
269
|
- **Failure retry**: If this group is a retry (attempt > 1), append the previous `failure_reason` to the end of the prompt
|
|
239
270
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Behavior Evidence Ledger Protocol
|
|
2
2
|
|
|
3
3
|
This document is the worker-facing protocol for `behavior-ledger-v3` with the
|
|
4
|
-
`static-source-
|
|
4
|
+
`static-source-v3` coverage profile. It describes the immutable evidence that
|
|
5
5
|
`prepare.mjs` writes, the discovery document a worker owns, both audits, the
|
|
6
6
|
exact draft fields that bind authoring to discovery, and the digest fences that
|
|
7
7
|
protect submission and finalization.
|
|
@@ -11,7 +11,7 @@ unit; a scenario is an authoring shape, not a coverage denominator. Nothing in
|
|
|
11
11
|
this protocol depends on a specific application, component, or product domain.
|
|
12
12
|
|
|
13
13
|
`complete` is bounded by the active discovery adapter's capabilities. The
|
|
14
|
-
`static-source-
|
|
14
|
+
`static-source-v3` adapter proves static structure — sources, composition,
|
|
15
15
|
scannable interaction registrations, and the behavior it can state faithfully.
|
|
16
16
|
Constructs the adapter cannot represent remain semantic-review or partial
|
|
17
17
|
territory; no worker may claim completeness beyond what the adapter observed.
|
|
@@ -34,6 +34,7 @@ behavior/attempt-<n>/<group_id>/
|
|
|
34
34
|
| `evidence/<stemOf(page_id)>/candidates.json` | `prepare.mjs` | Immutable input |
|
|
35
35
|
| `evidence/<stemOf(page_id)>/assertions.json` | `prepare.mjs` | Immutable input |
|
|
36
36
|
| `evidence/<stemOf(page_id)>/unknowns.json` | `prepare.mjs` | Immutable input |
|
|
37
|
+
| `evidence/<stemOf(page_id)>/contracts.json` | `prepare.mjs` | Immutable input |
|
|
37
38
|
| `behavior/attempt-<n>/<group_id>/discovery.json` | Worker | Written once per attempt before drafting |
|
|
38
39
|
| `behavior/attempt-<n>/<group_id>/pre-audit.json` | Pre-audit CLI | Written by the CLI only |
|
|
39
40
|
| `drafts/attempt-<n>/<stemOf(spec_id)>.json` | Worker | Canonical draft for the attempt |
|
|
@@ -68,9 +69,14 @@ defined in `spec-template.md`. A worker never writes or edits anything under
|
|
|
68
69
|
{
|
|
69
70
|
"schema_version": "behavior-ledger-v3",
|
|
70
71
|
"profile": {
|
|
71
|
-
"id": "static-source-
|
|
72
|
+
"id": "static-source-v3",
|
|
72
73
|
"interaction_rules": "interaction-rules-v2",
|
|
73
|
-
"composition_depth":
|
|
74
|
+
"composition_depth": 2,
|
|
75
|
+
"composition_edges": ["imports", "references", "instantiates"],
|
|
76
|
+
"composition_inheritance": "body-chain",
|
|
77
|
+
"reach_depth": 3,
|
|
78
|
+
"selection_policy": "direct-then-module-v1",
|
|
79
|
+
"resolution_policy": "producer-reserved-v1"
|
|
74
80
|
},
|
|
75
81
|
"snapshot_digest": "sha256-of-the-evidence-document",
|
|
76
82
|
"composition_roots": ["src/primary.ext"],
|
|
@@ -96,7 +102,7 @@ defined in `spec-template.md`. A worker never writes or edits anything under
|
|
|
96
102
|
}
|
|
97
103
|
],
|
|
98
104
|
"current_snapshot": {
|
|
99
|
-
"profile_id": "static-source-
|
|
105
|
+
"profile_id": "static-source-v3",
|
|
100
106
|
"snapshot_digest": "sha256-of-profile-and-source-units",
|
|
101
107
|
"source_units": ["…same SourceUnit objects…"]
|
|
102
108
|
},
|
|
@@ -123,7 +129,10 @@ no page owns the file, to nobody: that case is never silent, it is recorded as a
|
|
|
123
129
|
always surfaces as an open question instead of vanishing.
|
|
124
130
|
|
|
125
131
|
`candidates.json`, `assertions.json`, and `unknowns.json` carry the three raw
|
|
126
|
-
lists.
|
|
132
|
+
lists. `contracts.json` carries the contract-only call inventory: the call targets
|
|
133
|
+
that are not SourceUnits but still carry an HTTP, UI-construction or persistence
|
|
134
|
+
contract, together with their URL/parameter/resource signals, dispositions, and
|
|
135
|
+
explicit deferred or omitted entries. An assertion is:
|
|
127
136
|
|
|
128
137
|
```json
|
|
129
138
|
{
|
|
@@ -142,11 +151,11 @@ lists. An assertion is:
|
|
|
142
151
|
"uri": "src/primary.ext",
|
|
143
152
|
"span": {"start": 12, "end": 14},
|
|
144
153
|
"snapshot_digest": "sha256-of-the-current-snapshot",
|
|
145
|
-
"profile_id": "static-source-
|
|
154
|
+
"profile_id": "static-source-v3"
|
|
146
155
|
}
|
|
147
156
|
],
|
|
148
157
|
"candidate_ids": ["cand_…"],
|
|
149
|
-
"provenance": {"method": "structural", "profile": "static-source-
|
|
158
|
+
"provenance": {"method": "structural", "profile": "static-source-v3"}
|
|
150
159
|
}
|
|
151
160
|
```
|
|
152
161
|
|
|
@@ -168,7 +177,7 @@ A candidate is a structural signal without a proven user-observable outcome:
|
|
|
168
177
|
"trigger": {"kind": "widget", "widget": "primaryAction", "is_trigger": true},
|
|
169
178
|
"evidence_refs": ["…same reference shape as an assertion…"],
|
|
170
179
|
"review_status": "pending",
|
|
171
|
-
"provenance": {"method": "structural", "profile": "static-source-
|
|
180
|
+
"provenance": {"method": "structural", "profile": "static-source-v3"}
|
|
172
181
|
}
|
|
173
182
|
```
|
|
174
183
|
|
|
@@ -228,6 +237,9 @@ add one synthetic review unknown. These are the actual producer contracts:
|
|
|
228
237
|
| `interaction` | `review-incomplete` | `no_source` | the page has no scannable source at all; a readable non-code SourceUnit does not produce this |
|
|
229
238
|
| `interaction` | `source-unread` | `skipped` | the scan was skipped because the page source was unreadable |
|
|
230
239
|
| `interaction` | `review-incomplete` | `truncated` | a bounded scan left interaction signals unexamined |
|
|
240
|
+
| `operation` | `operation-discovery-partial` | — | the graph read or a request/transport resolution failed, so operation evidence stays partial |
|
|
241
|
+
| `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 |
|
|
242
|
+
| `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 |
|
|
231
243
|
| `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 |
|
|
232
244
|
| `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 |
|
|
233
245
|
| `composition` | `review-incomplete` | `missing-trigger-locator`, `unattachable-trigger-evidence`, or `unrepresentable-guard` | the same navigation candidate has no attachable evidence location |
|
|
@@ -270,7 +282,8 @@ review, and `reviewed_digest` must equal its current `content_digest`.
|
|
|
270
282
|
|
|
271
283
|
`inventory_status` and `unresolved_references` are immutable producer facts and
|
|
272
284
|
are reported as diagnostics only. Delivery is decided by whether a composition
|
|
273
|
-
**unknown** is still open: a lawful resolution (§3.4) closes it,
|
|
285
|
+
**unknown** is still open: a lawful resolution (§3.4) closes it, unless the gap
|
|
286
|
+
is producer-reserved (`cause:"source-unit-limit"`), and a reference
|
|
274
287
|
that no longer has an open unknown no longer blocks delivery. This is what makes
|
|
275
288
|
"resolve the reference" a meaningful instruction instead of a permanent partial.
|
|
276
289
|
|
|
@@ -287,13 +300,48 @@ uniapp/Vue it means a module specifier that resolves to a project file
|
|
|
287
300
|
props, type parameters (`T`), and raw parser expressions are external
|
|
288
301
|
diagnostics — they never enter `unknowns` and never keep a page partial.
|
|
289
302
|
|
|
290
|
-
To bound pathological traversal breadth, at most 200 traversal-expanded
|
|
291
|
-
SourceUnits are snapshotted per page.
|
|
292
|
-
|
|
293
|
-
|
|
303
|
+
To bound pathological traversal breadth, at most 200 kept traversal-expanded
|
|
304
|
+
shared SourceUnits are snapshotted per page. The composition scope is the page
|
|
305
|
+
body's depth-2 closure over `imports`, `references`, and `instantiates`, plus
|
|
306
|
+
the body's transitive `extends`/`implements` chain; call-only reach is recorded
|
|
307
|
+
as diagnostics (`reach_only`, `behavior_reach_unresolved`) but is not snapshotted.
|
|
308
|
+
Before the bound, composition units another page owns are trimmed: they are that
|
|
309
|
+
page's evidence, not this page's, and the drop is frozen in `trim_exclusions`.
|
|
310
|
+
Every page body, folded overlay, embedded origin, instance-peer origin, direct
|
|
311
|
+
base class, and required entry/operation evidence is always retained regardless
|
|
312
|
+
of this bound. Each omitted traversal locator is recorded in a composition
|
|
294
313
|
`review-incomplete` unknown with `cause:"source-unit-limit"` and
|
|
295
314
|
`omitted_source_units`; inventory remains partial. The bound never silently
|
|
296
|
-
shrinks the reviewed composition scope.
|
|
315
|
+
shrinks the reviewed composition scope. A `source-unit-limit` gap is
|
|
316
|
+
producer-reserved: no worker `resolutions[]` entry may close it; only a fresh
|
|
317
|
+
prepare with a wider bound or a page split can remove it. A page with any
|
|
318
|
+
omitted SourceUnit is never `delivered-complete`, even when a resolution was
|
|
319
|
+
written.
|
|
320
|
+
|
|
321
|
+
Contract-only call evidence has its own fail-closed gaps. A deferred target
|
|
322
|
+
(unreadable, unclassified wrapper, or one beyond the traversal bound) whose call
|
|
323
|
+
site is inside this page's reviewed scope is frozen as a `scope:"contract"`,
|
|
324
|
+
`reason:"review-incomplete"` unknown with `cause:"contract-call-deferred"`. A
|
|
325
|
+
deferred target reached only through an out-of-scope chain (`from_scope:false`)
|
|
326
|
+
stays a diagnostic in `contract_inventory`/`contracts.json` and does not block the
|
|
327
|
+
page by itself. A target beyond the per-page contract-evidence budget is recorded
|
|
328
|
+
with `cause:"contract-evidence-limit"`. Both unknown causes are producer-reserved,
|
|
329
|
+
keep `inventory_status` partial, and no worker resolution may close them.
|
|
330
|
+
|
|
331
|
+
### 2.4 Interactions the page does not register itself
|
|
332
|
+
|
|
333
|
+
`interaction_scans` only sees listener registration. When a component or library provides the
|
|
334
|
+
interaction, three pieces of evidence together support one assertion:
|
|
335
|
+
|
|
336
|
+
1. an interaction interface implemented by the page's code — an empty callback is not
|
|
337
|
+
counter-evidence, because the behavior lives in the component or library;
|
|
338
|
+
2. a configuration call that produces visible feedback when the user interacts (a selected state,
|
|
339
|
+
an overlay, a touch listener, a gesture detector);
|
|
340
|
+
3. the rendering source of that feedback — the view, field or text it displays.
|
|
341
|
+
|
|
342
|
+
All three present: write the assertion (trigger = the interaction, outcome = `visible-change`,
|
|
343
|
+
evidence refs to both the configuration call and the rendering source). Configuration without a
|
|
344
|
+
rendering source stays a candidate; do not state what is shown without it.
|
|
297
345
|
|
|
298
346
|
## 3. Worker Discovery Document
|
|
299
347
|
|
|
@@ -673,6 +721,7 @@ run behavior-audit.mjs <output> pre <group_id> --attempt <n>
|
|
|
673
721
|
write drafts/attempt-<n>/<stem>.json
|
|
674
722
|
write behavior/attempt-<n>/<group_id>/post-review.json
|
|
675
723
|
run behavior-audit.mjs <output> post <group_id> --attempt <n>
|
|
724
|
+
submit.mjs <output> <group_id> --token <t> --dry-run --draft <file> ... # gates only; writes nothing
|
|
676
725
|
submit immediately through submit.mjs
|
|
677
726
|
```
|
|
678
727
|
|
|
@@ -681,6 +730,7 @@ The CLI signatures are:
|
|
|
681
730
|
```bash
|
|
682
731
|
node scripts/behavior-audit.mjs <output> pre <group_id> --attempt <n>
|
|
683
732
|
node scripts/behavior-audit.mjs <output> post <group_id> --attempt <n>
|
|
733
|
+
node scripts/submit.mjs <output> <group_id> --token <t> --dry-run --draft <file> ...
|
|
684
734
|
```
|
|
685
735
|
|
|
686
736
|
Rules:
|
|
@@ -713,7 +763,11 @@ Rules:
|
|
|
713
763
|
- G4 recomputes each page's pre-audit from Evidence and discovery and rejects
|
|
714
764
|
`pre-audit-mismatch`; the editable pre-audit file is a receipt, not a verdict.
|
|
715
765
|
- Submit immediately after the post-audit through `submit.mjs`; do not keep
|
|
716
|
-
editing after submission.
|
|
766
|
+
editing after submission. Run the same command with `--dry-run` first: it
|
|
767
|
+
executes the same G1–G8 gates and writes nothing. A gate-failing submit
|
|
768
|
+
appends `precheck-failed`, keeps the attempt live, and allows up to 3 failed
|
|
769
|
+
submits; after that the attempt is abandoned and retried. A `token mismatch`
|
|
770
|
+
means this attempt is no longer current: stop editing its directory.
|
|
717
771
|
- Workers cannot reclassify an unknown as specified without new evidence. An
|
|
718
772
|
unresolved blind spot remains unknown, a refuted review only supports a
|
|
719
773
|
no-user-observable waiver, and an insufficient review only supports an
|
|
@@ -753,6 +807,17 @@ A behavior-enabled draft carries the page discovery digest and explicit links:
|
|
|
753
807
|
`discovery.json`; the pre-audit page digest, the post-review `page_digests`
|
|
754
808
|
value, and every draft for the page must use the same value.
|
|
755
809
|
|
|
810
|
+
`coverage.edges[]` entries may carry an optional `claim_token`:
|
|
811
|
+
|
|
812
|
+
```json
|
|
813
|
+
{"item": "compose-route:Category", "by_scenario": 3, "claim_token": "分类"}
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
A supplied token replaces stem derivation and must appear verbatim in that
|
|
817
|
+
scenario's `steps`; a blank value is ignored. This is the escape hatch for
|
|
818
|
+
Compose routes and overlay names whose stems are not in the frozen derivation
|
|
819
|
+
table (`compose-route:Category`, `overlay:OptionsDialog`, …).
|
|
820
|
+
|
|
756
821
|
`coverage.behaviors[]` accepts exactly these link shapes:
|
|
757
822
|
|
|
758
823
|
```json
|
|
@@ -1045,12 +1110,13 @@ Missing artifacts are distinguished by the submission phase:
|
|
|
1045
1110
|
throws.
|
|
1046
1111
|
|
|
1047
1112
|
A page is complete only when composition is closed with no open composition
|
|
1048
|
-
unknown,
|
|
1113
|
+
unknown, no SourceUnit was omitted by the producer bound, every SourceUnit was
|
|
1114
|
+
read and reviewed at its current digest, no
|
|
1049
1115
|
unknown remains, every evidence reference is valid, both audits completed, and
|
|
1050
1116
|
every assertion is specified or legally waived. Raw
|
|
1051
1117
|
`unresolved_references`/`inventory_status` are immutable producer diagnostics and
|
|
1052
1118
|
do not participate in this verdict; a lawful resolution closes the composition
|
|
1053
|
-
unknown they describe. A run with any unresolved page
|
|
1119
|
+
unknown they describe unless it is producer-reserved. A run with any unresolved page
|
|
1054
1120
|
or run-level behavior unknown is `delivered-partial`; the finalize summary
|
|
1055
1121
|
reports `delivered-partial` and `unresolved_evidence_areas`.
|
|
1056
1122
|
|
|
@@ -1069,9 +1135,10 @@ plus the four attempt artifacts before evaluation and again after evaluation.
|
|
|
1069
1135
|
The maps must be exactly equal, including `null`/missing states; any difference
|
|
1070
1136
|
is a retryable conflict and that round performs no submit, abandon, or
|
|
1071
1137
|
publication. The map carried into `commitSubmission` is the pre-evaluation map.
|
|
1072
|
-
The
|
|
1073
|
-
`assertions.json`, `unknowns.json`) of every behavior page are
|
|
1074
|
-
digest-or-null, so a missing file cannot appear later as a newly
|
|
1138
|
+
The five fixed evidence files (`composition.json`, `candidates.json`,
|
|
1139
|
+
`assertions.json`, `unknowns.json`, `contracts.json`) of every behavior page are
|
|
1140
|
+
always seeded as digest-or-null, so a missing file cannot appear later as a newly
|
|
1141
|
+
accepted key.
|
|
1075
1142
|
|
|
1076
1143
|
`commitSubmission` rechecks under the submission lock:
|
|
1077
1144
|
|
|
@@ -24,10 +24,11 @@ per page under `evidence/<stemOf(page_id)>/`:
|
|
|
24
24
|
|
|
25
25
|
| File | Contents |
|
|
26
26
|
|---|---|
|
|
27
|
-
| `composition.json` | Schema/profile, `snapshot_digest`, `composition_roots`, top-level `source_units`, `current_snapshot`, `snapshot_history`, `inventory_status`, `unresolved_references` |
|
|
27
|
+
| `composition.json` | Schema/profile, `snapshot_digest`, `composition_roots`, top-level `source_units`, `current_snapshot`, `snapshot_history`, `inventory_status`, `unresolved_references`, and (when present) `contract_evidence`, `contract_inventory`, `contract_dispositions` |
|
|
28
28
|
| `candidates.json` | Structural candidates that lack a proven user-observable outcome |
|
|
29
29
|
| `assertions.json` | Neutral behavior assertions with evidence references and provenance |
|
|
30
30
|
| `unknowns.json` | Discovery blind spots with reasons, affected fields or composition references, and `next_action` |
|
|
31
|
+
| `contracts.json` | Read-only contract-only call inventory: kept call targets, deferred/omitted entries, dispositions, and source URL/parameter/resource signals |
|
|
31
32
|
|
|
32
33
|
These files are read-only inputs. Workers write their discovery document under
|
|
33
34
|
`behavior/attempt-<n>/<group_id>/` and never edit `evidence/`.
|
|
@@ -19,6 +19,9 @@ node scripts/dispatch.mjs <output> retry <group-id> [--force]
|
|
|
19
19
|
# Explicit submission; one call may include multiple drafts
|
|
20
20
|
node scripts/submit.mjs <output> <group-id> --token <t> --draft <file> [--draft <file> ...]
|
|
21
21
|
|
|
22
|
+
# Gate-only dry run; never writes the ledger or publishes a draft
|
|
23
|
+
node scripts/submit.mjs <output> <group-id> --token <t> --dry-run --draft <file> [--draft <file> ...]
|
|
24
|
+
|
|
22
25
|
# Per-round recovery and ledger folding
|
|
23
26
|
node scripts/watchdog.mjs <output> --reconcile --json
|
|
24
27
|
|
|
@@ -51,6 +54,7 @@ node scripts/behavior-audit.mjs <output> post <group-id> --attempt <n>
|
|
|
51
54
|
{"t":"2026-11-10T00:00:02.000Z","ev":"confirm","group":"g03-settings","attempt":1,"token":"c7f1aa","agent_id":"a1b2"}
|
|
52
55
|
{"t":"2026-11-10T00:00:03.000Z","ev":"start","group":"g03-settings","attempt":1,"token":"c7f1aa"}
|
|
53
56
|
{"t":"2026-11-10T00:00:04.000Z","ev":"beat","group":"g03-settings","attempt":1,"token":"c7f1aa"}
|
|
57
|
+
{"t":"2026-11-10T00:00:04.500Z","ev":"precheck-failed","group":"g03-settings","attempt":1,"token":"c7f1aa","failure_reason":"G6: summary has 40 characters, minimum 60 required"}
|
|
54
58
|
{"t":"2026-11-10T00:00:05.000Z","ev":"submit","group":"g03-settings","attempt":1,"token":"c7f1aa","spec_id":"fragment:MainSettingsFragment","page":"fragment:MainSettingsFragment"}
|
|
55
59
|
{"t":"2026-11-10T00:00:06.000Z","ev":"orphan","group":"g05-x","attempt":1,"reason":"lease-expired"}
|
|
56
60
|
{"t":"2026-11-10T00:00:07.000Z","ev":"abandon","group":"g05-x","attempt":1,"reason":"orphan-expired"}
|
|
@@ -59,9 +63,10 @@ node scripts/behavior-audit.mjs <output> post <group-id> --attempt <n>
|
|
|
59
63
|
|
|
60
64
|
Field and identity constraints:
|
|
61
65
|
|
|
62
|
-
- Every event has an ISO 8601 timestamp `t` containing a full date, time, and time zone, such as `2026-11-10T00:00:00.000Z`. In addition to requiring the complete format and a finite `Date.parse` result, the timestamp must represent a real calendar date. The month/day, hour/minute/second, and numeric time-zone hour/minute values must all be within their valid ranges. `2026/11/09`, a date alone, a time without a time zone, `2026-02-30T00:00:00Z`, and `2026-04-31T00:00:00Z` are corrupt even if `Date.parse` normalizes them. For attempt events, `attempt` is a positive integer. Tokens on `claim/start/confirm/beat/submit` are six lowercase hexadecimal digits.
|
|
66
|
+
- Every event has an ISO 8601 timestamp `t` containing a full date, time, and time zone, such as `2026-11-10T00:00:00.000Z`. In addition to requiring the complete format and a finite `Date.parse` result, the timestamp must represent a real calendar date. The month/day, hour/minute/second, and numeric time-zone hour/minute values must all be within their valid ranges. `2026/11/09`, a date alone, a time without a time zone, `2026-02-30T00:00:00Z`, and `2026-04-31T00:00:00Z` are corrupt even if `Date.parse` normalizes them. For attempt events, `attempt` is a positive integer. Tokens on `claim/start/confirm/beat/submit/precheck-failed` are six lowercase hexadecimal digits.
|
|
63
67
|
- `confirm` must have a nonempty `agent_id`. `submit` must have nonempty `spec_id/page`, and the SPEC must belong to the group. `orphan` accepts only `lease-expired`. `retry.force` must be a boolean.
|
|
64
68
|
- `abandon.reason` accepts only `phantom/precheck-failed/orphan-expired/dispatch-error`. `precheck-failed` must include `failure_reason`. Every abandon is permitted only from claimed/live/orphaned. No reason may move submitted back to an earlier state.
|
|
69
|
+
- `precheck-failed` carries `failure_reason`, matches the current `(group, attempt, token)`, is permitted from claimed/live/orphaned, increments the attempt's precheck budget, sets the group live, and refreshes `lastProofAt`. It records authoring feedback, not a terminal failure.
|
|
65
70
|
- The plan's group_id and spec_id values are globally unique. A page group must have pages/spec_ids. A shared group may have empty pages but must have spec_ids. An empty groups array is valid.
|
|
66
71
|
- `claim` is permitted only from pending. It increments attempt by exactly one and generates a new token. Attempt increases monotonically. A new claim clears the previous attempt's published, orphan, and timing evidence.
|
|
67
72
|
- `confirm/start/beat/submit` must match the current `(group, attempt, token)`. A late proof with the current identity is a fold no-op with no event semantics when the group is submitted/failed. Before writing an event, the submission coordinator rejects a stale token as conflict/token-mismatch.
|
|
@@ -80,11 +85,11 @@ The holder writes `{pid, host, nonce, at}` into `.ledger.lock` right after `open
|
|
|
80
85
|
| `live` | At least one proof of life, or a partial submission | Submit the complete SPEC set → submitted; no new proof within `leaseMs` → orphan/lease-expired → orphaned |
|
|
81
86
|
| `orphaned` | The lease has expired, but a recovery window remains for a late agent | Current proof/submit → live; `orphanGraceMs` expiry → abandon/orphan-expired → failed |
|
|
82
87
|
| `submitted` | The complete in-group SPEC set for the current attempt passed the submission gates | Terminal; only finalize is permitted, and every abandon is invalid |
|
|
83
|
-
| `failed` |
|
|
88
|
+
| `failed` | Exhausted precheck budget, phantom, orphan timeout, or dispatch failure | Within budget, watchdog automatically retries → pending; with budget exhausted, remains failed and is listed in abandoned |
|
|
84
89
|
|
|
85
90
|
The budget formula is `attempt - retryBudgetBase < maxAttempts`, with default `maxAttempts = 3`. Within the same lock, watchdog **automatically retries** every failed group that still has budget, returning it to pending. Consequently, failed does not appear directly in `to_dispatch`; attempt increases only on the next valid claim. After the budget is exhausted, only a manual `dispatch retry --force` is permitted. It sets `retryBudgetBase` to the current attempt and opens a new budget window, but never resets attempt.
|
|
86
91
|
|
|
87
|
-
`retryBudgetBase`, token, expected/published SPEC sets, orphanReason/orphanAt, lastProofAt, and
|
|
92
|
+
`retryBudgetBase`, token, expected/published SPEC sets, orphanReason/orphanAt, lastProofAt, claimedAt, and the attempt's `precheckFailures` counter are all serialized into `state.json`. The watchdog's `abandoned` value is a report of groups whose budgets are exhausted, not a seventh fold state.
|
|
88
93
|
|
|
89
94
|
### Time and Snapshots
|
|
90
95
|
|
|
@@ -145,7 +150,7 @@ Both explicit submit and recovery merge the current input with every in-group ca
|
|
|
145
150
|
1. If the group does not yet have all its SPECs, call `runPartialGroupGates` to validate every existing draft. Perform the page coverage-union completeness check only when all SPEC-units associated with that page are present. A missing unit alone must not incorrectly trigger G1 missing.
|
|
146
151
|
2. If the group has its complete SPEC set, call `runGroupGates` to run the full group gates, including missing-draft and coverage completeness checks.
|
|
147
152
|
|
|
148
|
-
An **explicit** gate failure
|
|
153
|
+
An **explicit** gate failure appends `precheck-failed` with `failure_reason`, keeps the attempt live and the token valid, returns `accepted: []`, and does not publish staged canonical drafts from this call. The CLI prints the individual failures, the failed-submit count, and exits nonzero; it must not print Submitted success text. The worker fixes the draft and submits again with the same token. After the third failed submit (`DEFAULT_MAX_PRECHECK_FAILURES = 3`), the same call appends `abandon/precheck-failed`, and watchdog retries that explicit failure automatically within budget. A worker should run the same CLI with `--dry-run` first: it runs the same gates and writes nothing.
|
|
149
154
|
|
|
150
155
|
A **recovery** gate failure instead returns `recoveryFailed` and maps the affected candidates to `deferred` with a `gate-failed:` reason. It writes no `abandon/precheck-failed`, appends no submit, installs no staged alias, and consumes no retry budget by itself. The unchanged drafts remain repairable by a later eligible recovery scan or explicit submission. Independent phantom, lease-expiry, or orphan-grace handling still runs afterward and may cause the ordinary timeout/retry transition.
|
|
151
156
|
|
|
@@ -187,6 +192,7 @@ run behavior-audit.mjs <output> pre <group_id> --attempt <n>
|
|
|
187
192
|
write drafts/attempt-<n>/<stem>.json
|
|
188
193
|
write behavior/attempt-<n>/<group_id>/post-review.json
|
|
189
194
|
run behavior-audit.mjs <output> post <group_id> --attempt <n>
|
|
195
|
+
submit.mjs <output> <group_id> --token <t> --dry-run --draft <file> ... # gates only; writes nothing
|
|
190
196
|
submit immediately through submit.mjs
|
|
191
197
|
```
|
|
192
198
|
|
|
@@ -238,6 +244,8 @@ loop:
|
|
|
238
244
|
7. wait for work notification or waker background completion notification, then return to 1
|
|
239
245
|
```
|
|
240
246
|
|
|
247
|
+
With `wait_mode=foreground` (the skill runs inside a dispatched sub-agent that must not end its turn), steps 6–7 run the waker as a blocking foreground call (`waker --max-wait <s>`, or `wait --max-wait <s>` when another live owner holds the lock) and return to 1 after it exits; the turn ends only at finalize or hard-block. See SKILL.md → Foreground Wait Mode.
|
|
248
|
+
|
|
241
249
|
Each group awaiting dispatch still follows `dispatch claim` → start a background Agent (replacing the prompt token) → obtain an agent-id → `dispatch confirm`. A claim/dispatch failure must not be represented as confirm. If `to_dispatch` is nonempty but no group was dispatched this round and there are no live/claimed groups, that is a hard-block. Do not simply finish the round and forget the groups.
|
|
242
250
|
|
|
243
251
|
Recovery order cannot be changed: process events first, including leftover consuming; then run watchdog; then decide whether to complete, dispatch, or arm. Complete, error, lock/event abnormalities, and every other hard-block all stop first. An error path or any stop path never automatically rearms/arms. After context compaction, likewise begin again at step 1 rather than reconstructing the group list from memory.
|
|
@@ -329,7 +337,7 @@ Handle typical failures according to the protocol:
|
|
|
329
337
|
| Duplicate/late agent | Attempt directories, token identity, and pre-submission state/hash rechecks isolate old writes |
|
|
330
338
|
| Stuck agent | live lease → orphaned → grace → abandon; current proof/submit can revive it during this sequence |
|
|
331
339
|
| Orchestrator memory loss | Recover consuming/event first, then run watchdog; never fill in state from memory |
|
|
332
|
-
| precheck failure |
|
|
340
|
+
| precheck failure | `precheck-failed` + failure_reason; the attempt stays live for up to 3 failed submits, then abandon and automatic retry within budget. Only manual force opens a new budget |
|
|
333
341
|
| Corrupt or busy ledger | Corruption fails fast; busy uses bounded lock waits and at most three child-agent attempts, without skipping events |
|
|
334
342
|
| Abnormal waker process | error event → best-effort reconcile → stop + errors archive + manual rearm |
|
|
335
343
|
| live stale / invalid lock / unconsumed event | hard-block/event-pending; do not automatically change owners based on TTL or a guessed dead PID |
|
|
@@ -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 `## 场景`; the final section is `## 安卓代码参考`; and `## 与需求描述的差异` is absent. Any `实现契约` 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.
|
|
12
|
+
| G2 | The H1 is `# <title> SPEC` (one space before `SPEC`); there is at least one `## 场景`; the final section is `## 安卓代码参考`; and `## 与需求描述的差异` is absent. Any `实现契约` 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 Chinese prose is glued to it (`先请求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 (`字段 code 为 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 (`字段名:` / `类型/编码方式:` / `默认值:` / `是否传:`) 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 `默认值=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 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
|
|
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 text formed by concatenating the referenced scenario's `title + steps`. 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
|
-
|
|
128
|
+
A draft may supply the token for an `edges` claim. Compose routes and overlay names (`compose-route:Category`, `overlay:OptionsDialog`, …) have no Chinese stem in the frozen vocabulary, so the claim itself may carry `claim_token`:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{"item": "compose-route:Category", "by_scenario": 3, "claim_token": "分类"}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
A supplied token is trimmed and matched **verbatim** (no compound splitting) 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 "第 N 个场景没有描述 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 (Legacy Secondary)
|
|
135
147
|
|
|
136
|
-
The script derives `claim_token` from each item
|
|
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` |
|
|
152
|
+
| `edges` | A draft-supplied `claim_token` wins; otherwise the Chinese stem of the `target` node's `label` (normalize camelCase and strip the `Fragment`/`Activity`/`Screen` suffix) | `fragment:SearchMenuFragment` → `搜索` |
|
|
141
153
|
| `widgets` | The widget's `label` (if there is no label, the Chinese equivalent of its `kind`) | `searchBtn` → `搜索` |
|
|
142
154
|
| `interactions` | The `claim_token` predefined for that signal in the interaction-signal rules (fixed for each signal when it is collected) | `setOnRefreshListener` → `下拉刷新` |
|
|
143
155
|
|
|
@@ -151,6 +163,14 @@ The script derives `claim_token` from each item; the LLM does not supply it.
|
|
|
151
163
|
|
|
152
164
|
**Validation**: The word `搜索` must appear in the text formed by concatenating scenario two's `title + steps`.
|
|
153
165
|
|
|
166
|
+
#### Example 1b: Compose route with a draft-supplied token (edges)
|
|
167
|
+
|
|
168
|
+
**Item**: `{"item": "compose-route:Category", "by_scenario": 3, "claim_token": "分类"}`
|
|
169
|
+
|
|
170
|
+
**Derivation**: none — `Category` has no entry in the frozen stem vocabulary.
|
|
171
|
+
|
|
172
|
+
**Validation**: The exact string `分类` must appear in scenario three's `steps` (no compound splitting applies to a supplied token).
|
|
173
|
+
|
|
154
174
|
#### Example 2: Widget (widgets)
|
|
155
175
|
|
|
156
176
|
**Item**: `{"item": "searchBtn@layout/home_fragment.xml:65", "by_scenario": 2}`
|
|
@@ -269,6 +289,12 @@ coverage.edges is missing the outgoing edge "fragment:SettingsFragment"
|
|
|
269
289
|
- Add the step "进入设置页面" to a scenario's steps.
|
|
270
290
|
- Add the corresponding entry to `coverage.edges` and point it to that scenario.
|
|
271
291
|
|
|
292
|
+
If the failure is `No Chinese 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 word into the step:
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{"item": "compose-route:Category", "by_scenario": 2, "claim_token": "分类"}
|
|
296
|
+
```
|
|
297
|
+
|
|
272
298
|
### 7.3 G5 Failure: Nonexistent Code Traceability Reference
|
|
273
299
|
|
|
274
300
|
**Failure example**:
|
|
@@ -302,7 +328,7 @@ After drafting, review the following checklist:
|
|
|
302
328
|
- [ ] G2: No `实现契约` heading at any level is present; facts are merged into the consuming steps.
|
|
303
329
|
- [ ] 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`).
|
|
304
330
|
- [ ] 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.
|
|
305
|
-
- [ ] Contracts: Enumerations are complete, with no vague endings such as "等选项" or "之类"; rule
|
|
331
|
+
- [ ] Contracts: Enumerations are complete, with no vague endings such as "等选项" or "之类"; 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.
|
|
306
332
|
- [ ] G4: For behavior-enabled pages, `discovery.json` contains every immutable assertion unchanged plus only validated semantic additions.
|
|
307
333
|
- [ ] 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.
|
|
308
334
|
- [ ] 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.
|