@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
|
@@ -5,15 +5,20 @@ import os from "node:os";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
+
ALLOWED_CATALOGS,
|
|
8
9
|
DOCS,
|
|
10
|
+
DOCS_API,
|
|
9
11
|
RETRY_DELAYS_MS,
|
|
10
12
|
_impl,
|
|
11
13
|
_reset,
|
|
12
14
|
cleanOutput,
|
|
15
|
+
isAllowedDocId,
|
|
13
16
|
list2cmdline,
|
|
14
17
|
main,
|
|
15
18
|
matchEntry,
|
|
16
19
|
parseSearch,
|
|
20
|
+
searchDocs,
|
|
21
|
+
sliceDoc,
|
|
17
22
|
} from "../scripts/state_doc.mjs";
|
|
18
23
|
|
|
19
24
|
const realRun = _impl.run;
|
|
@@ -70,6 +75,18 @@ test("matchEntry can never return a page from the other paradigm", () => {
|
|
|
70
75
|
assert.equal(matchEntry(v1, both).documentId, 'x/状态管理_V1/y/arkts-track');
|
|
71
76
|
});
|
|
72
77
|
|
|
78
|
+
// mihon-more-tab round 1 (devecocli 1.3.12): the V1 → V2 chapter was renamed to 状态管理V1/V2迁移指导/
|
|
79
|
+
test("mix keys match the V1 → V2 chapter under its old and its new name", () => {
|
|
80
|
+
const old = { title: 'x', documentId: 'x/状态管理V1-V2迁移指导/V1-V2迁移概述/arkts-v1-v2-migration' };
|
|
81
|
+
const renamed = { title: 'x', documentId: 'x/状态管理V1/V2迁移指导/V1/V2迁移概述/arkts-v1-v2-migration' };
|
|
82
|
+
assert.equal(matchEntry(DOCS['mix-migration'], [old]).documentId, old.documentId);
|
|
83
|
+
assert.equal(matchEntry(DOCS['mix-migration'], [renamed]).documentId, renamed.documentId);
|
|
84
|
+
assert.equal(matchEntry(DOCS['mix-migration'], [{ title: 'x', documentId: 'x/其他/arkts-v1-v2-migration' }]), null);
|
|
85
|
+
// API keys carry no `under` and still match on the slug alone
|
|
86
|
+
const api = { title: 'x', documentId: 'harmonyos-references/a/b/js-apis-http' };
|
|
87
|
+
assert.equal(matchEntry(DOCS_API['api-http'], [api]).documentId, api.documentId);
|
|
88
|
+
});
|
|
89
|
+
|
|
73
90
|
test("matchEntry requires the key's under segment", () => {
|
|
74
91
|
const key = DOCS['v2-local'];
|
|
75
92
|
assert.equal(matchEntry(key, [{ documentId: 'x/状态管理_V1/y/arkts-new-local' }]), null);
|
|
@@ -350,3 +367,230 @@ test("the key table stays identical to the a2h-batch-ui-align copy", async (t) =
|
|
|
350
367
|
}
|
|
351
368
|
assert.deepEqual(DOCS, batch.DOCS);
|
|
352
369
|
});
|
|
370
|
+
|
|
371
|
+
// ---------------------------------------------------------------------------------------------------
|
|
372
|
+
// Platform API lookups: a second catalogue, a separate cache, and bounded reads.
|
|
373
|
+
// ---------------------------------------------------------------------------------------------------
|
|
374
|
+
|
|
375
|
+
const HTTP_ID = 'harmonyos-references/harmonyos-references/API参考/系统/网络/Network_Kit_网络服务/ArkTS_API/ohos_net_http_数据请求/js-apis-http';
|
|
376
|
+
|
|
377
|
+
test("api keys resolve from the references catalogue into their own cache", async () => {
|
|
378
|
+
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-'));
|
|
379
|
+
mockCli({
|
|
380
|
+
search: () => [{ documentId: HTTP_ID, title: '@ohos.net.http (数据请求)' }],
|
|
381
|
+
read: (id) => `BODY ${id}`,
|
|
382
|
+
});
|
|
383
|
+
const { io, out } = capture();
|
|
384
|
+
assert.equal(await main(['read', 'api-http', '--project', project], io), 0);
|
|
385
|
+
const text = out.join('\n');
|
|
386
|
+
assert.match(text, /state_doc key=api-http catalog=harmonyos-references/);
|
|
387
|
+
assert.match(text, /BODY harmonyos-references\/.*\/js-apis-http/);
|
|
388
|
+
|
|
389
|
+
const apiCache = JSON.parse(fs.readFileSync(path.join(project, '.hometrans', 'work', 'api_docs.json'), 'utf8'));
|
|
390
|
+
assert.equal(apiCache.ids['api-http'], HTTP_ID);
|
|
391
|
+
assert.equal(
|
|
392
|
+
fs.existsSync(path.join(project, '.hometrans', 'work', 'state_docs.json')),
|
|
393
|
+
false,
|
|
394
|
+
'an API lookup must not touch the state-management cache',
|
|
395
|
+
);
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
test("api slugs match regardless of the case the catalogue publishes", () => {
|
|
399
|
+
// devecocli lowercases the ID tail for several references pages.
|
|
400
|
+
const entry = DOCS_API['api-rdb'];
|
|
401
|
+
assert.ok(matchEntry(entry, [{ documentId: 'refs/ArkData/ohos_data_relationalStore/js-apis-data-relationalStore' }]));
|
|
402
|
+
assert.equal(matchEntry(entry, [{ documentId: 'refs/ArkData/js-apis-data-preferences' }]), null);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
test("list --api prints every api key with its catalogue", async () => {
|
|
406
|
+
const { io, out } = capture();
|
|
407
|
+
assert.equal(await main(['list', '--api'], io), 0);
|
|
408
|
+
assert.equal(out.length, Object.keys(DOCS_API).length);
|
|
409
|
+
assert.ok(out.every((line) => line.split('\t')[1] === 'harmonyos-references'));
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
test("search returns capped compact hits from an allowed catalogue only", async () => {
|
|
413
|
+
mockCli({
|
|
414
|
+
search: () => [
|
|
415
|
+
{ documentId: 'refs/a/js-apis-http', title: 'A', sectionTitle: 'request', snippet: `device: phone\n${'x'.repeat(400)}` },
|
|
416
|
+
{ documentId: 'refs/b/js-apis-http', title: 'B' },
|
|
417
|
+
{ documentId: 'refs/c/js-apis-http', title: 'C' },
|
|
418
|
+
],
|
|
419
|
+
});
|
|
420
|
+
const { io, out, err } = capture();
|
|
421
|
+
assert.equal(await main(['search', '@ohos.net.http', '--limit', '2'], io), 0);
|
|
422
|
+
const report = JSON.parse(out.join('\n'));
|
|
423
|
+
assert.equal(report.catalog, 'harmonyos-references');
|
|
424
|
+
assert.equal(report.hits.length, 2);
|
|
425
|
+
assert.equal(report.hits[0].section, 'request');
|
|
426
|
+
assert.ok(report.hits[0].snippet.length <= 200);
|
|
427
|
+
assert.match(report.hits[0].snippet, /\.\.\.$/);
|
|
428
|
+
|
|
429
|
+
await assert.rejects(() => searchDocs('x', { catalog: 'harmonyos-faqs' }), /catalog not allowed/);
|
|
430
|
+
const { io: io2, err: err2 } = capture();
|
|
431
|
+
assert.equal(await main(['search', 'x', '--catalog', 'harmonyos-faqs'], io2), 2);
|
|
432
|
+
assert.match(err2.join('\n'), /--catalog must be one of/);
|
|
433
|
+
assert.equal(err.length, 0);
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
test("--limit reaches devecocli instead of being clamped to ten", async () => {
|
|
437
|
+
const seen = [];
|
|
438
|
+
_impl.which = () => 'devecocli';
|
|
439
|
+
_impl.sleep = async () => {};
|
|
440
|
+
_impl.run = async (_exe, args) => {
|
|
441
|
+
seen.push(args);
|
|
442
|
+
return { status: 0, stdout: JSON.stringify([{ documentId: 'refs/x/js-apis-http' }]), stderr: '' };
|
|
443
|
+
};
|
|
444
|
+
const { io, out } = capture();
|
|
445
|
+
assert.equal(await main(['search', '@ohos.net.http', '--limit', '20'], io), 0);
|
|
446
|
+
assert.deepEqual(seen.at(-1).slice(-2), ['--limit', '20']);
|
|
447
|
+
assert.equal(JSON.parse(out.join('\n')).hits.length, 1);
|
|
448
|
+
|
|
449
|
+
const bad = capture();
|
|
450
|
+
assert.equal(await main(['search', '@ohos.net.http', '--limit', '21'], bad.io), 2);
|
|
451
|
+
assert.match(bad.err.join('\n'), /--limit must be an integer 1\.\.20/);
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
test("--occurrence needs a positive integer", async () => {
|
|
455
|
+
const { io, err } = capture();
|
|
456
|
+
assert.equal(await main(['read-id', HTTP_ID, '--section', 'request', '--occurrence', '0'], io), 2);
|
|
457
|
+
assert.match(err.join('\n'), /--occurrence must be an integer >= 1/);
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
test("read-id refuses a document id outside the allowed catalogues", async () => { let called = false;
|
|
461
|
+
_impl.which = () => { called = true; return 'devecocli'; };
|
|
462
|
+
_impl.run = async () => { called = true; return { status: 0, stdout: '', stderr: '' }; };
|
|
463
|
+
assert.equal(isAllowedDocId(HTTP_ID), true);
|
|
464
|
+
assert.equal(isAllowedDocId('harmonyos-faqs/x/y'), false);
|
|
465
|
+
assert.deepEqual(ALLOWED_CATALOGS, ['harmonyos-guides', 'harmonyos-references']);
|
|
466
|
+
const { io, err } = capture();
|
|
467
|
+
assert.equal(await main(['read-id', 'harmonyos-faqs/x/y'], io), 1);
|
|
468
|
+
assert.equal(called, false);
|
|
469
|
+
assert.match(err.join('\n'), /documentId must start with one of/);
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
test("read-id prints only the requested section", async () => {
|
|
473
|
+
const body = [
|
|
474
|
+
'# @ohos.net.http (数据请求)',
|
|
475
|
+
'intro',
|
|
476
|
+
'## 导入模块',
|
|
477
|
+
"import { http } from '@kit.NetworkKit';",
|
|
478
|
+
'## createHttp',
|
|
479
|
+
'createHttp(): HttpRequest',
|
|
480
|
+
'## HttpRequest',
|
|
481
|
+
'class HttpRequest {',
|
|
482
|
+
].join('\n');
|
|
483
|
+
mockCli({ read: () => body });
|
|
484
|
+
const { io, out } = capture();
|
|
485
|
+
assert.equal(await main(['read-id', HTTP_ID, '--section', 'createHttp', '--max-lines', '0'], io), 0);
|
|
486
|
+
const text = out.join('\n');
|
|
487
|
+
assert.match(text, /createHttp\(\): HttpRequest/);
|
|
488
|
+
assert.doesNotMatch(text, /## HttpRequest/);
|
|
489
|
+
assert.doesNotMatch(text, /import \{ http \}/);
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
test("sliceDoc truncates a long page and says how to narrow it", () => {
|
|
493
|
+
const page = ['# A', ...Array.from({ length: 50 }, (_, i) => `line ${i}`)].join('\n');
|
|
494
|
+
const out = sliceDoc(page, { maxLines: 5 });
|
|
495
|
+
assert.equal(out.split('\n').length, 6);
|
|
496
|
+
assert.match(out, /truncated at 5 lines; re-run with --section/);
|
|
497
|
+
assert.equal(sliceDoc(page, { maxLines: 0 }), page);
|
|
498
|
+
assert.throws(() => sliceDoc(page, { section: 'nope' }), /section not found: nope; headings: A/);
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
test("sliceDoc returns every overload with the same heading, not just the first", () => {
|
|
502
|
+
const page = [
|
|
503
|
+
'# @ohos.net.http',
|
|
504
|
+
'## HttpRequest',
|
|
505
|
+
'### request',
|
|
506
|
+
'callback body',
|
|
507
|
+
'### request',
|
|
508
|
+
'options body',
|
|
509
|
+
'### request',
|
|
510
|
+
'promise body, the one a coder needs',
|
|
511
|
+
'### requestInStream',
|
|
512
|
+
'stream body so the last request cannot swallow it',
|
|
513
|
+
].join('\n');
|
|
514
|
+
const out = sliceDoc(page, { section: 'request', maxLines: 0 });
|
|
515
|
+
assert.match(out, /<!-- section "request" 1\/3 -->\n### request\ncallback body/);
|
|
516
|
+
assert.match(out, /<!-- section "request" 2\/3 -->\n### request\noptions body/);
|
|
517
|
+
assert.match(out, /<!-- section "request" 3\/3 -->\n### request\npromise body/);
|
|
518
|
+
assert.doesNotMatch(out, /stream body/, 'a same-level section still ends the last overload');
|
|
519
|
+
assert.doesNotMatch(out, /## HttpRequest/, 'the parent heading is not part of the section');
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
test("sliceDoc keeps an outer heading once when two levels share its title", () => {
|
|
523
|
+
const page = ['## request', '### request', 'inner body', '## tail', 'x'].join('\n');
|
|
524
|
+
const out = sliceDoc(page, { section: 'request', maxLines: 0 });
|
|
525
|
+
assert.equal(out, '## request\n### request\ninner body');
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
test("--occurrence selects one overload and rejects an out-of-range index", () => {
|
|
529
|
+
const page = ['## request', 'callback body', '## request', 'promise body'].join('\n');
|
|
530
|
+
const second = sliceDoc(page, { section: 'request', occurrence: 2, maxLines: 0 });
|
|
531
|
+
assert.match(second, /<!-- section "request" 2\/2 -->/);
|
|
532
|
+
assert.match(second, /promise body/);
|
|
533
|
+
assert.doesNotMatch(second, /callback body/);
|
|
534
|
+
assert.throws(
|
|
535
|
+
() => sliceDoc(page, { section: 'request', occurrence: 3 }),
|
|
536
|
+
/section request occurs 2 time\(s\); --occurrence must be an integer 1\.\.2/,
|
|
537
|
+
);
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
test("sliceDoc ignores heading-like lines inside fenced code blocks", () => {
|
|
541
|
+
const page = [
|
|
542
|
+
'## request',
|
|
543
|
+
'```ts',
|
|
544
|
+
'# this is a comment, not a heading',
|
|
545
|
+
'let x = 1;',
|
|
546
|
+
'```',
|
|
547
|
+
'after the fence',
|
|
548
|
+
'## next',
|
|
549
|
+
'other',
|
|
550
|
+
].join('\n');
|
|
551
|
+
const out = sliceDoc(page, { section: 'request', maxLines: 0 });
|
|
552
|
+
assert.match(out, /after the fence/);
|
|
553
|
+
assert.match(out, /# this is a comment/);
|
|
554
|
+
assert.doesNotMatch(out, /other/);
|
|
555
|
+
|
|
556
|
+
// A longer outer fence keeps a shorter inner one from closing it early.
|
|
557
|
+
const nested = ['## request', '````md', '```ts', '# still inside', '```', '````', 'tail', '## next', 'x'].join('\n');
|
|
558
|
+
const nestedOut = sliceDoc(nested, { section: 'request', maxLines: 0 });
|
|
559
|
+
assert.match(nestedOut, /tail/);
|
|
560
|
+
assert.doesNotMatch(nestedOut, /^x$/m);
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
test("sliceDoc keeps a single occurrence byte-identical to the old output", () => {
|
|
564
|
+
const page = ['# A', '## createHttp', 'createHttp(): HttpRequest', '## B', 'b'].join('\n');
|
|
565
|
+
assert.equal(sliceDoc(page, { section: 'createHttp', maxLines: 0 }), '## createHttp\ncreateHttp(): HttpRequest');
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
test("check --api proves the api table resolves and writes the api cache", async () => {
|
|
569
|
+
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'state-doc-'));
|
|
570
|
+
const byQuery = new Map();
|
|
571
|
+
for (const e of Object.values(DOCS_API)) {
|
|
572
|
+
const id = `harmonyos-references/x/${e.slug}`;
|
|
573
|
+
byQuery.set(e.query, id);
|
|
574
|
+
byQuery.set(e.slug, id);
|
|
575
|
+
}
|
|
576
|
+
mockCli({ search: (q) => (byQuery.has(q) ? [{ documentId: byQuery.get(q), title: q }] : []) });
|
|
577
|
+
const { io, out } = capture();
|
|
578
|
+
assert.equal(await main(['check', '--api', '--project', project], io), 0);
|
|
579
|
+
const report = JSON.parse(out.join('\n'));
|
|
580
|
+
assert.equal(report.ok, true);
|
|
581
|
+
assert.equal(report.catalog, 'harmonyos-references');
|
|
582
|
+
assert.equal(report.cache, 'written');
|
|
583
|
+
const apiCache = JSON.parse(fs.readFileSync(path.join(project, '.hometrans', 'work', 'api_docs.json'), 'utf8'));
|
|
584
|
+
assert.equal(Object.keys(apiCache.ids).length, Object.keys(DOCS_API).length);
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
// N18: --max-lines caps each occurrence, so the third (Promise) overload is not cut off
|
|
588
|
+
test("sliceDoc caps each occurrence of a repeated section, not the joined result", () => {
|
|
589
|
+
const block = (name, kind) => [`### ${name}`, `${kind} overload`, ...Array.from({ length: 50 }, (_, i) => `line ${i}`)].join("\n");
|
|
590
|
+
const page = ["# http", block("request", "callback"), block("request", "options callback"), block("request", "Promise")].join("\n");
|
|
591
|
+
const out = sliceDoc(page, { section: "request", maxLines: 20 });
|
|
592
|
+
assert.match(out, /section "request" 3\/3/);
|
|
593
|
+
assert.match(out, /Promise overload/);
|
|
594
|
+
assert.match(out, /occurrence 3\/3 truncated at 20 lines; read it whole with --section "request" --occurrence 3 --max-lines 0/);
|
|
595
|
+
assert.doesNotMatch(out, /re-run with --section/);
|
|
596
|
+
});
|
|
@@ -42,7 +42,7 @@ Full batch mode also needs (incremental mode: the device is optional; without on
|
|
|
42
42
|
| One online device/emulator | `adb devices` lists the serial you will pass (the explorer requires an explicit serial). If the caller passed `ADB_SERIAL` (and `ADB_PATH`), use that device and that adb | ask the user which device; do not pick one |
|
|
43
43
|
| `homegraph` | `homegraph --version` | Step 3.1 cannot index the source; ask the user |
|
|
44
44
|
|
|
45
|
-
Both modes also need **background sub-agents** and **pre-approved writes**. Run `node ./scripts/host_env.mjs check` and follow its `action`: `none` means go on; `enable` / `restart` (opencode v1, DevEco) means the user must restart the host session with the flag set, so stop until they do, or continue with blocking waves if they decline. The session must be allowed to edit under `harmony_project_dir` and run `node <this skill>/scripts/*`, `node <a2h-utg-*>/scripts/*` and `adb` without asking, because sub-agents inherit the parent's permissions. Host-by-host detail (version checks, `verify`, the flags): [references/host-dispatch.md](references/host-dispatch.md).
|
|
45
|
+
Both modes also need **background sub-agents** and **pre-approved writes**. Run `node ./scripts/host_env.mjs check` and follow its `action`: `none` means go on; `enable` / `restart` (opencode v1, DevEco) means the user must restart the host session with the flag set, so stop until they do, or continue with blocking waves if they decline (a caller that pre-answers, e.g. the migrate workflow in auto, means declined). The session must be allowed to edit under `harmony_project_dir` and run `node <this skill>/scripts/*`, `node <a2h-utg-*>/scripts/*` and `adb` without asking, because sub-agents inherit the parent's permissions. Host-by-host detail (version checks, `verify`, the flags): [references/host-dispatch.md](references/host-dispatch.md).
|
|
46
46
|
|
|
47
47
|
### Step 0.1 — How sub-agents are dispatched (every step)
|
|
48
48
|
|
|
@@ -55,7 +55,7 @@ Every sub-agent of this skill (Step 2 resources, Step 3 reviewers, Step 5 groups
|
|
|
55
55
|
5. **Sub-agents cannot dispatch sub-agents**; every prompt says so.
|
|
56
56
|
5a. **`image_read=false` (Step 1)**: every prompt opens with the `NO_IMAGE` block of `scripts/group_queue.mjs` (`lease` adds it to group messages; the parent adds it to the others), and the parent never opens an image either.
|
|
57
57
|
6. **Without background sub-agents** each `lease` is dispatched as one blocking wave; say so in Step 7.
|
|
58
|
-
7. **One parent per campaign.** A new session re-runs `group_queue.mjs init`, which keeps results. Before writing anything under `.hometrans/`, check that no other parent is still driving the campaign (`Q init` refuses with `another parent session may still be driving this campaign`); if one may be, ask the user: monitor only, or `init --takeover`. A monitoring session never calls `Q wait` / `lease` / `reap` / `refresh`.
|
|
58
|
+
7. **One parent per campaign.** A new session re-runs `group_queue.mjs init`, which keeps results. Before writing anything under `.hometrans/`, check that no other parent is still driving the campaign (`Q init` refuses with `another parent session may still be driving this campaign`); if one may be, ask the user: monitor only, or `init --takeover`. A monitoring session never calls `Q wait` / `lease` / `reap` / `refresh`. The previous parent's heartbeat (`.hometrans/queue_parent.json`, written by every queue command and each `wait` poll) settles a crash: when it is older than 10 min and no group or reviewer activity followed it, `init` resumes without `--takeover` and returns that parent's still-running background jobs as `adopt_jobs` (wait on them with `wait --job`; do not restart or kill them). A refusal that a crash could explain ends with `retry_after_s=N`: a session that cannot ask the user re-runs `init` after N s instead of giving up.
|
|
59
59
|
|
|
60
60
|
## Step 1 — Parse User Request
|
|
61
61
|
|
|
@@ -73,7 +73,8 @@ Extract from the user's message (natural language, no fixed format):
|
|
|
73
73
|
| `reuse_static_workspace` (optional) | A finished static-UTG workspace from this run's `discover.utg_static`. When set, Step 3.1 may copy it into `.hometrans/utg_static` and skip the pipeline. Omit it whenever that discover step did not run | — |
|
|
74
74
|
| `image_read` (optional) | `true` \| `false`: whether this host's sub-agents can read image files. a2h-app-migrate may probe at bootstrap for a tip only and **must not** pass the result here — when called from migrate, **probe again** (below). Standalone callers may pass it; **when not passed, probe it** before the first dispatch; never assume `true`, and never probe by opening an image in the parent | — |
|
|
75
75
|
| `MODE` | `full` \| `incremental`, per Mode Routing | existing Harmony version + a named page/module ⇒ `incremental` |
|
|
76
|
-
| `scope_request` | **Incremental only, required.** The user's own words for the range | "短视频播放页", "短视频模块所有缺失页面" |
|
|
76
|
+
| `scope_request` | **Incremental only, required unless `scope_file` is given.** The user's own words for the range | "短视频播放页", "短视频模块所有缺失页面" |
|
|
77
|
+
| `scope_file` | Incremental only. A `scope.json` already confirmed per feature (a2h-app-migrate `discover.feature_scope`); skips I1–I4 (`references/incremental-scope.md` "Confirmed scope") | `<harmony>/.hometrans/incremental/scope.json` |
|
|
77
78
|
|
|
78
79
|
If `android_project_dir`, `harmony_project_dir` or `apk_path` is missing, **ask the user**, and do not guess. In incremental mode, also ask if no page or module was named; do not fall back to converting everything. `ui_info_root` and `pages` have defaults, so never ask for them.
|
|
79
80
|
|
|
@@ -92,7 +93,7 @@ Then, once in the parent, resolve these and pass them to every later step and su
|
|
|
92
93
|
- **`ALL_MODULES`**: every module under `${harmony_project_dir}` with `src/main/ets` or `src/main/resources`.
|
|
93
94
|
- **`PARADIGM = V1 | V2`**: run `node ./scripts/detect_paradigm.mjs ${harmony_project_dir}` and use its `paradigm` field as-is (rule: `./references/state-mgmt/_范式选择说明.md`). Do not grep decorators by hand: the DevEco scaffold `pages/Index.ets` (`@Component` + `@State message`) is not evidence of an existing V1 project, and the script ignores it, so a freshly created project correctly defaults to V2. It is project-level, so sub-agents must not re-detect it.
|
|
94
95
|
- **References**: always skill-bundled, with no user override: mappings `./references/mappings/` and the state-management cheat sheet `./references/state-mgmt/_装饰器速查.md` (one file for both paradigms). They are loaded lazily. The official V1/V2 state-management docs are **not** bundled: a sub-agent reads one with `node ./scripts/state_doc.mjs read <key> --project ${harmony_project_dir}` (keys in the cheat sheet's 深读 columns, `list` prints them all), and only for what the cheat sheet doesn't cover. Prompts must never tell an agent to read a whole doc directory, and never to run `devecocli docs search` itself.
|
|
95
|
-
- **`STATE_DOCS`**: run `node ./scripts/state_doc.mjs check --project ${harmony_project_dir}` once (it resolves every key through `devecocli docs` and caches the IDs in `.hometrans/work/state_docs.json`). On exit 1 (meaning of each message: [references/host-dispatch.md](references/host-dispatch.md)), **stop and ask the user before Step 5**: fix it, or explicitly accept converting without the official docs. Only on that explicit acceptance, tell every prompt `STATE_DOCS=unavailable`; agents then use the cheat sheet alone, and the Step 7 report says so.
|
|
96
|
+
- **`STATE_DOCS`**: run `node ./scripts/state_doc.mjs check --project ${harmony_project_dir}` once (it resolves every key through `devecocli docs` and caches the IDs in `.hometrans/work/state_docs.json`). On exit 1 (meaning of each message: [references/host-dispatch.md](references/host-dispatch.md)), **stop and ask the user before Step 5**: fix it, or explicitly accept converting without the official docs (a caller's pre-answer counts as acceptance). Only on that explicit acceptance, tell every prompt `STATE_DOCS=unavailable`; agents then use the cheat sheet alone, and the Step 7 report says so.
|
|
96
97
|
|
|
97
98
|
## Step 2 — Resource Conversion
|
|
98
99
|
|
|
@@ -105,11 +106,13 @@ Run the `a2h-resource-convert` skill with:
|
|
|
105
106
|
|
|
106
107
|
It decodes the APK and converts strings, colors, drawables, images, Lottie and code-defined vector icons into `${harmony_project_dir}/${ui_module}/src/main/resources/`. It writes the mapping document and resolves `${app_module}` (Android application module) and `${ui_module}` (Harmony target module from `build-profile.json5`, e.g. `entry` or `products/phone`). Take both from its report for later steps.
|
|
107
108
|
|
|
108
|
-
**Full mode — run it as a background sub-agent (Step 0.1) and go on to Step 3.** Its outputs are not needed before Step 4.4, and a blocking sub-agent would hold the parent the whole time. Write the task above to `${harmony_project_dir}/.hometrans/work/prompts/resources.md` and dispatch one background sub-agent with: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/resources.report.md` and reply with one line `DONE resources`."
|
|
109
|
+
**Full mode — run it as a background sub-agent (Step 0.1) and go on to Step 3.** Its outputs are not needed before Step 4.4, and a blocking sub-agent would hold the parent the whole time. Write the task above to `${harmony_project_dir}/.hometrans/work/prompts/resources.md` and dispatch one background sub-agent with: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/resources.report.md` and reply with one line `DONE resources`." Then bind it so `wait` follows it: `Q review-bind ${harmony_project_dir} --name resources --kind skill-agent --answers <that report path>` (the 5.5 wiring and Step 6 verify agents likewise, with their report).
|
|
109
110
|
|
|
110
111
|
**Join before Step 4.4.** The join is the report file existing; an early host notice only means "check it now". While the file is missing and the agent still runs, do other work. If the agent ended without the file, resume it in its own session once (Step 0.1 item 4), and if that fails, run Step 2 blocking.
|
|
111
112
|
|
|
112
|
-
**Incremental mode — run it blocking, after I4's user confirmation.** Use that skill's incremental mode (`<a2h-resource-convert skill>/references/incremental-page-migration.md`) with the page source files from I1/I2 as `page_files
|
|
113
|
+
**Incremental mode — run it blocking, after I4's user confirmation.** Use that skill's incremental mode (`<a2h-resource-convert skill>/references/incremental-page-migration.md`) with the page source files from I1/I2 as `page_files` and `resource_mapping_path` = `${harmony_project_dir}/.hometrans/resource_mapping.md`, so its toolchain step 5 merges this scope's rows into the document Steps 4.3 and 4.4 read. It already handles reference closure, the already-migrated check, never auto-overwriting a same-name-different-value conflict, and merging element JSON; do not re-implement any of it here. It must finish before Step 4.3. Then check that the merge ran: `resource_mapping.md` exists and holds a Mapping Details row for a resource of the scope's pages (grep one name from the run's `converter_mapping.md`). If it does not, re-run that step 5 before Step 4.3, or Step 4.3 finds no Lottie section and the group packs resolve no `$r(...)` for this scope's resources.
|
|
114
|
+
|
|
115
|
+
**Incremental mode — record the static-check baseline before the first write.** The checker scans every module, so the user's own code can already fail a GATE (an orphaned component, a permission without `reason`). Before Step 2 writes anything into `harmony_project_dir`, first run Step 4.4's `shell_contract.mjs` command (`references/step4-prepare.md` "App shell"), then run the Step 6.1 command once with `--write-baseline ${harmony_project_dir}/.hometrans/work/static_baseline.<scope_id>.json` added (`scope_id` from `progress_identity.mjs resume`); it always exits 0. The contract comes first because the theme rules (`theme-color-literal`, `theme-sheet-background-default`, `theme-runtime-color-static`) read `.hometrans/shell_contract.json` and are skipped without it: a baseline recorded without the contract misses the user's pre-existing theme findings, and the first `phase5_check.mjs` then blocks on code this run never touched. Running it this early is safe: it writes only under `.hometrans/`, and its inputs are there (the static UTG is an I1 prerequisite; the theme and shell-host facts come from the Android source alone). Step 4.4 still runs it again, which fills in what only exists later (`conversion_set.json`'s `entry_node` / `launcher_host`, fonts Step 2 adds). Never re-record it later in the campaign, not even on resume: a baseline taken after a group wrote would excuse that group's defects. A new scope (another `scope_id`) records a fresh one under its own name; another scope's file is never read.
|
|
113
116
|
|
|
114
117
|
**Resource-fidelity gate (before Step 5, both modes).** If the report's **Vector Fidelity Issues** section has `error` rows, fix those resources first. A drawable with a dropped `clip-path`, or a stroke-only path given a solid `fill`, keeps its file name, so every page using it passes reference checks and compiles while rendering wrong. If no fresh report exists, run the checker directly (static, no device):
|
|
115
118
|
|
|
@@ -157,7 +160,7 @@ The parent drives `a2h-utg-explorer`'s `run_cycle.mjs` from its `scripts/` direc
|
|
|
157
160
|
```
|
|
158
161
|
|
|
159
162
|
**Convert while exploring.** Once Step 2's report exists: the first time run Step 4.4's `shell_contract.mjs`, Step 4.3 and `group_queue.mjs init`; every time, build packs and prompts for new groups and run one pass of the Step 5.4 loop before the next reviewer wave. When `finished` is true, run both commands once more without `--exploring`.
|
|
160
|
-
6. **Stop the fixture server** once `finished: true`, or when Step 3.2 is abandoned: `detach.mjs stop ${harmony_project_dir} --name fixture_server`, then `d_prereqs.mjs release --config $C/config.json`.
|
|
163
|
+
6. **Stop the fixture server** once `finished: true`, or when Step 3.2 is abandoned: `detach.mjs stop ${harmony_project_dir} --name fixture_server`, then `d_prereqs.mjs release --config $C/config.json`. Step 7 repeats this unconditionally (after stopping `run_cycle`), so a run that ends before `finished` does not leave it running.
|
|
161
164
|
|
|
162
165
|
Record for Step 7: coverage from `report.md`, phase states and `skipped` stages, `export_manifest.json` counts, `deferred_human.json`, and `conversion_set.json`'s `summary`.
|
|
163
166
|
|
|
@@ -173,6 +176,34 @@ Install the APK first (`adb [-s <ADB_SERIAL>] install -r -t <apk_path>`); the ex
|
|
|
173
176
|
|
|
174
177
|
**Coverage gate.** `pages_captured == 0`: stop and report (incremental mode without a device proceeds source-only and says so in Step 7). Otherwise report `captured / source-only / attached / skipped` before Step 5, and review the `skip` rows once; only the user re-includes a skipped page. Report `pages_tree_only` too: these are captured pages whose every screenshot was FLAG_SECURE-blocked, so only their view trees exist (step4-prepare.md item 6).
|
|
175
178
|
|
|
179
|
+
**Evidence quality gate** (`scripts/capture_verify.mjs`). Coverage counts directories; it does not ask whether a frame shows anything. Run it on the ui_info root and report the three numbers:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
node <this skill>/scripts/capture_verify.mjs <ui_info_root> --write --json <ui_info_root>/capture_quality.json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
- `capture_verify` decodes each primary frame and classifies it `rich` / `sparse` / `none` **by pixels** — the only readiness signal that works for every shell (a hybrid page's view tree is a single WebView node, so `content_loading`'s `%1$s` test and the explorer's spinner test are both blind there). `export_ui_info.mjs` already writes the same record into `meta.capture_quality`; this command is what re-checks captures made by another tool, and what a resume runs before Step 4.
|
|
186
|
+
- `rejected` (`level: none`) = the frame draws nothing below the title/action bars. `build_conversion_set.mjs` demotes such a page to `source-only` (`summary.pages_capture_rejected`, `row.pixels: "rejected"`, `meta.degraded_from: "capture"`; `meta.evidence_tier` keeps the value the capture wrote, the marker alone makes the page source-only, and the directory and its verdict survive every rebuild and re-export) and `group_pack.mjs` prints an **EMPTY FRAME** banner in the group prompt. Do **not** re-include it by hand. Re-capture it in Step 3.2 when a device is available; otherwise convert it from source and say so.
|
|
187
|
+
- `sparse` = a few elements only (an empty state, or a page captured before its data arrived). It is kept as a *state* reference and the prompt says to take the layout from source. A real empty state (tabs + "No more data") lands here too: refusing it would throw away evidence, accepting it silently would rebuild a page from whitespace.
|
|
188
|
+
- Report both numbers — `captured` and `captured − rejected` — to the user before Step 5, and list the rejected page dirs in the Step 7 report.
|
|
189
|
+
|
|
190
|
+
**Capture contract gate** (`scripts/capture_audit.mjs`) — this is a machine gate, not advice. It is what stops a capture directory from being called `captured` just because it exists. Run it after `capture_verify.mjs` and before Step 4:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
node <this skill>/scripts/capture_audit.mjs <ui_info_root> \
|
|
194
|
+
--source <android_project_dir> --json <ui_info_root>/capture_audit.json
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Exit 0 is required. It checks, per page, that every declared screenshot/view tree exists and is paired, that the primary frame is not blank, that `pages.json` still lists every captured page, and — the failure this gate was written for — that **a page with a vertical scroll container has either proven scroll frames (`scroll_frames > 0` + `scroll_completeness: complete`) or a probe that proved there is no overflow (`not-scrollable`)**. The scroll rule is one function (`scripts/scroll_verdict.mjs`), shared by the audit, `build_conversion_set.mjs` and `group_pack.mjs`:
|
|
198
|
+
- **hard gap** (exit 1, not waivable; `scroll_gap` on the group, `group_queue.mjs` will not lease it): fake completion only, i.e. `complete` with 0 frames (`scroll_false_complete`), `not-scrollable` contradicted by the probe (`scroll_probe_conflict`), or a scroll container with no verdict at all (`scroll_unverified`);
|
|
199
|
+
- **degraded** (exit 0, head `DEGRADED`; `scroll_degraded` on the group, not held, the prompt carries the SINGLE VIEWPORT warning): an honest partial record, i.e. `truncated` (`scroll_truncated`), `not-swept`, `no-effect`, `aborted`, `unreached` (`scroll_partial`). The first viewport is real evidence and the rest comes from the Android source. `--allow-degraded --reason <text>` (or a `capture_waivers.json` entry) records the decision.
|
|
200
|
+
|
|
201
|
+
- Fix a gap with `scripts/capture_fast.mjs` (P1's fast hybrid path): it jumps the route, waits for content, probes the real scroll element, writes `screenshot_scroll_N.png` / `view_scroll_N.xml`, sets `scroll_completeness`, runs the pixel gate, and merges `pages.json` / `export_manifest.json` without shrinking them.
|
|
202
|
+
- If the page genuinely does not need a sweep, capture the probe (`not-scrollable`). **Hard evidence gaps cannot be waived**: `scroll_unverified`, `scroll_false_complete`, `scroll_probe_conflict`, `blank_capture`, `screenshot_missing`, `view_tree_missing`, `pages_json_gap` and `manifest_gap` must be fixed by capturing frames, recapturing the blank page, demoting it to source-only, or rebuilding `pages.json`. `--allow-degraded` records only degraded findings and non-evidence decisions; `auto` mode may not invent one. A `scroll_unverified` waiver in `capture_waivers.json` is ignored. In `a2h-app-migrate`, a hard gap neither stops the pipeline nor counts as a failed UI batch: `review.ui_batch` records `ui_status=evidence_gaps` with the gap list, and the final report lists it.
|
|
203
|
+
- Membership: `pages.json`, `pages_captured.json` (a `--scope` build's out-of-scope captures) and `export_manifest.json` `pages` + `earlier` all count. Only `page_*` dirs take part in `pages_json_gap` / `manifest_gap`; `activity_*` / `route_*` / `overlay_*` / `mode_*` / `dyn_*` / `manual_*` are read through the Step 4 Glob fallback.
|
|
204
|
+
- `naming_legacy` (e.g. `screen.png`) is a warning: the consumers now pair by `meta.screenshots`, but `capture_fast.mjs` writes the canonical `screenshot.png`.
|
|
205
|
+
|
|
206
|
+
|
|
176
207
|
## Step 4 — Prepare the Conversion Set
|
|
177
208
|
|
|
178
209
|
**Read [references/step4-prepare.md](references/step4-prepare.md) in full before starting Step 4.** It holds the page-set priority, exact-path validation, the plan field table, manual grouping, the Lottie index format, and the Step 4.4 pack commands with how to read and pass each pack.
|
|
@@ -193,8 +224,8 @@ Progress persists in `${harmony_project_dir}/.hometrans/batch_progress.json`:
|
|
|
193
224
|
"scope_id": "<incremental only: stable digest of the confirmed SCOPE member list>",
|
|
194
225
|
"updated_at": "<ISO timestamp>",
|
|
195
226
|
"stages": {
|
|
196
|
-
"resources": { "done": true, "at": "<ISO>" },
|
|
197
|
-
"capture": { "done": true, "
|
|
227
|
+
"resources": { "done": true, "at": "<ISO>", "scope_id": "<the scope_id it was set under; null in full mode>" },
|
|
228
|
+
"capture": { "done": true, "at": "<ISO>", "scope_id": "<same>" }
|
|
198
229
|
},
|
|
199
230
|
"pages": {
|
|
200
231
|
"page_0001_<A>Activity": { "status": "done", "output": "pages/<A>Page.ets", "summary": "..." },
|
|
@@ -206,15 +237,17 @@ Progress persists in `${harmony_project_dir}/.hometrans/batch_progress.json`:
|
|
|
206
237
|
```
|
|
207
238
|
|
|
208
239
|
- `status` is `pending` | `done` | `failed`; `tier` is `captured` | `source-only`.
|
|
209
|
-
- **Resume identity** is `harmony_project_dir` + `mode` + `scope_id`.
|
|
210
|
-
-
|
|
211
|
-
-
|
|
240
|
+
- **Resume identity** is `harmony_project_dir` + `mode` + `scope_id`. Never compare or compute it by hand: run `node ./scripts/progress_identity.mjs resume ${harmony_project_dir} --mode <full|incremental> [--scope ${harmony_project_dir}/.hometrans/incremental/scope.json]` before Step 2 and act on its one-line JSON. In incremental mode, `scope.json` (I5's format) is therefore written as soon as I4 is confirmed, not at I5. `scope_id` is a digest of the scope's node ids, independent of order; `conversion_set.json` `plan.scope_id` carries the same value, and `group_queue.mjs init` refuses a `batch_progress.json` whose `mode` / `scope_id` differ from the plan's (it never marks pages `done` from another run's file).
|
|
241
|
+
- `action: resume` (all three match): merge the file into the discovered set. `done` pages are skipped in Step 5, and `pending`/`failed` pages are (re)processed.
|
|
242
|
+
- `action: restart` (any one differs; `why` says which): this is a different run. The script has archived the old file (`archived`, named after the old `scope_id`, or `full`) and written a fresh one with every page `pending` and no stages.
|
|
243
|
+
- `action: restore` (full mode only): the identity differs, but an archived full run (`batch_progress.full[.<n>].json`) matches it, as after full → incremental → full. The script archived the current file (`archived`) and put that run back (`restored`); treat it as `resume`, including `skip`. Skipping Step 2 here is what keeps the element JSON the full run's pages merged into.
|
|
244
|
+
- `action: new`: no progress yet; the script wrote one with the identity.
|
|
212
245
|
- Before skipping a `done` page, check that its `output` still exists, otherwise treat it as `pending`.
|
|
213
246
|
- A page recorded `source-only` whose node is now `captured` resets to `pending`. It is re-converted against the capture, using the existing `.ets` as the starting point.
|
|
214
|
-
- **Stage markers: a resume does not redo finished stages.** The parent sets `
|
|
215
|
-
- `stages.resources.done` and `resource_mapping.md` exists: **skip Step 2
|
|
216
|
-
- `stages.capture.done` and `${ui_info_root}/pages.json` exists: **skip Step 3 (3.1–3.3)
|
|
217
|
-
- Re-run either stage only on an explicit user request ("重新转换资源" / "重新抓取"). Doing so invalidates the resume: archive `batch_progress.json` and start fresh.
|
|
247
|
+
- **Stage markers: a resume does not redo finished stages.** The parent sets them with `node ./scripts/progress_identity.mjs mark ${harmony_project_dir} --stage <resources|capture> [--scope <scope.json>]`, never by editing the file: `resources` after Step 2 succeeds, and `capture` only once capture has ended (full mode when `run_cycle.mjs` returned `finished: true` and Step 3.3 confirmed `pages.json`; incremental mode when I5's capture wrote `pages.json`). A `pages.json` written mid-exploration does not count. Each marker carries the `scope_id` it was set under, so one scope's finished stages never count for another: a second scope always runs its own Step 2 (its `page_files` differ) and records its own static-check baseline. `mark` exits 1 when the file belongs to another run. On a matching resume, `resume`'s `skip` says what to skip:
|
|
248
|
+
- `stages.resources.done` and `resource_mapping.md` exists: **skip Step 2** (`resume` reports it as `skip.resources`, and only for a marker set under this `scope_id`). Re-running it rewrites `resources/**/element/*.json`, wiping the entries page conversions and Scheduling rule 7 merged in, and media the Phase 5 fixes replaced.
|
|
249
|
+
- `stages.capture.done` and `${ui_info_root}/pages.json` exists: **skip Step 3 (3.1–3.3)** (`resume` reports it as `skip.capture`, only for a marker set under this `scope_id`; pass `--ui-info` when `ui_info_root` is not the default). A fresh capture renumbers `page_NNNN_*` / re-promotes captures, so the `pages` keys recorded as `done` would point at different snapshots. Without the marker, full mode resumes the campaign (`run_cycle.mjs` continues from `cycle_state.json`) instead of starting over.
|
|
250
|
+
- Re-run either stage only on an explicit user request ("重新转换资源" / "重新抓取"). Doing so invalidates the resume: archive `batch_progress.json` and start fresh. Name the archive `batch_progress.rerun-<ISO time>.json`: a `batch_progress.full*.json` name would be restored by the next full-mode `resume`.
|
|
218
251
|
|
|
219
252
|
If a task-tracking tool is available, create one task per page, with already-`done` pages marked completed. Report the split to the user (e.g. "Resuming: 7 done, 12 remaining").
|
|
220
253
|
|
|
@@ -228,11 +261,11 @@ If a task-tracking tool is available, create one task per page, with already-`do
|
|
|
228
261
|
|
|
229
262
|
7. **The shared registry surface is parent-owned while any other group is in flight.** Every concurrently dispatched group's prompt states: do not edit `main_pages.json`, `resources/**/element/*.json`, `oh-package*.json5`, `module.json5` or the ability's `loadContent()`. Instead, list the additions in the report under `registry_requests`. The parent applies each group's requests when that group is released, one group at a time. Merge, never overwrite: an existing name with a different value is a conflict, so keep the existing value and record it in the report.
|
|
230
263
|
- **5.4** Never dispatch blocking waves. `Q init` once, then one pass per parent turn: release (`Q reap` → `Q release`), lease and dispatch (`Q lease`, pass `message` verbatim, `Q bind`), verify every `returned_unverified` group (`phase5_check.mjs --group`, `Q verified`, `group_commit.mjs`), then `Q wait` with a shell timeout above 9 min. Go on only when `summary.idle` is true, nothing is unverified and `summary.stuck` is empty.
|
|
231
|
-
- **5.5** One background sub-agent (Step 0.1) does the wiring: confirm every `registry_requests` was applied, wire self-contained components and shell hosts, and wire navigation from `navigates_to`. No group is in flight any more, so this agent may edit the registry surface of Rule 7. The parent writes `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` (the Step 5.5 procedure of step5-convert.md plus its inputs), dispatches it the way Step 2 is dispatched, and joins on `.hometrans/work/wiring.report.md`. **Gate (parent re-checks after the join):** `orphan-component` is zero, and `phase5_check.mjs --files <every file changed since the last group commit>` has `blocking` 0, before Step 6. Take that file list from `git status --porcelain` (modified and untracked), not from the report: a file the agent edited but left out of the report would otherwise skip the gate and still be committed. The parent then commits the wiring.
|
|
264
|
+
- **5.5** One background sub-agent (Step 0.1) does the wiring: confirm every `registry_requests` was applied, wire self-contained components and shell hosts, and wire navigation from `navigates_to`. No group is in flight any more, so this agent may edit the registry surface of Rule 7. The parent writes `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` (the Step 5.5 procedure of step5-convert.md plus its inputs), dispatches it the way Step 2 is dispatched, and joins on `.hometrans/work/wiring.report.md`. **Gate (parent re-checks after the join):** `orphan-component` is zero, and `phase5_check.mjs --files <every file changed since the last group commit>` has `blocking` 0, and `node scripts/shell_requests.mjs verify --hp ${harmony_project_dir}` exits 0 (every ledger id answered, every deleted `.ets` has its merge line), before Step 6. Run `shell_requests.mjs collect` before writing `wiring.md` and put its table in the prompt; carry every `deferred` row into Step 7's Manual Follow-up TODOs. Take that file list from `git status --porcelain` (modified and untracked), not from the report: a file the agent edited but left out of the report would otherwise skip the gate and still be committed. The parent then commits the wiring.
|
|
232
265
|
|
|
233
266
|
## Step 6 — Static Check, Build, Smoke Gate
|
|
234
267
|
|
|
235
|
-
**Steps 6.1–6.
|
|
268
|
+
**Steps 6.1–6.3 run in one background sub-agent (Step 0.1), dispatched after the Step 5.5 gate passes and the wiring is committed.** The parent writes `${harmony_project_dir}/.hometrans/work/prompts/verify.md` with this whole Step 6 section, `harmony_project_dir`, `android_project_dir`, `ui_module`, `ALL_MODULES`, `DEVECO_HOME`, `ADB_SERIAL` / `ADB_PATH` and `ui_info_root`, and dispatches it the way Step 2 is dispatched: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/verify.report.md` and reply with one line `DONE verify`." The agent itself runs the `a2h-fix-build-errors` and `a2h-coldstart-smoke-gate` skills (neither dispatches sub-agents). It never asks the user. A login in the smoke gate comes back as its `DEPLOY_ERROR` with the instruction. Where `a2h-fix-build-errors` would ask (no DevEco path resolves, `devecocli` is not on PATH), the agent stops, writes `BLOCKED: <the human step>` at the top of the report and ends; the parent relays that step to the user and resumes the agent once it is done. The prompt forbids `git` and dispatching sub-agents. The report carries, for Step 7: the 6.1 `[GATE]` count of the last run and every `[CANDIDATES]` item reviewed but deliberately not fixed, with the reason; the 6.2 outcome; the 6.3 verdict with evidence path; and every file edited.
|
|
236
269
|
|
|
237
270
|
**Join** on the report file, as in Step 2. Then the parent re-runs the 6.1 command once (it takes under a second); a non-zero `[GATE]` means the agent's report is wrong, so resume the agent in its own session with that output. The parent also runs `phase5_check.mjs --files` on every file `git status --porcelain` shows since the wiring commit (`blocking` 0), for the same reason as in 5.5. The parent commits the agent's fixes and writes Step 7 from the report.
|
|
238
271
|
|
|
@@ -261,6 +294,7 @@ node ./scripts/arkts_static_check.ts \
|
|
|
261
294
|
- **Union of roots.** Cross-module facts are resolved over the union of the roots passed: `orphan-component`'s import surface, `entry-route-not-converted`'s `loadContent` target, and resource lookups. Pass every participating module.
|
|
262
295
|
- **`--android`** enables the immersive cross-check. It greps for `enableEdgeToEdge` / `setDecorFitsSystemWindows` and, when no Harmony component extends into the bars (`ignoresLayoutSafeAreaEdges` / `expandSafeArea`), lists the call sites under `[CANDIDATES]`. This defect is invisible on the Harmony side alone, because an edge-to-edge page looks the same shape as a bar-avoiding one. It also enables the GATE `framework-picker-appearance`: an Android `TimePicker` / `DatePicker` (or their dialogs) in its default clock / calendar mode, converted to the ArkUI wheel of the same name (conversion-procedure.md Phase 4.3「外观替换」). Omitted, both checks are skipped silently. Independent of `--android`, `window-fullscreen-layout` and `system-bar-height-read` are GATEs: a window-level full-screen layout, or any read of a bar height, breaks the `system_bars` policy.
|
|
263
296
|
- **`--resources`** enables three GATE rules that read the *content* of referenced SVGs, because a resource that exists can still render as a black, white or grey box (icon tiering: conversion-procedure.md Phase 4.3). Omitted, they are skipped silently.
|
|
297
|
+
- **`--baseline`** (incremental mode): pass `--baseline ${harmony_project_dir}/.hometrans/work/static_baseline.<scope_id>.json` (Step 2). Findings the project had before this run are printed under `[BASELINE]` and do not count; every other finding gates as usual. Matching ignores line numbers, so edits above an old finding do not turn it into a new one. `phase5_check.mjs` applies the same file by itself when `batch_progress.json` says `mode: incremental`, picking it by that file's `scope_id`. Full mode never passes it.
|
|
264
298
|
|
|
265
299
|
Output has two sections, and the exit code is `1` only when the first is non-empty:
|
|
266
300
|
|
|
@@ -276,7 +310,7 @@ Once Step 6.1 has zero `[GATE]`, call the `a2h-fix-build-errors` skill with `har
|
|
|
276
310
|
|
|
277
311
|
### Step 6.3 — Cold-Start Smoke Gate
|
|
278
312
|
|
|
279
|
-
Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir
|
|
313
|
+
Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir` and `image_read` (Step 1), then record:
|
|
280
314
|
- the verdict, always, in Step 7's Build status;
|
|
281
315
|
- **every verdict other than `PASS`** in Manual Follow-up TODOs as well, never only in Build status:
|
|
282
316
|
- `FAIL_*`: the verdict + evidence path; a human takes over;
|
|
@@ -285,6 +319,18 @@ Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir`, then record
|
|
|
285
319
|
|
|
286
320
|
## Step 7 — Final Report
|
|
287
321
|
|
|
322
|
+
**Teardown first, every exit path.** Before writing the report, and also whenever the run stops early (user abort, a gate stops the run, the session hands off with groups still `pending`), stop the background cycle and then the fixture server, unconditionally:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
node ./scripts/detach.mjs stop ${harmony_project_dir} --name run_cycle # 1. the cycle first
|
|
326
|
+
node ./scripts/detach.mjs stop ${harmony_project_dir} --name fixture_server # 2. then the server
|
|
327
|
+
node <a2h-utg-explorer>/scripts/d_prereqs.mjs release --config ${harmony_project_dir}/.hometrans/utg_explore/config.json # only if that config.json exists
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Order matters.** On an early exit `run_cycle` may still be running in the background (converting while exploring, a gate stops the run, a hand-off with groups `pending`). Stopping the server under it makes every recovery D recipe hit a closed URL and be recorded as "state cannot be built" (cf. Step 3.2's `check` rule). So end the cycle first: `stop` returns only after the wrapper has recorded the cycle's exit (or after 15 s, when it kills the wrapper too), and it is a no-op when the cycle is not `running`. To keep the cycle's results instead, wait until `detach.mjs status ${harmony_project_dir} --name run_cycle` no longer shows `running`, then stop the server.
|
|
331
|
+
|
|
332
|
+
The fixture server is a `--service` job: nothing else ends it, and Step 3.2.6 fires only on `finished: true`, which a run that converts while exploring may never reach. `stop` is idempotent (`state: unknown` / not `running` → no-op), so call it blindly. A later re-run of Step 3.2 starts the server again on the same port.
|
|
333
|
+
|
|
288
334
|
Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.md`:
|
|
289
335
|
|
|
290
336
|
0. **本次范围** (incremental only) — how `scope_request` was resolved:
|
|
@@ -299,6 +345,7 @@ Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.m
|
|
|
299
345
|
- `error` for failed pages;
|
|
300
346
|
- a mark on every page whose evidence was parent-reconstructed.
|
|
301
347
|
2. **Build status** — the outcomes of Steps 6.1, 6.2 and 6.3, including `[CANDIDATES]` reviewed but deliberately not "fixed", with the reason.
|
|
348
|
+
In incremental mode, also list the 6.1 `[BASELINE]` section: defects that were in the project before this run, left as they were.
|
|
302
349
|
3. **Manual Follow-up TODOs** — items that need a human, each with enough context to act on:
|
|
303
350
|
- **Unassigned Lottie animations** — `lottie_by_page["Unknown"]` plus multi-host entries. Give `source`, `target`, `load_path`, `host_android`, `host_layout`, `notes` verbatim, and what is needed (the hosting page and the start/stop trigger).
|
|
304
351
|
- **Source-only pages awaiting visual calibration** — these were converted from source. List each with its uncertain items (template-borrowed or framework-default values). Re-running Step 3.2 with a fixture, then `build_conversion_set.mjs`, flips them to `captured`, and resume resets them to `pending`.
|
|
@@ -317,7 +364,10 @@ Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.m
|
|
|
317
364
|
|
|
318
365
|
- **Use the right resource.** Find it in `harmony_project_dir`; if it is missing, find it in `android_project_dir` and transfer it. Never invent one.
|
|
319
366
|
- **Never fabricate a measurement for a source-only page.** No px/vp from "typical" screens, and no colour picked by eye from a template's screenshot for a region the template does not share. Use XML dp, theme/style resolution, template-shared values or framework defaults, each labelled as such.
|
|
320
|
-
- **Work through the 常见误译速查 table** at the end of Phase 5 before declaring a page done. It is the static backstop; Step 6.
|
|
367
|
+
- **Work through the 常见误译速查 table** at the end of Phase 5 before declaring a page done. It is the static backstop; the only runtime check is Step 6.3's cold start.
|
|
321
368
|
- **Edit `.ets` / `.json5` / `.json` only with the file edit/write tools, or a script that reads and writes UTF-8 explicitly.** Never `Get-Content … -replace … | Set-Content` or `(Get-Content f) -replace` in Windows PowerShell 5.1: it reads UTF-8 without BOM as the ANSI code page (GBK) and writes it back mangled.
|
|
322
|
-
- **
|
|
323
|
-
- **
|
|
369
|
+
- **Do not hand-roll a route loop; use `scripts/capture_fast.mjs`.** It is the compliant fast path for a hybrid/uni-app shell: route jump, content-stable wait, real scroll probe, every scroll frame, `capture_quality`, and a resumable state file. If Step 3.2's route/task machinery cannot finish, this is the replacement — not a `screencap` + one `uiautomator dump` loop.
|
|
370
|
+
- **Any capture path must pass `scripts/capture_audit.mjs` (exit 0) before Step 4.** That includes a capture made by another tool and a directory the user supplied. The audit is what makes `captured` a verified claim: every declared screenshot/view tree exists and is paired, the primary frame is not blank, `pages.json` still lists every captured page, and no scrolling page claims a completion it cannot prove (a partial sweep is listed as degraded, not hidden). A hand-rolled loop that writes "captured" dirs with blank frames or only the first viewport is how 26 pages were converted from a white rectangle and the `life` page lost its below-fold sections. Waiting for a fixed `sleep` after a route jump is not a readiness test: the frame has to *show* content, and the scroll has to *move*.
|
|
371
|
+
- **Never treat a route jump or a settled view tree as "page rendered".** For a hybrid app the view tree is one WebView node, so "stable" is immediate and "no `%1$s` placeholder" is always true. Readiness for those pages is decided by the frame (pixels), never by the tree.
|
|
372
|
+
- **Incremental mode never overwrites a `placeholder` page without a backup.** Copy the existing `.ets` to `${harmony_project_dir}/.hometrans/backup/<timestamp>/<path relative to the project>` before the sub-agent writes, and report the path in §0b. Backups never go into the source tree: a `.bak` next to the page, or under `resources/` (contract item 2), would be committed with the conversion and shipped in the patch; `.hometrans/` is gitignored.
|
|
373
|
+
- **Incremental mode may edit `loadContent()` and the app entry, and GATE `entry-route-not-converted` stays in force.** A migrated page that is routable but never reachable from the ability is invisible work. But if reconciling the route would change which screen an existing app opens on, say so and let the user decide.
|
|
@@ -72,10 +72,24 @@ export function blendARGB(color1: string, color2: string, ratio: number): string
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
// ColorUtils.setAlphaComponent(color, alpha), alpha 0..255.
|
|
75
|
+
// A computed alpha such as 0.3 * 255 (= 76.5) is rounded to the nearest byte rather than rejected: throwing
|
|
76
|
+
// here would turn a slightly-off color into a runtime crash. Compose `copy(alpha = 0.5f)` is 0..1: use withAlpha()
|
|
77
|
+
// below, never setAlphaComponent(c, 0.5) (0.5 would round to 01, almost transparent); GATE alpha-scale-mismatch
|
|
78
|
+
// catches that literal form.
|
|
75
79
|
export function setAlphaComponent(color: string, alpha: number): string {
|
|
76
|
-
if (alpha
|
|
80
|
+
if (!(alpha >= 0 && alpha <= 255)) {
|
|
77
81
|
throw new Error('ColorUtils.setAlphaComponent: alpha must be 0..255, got ' + alpha)
|
|
78
82
|
}
|
|
79
83
|
const c: ArgbChannels = parseColor(color)
|
|
80
|
-
return colorToHex({ alpha: alpha, red: c.red, green: c.green, blue: c.blue })
|
|
84
|
+
return colorToHex({ alpha: Math.round(alpha), red: c.red, green: c.green, blue: c.blue })
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Compose Color.copy(alpha = fraction), fraction 0..1. Compose stores alpha as a float and
|
|
88
|
+
// converts it to 8 bits with round-half-up (Color.toArgb: (alpha * 255 + 0.5).toInt()).
|
|
89
|
+
export function withAlpha(color: string, fraction: number): string {
|
|
90
|
+
if (fraction < 0 || fraction > 1) {
|
|
91
|
+
throw new Error('ColorUtils.withAlpha: fraction must be 0..1, got ' + fraction)
|
|
92
|
+
}
|
|
93
|
+
const c: ArgbChannels = parseColor(color)
|
|
94
|
+
return colorToHex({ alpha: Math.floor(fraction * 255 + 0.5), red: c.red, green: c.green, blue: c.blue })
|
|
81
95
|
}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
**两种容器的该轴属性不同名,必须按容器类型取**:`Column` 的水平方向是交叉轴 → `.alignItems(HorizontalAlign.*)`;`Row` 的水平方向是主轴 → `.justifyContent(FlexAlign.*)`。
|
|
9
9
|
`Row` 上的 `.alignItems(VerticalAlign.*)` 管的是**纵轴**,**不满足本项** —— 它常常本身完全正确(对应 Android 的 `verticalAlignment`/`gravity="center_vertical"`),正因如此最容易被当成"对齐已经写了"而放过:一个正确的纵轴设置掩盖了缺失的横轴设置,两处单看都没错。实测漏检形态是日期分隔行、章节标题居中而 Android 齐左。判据:宽度撑满的 `Row` 里若有收缩宽度的 `Text`,就必须能指出是哪个属性把它定在了左边。**ArkUI `Column` 默认居中、Android `LinearLayout`/Compose `Column` 默认 start** —— Android 侧未写 gravity 时必须显式译成 `.alignItems(HorizontalAlign.Start)`,不能同样"不写"。未显式声明且未说明依据者判定失败(居中确为本意时,注明理由即可通过,例如空态插图、按钮内图标)。此项漏检的典型表现是章节标题、列表项文字整体居中而 Android 是齐左,且逐属性对照会确认成"翻译正确"。
|
|
10
10
|
**对齐要看父容器,不只看含 Text 的那个容器**:`Column` 的子节点里只要有**收缩宽度**的容器(未设 `.width()` / `.layoutWeight()` 的 `Row`/`Column`/`Stack`,典型是「图标 + 标题」行),决定它水平位置的是**父** `Column` 的 `alignItems`,子 `Row` 自己的 `justifyContent(FlexAlign.Start)` 只管 Row **内部**,管不到 Row 在父中的位置。实测漏检:卡片标题行 `Row() { Image; Text }` 被报 `container-align-unset`,回答「Row 主轴默认 Start」本身正确,于是放行,而真正让它居中的是未写 `alignItems` 的卡片 `Column`。修法:父 `Column` 显式 `.alignItems(HorizontalAlign.Start)`,或给子行 `.width('100%')`。检查器 CAND `column-shrink-child-centered`。
|
|
11
|
-
**`Scroll` 的 `.align()` 决定内容短于视口时的位置**,默认 `Alignment.Center`。**`Alignment.Start` = 左 + 垂直居中,不是左上**。Android `ScrollView`/`NestedScrollView`/`RecyclerView` 内容默认从顶部开始,通常应取 `Alignment.TopStart`(或 `Top`/`TopEnd`)。例外要有 Android 依据:`fillViewport="true"` + 子布局 `gravity="center"`(登录页、空状态页居中)对应 `Alignment.Center`;`stackFromEnd`/`reverseLayout`(聊天页靠底)对应 `Bottom
|
|
11
|
+
**`Scroll` 的 `.align()` 决定内容短于视口时的位置**,默认 `Alignment.Center`。**`Alignment.Start` = 左 + 垂直居中,不是左上**。Android `ScrollView`/`NestedScrollView`/`RecyclerView` 内容默认从顶部开始,通常应取 `Alignment.TopStart`(或 `Top`/`TopEnd`)。例外要有 Android 依据:`fillViewport="true"` + 子布局 `gravity="center"`(登录页、空状态页居中)对应 `Alignment.Center`;`stackFromEnd`/`reverseLayout`(聊天页靠底)对应 `Bottom*`。**`align` 是通用属性(API 参考「位置设置」),文档列明它在 `Scroll` 上生效、默认 `Alignment.Center`** —— `scroll.d.ts` 里搜不到 `align` 是因为它定义在 `CommonMethod`,不是 Scroll 不支持,不能据此跳过。「内容恒超视口,对齐无所谓」也不是理由:内容来自 `ForEach`/`LazyForEach`/`Repeat` 时,条数少(筛选后、首屏只回一页、空态切回)是常态。检查器:`Alignment.Start` 报 GATE `scroll-align-not-top`(几乎必是误当左上);其余非 Top 值报 CAND `scroll-align-not-top`;未写 `.align()` 且内容是数据驱动列表时报 GATE `scroll-align-default-center`,只能用 Scroll 上方的 `// SCROLL-CENTER: <依据>` 降级(EVIDENCE 文字不关闭),静态内容未写时为 CAND。
|
|
12
|
+
**横向 `Scroll`(`LazyRow` / `HorizontalScrollView`)看的是水平位置**:未写宽度时它按内容收缩,所在 `Column` 默认 `HorizontalAlign.Center` 会把整排推到中间(「我的足迹」只有一两条时居中,安卓从左排起)。写 `.width('100%').align(Alignment.Start)`(横向时 `Start` = 左 + 垂直居中,正是所需),或父 `Column` 写 `.alignItems(HorizontalAlign.Start)`。GATE/CAND `hscroll-centered-in-column`。
|
|
12
13
|
**Compose `Box` 子节点的单独对齐(`Modifier.align(X)`)**:`Box(contentAlignment = C)` 里子节点写 `Modifier.align(X)`(X ≠ C)时,该子节点按 X 放、其余按 C 放。ArkUI `Stack` 没有按子节点的对齐,子节点 `.align()` 只排它自己的内容,所以 X 必须单独表达:把该子节点包进与 Stack 同尺寸的容器并在容器里按 X 排(`BottomCenter` + `padding(bottom = 5.dp)` → `Column() { … }.width('100%').height('100%').justifyContent(FlexAlign.End).padding({ bottom: 5 })`;`CenterStart` → `Row()…justifyContent(FlexAlign.Start)`),或用 `.position` / `.markAnchor` 定位。**只留下 `padding` 改成单侧 `margin` 不算译了对齐**:Stack 仍居中,它压在居中的兄弟上。group pack 的「Box children with their own alignment」一节列出本组每一处(`文件:行号`),本项逐条给出鸿蒙侧的 `文件:行号` 与所用写法。检查器:显式 `alignContent: Alignment.Center` 与不写一样走 GATE `stack-overlay-default-center` / `stack-child-align-noop`。
|
|
13
14
|
|
|
14
15
|
### Phase 5「水平内缩证据」—— 判据
|
|
@@ -26,6 +27,9 @@
|
|
|
26
27
|
| **`Stack()` 里用子节点 `.align(Alignment.Bottom)` 贴底** | 把 `.align` 当成"本节点在父中的对齐" | `.align` 只排子节点自己的内容;`Stack` 默认 `alignContent: Center`,底部导航悬在屏幕中部 | 贴底/贴边由 `Stack({ alignContent })` 决定;跨页共享 chrome 用宿主容器组件(step5-convert.md 合同第 7 条)。GATE `stack-child-align-noop` |
|
|
27
28
|
| **从别页复制 chrome 调用、漏抄父 `Stack` 的 `alignContent`** | 只复制 `Bar(...).margin({ bottom })`,根容器写成 `Stack()` | 默认 Center 下 `margin.bottom` 只上移几 vp,导航栏停在屏幕中部,复制了同一调用的页面全部如此 | 复制时连 `Stack({ alignContent })` 一起复制;宿主 Activity 只画一份 chrome 时建壳(step5-convert.md Step 5.5)。GATE `stack-overlay-default-center` / `shared-chrome-placement-drift` |
|
|
28
29
|
| **容器对齐默认值两端相反** | ArkUI `Column`/`Row` 默认居中,Android 默认 start;两边都不写时字面一致 | 收缩宽度的 `Text`、标题整体居中,而 Android 齐左 | → Phase 5「文字对齐证据」(含父容器一段);CAND `container-align-unset` / `column-shrink-child-centered` |
|
|
30
|
+
| **ConstraintLayout / MotionLayout 分层译成裸 `Stack()`** | 折叠头部、叠层背景不便用 `RelativeContainer` 表达,改用「背景层 + 滚动层 + 头部覆盖层」的 `Stack`;层内坐标都按 view.xml 用 `.position` 写,逐条核对都对 | Android 子视图由约束锚在顶部,`Stack` 默认 `alignContent: Center`(Stack API 文档):没撑满的覆盖层(自定义组件根 `Stack().height(346)`)被整体垂直居中,组件内所有 `.position` 坐标跟着下移约 (Stack 高 − 组件高)/2,头部文字压住下方内容 | 根 `Stack({ alignContent: Alignment.TopStart })`;或在调用处 `.position({ x: 0, y: 0 })`;或让组件根 `.width('100%').height('100%')`。核对「层内坐标对」之前先核对「层本身落在哪」。GATE `stack-custom-child-default-center` |
|
|
29
31
|
| **Compose `Box` 译成裸 `Stack()`** | 组件映射表写「Box → Stack」,两边都不写对齐时字面一致 | Compose `Box` 默认左上,`Stack` 默认居中:顶栏图标、角标落到屏幕/卡片中部 | `Box()` → `Stack({ alignContent: Alignment.TopStart })`,`Box(contentAlignment = X)` → X;GATE `stack-bar-default-center` |
|
|
30
32
|
| **`Box` 子节点的 `Modifier.align(X)` 被丢掉** | 映射成 `Stack({ alignContent: C })` 后,子节点上只剩 `.padding(…)`,顺手译成单侧 `margin` | 标签/角标停在 Stack 中部,与居中的数字、图标重叠(「UV」压在数字上) | 子节点包一层与 Stack 同尺寸、按 X 排的 `Column`/`Row`,或 `.position`/`.markAnchor`;逐条对照 group pack「Box children with their own alignment」;GATE `stack-overlay-default-center` |
|
|
31
33
|
| **`Alignment.Start` 被当成「左上」** | ArkUI 九宫格 `Start` = 左 + 垂直居中,左上是 `TopStart` | `Scroll` 内容短于视口时悬在屏幕中部 | → Phase 5「文字对齐证据」的 `Scroll` 段;GATE `scroll-align-not-top` |
|
|
34
|
+
| **纵向 `Scroll` 不写 `.align()`,理由是「SDK 没有 Scroll.align」或「内容恒超视口」** | 在 `scroll.d.ts` 里搜不到 `align`(它在 `CommonMethod`);参考帧恰好是满屏数据 | 列表条数少时整列悬在视口中部(分类商品页从左-中排起,安卓从左上) | `.align(Alignment.TopStart)`;数据驱动内容 GATE `scroll-align-default-center`,降级只认 `// SCROLL-CENTER:` |
|
|
35
|
+
| **`LazyRow` 译成未定宽的横向 `Scroll`** | 只关注滚动方向,没看宽度;父卡片 `Column` 又没写 `alignItems` | 内容不足一屏时整排居中,安卓从左排起 | 横向 Scroll `.width('100%').align(Alignment.Start)`;GATE `hscroll-centered-in-column` |
|