@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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// list_existing.mjs (incremental-scope.md I3) and how its list reaches the converter:
|
|
2
|
+
// existing.json → build_conversion_set --existing → existing_writes → group_pack's "Existing HarmonyOS files".
|
|
3
|
+
// Run from scripts/: node --test tests/list_existing.test.mjs
|
|
4
|
+
|
|
5
|
+
import { test, describe, beforeEach, afterEach } from 'node:test';
|
|
6
|
+
import assert from 'node:assert/strict';
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as os from 'node:os';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
|
|
11
|
+
import * as bcs from '../build_conversion_set.mjs';
|
|
12
|
+
import { findModules, listExisting, main } from '../list_existing.mjs';
|
|
13
|
+
import { renderExistingWrites, renderSupplement } from '../group_pack.mjs';
|
|
14
|
+
import { branchCoverage } from '../branch_coverage.mjs';
|
|
15
|
+
|
|
16
|
+
function w(p, data) {
|
|
17
|
+
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
18
|
+
fs.writeFileSync(p, typeof data === 'string' ? data : JSON.stringify(data), 'utf8');
|
|
19
|
+
}
|
|
20
|
+
const readDoc = (p) => JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
21
|
+
|
|
22
|
+
/** A hand-written HarmonyOS project: entry + a feature HAR, a ViewModel nobody migrated. */
|
|
23
|
+
function project(root) {
|
|
24
|
+
const ets = (m, f) => w(path.join(root, m, 'src', 'main', 'ets', f), 'struct X {}\n');
|
|
25
|
+
const pagesJson = (m, src) => w(path.join(root, m, 'src', 'main', 'resources', 'base', 'profile', 'main_pages.json'), { src });
|
|
26
|
+
ets('entry', 'pages/Index.ets');
|
|
27
|
+
ets('entry', 'pages/OrphanPage.ets'); // on disk, no route
|
|
28
|
+
ets('entry', 'viewmodel/AboutViewModel.ets'); // hand-written, same name as a predicted write
|
|
29
|
+
ets('entry', 'components/SortDialog.ets');
|
|
30
|
+
ets('entry', 'entryability/EntryAbility.ets'); // not a kind the builder predicts
|
|
31
|
+
pagesJson('entry', ['pages/Index', 'pages/Gone']); // Gone: registered, no file
|
|
32
|
+
ets('features/settings', 'pages/SettingsPage.ets');
|
|
33
|
+
pagesJson('features/settings', ['pages/SettingsPage']);
|
|
34
|
+
w(path.join(root, 'oh_modules', 'dep', 'src', 'main', 'ets', 'pages', 'Dep.ets'), 'x'); // dependency, skipped
|
|
35
|
+
w(path.join(root, '.hometrans', 'x', 'src', 'main', 'ets', 'pages', 'Nope.ets'), 'x'); // workspace, skipped
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
describe('list_existing', () => {
|
|
39
|
+
let tmp;
|
|
40
|
+
beforeEach(() => { tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'list-existing-')); project(tmp); });
|
|
41
|
+
afterEach(() => fs.rmSync(tmp, { recursive: true, force: true }));
|
|
42
|
+
|
|
43
|
+
test('finds every module, nested ones included, and skips dependencies / workspaces', () => {
|
|
44
|
+
assert.deepEqual(findModules(tmp).map((m) => path.relative(tmp, m).replace(/\\/g, '/')), ['entry', 'features/settings']);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('lists pages, components and viewmodels relative to the ETS root', () => {
|
|
48
|
+
const r = listExisting(tmp);
|
|
49
|
+
assert.deepEqual(r.existing, [
|
|
50
|
+
'components/SortDialog.ets', 'pages/Index.ets', 'pages/OrphanPage.ets',
|
|
51
|
+
'pages/SettingsPage.ets', 'viewmodel/AboutViewModel.ets',
|
|
52
|
+
]);
|
|
53
|
+
assert.ok(!r.existing.some((p) => p.startsWith('entryability/')), 'only the kinds a group can write');
|
|
54
|
+
assert.deepEqual(r.files.find((f) => f.path === 'viewmodel/AboutViewModel.ets'),
|
|
55
|
+
{ module: 'entry', path: 'viewmodel/AboutViewModel.ets', kind: 'viewmodel' });
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('shows both route mismatches I3 asks for', () => {
|
|
59
|
+
const r = listExisting(tmp);
|
|
60
|
+
assert.deepEqual(r.routes.registered_missing, [{ module: 'entry', route: 'pages/Gone' }]);
|
|
61
|
+
assert.deepEqual(r.routes.unregistered_pages, [{ module: 'entry', path: 'pages/OrphanPage.ets' }]);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test('CLI writes existing.json and refuses a directory with no module', () => {
|
|
65
|
+
const out = path.join(tmp, '.hometrans', 'incremental', 'existing.json');
|
|
66
|
+
assert.equal(main([tmp, '--out', out]), 0);
|
|
67
|
+
assert.ok(readDoc(out).existing.includes('viewmodel/AboutViewModel.ets'));
|
|
68
|
+
const empty = fs.mkdtempSync(path.join(os.tmpdir(), 'list-existing-empty-'));
|
|
69
|
+
try { assert.equal(main([empty]), 2); } finally { fs.rmSync(empty, { recursive: true, force: true }); }
|
|
70
|
+
assert.equal(main([]), 2);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
function fe(src, tgt, via = null, action = 'tap', scope = 'non-lifecycle-fn:x', mech = 'fragment-transaction') {
|
|
75
|
+
return { source: src, target: tgt, mechanism: mech, args: { via, action, commit_scope: scope } };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
describe('existing ViewModel → existing_writes → pack', () => {
|
|
79
|
+
let tmp; let ws; let ui; let hp;
|
|
80
|
+
beforeEach(() => {
|
|
81
|
+
tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'existing-vm-'));
|
|
82
|
+
ws = path.join(tmp, 'ws');
|
|
83
|
+
ui = path.join(tmp, 'ui');
|
|
84
|
+
hp = path.join(tmp, 'hmos');
|
|
85
|
+
project(hp);
|
|
86
|
+
const page = (i) => ({ id: i, kind: 'fragment', status: 'static-only' });
|
|
87
|
+
w(path.join(ws, 'utg.json'), {
|
|
88
|
+
nodes: [{ id: 'activity:Main', kind: 'host-activity', status: 'static-only', denominator: false },
|
|
89
|
+
page('fragment:Home'), page('fragment:About')],
|
|
90
|
+
links: [fe('activity:Main', 'fragment:Home', 'instantiation'),
|
|
91
|
+
fe('fragment:Home', 'fragment:About', 'preference-click', null, 'None')],
|
|
92
|
+
});
|
|
93
|
+
w(path.join(ws, 'click_paths.json'), { paths: {} });
|
|
94
|
+
w(path.join(ui, 'export_manifest.json'), { pages: [] });
|
|
95
|
+
w(path.join(ui, 'pages.json'), { pages: [] });
|
|
96
|
+
});
|
|
97
|
+
afterEach(() => fs.rmSync(tmp, { recursive: true, force: true }));
|
|
98
|
+
|
|
99
|
+
test('a hand-written ViewModel of a predicted name marks its group and is named in the pack', () => {
|
|
100
|
+
const existing = path.join(tmp, 'existing.json');
|
|
101
|
+
assert.equal(main([hp, '--out', existing]), 0);
|
|
102
|
+
const scope = path.join(tmp, 'scope.json');
|
|
103
|
+
w(scope, { scope: ['fragment:About'] });
|
|
104
|
+
const s = bcs.build(ws, ui, null, false, false, { scope, existing });
|
|
105
|
+
assert.equal(s.existing_listed, true);
|
|
106
|
+
const about = readDoc(path.join(ui, 'conversion_set.json')).plan.groups.find((g) => g.anchor === 'fragment:About');
|
|
107
|
+
assert.ok(about.predicted_writes.includes('viewmodel/AboutViewModel.ets'), 'precondition: the builder predicts it');
|
|
108
|
+
assert.deepEqual(about.existing_writes, ['viewmodel/AboutViewModel.ets']);
|
|
109
|
+
assert.equal(about.class, 'host-chain');
|
|
110
|
+
const section = renderExistingWrites(about).join('\n');
|
|
111
|
+
assert.match(section, /^## Existing HarmonyOS files — edit in place, never recreate/);
|
|
112
|
+
assert.match(section, /- `viewmodel\/AboutViewModel\.ets`/);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test('--scope without --existing is flagged, a whole-app build is not', () => {
|
|
116
|
+
const scope = path.join(tmp, 'scope.json');
|
|
117
|
+
w(scope, { scope: ['fragment:About'] });
|
|
118
|
+
assert.equal(bcs.build(ws, ui, null, false, false, { scope }).existing_listed, false);
|
|
119
|
+
assert.equal(bcs.build(ws, ui, null, false, false).existing_listed, undefined);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
test('feature scope v2: a SUP page carries its missing list into the plan and the pack says "add only this"', () => {
|
|
123
|
+
const existing = path.join(tmp, 'existing.json');
|
|
124
|
+
assert.equal(main([hp, '--out', existing]), 0);
|
|
125
|
+
const scope = path.join(tmp, 'scope.json');
|
|
126
|
+
const gap = { verdict: 'partial', missing: [{ type: 'string', name: 'about_version', expected: "$r('app.string.about_version')", value: '版本号' }],
|
|
127
|
+
ids: { present: [], missing: ['version_row'] } };
|
|
128
|
+
w(scope, { version: 2, scope_id: 'inc-1-supabout0000', pages: ['fragment:About'],
|
|
129
|
+
features: [{ id: 'f-about-version', title: '关于页显示版本号', work: [{ type: 'SUP', page: 'fragment:About', missing: gap }] }] });
|
|
130
|
+
bcs.build(ws, ui, null, false, false, { scope, existing });
|
|
131
|
+
const plan = readDoc(path.join(ui, 'conversion_set.json')).plan;
|
|
132
|
+
assert.equal(plan.scope_id, 'inc-1-supabout0000', 'the declared v2 scope_id is the plan identity');
|
|
133
|
+
const about = plan.groups.find((g) => g.anchor === 'fragment:About');
|
|
134
|
+
assert.deepEqual(about.supplement, [{ page: 'fragment:About', items: [{ feature: 'f-about-version', type: 'SUP', missing: gap }] }]);
|
|
135
|
+
const text = renderSupplement(about).join('\n');
|
|
136
|
+
assert.match(text, /^## Supplement only — add what is missing, keep everything else/);
|
|
137
|
+
assert.match(text, /string `about_version` → `\$r\('app\.string\.about_version'\)` \(text: "版本号"\)/);
|
|
138
|
+
assert.match(text, /`version_row`/);
|
|
139
|
+
// The out-of-scope branches of the page: the waiver the pack prescribes is one branch_coverage accepts.
|
|
140
|
+
const waiver = /state-branch list[^`]*`([^`]+)`/.exec(text)?.[1];
|
|
141
|
+
assert.ok(waiver, 'the pack names the waiver for branches outside the supplement');
|
|
142
|
+
const report = `## state-branch list\n\n| state | captured | HarmonyOS |\n|---|---|---|\n| empty | not captured | ${waiver} |\n`;
|
|
143
|
+
assert.deepEqual(branchCoverage({ reportText: report }), { failed: [], unlocated: [], checked: 1 }, waiver);
|
|
144
|
+
assert.deepEqual(renderSupplement({ id: 'G1' }), [], 'no supplement, no section');
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test('a v1 scope never adds supplement work', () => {
|
|
148
|
+
const scope = path.join(tmp, 'scope.json');
|
|
149
|
+
w(scope, { scope: ['fragment:About'] });
|
|
150
|
+
bcs.build(ws, ui, null, false, false, { scope });
|
|
151
|
+
assert.ok(readDoc(path.join(ui, 'conversion_set.json')).plan.groups.every((g) => g.supplement === undefined));
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
test('a group with no existing write gets no pack section', () => {
|
|
155
|
+
assert.deepEqual(renderExistingWrites({ id: 'G1', predicted_writes: ['pages/APage.ets'] }), []);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
@@ -213,7 +213,7 @@ test('non-immersive page: the root top is the status bar height', () => {
|
|
|
213
213
|
assert.equal(json.regions.find((r) => r.text === 'City').safeTopVp, 25);
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
-
test('dialog: the panel is android:id/content, not the inset window
|
|
216
|
+
test('dialog: the panel is android:id/content, not the inset window; the backboard recipe is the panel', () => {
|
|
217
217
|
// weather settings dialog on 1080px: window [28,870][1052,1466], panel [70,912][1010,1424]
|
|
218
218
|
const { json, summary } = pack(
|
|
219
219
|
rn('[10,300][390,500]', '', rn('[26,316][374,484]', 'android:id/content', rn('[40,330][360,360]', '', '', 'Title'))),
|
|
@@ -221,8 +221,10 @@ test('dialog: the panel is android:id/content, not the inset window, with the re
|
|
|
221
221
|
assert.equal(json.dialog_panel.boundsPx, '[26,316][374,484]');
|
|
222
222
|
assert.equal(json.dialog_panel.windowWidthRatio, 0.95);
|
|
223
223
|
assert.equal(json.dialog_panel.insetVp, 8);
|
|
224
|
-
assert.match(summary, /dialog window, includes the background inset, not the panel/);
|
|
225
|
-
|
|
224
|
+
assert.match(summary, /dialog window, includes the transparent background inset, not the panel/);
|
|
225
|
+
// the backboard is the panel (348 / 400 = 87%); the inset is not a padding layer
|
|
226
|
+
assert.match(summary, /width: '87%', backgroundBlurStyle: BlurStyle\.NONE/);
|
|
227
|
+
assert.doesNotMatch(summary, /padding\(\{ left: 8, right: 8 \}\)/);
|
|
226
228
|
assert.equal('coordinate_frame' in json, true);
|
|
227
229
|
});
|
|
228
230
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// page_gap.mjs (feature-scope plan F-2): what an existing HarmonyOS page still lacks from its Android page.
|
|
2
|
+
// Run from scripts/: node --test tests/page_gap.test.mjs
|
|
3
|
+
import { test } from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import * as fs from 'node:fs';
|
|
7
|
+
import * as os from 'node:os';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
import { computeGap, etsRefs, main, mappingIndex } from '../page_gap.mjs';
|
|
12
|
+
|
|
13
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const EXTRACT = path.join(HERE, '..', '..', '..', 'a2h-resource-convert', 'scripts', 'extract_page_resources.ts');
|
|
15
|
+
const GAP = path.join(HERE, '..', 'page_gap.mjs');
|
|
16
|
+
const w = (p, s) => { fs.mkdirSync(path.dirname(p), { recursive: true }); fs.writeFileSync(p, s, 'utf8'); return p; };
|
|
17
|
+
|
|
18
|
+
/** An Android cart page whose coupon block was never migrated. */
|
|
19
|
+
function androidCart(root) {
|
|
20
|
+
const res = path.join(root, 'app', 'src', 'main', 'res');
|
|
21
|
+
w(path.join(res, 'values', 'strings.xml'), `<resources>
|
|
22
|
+
<string name="cart_title">购物车</string>
|
|
23
|
+
<string name="coupon_title">使用优惠券</string>
|
|
24
|
+
<string name="checkout">去结算</string>
|
|
25
|
+
</resources>`);
|
|
26
|
+
w(path.join(res, 'values', 'colors.xml'), '<resources><color name="accent">#FFFF5000</color></resources>');
|
|
27
|
+
w(path.join(res, 'drawable', 'ic_coupon.xml'), '<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#000" android:pathData="M0,0h24v24h-24z"/></vector>');
|
|
28
|
+
const layout = w(path.join(res, 'layout', 'fragment_cart.xml'), `<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android">
|
|
29
|
+
<TextView android:id="@+id/cart_title" android:text="@string/cart_title" android:textColor="@color/accent"/>
|
|
30
|
+
<LinearLayout android:id="@+id/coupon_entry">
|
|
31
|
+
<ImageView android:src="@drawable/ic_coupon"/>
|
|
32
|
+
<TextView android:text="@string/coupon_title"/>
|
|
33
|
+
</LinearLayout>
|
|
34
|
+
<Button android:id="@+id/checkout" android:text="@string/checkout"/>
|
|
35
|
+
</LinearLayout>`);
|
|
36
|
+
return { res, layout };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function candidates(root) {
|
|
40
|
+
const { res, layout } = androidCart(root);
|
|
41
|
+
const out = path.join(root, 'work', 'candidates.json');
|
|
42
|
+
const r = spawnSync(process.execPath, [EXTRACT, '--res', res, '--layout', layout, '--out', out], { encoding: 'utf8' });
|
|
43
|
+
assert.equal(r.status, 0, r.stderr + r.stdout);
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
test('etsRefs reads $r and $rawfile references', () => {
|
|
48
|
+
const r = etsRefs("Text($r('app.string.cart_title')) Image($r(\"app.media.ic_coupon\")) $rawfile('lottie/loading.json')");
|
|
49
|
+
assert.ok(r.has('string.cart_title'));
|
|
50
|
+
assert.ok(r.has('media.ic_coupon'));
|
|
51
|
+
assert.ok(r.has('rawfile.lottie/loading.json') && r.has('rawfile.loading'));
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test('mappingIndex takes HarmonyOS names from Mapping Details (values and files)', () => {
|
|
55
|
+
const idx = mappingIndex(`## 三、Android → HarmonyOS 映射明细(Mapping Details)
|
|
56
|
+
| Android Resource Path | Screens | Source | Type | HarmonyOS Target | Kind | Notes |
|
|
57
|
+
|---|---|---|---|---|---|---|
|
|
58
|
+
| res/values/strings.xml#string/coupon_title | Cart | app | string | resources/base/element/string.json#coupon_title_v2 | direct | |
|
|
59
|
+
| res/drawable-xhdpi/ic_bg.9.png | Cart | app | drawable | resources/base/media/ic_bg_9.png | rename | |
|
|
60
|
+
## 四、其它
|
|
61
|
+
| res/values/strings.xml#string/zzz | x | x | x | resources/base/element/string.json#ignored | x | x |`);
|
|
62
|
+
assert.equal(idx.get('string/coupon_title'), 'coupon_title_v2');
|
|
63
|
+
assert.equal(idx.get('drawable/ic_bg'), 'ic_bg_9');
|
|
64
|
+
assert.equal(idx.has('string/zzz'), false, 'only the Mapping Details table counts');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('a cart page converted without its coupon block is partial, and the gap names the block', () => {
|
|
68
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'page-gap-'));
|
|
69
|
+
const cand = JSON.parse(fs.readFileSync(candidates(root), 'utf8'));
|
|
70
|
+
const ets = `@Entry @Component struct CartPage {
|
|
71
|
+
build() { Column() {
|
|
72
|
+
Text($r('app.string.cart_title')).fontColor('#FFFF5000').id('cart_title')
|
|
73
|
+
Button('去结算')
|
|
74
|
+
} }
|
|
75
|
+
}`;
|
|
76
|
+
const gap = computeGap(cand, [ets]);
|
|
77
|
+
assert.equal(gap.verdict, 'partial');
|
|
78
|
+
const name = (rows) => rows.map((r) => `${r.type}/${r.name}`).sort();
|
|
79
|
+
assert.deepEqual(name(gap.present), ['color/accent', 'string/cart_title', 'string/checkout']);
|
|
80
|
+
assert.deepEqual(name(gap.missing), ['drawable/ic_coupon', 'string/coupon_title']);
|
|
81
|
+
assert.equal(gap.present.find((r) => r.name === 'checkout').via, 'value', 'a hand-written page inlines the text');
|
|
82
|
+
assert.equal(gap.present.find((r) => r.name === 'accent').via, 'value');
|
|
83
|
+
assert.equal(gap.missing.find((r) => r.name === 'coupon_title').value, '使用优惠券', 'the gap carries the text to look for');
|
|
84
|
+
assert.ok(gap.ids.missing.includes('coupon_entry'), 'ids are reported apart');
|
|
85
|
+
assert.ok(gap.ids.present.includes('cart_title'));
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
test('verdicts: complete / absent / empty', () => {
|
|
89
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'page-gap-v-'));
|
|
90
|
+
const cand = JSON.parse(fs.readFileSync(candidates(root), 'utf8'));
|
|
91
|
+
const full = "$r('app.string.cart_title') $r('app.string.coupon_title') $r('app.string.checkout') $r('app.color.accent') $r('app.media.ic_coupon')";
|
|
92
|
+
assert.equal(computeGap(cand, [full]).verdict, 'complete');
|
|
93
|
+
assert.equal(computeGap(cand, ["Text('Hello World')"]).verdict, 'absent');
|
|
94
|
+
assert.equal(computeGap({ candidates: [] }, ['x']).verdict, 'empty');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('a mapping rename is followed: the converted name counts, the Android name would not', () => {
|
|
98
|
+
const cand = { candidates: [{ type: 'string', name: 'coupon_title', kind: 'value', resolved: true, sources: [] }] };
|
|
99
|
+
const m = new Map([['string/coupon_title', 'coupon_title_v2']]);
|
|
100
|
+
assert.equal(computeGap(cand, ["$r('app.string.coupon_title_v2')"], m).verdict, 'complete');
|
|
101
|
+
assert.equal(computeGap(cand, ["$r('app.string.coupon_title')"], m).verdict, 'absent');
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
test('CLI: writes the report, prints a summary, refuses bad usage', () => {
|
|
105
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'page-gap-cli-'));
|
|
106
|
+
const cand = candidates(root);
|
|
107
|
+
const ets = w(path.join(root, 'hmos', 'entry', 'src', 'main', 'ets', 'pages', 'CartPage.ets'), "Text($r('app.string.cart_title'))");
|
|
108
|
+
const out = path.join(root, 'work', 'gap.json');
|
|
109
|
+
const r = spawnSync(process.execPath, [GAP, '--candidates', cand, '--ets', ets, '--out', out], { encoding: 'utf8' });
|
|
110
|
+
assert.equal(r.status, 0, r.stderr);
|
|
111
|
+
assert.equal(JSON.parse(r.stdout).verdict, 'partial');
|
|
112
|
+
assert.equal(JSON.parse(fs.readFileSync(out, 'utf8')).harmony_files.length, 1);
|
|
113
|
+
assert.equal(main(['--candidates', cand]), 2);
|
|
114
|
+
assert.equal(main(['--bogus', 'x']), 2);
|
|
115
|
+
});
|
|
@@ -109,14 +109,36 @@ describe('Check', () => {
|
|
|
109
109
|
fs.writeFileSync(path.join(ets, 'pages', 'P.ets'), '// Curve.kt:3\nstruct Q {}\n', 'utf8');
|
|
110
110
|
const androidRoot = path.join(temp, 'android');
|
|
111
111
|
const plain = pc.check(hp, ['pages/P.ets'], null, null, androidRoot);
|
|
112
|
-
|
|
112
|
+
// N3: without a report no waiver can be read: a candidate, never a block the fix loop cannot clear
|
|
113
|
+
assert.deepEqual(plain.drawing_uncovered, []);
|
|
114
|
+
assert.equal(plain.drawing_candidates.length, 1);
|
|
113
115
|
assert.deepEqual(plain.degrade_reason_ruled_out, []);
|
|
116
|
+
// drawn elsewhere in the ets root: covered
|
|
117
|
+
fs.mkdirSync(path.join(ets, 'components'), { recursive: true });
|
|
118
|
+
fs.writeFileSync(path.join(ets, 'components', 'CurveView.ets'), '// Curve.kt:3\n@Component struct CurveView { build() { Canvas(this.ctx) } }\n', 'utf8');
|
|
119
|
+
assert.deepEqual(pc.check(hp, ['pages/P.ets'], null, null, androidRoot).drawing_candidates, []);
|
|
120
|
+
fs.rmSync(path.join(ets, 'components', 'CurveView.ets'));
|
|
114
121
|
const rf = path.join(temp, 'my.report.md');
|
|
115
122
|
fs.writeFileSync(rf, '- Curve 不适用:本页不展示曲线\n- 面板已降级(未采集)\n', 'utf8');
|
|
116
123
|
const withReport = pc.check(hp, ['pages/P.ets'], null, null, androidRoot, rf);
|
|
117
124
|
assert.deepEqual(withReport.drawing_uncovered, []);
|
|
118
125
|
assert.equal(withReport.degrade_reason_ruled_out.length, 1);
|
|
119
|
-
assert.equal(withReport.blocking - plain.blocking,
|
|
126
|
+
assert.equal(withReport.blocking - plain.blocking, 1); // the degrade reason; the drawing was waived
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test('state-branch list rows read --report: a missing branch blocks, a symbol-only row does not', () => {
|
|
130
|
+
fs.writeFileSync(path.join(ets, 'pages', 'P.ets'), 'struct Q {}\n', 'utf8');
|
|
131
|
+
const rf = path.join(temp, 'branch.report.md');
|
|
132
|
+
fs.writeFileSync(rf, '状态分支清单:\n\n| 状态 | 条件 | 捕获 | 鸿蒙侧 |\n|---|---|---|---|\n' +
|
|
133
|
+
'| 无地址 | A.kt:1 | 未捕获 | 未实现 null 分支 |\n| 空态 | A.kt:2 | 未捕获 | EmptyView builder |\n' +
|
|
134
|
+
'| 加载 | A.kt:3 | 未捕获 | P.ets:1 |\n', 'utf8');
|
|
135
|
+
const plain = pc.check(hp, ['pages/P.ets']);
|
|
136
|
+
const r = pc.check(hp, ['pages/P.ets'], null, null, null, rf);
|
|
137
|
+
assert.equal(r.branch_uncovered.length, 1);
|
|
138
|
+
assert.match(r.branch_uncovered[0], /^report:5 /);
|
|
139
|
+
assert.equal(r.branch_unlocated.length, 1);
|
|
140
|
+
assert.equal(r.blocking - plain.blocking, 1);
|
|
141
|
+
assert.match(pc.render(r), /\[branch_uncovered\][^\n]*: 1/);
|
|
120
142
|
});
|
|
121
143
|
|
|
122
144
|
test('unbalanced and missing', () => {
|
|
@@ -323,3 +345,12 @@ describe('Check', () => {
|
|
|
323
345
|
function require_sha1(t) {
|
|
324
346
|
return crypto.createHash('sha1').update(t, 'utf8').digest('hex');
|
|
325
347
|
}
|
|
348
|
+
|
|
349
|
+
// L3: every Step 6.x the SKILL cites is a defined heading
|
|
350
|
+
test('every Step 6.x cited in SKILL.md is defined', () => {
|
|
351
|
+
const skill = fs.readFileSync(path.join(import.meta.dirname, '..', '..', 'SKILL.md'), 'utf8');
|
|
352
|
+
const defined = new Set([...skill.matchAll(/^###\s+Step\s+(6\.\d+)/gm)].map((m) => m[1]));
|
|
353
|
+
const cited = new Set([...skill.matchAll(/\b(?:Steps?\s+)?6\.(\d+)(?:–6\.(\d+))?/g)]
|
|
354
|
+
.flatMap((m) => (m[2] ? [`6.${m[1]}`, `6.${m[2]}`] : [`6.${m[1]}`])));
|
|
355
|
+
for (const c of cited) assert.ok(defined.has(c), `Step ${c} is cited but not defined`);
|
|
356
|
+
});
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// progress_identity.mjs: scope_id and the resume identity of batch_progress.json.
|
|
2
|
+
// Run from scripts/: node --test tests/progress_identity.test.mjs
|
|
3
|
+
import { test, describe, beforeEach, afterEach } from 'node:test';
|
|
4
|
+
import assert from 'node:assert/strict';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import * as fs from 'node:fs';
|
|
7
|
+
import * as os from 'node:os';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
import * as pi from '../progress_identity.mjs';
|
|
12
|
+
import * as bcs from '../build_conversion_set.mjs';
|
|
13
|
+
|
|
14
|
+
const SCRIPT = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'progress_identity.mjs');
|
|
15
|
+
|
|
16
|
+
describe('progress identity', () => {
|
|
17
|
+
let hp; let scopeA; let scopeB;
|
|
18
|
+
const pf = () => path.join(hp, '.hometrans', 'batch_progress.json');
|
|
19
|
+
const prog = () => JSON.parse(fs.readFileSync(pf(), 'utf8'));
|
|
20
|
+
const write = (p, v) => { fs.mkdirSync(path.dirname(p), { recursive: true }); fs.writeFileSync(p, JSON.stringify(v), 'utf8'); };
|
|
21
|
+
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
hp = fs.mkdtempSync(path.join(os.tmpdir(), 'pi-'));
|
|
24
|
+
scopeA = path.join(hp, '.hometrans', 'incremental', 'a.json');
|
|
25
|
+
scopeB = path.join(hp, '.hometrans', 'incremental', 'b.json');
|
|
26
|
+
write(scopeA, { scope: ['fragment:Inbox', 'fragment:About'] });
|
|
27
|
+
write(scopeB, ['fragment:Home']);
|
|
28
|
+
});
|
|
29
|
+
afterEach(() => fs.rmSync(hp, { recursive: true, force: true }));
|
|
30
|
+
|
|
31
|
+
test('scope_id ignores order and duplicates, differs per member set, and equals the plan stamp', () => {
|
|
32
|
+
const a = pi.scopeId(['b', 'a', 'a']);
|
|
33
|
+
assert.equal(a, pi.scopeId(['a', 'b']));
|
|
34
|
+
assert.match(a, /^inc-2-[0-9a-f]{12}$/);
|
|
35
|
+
assert.notEqual(a, pi.scopeId(['a']));
|
|
36
|
+
assert.notEqual(a, pi.scopeId(['a', 'c']));
|
|
37
|
+
assert.equal(bcs.scopeIdOf(['b', 'a']), a);
|
|
38
|
+
assert.throws(() => pi.scopeId([]));
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test('new → resume (stage markers honoured only with their files) → restart on another scope', () => {
|
|
42
|
+
let r = pi.resume(hp, 'incremental', scopeA);
|
|
43
|
+
assert.equal(r.action, 'new');
|
|
44
|
+
assert.equal(prog().scope_id, r.scope_id);
|
|
45
|
+
assert.equal(prog().mode, 'incremental');
|
|
46
|
+
|
|
47
|
+
pi.mark(hp, 'resources', scopeA);
|
|
48
|
+
pi.mark(hp, 'capture', scopeA);
|
|
49
|
+
r = pi.resume(hp, 'incremental', scopeA);
|
|
50
|
+
assert.equal(r.action, 'resume');
|
|
51
|
+
assert.deepEqual(r.skip, { resources: false, capture: false }, 'markers without their outputs skip nothing');
|
|
52
|
+
write(path.join(hp, '.hometrans', 'resource_mapping.md'), '');
|
|
53
|
+
write(path.join(hp, '.hometrans', 'ui_info', 'pages.json'), { pages: [] });
|
|
54
|
+
assert.deepEqual(pi.resume(hp, 'incremental', scopeA).skip, { resources: true, capture: true });
|
|
55
|
+
|
|
56
|
+
// the same members in another file and order: still the same run
|
|
57
|
+
write(scopeA, ['fragment:About', 'fragment:Inbox', 'fragment:About']);
|
|
58
|
+
assert.equal(pi.resume(hp, 'incremental', scopeA).action, 'resume');
|
|
59
|
+
|
|
60
|
+
// a second scope: the old progress is archived and nothing is skipped
|
|
61
|
+
const old = prog();
|
|
62
|
+
r = pi.resume(hp, 'incremental', scopeB);
|
|
63
|
+
assert.equal(r.action, 'restart');
|
|
64
|
+
assert.match(r.why, /scope_id/);
|
|
65
|
+
assert.deepEqual(r.skip, { resources: false, capture: false });
|
|
66
|
+
assert.deepEqual(JSON.parse(fs.readFileSync(r.archived, 'utf8')), old);
|
|
67
|
+
assert.ok(r.archived.endsWith(`batch_progress.${old.scope_id}.json`));
|
|
68
|
+
assert.deepEqual(prog().stages, {});
|
|
69
|
+
assert.equal(prog().scope_id, r.scope_id);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test('a marker from another scope never counts, and mark refuses a foreign identity', () => {
|
|
73
|
+
pi.resume(hp, 'incremental', scopeA);
|
|
74
|
+
pi.mark(hp, 'resources', scopeA);
|
|
75
|
+
assert.throws(() => pi.mark(hp, 'capture', scopeB), (e) => e.refused === true);
|
|
76
|
+
// hand-edited: a marker stamped with another scope_id is not this run's
|
|
77
|
+
const p = prog();
|
|
78
|
+
p.stages.resources.scope_id = 'inc-1-000000000000';
|
|
79
|
+
write(pf(), p);
|
|
80
|
+
write(path.join(hp, '.hometrans', 'resource_mapping.md'), '');
|
|
81
|
+
assert.equal(pi.resume(hp, 'incremental', scopeA).skip.resources, false);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('full mode: a legacy file without mode/scope_id is a full run; incremental after it restarts', () => {
|
|
85
|
+
write(pf(), { harmony_project_dir: hp, ui_module: 'products/phone', paradigm: 'V1',
|
|
86
|
+
stages: { resources: { done: true } }, pages: { page_0001_A: { status: 'done' } } });
|
|
87
|
+
write(path.join(hp, '.hometrans', 'resource_mapping.md'), '');
|
|
88
|
+
let r = pi.resume(hp, 'full');
|
|
89
|
+
assert.equal(r.action, 'resume');
|
|
90
|
+
assert.equal(r.skip.resources, true, 'a full-run marker has no scope_id, and full mode has none');
|
|
91
|
+
|
|
92
|
+
r = pi.resume(hp, 'incremental', scopeA);
|
|
93
|
+
assert.equal(r.action, 'restart');
|
|
94
|
+
assert.ok(r.archived.endsWith('batch_progress.full.json'));
|
|
95
|
+
// project facts survive the restart, run state does not
|
|
96
|
+
assert.equal(prog().ui_module, 'products/phone');
|
|
97
|
+
assert.equal(prog().paradigm, 'V1');
|
|
98
|
+
assert.deepEqual(prog().pages, {});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test('another harmony_project_dir restarts; archives never overwrite each other', () => {
|
|
102
|
+
write(pf(), { harmony_project_dir: path.join(hp, 'elsewhere'), mode: 'full', stages: {}, pages: {} });
|
|
103
|
+
const r1 = pi.resume(hp, 'full');
|
|
104
|
+
assert.equal(r1.action, 'restart');
|
|
105
|
+
assert.match(r1.why, /harmony_project_dir/);
|
|
106
|
+
write(pf(), { harmony_project_dir: path.join(hp, 'elsewhere2'), mode: 'full' });
|
|
107
|
+
const r2 = pi.resume(hp, 'full');
|
|
108
|
+
assert.notEqual(r1.archived, r2.archived);
|
|
109
|
+
assert.ok(fs.existsSync(r1.archived) && fs.existsSync(r2.archived));
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('full → incremental → full restores the full run instead of starting over', () => {
|
|
113
|
+
write(path.join(hp, '.hometrans', 'resource_mapping.md'), '');
|
|
114
|
+
assert.equal(pi.resume(hp, 'full').action, 'new');
|
|
115
|
+
pi.mark(hp, 'resources');
|
|
116
|
+
const p = prog();
|
|
117
|
+
p.pages = { page_0001_A: { status: 'done', output: 'pages/A.ets' } };
|
|
118
|
+
write(pf(), p);
|
|
119
|
+
const full = prog();
|
|
120
|
+
|
|
121
|
+
let r = pi.resume(hp, 'incremental', scopeA);
|
|
122
|
+
assert.equal(r.action, 'restart');
|
|
123
|
+
assert.ok(r.archived.endsWith('batch_progress.full.json'));
|
|
124
|
+
pi.mark(hp, 'resources', scopeA);
|
|
125
|
+
const inc = prog();
|
|
126
|
+
|
|
127
|
+
r = pi.resume(hp, 'full');
|
|
128
|
+
assert.equal(r.action, 'restore');
|
|
129
|
+
assert.ok(r.restored.endsWith('batch_progress.full.json'));
|
|
130
|
+
assert.ok(r.archived.endsWith(`batch_progress.${inc.scope_id}.json`));
|
|
131
|
+
assert.deepEqual(prog(), full, 'the full run comes back unchanged');
|
|
132
|
+
assert.equal(r.skip.resources, true, 'Step 2 is skipped, so the merged element JSON survives');
|
|
133
|
+
assert.ok(!fs.existsSync(path.join(hp, '.hometrans', 'batch_progress.full.json')));
|
|
134
|
+
assert.equal(pi.resume(hp, 'full').action, 'resume');
|
|
135
|
+
|
|
136
|
+
// an incremental scope is never restored: back to scope A starts over
|
|
137
|
+
assert.equal(pi.resume(hp, 'incremental', scopeA).action, 'restart');
|
|
138
|
+
assert.deepEqual(prog().stages, {});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
test('restore picks the newest matching full archive and ignores one of another project', () => {
|
|
142
|
+
const meta = path.join(hp, '.hometrans');
|
|
143
|
+
write(path.join(meta, 'batch_progress.full.json'), { harmony_project_dir: hp, mode: 'full', updated_at: '2026-01-01', pages: { old: {} } });
|
|
144
|
+
write(path.join(meta, 'batch_progress.full.2.json'), { harmony_project_dir: hp, mode: 'full', updated_at: '2026-02-01', pages: { new: {} } });
|
|
145
|
+
write(path.join(meta, 'batch_progress.full.3.json'), { harmony_project_dir: path.join(hp, 'x'), mode: 'full', updated_at: '2026-03-01', pages: {} });
|
|
146
|
+
const r = pi.resume(hp, 'full');
|
|
147
|
+
assert.equal(r.action, 'restore', 'no batch_progress.json at all still restores');
|
|
148
|
+
assert.equal(r.archived, null);
|
|
149
|
+
assert.deepEqual(Object.keys(prog().pages), ['new']);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
test('project paths compare case-insensitively on Windows only', () => {
|
|
153
|
+
const upper = hp.toUpperCase() === hp ? hp.toLowerCase() : hp.toUpperCase();
|
|
154
|
+
const why = pi.mismatch({ harmony_project_dir: upper, mode: 'full' }, { harmony_project_dir: hp, mode: 'full', scope_id: null });
|
|
155
|
+
if (process.platform === 'win32') assert.equal(why, '');
|
|
156
|
+
else assert.match(why, /harmony_project_dir/);
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
test('CLI: usage errors exit 2, a refused mark exits 1', () => {
|
|
160
|
+
const run = (...a) => spawnSync(process.execPath, [SCRIPT, ...a], { encoding: 'utf8' });
|
|
161
|
+
assert.equal(run('resume', hp, '--mode', 'incremental').status, 2, 'incremental needs --scope');
|
|
162
|
+
assert.equal(run('resume', hp, '--mode', 'full', '--scope', scopeA).status, 2);
|
|
163
|
+
assert.equal(run('bogus').status, 2);
|
|
164
|
+
let r = run('resume', hp, '--mode', 'incremental', '--scope', scopeA);
|
|
165
|
+
assert.equal(r.status, 0, r.stderr);
|
|
166
|
+
assert.equal(JSON.parse(r.stdout).action, 'new');
|
|
167
|
+
r = run('scope-id', '--scope', scopeA);
|
|
168
|
+
assert.equal(JSON.parse(r.stdout).scope_id, prog().scope_id);
|
|
169
|
+
assert.equal(run('mark', hp, '--stage', 'capture', '--scope', scopeB).status, 1);
|
|
170
|
+
assert.equal(run('mark', hp, '--stage', 'bogus', '--scope', scopeA).status, 2);
|
|
171
|
+
assert.equal(run('mark', hp, '--stage', 'capture', '--scope', scopeA).status, 0);
|
|
172
|
+
assert.equal(prog().stages.capture.scope_id, prog().scope_id);
|
|
173
|
+
});
|
|
174
|
+
});
|
|
@@ -252,6 +252,8 @@ test('theme: dark scheme plus a variable primary is light-dark+runtime-color wit
|
|
|
252
252
|
assert.deepEqual(t.hits_dark.map((h) => `${h.keyword}@${h.at.split(':')[1]}`),
|
|
253
253
|
['darkColorScheme@3', 'isSystemInDarkTheme@8']);
|
|
254
254
|
assert.deepEqual(t.hits_runtime.map((h) => h.at.split(':')[1]), ['10']);
|
|
255
|
+
assert.deepEqual(t.runtime_slots, ['primary']);
|
|
256
|
+
assert.equal(t.state_module, sc.THEME_STATE_MODULE);
|
|
255
257
|
});
|
|
256
258
|
|
|
257
259
|
test('theme: a constant primary and no dark signal is static', () => {
|
|
@@ -284,6 +286,8 @@ test('theme: the contract md states the mode and the resource-qualifier policy',
|
|
|
284
286
|
assert.match(md, /Theme mechanism — \*\*light-dark\+runtime-color\*\*/);
|
|
285
287
|
assert.match(md, /resources\/dark\/element\/color\.json/);
|
|
286
288
|
assert.match(md, /observable theme state/);
|
|
289
|
+
assert.match(md, /`runtime_slots` — `primary`; `state_module` — `entry\/src\/main\/ets\/common\/ThemeState\.ets` \(entry group only\)/);
|
|
290
|
+
assert.ok(c.owned_by_entry_group.includes(sc.THEME_STATE_MODULE));
|
|
287
291
|
});
|
|
288
292
|
|
|
289
293
|
test('theme: Theme Builder constants (primaryLight / val X = Color(...)) are not a runtime primary', () => {
|
|
@@ -294,4 +298,5 @@ test('theme: Theme Builder constants (primaryLight / val X = Color(...)) are not
|
|
|
294
298
|
});
|
|
295
299
|
const t = sc.themeFacts(a, src);
|
|
296
300
|
assert.deepEqual([t.mode, t.hits_runtime], ['static', []]);
|
|
301
|
+
assert.equal('runtime_slots' in t, false);
|
|
297
302
|
});
|