@buaa_smat/hometrans 26.0.3 → 26.0.4
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 +1 -1
- package/agents/code-reviewer.md +91 -21
- package/env-requirements.json +1 -1
- package/i18n/agents/code-reviewer.md +93 -21
- package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
- package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
- package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
- package/package.json +3 -6
- package/skills/a2h-app-migrate/SKILL.md +19 -11
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
- package/skills/a2h-batch-ui-align/SKILL.md +72 -22
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
- package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-page-specgen/SKILL.md +124 -20
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/skills/a2h-page-specgen/references/evidence.md +35 -0
- package/skills/a2h-page-specgen/references/execution-model.md +135 -26
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
- package/skills/a2h-page-specgen/references/gates.md +120 -52
- package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +112 -109
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
- package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
- package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
- package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
- package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
- package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
- package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
- package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
- package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
- package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
- package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
- package/skills/a2h-spec-generate/SKILL.md +2 -2
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
- package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
|
@@ -145,6 +145,8 @@ The merged structure may still be incomplete (some components appear in no snaps
|
|
|
145
145
|
|
|
146
146
|
**Data-driven visible variants, declared state transitions, state-branch list** → `cards/dynamics.md`. Font-size, coordinate and `Path` units of custom-drawn Views → `cards/canvas.md`.
|
|
147
147
|
|
|
148
|
+
**A supplement-only page (SUP: the source pack has a "Supplement only" section) still lists every state branch of the page**: a branch outside the supplement items is out of this run's scope, so write `n/a (outside the SUP scope)` in its HarmonyOS column, not "not implemented" (that counts in `branch_uncovered` and blocks); a branch the supplement items touch gets its HarmonyOS `file:line` as usual.
|
|
149
|
+
|
|
148
150
|
**Coordinate and window-mode rules, ConstraintLayout rewrite, the three hard requirements for size / position / coordinate system** → `cards/geometry.md`.
|
|
149
151
|
|
|
150
152
|
### 4.3 Generate the ArkUI code
|
|
@@ -210,7 +212,7 @@ Criterion (mechanical): when the conclusion text contains words like "built in /
|
|
|
210
212
|
|
|
211
213
|
### 4.5 Lottie animation integration (only when the parent skill injected `LOTTIE_ENTRIES_FOR_THIS_PAGE`)
|
|
212
214
|
|
|
213
|
-
**No such block in the prompt → skip this section**: do not go reading `resource_mapping.md` on your own, and do not mention Lottie additionally in the generated .ets. With the block → **first read `lottie-integration.md` in the same directory in full** (locating the host logic, `@ohos/lottie` usage, per-scenario adaptations, integration into the page and verification), then generate the code.
|
|
215
|
+
**No such block in the prompt → skip this section**: do not go reading `resource_mapping.md` on your own, and do not mention Lottie additionally in the generated .ets. **Exception**: with no block, but this group's sources (host-chain / SOURCE_PACK) play Lottie (`LottieAnimation`, `LottieAnimationView`, `rememberLottieComposition`, `lottie_rawRes`, …), the parent flow failed to bind the animation to this page, and you **must not** substitute a static image. Integrate per `lottie-integration.md`, taking `load_path` from the file under `rawfile/lottie/` named like `R.raw.<name>`, and request `@ohos/lottie` in `registry_requests` if the dependency is missing; when it truly cannot be integrated, write `// LOTTIE-DEGRADED: <which animation, what placeholder, why>` in the .ets and register L3 degraded in the report. GATE `lottie-host-not-integrated`. With the block → **first read `lottie-integration.md` in the same directory in full** (locating the host logic, `@ohos/lottie` usage, per-scenario adaptations, integration into the page and verification), then generate the code.
|
|
214
216
|
|
|
215
217
|
## Phase 5 — Consistency verification (critical: 2 mandatory rounds + a conditional 3rd)
|
|
216
218
|
|
|
@@ -301,21 +303,22 @@ List every layout/component/resource reference in the converted HarmonyOS UI and
|
|
|
301
303
|
- **Static Clipping Check**: using the main-region ratios of the reference screenshot/view tree, check that the toolbar, content area, cards and bottom area do not cover each other or exceed the expected content area. **Also**:
|
|
302
304
|
- For sibling text/icon rows inside a `Stack`, write out each one's vertical interval `[top, top+height]` and its origin (criterion: the origin paragraph of "Hard requirement (coordinate system)" in `cards/geometry.md`); for state-driven offsets/sizes, compute the start and end values once each and compare them with the corresponding snapshot bounds — if the snapshot shows no overlap but the computation does, it fails.
|
|
303
305
|
- For text that is **single-line** `wrap_content` in the reference view tree (height ≈ one line of text), find its available width on the HarmonyOS side (parent width − width taken by same-row siblings − padding) and estimate from the font size that the text fits; if it does not fit while it fits on Android, the structure has spread siblings into the same row (the "two-dimensional constraints" row of the ConstraintLayout rewrite table in `cards/geometry.md`) — change the structure; do not mask it by shrinking the font or truncating with `maxLines(1)`.
|
|
304
|
-
- **Interaction Reachability Evidence**: for each clickable element, list its **z-order** in the parent `Stack`/layered structure and confirm that **no** sibling after it covers its visible rectangle. **Also** list every container on this page with `width('100%')` and `height('100%')` (or equivalent fill) and label each as interactive or as having declared `hitTestBehavior(HitTestMode.None)`. "No visual overlap" and "hits not blocked" are two different things: a transparent or bottom-pinned container does not count as covering in a visual check, yet it can swallow every click beneath it. The typical sign of missing this item is an element that looks normal but does nothing at all when tapped (not even console output), because the event is consumed by an upper node that has no `onClick` of its own.
|
|
306
|
+
- **Interaction Reachability Evidence**: for each clickable element, list its **z-order** in the parent `Stack`/layered structure and confirm that **no** sibling after it covers its visible rectangle. **Also** list every container on this page with `width('100%')` and `height('100%')` (or equivalent fill) and label each as interactive or as having declared `hitTestBehavior(HitTestMode.None)`. "No visual overlap" and "hits not blocked" are two different things: a transparent or bottom-pinned container does not count as covering in a visual check, yet it can swallow every click beneath it. The typical sign of missing this item is an element that looks normal but does nothing at all when tapped (not even console output), because the event is consumed by an upper node that has no `onClick` of its own. Whether a filling layer swallows taps is decided by the checker from the layer structure: a `stack-swallows-taps` / `fullsize-container` GATE closes only by fixing the code or by a `// HIT-TEST:` marker the checker verifies, not by the evidence written here; this item only annotates the remaining CANDs one by one.
|
|
305
307
|
|
|
306
308
|
- **Missing Observation Decorators** (per the paradigm branch decided in Phase 2.0):
|
|
307
309
|
List the read surface of build() item by item; criteria in `cards/state.md`, and additionally `cards/state-v1.md` for V1 projects.
|
|
308
|
-
- **Color Conflict**: do fill/background/foreground colors conflict and make something invisible (white image on white)? Fix it if so
|
|
310
|
+
- **Color Conflict**: do fill/background/foreground colors conflict and make something invisible (white image on white)? Fix it if so. **"It is already invisible on the source" may only affect colors, never justify deleting an element**: every icon with `visible-to-user="true"` in the view tree needs an ArkUI counterpart. Before judging it invisible, read `icon_inventory` in `measure_pack.json` (sampled at the registered position) and `registration` — `registration.ok=false` means the screenshot was not settled (mid-animation), a `--probe` at view.xml bounds samples the wrong place, and `ink 0.0%` is no evidence of invisibility.
|
|
309
311
|
- **Color Settings**: do the background/fill/foreground colors match the Android UI (missing, wrong)? Fix them if not. **For a background that switches by state, the text color must be written with the same condition**: Android's selected/occupied branches usually call both `setBackground` and `setTextColor`; translate only the background and the text color stays at the default dark color. A `Span`'s color inherits from the enclosing `Text`; if neither sets it, it is the default color. This item **cannot rely on self-reporting alone**: the `[text_color]` section of `phase5_check --group` compares, segment by segment, the text foreground color measured by measure_pack with the effective text color of `Text`/`Span` in the code; `text-color-unset` / `text-color-mismatch` are blocking. Mechanical backstop: GATE `text-on-stateful-bg-no-color` (a lexical check, also effective on source-only pages)
|
|
310
312
|
- **Text Alignment Evidence**: list every `Column`/`Row` that directly contains `Text` (or a `@Builder` call that renders `Text`), labeling whether it explicitly declares **the axis that determines horizontal position**, and the Android basis for that value.
|
|
311
313
|
Criteria (the horizontal axis of the two containers, looking at the parent container, `Scroll.align`, Compose `Box` child alignment) → `cards/alignment.md`.
|
|
312
314
|
- **Horizontal Inset Evidence**: "Text Alignment Evidence" only governs alignment direction (Start/Center/End), not **how much it is indented** — left-aligned but 72vp off on the left margin still passes. This item checks the left margin of every visible `Text`, one by one:
|
|
313
315
|
Criteria (matches the measurement, same group same indent, right edge likewise) → `cards/alignment.md`.
|
|
314
|
-
- **Icon Source Tier Evidence**: for every visible icon, label which tier of Phase 4.3 it belongs to — L1 / L2 / L2.5 / L3; L2 must give the library and symbol name, L2.5 the original web path and (for Remote) the absolute URL, L3 the downgrade explanation. **An unregistered L3 is a failure; deciding L3 without first checking the two Hybrid-Shell sections is likewise a failure**. Also confirm one by one that none of the three forbidden downgrades was used (emoji/text glyphs, substituting a semantically mismatched drawable, hand-writing SVG from memory).
|
|
316
|
+
- **Icon Source Tier Evidence**: for every visible icon, label which tier of Phase 4.3 it belongs to — L1 / L2 / L2.5 / L3; L2 must give the library and symbol name, L2.5 the original web path and (for Remote) the absolute URL, L3 the downgrade explanation. **An unregistered L3 is a failure; deciding L3 without first checking the two Hybrid-Shell sections is likewise a failure**. Also confirm one by one that none of the three forbidden downgrades was used (emoji/text glyphs, substituting a semantically mismatched drawable, hand-writing SVG from memory). **And** (mechanical gate, icon coverage): every key of `icon_inventory` needs `// ICON: <key>` (comma-separated for several; a note may follow the keys) on the `Image`/`SymbolGlyph` line that renders it or within 3 lines above. **Copy the key from measure_pack output** (the summary "icons" lines or `icon_inventory[].key`): the resource-id without the package when there is one (e.g. `search_mag_icon`), else the content-desc, else `node<idx>` (changes with view.xml, never derive it yourself); rows sharing an id (list items) merge into one key, visible when any row is. When there is a real reason not to implement it, write `// ICON-OMIT: <key> — <basis>`, but the checker refuses it when the icon is measured with ink on a solid background. Judged by the `[icons]` section of `phase5_check --group`; `icon-uncovered` / `icon-omit-refused` / `icon-marker-detached` block, and EVIDENCE text cannot close them.
|
|
317
|
+
An icon the host or a shared component draws (a Fragment host's Toolbar back / overflow, the bottom navigation): put the `// ICON: <key>` marker on the Image line in that shared component; it covers every page group that uses it. Do not add a fake marker on an unrelated Image in this group.
|
|
315
318
|
- **Misused Resource References**: do the resource references match the Android UI; nonexistent resources must be looked up again for the right name; "no emoji or hard-coded icons of any kind are allowed".
|
|
316
319
|
SVG content sub-checks (clip-path, fill/stroke, viewBox, tint channel, bounding-box path, `?attr`, placeholder SVG, duplicate attributes) → `cards/resources.md`.
|
|
317
320
|
- **Transition Implementation Evidence**: list every entry of the Phase 4.2 "declared state transitions" list, labeling it `implemented` / `degraded` (with the reason and the actual behavior after downgrading) / `escalate` / `n/a` (with the reason). **A missing list entry, or any entry left unlabeled, is a failure.**
|
|
318
|
-
**List the Phase 4.2 "state-branch list" in the same section
|
|
321
|
+
**List the Phase 4.2 "state-branch list" in the same section** (`phase5_check.mjs` reads it row by row: an uncaptured row whose Harmony side says "not implemented", or cites a `.ets` that does not exist or a line past its end, counts in `branch_uncovered` (blocking); a row with a symbol but no `file:line` is listed in `branch_unlocated`; "the mock state never reaches this branch" is no reason to leave it out): each row "state → source-side condition `file:line` → build/draw calls in the branch → captured by a snapshot or not → HarmonyOS-side `file:line`". Each `drawXxx` of a custom-drawn View gets its own row. A branch call of an uncaptured state with no matching line on the HarmonyOS side and not labeled `n/a` is a failure — this is the only acceptance basis for uncaptured states.
|
|
319
322
|
|
|
320
323
|
**`degraded` is not a universal exit you may adopt on your own.** When the **end state of a transition has been captured by any reference snapshot**, this page **must not** label it `degraded` on its own — only `implemented`, or `escalate` (with a description of the gap), and the parent flow decides whether to accept or send it back. Reason: `degraded` and `implemented` stand side by side as zero-cost legal end states, while the state captured by a reference snapshot **is itself the acceptance target**, not an optional behavioral detail; allowing self-downgrading means allowing the page to shrink its own acceptance scope.
|
|
321
324
|
Criterion (mechanical, the same as the cross-check in Phase 4.2): when the bounds or size of the same `resource-id` change across snapshots in a way **that scroll displacement cannot explain** (the whole block gets shorter rather than moving up as a whole), that end state counts as "captured".
|
|
@@ -10,7 +10,8 @@ After I1–I5, **return to Step 4.1 of [step4-prepare.md](step4-prepare.md)** an
|
|
|
10
10
|
|
|
11
11
|
| Variable | Required | Description |
|
|
12
12
|
|---|---|---|
|
|
13
|
-
| `
|
|
13
|
+
| `scope_file` | No | A `scope.json` already confirmed per feature (v2, written by a2h-app-migrate `discover.feature_scope`); when given, take "Confirmed scope" and skip I1–I4 |
|
|
14
|
+
| `scope_request` | Yes (unless `scope_file` is given) | The scope in the user's own words. It can be a single page ("short-video player page") or a semantic module ("all missing pages of the short-video module"). **If it is missing, ask the user; do not guess** |
|
|
14
15
|
| `android_project_dir` / `harmony_project_dir` / `apk_path` | Yes | Same as main SKILL.md Step 1 |
|
|
15
16
|
| `ui_info_root` | No | Same as main SKILL.md Step 1. In incremental mode some snapshots often **already exist**; I5 reuses them first |
|
|
16
17
|
| Device | No | Used by I5 for capture (the same adb device as main SKILL.md Step 0). Without a device, every member is converted as source-only |
|
|
@@ -50,13 +51,13 @@ A real UTG is essentially strongly connected (every page can get back to the hom
|
|
|
50
51
|
|
|
51
52
|
Record an `inclusion` for each member: `seed` / `hop:N via <edge trigger>` / `dialog-of:<host>` / `cross-cutting`. This field is the core of the I4 table, and the only basis on which the user decides whether to prune it.
|
|
52
53
|
|
|
53
|
-
**All four rules are heuristics and cannot all be right.** A semantic boundary has no single correct answer, so the user confirmation in I4 is not optional.
|
|
54
|
+
**All four rules are heuristics and cannot all be right.** A semantic boundary has no single correct answer, so the user confirmation in I4 is not optional (except when a2h-app-migrate calls with `INTERACTION_MODE=auto`, see I4).
|
|
54
55
|
|
|
55
56
|
## I3 — Gap analysis: which members are really missing
|
|
56
57
|
|
|
57
58
|
`batch_progress.json` only records pages **converted by this skill itself**. The user's existing HarmonyOS version has no progress file at all, so the existing pages must be enumerated from the project itself.
|
|
58
59
|
|
|
59
|
-
**Enumerate the existing HarmonyOS
|
|
60
|
+
**Enumerate the existing HarmonyOS files**: run `node <skill_dir>/scripts/list_existing.mjs ${harmony_project_dir} --out ${harmony_project_dir}/.hometrans/incremental/existing.json`; do not assemble the list by hand. For every module (a directory with `src/main/ets` or `src/main/resources`, i.e. `ALL_MODULES`) it lists the `.ets` files under `src/main/ets/pages/**`, `components/**` and `viewmodel/**`, and checks them against the `main_pages.json` route table: `routes.registered_missing` (registered but not implemented) and `routes.unregistered_pages` (implemented but not registered). Both must be visible in I4. `viewmodel/**` must be listed: every page group predicts a write to `viewmodel/<X>ViewModel.ets`, and leaving it out lets a hand-written ViewModel of that name be written over.
|
|
60
61
|
|
|
61
62
|
**Mapping**: follow the project's existing naming rule (`${activity_name}` with `Activity`/`Fragment` removed and `Page` appended, case-insensitive), the same rule that [step4-prepare.md](step4-prepare.md) Step 4.3 and `a2h-resource-convert` use.
|
|
62
63
|
|
|
@@ -67,16 +68,21 @@ Record an `inclusion` for each member: `seed` / `hop:N via <edge trigger>` / `di
|
|
|
67
68
|
| Grade | Criterion | Action |
|
|
68
69
|
|---|---|---|
|
|
69
70
|
| `missing` | No corresponding HarmonyOS page (neither name nor content evidence hits) | Convert |
|
|
70
|
-
| `exists` | A corresponding page exists and
|
|
71
|
+
| `exists` | A corresponding page exists and `page_gap.mjs` says `complete` (every resource / text of the Android page is there) | Skip; list the basis in the Step 7 report |
|
|
72
|
+
| `partial` | A corresponding page exists, is not a placeholder, but `page_gap.mjs` says `partial` (some migrated, some missing) | **Supplement** (see below): add only what is missing, edit in place, no backup-and-overwrite |
|
|
71
73
|
| `placeholder` | A corresponding page exists but is an empty placeholder | **Re-migrate** (see below) |
|
|
72
74
|
| `exists?` | The mapping is uncertain | Hand to I4 for the user to decide |
|
|
73
75
|
|
|
76
|
+
**`exists` / `partial` come from the gap report, never from impression**: first take the Android page's resource closure with `<a2h-resource-convert skill>/scripts/extract_page_resources.ts --res <each module's res> --layout <the page layout> [--source <the page class>] --out <work>/gap/<page>.candidates.json` (the layout and class are the files I1's evidence located), then run `node <skill_dir>/scripts/page_gap.mjs --candidates <same> --ets <page .ets> [--ets <ViewModel / component .ets>] --mapping ${harmony_project_dir}/.hometrans/resource_mapping.md --out <work>/gap/<page>.json`. `complete` → `exists`; `partial` → `partial`; `absent` (nothing found) → `exists?` for I4 when the placeholder criteria do not hit (most likely the wrong page was mapped). Control ids are weak evidence and never decide a grade alone. When the user says "this part of that page was not migrated" (a supplement instruction), run these two steps on that page directly.
|
|
77
|
+
|
|
74
78
|
**Placeholder criteria (mechanically decidable; any hit means `placeholder`)**: `build()` has no controls other than scaffolding; no `$r(...)` resource reference at all; contains `Hello World` or the DevEco template's default copy; fewer than 30 effective lines.
|
|
75
79
|
|
|
76
|
-
**Before re-migrating a `placeholder`, back up the original file** (
|
|
80
|
+
**Before re-migrating a `placeholder`, back up the original file** (to `${harmony_project_dir}/.hometrans/backup/<timestamp>/<path relative to the project>`; not next to the page and not under `resources/` — see item 2 of the sub-agent contract in the main SKILL.md. A backup in the source tree is committed with the conversion and lands in the patch), and state explicitly in the I4 table "will overwrite `<path>`, backed up".
|
|
77
81
|
|
|
78
82
|
## I4 — User confirmation (mandatory stop when there is more than 1 member)
|
|
79
83
|
|
|
84
|
+
**Exception: when a2h-app-migrate calls with `INTERACTION_MODE=auto`, do not stop.** Settle the table yourself: an `exists?` takes the more likely side by content evidence, a name with several candidates takes the one with the strongest evidence, and the table states each choice and its reason; still put the table and the "adjacent but cut" list in the reply, then write the files and go on. Fail only when a name has no candidate at all.
|
|
85
|
+
|
|
80
86
|
**With more than 1 member, you must stop and wait for the user's confirmation; do not start on your own.** With exactly 1 member you may continue directly, but state the scope-resolution basis in the reply (which signal hit, `file:line`).
|
|
81
87
|
|
|
82
88
|
Give a table, one member per row:
|
|
@@ -87,20 +93,33 @@ Give a table, one member per row:
|
|
|
87
93
|
| `page_0009_CommentListActivity` | `hop:1 via tap the comment icon` | `placeholder` | Re-migrate, overwriting `entry/.../CommentPage.ets` (backed up) |
|
|
88
94
|
| `page_0012_ShareSheet` | `dialog-of:VideoPlayerActivity` / `cross-cutting` | `missing` | Convert |
|
|
89
95
|
| `page_0003_LoginActivity` | `hop:2 via like while logged out` / `cross-cutting` | `exists` | Skip |
|
|
96
|
+
| `page_0005_SettingsActivity` | `seed` | `partial` (missing the `notify_switch` text and the `ic_bell` icon) | Supplement, editing `entry/.../SettingsPage.ets` in place |
|
|
97
|
+
|
|
98
|
+
When `migrated_pages` is passed (page ids a2h-app-migrate read from the migration ledger as UI-migrated), a member it names gets `ledger: migrated` appended in the Status column. It is a hint only: the planned action still follows I3's verdict from the disk (the ledger says migrated but the disk says `missing` / `placeholder` = the file was deleted or reverted to a placeholder; convert / re-migrate as usual and say so in the table).
|
|
90
99
|
|
|
91
100
|
**Also attach an "adjacent but pruned" list**, one per line, stating which stop rule blocked it (another semantic domain's anchor / over the hop limit), so the user can pull it back. Without this list the user cannot tell whether the scope missed something.
|
|
92
101
|
|
|
93
|
-
The member set after the user confirms is `SCOPE`; the members whose action is "Convert"
|
|
102
|
+
The member set after the user confirms is `SCOPE`; the members whose action is "Convert", "Re-migrate" or "Supplement" form the set of pages to convert. The user may also turn an `exists` member into "Supplement" (the gap report runs first) or a `partial` one into "Skip".
|
|
103
|
+
|
|
104
|
+
**Write the two lists of I5 now** (`scope.json`, `existing.json`, format below), then run `progress_identity.mjs resume` (main SKILL.md "Resume from progress"): the resume identity and every stage marker depend on this scope's `scope_id`, so they cannot be decided before the scope is.
|
|
94
105
|
|
|
95
106
|
**At this point go back to the main SKILL.md and run Step 2 (resource conversion, incremental mode)**, passing the source files of the pages to convert in `SCOPE` as `page_files`. It comes after I4 rather than earlier because members the user prunes should not consume resource conversion; it comes before I5 because it does not depend on capture, and doing it first exposes resource gaps sooner. When done, return to I5.
|
|
96
107
|
|
|
108
|
+
## Confirmed scope (`scope_file=`, skipping I1–I4)
|
|
109
|
+
|
|
110
|
+
When a2h-app-migrate's `discover.feature_scope` has already confirmed the scope per feature (or the user passed a confirmed `scope.json`), this skill is invoked with `scope_file=<scope.json>` and no `scope_request`. Then:
|
|
111
|
+
|
|
112
|
+
- **No I1 / I2 / I4**: the user already confirmed the scope per feature; nothing is resolved again and nothing stops for confirmation. Read the file (`node <skills_root>/a2h-app-migrate/scripts/scope_model.mjs validate <scope_file>`): `pages` are the pages to convert, and `features[].work` gives each page's type — `NEW` converts the whole page, `SUP` / `CHG` add only the gap list / the change (reaching the group's `supplement` through `build_conversion_set.mjs`).
|
|
113
|
+
- **I3 does one thing**: run `list_existing.mjs` and write `existing.json` as usual (hit files are edited, never recreated); the page grading was done in the gap reports and is not recomputed.
|
|
114
|
+
- `scope.json` is already at `${harmony_project_dir}/.hometrans/incremental/scope.json` (copy it there if not); then as usual: `progress_identity.mjs resume --mode incremental --scope <scope.json>`, the static-check baseline, Step 2 (`page_files` = these pages' source files), I5 targeted capture, `build_conversion_set.mjs --scope <scope.json> --existing <existing.json>`.
|
|
115
|
+
- With empty `pages` (a scope of no-UI logic only) this skill should not be invoked; if it is, return `{ "ok": true, "pages_processed": 0 }` with the reason.
|
|
97
116
|
## I5 — Targeted capture (`a2h-utg-explorer` with a limited scope; no dependency on crawler / AutoGLM)
|
|
98
117
|
|
|
99
118
|
Only the `screenshot.png` + `view.xml` + `meta.json` of the pages in `SCOPE` are needed. Members that cannot be captured do not block: `build_conversion_set.mjs` converts them as source-only, the same degradation as in full mode.
|
|
100
119
|
|
|
101
|
-
**
|
|
102
|
-
- `${harmony_project_dir}/.hometrans/incremental/scope.json`: `{"scope": [<utg node ids in SCOPE whose action is "Convert" or "Re-migrate">]}`. Members graded `exists` / `exists?` and skipped are not written.
|
|
103
|
-
- `${harmony_project_dir}/.hometrans/incremental/existing.json`: `
|
|
120
|
+
**The two lists on disk** (the conclusions of I3 / I4, written at I4's confirmation; every later plan rebuild uses them. Changing `scope.json` later changes `scope_id` and makes it a different run):
|
|
121
|
+
- `${harmony_project_dir}/.hometrans/incremental/scope.json`: with no "Supplement" member, write v1 as before: `{"scope": [<utg node ids in SCOPE whose action is "Convert" or "Re-migrate">]}`. **With any "Supplement" member, write v2**: write a draft first (one feature per member: Convert / Re-migrate → `{"type": "NEW", "page": <id>}`; Supplement → `{"type": "SUP", "page": <id>, "missing": <that page's page_gap.mjs JSON>}`), then produce the file with `node <skills_root>/a2h-app-migrate/scripts/scope_model.mjs write --from <draft> --out <scope.json>` (it derives `pages` and `scope_id`, so the three lanes agree). Members graded `exists` / `exists?` and skipped are not written. A supplemented page's missing list reaches its group's `supplement` through `build_conversion_set.mjs`, and the group pack has the converter add only those items.
|
|
122
|
+
- `${harmony_project_dir}/.hometrans/incremental/existing.json`: written in I3 by `list_existing.mjs --out`; `existing` lists the existing .ets files (relative to the ETS root, e.g. `"pages/MainPage.ets"`, `"viewmodel/MainViewModel.ets"`). `build_conversion_set.mjs` reads only `existing`; given `--scope` without `--existing` it prints a `[WARN]`.
|
|
104
123
|
|
|
105
124
|
**Reuse existing snapshots first**: members that already exist under `ui_info_root`, pass the exact-path check of [step4-prepare.md](step4-prepare.md) Step 4.1, and whose `meta.json.static_node` is in `scope.json` do not need capturing again. When a new scope uses a new campaign, `export_ui_info.mjs` records in `export_manifest.json` `earlier` the pages exported by the previous campaign that were not captured again this time but whose directories still exist; `build_conversion_set.mjs --scope` still counts them as captured and does not create separate source-only directories. When every member has a snapshot, skip the capture below and go straight to "Build the plan".
|
|
106
125
|
|
|
@@ -119,7 +119,9 @@
|
|
|
119
119
|
|-------------|---------------|---------|---------|
|
|
120
120
|
| `android:inputType` | `.type()` | InputType → InputType | Android: `android:inputType="text"`<br/>HarmonyOS: `TextInput().type(InputType.Normal)` |
|
|
121
121
|
| `android:inputType="textPassword"` | `.type()` | password → Password | Android: `android:inputType="textPassword"`<br/>HarmonyOS: `TextInput().type(InputType.Password)` |
|
|
122
|
-
| `android:inputType="number"` | `.type()` | number → Number | Android: `android:inputType="number"`<br/>HarmonyOS: `TextInput().type(InputType.Number)` |
|
|
122
|
+
| `android:inputType="number"` | `.type()` | number → Number | Android: `android:inputType="number"`<br/>HarmonyOS: `TextInput().type(InputType.Number)`<br/>Note: ArkUI `Number` **filters out** non-digit characters (no negatives, no decimals); Android only switches the keyboard |
|
|
123
|
+
| `android:inputType="numberDecimal"` / Compose `KeyboardType.Decimal` | `.type()` | numberDecimal → NUMBER_DECIMAL | Android: `android:inputType="numberDecimal"`<br/>HarmonyOS: `TextInput().type(InputType.NUMBER_DECIMAL)` (API 11+, one decimal point, no negatives). Amount/price fields use it whenever the business allows decimals, even if Android wrote `KeyboardType.Number` |
|
|
124
|
+
| Compose `KeyboardType.Number` / `NumberPassword` | `.type()` | Number → Number / NUMBER_PASSWORD | Integer fields (verification code, quantity) use `InputType.Number`; fields that may hold decimals: see the row above |
|
|
123
125
|
| `android:inputType="phone"` | `.type()` | phone → PhoneNumber | Android: `android:inputType="phone"`<br/>HarmonyOS: `TextInput().type(InputType.PhoneNumber)` |
|
|
124
126
|
| `android:inputType="email"` | `.type()` | email → Email | Android: `android:inputType="textEmailAddress"`<br/>HarmonyOS: `TextInput().type(InputType.Email)` |
|
|
125
127
|
| `android:inputType="textMultiLine"` | Use TextArea | multiLine → TextArea | Android: `android:inputType="textMultiLine"`<br/>HarmonyOS: use the TextArea component |
|
|
@@ -1732,7 +1734,7 @@ Column() {
|
|
|
1732
1734
|
|
|
1733
1735
|
| Android component | Class name | HarmonyOS component | Alternative | Notes |
|
|
1734
1736
|
|-------------|------|---------------|---------|------|
|
|
1735
|
-
| ConstraintLayout | `androidx.constraintlayout.widget.ConstraintLayout` | `RelativeContainer` | Partial equivalent | Constraint layout |
|
|
1737
|
+
| ConstraintLayout | `androidx.constraintlayout.widget.ConstraintLayout` | `RelativeContainer` | Partial equivalent | Constraint layout. **The `wrap_content` direction cannot rely on RelativeContainer self-sizing**: when height/width is `"auto"` (API 11+) or `LayoutPolicy.wrapContent` (API 20+) and any child is anchored on `'__container__'` in that direction, the self-sizing does not take effect and the size counts as unset, so the container is stretched inside a Scroll/List (RelativeContainer doc; FAQ faqs-arkui-318). Prefer translating a `wrap_content` card into `Column`/`Row`/`Stack`; when keeping the RelativeContainer, anchor only on siblings in that direction and write `'auto'`, or write the measured size. GATE `relative-container-unsized-in-scroll` |
|
|
1736
1738
|
| ConstraintSet | `androidx.constraintlayout.widget.ConstraintSet` | Custom state management | Dynamic configuration | Constraint set |
|
|
1737
1739
|
| Guideline | `androidx.constraintlayout.widget.Guideline` | No direct equivalent yet | Assisted by absolute positioning | Guideline |
|
|
1738
1740
|
| Barrier | `androidx.constraintlayout.widget.Barrier` | No direct equivalent yet | Compute positions manually | Barrier |
|
|
@@ -2250,7 +2252,7 @@ Column() {
|
|
|
2250
2252
|
|----------------|--------|---------------|---------|------|
|
|
2251
2253
|
| Text | `Text()` | `Text` | Direct mapping | Text display |
|
|
2252
2254
|
| TextField | `TextField()` / `OutlinedTextField()` | `TextInput` | Configure the style | Text input field |
|
|
2253
|
-
| BasicTextField | `BasicTextField()` | `TextInput` |
|
|
2255
|
+
| BasicTextField | `BasicTextField()` | `TextInput` + `.padding(0)` + `.borderRadius(0)` + `.backgroundColor(Color.Transparent)` | BasicTextField has no inner padding or background; ArkUI TextInput defaults to padding 8 top/bottom, 16 left/right and a background, so a fixed-height field clips its text unless they are cleared | Basic text input |
|
|
2254
2256
|
| Button | `Button()` | `Button` | Direct mapping | Button |
|
|
2255
2257
|
| IconButton | `IconButton()` | `Button` + icon | Composite implementation | Icon button |
|
|
2256
2258
|
| Icon | `Icon()` | `SymbolGlyph` / `Image` | System icon or image | Icon |
|
|
@@ -2268,7 +2270,8 @@ Column() {
|
|
|
2268
2270
|
| Column | `Column()` | `Column` | Direct mapping | Vertical linear layout |
|
|
2269
2271
|
| Row | `Row()` | `Row` | Direct mapping | Horizontal linear layout |
|
|
2270
2272
|
| Box | `Box()` | `Stack({ alignContent: Alignment.TopStart })` | Opposite alignment default | Stack layout. Compose `Box` defaults to `contentAlignment = TopStart`, ArkUI `Stack` defaults to `Center`: `Box()` must be written with `alignContent: Alignment.TopStart`, and `Box(contentAlignment = X)` with X. A child's `Modifier.align(X)` must not be translated to the child's `.align(X)` (it has no effect inside a Stack), nor dropped leaving only padding/margin; when X equals the other children's alignment, change the Stack's `alignContent`; otherwise wrap that child in a `Column`/`Row` the same size as the Stack and arranged by X (bottom-pinned: `justifyContent(FlexAlign.End)`), or use `.position`/`.markAnchor`. GATE `stack-bar-default-center` / `stack-overlay-default-center` |
|
|
2271
|
-
|
|
|
2273
|
+
| Box layering (`Box(Modifier.matchParentSize().background(c))` mask) | `Modifier.matchParentSize()` | `.overlay(@Builder)`, builder root `Column().width('100%').height('100%').backgroundColor(c).hitTestBehavior(HitTestMode.Transparent)` | No colour string | Whole-card mask / greyed-out layer. `overlay(value: string)` is the **mask text** overload (overlay doc): `.overlay('#66FFFFFF')` / `.overlay('transparent')` draws the colour value as text at the top-left corner and paints no mask; `'100%'` inside the overlay builder is relative to the host component (overlay doc example 3). For a conditional mask write `if` inside the builder. GATE `overlay-string-color` |
|
|
2274
|
+
| ConstraintLayout | `ConstraintLayout()` | `RelativeContainer` | Partial equivalent | Constraint layout. **The `wrap_content` direction cannot rely on RelativeContainer self-sizing**: when height/width is `"auto"` (API 11+) or `LayoutPolicy.wrapContent` (API 20+) and any child is anchored on `'__container__'` in that direction, the self-sizing does not take effect and the size counts as unset, so the container is stretched inside a Scroll/List (RelativeContainer doc; FAQ faqs-arkui-318). Prefer translating a `wrap_content` card into `Column`/`Row`/`Stack`; when keeping the RelativeContainer, anchor only on siblings in that direction and write `'auto'`, or write the measured size. GATE `relative-container-unsized-in-scroll` |
|
|
2272
2275
|
| FlowRow | `FlowRow()` | `Flex` (direction: Row) | Flow row layout | Flow row layout |
|
|
2273
2276
|
| FlowColumn | `FlowColumn()` | `Flex` (direction: Column) | Flow column layout | Flow column layout |
|
|
2274
2277
|
| LazyColumn | `LazyColumn()` | `List` (listDirection: Axis.Vertical) | With LazyForEach | Lazy vertical list |
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
| `LinearLayout` (horizontal) | `Row` | Horizontal linear layout |
|
|
14
14
|
| `FrameLayout` | `Stack` | Stacked layout; supports `.alignContent()` |
|
|
15
15
|
| `RelativeLayout` | `RelativeContainer` | Relative layout; positioning rules via `.alignRules()` |
|
|
16
|
-
| `ConstraintLayout` | `RelativeContainer` / custom layout | Constraint layout; complex cases can use custom `onMeasureSize`/`onPlaceChildren` |
|
|
16
|
+
| `ConstraintLayout` | `RelativeContainer` / custom layout | Constraint layout; complex cases can use custom `onMeasureSize`/`onPlaceChildren`. When expressed as `Stack` layers instead, write `Stack({ alignContent: Alignment.TopStart })`: constraints anchor children to the top/start edge, while `Stack` defaults to `Alignment.Center` |
|
|
17
|
+
| `MotionLayout` | `Stack({ alignContent: Alignment.TopStart })` layers (background / scroll / overlay), or `RelativeContainer` | The transition progress is driven by the scroll offset and interpolates the two end constraint sets. Every layer needs a definite size: an empty layer shown only through `.background()` must write `.width('100%')` and a height (container width/height default to the children's size, 0 for an empty container); an overlay (custom component) with no positioning at its call site must either fill the Stack at its root or rely on `TopStart`. GATE `bg-only-container-collapsed` / `stack-custom-child-default-center` |
|
|
17
18
|
| `FlexboxLayout` | `Flex` | Flex layout; standard Flexbox via `FlexDirection`/`FlexWrap`/`FlexAlign` |
|
|
18
19
|
| `GridLayout` | `Grid` | Grid layout; define columns via `.columnsTemplate('1fr 1fr 1fr')` |
|
|
19
20
|
| `TableLayout` | `Grid` | Table layout; emulate the table with `Grid` |
|
|
@@ -107,6 +108,32 @@
|
|
|
107
108
|
| `ArrayAdapter` | `ForEach` + array | Array adapter |
|
|
108
109
|
| `BaseAdapter` | `ForEach` / `LazyForEach` | Base adapter |
|
|
109
110
|
|
|
111
|
+
### Compose lazy grid parameters (LazyVerticalStaggeredGrid / LazyVerticalGrid → WaterFlow / Grid)
|
|
112
|
+
|
|
113
|
+
Beyond the component mapping, these parameters decide spacing and full-line items. **Map every one; a missing one is a visible defect** (GATE `waterflow-sections-no-gap`):
|
|
114
|
+
|
|
115
|
+
| Compose parameter | WaterFlow (sections) | Grid |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `columns = Fixed(n)` | grid section `crossCount: n` | `.columnsTemplate('1fr 1fr …')` |
|
|
118
|
+
| `contentPadding = PaddingValues(x)` | `margin: x` on each section (or WaterFlow `.padding(x)`; one or the other, never both) | `.padding(x)` |
|
|
119
|
+
| `horizontalArrangement = spacedBy(x)` | section `columnsGap: x` (falls back to WaterFlow `.columnsGap`) | `.columnsGap(x)` |
|
|
120
|
+
| `verticalItemSpacing = y` / `verticalArrangement = spacedBy(y)` | section `rowsGap: y` (falls back to WaterFlow `.rowsGap`) | `.rowsGap(y)` |
|
|
121
|
+
| `item(span = FullLine)` | its own `crossCount: 1` section, with `rowsGap` too | `GridItem().columnStart(0).columnEnd(n-1)` |
|
|
122
|
+
|
|
123
|
+
- **Keep sections in step with the data**: compute `itemsCount` from the data source, never a number literal (CAND `waterflow-section-count-literal`). Update the sections with `sections.update/splice` on refresh, load-more, or when mock data is replaced by real data. The SDK requires the section counts to add up to the real FlowItem count, or the layout breaks.
|
|
124
|
+
- **One kind of content per FlowItem template**: do not switch between full-line items (banner, titles, recommend list) and grid items with if/else inside one `LazyForEach` callback. A reused node can keep the width constraint of the other kind, so a grid item gets measured at full-line width: the image grows tall and the right side gets clipped. Split the full-line part and the grid part into separate data, or give each item kind its own child component with an explicit width at the call site.
|
|
125
|
+
- Reuse the shared `RefreshLayout` (it already maps `spacedBy`/`verticalItemSpacing`) when you can. If you need full-line items, add a full-line slot to the shared component instead of rewriting a WaterFlow in the page and dropping the spacing.
|
|
126
|
+
|
|
127
|
+
### Compose top bar scroll behavior (TopAppBarScrollBehavior)
|
|
128
|
+
|
|
129
|
+
| Compose | ArkUI | Notes |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| `enterAlwaysScrollBehavior` | whole bar `.translate({ y: -offset })` + outer `.clip(true)` + content moved up with it (or the bar as a Stack overlay); `offset ∈ [0, bar height]`, accumulated from the list's `onDidScroll` `yOffset` | Scrolling up moves the whole bar off screen; scrolling down any distance brings it back immediately |
|
|
132
|
+
| `exitUntilCollapsedScrollBehavior` (LargeTopAppBar) | same, but offset only decreases when the list is back at the top | Large title collapses into a small one |
|
|
133
|
+
| `pinnedScrollBehavior` | bar fixed; change only background color or shadow | Does not move |
|
|
134
|
+
|
|
135
|
+
**Never fake the collapse by changing only the bar's `.height()`**: when the children have fixed heights, the container shrinks but its content stays put, so the bar looks "half-collapsed". If you cannot do the translation, keep a fixed bar and list it as a degradation in the report instead of shipping a half-working collapse.
|
|
136
|
+
|
|
110
137
|
## Pull-to-Refresh (SwipeRefreshLayout) Mapping
|
|
111
138
|
|
|
112
139
|
`SwipeRefreshLayout` → `Refresh` is a component match only; the pull-down behavior differs:
|
|
@@ -126,6 +126,31 @@ class SettingsStore {
|
|
|
126
126
|
const store: SettingsStore = PersistenceV2.connect(SettingsStore, SettingsStore.KEY, () => new SettingsStore())!;
|
|
127
127
|
// In memory only, shared across pages:
|
|
128
128
|
const session: SettingsStore = AppStorageV2.connect(SettingsStore, 'session', () => new SettingsStore())!;
|
|
129
|
+
// ❌ No creator: when the key does not exist yet, the first connect throws
|
|
130
|
+
// BusinessError: The default creator should be function when first connect (an app crash);
|
|
131
|
+
// a `?? new SettingsStore()` fallback is never reached. AppStorageV2 docs: the creator may be omitted only
|
|
132
|
+
// when the data is known to be stored already; otherwise it must be given or the app fails.
|
|
133
|
+
// const bad = AppStorageV2.connect(SettingsStore, 'session') ?? new SettingsStore();
|
|
134
|
+
// One key shared across modules (entry HAP and feature HARs): every connect site passes a creator and the
|
|
135
|
+
// same type; do not depend on "who creates the key first".
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
// 7) Handing a @Builder to a child's @BuilderParam
|
|
140
|
+
@ComponentV2
|
|
141
|
+
struct Parent {
|
|
142
|
+
@Local url: string = '';
|
|
143
|
+
@Builder Avatar() { Image(this.url) } // `this` is the component at the actual call site
|
|
144
|
+
@LocalBuilder AvatarL() { Image(this.url) } // `this` stays the declaring Parent
|
|
145
|
+
build() {
|
|
146
|
+
Column() {
|
|
147
|
+
// ❌ Item({ trailing: this.Avatar }) —— Avatar runs inside Item, this.url reads Item → undefined / crash
|
|
148
|
+
Item({ trailing: () => { this.Avatar() } }) // ✅ wrap in an arrow function, `this` stays Parent
|
|
149
|
+
Item({ trailing: this.AvatarL }) // ✅ or use @LocalBuilder
|
|
150
|
+
// ❌ Item({ trailing: () => { Image(this.url) } }) — an arrow body is not UI-compiled; a component written there crashes on render (class constructor cannot called without 'new')
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
129
154
|
```
|
|
130
155
|
|
|
131
156
|
## 3. Common mistakes (this table is the acceptance checklist)
|
|
@@ -138,6 +163,12 @@ const session: SettingsStore = AppStorageV2.connect(SettingsStore, 'session', ()
|
|
|
138
163
|
| Side effects / assignments inside a `@Computed` getter | Undefined behavior | Keep the getter pure; put side effects in `@Monitor` |
|
|
139
164
|
| `@Monitor` in a `struct` watching a non-state variable | Never fires | Only watch variables decorated with `@Local`/`@Param`/`@Provider`/`@Consumer`/`@Computed`; a deep property must also be `@Trace` (basis: `v2-monitor` §Constraints) |
|
|
140
165
|
| The class passed to `PersistenceV2.connect` lacks `@ObservedV2` | Not persisted / no refresh | Storage classes must use `@ObservedV2` + `@Trace` |
|
|
166
|
+
| **`AppStorageV2.connect(T, key)` / `PersistenceV2.connect(T, key)` without the third argument** | **Crash on first entry to the page**: `BusinessError: The default creator should be function when first connect`; a cold-start-only smoke test never sees it | Always `connect(T, key, () => new T())!`; omit it only after `keys().includes(key)` confirmed the key exists. GATE `appstoragev2-connect-creator` |
|
|
167
|
+
| **Each module copies a same-named connector class and connects the same key** (a feature HAR cannot import the entry HAP, so every module copies `PrimaryColorSlot`) | "Connecting different types to one key makes the app fail": same-named classes in different files are different types; leaving the key uncreated in the entry to dodge that makes the first connect without a creator crash | Write the class and its connect with a creator once, in a shared HAR (`common/*`), and import it from every module. GATE `appstoragev2-connect-creator` (cross-file shape) |
|
|
168
|
+
| **`new CustomDialogController({ builder: X() })` in a `@ComponentV2` page, or X is `@ComponentV2`** | **Crash when the dialog opens**: `class constructor … cannot be invoked without 'new'`. CustomDialog reference: the controller is valid only in `@Component` / `@CustomDialog` members, and the builder must be `@CustomDialog` | In a V2 page use `this.getUIContext().getPromptAction().openCustomDialog(new ComponentContent(uiContext, wrapBuilder(fn), params), options)` and close with `closeCustomDialog(content)`. GATE `dialog-controller-v2-builder` |
|
|
169
|
+
| **`Child({ slot: this.SomeBuilder })` passes a `@Builder` method reference whose body reads `this.`** | **Runtime crash** `xxx is not callable, xxx is undefined`, or the child's field of the same name is read (FAQ "Error message: undefined is not callable when calling this in BuilderParam") | `slot: () => { this.SomeBuilder() }`, or declare it `@LocalBuilder`. Built-in component parameters (`Refresh` builder, `bindSheet`) are not affected. GATE `builder-param-bare-method-ref` |
|
|
170
|
+
| **`Child({ slot: () => { Comp({…}) } })` writes a component directly in the arrow body** | **Crashes when the slot renders** `class constructor cannot called without 'new'`: only @Builder bodies are UI-compiled, the arrow body is kept as is and `Comp({…})` becomes a plain call of the component class; it compiles and cold start does not trigger it | Put the component in a `@Builder X()` of this component (`@LocalBuilder` when it reads parent state) and pass `slot: () => { this.X() }`. GATE `builder-param-arrow-inline-component` |
|
|
171
|
+
| **`TextInput` bound one way with `text: this.x`, `onChange` writes back only inside an `if`** (Compose "assign after filtering" translated as "assign only if it changed") | The field shows what was typed while the state keeps its old value: enabled checks and submits that read it never pass ("Complete verification" does nothing) | Write the filtered value unconditionally `const f = filter(v); this.x = f;`, or `$$this.x` / `!!` + `inputFilter`. GATE `controlled-input-conditional-writeback` |
|
|
141
172
|
| V1 decorators such as `@State`/`@Link` inside a `@ComponentV2` | Compile error or abnormal behavior | Use a single paradigm throughout; see the iron rule at the top |
|
|
142
173
|
| **(V1) An `@Observed` class uses `@Track`, but the UI reads a member not decorated with `@Track`** | **Runtime crash on the first frame**: `BusinessError 140110: Illegal usage of not @Track'ed property 'x' on UI!` | `@Track` is **all-or-nothing**: once any `@Track` appears in a class, every member the UI reads must be a `@Track` field (basis: `v1-track` §Overview, §Constraints) |
|
|
143
174
|
| **(V1) Exposing a derived value to the UI with `get x()`** | Same as above, crash on the first frame. **It compiles, produces zero warnings and passes every field-side completeness check**: a getter is not a data property and cannot be decorated with `@Track` | **V1 has no `@Computed`** (that is a V2 capability). Turn the derived value into a **plain method** (`title(): string`, called as `vm.title()` in the UI; prototype methods do not go through the `@Track` proxy), or promote it to a real `@Track` field. Note that "the getter is re-evaluated" only shows that **reactivity** works, **not that it is legal** |
|
|
@@ -4,7 +4,7 @@ Full procedure for Step 3 (3.1–3.3) of [SKILL.md](../SKILL.md). SKILL.md carri
|
|
|
4
4
|
|
|
5
5
|
### Step 3.1 — Static UTG Skeleton (both modes, whole app)
|
|
6
6
|
|
|
7
|
-
The capture skeleton always ends up in `${harmony_project_dir}/.hometrans/utg_static`. Step 3.2 reads that path and no other. A resume that already has `stages.capture.done` skips Step 3 entirely and does not copy.
|
|
7
|
+
The capture skeleton always ends up in `${harmony_project_dir}/.hometrans/utg_static`. Step 3.2 reads that path and no other. A resume that already has `stages.capture.done` skips Step 3 entirely and does not copy. A resume whose capture already started (`.hometrans/utg_explore/campaign.json` exists, `stages.capture.done` not yet set) skips Step 3.1 the same way (no copy, no `run_pipeline.mjs`, no reviewers) and continues Step 3.2 with `run_cycle.mjs` on that campaign: the campaign's tasks are keyed to the skeleton's node ids, so a rebuilt skeleton would orphan everything captured so far. `reuse_static_utg.mjs` exits 3 (`capture_in_progress`) and `run_pipeline.mjs` refuses without `--resume` in that state.
|
|
8
8
|
|
|
9
9
|
**Reuse a workspace the caller just built.** Only when `reuse_static_workspace` was passed. Read the device locale with `adb shell getprop persist.sys.locale` (same `<adb>` / `-s <ADB_SERIAL>` as Step 3.2). Then:
|
|
10
10
|
|
|
@@ -100,14 +100,15 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
100
100
|
```bash
|
|
101
101
|
node <this skill>/scripts/detach.mjs start ${harmony_project_dir} --name run_cycle -- \
|
|
102
102
|
node run_cycle.mjs $C --config $C/config.json --static $S/utg.json \
|
|
103
|
-
--project <android_project_dir> --package <app package>
|
|
103
|
+
--project <android_project_dir> --package <app package> --follow-min 60
|
|
104
104
|
```
|
|
105
|
+
`--follow-min 60`: when a pass stops only for unanswered review parts, the call keeps polling their answers files for up to 60 min and runs the next pass the moment they are all in, so the device does not sit idle until you start the cycle again. It does not end to tell you about the parts: `group_queue.mjs wait` returns `reviews` with `reviews_to_dispatch` (the answers files of `capture_pending.json` no reviewer is bound to) — dispatch and `review-bind` those.
|
|
105
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).
|
|
106
107
|
|
|
107
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:
|
|
108
109
|
- Do the "Convert while exploring" checks (item 5 below).
|
|
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.
|
|
110
|
-
- When the parts of every `blocked_on` worklist are complete (`answers_check.mjs`), 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.
|
|
111
|
+
- 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.
|
|
111
112
|
- 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.
|
|
112
113
|
- 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.
|
|
113
114
|
- `failed_phases` lists device phases that failed after round 1 (e.g. a budget error). Each was recorded and skipped, and the rest of its stage ran. Report them in Step 7; never re-run them by hand. Every apply and phase is checkpointed, so a re-run after a crash never re-applies one.
|
|
@@ -164,7 +165,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
164
165
|
node <this skill>/scripts/detach.mjs stop ${harmony_project_dir} --name fixture_server
|
|
165
166
|
node d_prereqs.mjs release --config $C/config.json
|
|
166
167
|
```
|
|
167
|
-
`stop` is a no-op when the server was never started. `release` removes the `adb reverse` (no-op for an emulator); it is needed because a forced stop on Windows skips the server's own cleanup. A re-run of Step 3.2 starts the server again the same way and keeps its port.
|
|
168
|
+
Step 7 runs the same two commands on every exit path (finished or not), so the server never outlives the campaign. On an early exit it first runs `detach.mjs stop … --name run_cycle`: a cycle still running when the server goes away would fail every recovery D recipe against the closed URL. `stop` is a no-op when the server was never started. `release` removes the `adb reverse` (no-op for an emulator); it is needed because a forced stop on Windows skips the server's own cleanup. A re-run of Step 3.2 starts the server again the same way and keeps its port.
|
|
168
169
|
|
|
169
170
|
**Export layout** (`export_ui_info.mjs`):
|
|
170
171
|
- **Per page.** One `page_NNNN_<Name>/` per *verified* static node and screen state, with `screenshot.png`, `view.xml`, `meta.json`.
|
|
@@ -172,7 +173,8 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
172
173
|
- Other captures of the same state (re-visits, retries, non-sweep swipes) are **not exported**. Their observation ids are in `meta.source.unexported_viewport_ids` (artifacts under `<campaign>/artifacts/<id>/`). There are no `*_vpN` files. The primary is a loaded, unblocked capture when the state has one; only when a sweep origin (which must stay `view.xml`) is still loading or FLAG_SECURE is one loaded capture of the same state exported as `view_loaded.xml` / `screenshot_loaded.png`, listed last.
|
|
173
174
|
- **Top level.** Also writes `pages.json` (click-path order), `deferred_human.json` and `export_manifest.json`.
|
|
174
175
|
- **Not exported as pages.** Unmapped `dynamic:*` observations and container kinds (`host-activity`, …) appear only in the manifest. Captures whose view tree belongs to another package are listed under `foreign_tree_captures`.
|
|
175
|
-
- **`meta.scroll_completeness`.** `complete` means the page end was proven. `truncated`, `aborted`, `unreached`, `no-container` and `
|
|
176
|
+
- **`meta.scroll_completeness`.** `complete` means the page end was proven **after at least one effective swipe** (`scroll_frames > 0`). `not-scrollable` means a probe proved the content does not overflow (`scroll_probe.overflow == false`); no frame is expected. `truncated`, `aborted`, `unreached`, `no-container`, `not-swept` and `no-effect` mean the frames stop short (or never moved), and the rest comes from the Android layout source. A `complete` with 0 frames is a **false complete** — `capture_audit.mjs` rejects it. `meta.scroll.unswept_containers` lists nested vertical scrollers that were not swept.
|
|
177
|
+
- **`meta.scroll_probe`.** `{overflow, scroll_height, client_height, tag, cls, id}` written by `capture_fast.mjs`. It is the only way to distinguish a page that truly fits its viewport from a scroller that refused to move.
|
|
176
178
|
- **`meta.json.device_info`.** Comes from the per-session `wm density` / `wm size`. For campaigns listed in `missing_device_info`, run `measure_pack.ts --density <wm density ÷ 160>`.
|
|
177
179
|
|
|
178
180
|
**Record for the report:**
|
|
@@ -181,6 +183,20 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
181
183
|
- `export_manifest.json` counts: pages, skipped, dynamic-only, foreign-tree drops, missing device_info;
|
|
182
184
|
- the contents of `deferred_human.json`, which goes to Step 7;
|
|
183
185
|
- `conversion_set.json`'s `summary`: captured / source-only / attached / skipped.
|
|
186
|
+
### Step 3.2-F — Fast hybrid capture (`capture_fast.mjs`)
|
|
187
|
+
|
|
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 (measured app_uni 2026-11-20: 2 h for 34/149 pages). It is a **compliant** replacement, not a shortcut:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
node <this skill>/scripts/capture_fast.mjs <ui_info_root> --source <android_project_dir> \
|
|
192
|
+
--serial <adb serial> --package <pkg> [--launch-component <pkg>/<activity>] \
|
|
193
|
+
[--only <page_id|route>] [--limit N] [--resume] [--force] [--dry-run]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
For each page it jumps the route, waits until the accessibility tree is stable, probes `document.scrollingElement` / every overflow element through CDP, records `scroll_probe`, scrolls the **largest real vertical scroller** and writes `screenshot_scroll_N.png` + `view_scroll_N.xml` until the bottom or the cap, then runs `capture_verify` and merges `pages.json` / `export_manifest.json` (never shrinks them). A page whose content fits gets `scroll_completeness: not-scrollable` with 0 frames and `scroll_probe.overflow: false`; a page that never moves gets `no-effect` (degraded, not a false `complete`). A probe that fails (no devtools target answers, an in-page exception) proves nothing: the page gets `not-swept` and `scroll_probe: {overflow: null, failed: true}`, never `not-scrollable`. A re-capture overwrites the page's frames and, right before rewriting `meta.json`, deletes old `screenshot_scroll_N.*` / `view_scroll_N.xml` numbered above the new frame count; a capture that fails mid-sweep keeps the old frames its old meta lists. `--resume` skips only a page whose recorded result is `complete` or `not-scrollable`; `truncated` / `no-effect` / `not-swept` pages are captured again. Without `--appid` and a `manifest.json` appid, the static node ids use a fallback appid and the script warns.
|
|
197
|
+
|
|
198
|
+
`--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
|
+
|
|
184
200
|
### Step 3.2-I — Scoped capture (incremental mode's I5)
|
|
185
201
|
|
|
186
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.
|
|
@@ -208,7 +224,7 @@ Directory names depend on the capture path:
|
|
|
208
224
|
- `page_NNNN_*/` comes from the explorer export (captured) or the builder (source-only).
|
|
209
225
|
- `activity_*/`, `route_*/`, `overlay_*/`, `mode_*/`, `dyn_*/` are older captures by other tools; they are read only through the Step 4 Glob fallback.
|
|
210
226
|
|
|
211
|
-
**Coverage gate.** A small capture does not mean a small conversion, but project tokens (density, theme colours, spacing, framework-control looks) only come from measured pages.
|
|
227
|
+
**Coverage gate.** A small capture does not mean a small conversion, but project tokens (density, theme colours, spacing, framework-control looks) only come from measured pages. **Coverage is not enough: run `scripts/capture_audit.mjs <ui_info_root> --source <android_project_dir> --json <ui_info_root>/capture_audit.json` and require exit 0 before Step 4.** It turns the directory contract into a machine check (paired screenshots, non-blank pixels, `pages.json` completeness, and a scroll verdict for every scrolling page); `build_conversion_set.mjs` carries a fake completion (`complete` with 0 frames, or a scroll container with no verdict) as `scroll_gap` onto the group, so `group_queue.mjs` will not lease it; an honest partial sweep (`truncated`, `not-swept`, `no-effect`, `aborted`, `unreached`) is `scroll_degraded`: it converts with the SINGLE VIEWPORT warning and the below-fold part comes from source. The rule is `scripts/scroll_verdict.mjs`, the same in the audit, the build and the prompt. A queue state written before this gate (no `scroll_gate` field) does not hold at all.
|
|
212
228
|
- `pages_captured == 0`: stop and report. Fix capture (device, fixtures) first. Incremental mode with no device, or after the user chose not to capture, proceeds source-only instead and says so in Step 7.
|
|
213
229
|
- Otherwise, report `captured / source-only / attached / skipped` before Step 5. When source-only outnumbers captured, name the blocked phases in `deferred_human.json` whose fixture would move the most core pages to `captured`; the user may supply it first.
|
|
214
230
|
- **Reached but not recognised is not done.** Read the explorer `report.md` phases and uncovered list before accepting the coverage. A `recD-*` phase blocked `state-probe-failed` or a core page listed `target-unverified` means the device got there and identity or the probe failed, not that the state is unreachable; nothing about it lands in `deferred_human.json`. `run_cycle.mjs` offers each probe failure back once as a `probe-revision` item: answer it from the screen's `visible_texts`. A page still `target-unverified` after that gets a `page_rules` entry (`family` = its static node id, anchors present in the captured tree AND cited from source) in `config.json`, then one more `run_cycle.mjs` call. Otherwise the page converts source-only even though the device reached it.
|
|
@@ -38,9 +38,12 @@ Index pages by Activity name. Each Activity's `BASE_UI_INFO` is its first snapsh
|
|
|
38
38
|
| `class` / `lane` | `host-chain` / `entry` (writes or mounts onto the entry page, or shares a predicted write with an entry group: the queue serialises equal lane names only), `serial` / `lane-Gxxx` (shares another predicted write, no entry group in its lane), `self-contained` / `null` |
|
|
39
39
|
| `verify_only` | every predicted write is owned by an earlier group of its lane (e.g. a source-only `MainActivity` whose `pages/MainPage.ets` the `MainFragment` group writes). It converts nothing; its prompt asks for a host-shell check (entry registration, routes, window layer, leftover scaffold) and a `## REPORT <GID>`, which `group_queue.mjs` accepts as its deliverable. It is still leased and dispatched: `Q verified` refuses a group that is not `returned`. One class mounted as several destinations (`view-page:X#courses` / `view-page:X#query`) is not this case: each anchor predicts its own `pages/X<Instance>Page.ets` and converts |
|
|
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
|
+
| `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 |
|
|
41
42
|
| `stage` | 0 = entry group; 1 = groups with any capture; 2 = source-only |
|
|
42
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
44
|
| `reuse_from` | families this group reuses read-only, and from which group |
|
|
45
|
+
| `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
|
+
| `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 |
|
|
44
47
|
| `warning` | more than 8 members — review |
|
|
45
48
|
|
|
46
49
|
How members are assigned:
|
|
@@ -20,16 +20,18 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
|
|
|
20
20
|
10. The Step 4.4 facts: `Project Fact (...)` 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`. Two groups writing one dialog in parallel is how CoolMall got two captcha dialogs, one fixed and one not.
|
|
23
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 tier", which then applies to that node only; "the data layer is not converted yet" is never a reason to degrade it).
|
|
24
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).
|
|
25
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.
|
|
26
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 `Project Fact (Shell Contract)`:
|
|
27
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.
|
|
28
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`). Without this, the first group that needs the colour has no state to read and falls back to the static resource; CoolMall's tab pages did, and three theme stores appeared.
|
|
29
31
|
|
|
30
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: "This is a source-only page: there is no screenshot and no view tree (the capture stage did not reach it; see deferred_human for why). Follow conversion-procedure.md §"Source-only Tier", and do not claim or fabricate any pixel-measured value." The tier always comes from `meta.json`, never from the agent's own Glob.
|
|
31
33
|
|
|
32
|
-
### Step 5.2 — Sub-agent contract (include items 1–6 in every prompt; item 7 comes with `lease`'s message)
|
|
34
|
+
### Step 5.2 — Sub-agent contract (include items 1–6 and 8 in every prompt; item 7 comes with `lease`'s message, which also repeats item 8)
|
|
33
35
|
|
|
34
36
|
1. **Write each file to disk the moment it is complete.** Never batch writes to the end.
|
|
35
37
|
2. **Never write scratch, probe or temp files under `${harmony_project_dir}/${ui_module}/src/main/resources/`.** The resource compiler expects only qualifier subdirectories; a stray file fails the whole build with `Error 11211101: Failed to scan resources: invalid path ..., not a directory`.
|
|
@@ -52,6 +54,14 @@ Every prompt instructs the agent to **load and follow `./references/conversion-p
|
|
|
52
54
|
- 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`.
|
|
53
55
|
- **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).
|
|
54
56
|
|
|
57
|
+
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
|
+
- **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
|
+
- **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`).
|
|
61
|
+
- **Defaults equal the source's defaults** (padding, colors, maxLines, showDivider …), each written with its `file:line`.
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
55
65
|
Non-entry prompts also carry the Step 4.4 shell rules. Self-contained prompts carry Scheduling rule 3. Every prompt also forbids running `git` (the parent commits each group, Step 5.4) and dispatching sub-agents (Step 0.1 item 5).
|
|
56
66
|
### Step 5.3 — Scheduling: serialize on the actual conflict surface
|
|
57
67
|
|
|
@@ -128,7 +138,7 @@ Only true dependencies make a group wait (`after`, lane, `reuse_from`, `template
|
|
|
128
138
|
3. **Verify** every group in `summary.returned_unverified` (below). Then update `batch_progress.json`, run `Q verified … --group <GID>` (only a `returned` group: never mark a group done in `batch_progress.json` by hand to close it), and, when `harmony_project_dir` is in a git work tree, `node <this skill>/scripts/group_commit.mjs ${harmony_project_dir} --group <GID>`. The commit takes only the files that group changed and holds other unsettled groups' predicted writes; a file shared by several groups goes to the first one committed.
|
|
129
139
|
- `missing` non-empty: `Q requeue … --group <GID> --resume --message "<missing files; written files are read-only context>"`.
|
|
130
140
|
- Verification failed: `Q requeue … --group <GID> --message "<what to fix>"`. If the group's bound session had stalled, this resumes that session automatically. Use `--fresh` only after that session's completion notice has arrived.
|
|
131
|
-
4. **Capture track** (Step 3.2) work, if any. Then `Q wait ${harmony_project_dir} [--job run_cycle]` (bound reviewers are followed; `--answers` only for unbound files). It returns within seconds of a report, a silent unit, an ended job, or
|
|
141
|
+
4. **Capture track** (Step 3.2) work, if any. Then `Q wait ${harmony_project_dir} [--job run_cycle]` (bound reviewers are followed; `--answers` only for unbound files). It returns within seconds of a report, a silent unit, an ended job, complete answers, or an evidence-intake ack that now covers every file (`reasons: ["intake"]`, `intake_acked: [GID…]` — release those groups). It also returns when a free slot has a ready or backfill unit. Otherwise it returns after 9 min. Give the shell call a timeout above that (e.g. 600000 ms). Never sleep in a loop instead.
|
|
132
142
|
4. **What `release` decides** (no user involved):
|
|
133
143
|
- 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;
|
|
134
144
|
- 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.
|
|
@@ -161,7 +171,7 @@ Parent-side re-verification checks the sub-agent's claims independently of its n
|
|
|
161
171
|
|
|
162
172
|
| Check | How |
|
|
163
173
|
|---|---|
|
|
164
|
-
| 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. 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 |
|
|
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 |
|
|
165
175
|
| 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.
|
|
166
176
|
| Claimed output files exist and are complete | file exists, non-trivial length, no truncated tail |
|
|
167
177
|
| Cited `file:line` really contains the claimed fact | read that exact line; never accept a citation on faith |
|
|
@@ -180,6 +190,8 @@ When a full build shows an ArkTS error of the form "Property X does not exist on
|
|
|
180
190
|
|
|
181
191
|
Never add an entry you cannot confirm in the `.d.ts`: GATE must stay free of false positives.
|
|
182
192
|
|
|
193
|
+
**Supplement groups** (incremental feature scope: the group carries `supplement` — SUP / CHG pages that already exist). The pack's "Supplement only" section is the whole job: the sub-agent adds exactly those items to the existing file (resources, texts, controls; for CHG the changed behavior) and touches nothing else — no reformatting, reordering, renaming or restyling of what is there, no backup-and-overwrite. Verifying such a return: the diff of each written file contains only additions / edits for the listed items (anything else is a rejection with the line), each listed item is present (`page_gap.mjs` on the file no longer lists it), and the visual comparison is judged on the supplemented region only — the rest of the page was not converted this round and is not graded against the capture.
|
|
194
|
+
|
|
183
195
|
### Step 5.5 — Wiring (after all groups return, before Step 6, in one background sub-agent)
|
|
184
196
|
|
|
185
197
|
The parent dispatches this section as one background sub-agent (SKILL.md Step 0.1), the way Step 2 is dispatched. The prompt file `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` carries this section verbatim plus its inputs: `harmony_project_dir`, `android_project_dir`, `ui_info_root`, `ALL_MODULES`, `PARADIGM`, the paths of `conversion_set.json`, `shell_contract.json` and every group report (their `registry_requests` and `shell requests`). It forbids `git` and dispatching sub-agents. The agent writes `${harmony_project_dir}/.hometrans/work/wiring.report.md` with every file it edited, every request applied or rejected as a conflict, and every `TODO` route left with its `skip` reason, one line each (a table per kind). A defect it found and fixed gets its cause, evidence `file:line` and fix in a few lines, not a narrative (a long report costs a long turn). Every group has been released by now, so Scheduling rule 7 no longer reserves the registry surface for the parent and the agent edits it directly. "The parent" in the rest of this section means this agent. After the join, the parent re-runs the gate at the end of this section on every file `git status --porcelain` shows as modified or untracked (not only the files the report lists), then commits.
|
|
@@ -205,6 +217,16 @@ Then wire navigation to real pages:
|
|
|
205
217
|
- every edge whose target is a converted page gets a real `router.pushUrl` or component toggle;
|
|
206
218
|
- register each target in `main_pages.json`.
|
|
207
219
|
|
|
208
|
-
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. 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.
|
|
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. Example: G003 asked for a runtime theme colour, the row was ticked by another group's store merge, and four tab pages kept the static colour. 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
|
+
|
|
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>`. Example: G029 had fixed the captcha decode in its copy, G033's copy still passed a Uint8Array, and this step kept G033's copy whole because it was "calibrated to capture" and deleted the fix.
|
|
223
|
+
|
|
224
|
+
**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
|
+
- every write of the theme mode (settings page, startup read) reaches `getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK / _LIGHT / _NOT_SET)`;
|
|
226
|
+
- the entry ability reads the stored mode on launch and applies it again (`setColorMode` is not persisted);
|
|
227
|
+
- every runtime slot in `theme.runtime_slots` is read from `theme.state_module` on every page that shows it.
|
|
228
|
+
A choice that only lives in this agent's reasoning ("dark mode is handled by resource qualifiers") is not a decision: GATE `theme-mode-closure` fires when a mode is stored and nothing calls `setColorMode`.
|
|
229
|
+
|
|
230
|
+
**Global state contract.** For every `AppStorageV2` / `PersistenceV2` key shared across modules, write one row in the report: `key | class | owning module | connect sites`. The class and its connect (with a default creator) live once, in a shared HAR under `common/*` that every user imports. A feature module does not declare its own copy of the class to avoid importing the entry HAP: a same-named class in another file is a different type for the same key, and leaving the key uncreated to dodge that makes the first connect without a creator crash. GATE `appstoragev2-connect-creator` covers both shapes.
|
|
209
231
|
|
|
210
232
|
**Gate:** run `scripts/arkts_static_check.ts` (Step 6.1 command). `orphan-component` must be **zero** before Step 6. An exported struct that no file imports or instantiates can never render: every file is legal and the build is green, but every trigger is dead. Also, **every GATE in a file this step edited must be zero**. Wiring is new code that no group's Phase 5 ever saw.
|