@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
|
@@ -44,14 +44,14 @@ policy:
|
|
|
44
44
|
Context budget, context window, remaining tokens, a growing session, imminent compaction or completed compaction are neither a node terminal state nor a pipeline terminal state.
|
|
45
45
|
They must not be used as grounds to:
|
|
46
46
|
· stop the current node or later nodes, or record a node that has not finished as done / skipped / failed;
|
|
47
|
-
· announce to the user that the migration is over, ask for a new session, or ask to resume with
|
|
47
|
+
· announce to the user that the migration is over, ask for a new session, or ask to resume with FROM_NODE;
|
|
48
48
|
· skip nodes, merge steps, or enter logic.finalize early to save context;
|
|
49
49
|
· ask the user whether to stop first because of context.
|
|
50
|
-
The only allowed stops are the conditions already written in this workflow: hard_stop, waiting at a human gate,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Also, with SPEC_ENGINE=
|
|
54
|
-
once notified it must return to that event loop — that is neither the node ending nor the migration ending.
|
|
50
|
+
The only allowed stops are the conditions already written in this workflow: hard_stop, waiting at a human gate, asking the user for a needs_input (policy.dispatch),
|
|
51
|
+
the platform adaptation layer's Before Step nesting-depth check being unsatisfied (stop and wait while the user fixes the configuration and restarts),
|
|
52
|
+
and a leaf returning per fail_matrix. The primary waiting for a sub-agent to return (a blocking dispatch call) is not a stop.
|
|
53
|
+
Also, with SPEC_ENGINE=spec-generate enrich.spec_gen runs inline in the primary (the exception in policy.dispatch) and may end the round
|
|
54
|
+
while its event loop waits for background completion notifications; once notified it must return to that event loop — that is neither the node ending nor the migration ending.
|
|
55
55
|
After the host compacts or summarizes the session, continue from the current step according to the ledger and node artifacts; do not treat compaction as completion.
|
|
56
56
|
The invoke of every skill node must start with: context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish.
|
|
57
57
|
If a leaf still returns citing the context budget, handle it per that node's fail_matrix; it must not be escalated into a voluntary wrap-up of the whole pipeline.
|
|
@@ -81,13 +81,15 @@ policy:
|
|
|
81
81
|
(by then ui.batch is terminal, the Android index is normalized by discover.android_index, so this is normally an empty sync);
|
|
82
82
|
- ledger busy -> report ok:false after the leaf's three retries; lock / conflict / unrecoverable events -> hard-block immediately;
|
|
83
83
|
- version / environment hard failures are not fixed inside the node; report them as is (preflight already blocks homegraph ≥ 1.5.2).
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
A sub-agent never asks the user directly (the user cannot see its questions). Questions a node invoke marks "interactive -> needs_input":
|
|
85
|
+
under INTERACTION_MODE=interactive they make the round trip through the primary per policy.dispatch's needs_input; under auto they take that entry's default branch.
|
|
86
|
+
Other unexpected questions: interactive -> also needs_input; auto -> do not ask; continue with the safe default in that skill's document;
|
|
87
|
+
no default -> return { "ok": false, "note": "<question>: <evidence>" } and handle per fail_matrix. Never stop the whole pipeline just to be able to ask.
|
|
88
|
+
(With SPEC_ENGINE=spec-generate enrich.spec_gen runs inline in the primary and may ask directly under interactive.)
|
|
87
89
|
failure_semantics: |
|
|
88
90
|
hard_stop: node fails -> the whole pipeline stops, reporting the failure reason and how to resume.
|
|
89
91
|
hard_stop_unless_logic_skipped: same as hard_stop; but when SKIP_LOGIC is true (or the profile has force_skipped the logic chain) it is treated as skipped.
|
|
90
|
-
ledger: ${LEDGER} is append-only and kept across runs (
|
|
92
|
+
ledger: ${LEDGER} is append-only and kept across runs (resuming from FROM_NODE relies on it to know the original run's profile and each node's terminal state). After boot.workspace succeeds, the Runner records run_start;
|
|
91
93
|
**every node** has its terminal line submitted by the Runner through ledger.mjs (equivalent arguments: --ledger ${LEDGER} --node <id>
|
|
92
94
|
--status done|reused|skipped|failed [--reason <reason>]; skipped because artifacts are reused -> reused; skipped via skip_if / force_skip -> skipped).
|
|
93
95
|
Before a node **starts** running (after the skip / reuse decision, before its first action), the Runner records the equivalent of `--node <id> --begin`;
|
|
@@ -119,7 +121,7 @@ policy:
|
|
|
119
121
|
· Initialization: ask_run_config_once (INTERACTION_MODE + INTERACTIVE_GATES only under interactive + reuse)
|
|
120
122
|
The UI chain always runs (except when reusing existing artifacts). It must come **before** run_env_preflight: whether preflight treats the APK and an online adb device as hard requirements
|
|
121
123
|
depends on reuse and the profile. Scheduling is fixed serial.
|
|
122
|
-
Do not explain scheduling to the user.
|
|
124
|
+
Do not explain scheduling to the user, and do not ask about serial or parallel (no SCHEDULE_MODE).
|
|
123
125
|
· INTERACTION_MODE=auto -> fully automatic: no human_gate asks; it goes straight to --write-confirmed;
|
|
124
126
|
INTERACTIVE_GATES is forced to empty (any passed value is ignored). After auto is chosen, never show or ask about gates that need a human check again.
|
|
125
127
|
After initialization questions are answered, nobody is waited for.
|
|
@@ -158,7 +160,7 @@ policy:
|
|
|
158
160
|
when the checkpoint is missing / stale the gate must run as usual to rewrite it or ask again (downstream utg_snapshot's --assert-ready depends on it).
|
|
159
161
|
With an already valid checkpoint the gate script itself exits 0, at almost zero cost.
|
|
160
162
|
· If woken by a background completion notification while waiting -> handle the notification, fill the slot, and restate that this gate is still awaiting confirmation; a notification is not an answer and must not be used to write the checkpoint.
|
|
161
|
-
# The single rule for the host's image-reading capability. Observed
|
|
163
|
+
# The single rule for the host's image-reading capability. Observed in practice: when the host does not accept images, a sub-agent reading one PNG permanently breaks its session
|
|
162
164
|
# (invalid messages.content.type, and resuming hits the same error); the orchestrator could only add ad-hoc bans on the spot, and each skill had its own rule.
|
|
163
165
|
image_read: |
|
|
164
166
|
Image-read probing has two layers that **do not reuse each other's verdict**:
|
|
@@ -173,16 +175,50 @@ policy:
|
|
|
173
175
|
· bootstrap false → must run tip_image_read_false (tip only, no waiting): after switching to multimodal, **open a new
|
|
174
176
|
session and re-enter the original command**; never force true / never tip the user to pass `image_read=`. No tip when true.
|
|
175
177
|
· ui.batch probe true: read screenshots per procedure; false: no-image block + text evidence; mid-run miss → treat remaining as false.
|
|
176
|
-
#
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
# Dispatch rules (node invokes only reference them, never restate them).
|
|
179
|
+
dispatch: |
|
|
180
|
+
The primary (main session) loads only a2h-app-migrate and only orchestrates: driving the DAG Runner (run / continue / complete / confirm), handling its waits,
|
|
181
|
+
calling results back, the progress checklist and talking to the user; before_run / after_run, success checks and the ledger belong to the Runner / production executor. It **loads no** leaf skill, does not read a leaf SKILL.md, and does not expand a leaf's internal Stages / waves.
|
|
182
|
+
· Every type: skill node uses dispatch: task_subagent: one dispatched sub-agent runs the whole node:
|
|
183
|
+
discover.arch, discover.utg_static, ui.batch, enrich.spec_gen, enrich.module_docs, logic.spec_pipeline.
|
|
184
|
+
The only exception: enrich.spec_gen with SPEC_ENGINE=spec-generate is primary_skill_inline (a2h-spec-generate marks a worker done when its
|
|
185
|
+
completion notification arrives and has no foreground wait mode; inside a sub-agent it would return as soon as it ends the round).
|
|
186
|
+
· Scheduling stays serial; only one node sub-agent runs at a time:
|
|
187
|
+
discover.arch -> discover.utg_static (discover legs 1 and 2);
|
|
188
|
+
ui.batch -> review.ui_batch -> enrich.spec_gen -> enrich.module_docs; logic.spec_pipeline after adopt.
|
|
189
|
+
· Depth: node sub-agents are at depth 1; the leaves' internal workers (arch module evidence, utg_static reviewers, ui.batch conversion,
|
|
190
|
+
page-specgen group workers, spec_pipeline chunk / resolver / review) are at depth 2. The host must allow depth ≥ 2 (configuring it is not this skill's job).
|
|
191
|
+
If the primary cannot dispatch sub-agents -> that node falls back to primary_skill_inline and runs inline as before; the final report says so.
|
|
192
|
+
· Host nesting depth 1 (e.g. atomcode / trae, CodeBuddy IDE, Qoder CLI): every type: skill node runs
|
|
193
|
+
primary_skill_inline; never dispatch a node sub-agent — a node sub-agent cannot dispatch further sub-agents, so the leaf's internal workers cannot be dispatched.
|
|
194
|
+
· A sub-agent must not end its round to wait for background notifications (ending it returns to the primary with the work unfinished):
|
|
195
|
+
a2h-page-specgen gets wait_mode=foreground and a2h-spec-design-pipeline gets WAIT_MODE=foreground (block in the foreground on the waker / wait);
|
|
196
|
+
a2h-batch-ui-align (group_queue.mjs wait), a2h-utg-static (reviewers waited on in the foreground by the same protocol), arch and module_docs already wait in the foreground.
|
|
197
|
+
task prompt = the common header below + the node's whole invoke. Substitute the variables with real values in the primary first, evaluate
|
|
198
|
+
[... only when ...] and drop entries that do not apply; never hand ${...} to the sub-agent verbatim. Common header:
|
|
199
|
+
You are a node executor dispatched by a2h-app-migrate, node <id>. First load <leaf skill> with the skill tool (read its SKILL.md in full),
|
|
200
|
+
then follow the invoke below until the node reaches a terminal state.
|
|
201
|
+
· Context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish.
|
|
202
|
+
· Never ask the user directly. For questions the invoke marks "interactive -> needs_input", this run's INTERACTION_MODE=<value>:
|
|
203
|
+
under interactive return { "ok": false, "needs_input": { "question": "...", "options": [...], "context": "..." } }
|
|
204
|
+
(persist the work done so far first; the redispatch resumes it); under auto take that entry's default branch.
|
|
205
|
+
· Dispatch the leaf's internal workers yourself as sub-agents per the leaf's rules.
|
|
206
|
+
· Do not end the round to wait for background notifications; return only at the node's terminal state, and your last message is only the JSON the invoke asks for.
|
|
207
|
+
· Do not write the ledger, do not write / clear gate checkpoints, do not run before_run / after_run (those belong to the Runner / production executor).
|
|
208
|
+
After a sub-agent returns, the primary:
|
|
209
|
+
1) Takes the JSON from its last message. Not JSON (a status line such as "I will continue when the background task finishes", prose, a truncated object) -> the sub-agent went idle mid-run:
|
|
210
|
+
continue the same session (reuse that sub-agent's session) with "Continue in the foreground until the node reaches a terminal state; reply only with the final JSON", at most 2 times;
|
|
211
|
+
still no JSON -> do not judge it failed; go straight to step 3 and let the Runner's success checks decide.
|
|
212
|
+
2) needs_input -> ask the user its question / options in the node's user_facing voice (waiting rules as in human_gate_protocol:
|
|
213
|
+
a background notification is not an answer); once answered, redispatch the same node with "The user's answer to "<question>": <verbatim>" appended to the task prompt.
|
|
214
|
+
At most 3 round trips per node; after that continue on the auto default branch.
|
|
215
|
+
3) Calls back to the Runner — **never trust the return value**: the outcome is always ok:true, with the sub-agent's own ok / reason copied verbatim into note
|
|
216
|
+
(executor complete -> Runner complete, see SKILL.md "Host handling of waits and callbacks"). The executor runs after_run and the Runner judges
|
|
217
|
+
completion by the node's success: success fails -> failed; the sub-agent reported ok:false but success passes -> success wins.
|
|
218
|
+
The sub-agent itself never calls the executor / Runner.
|
|
219
|
+
4) Refreshes the progress checklist from the Runner's presentation (user_facing fields come from the returned JSON; drop a sentence whose field is missing).
|
|
220
|
+
Redispatch = resume: after a node fails or is interrupted, dispatching the same node again lets the leaf continue by its own checkpoint protocol
|
|
221
|
+
(batch_progress / page-specgen ledger / spec_pipeline_state); the primary does not clear artifacts.
|
|
186
222
|
# The only wording the primary session uses to report progress to the user. Node ids remain for scheduling, the ledger and resume arguments only.
|
|
187
223
|
user_facing: |
|
|
188
224
|
The only shape of a chat progress message (fixed title "Migration progress"; no separate progress narration;
|
|
@@ -255,11 +291,11 @@ policy:
|
|
|
255
291
|
pages only with page-specgen --scope, and the run directory belongs to its scope_id. Do not start a SPEC generation outside the
|
|
256
292
|
orchestration and feed it in as specs_json (see spec_order_boundary).
|
|
257
293
|
resume_from: |
|
|
258
|
-
|
|
294
|
+
FROM_NODE≠bootstrap = resume from FROM_NODE, decided by bootstrap.plan_resume (resume_plan.mjs):
|
|
259
295
|
· FROM_NODE must be an id in nodes (not bootstrap), otherwise hard_stop (do not guess the closest node).
|
|
260
296
|
· **Inherit the original run's profile** (the last non-resume run_start in the ledger) and set PROFILE to it — lane trimming, force_skip,
|
|
261
297
|
and preflight all follow the original profile; switching profile when resuming is not allowed (resume_base_profile differs from the original run -> hard_stop). When the ledger is missing
|
|
262
|
-
(WORK deleted / old version) the user must give resume_base_profile=full|ui-only, otherwise hard_stop.
|
|
298
|
+
(WORK deleted / old version) the user must give resume_base_profile=full|ui-only|incremental, otherwise hard_stop.
|
|
263
299
|
· **spec engine** (SPEC_ENGINE) is written into the pointer and the ledger with the run (run_start.spec_engine): a resume inherits the original run's engine
|
|
264
300
|
(resume_plan.mjs's JSON.spec_engine); if the user explicitly passes a different spec_engine -> exit 2 hard_stop —
|
|
265
301
|
switching engines = a new run (the two engines never share one run directory); an engine recorded in the ledger that is not recognized is likewise exit 2.
|
|
@@ -282,13 +318,13 @@ policy:
|
|
|
282
318
|
to read one progress sentence (JSON.line; tombstones / mismatched run_at go to stale); **never** use the summaries to decide REUSE_*,
|
|
283
319
|
and never use them to replace the leaf checkpoint protocol. The source of truth is still the leaf artifacts.
|
|
284
320
|
parallel_rule: |
|
|
285
|
-
parallel_group: discover_par — arch and utg_static both
|
|
286
|
-
post_utg segment: discover.utg_snapshot -> parallel_group post_utg (topology group name kept; scheduling in policy.
|
|
321
|
+
parallel_group: discover_par — arch and utg_static are both dispatched as sub-agents, fixed serial arch -> utg_static (both modes, see policy.dispatch); resource conversion is run by ui.batch Step 2 via a2h-resource-convert (avoids a write race with the arch scaffold on build-profile.json5).
|
|
322
|
+
post_utg segment: discover.utg_snapshot -> parallel_group post_utg (topology group name kept; scheduling in policy.dispatch).
|
|
287
323
|
· Zero write intersection: spec_gen only reads ${UTG_SNAPSHOT} and only writes ${RUN_DIR}.
|
|
288
324
|
· After ui.batch returns: first pass review.ui_batch -> enrich.spec_gen (kept adjacent); enrich.module_docs comes after enrich.spec_gen.
|
|
289
325
|
|
|
290
326
|
|
|
291
|
-
⚙ discover_par is fixed serial arch -> utg_static (both
|
|
327
|
+
⚙ discover_par is fixed serial arch -> utg_static (both dispatched as sub-agents, see policy.dispatch):
|
|
292
328
|
scaffold_new (HMOS does not exist / is empty / contains only .git·.DS_Store·.hometrans; emptiness is judged like create_project, ignoring those three; .hometrans is HomeTrans's own records, moved aside for the shell creation and put back)
|
|
293
329
|
requires arch to build the shell first, otherwise boot.workspace / utg_static would dirty the directory. Handling: paths_preflight does a non-destructive probe;
|
|
294
330
|
boot.workspace needs discover.arch when ${SERIALIZE_DISCOVER}; utg_static hangs off boot.workspace.
|
|
@@ -329,9 +365,9 @@ policy:
|
|
|
329
365
|
at the pages root; list order = numeric-aware path order (page directory order -> file name), and the so-id is the
|
|
330
366
|
1-based position in that order (a brand-new campaign key — the root must not change mid-campaign, or the commit-message so-id
|
|
331
367
|
resume would lose track). The idx root (<run>/generation/specs) is only an internal anchor of the leaf; the orchestrator does not consume it.
|
|
332
|
-
The orchestrator and every other node are **forbidden** to assemble specs.json by hand, and also forbidden to
|
|
368
|
+
The orchestrator and every other node are **forbidden** to assemble specs.json by hand, and also forbidden to separately dispatch a sub-agent for any SPEC generation engine (a2h-spec-generate / a2h-page-specgen).
|
|
333
369
|
subagent_depth_budget: |
|
|
334
|
-
See policy.
|
|
370
|
+
See policy.dispatch (node sub-agents at depth 1, leaf-internal workers at depth 2).
|
|
335
371
|
|
|
336
372
|
# scripts/validate_workflow.mjs enumerates every node pair with "no ordering on the DAG" and compares the expanded path
|
|
337
373
|
# prefixes of their reads/writes. Coarse declarations (such as ui.batch's ${HMOS}/) use the node-level `path_excludes` to carve out
|
|
@@ -347,7 +383,7 @@ concurrency_exemptions:
|
|
|
347
383
|
which is an empty sync when the source is unchanged; when init / a full index is needed this node fails directly without rebuilding
|
|
348
384
|
(see the corresponding entry in policy.leaf_questions). ui.batch only reads (android_index_ready=true).
|
|
349
385
|
With SPEC_ENGINE=page-specgen the node's first prepare may run init / index / sync (the same ensureIndex rules);
|
|
350
|
-
ui.batch is already terminal in this segment (policy.
|
|
386
|
+
ui.batch is already terminal in this segment (policy.dispatch, adjacent serial), so there is no concurrent reader.
|
|
351
387
|
|
|
352
388
|
profiles:
|
|
353
389
|
full:
|
|
@@ -366,9 +402,6 @@ profiles:
|
|
|
366
402
|
# Same lanes and nodes as full; every difference lives inside the nodes (ui.batch MODE=incremental, enrich.spec_gen --scope,
|
|
367
403
|
# run_dir owned by scope_id). This round's UI / SPEC / logic outputs belong to another scope, so the previous round's are not reused (see ask_run_config_once.reuse).
|
|
368
404
|
include_lanes: [boot, discover, enrich, adopt, logic, finalize]
|
|
369
|
-
resume:
|
|
370
|
-
description: resume from FROM_NODE
|
|
371
|
-
include_lanes: all
|
|
372
405
|
|
|
373
406
|
vars:
|
|
374
407
|
ANDROID: { required: true, from: android_project_dir }
|
|
@@ -395,7 +428,7 @@ vars:
|
|
|
395
428
|
# ↓ back-filled from the output of bootstrap's env_preflight (report.hmos_mode / report.serialize_discover)
|
|
396
429
|
HMOS_MODE: { required: false, default: "", set_by: "env_preflight -> hmos_mode (scaffold_new | existing_project)" }
|
|
397
430
|
SERIALIZE_DISCOVER: { required: false, default: false, set_by: "env_preflight -> serialize_discover (= HMOS_MODE == scaffold_new)" }
|
|
398
|
-
PROFILE: { required: false, from: profile, default: full, choices: [full, ui-only, incremental
|
|
431
|
+
PROFILE: { required: false, from: profile, default: full, choices: [full, ui-only, incremental], set_by: "env_preflight -> profile (back-filled after validation)" }
|
|
399
432
|
# The scope request of profile=incremental (page descriptions / a module / UTG node ids): resolved only by ui.batch's I1–I4 and confirmed by the user;
|
|
400
433
|
# the confirmed ${HMOS}/.hometrans/incremental/scope.json is the scope of record for both lanes (enrich.spec_gen reads only it).
|
|
401
434
|
SCOPE: { required: false, required_when: "${PROFILE} == incremental and ${SCOPE_DOC} == '' and ${ANDROID_DIFF} == '' and ${SCOPE_FILE} == ''", from: [scope, scope_request], default: "" }
|
|
@@ -412,7 +445,7 @@ vars:
|
|
|
412
445
|
SCOPE_PAGES: { required: false, default: "", set_by: "discover.feature_scope → JSON.pages (0 = no-UI logic only)" }
|
|
413
446
|
# back-filled by bootstrap.incremental_history: UTG page ids whose UI the migration ledger records as migrated (comma-separated), for ui.batch's I4 table
|
|
414
447
|
MIGRATED_PAGES: { required: false, default: "", set_by: "bootstrap.incremental_history → JSON.ui_done" }
|
|
415
|
-
# Start node id for
|
|
448
|
+
# Start node id for resuming (semantics in policy.resume_from); default bootstrap = run from the beginning.
|
|
416
449
|
FROM_NODE: { required: false, from: [from_node, from_stage], default: bootstrap }
|
|
417
450
|
# Profile of the original run when resuming: only needed when the ledger is missing (WORK deleted / old version); when the ledger has a record it is used only for cross-checking (see policy.resume_from).
|
|
418
451
|
RESUME_BASE_PROFILE: { required: false, from: resume_base_profile, default: "" }
|
|
@@ -520,13 +553,13 @@ nodes:
|
|
|
520
553
|
# creating directories/writing files before it passes means dropping junk into a path that may be judged invalid.
|
|
521
554
|
# probe_all_artifacts only does file_exists (plus the read-only check scripts in the entries) and writes nothing, so it can come before preflight.
|
|
522
555
|
actions:
|
|
523
|
-
#
|
|
556
|
+
# FROM_NODE≠bootstrap: read the original run's profile and node terminal states from the ledger to decide each REUSE_*
|
|
524
557
|
# (policy.resume_from). Reads only the ledger and does not depend on the run directory; must come before resolve_run_dir_show /
|
|
525
558
|
# describe_run_dir — they back-fill RUN_DIR / SPEC_DIR from the pointer; if this came after them, probe 3 / specs_json_required
|
|
526
559
|
# would judge with the wrong directory and hard_stop right away. It also comes before probe: PROFILE must first be switched to the original run's profile,
|
|
527
560
|
# and the later reuse decisions / preflight all follow it.
|
|
528
561
|
- plan_resume:
|
|
529
|
-
when: "${
|
|
562
|
+
when: "${FROM_NODE} != 'bootstrap'"
|
|
530
563
|
script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/resume_plan.mjs"
|
|
531
564
|
runner: node
|
|
532
565
|
args: "--workflow ${SKILLS_ROOT}/a2h-app-migrate/references/workflow.yaml --ledger ${LEDGER} --from-node ${FROM_NODE} [--base-profile ${RESUME_BASE_PROFILE} only when non-empty] --engine ${SPEC_ENGINE} --engine-given ${SPEC_ENGINE_GIVEN}"
|
|
@@ -537,7 +570,7 @@ nodes:
|
|
|
537
570
|
The probe items in JSON.require_probes must be done, otherwise hard_stop and list the missing artifacts;
|
|
538
571
|
tell the user JSON.inherited (skips / failures carried over from the original run, not rerun) verbatim. ask_run_config_once no longer asks about reuse.
|
|
539
572
|
exit_2: hard_stop # FROM_NODE invalid / resume switched profile: tell the user JSON.error verbatim
|
|
540
|
-
exit_3: hard_stop # no original run record: ask the user to add resume_base_profile=full|ui-only and rerun
|
|
573
|
+
exit_3: hard_stop # no original run record: ask the user to add resume_base_profile=full|ui-only|incremental and rerun
|
|
541
574
|
# When the ANDROID given by the user is not the project root, do not wait for preflight to FAIL before asking again. Only when the APK path contains
|
|
542
575
|
# `/build/outputs/apk`, walk up from that prefix to find settings.gradle and substitute it. Without that marker, no substitution
|
|
543
576
|
# (avoids walking all the way up to an unrelated project at the drive root when the APK sits elsewhere). Read-only; comes before every action that uses ANDROID.
|
|
@@ -589,7 +622,7 @@ nodes:
|
|
|
589
622
|
6: { node: adopt.specs_json, skill: "(adopt)", any: ["${SPECS_JSON}", "${SPEC_DIR}/specs.json"] }
|
|
590
623
|
# state is written in pipeline I1 (plan_groups --emit-state), so file present ≠ finished;
|
|
591
624
|
# the check command must also exit 0 (all groups terminal, no unfinished chunk, Finalization has written state.finalization with both gate markers finalization.homecheck / finalization.smoke).
|
|
592
|
-
# exit 1 -> treated as unfinished;
|
|
625
|
+
# exit 1 -> treated as unfinished; dispatch the pipeline sub-agent again and let its own Mid-flight resume pick up (do not delete state;
|
|
593
626
|
# when only Finalization is missing it goes straight to smoke + Finalization). exit 3 (all groups failed) -> finished but failed, not reusable;
|
|
594
627
|
# handled by before_run when the node runs (resuming as is can achieve nothing; only a new round or skipping this round).
|
|
595
628
|
# exit 4 -> hard fingerprint mismatch (specs.json content sha256 / specs_json|android|design_dir paths;
|
|
@@ -652,7 +685,7 @@ nodes:
|
|
|
652
685
|
# the previous round's UI / feature list / logic outputs belong to another scope (or to a full run), so reusing them migrates nothing of this scope;
|
|
653
686
|
# arch / utg_static / module_docs are whole-project outputs and are probed and asked as usual.
|
|
654
687
|
force_false_when: { "${PROFILE} == incremental": [REUSE_UI_BATCH, REUSE_SPEC_GENERATE, REUSE_LOGIC_PIPELINE] }
|
|
655
|
-
#
|
|
688
|
+
# When resuming (FROM_NODE≠bootstrap) it is decided by policy.resume_from, not asked here.
|
|
656
689
|
# The UI chain always runs. There is no switch that skips the whole UI chain; reusing existing artifacts goes through REUSE_UI_BATCH.
|
|
657
690
|
config_vars: []
|
|
658
691
|
# When the UI chain will run (UI not reused) and the command line did not give apk_path, ask for it in the same round.
|
|
@@ -660,7 +693,7 @@ nodes:
|
|
|
660
693
|
# Question script (user-visible options). Full rules in policy.human_interaction; this template must keep the validate assertion phrases.
|
|
661
694
|
prompt_template: |
|
|
662
695
|
[a2h-app-migrate startup config]
|
|
663
|
-
Details in policy.human_interaction.
|
|
696
|
+
Details in policy.human_interaction.
|
|
664
697
|
Never put the human check gates and the run mode in the same question.
|
|
665
698
|
1) Run mode INTERACTION_MODE (required, single choice; do not include the human check options in this question):
|
|
666
699
|
- `auto` — fully automatic. After auto is chosen do not show gates that need a human check; INTERACTIVE_GATES is recorded as an empty string.
|
|
@@ -842,7 +875,7 @@ nodes:
|
|
|
842
875
|
If you want the model to recognise screenshots, switch the editor to a multimodal model
|
|
843
876
|
(Qwen3.8-Max, Kimi-K3, Opus-5 recommended), enable vision/image input, then **open a new session**
|
|
844
877
|
and re-enter the original migrate command — the image-read verdict is run-scoped and not kept across runs."
|
|
845
|
-
success: [{
|
|
878
|
+
success: [{ when: "${ENV_PREFLIGHT_PASSED} == true" }]
|
|
846
879
|
on_fail: hard_stop
|
|
847
880
|
|
|
848
881
|
# The reason for the conditional edge is in policy.parallel_rule (under scaffold_new this node must wait for discover.arch).
|
|
@@ -870,7 +903,7 @@ nodes:
|
|
|
870
903
|
# Do not pre-create SPEC_DIR: the run layout is owned exclusively by the leaf (a2h-spec-generate requires prepare to get a brand-new empty run workspace).
|
|
871
904
|
- ensure_dirs: ["${WORK}", "${CHECKPOINT_DIR}", "${RESUME_SUMMARIES_DIR}"]
|
|
872
905
|
- init_manifest: "${MANIFEST}" # write bootstrap's preflight table into MANIFEST
|
|
873
|
-
# Append only, never clear:
|
|
906
|
+
# Append only, never clear: resuming reads the previous run's records (the ledger item in policy.failure_semantics)
|
|
874
907
|
- init_ledger:
|
|
875
908
|
script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/ledger.mjs"
|
|
876
909
|
runner: node
|
|
@@ -935,7 +968,7 @@ nodes:
|
|
|
935
968
|
failed: "Page relations were not finished: {reason}. Without these relations the feature list cannot be written."
|
|
936
969
|
reused: "Page relations were not redone this round; the result from last time is reused."
|
|
937
970
|
skipped: "The feature list is not rewritten this round, so page relations were not sorted out."
|
|
938
|
-
dispatch: "
|
|
971
|
+
dispatch: "task_subagent"
|
|
939
972
|
# Hangs off boot.workspace: scaffold_new serialization propagates through it, see policy.parallel_rule.
|
|
940
973
|
needs: [boot.workspace, discover.android_index]
|
|
941
974
|
parallel_group: discover_par
|
|
@@ -982,7 +1015,7 @@ nodes:
|
|
|
982
1015
|
2) Answering (the review sections of SKILL.md; all three are REQUIRED):
|
|
983
1016
|
- Each part is answered independently, one reviewer per part, dispatched in the **background** (the same protocol as a2h-batch-ui-align step3-capture.md "Reviewer waves").
|
|
984
1017
|
Answers are written as {"items": [...]}, copying each item's key verbatim.
|
|
985
|
-
· This node is
|
|
1018
|
+
· This node is a sub-agent dispatched by migrate (policy.dispatch); dispatch reviewer sub-agents yourself (depth 2); at most 10 reviewers run at once, the rest go as earlier ones complete.
|
|
986
1019
|
· The answers file is the completion signal, not the agent: a part is done when
|
|
987
1020
|
node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/answers_check.mjs <absolute answers path> reports complete;
|
|
988
1021
|
an nl_hints / view_interactions part also needs
|
|
@@ -990,8 +1023,8 @@ nodes:
|
|
|
990
1023
|
Put both commands in the prompt; the reviewer runs them until they pass and quotes the result line before returning; put the rules hint_check prints into the prompt verbatim.
|
|
991
1024
|
· An agent that ended with incomplete answers / bad>0 is resumed in its own session (with the lines hint_check printed), not replaced by a new agent;
|
|
992
1025
|
only if it is still incomplete after that does the primary answer the remaining items unresolved. Never answer for an agent that is still running.
|
|
993
|
-
· If
|
|
994
|
-
{ "ok": false, "note": "
|
|
1026
|
+
· If this session cannot dispatch sub-agents: do not answer everything yourself and return ok:true. Return
|
|
1027
|
+
{ "ok": false, "note": "this session cannot dispatch sub-agents; worklist reviewers cannot be dispatched" }.
|
|
995
1028
|
- view_interactions: judge category per references/view-interactions.md; anything with insufficient evidence is unresolved;
|
|
996
1029
|
- nl_hints: fill nl_hint / action_override / evidence per item; evidence must be a single bare file:line, and hints use the App's own UI language;
|
|
997
1030
|
leave action_override empty for a plain tap and fill it only for double_tap / long_press / swipe-* or default; default means "no gesture, the page opens by itself", not "the default tap";
|
|
@@ -1038,7 +1071,7 @@ nodes:
|
|
|
1038
1071
|
# Not hung off boot.workspace: under scaffold_new it must touch ${HMOS} first, see policy.parallel_rule.
|
|
1039
1072
|
needs: [bootstrap, discover.android_index]
|
|
1040
1073
|
parallel_group: discover_par
|
|
1041
|
-
dispatch: "
|
|
1074
|
+
dispatch: "task_subagent"
|
|
1042
1075
|
skip_if: "${SKIP_DISCOVER_ARCH}"
|
|
1043
1076
|
# Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
|
|
1044
1077
|
before_run:
|
|
@@ -1235,7 +1268,7 @@ nodes:
|
|
|
1235
1268
|
|
|
1236
1269
|
# The leaf skill is dispatched by SPEC_ENGINE (skill_by_engine): spec-generate = a2h-spec-generate (internal steps of a single skill:
|
|
1237
1270
|
# prepare -> fused per-Area worker -> check-fused-spec -> finalize -> collect-specs -> publish-specs);
|
|
1238
|
-
# page-specgen = a2h-page-specgen (prepare -> waker rearm -> event loop -> finalize); dispatch in policy.
|
|
1271
|
+
# page-specgen = a2h-page-specgen (prepare -> waker rearm -> foreground event loop -> finalize); dispatch in policy.dispatch.
|
|
1239
1272
|
- id: enrich.spec_gen
|
|
1240
1273
|
lane: enrich
|
|
1241
1274
|
type: skill
|
|
@@ -1256,7 +1289,7 @@ nodes:
|
|
|
1256
1289
|
reused: "The feature list was not rewritten this round; the existing one is reused."
|
|
1257
1290
|
skipped: "No feature list this round."
|
|
1258
1291
|
parallel_group: post_utg
|
|
1259
|
-
dispatch: "primary_skill_inline"
|
|
1292
|
+
dispatch: "task_subagent(SPEC_ENGINE=page-specgen)| primary_skill_inline(SPEC_ENGINE=spec-generate)"
|
|
1260
1293
|
needs: [discover.utg_snapshot, discover.feature_scope]
|
|
1261
1294
|
skip_if: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE}"
|
|
1262
1295
|
# Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
|
|
@@ -1314,7 +1347,7 @@ nodes:
|
|
|
1314
1347
|
- skipped: true
|
|
1315
1348
|
invoke: |
|
|
1316
1349
|
Context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish (policy.context_budget).
|
|
1317
|
-
[dispatch] see policy.
|
|
1350
|
+
[dispatch] see policy.dispatch (this node = serial leg 2; page-specgen is dispatched as a sub-agent, spec-generate runs inline in the primary).
|
|
1318
1351
|
This node picks its leaf from SPEC_ENGINE (skill_by_engine): spec-generate -> the `══ SPEC_ENGINE=spec-generate ══` section below;
|
|
1319
1352
|
page-specgen -> run the `══ SPEC_ENGINE=page-specgen ══` section. Run only the section that matches SPEC_ENGINE.
|
|
1320
1353
|
══ SPEC_ENGINE=spec-generate ══
|
|
@@ -1345,7 +1378,7 @@ nodes:
|
|
|
1345
1378
|
**Step 5b**: regroup-by-page (folds the idx-root SPECs into page directories according to the frozen topology) ->
|
|
1346
1379
|
publish-specs (pages root = ${SPEC_DIR}, publishing the specs.json consumed downstream).
|
|
1347
1380
|
Concurrency of fused / review workers is managed by the skill per concurrency=; the orchestrator must not expand its internal steps.
|
|
1348
|
-
The orchestrator is **forbidden** to
|
|
1381
|
+
The orchestrator is **forbidden** to separately dispatch an a2h-spec-generate sub-agent — this node's dispatch already decides how it runs.
|
|
1349
1382
|
The output layout is owned exclusively by the skill ("Do not modify the <run-directory> layout"):
|
|
1350
1383
|
${SPEC_DIR}/<page>/<stem>-SPEC.md (page-grouped root; page names come from topology labels or pages-map.json)
|
|
1351
1384
|
${SPEC_DIR}/specs.json <- the list published by Step 5b at the pages root (the adoption source for SPECS_JSON)
|
|
@@ -1370,7 +1403,7 @@ nodes:
|
|
|
1370
1403
|
· Real failure signal = finalize exits non-zero + collect-specs / publish-specs still refuse under `--allow-incomplete`
|
|
1371
1404
|
(or the regroup-by-page process exits non-zero, collect-specs reports "declared SPEC cannot be read", 0 SPECs) -> report ok:false verbatim;
|
|
1372
1405
|
masking it with --allow-incomplete is **not allowed**.
|
|
1373
|
-
When finished
|
|
1406
|
+
When finished it outputs only JSON (inline in the primary; afterwards it returns to migrate scheduling):
|
|
1374
1407
|
{ "ok": true, "run_dir": "${RUN_DIR}", "specs_json": "${SPEC_DIR}/specs.json",
|
|
1375
1408
|
"spec_count": M, "manifest_items": P, "published": true,
|
|
1376
1409
|
"completeness": "complete" | "incomplete-known",
|
|
@@ -1380,6 +1413,9 @@ nodes:
|
|
|
1380
1413
|
══ SPEC_ENGINE=page-specgen ══
|
|
1381
1414
|
skill name: a2h-page-specgen (path `${SKILLS_ROOT}/a2h-page-specgen`; read its SKILL.md in full and
|
|
1382
1415
|
follow its Orchestration Loop / event protocol exactly; the orchestrator does not restate or rewrite that protocol).
|
|
1416
|
+
Run mode: wait_mode=foreground (this node is a sub-agent dispatched by migrate; SKILL.md "Foreground Wait Mode") —
|
|
1417
|
+
group workers are still dispatched in the background, but the wait becomes a blocking foreground waker call (--max-wait 480, shell timeout ≥ 600000 ms);
|
|
1418
|
+
**do not end the round**; return only at finalize or hard-block.
|
|
1383
1419
|
If this section conflicts with ${SKILLS_ROOT}/a2h-page-specgen/SKILL.md, the leaf SKILL.md wins;
|
|
1384
1420
|
this section only fixes the entry commands, the arguments and the success / failure criteria.
|
|
1385
1421
|
Arguments:
|
|
@@ -1398,7 +1434,7 @@ nodes:
|
|
|
1398
1434
|
--engine-mode ${ENGINE_MODE} --design-dir ${DESIGN_DIR} [--scope ${SCOPE_JSON} only when PROFILE=incremental]
|
|
1399
1435
|
2) node scripts/waker.mjs ${SPEC_DIR} rearm # prepare writes waker.stop first, so this step is mandatory
|
|
1400
1436
|
3) advance per SKILL.md's loop (watchdog --reconcile --json -> handle error/invalid -> claim ->
|
|
1401
|
-
background Agent (its prompt carries the token) -> dispatch confirm ->
|
|
1437
|
+
background Agent (its prompt carries the token) -> dispatch confirm -> foreground waker --max-wait 480 -> back to step 1)
|
|
1402
1438
|
4) complete with the evidence cleared -> node scripts/finalize.mjs ${SPEC_DIR}
|
|
1403
1439
|
[Unattended contract (policy.leaf_questions)]
|
|
1404
1440
|
This engine does not ask; homegraph init/index/sync is allowed; a busy ledger is reported after three retries; lock/conflict -> hard-block (a .ledger.lock left by an exited process on the same host is taken over automatically; if the lock persists, verify the holder per a2h-page-specgen references/execution-model.md §2 and delete it by hand).
|
|
@@ -1489,6 +1525,9 @@ nodes:
|
|
|
1489
1525
|
kind: skill
|
|
1490
1526
|
reuse_if: "${REUSE_UI_BATCH} == true"
|
|
1491
1527
|
after_terminal: resume_summary
|
|
1528
|
+
# Not finished (pending pages, or groups still queued / running): dispatch once more automatically. The skill resumes from
|
|
1529
|
+
# batch_progress.json and group_queue init re-queues the groups the last attempt left open. Only a second unfinished attempt is recorded failed (soft_continue).
|
|
1530
|
+
retry: 1
|
|
1492
1531
|
skill: a2h-batch-ui-align
|
|
1493
1532
|
user_facing:
|
|
1494
1533
|
announce: always
|
|
@@ -1498,7 +1537,7 @@ nodes:
|
|
|
1498
1537
|
failed: "UI conversion was not finished: {reason}. The pages already converted are still there. The business logic steps will continue. You can drop this batch of UI and continue, or redo UI conversion from the checkpoint."
|
|
1499
1538
|
reused: "The UI was not redone this round; the pages converted last time are reused."
|
|
1500
1539
|
parallel_group: post_utg
|
|
1501
|
-
dispatch: "
|
|
1540
|
+
dispatch: "task_subagent"
|
|
1502
1541
|
needs: [discover.utg_snapshot, discover.arch, discover.feature_scope]
|
|
1503
1542
|
also_needs_group: discover_par
|
|
1504
1543
|
# A feature scope with no pages leaves UI conversion nothing to do; REUSE_UI_BATCH belongs only to runner.reuse_if.
|
|
@@ -1526,11 +1565,23 @@ nodes:
|
|
|
1526
1565
|
path_excludes: ["${WORK}/"]
|
|
1527
1566
|
success:
|
|
1528
1567
|
- any:
|
|
1529
|
-
|
|
1568
|
+
# The report alone is not enough: a parent that stops the queue early, with groups never dispatched, writes one too
|
|
1569
|
+
# (measured: 20 of 40 groups converted, still reported ok). check_ui_batch_done.mjs also requires no pending page and no open group (pending / queued / running / blocked / not verified).
|
|
1570
|
+
# Under profile=incremental batch_progress.json records mode: incremental, so pass --mode incremental, or a finished batch still fails.
|
|
1571
|
+
- when: "${PROFILE} != incremental"
|
|
1572
|
+
all:
|
|
1573
|
+
- file_exists: "${HMOS}/.hometrans/batch_report.md"
|
|
1574
|
+
- script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_ui_batch_done.mjs", args: "--hmos ${HMOS}" }
|
|
1575
|
+
- when: "${PROFILE} == incremental"
|
|
1576
|
+
all:
|
|
1577
|
+
- file_exists: "${HMOS}/.hometrans/batch_report.md"
|
|
1578
|
+
- script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/check_ui_batch_done.mjs", args: "--hmos ${HMOS} --mode incremental" }
|
|
1530
1579
|
- skipped: true
|
|
1531
1580
|
invoke: |
|
|
1532
1581
|
Context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish (policy.context_budget).
|
|
1533
|
-
|
|
1582
|
+
Neither are a long run, slow progress, many retries or a long tail of groups: never `group_queue.mjs stop` the queue and never enter Step 5.5 with groups unconverted; keep running passes and handle each entry `status` lists under `stuck` (a2h-batch-ui-align step5-convert.md item 5). An unconverted group makes the later logic stage write that page's UI from scratch, without this skill's rules or the reference frames.
|
|
1583
|
+
When this is the runner's automatic retry: **before Step 0**, run `group_queue.mjs status ${HMOS}` (Step 5's `init` clears the stop record, so look first). If `stop.by` (or `previous_stop.by`) is user (the user aborted), do not continue: return { "ok": false, "note": "the user aborted the UI batch" }. Otherwise Step 5's `init` re-queues the groups the last attempt left open; finish them.
|
|
1584
|
+
[dispatch] see policy.dispatch (this node = serial leg 1, dispatched as a sub-agent).
|
|
1534
1585
|
skill name: a2h-batch-ui-align (path `${SKILLS_ROOT}/a2h-batch-ui-align`).
|
|
1535
1586
|
[task prompt / inline arguments — same content]
|
|
1536
1587
|
Arguments:
|
|
@@ -1545,18 +1596,18 @@ nodes:
|
|
|
1545
1596
|
[reuse_static_workspace=${UTG_DIR} only when discover.utg_static actually ran this round]
|
|
1546
1597
|
# if any of the following is true it did not run this round; **do not pass** this argument, and Step 3.1 runs by itself:
|
|
1547
1598
|
# ${REUSE_DISCOVER_UTG} / ${SKIP_LOGIC} / ${SKIP_SPEC_GENERATE} / ${REUSE_SPEC_GENERATE} == true / ${PROFILE} == 'ui-only'
|
|
1548
|
-
[takeover_allowed=true only when this migrate has already run ui.batch once: this round's ledger records ui.batch as failed, or review.ui_batch chose "rerun"]
|
|
1599
|
+
[takeover_allowed=true only when this migrate has already run ui.batch once: this round's ledger records ui.batch as failed, or review.ui_batch chose "rerun", or this is the runner's automatic retry (ui.batch's last_failure in dag-run-state.json is not empty)]
|
|
1549
1600
|
[Unattended contract (policy.leaf_questions)]
|
|
1550
1601
|
· The app module for Step 2 a2h-resource-convert is the app_module passed above (the same as the spec chain); do not ask the user;
|
|
1551
1602
|
· Step 0's DEVECO_HOME and Step 1's three paths are all given; do not ask again;
|
|
1552
1603
|
· When the Step 6.3 cold-start smoke test hits login -> auto / sub-agent records DEPLOY_ERROR in the Step 7 TODOs and continues;
|
|
1553
|
-
· Step 1 `state_doc.mjs check` exits 1 (ui-align asks the user before Step 5) ->
|
|
1604
|
+
· Step 1 `state_doc.mjs check` exits 1 (ui-align asks the user before Step 5) -> interactive -> needs_input (policy.dispatch) carrying the check output;
|
|
1554
1605
|
otherwise treat it as accepted: tell every prompt STATE_DOCS=unavailable, and the Step 7 report and TODOs say "official state-management docs unavailable: <check output>; redo UI conversion once fixed"; continue;
|
|
1555
|
-
· Step 0 `host_env.mjs check` action enable / restart (ui-align stops until the user restarts the host) ->
|
|
1556
|
-
|
|
1606
|
+
· Step 0 `host_env.mjs check` action enable / restart (ui-align stops until the user restarts the host) -> do not ask:
|
|
1607
|
+
restarting the host would cut the whole migrate session, so always treat it as "the user declined the restart": do not stop, use blocking waves (dispatch sub-agents in the foreground, finish one wave before the next), and say why in the Step 7 report;
|
|
1557
1608
|
· `group_queue.mjs init` refuses to start ("another parent session may still be driving this campaign": a background job
|
|
1558
1609
|
such as run_cycle is still running, reviewer answers bound within 20 minutes are incomplete, or a running group is still active) — ui-align requires asking the user:
|
|
1559
|
-
- interactive
|
|
1610
|
+
- interactive -> needs_input (policy.dispatch) with ui-align's options (only monitor / stop that session and then --takeover), carrying the init output;
|
|
1560
1611
|
- otherwise look at takeover_allowed: true (the signs come from this migrate's own previous ui.batch, which has already ended) -> first stop
|
|
1561
1612
|
each background job that `node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/detach.mjs status ${HMOS}` lists with state=running and not service,
|
|
1562
1613
|
with `node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/detach.mjs stop ${HMOS} --name <name>` (it checks the pid still belongs to the job before
|
|
@@ -1579,8 +1630,9 @@ nodes:
|
|
|
1579
1630
|
with list_existing.mjs; once I4 is confirmed it writes ${HMOS}/.hometrans/incremental/scope.json **at once** —
|
|
1580
1631
|
the only scope of record this round. enrich.spec_gen reads only that file and must not resolve SCOPE on its own
|
|
1581
1632
|
(both lanes must migrate the same pages).
|
|
1582
|
-
· I4 confirmation: interactive
|
|
1583
|
-
|
|
1633
|
+
· I4 confirmation: interactive -> after I1–I3 and writing the I4 table, needs_input (policy.dispatch) with the I4 table as context;
|
|
1634
|
+
the redispatch carries the user's answer at the end of the prompt: settle by it and write scope.json at once;
|
|
1635
|
+
auto -> do not ask the user: settle on what I1–I3 resolved (a name with several candidates takes the one with the strongest evidence, the choice and its reason written in the I4 table)
|
|
1584
1636
|
and write scope.json at once; only when a name has no candidate at all in the page graph return { "ok": false, "note": "<name> in the scope matches no page in the page graph" }.
|
|
1585
1637
|
· Resume identity = harmony_project_dir + mode=incremental + scope_id, always decided by
|
|
1586
1638
|
progress_identity.mjs resume --mode incremental --scope <scope.json> (never compare by hand; it archives a
|
|
@@ -1619,16 +1671,17 @@ nodes:
|
|
|
1619
1671
|
exit 1 / 2 (unfinished, lang mismatched or missing, directories overlapping) -> do not switch to ${UTG_DIR}; run the full Step 3.1 yourself in ${UI_UTG_DIR}.
|
|
1620
1672
|
When reuse_static_workspace is not passed, also run Step 3.1 yourself. In both cases only ${UI_UTG_DIR} is written, never back to ${UTG_DIR}
|
|
1621
1673
|
(spec only reads ${UTG_SNAPSHOT}, see policy.parallel_rule).
|
|
1622
|
-
Per-page/group conversion sub-agents are managed by this skill itself (
|
|
1623
|
-
|
|
1674
|
+
Per-page/group conversion sub-agents are managed by this skill itself (via sub-agent dispatch): this session is the node sub-agent dispatched by migrate (depth 1); per a2h-batch-ui-align Step 0.1
|
|
1675
|
+
dispatch the resource, reviewer and conversion sub-agents in the background (depth 2); do not change this to page-by-page serial work inside the session.
|
|
1624
1676
|
The prompts sent to those sub-agents still forbid them from dispatching further sub-agents (they are the last layer).
|
|
1625
|
-
If this session
|
|
1626
|
-
{ "ok": false, "note": "
|
|
1627
|
-
When finished
|
|
1677
|
+
If this session cannot dispatch sub-agents: do not convert page by page inside this session to fake success. Return
|
|
1678
|
+
{ "ok": false, "note": "this session cannot dispatch sub-agents; conversion workers cannot be dispatched" }.
|
|
1679
|
+
When finished it outputs only JSON:
|
|
1680
|
+
When `group_queue.mjs status --assert-settled` does not pass at the end of Step 5 (groups still open), "ok" must be false and the note names the open groups and the stop record.
|
|
1628
1681
|
{ "ok": true, "pages_processed": N, "pages_failed": F, "build_status": "SUCCESS|PARTIAL|FAILED",
|
|
1629
1682
|
"smoke_verdict": "<a2h-coldstart-smoke-gate verdict>", "batch_report": "${HMOS}/.hometrans/batch_report.md" }.
|
|
1630
1683
|
|
|
1631
|
-
# UI human gate — after ui.batch reaches a terminal state, before enrich.spec_gen (policy.
|
|
1684
|
+
# UI human gate — after ui.batch reaches a terminal state, before enrich.spec_gen (policy.dispatch: spec_gen waits for this gate; no interleaving).
|
|
1632
1685
|
- id: review.ui_batch
|
|
1633
1686
|
lane: enrich
|
|
1634
1687
|
type: adopt
|
|
@@ -1728,7 +1781,7 @@ nodes:
|
|
|
1728
1781
|
# Scheduling is fixed serial: after enrich.spec_gen — must not be inserted between ui.batch and spec_gen
|
|
1729
1782
|
# (needs still only hangs off ui.batch; start order in policy.parallel_rule / schedule_hint).
|
|
1730
1783
|
needs: [discover.arch, ui.batch]
|
|
1731
|
-
dispatch: "
|
|
1784
|
+
dispatch: "task_subagent"
|
|
1732
1785
|
skip_if: "${SKIP_MODULE_DOCS}"
|
|
1733
1786
|
# The state file is kept across runs (it is the incremental baseline for --incremental preserve and must not be deleted); checking existence alone lets the previous round pose as success.
|
|
1734
1787
|
# Record the time before starting; success requires the state file to be no older than it.
|
|
@@ -1906,10 +1959,10 @@ nodes:
|
|
|
1906
1959
|
failed: "The business logic was not all written: {reason}. The parts already written into the project are still there. The wrap-up report lists the unfinished groups."
|
|
1907
1960
|
reused: "The business logic was not rewritten this round; the result from the previous round is reused."
|
|
1908
1961
|
skipped: "No business logic this round."
|
|
1909
|
-
#
|
|
1910
|
-
#
|
|
1911
|
-
#
|
|
1912
|
-
dispatch:
|
|
1962
|
+
# B1/B2 are an event loop of background dispatch: inside the sub-agent WAIT_MODE=foreground is mandatory — the pipeline never ends the round
|
|
1963
|
+
# and blocks in the foreground on dispatch.mjs wait (ledger / artifacts / worktrees) instead; otherwise the sub-agent returns to the primary as soon as
|
|
1964
|
+
# it ends the round and nobody takes over the background chunks (merges / builds / later waves are all lost).
|
|
1965
|
+
dispatch: "task_subagent"
|
|
1913
1966
|
needs: [adopt.specs_json, adopt.signing]
|
|
1914
1967
|
skip_if: "${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE}"
|
|
1915
1968
|
# Before this node **actually executes**: archive only on a hard fingerprint mismatch (exit 4) or all failed (exit 3).
|
|
@@ -1945,21 +1998,22 @@ nodes:
|
|
|
1945
1998
|
[Precondition] adopt.signing's terminal state is failed (signing missing) -> handle by device scope (signing is gated only at the entry; the pipeline does not require it):
|
|
1946
1999
|
`hdc list targets` are all `127.0.0.1:` (emulators only) -> run as usual (unsigned build; emulators can install it);
|
|
1947
2000
|
a real device or no HarmonyOS device -> do not run; { "ok": false, "note": "signing missing: <reason>" } (soft_continue).
|
|
1948
|
-
[dispatch] see policy.
|
|
2001
|
+
[dispatch] see policy.dispatch (dispatched as a sub-agent; WAIT_MODE=foreground is mandatory, see the node comment).
|
|
1949
2002
|
skill name: a2h-spec-design-pipeline (path `${SKILLS_ROOT}/a2h-spec-design-pipeline`).
|
|
1950
|
-
[
|
|
2003
|
+
[Arguments]
|
|
1951
2004
|
${SPECS_JSON} ${ANDROID} ${HMOS} ${DESIGN_DIR}
|
|
2005
|
+
WAIT_MODE=foreground
|
|
1952
2006
|
--engine-mode ${ENGINE_MODE}
|
|
1953
2007
|
--wave-width ${WAVE_WIDTH}
|
|
1954
2008
|
--max-scenarios-per-chunk ${MAX_SCENARIOS_PER_CHUNK}
|
|
1955
2009
|
[--deveco-home ${DEVECO_HOME} only when non-empty] # adopted directly by I2; the B3 / Finalization builds all use it
|
|
1956
|
-
Depth: the pipeline itself is at depth
|
|
1957
|
-
Event loop: after B1/B2 dispatch background chunks
|
|
1958
|
-
not the
|
|
1959
|
-
|
|
1960
|
-
Return to migrate scheduling only after the pipeline has completed all waves + the smoke gate + Finalization (outputting the final report).
|
|
2010
|
+
Depth: the pipeline itself is at depth 1 (a sub-agent dispatched by migrate); the design / coding / review / conflict-resolution sub-agents it dispatches are at depth 2.
|
|
2011
|
+
Event loop (WAIT_MODE=foreground, references/coding-loop.md "Foreground wait mode"): after B1/B2 dispatch background chunks it
|
|
2012
|
+
does **not** end the round; it blocks in the foreground on dispatch.mjs wait and returns to step 1 of the event loop afterwards; no waker sub-agent is dispatched.
|
|
2013
|
+
It returns only after the pipeline has completed all waves + the smoke gate + Finalization (outputting the final report), or at a hard stop it names.
|
|
1961
2014
|
Interaction (subject to ${INTERACTION_MODE}):
|
|
1962
|
-
· I4 announcement:
|
|
2015
|
+
· I4 announcement: announce only, never wait (both modes; I4 is an announcement with nothing for the user to decide). Put the announcement text into
|
|
2016
|
+
the returned JSON's "i4_summary"; under interactive the primary relays it to the user.
|
|
1963
2017
|
· Whether the homegraph CLI exists is already Hard-Stopped in the bootstrap preflight; this node no longer treats "command not found" as degradable.
|
|
1964
2018
|
· Other I2 items that need the user's decision: under auto continue with the safe default from the pipeline document and record it in the report;
|
|
1965
2019
|
hard missing items (DEVECO_HOME / HMOS not git / Node version)
|
|
@@ -1968,17 +2022,16 @@ nodes:
|
|
|
1968
2022
|
Checkpoint resume: ${HMOS}/.hometrans/spec_pipeline_state.json (schema spec_pipeline_state/v2;
|
|
1969
2023
|
groups[] + per-spec rows; design files SPEC_DESIGN_G<G>_c<k>.md).
|
|
1970
2024
|
When FROM_NODE=logic.spec_pipeline (or probe 7 is unfinished and this node is entered again) and state still exists:
|
|
1971
|
-
deleting state / treating it as a new campaign is **forbidden**;
|
|
2025
|
+
deleting state / treating it as a new campaign is **forbidden**; dispatch the pipeline sub-agent as usual and let its Mid-flight pick up the interrupted wave.
|
|
1972
2026
|
Only an old campaign whose hard fingerprint changed is archived by before_run; when soft knobs (WAVE_WIDTH etc.) differ from state.config
|
|
1973
2027
|
accept the soft_stale warning and continue; do not archive just to align the knobs.
|
|
1974
2028
|
When finished, first run check_spec_pipeline_done.mjs to verify (see success): exit 0 -> success;
|
|
1975
2029
|
exit 1 with reason Finalization unfinished -> go back to the pipeline to finish Finalization (including step 5 writing state.finalization), then verify again;
|
|
1976
2030
|
other exit 1 (the pipeline stopped midway; JSON.unfinished lists the unfinished groups) / exit 2, and exit 3 (all groups failed)
|
|
1977
2031
|
-> this node fails (soft_continue),
|
|
1978
|
-
passing the script's unfinished / reason to logic.finalize for the report.
|
|
1979
|
-
recording the summary:
|
|
2032
|
+
passing the script's unfinished / reason to logic.finalize for the report. Finally return only JSON:
|
|
1980
2033
|
{ "ok": true, "specs_total": N, "specs_done": M, "specs_failed": K,
|
|
1981
|
-
"groups_total": G, "groups_done": Gd, "groups_failed": Gf,
|
|
2034
|
+
"groups_total": G, "groups_done": Gd, "groups_failed": Gf, "i4_summary": "<I4 announcement text>",
|
|
1982
2035
|
"final_build": "SUCCESS|FAILED|SKIPPED (taken from state.finalization.final_build, the same value as the pipeline's report template; only SUCCESS counts as a successful build; SKIPPED only when this round had no new group and everything was carried)" }.
|
|
1983
2036
|
|
|
1984
2037
|
- id: logic.finalize
|
|
@@ -2027,8 +2080,14 @@ nodes:
|
|
|
2027
2080
|
What is read: ${HMOS}/.hometrans/spec_pipeline_state.json (v2: groups[] status
|
|
2028
2081
|
pending|coded|merged|done|failed; specs[] status/stage/design_file/commit),
|
|
2029
2082
|
${DESIGN_DIR}/design_map.md, and each wave's
|
|
2030
|
-
|
|
2031
|
-
|
|
2083
|
+
${HMOS}/.hometrans/wave_*/claim_audit.json (if present), written into ${LOGIC_REPORT} (what to read is in stage-map.md).
|
|
2084
|
+
Before writing any "known leftovers" into the report, re-verify them against the final merged trunk — a review verdict is a snapshot, not the current state. Groups with review.open == true (scenarios carrying [PARTIAL]/[FAIL], non-empty cross_cutting) and every "pending / not wired / still mock" wording quoted from a review report date from that group's last review round: at that point only its own wave's merge had been seen, and a later wave's group may have already closed the gap. Re-verify each item against the merged trunk before writing it down:
|
|
2085
|
+
· locate the concrete symbol the gap description names (a TODO marker, an API / repository name, a call site, a missing link) and grep / read the final code to confirm;
|
|
2086
|
+
· resolved -> must not be listed as a leftover: write "resolved by a later group" with the evidence (symbol + file:line), or fold it into that group's verdict line;
|
|
2087
|
+
· unresolved -> only then put it under "known leftovers", with current-tree evidence (which line is still a TODO / which call site is still missing);
|
|
2088
|
+
· items decidable only at runtime -> label them "review-time snapshot (later merges followed; no terminal re-verification)" and never phrase them as current fact.
|
|
2089
|
+
The "known leftovers" section may contain only items that still hold after re-verification; a review report's wording is not by itself evidence that the issue still exists.
|
|
2090
|
+
3. Add a "UI conversion" section to the report: read ui_status /
|
|
2032
2091
|
page statistics / reason from ${CHECKPOINT_DIR}/ui-batch-reviewed.ok (when skipped write "No UI conversion this round"; when
|
|
2033
2092
|
ui_status=evidence_gaps write "UI converted, but the capture evidence has gaps" and list capture_audit.gap_codes / gap_pages and the
|
|
2034
2093
|
report path, never calling it a clean pass); list failed steps with their user_facing.name and failed copy
|