@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
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
| `requestDisallowInterceptTouchEvent()` | `hitTestBehavior` | 阻止拦截(静态配置) | `Component().hitTestBehavior(HitTestMode.None)` |
|
|
58
58
|
| `onInterceptTouchEvent()` | `onTouchIntercept()` | 事件拦截(动态回调) | `Container().onTouchIntercept((event) => { /* 返回 HitTestMode */ })` |
|
|
59
59
|
| 无直接对应 | `HitTestMode.Default` | 默认:自身命中会阻塞兄弟组件 | API 7+ |
|
|
60
|
-
| 无直接对应 | `HitTestMode.None` |
|
|
60
|
+
| 无直接对应 | `HitTestMode.None` | 自身不接收事件,不阻塞;**子节点照常响应**(枚举说明「Self not respond … but children respond」),不能用来禁掉整棵子树。要让隐藏的整页/整层不收点击,按 Android 是否还组合它决定:不组合就用 `if` 卸载,过渡期间要保留就用 `BLOCK_DESCENDANTS`(GATE `hidden-layer-children-hit`) | API 7+ |
|
|
61
61
|
| 无直接对应 | `HitTestMode.Block` | 阻塞子组件的触摸测试 | API 7+ |
|
|
62
62
|
| 无直接对应 | `HitTestMode.Transparent` | 自身触摸测试,不阻塞 | API 7+ |
|
|
63
63
|
| 无直接对应 | `HitTestMode.BLOCK_HIERARCHY`(API 20 新增)| 自身和子节点响应,阻止祖先 | API 20+ |
|
|
@@ -421,140 +421,3 @@
|
|
|
421
421
|
- 手势拦截增强(onGestureRecognizerJudgeBegin)
|
|
422
422
|
- 事件响应链机制优化
|
|
423
423
|
- 响应热区 responseRegion 支持
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
## 十三、映射方案总结
|
|
428
|
-
|
|
429
|
-
### 13.1 完全直接映射的交互功能(40+)
|
|
430
|
-
|
|
431
|
-
可以直接一对一替换的交互功能:
|
|
432
|
-
- 基础触摸事件(onTouch)
|
|
433
|
-
- 点击事件(onClick)
|
|
434
|
-
- 焦点事件(onFocus/onBlur)
|
|
435
|
-
- 键盘事件(onKeyEvent)
|
|
436
|
-
- 基础手势(点击、长按)
|
|
437
|
-
- 动画 API(animateTo)
|
|
438
|
-
|
|
439
|
-
### 13.2 需要调整的交互功能(30+)
|
|
440
|
-
|
|
441
|
-
需要调整实现方式的交互功能:
|
|
442
|
-
- 手势识别(需使用手势系统而非监听器)
|
|
443
|
-
- 动画系统(声明式动画,状态驱动)
|
|
444
|
-
- 事件分发(自动分发 vs 手动分发)
|
|
445
|
-
- 生命周期(分离为多个回调)
|
|
446
|
-
|
|
447
|
-
### 13.3 需要自定义实现的交互功能(15+)
|
|
448
|
-
|
|
449
|
-
需要编写自定义逻辑或组件的交互功能:
|
|
450
|
-
- 系统拖放(需自定义数据传递)
|
|
451
|
-
- 高级焦点功能(系统自动处理)
|
|
452
|
-
- 动画暂停/恢复(需状态管理)
|
|
453
|
-
- 多窗口交互(架构不支持)
|
|
454
|
-
|
|
455
|
-
### 13.4 API 20/21 新增改进
|
|
456
|
-
|
|
457
|
-
API 20/21 带来了以下重要改进:
|
|
458
|
-
- **响应热区支持**:`responseRegion` 属性,可扩展组件响应范围
|
|
459
|
-
- **增强的触摸测试控制**:`HitTestMode.BLOCK_HIERARCHY`、`HitTestMode.BLOCK_DESCENDANTS`
|
|
460
|
-
- **手势拦截增强**:`onGestureRecognizerJudgeBegin()`、`parallelGesture()`
|
|
461
|
-
- **事件响应链优化**:更高效的事件分发机制
|
|
462
|
-
- **stopPropagation()**:更灵活的事件冒泡控制
|
|
463
|
-
|
|
464
|
-
---
|
|
465
|
-
|
|
466
|
-
## 十四、迁移建议
|
|
467
|
-
|
|
468
|
-
### 14.1 交互功能迁移优先级
|
|
469
|
-
|
|
470
|
-
1. **高优先级**(完全支持):
|
|
471
|
-
- 点击事件、长按事件
|
|
472
|
-
- 基础手势(点击、长按、拖动)
|
|
473
|
-
- 焦点事件、键盘事件
|
|
474
|
-
- 基础动画
|
|
475
|
-
|
|
476
|
-
2. **中优先级**(部分支持):
|
|
477
|
-
- 复杂手势(缩放、旋转)
|
|
478
|
-
- 事件分发与拦截
|
|
479
|
-
- 转场动画
|
|
480
|
-
- 无障碍功能
|
|
481
|
-
|
|
482
|
-
3. **低优先级**(暂不支持或困难):
|
|
483
|
-
- 系统拖放
|
|
484
|
-
- 多窗口交互
|
|
485
|
-
- 高级键盘事件
|
|
486
|
-
- 动画暂停/恢复
|
|
487
|
-
|
|
488
|
-
### 14.2 交互功能迁移策略
|
|
489
|
-
|
|
490
|
-
1. **声明式思维转换**:
|
|
491
|
-
- Android:命令式,监听器 + 回调
|
|
492
|
-
- HarmonyOS:声明式,状态 + 绑定
|
|
493
|
-
- 需要改变编程范式
|
|
494
|
-
|
|
495
|
-
2. **手势系统优先**:
|
|
496
|
-
- 优先使用 HarmonyOS 手势系统(TapGesture、PanGesture 等)
|
|
497
|
-
- 避免在 onTouch 中手动解析手势
|
|
498
|
-
|
|
499
|
-
3. **状态驱动动画**:
|
|
500
|
-
- 动画通过状态变化触发
|
|
501
|
-
- 使用 @State 装饰器管理动画状态
|
|
502
|
-
|
|
503
|
-
4. **事件冒泡处理**:
|
|
504
|
-
- 理解 HarmonyOS 事件冒泡机制
|
|
505
|
-
- 合理使用 stopPropagation()
|
|
506
|
-
|
|
507
|
-
### 14.3 注意事项
|
|
508
|
-
|
|
509
|
-
1. **事件模型差异**:
|
|
510
|
-
- Android:事件分发机制复杂
|
|
511
|
-
- HarmonyOS:手势系统更简洁
|
|
512
|
-
|
|
513
|
-
2. **焦点处理方式**:
|
|
514
|
-
- Android:复杂的焦点查找和管理
|
|
515
|
-
- HarmonyOS:focusControl API 简化
|
|
516
|
-
|
|
517
|
-
3. **动画架构差异**:
|
|
518
|
-
- Android:基于对象的动画系统
|
|
519
|
-
- HarmonyOS:基于状态的声明式动画
|
|
520
|
-
|
|
521
|
-
4. **手势识别方式**:
|
|
522
|
-
- Android:GestureDetector + 监听器
|
|
523
|
-
- HarmonyOS:手势装饰器 + 回调
|
|
524
|
-
|
|
525
|
-
5. **测试重点**:
|
|
526
|
-
- 多点触控场景
|
|
527
|
-
- 手势冲突处理
|
|
528
|
-
- 性能优化(避免过度重绘)
|
|
529
|
-
|
|
530
|
-
---
|
|
531
|
-
|
|
532
|
-
## 参考链接
|
|
533
|
-
|
|
534
|
-
### Android 官方文档
|
|
535
|
-
1. **[处理多点触控手势 | Android Developers](https://developer.android.com/develop/ui/views/touch-and-input/gestures/multi?hl=zh-cn)**
|
|
536
|
-
2. **[检测常用手势 | Android Developers](https://developer.android.com/develop/ui/views/touch-and-input/gestures/detector?hl=zh-cn)**
|
|
537
|
-
3. **[了解手势 | Jetpack Compose](https://android-docs.cn/develop/ui/compose/touch-input/pointer-input/understand-gestures)**
|
|
538
|
-
4. **[ViewGroup中管理触摸事件 | Android Developers](https://developer.android.com/develop/ui/views/touch-and-input/gestures/viewgroup?hl=zh-cn)**
|
|
539
|
-
5. **[属性动画概览 | Android Developers](https://developer.android.com/develop/ui/views/animations/prop-animation?hl=zh-cn)**
|
|
540
|
-
6. **[Android 触摸手势基础官方文档概览](https://www.cnblogs.com/mengdd/p/3335508.html)**
|
|
541
|
-
7. **[Android 手势识别类 GestureDetector 基本介绍](https://developer.aliyun.com/article/569712)**
|
|
542
|
-
|
|
543
|
-
### HarmonyOS 官方文档
|
|
544
|
-
1. **[多层级手势事件官方文档](https://developer.huawei.com/consumer/cn/doc/HarmonyOS-Guides/arkts-gesture-events-multi-level-gesture)**
|
|
545
|
-
2. **[焦点事件](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/ts-universal-focus-event)**
|
|
546
|
-
3. **[焦点处理指南](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/arkts-common-events-focus-event)**
|
|
547
|
-
4. **[转场动画](https://developer.huawei.com/consumer/cn/doc/HarmonyOS-Guides/arkts-animation-transition)**
|
|
548
|
-
5. **[显式动画(animateTo)](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/ts-explicit-animation)**
|
|
549
|
-
6. **[焦点事件onBlur/onFocus回调无法触发](https://developer.huawei.com/consumer/cn/doc/harmonyos-faqs/faqs-arkui-165)**
|
|
550
|
-
7. **[onTouch与onClick事件冲突 FAQ](https://developer.huawei.com/consumer/cn/doc/harmonyos-faqs/faqs-arkui-174)**
|
|
551
|
-
|
|
552
|
-
### 技术博客与实战文章
|
|
553
|
-
1. **[ArkUI交互事件与手势处理全解析](https://blog.csdn.net/2301_79624024/article/details/147620496)** - HarmonyOS 手势处理
|
|
554
|
-
2. **[触摸事件机制深入解析](https://segmentfault.com/a/1190000047072887)** - Android 触摸事件详解
|
|
555
|
-
3. **[Android触摸事件分发、手势识别与输入优化实战](https://juejin.cn/post/7611830146089615406)** - 事件分发机制
|
|
556
|
-
4. **[探秘Android手势事件机制与优化技巧](https://juejin.cn/post/7238869983621611576)** - 手势事件机制
|
|
557
|
-
|
|
558
|
-
---
|
|
559
|
-
|
|
560
|
-
*本文档基于 Android 14 和 HarmonyOS NEXT API 20/21 (6.0.0/6.0.1) 整理,具体 API 以官方最新文档为准。UI 交互功能的映射涉及复杂的编程范式转换和 API 20/21 新增的事件响应链机制,建议在实际迁移中结合具体场景灵活应用。*
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
| 安卓部分UI | 对应鸿蒙部分UI | 其他说明 |
|
|
49
49
|
|-----------|---------------|---------|
|
|
50
|
-
| `layout_weight`(通常配 `0dp`) | `.layoutWeight()` / `.flexGrow()` | 权重分配。**不得译成 `.width('100%')` / `.height('100%')`**:ArkUI 的 100% 以父容器为基准、不在兄弟间分配,多个兄弟同为 100%
|
|
50
|
+
| `layout_weight`(通常配 `0dp`) | `.layoutWeight()` / `.flexGrow()` | 权重分配。**不得译成 `.width('100%')` / `.height('100%')`**:ArkUI 的 100% 以父容器为基准、不在兄弟间分配,多个兄弟同为 100% 时第一个吃满整行、其余被挤出可视区。`@Builder` 根节点同理。GATE `main-axis-pct-siblings` |
|
|
51
51
|
| `padding` / `margin` | `.padding()` / `.margin()` | 支持统一或分别指定 `{ top, right, bottom, left }` |
|
|
52
52
|
| `View.GONE` / `View.INVISIBLE` | `Visibility.None` / `Visibility.Hidden` | `None`=不占位(GONE);`Hidden`=占位不显示(INVISIBLE) |
|
|
53
53
|
| `android:id` | `.id('xxx')` / 组件引用变量 | 组件标识 |
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
1. **包裹范围和 Android 保持一致**:`SwipeRefreshLayout` 包住了哪棵子树,`Refresh` 就包住对应的那棵。例如 `SwipeRefreshLayout` 包住整个 `MotionLayout`(头区 + 内容区)时,鸿蒙端就不能只包头区下面的内层 `Scroll`。只包内层会让指示器出现在头区下方,下拉时内容区和头区还会错开移动。
|
|
151
151
|
2. **手势冲突不是缩小包裹范围的理由**:子树里有折叠头、内层滚动等手势时,用 `pullToRefresh(false)` 在相应时段关闭下拉(对应 Android 的 `setEnabled(false)`),而不是把 `Refresh` 挪到更内层。
|
|
152
152
|
3. **指示器的样式和位置以参考帧为准**:参考截图或组件树里抓到的刷新圈(Android 默认约 40dp 的圆,位于顶部中央)要和 `Refresh` 的效果核对。默认效果对不上时,用 `builder` / `refreshingContent` 自定义指示器,用 `refreshOffset`、`pullDownRatio`(下拉跟手比例,API 12+)、`maxPullDownDistance`(API 20+)调整触发距离和内容跟手程度。改完必须在真机上截图比对,不要凭经验断定效果。
|
|
153
|
-
4. **API 对照**:`setRefreshing(b)` → `Refresh({ refreshing: $$this.isRefreshing })`;`setOnRefreshListener` → `.onRefreshing()
|
|
153
|
+
4. **API 对照**:`setRefreshing(b)` → `Refresh({ refreshing: $$this.isRefreshing })`;`setOnRefreshListener` → `.onRefreshing()`,但两者不等价:`onRefreshing` 在进入刷新状态时触发(refresh.d.ts「Called when the refresh state is entered」),代码把 `refreshing` 置为 true(首次加载、定位成功后发请求)也会触发;Android `setRefreshing(true)` 不通知 listener。回调里发请求时用 `.onStateChange` 记下用户是否在拖动(`RefreshStatus.Drag` / `OverDrag` 置 true,`Inactive` / `Done` 清掉),只有用户下拉才转发,否则代码设置的刷新态会再发一次请求、形成重入(GATE `refresh-programmatic-reentry`);`setEnabled(b)` → `.pullToRefresh(b)`;`setColorSchemeColors` / `setProgressViewOffset` → 自定义 `builder` + `refreshOffset`。
|
|
154
154
|
5. **偏差要上报**:如果确实无法对齐指示器的位置或内容是否跟手,要在报告里列为视觉偏差,不能只写在代码注释里。
|
|
155
155
|
|
|
156
156
|
## 设置页(androidx.preference)映射
|
|
@@ -168,12 +168,3 @@
|
|
|
168
168
|
- 转换时分类行和条目行的左边距要分别核对。只给条目行写 `padding({ left: 72 })`、分类行漏写,分类标题就会贴边显示,而 Android 上它们与条目标题在同一缩进。
|
|
169
169
|
- 数值以 view tree 实测为准:measure_summary 的「文本左缘」栏会把同缩进的文本列成一组,分类与条目应在同一组。行高、间距随主题和库版本变化,每个工程都要按 view tree 重新量,不要沿用别的工程的数值。
|
|
170
170
|
- 标题、summary、分类标题的颜色都来自主题,不在 preferences XML 里,以 measure_summary 的文本取色为准。
|
|
171
|
-
|
|
172
|
-
## 迁移注意事项
|
|
173
|
-
|
|
174
|
-
1. **范式转换**:Android 使用命令式 UI(XML 布局 + Java/Kotlin 操作);ArkUI 使用声明式 UI(ArkTS 组件树 + 状态驱动渲染)
|
|
175
|
-
2. **Adapter 模式消除**:`RecyclerView.Adapter`、`PagerAdapter` 等被 `ForEach`/`LazyForEach` + `IDataSource` 替代
|
|
176
|
-
3. **Fragment → NavDestination**:Fragment 模块化 UI 能力映射到 `Navigation` + `NavDestination` 路由
|
|
177
|
-
4. **布局属性调整**:Android 的布局属性需要转换为 ArkUI 的链式调用语法
|
|
178
|
-
5. **性能优化**:使用 `LazyForEach` 进行懒加载,避免一次性渲染大量数据
|
|
179
|
-
6. **响应式布局**:使用 `Flex` 和 `Grid` 组件实现响应式布局,适应不同屏幕尺寸
|
|
@@ -23,6 +23,6 @@ node <skill>/scripts/detect_paradigm.mjs <harmony_project_dir>
|
|
|
23
23
|
|
|
24
24
|
**`@Component` / `@ComponentV2` 不计票**(只在输出的 `components` 里报告):不带状态的纯展示组件(如 `@Component struct Divider2 { build() { Divider() } }`)说明不了工程用哪套状态管理。若计票,0→1 工程里只要前序步骤生成过一个公共展示组件,就又会被判成 V1。
|
|
25
25
|
|
|
26
|
-
**脚手架模板不参与判定**:DevEco 新建工程自带的 `pages/Index.ets`(`struct Index` 的 Hello World 页:`@Entry` + `@Component` + 唯一的 `@State message`,或 V2 模板的 `@ComponentV2` + `@Local message`),以及 a2h-arch-generate 为每个 HAR 模块生成的 `components/MainPage.ets`(`struct MainPage`,无 `@Entry`,同样只有唯一的 `message` 状态)不是业务代码,不能作为“既有 V1
|
|
26
|
+
**脚手架模板不参与判定**:DevEco 新建工程自带的 `pages/Index.ets`(`struct Index` 的 Hello World 页:`@Entry` + `@Component` + 唯一的 `@State message`,或 V2 模板的 `@ComponentV2` + `@Local message`),以及 a2h-arch-generate 为每个 HAR 模块生成的 `components/MainPage.ets`(`struct MainPage`,无 `@Entry`,同样只有唯一的 `message` 状态)不是业务代码,不能作为“既有 V1 工程”的证据。实测:app-migrate 预检刚建好的空工程只有这份模板,被按“出现 `@Component` + `@State`”判成 V1,整个 0→1 迁移都写成了 V1。模板页一旦被改过(多了别的状态或装饰器),就按业务代码计数。
|
|
27
27
|
|
|
28
28
|
判定结果只决定选哪套装饰器,**不决定读哪个目录**:两个分支都读同目录的 `_装饰器速查.md`(V1 用它的第四节对照表),官方完整文档一律经 `scripts/state_doc.mjs read <key>` 读取,key 带范式前缀(`v1-*` / `v2-*` / `mix-*`),脚本保证 `v1-*` 只返回 V1 页、`v2-*` 只返回 V2 页。
|
|
@@ -62,7 +62,7 @@ A refused merge names the stage and missing keys; re-dispatch only those parts.
|
|
|
62
62
|
- an `nl_hints` or `view_interactions` part is done only when, in addition, `node <a2h-utg-explorer skill>/scripts/hint_check.mjs --project <Android source root> <answers path>` exits 0 (`bad=0`). Its reviewer writes every key first and then rewrites hints in place, so `complete` alone means it may still be fixing them. While `bad>0`, keep the part in the `wait` loop; do not merge, apply or stop it. If its agent ends with `bad>0`, resume it in its own session with the lines `hint_check` prints;
|
|
63
63
|
- loop on `node ./scripts/group_queue.mjs wait ${harmony_project_dir}` (plus `--job run_cycle` in Step 3.2 while it runs). It follows every reviewer bound with `review-bind` that is not done or consumed, so no `--answers` is needed for them; pass `--answers <path>` (once per path) only for an answers file you did not bind. A job exit is reported once: a later `wait --job run_cycle` does not return again for the same exit, only after a restart ends. It returns when one becomes complete (`answers_complete`), has been silent for the stall limit (`answers_silent`; counted from the file's last write, or from its bind when it has never been written; `stall_limit_min` in the output, at least 20 min and scaled up with load), or after 9 min. Give the shell call a timeout above that;
|
|
64
64
|
- on each return: a silent part, or one whose agent ended without a complete file, is resumed in its own session with its task id (Step 0.1 item 4), and re-bound at once with the same `review-bind` line, which restarts its silence clock. `answers_silent` means only "no write for the limit"; a reviewer of a few items often writes them all at the end. A resume the host answers with "sent to the running background task" was queued behind a run still in progress: that agent is alive. A resume "also goes silent" only when, after the re-bind, `wait` reports the part silent again or its agent ends without a complete file; only then answer the remaining items `unresolved` yourself. Never answer for a part whose agent is still running: it may still write correct answers after your guesses have been merged;
|
|
65
|
-
- in Step 3.2,
|
|
65
|
+
- in Step 3.2, conversion (item 5) starts only after the cycle prints `finished: true`; nothing converts between `wait` returns.
|
|
66
66
|
|
|
67
67
|
**Gate:** `audit.mjs` (run by the pipeline) prints no `SANITY:` line. The workspace must contain `utg.json`, `click_paths.json`, `ui_elements.json` and `utg.html`. Record the audit summary and `interaction_audit.json`'s unresolved counts (`ownerless` ones are a scan limitation, not a review gap).
|
|
68
68
|
### Step 3.2 — Dynamic Page Capture (full mode: `a2h-utg-explorer`)
|
|
@@ -106,8 +106,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
106
106
|
Device phases run inside the call (30+ min), so it **always** runs in the background (Step 0.1 item 3). Pass `--job run_cycle` to every `group_queue.mjs wait` while it runs; when `wait` reports `job`, read the call's JSON from the end of `.hometrans/jobs/run_cycle.log`. That JSON is written only when the call ends. While it runs, follow `$C/cycle_progress.jsonl` (one line per stage and device phase, with result and error), not process lists or `run_device.log`. Each call advances until the next stage needs answers. It prints JSON with `finished`, `covered`, `skipped`, `failed_phases`, `blocked_on` and `waiting` (per worklist, the `parts` with `worklist` / `answers` paths).
|
|
107
107
|
|
|
108
108
|
Reviews overlap (`--review overlap`, the default). A round's stages (A, B/C, D, direct launch) are extracted up front, and `waiting` lists **every** stage's parts at once. The stages still apply and run on the device in order. While `finished` is false:
|
|
109
|
-
-
|
|
110
|
-
- Dispatch one reviewer per waiting part **not already dispatched** (`reviewers.json` records them; `review-bind` each one as you dispatch it) as a Step 3.1 reviewer wave (background sub-agents). Dispatch at most `--max-agents` (10) reviewers at a time, parts of the `blocked_on` worklists first; the rest go as earlier ones complete. The prompt gives the part path, the absolute answers path and the Step 3.1 parse-check, and points to `references/architecture.md` for the schema. Reviewers rely on component trees, open at most one screenshot per item, and save answers every ~4 items. The answers file is a JSON list or `{"items": [...]}`, one row per item with its `key` copied verbatim; `answers_check.mjs` counts a row without `key` as `keyless`, never complete.
|
|
109
|
+
- Dispatch one reviewer per waiting part **not already dispatched** (`reviewers.json` records them; `review-bind` each one as you dispatch it) as a Step 3.1 reviewer wave (background sub-agents). Dispatch at most `--max-agents` (10) reviewers at a time, parts of the `blocked_on` worklists first; the rest go as earlier ones complete. The prompt gives the part path, the absolute answers path and the Step 3.1 parse-check, and points to `references/architecture.md` for the schema. Reviewers rely on component trees, open at most one screenshot per item, and save answers every ~4 items. Conversion never starves them: while the explorer is unfinished, `Q status` / `group_pass.mjs` list the parts nobody dispatched as `reviews_unbound`, and `freeSlots` holds back up to half of `--max-agents` for them. Dispatch every `reviews_unbound` part first; a capture cycle left waiting on unanswered parts never finishes, and the pages it could still have captured are converted source-only. The answers file is a JSON list or `{"items": [...]}`, one row per item with its `key` copied verbatim; `answers_check.mjs` counts a row without `key` as `keyless`, never complete.
|
|
111
110
|
- When the parts of every `blocked_on` worklist are complete (`answers_check.mjs`), a call started with `--follow-min` continues on its own; only when it has ended (the `job` reason) start `run_cycle.mjs` again the same way, even while other stages' reviewers still run. It merges, applies, runs the device phases and stops at the next stage that waits.
|
|
112
111
|
- A stage extracted early is re-extracted after the earlier stages ran. Answers to items still offered are kept (`<x>_answers.seed.json`), and items covered meanwhile are dropped. Only new items come back in `waiting` as new parts, e.g. D requirements from B/C `unreachable` answers. Dispatch reviewers for those only.
|
|
113
112
|
- A `waiting` entry with `error` names answers that do not merge (missing, duplicate or unknown keys). Find the bad part(s) with `answers_check.mjs` and resume their reviewers. The other stages go on meanwhile.
|
|
@@ -121,9 +120,10 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
121
120
|
- **D runs by default**, because blocked `content` / `data-state` phases hold most core pages. Its worklist is split into parts like A–C, one item per state (phases sharing the same `requires` form one item); reviewers answer each item by `key` with `verdict: "recipe"` or `"skipped"`, within D's limits (`references/architecture.md` §D): in-app steps only, ASCII text input, white-listed keys, fixture-server files added but never modified (names and recipe ids prefixed with the item key), snapshots only under `snapshot_dir`, and a positive probe before any task.
|
|
122
121
|
- Items needing a real account, an external service, another flavor or the system file picker are answered `skipped` with the reason, and reach Step 7 via `deferred_human.json`.
|
|
123
122
|
- Pass `--skip D` only when the user asked not to change app data.
|
|
124
|
-
- `run_cycle.mjs`
|
|
123
|
+
- Before anything else, `run_cycle.mjs` archives the app data the device was handed over with (`initial`, via `run-as`) and restores it at the end. After the first round it takes the first-launch base (`fresh.tar` via `run-as`). A build without `run-as` keeps the original data live-only: no `pm clear`, no fresh base, and every clear / restore is refused (`config.user_state_protected`), so pages only first-launch data shows stay uncaptured and are reported.
|
|
124
|
+
- **Stage S** (before A) compiles each phase requirement into an on-screen predicate (`predicates_worklist.json`, reviewed by `key` like A–D) and runs every state phase in a known data state its requirements hold in (`schedule_states.mjs`): a device handed over logged in with content runs those phases directly. D only builds the states no known one satisfies.
|
|
125
125
|
- The cycle repeats while a round still adds a covered node, up to `--max-rounds` (2). Round 1 runs A–D and direct launch; later rounds run direct launch only (`--later-rounds direct`, the default): later A–D rounds cost hours for few new captures. Pass `--later-rounds all` to run A–D in every round.
|
|
126
|
-
5. **Export and build the conversion set
|
|
126
|
+
5. **Export and build the conversion set once the cycle prints `finished: true`.**
|
|
127
127
|
```bash
|
|
128
128
|
node <this skill>/scripts/export_ui_info.mjs $C --static-ws $S --out <ui_info_root>
|
|
129
129
|
node <this skill>/scripts/build_conversion_set.mjs $S --ui-info <ui_info_root>
|
|
@@ -134,16 +134,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
134
134
|
- writes one `page_NNNN_<Name>/meta.json` per uncaptured page (`evidence_tier: "source-only"`, empty `screenshots`/`view_xmls`, plus `source_hints` / `attached_nodes` / `reached_from` / `navigates_to` / `template_pages`);
|
|
135
135
|
- writes `pages.json` with captured pages first, then source-only pages in click-path order.
|
|
136
136
|
|
|
137
|
-
**Convert
|
|
138
|
-
- check Step 2: while `.hometrans/work/resources.report.md` does not exist yet, skip the rest of this list and dispatch the reviewers. Never wait on it here;
|
|
139
|
-
- run the two commands above, with `--exploring` on the builder;
|
|
140
|
-
- the first time only: run Step 4.4's `shell_contract.mjs` (it needs `utg.json`, `conversion_set.json`'s plan and Step 2's fonts, which all exist now) and Step 4.3;
|
|
141
|
-
- build Step 4.4's packs and prompts for any new group id;
|
|
142
|
-
- the first time: `group_queue.mjs init` (Step 5.4 item 2). Every time: one pass of the Step 5.4 loop (release, lease and dispatch, verify) before the next reviewer wave.
|
|
143
|
-
|
|
144
|
-
Then dispatch the reviewers. Group sub-agents and reviewers run in the background together, so the groups convert while the reviewers and the next `run_cycle.mjs` run. A single `wait` serves all of them: pass `--job run_cycle`; bound reviewers are followed without `--answers`.
|
|
145
|
-
|
|
146
|
-
When `finished` is true, run both once more **without** `--exploring`. Both scripts are incremental:
|
|
137
|
+
**Convert after the cycle finishes.** Once `run_cycle.mjs` prints `finished: true` and Step 2's report exists: run Step 4.4's `shell_contract.mjs` (it needs `utg.json`, `conversion_set.json`'s plan and Step 2's fonts, which all exist now), Step 4.3, `group_queue.mjs init` (Step 5.4 item 2), then build Step 4.4's packs and prompts for every group and enter the Step 5.4 loop. Both scripts are incremental:
|
|
147
138
|
- a page keeps its directory, and unchanged observations keep their `measure_pack.json`;
|
|
148
139
|
- the manifest's `new` / `changed` lists say which pages need a pack;
|
|
149
140
|
- new pages number after existing ones, and a group keeps its id (by anchor).
|
|
@@ -155,7 +146,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
155
146
|
|
|
156
147
|
The queue re-reads the plan on every call. It re-queues a group converted source-only that has since been captured, including one captured while it was running. While `plan.exploring` is true, it holds a source-only group while one of its nodes is listed in `$C/capture_pending.json`; the queue finds `$C` through `export_manifest.json`'s `campaign`. `run_cycle.mjs` rewrites that file on every pass:
|
|
157
148
|
- before the last round's direct-launch answers are in, it lists every uncovered in-scope node;
|
|
158
|
-
- after them, it lists only the nodes answered `launch`.
|
|
149
|
+
- after them, it lists only the nodes answered `launch`.
|
|
159
150
|
|
|
160
151
|
**Backfill.** A slot that no ready group can use still gets a held source-only group, fewest nodes left to capture first (`dispatch[].backfill: true`). If that group is captured later, it is redone against the capture. Without backfill, held groups can leave every slot idle for a long time. `init --no-backfill` turns this off.
|
|
161
152
|
|
|
@@ -185,7 +176,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
185
176
|
- `conversion_set.json`'s `summary`: captured / source-only / attached / skipped.
|
|
186
177
|
### Step 3.2-F — Fast hybrid capture (`capture_fast.mjs`)
|
|
187
178
|
|
|
188
|
-
Use this when the app is a WebView/uni-app shell and the explorer's task scheduler is too slow or too unstable to finish
|
|
179
|
+
Use this when the app is a WebView/uni-app shell and the explorer's task scheduler is too slow or too unstable to finish. It is a **compliant** replacement, not a shortcut:
|
|
189
180
|
|
|
190
181
|
```bash
|
|
191
182
|
node <this skill>/scripts/capture_fast.mjs <ui_info_root> --source <android_project_dir> \
|
|
@@ -197,12 +188,6 @@ For each page it jumps the route, waits until the accessibility tree is stable,
|
|
|
197
188
|
|
|
198
189
|
`--dry-run` lists the selected pages and whether the source declares a scroll container, without touching the device. `--probe-only` records the probe but leaves an overflow page `not-swept`, so the audit lists it as degraded until frames are captured.
|
|
199
190
|
|
|
200
|
-
### Step 3.2-I — Scoped capture (incremental mode's I5)
|
|
201
|
-
|
|
202
|
-
The Step 3.2 explorer cycle with three deltas, all in `./references/incremental-scope.md` I5: the campaign is planned with `plan.mjs --scope <scope.json>` (tasks, review worklists and `capture_pending.json` then cover only the scope), `run_cycle.mjs` gets `--skip D` unless the user allows app-data changes, and the builder runs with `--scope` / `--existing`. No crawler, no model key.
|
|
203
|
-
|
|
204
|
-
Install the APK first (`adb [-s <ADB_SERIAL>] install -r -t <apk_path>`); the explorer never installs it, and an install failure stops I5. Without a device, or when the user declines capture, skip the cycle and run only `build_conversion_set.mjs`: every member converts source-only.
|
|
205
|
-
|
|
206
191
|
### Step 3.3 — Confirm pages.json and coverage
|
|
207
192
|
|
|
208
193
|
`pages.json` is already written by `export_ui_info.mjs` (full mode) and rewritten by `build_conversion_set.mjs` (both modes; in incremental mode without a device it is the only writer). **Check it exists; do not regenerate it.** Only when it is missing (a pre-existing capture made by another tool, with no `export_manifest.json`), use this skill's fallback:
|
|
@@ -40,7 +40,8 @@ Index pages by Activity name. Each Activity's `BASE_UI_INFO` is its first snapsh
|
|
|
40
40
|
| `legacy_writes` | only on such per-instance groups: each per-instance write → the shared name it had before the split. An incremental run on a project converted before the split edits the existing shared file (both instances, serialised in the `entry` lane) instead of creating a parallel one. That shared file usually came from the old bug (the later instance was `verify_only`, so the file shows only the first instance's content): the group must turn it into **one page that switches by mode / instance** (the Android class's own `modes` parameter) and mount each destination with its own mode — not leave both tabs showing the same content |
|
|
41
41
|
| `supplement` | only in an incremental run whose `scope.json` is v2 with `SUP` (supplement) or `CHG` (changed behavior) work: per page, the feature, the work type and the `page_gap.mjs` missing list (or the change). The page already exists: the group pack's "Supplement only" section lists exactly what to add, and the converter edits the existing file in place — never a whole-page conversion over it, never a backup-and-overwrite |
|
|
42
42
|
| `stage` | 0 = entry group; 1 = groups with any capture; 2 = source-only |
|
|
43
|
-
| `after` | same-stage groups that must finish first (the leader of a shared base class / layout / pref-dialog family builds the shared component) |
|
|
43
|
+
| `after` | same-stage groups that must finish first (the leader of a shared base class / layout / pref-dialog / Compose shared-composable family builds the shared component) |
|
|
44
|
+
| `shared_families` | only on a family leader: the families it leads whose holders sit in more than one module (`{family, modules}`). The leader writes those components into a `common/*` HAR, never into its own feature module (`lease` adds the rule to its launch message) |
|
|
44
45
|
| `reuse_from` | families this group reuses read-only, and from which group |
|
|
45
46
|
| `overlays_owned_elsewhere` | overlays a member opens that another group converts: `{node, group, file}`. The host imports that file and never writes a copy; it waits for that group (`after` in the same stage, `waits_for` when the owner is on a lower stage) |
|
|
46
47
|
| `waits_for` | lower-stage groups this one must wait for although the stage rules would let it start: the entry group when the contract has `theme.runtime_slots`, a lower-stage overlay owner. group_queue.mjs adds them to the group's dependencies |
|
|
@@ -15,19 +15,19 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
|
|
|
15
15
|
5. `android_project_dir`, `harmony_project_dir`.
|
|
16
16
|
6. The absolute path of the mappings directory, the absolute path of the cheat sheet `references/state-mgmt/_装饰器速查.md` (as `state_quickref`), and the `state_doc` command with absolute paths: `node <skill>/scripts/state_doc.mjs read <key> --project <harmony_project_dir>`.
|
|
17
17
|
7. **`PARADIGM`**, stated as decided, so the agent skips Phase 2.0 and loads `state_quickref` (the same file for V1 and V2; never compose its path from the paradigm). Official state-management docs are read only through `state_doc`, never from a bundled directory and never by the agent's own `devecocli docs search`. Also state that the doc directories, including the atomic component mapping, are for on-demand lookup per control/attribute, never read end-to-end.
|
|
18
|
-
8. **`ALL_MODULES`.** The agent picks the target module from `ALL_MODULES` by function: a page goes to the feature module whose name matches its function when one exists, shared utilities to a common/shared module, and the entry module (`${ui_module}`) otherwise or when uncertain. Every path the agent reports, `provide`s or the plan predicts is either ETS-relative to `${ui_module}` (`pages/A.ets`) or project-relative with its module (`features/home/src/main/ets/pages/A.ets`); `group_watch`, `group_queue`, `group_commit` and `phase5_check` resolve the second form against the module it names.
|
|
18
|
+
8. **`ALL_MODULES` and `TARGET_MODULE`.** When the group has a `module` in the plan (SKILL.md Step 4.2 module placement), the prompt states it as decided, one line `TARGET_MODULE = <module>`, plus one line `TARGET_MODULE <node> = <module>` per entry of `member_modules`, and never offers the agent a choice ("内容可放 …", "pick the module by function"): `group_queue` refuses such a prompt (`prompts_invalid`). The agent writes the group's files in that module, resources included. Without a `module`, the agent picks the target module from `ALL_MODULES` by function: a page goes to the feature module whose name matches its function when one exists, shared utilities to a common/shared module, and the entry module (`${ui_module}`) otherwise or when uncertain. Every path the agent reports, `provide`s or the plan predicts is either ETS-relative to `${ui_module}` (`pages/A.ets`) or project-relative with its module (`features/home/src/main/ets/pages/A.ets`); `group_watch`, `group_queue`, `group_commit` and `phase5_check` resolve the second form against the module it names.
|
|
19
19
|
9. Resource mappings: `${harmony_project_dir}/.hometrans/resource_mapping.md`.
|
|
20
20
|
10. The Step 4.4 facts: `项目事实(...)` headings, the shell contract `.md`, `MEASUREMENT_PACK` + the `--probe` block (captured), and `SOURCE_PACK`.
|
|
21
21
|
11. **`EVIDENCE_TIER` per member**, from `meta.json`; a group can mix tiers.
|
|
22
22
|
- `REUSE_FROM` = the group's `reuse_from`: the files the leader wrote, stated **read-only** (extend by composition, never edit).
|
|
23
|
-
- `OVERLAYS_OWNED_ELSEWHERE` = the group's `overlays_owned_elsewhere`, whenever non-empty: overlays a member opens that another group converts (a shared overlay is a group of its own). The prompt says: import `<file>` from group `<group>` and mount it; never write your own copy under another name; if the file does not exist yet or lacks something this page needs, report it under `shell requests`.
|
|
23
|
+
- `OVERLAYS_OWNED_ELSEWHERE` = the group's `overlays_owned_elsewhere`, whenever non-empty: overlays a member opens that another group converts (a shared overlay is a group of its own). The prompt says: import `<file>` from group `<group>` and mount it; never write your own copy under another name; if the file does not exist yet or lacks something this page needs, report it under `shell requests`.
|
|
24
24
|
- `ATTACHED_NODES`, whenever non-empty (both tiers). Menu → the page's overflow/context menu; ui-state/mode → a state of this page; panel/embedded fragment → a component this page hosts. Mark each one **captured** (it has a `###` state in `REFERENCE_SCREENSHOTS`: convert it against those frames) or **uncaptured** (in `uncaptured[]`: convert it from its source branch per conversion-procedure.md §「source-only 档」, which then applies to that node only; "the data layer is not converted yet" is never a reason to degrade it).
|
|
25
25
|
- For `source-only` members also pass `SOURCE_HINTS` (= `meta.json.source_hints`), `REACHED_FROM` / `NAVIGATES_TO`, `TEMPLATE_PAGES` + `TEMPLATE_MEASUREMENTS`, and the host-chain source file list (now the primary evidence, so resolve it before dispatch).
|
|
26
26
|
12. **`LOTTIE_ENTRIES_FOR_THIS_PAGE`**, only when `lottie_by_page[suggested_page_name]` is non-empty: the matching rows verbatim as JSON, used per Phase 4.5. Otherwise omit the block and never mention Lottie.
|
|
27
27
|
13. **`PRESENTATION` / `HOST_ACTIVITY`**, only when the group carries `presentation` in `conversion_set.json` → `plan` (the app has a shell host; otherwise omit both and say nothing about shells). State it as decided, with the host's `Shell hosts` entry from `项目事实(外壳契约)`:
|
|
28
28
|
- `shell-content`: the group's pages are content the shell mounts. Prompt rules: no `@Entry`; no chrome of its own (bottom nav, tabs, drawer, persistent player bar); a jump to another fragment of the same host goes through a callback parameter the shell passes in, never `router.pushUrl` and never a `console.info('TODO: navigate')` stub; only a jump to another Activity uses `router.pushUrl`; transitions follow the host's declared `transitions`, and "NOT animated" means no `pageTransition()`. Anything the shell must provide goes under `shell requests`. Phase 4.2's chrome description of the screenshot is evidence about the **shell**, not something to draw again.
|
|
29
29
|
- `shell`: the entry group. It additionally builds the shell (Step 5.5).
|
|
30
|
-
14. **`RUNTIME_THEME`**, only when the contract's `theme.runtime_slots` is non-empty. The entry group (stage 0) creates `theme.state_module` (one observable theme state per PARADIGM, each slot initialised to the Android default colour and cited, exposed through getters); every other group carries the entry group in `waits_for` (build_conversion_set.mjs, from the contract), which group_queue.mjs honours even with `overlap_entry`, so the module exists when they start. Every other group's prompt says: read those slots from that module, never `$r('app.color.<slot>')` (a compile-time resource the user's choice never reaches), and never write a theme store of your own (GATE `theme-runtime-color-static`).
|
|
30
|
+
14. **`RUNTIME_THEME`**, only when the contract's `theme.runtime_slots` is non-empty. The entry group (stage 0) creates `theme.state_module` (one observable theme state per PARADIGM, each slot initialised to the Android default colour and cited, exposed through getters); every other group carries the entry group in `waits_for` (build_conversion_set.mjs, from the contract), which group_queue.mjs honours even with `overlap_entry`, so the module exists when they start. Every other group's prompt says: read those slots from that module, never `$r('app.color.<slot>')` (a compile-time resource the user's choice never reaches), and never write a theme store of your own (GATE `theme-runtime-color-static`).
|
|
31
31
|
|
|
32
32
|
**Tier statement.** For captured pages, the prompt must state that every path in `REFERENCE_SCREENSHOTS` / `REFERENCE_VIEW_TREES` was verified by exact-path reads. It must never claim "there is no screenshot". For a source-only page it states, explicitly: 「这是 source-only 页:没有截图和 view tree(采集阶段未到达,原因见 deferred_human),按 conversion-procedure.md §「source-only 档」执行,不得声称或编造任何像素实测值」. The tier always comes from `meta.json`, never from the agent's own Glob.
|
|
33
33
|
|
|
@@ -49,7 +49,9 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
|
|
|
49
49
|
6. **The report goes to disk; the reply is one line.** Write the group's full report (heading `## REPORT <GID>`, A-tier evidence written out, the sections and nothing more of conversion-procedure.md「报告的结构与体量」) to `.hometrans/queue_logs/<GID>.report.md` the moment the group is finished. In a family batch, do this per group, before starting the next one. Then end with exactly `DONE <GID…>`. The parent verifies from the file, and its dependants start as soon as the file exists; a report returned as the reply fills the parent's context and counts as missing. `lease`'s launch message states the exact paths.
|
|
50
50
|
|
|
51
51
|
7. **A family leader builds its shared components first and provides each one.** `lease`'s launch message names the families a group leads, and only a leader's message carries this rule.
|
|
52
|
-
- Write the component (base class, shared row, pref-dialog family) before the group's own pages.
|
|
52
|
+
- Write the component (base class, shared row, pref-dialog family, Compose shared composable such as a `XxxScaffold` several screens wrap) before the group's own pages.
|
|
53
|
+
- A family listed in the leader's `shared_families` spans several feature modules: write it into a `common/*` HAR they can all depend on and export it from that HAR's `Index.ets`. A copy in one feature module forces the other modules to depend on that feature, and a copy per page lets each page translate it differently.
|
|
54
|
+
- A Compose shared composable is translated whole, once: every parameter, default and state it owns (a `ModalBottomSheet`'s `sheetState`, a scaffold's top bar padding), from its own `.kt` file. Pages pass only what the Android call site passes.
|
|
53
55
|
- Once its file path, exported names and parameter / `@Param` / `@Prop` types are final, run `node <this skill>/scripts/group_watch.mjs provide ${harmony_project_dir} --group <GID> --family "<family>" --files <files>` (ETS-relative, or module-prefixed for a feature module, Step 5.1 item 8). Its followers start then.
|
|
54
56
|
- From that point the interface is frozen. Internal fixes are allowed; a changed signature is not. If it must change, say so in the report: `release` reports every provided file changed afterwards as `provided_changed`.
|
|
55
57
|
- **Chrome shared by several `@Entry` pages is provided as a host container, not as a bare bar.** With no `shell_hosts` (each destination its own `@Entry` page), the group that writes the persistent chrome (bottom nav, tab strip, player bar) also provides the scaffold that places it: `XxxScaffold({ currentTab, onNavigate }) { @BuilderParam content }` with the `Stack({ alignContent: … })`, floating margins and `hitTestBehavior` fixed inside. Pages fill the content slot and never re-create the placement. A bar plus a usage comment leaves the placement to every page, and a page that writes `Stack()` + `.align(Alignment.Bottom)` on the bar's wrapper gets its nav floating mid-screen (GATE `stack-child-align-noop` now catches that shape; the scaffold removes it).
|
|
@@ -57,7 +59,7 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
|
|
|
57
59
|
8. **A component written into a shared module (`common/*`, the design system, `uicomponents`) follows its Android component's signature, parameter by parameter.** Any group can be the first to write one, a leader or not, and every later group reuses it as is. One wrong default here repeats on every page. Before the first page uses it, check these four points against the Android source of the component (its `@Composable fun` / custom View):
|
|
58
60
|
- **Nullable callbacks stay optional.** `onClick: (() -> Unit)? = null` becomes `@Event onClick: (() => void) | undefined = undefined`, and the node joins hit testing only when it is set. Never write an empty-function default bound unconditionally with `.onClick`: the component then takes every tap meant for a clickable parent (GATE `event-default-click-swallows-parent`).
|
|
59
61
|
- **No weight or size the source does not have.** `Modifier.weight` lives at the call site in Compose, so the component root gets no `.layoutWeight()` (GATE `layout-weight-on-shared-component-root`). Likewise no `'100%'` on an axis the source wraps.
|
|
60
|
-
- **Slots are @BuilderParam filled with @Builder content.** Callers pass `() => { this.X() }` and nothing else (GATE `builder-param-arrow-inline-component`).
|
|
62
|
+
- **Slots are @BuilderParam filled with @Builder content.** Callers pass `() => { this.X() }` and nothing else (GATE `builder-param-arrow-inline-component`). This arrow form is for a custom component's @BuilderParam only: built-in attributes (`bindSheet` / `bindContentCover` / `overlay` / `background` / `bindMenu`) take `this.X()` directly (GATE `overlay-builder-arrow-arg`).
|
|
61
63
|
- **Defaults equal the source's defaults** (padding, colors, maxLines, showDivider …), each written with its `file:line`.
|
|
62
64
|
|
|
63
65
|
Write the result in the report as one line per parameter: `<param>: Android <signature> → <ArkTS declaration>`. When the parent verifies the group, it treats a shared-module file without these lines as a missing report section.
|
|
@@ -128,6 +130,7 @@ Only true dependencies make a group wait (`after`, lane, `reuse_from`, `template
|
|
|
128
130
|
- **Queued resumes of a finished group.** Once every group of a unit is settled from its report, `release` overwrites the unit's message file with a stop notice. A resume that was queued behind the run reads it and replies `DONE` at once instead of re-running the task, which would edit the group's files while the parent verifies them. Its completion notice then releases nothing (`action: none`).
|
|
129
131
|
- **Re-running `init`** (a new parent session) keeps returned/verified results and queues groups left `running` to resume their own sessions. It also keeps every other group's session bindings: a `queued` group keeps its pending decision (a resume stays a resume), and a failed group whose session stalled resumes that session, so re-initing to change `--width` never starts a second writer.
|
|
130
132
|
3. **The loop.** One pass per parent turn, in this order, so no slot ever waits on the parent's review:
|
|
133
|
+
**One command per pass.** `node <this skill>/scripts/group_pass.mjs ${harmony_project_dir}` runs 3.1 and 3.3 and the lease half of 3.2: it releases `reported` groups, releases `stalled` units on opencode/DevEco, runs `phase5_check --group` on every `returned` group (blocking 0: `Q verified` + `group_commit.mjs`; otherwise `Q requeue` with the blocking items, `--resume` when files are missing), then `Q lease`. It prints one JSON line: `dispatch` (start each entry, then `bind` it), `stop_first` (Claude Code only: stop that task, then `Q release --unit <unit> --stalled`), `needs_human` (a group the queue cannot move: read its `hint`), and `next`. Do not write your own driver, and never sleep between passes: `Q wait` is the only wait.
|
|
131
134
|
1. **Release.** `Q reap ${harmony_project_dir}` lists `reported` groups (report file written, even mid-batch) and `stalled` units.
|
|
132
135
|
- Each reported group: `Q release ${harmony_project_dir} --unit <GID>`.
|
|
133
136
|
- Each stalled unit: Claude Code stops its task first (TaskStop); opencode/DevEco cannot, so it is not stopped. Then `Q release … --unit <unit> --stalled`.
|
|
@@ -142,6 +145,7 @@ Only true dependencies make a group wait (`after`, lane, `reuse_from`, `template
|
|
|
142
145
|
4. **What `release` decides** (no user involved):
|
|
143
146
|
- a group's written files are its predicted writes plus the `.ets` files its report names. A file named in the report counts even at another path than predicted, and even when it was written before a resume. `written` / `missing` in the row come from this;
|
|
144
147
|
- a network failure or stall resumes the same session, at most 3 attempts. A second stall of the same session fails the group (a fresh dispatch starts the count at 0), and the row carries `needs: 'human'` with a `hint`. Do not requeue it fresh while that session may be alive: resume it (`Q requeue` does so by default) or wait for its completion notice.
|
|
148
|
+
- a report that names only `.ets` files outside the predicted write set is `off-target`, not partial progress: it gets the same one narrowed redispatch, and the message names the files still owed (a resume would repeat the same answer);
|
|
145
149
|
- an empty report gets one fresh, narrowed redispatch;
|
|
146
150
|
- a finished or failed group whose members got captured is re-queued against the capture; if its session had stalled it resumes that session (never a second writer);
|
|
147
151
|
- complete/partial work becomes `returned`;
|
|
@@ -149,7 +153,9 @@ Only true dependencies make a group wait (`after`, lane, `reuse_from`, `template
|
|
|
149
153
|
- `provided_changed` (a leader changed a component after providing it): when the leader is verified, re-run `phase5_check.mjs` over every follower that reuses that family and is already `returned` / `verified`. Requeue each one that no longer matches the component, with the changed file named in `--message`.
|
|
150
154
|
- `stop_first: true` (a stall with no bound task, or `requeue --fresh`, whose `warning` names the session) means the old agent must be stopped before the fresh one is dispatched; on opencode/DevEco, where that is impossible, wait for its notice first.
|
|
151
155
|
- Batch and resumed agents run `group_watch.mjs dispatch … --groups <GID> --resume` when they (re)start a group. A re-run inside the same queue attempt counts as a resume even without the flag, so the write watermark never moves back. Agents never edit files under `.hometrans/` except their report and what the scripts write.
|
|
152
|
-
5. **When `summary.idle` is true**, nothing is `returned_unverified` and `summary.stuck` is empty, go to Step 5.5. A non-empty `stuck` means groups that will never start on their own; each lists why (`no prompt file`, `after G012 is pending`, …). Fix the cause: write the prompt, re-run the builder, or `requeue` a group. Never go on to Step 5.5 with groups left open
|
|
156
|
+
5. **When `summary.idle` is true**, nothing is `returned_unverified` and `summary.stuck` is empty, go to Step 5.5. A non-empty `stuck` means groups that will never start on their own; each lists why (`no prompt file`, `after G012 is pending`, …). Fix the cause: write the prompt, re-run the builder, or `requeue` a group. Never go on to Step 5.5 with groups left open: `Q status --assert-settled` must exit 0 first (it exits 1 and lists `open` while any group is pending, queued, running, blocked or returned). `Q status` shows the summary at any time.
|
|
157
|
+
- **Slow progress is not a reason to stop.** Elapsed time, many passes, intake retries, a long tail of groups or a "time budget" never justify ending Step 5 early, the same as the context budget never does: keep running passes, and `requeue` or fix whatever `stuck` lists. Converting the remaining groups by hand outside the queue is not a way out either. Every group left open is a page the logic stage later writes from scratch, without this skill's rules or the reference frames.
|
|
158
|
+
- **`Q stop --by user|handoff --reason "<why>"`** leases nothing new. Use it only when the user aborts the batch (`user`) or the host session hands off with groups still open (`handoff`); without `--by` / `--reason` it refuses. It records `stop` (who, why, the groups left open) in the state; `status` repeats it. After a stop, skip Steps 5.5 and 6 (their entry gate cannot pass) and go straight to Step 7: list those groups as not converted and return `"ok": false`. A later `init` (the next session, or a rerun of the node) clears the stop, keeps it as `previous_stop`, and leases the open groups again.
|
|
153
159
|
**Verifying a returned group.** Set a page `done` only when **both** of these hold:
|
|
154
160
|
- the Phase 5 evidence is in the location the output contract assigns it;
|
|
155
161
|
- the parent's own mechanical re-verification passes.
|
|
@@ -171,7 +177,7 @@ Parent-side re-verification checks the sub-agent's claims independently of its n
|
|
|
171
177
|
|
|
172
178
|
| Check | How |
|
|
173
179
|
|---|---|
|
|
174
|
-
| Lexical checks, in one call | `node ./scripts/phase5_check.mjs ${harmony_project_dir} --group <GID>` (or `--files` with what the report lists). It covers GATE for the group's files, unresolved `$r`/`$rawfile`, misnamed / missing / over-budget `EVIDENCE()`, forbidden patterns (`.position(`/`.offset(`, `` $r(` ``, V1 decorators in a V2 project) and brace balance. With `--group` it also runs `[text_color]`. That compares each measured text colour in the group's `measure_pack.json` files with the colour the matching `Text`/`Span` actually renders; `text-color-unset` / `-mismatch` block. It also runs `[icons]`: every visible ImageView in `measure_pack.json` `icon_inventory` (sampled at the drift-corrected position) needs a `// ICON: <key>` marker on its Image/SymbolGlyph line; `icon-uncovered` / `icon-omit-refused` / `icon-marker-detached` block, and `[drift]` lines mean the screenshot was captured mid-animation. Exit 1 = blocking finding; a static-checker run with no verdict (non-0/1 exit, no report, 0 files scanned) is `[static] …` and blocks too. `--group` covers the predicted writes plus every `.ets` named in the group's report and in its `provides/` markers, so a leader's shared files need no separate `--files` run |
|
|
180
|
+
| Lexical checks, in one call | `node ./scripts/phase5_check.mjs ${harmony_project_dir} --group <GID>` (or `--files` with what the report lists). It covers GATE for the group's files, unresolved `$r`/`$rawfile`, misnamed / missing / over-budget `EVIDENCE()`, forbidden patterns (`.position(`/`.offset(`, `` $r(` ``, V1 decorators in a V2 project) and brace balance. With `--group` it also runs `[text_color]`. That compares each measured text colour in the group's `measure_pack.json` files with the colour the matching `Text`/`Span` actually renders; `text-color-unset` / `-mismatch` block. It also runs `[icons]`: every visible ImageView in `measure_pack.json` `icon_inventory` (sampled at the drift-corrected position) needs a `// ICON: <key>` marker on its Image/SymbolGlyph line; `icon-uncovered` / `icon-omit-refused` / `icon-marker-detached` block, and `[drift]` lines mean the screenshot was captured mid-animation. With `--group` or `--files` it runs `[effects]` when the UTG carries overlay `host_effects`: every effect of an overlay edge touching the group (with `--files`: any converted page) needs `// EFFECT: <id>` on or up to 3 lines above its implementing statement, or `// EFFECT-OMIT: <id> — <basis>`; `overlay-effect-uncovered` / `effect-marker-detached` block (an edge whose opener is in another group is `[cand]` there). Exit 1 = blocking finding; a static-checker run with no verdict (non-0/1 exit, no report, 0 files scanned) is `[static] …` and blocks too. `--group` covers the predicted writes plus every `.ets` named in the group's report and in its `provides/` markers, so a leader's shared files need no separate `--files` run |
|
|
175
181
|
| No SDK API that does not exist | GATE `sdk-api-nonexistent` (inside the call above) must be 0. These are compile errors the lexical items cannot see.
|
|
176
182
|
| Claimed output files exist and are complete | file exists, non-trivial length, no truncated tail |
|
|
177
183
|
| Cited `file:line` really contains the claimed fact | read that exact line; never accept a citation on faith |
|
|
@@ -214,12 +220,14 @@ Pages in a shell-content group that still declare `@Entry` are fixed here (drop
|
|
|
214
220
|
|
|
215
221
|
Then wire navigation to real pages:
|
|
216
222
|
- walk `conversion_set.json`'s `page` rows and each page's `navigates_to`;
|
|
223
|
+
- an edge with `host_effects` (in `navigates_to` / `reached_from`, a captured page's `overlay_effects`, and `conversion_set.json` `overlay_effects`) also changes the host when the overlay opens or dismisses. When you move an overlay's mounting into its page, or write its trigger / onDismiss here, carry every effect with it: implement it from its `resolved` statements in the code that opens / dismisses the overlay and keep (or add) `// EFFECT: <id>` on or up to 3 lines above the implementing statement, or `// EFFECT-OMIT: <id> — <basis>`. The gate's `phase5_check --files` run checks every converted page's effects (`overlay-effect-uncovered`, `effect-marker-detached`);
|
|
224
|
+
- an `// UNWIRED: <android file:line> — <reason>` handler whose target is now converted gets its real body here, and the marker goes. Every one still left is listed in the report and carried into Step 7's Manual Follow-up TODOs;
|
|
217
225
|
- every edge whose target is a converted page gets a real `router.pushUrl` or component toggle;
|
|
218
226
|
- register each target in `main_pages.json`.
|
|
219
227
|
|
|
220
|
-
A remaining `TODO` route is legitimate only when its target is a `skip` row; cite the reason in the report. Also apply the `shell requests` the groups reported. **They come as a ledger**: the parent runs `node scripts/shell_requests.mjs collect --hp ${harmony_project_dir}` before dispatching this step and pastes its table into the prompt. The report answers every id `<GID>#<n>` on its own row with `applied`, `rejected: <reason>` or `deferred:<stage>: <reason>`. A row answered by a different request ("via unification (below)") is not an answer: say what this request asked and what now does it. `deferred` is for work another stage owns (persistence, a data-layer call); the UI-visible half is still applied here.
|
|
228
|
+
A remaining `TODO` route is legitimate only when its target is a `skip` row; cite the reason in the report. Also apply the `shell requests` the groups reported. **They come as a ledger**: the parent runs `node scripts/shell_requests.mjs collect --hp ${harmony_project_dir}` before dispatching this step and pastes its table into the prompt. The report answers every id `<GID>#<n>` on its own row with `applied`, `rejected: <reason>` or `deferred:<stage>: <reason>`. A row answered by a different request ("via unification (below)") is not an answer: say what this request asked and what now does it. `deferred` is for work another stage owns (persistence, a data-layer call); the UI-visible half is still applied here. A request that sets shell or shared **structure** state (chrome visibility, badge, drawer, selected tab, AppStorage flag) is applied with the **Android source's initial state**, never a group's mock data-state. Example: a player bar that a source-only group mocked as visible, set as the shell default, appears on a captured home page whose reference has none. A request that mocks **content data** on a shared VM/Model (list items, forecast entries) is applied when every captured page that reads the field shows it populated in its reference, and rejected otherwise. "Pages that read the field" come from the Android source: every observer / collector / binding of that field, mapped to its UTG page, not only the pages of the group that asked. Several groups may request the same field; apply it once, in the VM/Model file, with values that reproduce every reader's reference. Either way, check it against every captured host page's reference screenshot first.
|
|
221
229
|
|
|
222
|
-
**Merging duplicate implementations.** When two groups wrote the same component (same Android source, different file names), the kept file is the **union** of both, never one side taken as a whole: list each side's exported members and behaviour branches (decode, loading state, error path, parameters) and keep the working one of each. Deleting the other file needs one report line `deleted <file> → merged into <file>: <what each side had, what was kept>`.
|
|
230
|
+
**Merging duplicate implementations.** When two groups wrote the same component (same Android source, different file names), the kept file is the **union** of both, never one side taken as a whole: list each side's exported members and behaviour branches (decode, loading state, error path, parameters) and keep the working one of each. Deleting the other file needs one report line `deleted <file> → merged into <file>: <what each side had, what was kept>`.
|
|
223
231
|
|
|
224
232
|
**Theme closure.** When the contract's `theme.mode` is not `static`, wiring is where the theme takes effect, so it is done here, not left half-wired. Close each of these and list it in the report's `runtime_risks` table (`item | file:line | done / deferred:<stage>: <reason>`):
|
|
225
233
|
- every write of the theme mode (settings page, startup read) reaches `getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK / _LIGHT / _NOT_SET)`;
|