@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
|
@@ -30,7 +30,9 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
30
30
|
|
|
31
31
|
import { _reported, _replace, _uiModule, etsSplit, reportPath } from './group_watch.mjs';
|
|
32
32
|
import { textColorDiff } from './text_color_diff.mjs';
|
|
33
|
+
import { iconCoverage } from './icon_coverage.mjs';
|
|
33
34
|
import { degradeReasons, drawCoverage } from './draw_coverage.mjs';
|
|
35
|
+
import { branchCoverage } from './branch_coverage.mjs';
|
|
34
36
|
|
|
35
37
|
// ---------------------------------------------------------------- Python compatibility layer
|
|
36
38
|
// The output is a contract read by the agent and must match the original Python version byte for byte: JSON in json.dumps format
|
|
@@ -562,11 +564,13 @@ function setdefault(m, k, d) {
|
|
|
562
564
|
}
|
|
563
565
|
|
|
564
566
|
/** Runs arkts_static_check.ts and keeps the GATE / CANDIDATES rows for `files`. Returns [result, error]. */
|
|
565
|
-
export function staticGate(ets, res, files, android = '') {
|
|
567
|
+
export function staticGate(ets, res, files, android = '', baseline = '') {
|
|
566
568
|
const script = path.join(HERE, 'arkts_static_check.ts');
|
|
567
569
|
const args = [script, '--ets', pathStr(ets), '--resources', pathStr(res)];
|
|
568
570
|
// --android enables the source-side rules (framework-picker-appearance, android-immersive-not-mirrored)
|
|
569
571
|
if (android) args.push('--android', pathStr(android));
|
|
572
|
+
// incremental mode: findings the project had before the run (Step 4.4) stay out of [GATE] / [CANDIDATES]
|
|
573
|
+
if (baseline) args.push('--baseline', pathStr(baseline));
|
|
570
574
|
const r = spawnSync(process.execPath, args, { timeout: 300 * 1000, maxBuffer: 1 << 30, windowsHide: true });
|
|
571
575
|
if (r.error) {
|
|
572
576
|
const e = r.error;
|
|
@@ -602,6 +606,8 @@ export function staticGate(ets, res, files, android = '') {
|
|
|
602
606
|
section = 'gate';
|
|
603
607
|
} else if (line.startsWith('[CANDIDATES]')) {
|
|
604
608
|
section = 'cand';
|
|
609
|
+
} else if (line.startsWith('[BASELINE]')) {
|
|
610
|
+
section = null;
|
|
605
611
|
}
|
|
606
612
|
const m = STATIC_LINE.exec(line);
|
|
607
613
|
if (m && (section === 'gate' || section === 'cand')) {
|
|
@@ -637,7 +643,7 @@ export function roundsName(key) {
|
|
|
637
643
|
* `entry/src/main/ets/pages/A.ets` is `pages/A.ets` to it); findings are mapped back to the
|
|
638
644
|
* name each file was given.
|
|
639
645
|
*/
|
|
640
|
-
export function gateByModule(ets, res, files, rootOf, android = '') {
|
|
646
|
+
export function gateByModule(ets, res, files, rootOf, android = '', baseline = '') {
|
|
641
647
|
const ui = path.resolve(ets);
|
|
642
648
|
const by = new Map();
|
|
643
649
|
for (const rel of files) {
|
|
@@ -645,11 +651,11 @@ export function gateByModule(ets, res, files, rootOf, android = '') {
|
|
|
645
651
|
if (!by.has(root)) by.set(root, new Map());
|
|
646
652
|
by.get(root).set(inner, rel);
|
|
647
653
|
}
|
|
648
|
-
if (!by.size) return hooks.staticGate(ets, res, files, android);
|
|
654
|
+
if (!by.size) return hooks.staticGate(ets, res, files, android, baseline);
|
|
649
655
|
const merged = { mine: [], batch_level: 0 };
|
|
650
656
|
for (const [root, names] of by) {
|
|
651
|
-
const [g, e] = root === ui ? hooks.staticGate(ets, res, [...names.keys()], android)
|
|
652
|
-
: hooks.staticGate(root, path.join(path.dirname(root), 'resources'), [...names.keys()], android);
|
|
657
|
+
const [g, e] = root === ui ? hooks.staticGate(ets, res, [...names.keys()], android, baseline)
|
|
658
|
+
: hooks.staticGate(root, path.join(path.dirname(root), 'resources'), [...names.keys()], android, baseline);
|
|
653
659
|
if (g === null) return [null, root === ui ? e : `${e} (module ${root})`];
|
|
654
660
|
merged.batch_level += g.batch_level ?? 0;
|
|
655
661
|
for (const f of g.mine) {
|
|
@@ -749,7 +755,13 @@ export function check(hp, files, rnd = null, group = null, android = null, repor
|
|
|
749
755
|
}
|
|
750
756
|
|
|
751
757
|
const android_ = androidDir(meta, progress, android);
|
|
752
|
-
|
|
758
|
+
// the incremental baseline (SKILL.md Step 2), only for an incremental campaign: a full run never
|
|
759
|
+
// excuses a finding, even when an earlier incremental run left the file behind. The file is named
|
|
760
|
+
// after the scope, so another scope's baseline (recorded before that scope's writes) is never used.
|
|
761
|
+
const scopeId = get(progress, 'scope_id');
|
|
762
|
+
const baselineF = /^[\w.-]+$/.test(scopeId ?? '') ? pjoin(meta, 'work', `static_baseline.${scopeId}.json`) : '';
|
|
763
|
+
const baseline_ = get(progress, 'mode') === 'incremental' && baselineF && isFile(baselineF) ? baselineF : '';
|
|
764
|
+
const [gate, gateErr] = gateByModule(ets, res, rep.files, rootOf, android_, baseline_);
|
|
753
765
|
rep.static = gate !== null ? gate : { error: gateErr };
|
|
754
766
|
if (truthy(gate)) {
|
|
755
767
|
rep.blocking += gate.mine.filter((g) => g.kind === 'gate').length;
|
|
@@ -809,6 +821,7 @@ export function check(hp, files, rnd = null, group = null, android = null, repor
|
|
|
809
821
|
}
|
|
810
822
|
// Measured text color vs code text color (text_color_diff.mjs): page_dirs to compare only exist with --group
|
|
811
823
|
rep.text_color = { gate: [], cand: [], checked: 0, pages: 0 };
|
|
824
|
+
rep.icons = { gate: [], cand: [], checked: 0, drift: [], pages: 0 };
|
|
812
825
|
if (group) {
|
|
813
826
|
const uiInfo = String(or(get(progress, 'ui_info_root'), pjoin(meta, 'ui_info')));
|
|
814
827
|
const groups = get(get(loadDict(pjoin(uiInfo, 'conversion_set.json')), 'plan', {}), 'groups', []);
|
|
@@ -829,6 +842,9 @@ export function check(hp, files, rnd = null, group = null, android = null, repor
|
|
|
829
842
|
const resRoots = [res, ...[...resOf.keys()].map((r) => path.join(path.dirname(r), 'resources'))];
|
|
830
843
|
rep.text_color = { ...textColorDiff({ uiInfo, pageDirs, files: texts, etsAll, resRoots: [...new Set(resRoots)] }), pages: pageDirs.length };
|
|
831
844
|
rep.blocking += rep.text_color.gate.length;
|
|
845
|
+
// Reference icons vs ICON markers in code (icon_coverage.mjs)
|
|
846
|
+
rep.icons = { ...iconCoverage({ uiInfo, pageDirs, files: texts, shared: etsAll }), pages: pageDirs.length };
|
|
847
|
+
rep.blocking += rep.icons.gate.length;
|
|
832
848
|
}
|
|
833
849
|
}
|
|
834
850
|
// Custom drawing in reach of this group without a drawing Harmony counterpart, and degraded lines whose only reason
|
|
@@ -836,9 +852,53 @@ export function check(hp, files, rnd = null, group = null, android = null, repor
|
|
|
836
852
|
// (queue_logs/<GID>.report.md); with neither, waivers cannot be read and the reason check has nothing to read.
|
|
837
853
|
const reportFile = report ? String(report) : (group ? reportPath(meta, group) : '');
|
|
838
854
|
const reportText = reportFile && isFile(reportFile) ? readText(reportFile, true) : '';
|
|
839
|
-
|
|
855
|
+
// N3: with no report (--files alone) a waiver ("不适用") cannot be read, so a finding here could never
|
|
856
|
+
// be cleared and blocked the fix loop for good. Then the whole ets root counts as coverage (the drawing
|
|
857
|
+
// may live in a component outside the changed files) and what remains is a non-blocking candidate.
|
|
858
|
+
if (android_ && !reportFile) {
|
|
859
|
+
const whole = [];
|
|
860
|
+
const walkEts = (d) => {
|
|
861
|
+
let es = [];
|
|
862
|
+
try { es = fs.readdirSync(d, { withFileTypes: true }); } catch { return; }
|
|
863
|
+
for (const e of es) {
|
|
864
|
+
const p = path.join(d, e.name);
|
|
865
|
+
if (e.isDirectory()) walkEts(p);
|
|
866
|
+
else if (e.name.endsWith('.ets')) { try { whole.push([path.relative(ets, p).split(path.sep).join('/'), fs.readFileSync(p, 'utf8')]); } catch { /* skip */ } }
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
walkEts(ets);
|
|
870
|
+
const seen = new Set([...texts.keys()]);
|
|
871
|
+
rep.drawing_candidates = drawCoverage({ android: android_, etsTexts: [...texts, ...whole.filter(([r]) => !seen.has(r))], reportText }).missing;
|
|
872
|
+
rep.drawing_uncovered = [];
|
|
873
|
+
} else {
|
|
874
|
+
rep.drawing_uncovered = android_ ? drawCoverage({ android: android_, etsTexts: texts, reportText }).missing : [];
|
|
875
|
+
}
|
|
840
876
|
rep.degrade_reason_ruled_out = degradeReasons(reportText);
|
|
841
877
|
rep.blocking += rep.drawing_uncovered.length + rep.degrade_reason_ruled_out.length;
|
|
878
|
+
// Uncaptured rows of the report's state-branch list: a missing branch, or a cited .ets / line that does not exist,
|
|
879
|
+
// blocks; a row naming no .ets line is listed for the reviewer (branch_coverage.mjs). A row may cite a file of any
|
|
880
|
+
// module, so line counts come from the whole project.
|
|
881
|
+
const projectLines = new Map();
|
|
882
|
+
if (reportText) {
|
|
883
|
+
const walk = (d) => {
|
|
884
|
+
let es = [];
|
|
885
|
+
try { es = fs.readdirSync(d, { withFileTypes: true }); } catch { return; }
|
|
886
|
+
for (const e of es) {
|
|
887
|
+
const p = path.join(d, e.name);
|
|
888
|
+
if (e.isDirectory()) {
|
|
889
|
+
if (e.name !== 'build' && e.name !== 'oh_modules' && e.name !== 'node_modules' && !e.name.startsWith('.')) walk(p);
|
|
890
|
+
} else if (e.name.endsWith('.ets')) {
|
|
891
|
+
// every file of a name: modules often share Index.ets / MainPage.ets, and the first one met is not the one meant
|
|
892
|
+
try { setdefault(projectLines, e.name, []).push(fs.readFileSync(p, 'utf8').split(/\r?\n/).length); } catch { /* skip */ }
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
walk(hp);
|
|
897
|
+
}
|
|
898
|
+
const branches = branchCoverage({ reportText, etsTexts: texts, projectLines });
|
|
899
|
+
rep.branch_uncovered = branches.failed;
|
|
900
|
+
rep.branch_unlocated = branches.unlocated;
|
|
901
|
+
rep.blocking += rep.branch_uncovered.length;
|
|
842
902
|
rep.unresolved_resources = unresolved;
|
|
843
903
|
rep.evidence_misnamed = misnamed;
|
|
844
904
|
const usesLottie = [...texts.values()].some((t) => t.toLowerCase().includes('lottie'));
|
|
@@ -865,7 +925,10 @@ export function render(rep) {
|
|
|
865
925
|
['evidence_misnamed', 'EVIDENCE(name) not a Phase 5 heading verbatim (blocking: rename)'],
|
|
866
926
|
['braces', 'brace balance (blocking)'],
|
|
867
927
|
['drawing_uncovered', 'Android custom drawing (Canvas/onDraw) with no drawing Harmony counterpart (blocking)'],
|
|
928
|
+
['drawing_candidates', 'Android custom drawing with no drawing counterpart anywhere in the ets root; no report to read a waiver from (candidate, not blocking: confirm with --group / --report)'],
|
|
929
|
+
['branch_uncovered', 'state-branch list: uncaptured rows that say the branch is missing, or cite a .ets / line that does not exist (blocking)'],
|
|
868
930
|
['degrade_reason_ruled_out', 'degraded item whose only reason is not-captured / not collected / data layer not wired / unreachable — implement it from source, or name the platform gap (blocking)'],
|
|
931
|
+
['branch_unlocated', 'state-branch list: uncaptured rows with no .ets file:line (give the line, or \u4e0d\u9002\u7528 with the reason)'],
|
|
869
932
|
['evidence_uncovered_B', 'B-tier items with no EVIDENCE tag in these files (add one, or state N/A in the report)'],
|
|
870
933
|
['evidence_overlong', 'EVIDENCE blocks over budget (compress: conclusion + source pointer)'],
|
|
871
934
|
['forbidden_or_candidates', 'patterns to justify or fix'],
|
|
@@ -879,7 +942,8 @@ export function render(rep) {
|
|
|
879
942
|
const cands = mine.filter((g) => g.kind === 'cand');
|
|
880
943
|
outp.push(`\n[static GATE, these files] ${gates.length} (blocking)`);
|
|
881
944
|
outp.push(...gates.map((g) => ` ${pad26(g.rule)} ${g.at} ${g.msg}`));
|
|
882
|
-
outp.push(`[static CANDIDATES, these files] ${cands.length} — annotate in the matching EVIDENCE item`
|
|
945
|
+
outp.push(`[static CANDIDATES, these files] ${cands.length} — annotate in the matching EVIDENCE item ` +
|
|
946
|
+
'(a GATE is closed only by the fix or by the downgrade marker the checker verifies, never by EVIDENCE text)');
|
|
883
947
|
outp.push(...cands.map((g) => ` ${pad26(g.rule)} ${g.at}`));
|
|
884
948
|
if (truthy(get(st, 'batch_level'))) {
|
|
885
949
|
outp.push(`[static] ${st.batch_level} batch-level hit(s) (orphan/unreachable) — Step 5.5 wiring sub-agent`);
|
|
@@ -895,6 +959,16 @@ export function render(rep) {
|
|
|
895
959
|
outp.push(' Fix: write .fontColor() under the same state condition as the background (a Span inherits its outer Text); when the difference is confirmed as intended, write // COLOR-DIFF-OK: <basis> above it');
|
|
896
960
|
}
|
|
897
961
|
}
|
|
962
|
+
const ic = rep.icons;
|
|
963
|
+
if (ic && ic.pages) {
|
|
964
|
+
outp.push(`\n[icons] reference icons vs // ICON markers (${ic.checked} icons): GATE ${ic.gate.length} (blocking), CAND ${ic.cand.length}`);
|
|
965
|
+
outp.push(...ic.drift.map((x) => ` [drift] ${x}`));
|
|
966
|
+
outp.push(...ic.gate.map((x) => ` ${x}`));
|
|
967
|
+
outp.push(...ic.cand.map((x) => ` [cand] ${x}`));
|
|
968
|
+
if (ic.gate.length) {
|
|
969
|
+
outp.push(' Fix: render the icon and put // ICON: <key> on (or up to 3 lines above) its Image/SymbolGlyph line; ICON-OMIT is refused when the reference measurably draws it');
|
|
970
|
+
}
|
|
971
|
+
}
|
|
898
972
|
for (const [k, title] of sections) {
|
|
899
973
|
const v = or(rep[k], []);
|
|
900
974
|
outp.push(`\n[${k}] ${title}: ${v.length}`);
|
|
@@ -865,11 +865,17 @@ export const THEME_POLICY = {
|
|
|
865
865
|
'bindSheet / bindPopup / CustomDialog take `backgroundColor` explicitly (the sheet default is ' +
|
|
866
866
|
'Color.White). A colour identical in both Android schemes may stay a literal under ' +
|
|
867
867
|
'`// THEME-FIXED: <both scheme lines>`.',
|
|
868
|
-
runtime: 'The user picks a colour at runtime (`hits_runtime`):
|
|
869
|
-
'state (per PARADIGM) through
|
|
870
|
-
'
|
|
868
|
+
runtime: 'The user picks a colour at runtime (`hits_runtime`): every use of a `runtime_slots` colour reads ' +
|
|
869
|
+
'it from the one observable theme state at `state_module` (per PARADIGM) through a getter, never ' +
|
|
870
|
+
"`$r('app.color.<slot>')` (a compile-time resource that ignores the user's choice, GATE " +
|
|
871
|
+
'`theme-runtime-color-static`) and never a `static readonly` constant. The entry group creates that ' +
|
|
872
|
+
'module with the Android default as its initial value; every other group waits for it (waits_for in the plan), ' +
|
|
873
|
+
'imports it and never writes a second theme store. The logic stage wires its persistence only.',
|
|
871
874
|
};
|
|
872
875
|
|
|
876
|
+
/** Where the one runtime theme state lives (entry group only), relative to the HarmonyOS project root. */
|
|
877
|
+
export const THEME_STATE_MODULE = 'entry/src/main/ets/common/ThemeState.ets';
|
|
878
|
+
|
|
873
879
|
/** `val <name> = Color(…)` / `val <name>: Color = Color(…)`: a fixed colour constant. */
|
|
874
880
|
const RE_COLOR_VAL = /(?:^|\n)[ \t]*(?:(?:private|internal|public)[ \t]+)?val[ \t]+([A-Za-z_][\w]*)[ \t]*(?::[ \t]*Color[ \t]*)?=[ \t]*Color[ \t]*\(/g;
|
|
875
881
|
|
|
@@ -908,7 +914,10 @@ export function themeFacts(android, sources) {
|
|
|
908
914
|
}
|
|
909
915
|
const mode = dark.length && runtime.length ? 'light-dark+runtime-color'
|
|
910
916
|
: runtime.length ? 'runtime-color' : dark.length ? 'light-dark' : 'static';
|
|
911
|
-
|
|
917
|
+
// The scheme fields a user setting drives (RE_RUNTIME_PRIMARY only recognises `primary` today).
|
|
918
|
+
const slots = runtime.length ? ['primary'] : [];
|
|
919
|
+
return { mode, hits_dark: dark, hits_runtime: runtime,
|
|
920
|
+
...(slots.length ? { runtime_slots: slots, state_module: THEME_STATE_MODULE } : {}) };
|
|
912
921
|
}
|
|
913
922
|
|
|
914
923
|
export function build(hp, android, staticPath = null, env = process.env, deveco = null) {
|
|
@@ -972,15 +981,16 @@ function _build(hp, android, staticPath, env, deveco) {
|
|
|
972
981
|
const res = hp.child('entry', 'src', 'main', 'resources');
|
|
973
982
|
const fontsDir = res.child('rawfile', 'fonts');
|
|
974
983
|
const fonts = isDir(fontsDir) ? glob(fontsDir, '*.[ot]tf').map((p) => p.name).sort(cmpCodepoints) : [];
|
|
984
|
+
const theme = themeFacts(android, sources);
|
|
975
985
|
const contract = {
|
|
976
986
|
schema: 'shell-contract/1',
|
|
977
987
|
entry_node: dget(plan, 'entry_node'), launcher_host: dget(plan, 'launcher_host'),
|
|
978
988
|
keywords: KEYWORDS, activities,
|
|
979
989
|
system_bars: SYSTEM_BARS,
|
|
980
990
|
sdk: sdkFacts(hp, env, deveco),
|
|
981
|
-
theme
|
|
991
|
+
theme,
|
|
982
992
|
fonts: fonts.map((f) => ({ file: `rawfile/fonts/${f}`, family: pyStem(f) })),
|
|
983
|
-
owned_by_entry_group: OWNED_BY_ENTRY,
|
|
993
|
+
owned_by_entry_group: [...OWNED_BY_ENTRY, ...(theme.state_module ? [theme.state_module] : [])],
|
|
984
994
|
...(Object.keys(shellHosts).length ? { shell_hosts: shellHosts } : {}),
|
|
985
995
|
rules: [
|
|
986
996
|
'Only the entry group writes the files in owned_by_entry_group.',
|
|
@@ -1064,7 +1074,11 @@ export function render(c) {
|
|
|
1064
1074
|
const hl = [...t.hits_dark, ...t.hits_runtime].map((h) => `- \`${h.at}\` ${h.keyword}: \`${h.line}\``);
|
|
1065
1075
|
out.push(...(hl.length ? hl : ['- no dark scheme, night mode, values-night or runtime primary found']));
|
|
1066
1076
|
out.push(`- ${t.mode === 'static' ? THEME_POLICY.static : THEME_POLICY.dynamic}`);
|
|
1067
|
-
if (t.hits_runtime.length) {
|
|
1077
|
+
if (t.hits_runtime.length) {
|
|
1078
|
+
out.push(`- ${THEME_POLICY.runtime}`);
|
|
1079
|
+
out.push(`- \`runtime_slots\` — ${(t.runtime_slots ?? []).map((x) => '`' + x + '`').join(', ')}; ` +
|
|
1080
|
+
`\`state_module\` — \`${t.state_module}\` (entry group only)`);
|
|
1081
|
+
}
|
|
1068
1082
|
}
|
|
1069
1083
|
out.push('', "Fonts registered from rawfile (use `fontFamily('<family>')`):", '');
|
|
1070
1084
|
const fl = c.fonts.map((f) => `- \`${f.family}\` ← \`${f.file}\``);
|
|
@@ -42,7 +42,9 @@ import * as gw from './group_watch.mjs';
|
|
|
42
42
|
// They and the search queries are external identifiers, kept as \u escapes; titles are English.
|
|
43
43
|
const V1 = '\u72b6\u6001\u7ba1\u7406_V1/';
|
|
44
44
|
const V2 = '\u72b6\u6001\u7ba1\u7406_V2/';
|
|
45
|
-
|
|
45
|
+
// The V1 -> V2 chapter: the V1-V2 form in older docs, the V1/V2 form since the docs release devecocli 1.3.12
|
|
46
|
+
// ships (the title's "/" became a path separator): either is accepted.
|
|
47
|
+
const MIX = ['\u72b6\u6001\u7ba1\u7406V1-V2\u8fc1\u79fb\u6307\u5bfc/', '\u72b6\u6001\u7ba1\u7406V1/V2\u8fc1\u79fb\u6307\u5bfc/'];
|
|
46
48
|
|
|
47
49
|
/**
|
|
48
50
|
* key -> { paradigm, slug, title, query, under }. `title` is the official title at the time of
|
|
@@ -192,9 +194,12 @@ export function parseSearch(stdout) {
|
|
|
192
194
|
const MARKERS = { V1: ['\u72b6\u6001\u7ba1\u7406_V1/', 'MVVM\u6a21\u5f0f_V1/'], V2: ['\u72b6\u6001\u7ba1\u7406_V2/', 'MVVM\u6a21\u5f0f_V2/'] };
|
|
193
195
|
const OTHER = { V1: MARKERS.V2, V2: MARKERS.V1, mix: [] };
|
|
194
196
|
|
|
197
|
+
/** A key's `under`: one path segment, or alternatives when a docs release renamed the chapter. */
|
|
198
|
+
const underOf = (entry) => [].concat(entry.under);
|
|
199
|
+
|
|
195
200
|
export function matchEntry(entry, results) {
|
|
196
201
|
return results.find((r) => r.documentId.endsWith(`/${entry.slug}`)
|
|
197
|
-
&& r.documentId.includes(
|
|
202
|
+
&& underOf(entry).some((u) => r.documentId.includes(u))
|
|
198
203
|
&& !OTHER[entry.paradigm].some((m) => r.documentId.includes(m))) ?? null;
|
|
199
204
|
}
|
|
200
205
|
|
|
@@ -267,12 +272,12 @@ export async function resolveKey(key, cache = {}) {
|
|
|
267
272
|
seen = seen.concat(results);
|
|
268
273
|
}
|
|
269
274
|
const candidates = [...new Set(seen
|
|
270
|
-
.filter((r) => r.documentId.endsWith(`/${entry.slug}`) || r.documentId.includes(
|
|
275
|
+
.filter((r) => r.documentId.endsWith(`/${entry.slug}`) || underOf(entry).some((u) => r.documentId.includes(u)))
|
|
271
276
|
.map((r) => `${r.title} | ${r.documentId}`))].slice(0, 5);
|
|
272
277
|
return {
|
|
273
278
|
key,
|
|
274
279
|
ok: false,
|
|
275
|
-
error: `unresolved: no ${CATALOG} document ends with /${entry.slug} under ${entry.
|
|
280
|
+
error: `unresolved: no ${CATALOG} document ends with /${entry.slug} under ${underOf(entry).join(' or ')}`
|
|
276
281
|
+ ' (the docs were reorganised or retitled; update DOCS in state_doc.mjs)',
|
|
277
282
|
candidates,
|
|
278
283
|
};
|
|
@@ -5,6 +5,7 @@ import * as fs from 'fs';
|
|
|
5
5
|
import * as path from 'path';
|
|
6
6
|
import { argOf, argsOf, moduleLabels, resolveRoots, walkEts } from './core/cli.ts';
|
|
7
7
|
import { findings } from './core/findings.ts';
|
|
8
|
+
import { readBaseline, splitByBaseline, writeBaseline } from './core/baseline.ts';
|
|
8
9
|
import { EN, quoteName } from './core/i18n.ts';
|
|
9
10
|
import type { Finding } from './core/findings.ts';
|
|
10
11
|
import type { FileScan, MediaIndex } from './core/scan.ts';
|
|
@@ -18,13 +19,14 @@ import { checkFixedSizeExpandSafeArea } from './rules/fixed_size_safe_area.ts';
|
|
|
18
19
|
import { checkFormatStringWithoutArgs } from './rules/format_string.ts';
|
|
19
20
|
import { checkFrameworkDialogAppearance } from './rules/framework_dialog.ts';
|
|
20
21
|
import { checkFrameworkPickerAppearance } from './rules/framework_picker.ts';
|
|
21
|
-
import { checkPctAutoRoots } from './rules/layout_placement.ts';
|
|
22
|
+
import { checkPctAutoRoots, checkStackCustomKids } from './rules/layout_placement.ts';
|
|
22
23
|
import { checkMediaContentUsable } from './rules/media_content.ts';
|
|
23
24
|
import { checkFullViewportTint, checkRasterTint, checkSvgTintChannel } from './rules/media_tint.ts';
|
|
24
25
|
import { checkOffsetInScrollContent } from './rules/offset_in_scroll.ts';
|
|
25
26
|
import { checkOrphanComponents } from './rules/orphan_component.ts';
|
|
26
27
|
import { checkPageReachability } from './rules/page_reachability.ts';
|
|
27
28
|
import { checkPercentHeightInScroll } from './rules/percent_height_in_scroll.ts';
|
|
29
|
+
import { checkRelativeContainerInScroll } from './rules/relative_container_height.ts';
|
|
28
30
|
import { checkPopupMenuBound, checkPopupMenuDefaultLook } from './rules/popup_menu.ts';
|
|
29
31
|
import { checkRequestPermissions } from './rules/request_permission.ts';
|
|
30
32
|
import { checkRootWeightWrapped } from './rules/root_weight.ts';
|
|
@@ -32,9 +34,14 @@ import { checkSafeAreaInClippingAncestor } from './rules/safe_area_clipping.ts';
|
|
|
32
34
|
import { checkSharedChromePlacement } from './rules/shared_chrome.ts';
|
|
33
35
|
import { checkShellContent } from './rules/shell_content.ts';
|
|
34
36
|
import { checkStackOccludingSibling, loadColors } from './rules/stack_occluding.ts';
|
|
37
|
+
import { checkHitTest } from './rules/hit_test.ts';
|
|
38
|
+
import { checkEventDefaultClick } from './rules/event_default_click.ts';
|
|
39
|
+
import { checkWaterFlowSectionGaps } from './rules/waterflow_sections.ts';
|
|
40
|
+
import { checkLottieHost } from './rules/lottie_host.ts';
|
|
35
41
|
import { checkStringResources } from './rules/string_quote_leak.ts';
|
|
36
42
|
import { checkSurfaceStroke } from './rules/surface_stroke.ts';
|
|
37
|
-
import { checkThemeColors } from './rules/theme_color.ts';
|
|
43
|
+
import { checkRuntimeThemeColors, checkThemeColors } from './rules/theme_color.ts';
|
|
44
|
+
import { checkArrowInlineComponents, checkDialogControllerV2, checkStorageKeyTypes, checkThemeModeClosure } from './rules/runtime_traps.ts';
|
|
38
45
|
import { checkWideConstantWidth } from './rules/wide_constant_width.ts';
|
|
39
46
|
import { checkWindowMode } from './rules/window_mode.ts';
|
|
40
47
|
import { checkFile } from './scan_file.ts';
|
|
@@ -48,7 +55,7 @@ export function main(): void {
|
|
|
48
55
|
if (etsPatterns.length === 0) {
|
|
49
56
|
console.error('Usage: node arkts_static_check.ts --ets <.../<module>/src/main/ets> [--ets ...] \\');
|
|
50
57
|
console.error(' [--resources <.../<module>/src/main/resources> [--resources ...]] \\');
|
|
51
|
-
console.error(' [--android <android_project_dir>]');
|
|
58
|
+
console.error(' [--android <android_project_dir>] [--write-baseline <file> | --baseline <file>]');
|
|
52
59
|
console.error(' --ets/--resources may be repeated and accept wildcard segments, e.g. --ets "<proj>/features/*/src/main/ets"');
|
|
53
60
|
process.exit(2);
|
|
54
61
|
}
|
|
@@ -60,6 +67,18 @@ export function main(): void {
|
|
|
60
67
|
process.exit(2);
|
|
61
68
|
}
|
|
62
69
|
const resRoots: string[] = resolveRoots(resPatterns);
|
|
70
|
+
// Incremental mode (core/baseline.ts): --write-baseline records the project's findings before the run
|
|
71
|
+
// writes anything; --baseline sets them apart so only findings this run introduced gate.
|
|
72
|
+
const writeBaselineTo: string = argOf('--write-baseline');
|
|
73
|
+
const baselineFrom: string = argOf('--baseline');
|
|
74
|
+
if (writeBaselineTo !== '' && baselineFrom !== '') {
|
|
75
|
+
console.error('--write-baseline and --baseline are exclusive');
|
|
76
|
+
process.exit(2);
|
|
77
|
+
}
|
|
78
|
+
let baseline: ReturnType<typeof readBaseline> | null = null;
|
|
79
|
+
if (baselineFrom !== '') {
|
|
80
|
+
try { baseline = readBaseline(baselineFrom); } catch (e) { console.error((e as Error).message); process.exit(2); }
|
|
81
|
+
}
|
|
63
82
|
|
|
64
83
|
const etsLabels: string[] = moduleLabels(etsRoots);
|
|
65
84
|
const scans: FileScan[] = [];
|
|
@@ -108,16 +127,26 @@ export function main(): void {
|
|
|
108
127
|
checkFrameworkDialogAppearance(scans, androidDir);
|
|
109
128
|
checkBlurMirrored(scans, androidDir);
|
|
110
129
|
checkSurfaceStroke(scans, androidDir);
|
|
130
|
+
checkLottieHost(scans, androidDir);
|
|
111
131
|
}
|
|
112
132
|
checkEntryRootBuiltin(scans);
|
|
133
|
+
checkDialogControllerV2(scans);
|
|
134
|
+
checkArrowInlineComponents(scans);
|
|
135
|
+
checkThemeModeClosure(scans);
|
|
136
|
+
checkStorageKeyTypes(scans);
|
|
113
137
|
checkRootWeightWrapped(scans);
|
|
114
138
|
checkPctAutoRoots(scans);
|
|
139
|
+
checkStackCustomKids(scans);
|
|
115
140
|
checkSharedChromePlacement(scans);
|
|
116
141
|
checkPercentHeightInScroll(scans);
|
|
142
|
+
checkRelativeContainerInScroll(scans);
|
|
117
143
|
checkSafeAreaInClippingAncestor(scans);
|
|
118
144
|
checkFixedSizeExpandSafeArea(scans);
|
|
119
145
|
checkWideConstantWidth(scans);
|
|
120
146
|
checkStackOccludingSibling(scans, loadColors(resRoots));
|
|
147
|
+
checkHitTest(scans);
|
|
148
|
+
checkEventDefaultClick(scans);
|
|
149
|
+
checkWaterFlowSectionGaps(scans, androidDir);
|
|
121
150
|
checkOffsetInScrollContent(scans);
|
|
122
151
|
checkEntryRoute(scans, etsRoots);
|
|
123
152
|
checkRequestPermissions(etsRoots, argOf('--sdk') || process.env.DEVECO_SDK_HOME || '');
|
|
@@ -129,12 +158,15 @@ export function main(): void {
|
|
|
129
158
|
: path.join(path.resolve(etsRoots[0], '..', '..', '..', '..'), '.hometrans');
|
|
130
159
|
checkShellContent(scans, hometransDir);
|
|
131
160
|
checkThemeColors(scans, hometransDir);
|
|
161
|
+
checkRuntimeThemeColors(scans, hometransDir);
|
|
132
162
|
checkOrphanComponents(scans);
|
|
133
163
|
|
|
134
164
|
checkPageReachability(scans);
|
|
135
165
|
|
|
136
|
-
|
|
137
|
-
const
|
|
166
|
+
// a baseline-known finding is reported apart and never counts, GATE or CAND
|
|
167
|
+
const split = baseline ? splitByBaseline(findings, baseline) : { known: [] as Finding[], fresh: findings };
|
|
168
|
+
const gate: Finding[] = split.fresh.filter((f) => f.sev === 'GATE');
|
|
169
|
+
const cand: Finding[] = split.fresh.filter((f) => f.sev === 'CAND');
|
|
138
170
|
|
|
139
171
|
// Print the modules actually scanned — the easiest failure with a wrong wildcard is "only one module scanned",
|
|
140
172
|
// and in that case the output looks exactly like all passing; only this line reveals it.
|
|
@@ -168,6 +200,17 @@ export function main(): void {
|
|
|
168
200
|
console.log(` ${EN ? 'and ' : ''}${win}; do not change code just because this section has output.`);
|
|
169
201
|
}
|
|
170
202
|
|
|
203
|
+
if (baseline) {
|
|
204
|
+
console.log('\n' + `[BASELINE] present before this run, not counted in the exit code — ${split.known.length} entries`);
|
|
205
|
+
for (const f of split.known) console.log(` ${f.sev.padEnd(4)} ${f.rule.padEnd(21)} ${f.file}:${f.line}`);
|
|
206
|
+
}
|
|
207
|
+
if (writeBaselineTo !== '') {
|
|
208
|
+
writeBaseline(writeBaselineTo, findings, etsRoots);
|
|
209
|
+
console.log('\n' + `[BASELINE] recorded ${findings.length} existing findings to ${writeBaselineTo}`);
|
|
210
|
+
// recording is not gating: the project's own findings are the point of the file
|
|
211
|
+
process.exit(0);
|
|
212
|
+
}
|
|
213
|
+
|
|
171
214
|
process.exit(gate.length > 0 ? 1 : 0);
|
|
172
215
|
}
|
|
173
216
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// static_check/rules/a11y.ts — split out of arkts_static_check.ts (logic unchanged).
|
|
2
2
|
|
|
3
3
|
import { report } from '../core/findings.ts';
|
|
4
|
-
import { BACKTICK, CONTROL_ROOTS, attrChainFrom, attrsWithArgs, hasAttr, lineOfIndex, matchBracket,
|
|
4
|
+
import { BACKTICK, CONTROL_ROOTS, attrChainFrom, attrsWithArgs, hasAttr, lineOfIndex, matchBracket, styleDecls } from '../core/parse.ts';
|
|
5
5
|
import type { UiAttr } from '../core/parse.ts';
|
|
6
6
|
import { ancestorsOf, builderCallSites, maskedOf, structCallSites } from '../core/scan.ts';
|
|
7
7
|
import type { CallSite, FileScan } from '../core/scan.ts';
|
|
@@ -436,22 +436,8 @@ export type A11yStyleDecl = { name: string; desc: boolean; scope: [number, numbe
|
|
|
436
436
|
* within its struct, and different structs may each have one with the same name, so they are recorded separately by scope (PR !97 re-review N1).
|
|
437
437
|
*/
|
|
438
438
|
export function a11yStyleDecls(code: string, masked: string): A11yStyleDecl[] {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
let d: RegExpExecArray | null;
|
|
442
|
-
while ((d = re.exec(masked)) !== null) {
|
|
443
|
-
const pc: number = matchBracket(code, d.index + d[0].length - 1);
|
|
444
|
-
if (pc < 0) { continue; }
|
|
445
|
-
let k: number = pc + 1;
|
|
446
|
-
while (k < code.length && /\s/.test(code[k])) { k++; }
|
|
447
|
-
if (code[k] !== '{') { continue; }
|
|
448
|
-
const bc: number = matchBracket(code, k);
|
|
449
|
-
if (bc < 0) { continue; }
|
|
450
|
-
const member: boolean = d[1] === undefined && d[2] === undefined; // in-component @Styles does not write function
|
|
451
|
-
out.push({ name: d[3], desc: /\.accessibilityDescription\s*\(/.test(code.slice(k, bc)),
|
|
452
|
-
scope: member ? structBodyAt(code, masked, d.index) : null });
|
|
453
|
-
}
|
|
454
|
-
return out;
|
|
439
|
+
return styleDecls(code, masked).map((d) => ({ name: d.name, scope: d.scope,
|
|
440
|
+
desc: /\.accessibilityDescription\s*\(/.test(code.slice(d.body[0], d.body[1])) }));
|
|
455
441
|
}
|
|
456
442
|
|
|
457
443
|
/** If attribute name on the chain at pos is a @Styles / @Extend: whether it sets description. In-component same-name takes precedence over global. */
|
|
@@ -19,18 +19,8 @@ export const meta: RuleMeta[] = [
|
|
|
19
19
|
escape: null,
|
|
20
20
|
cases: [],
|
|
21
21
|
},
|
|
22
|
-
{
|
|
23
|
-
id: "fullsize-container",
|
|
24
|
-
levels: ["CAND"],
|
|
25
|
-
invariant: "interaction",
|
|
26
|
-
card: "interaction",
|
|
27
|
-
needs: [],
|
|
28
|
-
summary: "an attribute chain has both `.width('100%')` and `.height('100%')`, but no `hitTestBehavior`.",
|
|
29
|
-
fix: "- The `[CANDIDATES]` section is **not defects**, just a narrowing of the manual review scope. Whether the fill containers and constant coordinates it lists are correct depends on the anchoring direction and stacking order on the Android source side — lexical analysis cannot decide that. Treat it as the to-review list for the three items \"Position Anchor Evidence\", \"Interaction Reachability Evidence\" and \"Window Mode Evidence\", and annotate the source of each entry; **do not change code just because something is listed** — most fill containers are legitimate.",
|
|
30
|
-
escape: null,
|
|
31
|
-
cases: [],
|
|
32
|
-
},
|
|
33
22
|
];
|
|
23
|
+
// fullsize-container moved to rules/hit_test.ts: it is judged on the layer structure, not on one chain.
|
|
34
24
|
|
|
35
25
|
|
|
36
26
|
|
|
@@ -55,13 +45,5 @@ export function checkAttrChains(fctx: FileCtx): void {
|
|
|
55
45
|
report('GATE', 'pct-width-with-hmargin', rel, ch.start,
|
|
56
46
|
"width('100%') combined with left/right margin → 100% does not subtract the element's own margin, so it is wider than its parent and overflows on the right");
|
|
57
47
|
}
|
|
58
|
-
|
|
59
|
-
// ---- CAND R7: fills the container without declaring hitTestBehavior
|
|
60
|
-
// It is a real defect only when "also the last child in the stacking order" and "there are clickable elements below it";
|
|
61
|
-
// lexical analysis cannot decide those two points — so it is only a candidate.
|
|
62
|
-
if (RE_PCT_WIDTH.test(blob) && RE_PCT_HEIGHT.test(blob) && blob.indexOf('hitTestBehavior') < 0) {
|
|
63
|
-
report('CAND', 'fullsize-container', rel, ch.start,
|
|
64
|
-
'full-size container without hitTestBehavior: if it is the last child of the stack, it swallows taps on the elements below it');
|
|
65
|
-
}
|
|
66
48
|
}
|
|
67
49
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// static_check/rules/dialog_backboard.ts — GATE dialog-backboard-default.
|
|
2
|
+
|
|
3
|
+
import { report } from '../core/findings.ts';
|
|
4
|
+
import { lineOfIndex, matchBracket, maskStrings, splitTopLevel } from '../core/parse.ts';
|
|
5
|
+
import type { FileCtx } from '../core/scan.ts';
|
|
6
|
+
import type { RuleMeta } from '../core/meta.ts';
|
|
7
|
+
|
|
8
|
+
/** Rule metadata (rendered by scripts/gen_rule_docs.mjs). */
|
|
9
|
+
export const meta: RuleMeta[] = [
|
|
10
|
+
{
|
|
11
|
+
id: "dialog-backboard-default",
|
|
12
|
+
levels: ["GATE"],
|
|
13
|
+
invariant: "appearance",
|
|
14
|
+
card: "widgets",
|
|
15
|
+
needs: [],
|
|
16
|
+
summary: "The options of `openCustomDialog(…)` / `new CustomDialogController({…})` (a literal, or a variable in the same file initialised with a literal) do not set both `backgroundBlurStyle` and `cornerRadius` (not reported when a `CustomDialogController` sets `customStyle: true`).",
|
|
17
|
+
fix: "The dialog backboard has its own default look: `cornerRadius` defaults to 32vp; `backgroundBlurStyle` defaults to `COMPONENT_ULTRA_THICK` before API 26.0.0 and to `NONE` after it (promptAction / CustomDialog doc), so the same code looks different on different devices. Per the \"Dialogs\" item of the widgets card, the backboard is the Android panel: set `backgroundBlurStyle: BlurStyle.NONE`, `backgroundColor: <panel colour>`, `cornerRadius: <panel radius>`, `width: '<panel share of screen width>%'` in the options, and add no padding / background / radius on the builder root; the inset between the Android window and panel is transparent and is not translated into a container.",
|
|
18
|
+
escape: null,
|
|
19
|
+
cases: [
|
|
20
|
+
"Measured (weather settings single-choice dialog, glm53 11-19): `openCustomDialog({ width: '95%' })` set only the width, and the measure_pack recipe turned Android's transparent 16dp window inset into `padding(16)` on the builder root, so the white panel had an extra ring of backboard around it; the user reported \"there is another layer of background around the box\".",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
/** The object literal `{…}` an expression stands for: itself, or the initialiser of an identifier declared in this file. */
|
|
26
|
+
function optionObject(code: string, masked: string, expr: string): string | null {
|
|
27
|
+
const e: string = expr.trim();
|
|
28
|
+
if (e.startsWith('{') && e.endsWith('}')) { return e; }
|
|
29
|
+
const id: RegExpExecArray | null = /^(?:this\.)?([A-Za-z_$][\w$]*)$/.exec(e);
|
|
30
|
+
if (id === null) { return null; }
|
|
31
|
+
const decl: RegExpExecArray | null = new RegExp(`\\b${id[1]}\\s*(?::[^=;{]+)?=\\s*\\{`).exec(masked);
|
|
32
|
+
if (decl === null) { return null; }
|
|
33
|
+
const open: number = decl.index + decl[0].length - 1;
|
|
34
|
+
const close: number = matchBracket(code, open);
|
|
35
|
+
return close < 0 ? null : code.slice(open, close + 1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** `new ComponentContent(…)` inline, or an identifier initialised with one in this file. */
|
|
39
|
+
function isComponentContent(masked: string, expr: string): boolean {
|
|
40
|
+
const e: string = expr.trim();
|
|
41
|
+
if (/^new\s+ComponentContent\b/.test(e)) { return true; }
|
|
42
|
+
const id: RegExpExecArray | null = /^(?:this\.)?([A-Za-z_$][\w$]*)$/.exec(e);
|
|
43
|
+
return id !== null && new RegExp(`\\b${id[1]}\\s*(?::[^=;]+)?=\\s*new\\s+ComponentContent\\b`).test(masked);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Top-level keys of an object literal `{ a: …, b, … }`. */
|
|
47
|
+
function keysOf(obj: string): Set<string> {
|
|
48
|
+
const out: Set<string> = new Set();
|
|
49
|
+
for (const e of splitTopLevel(obj.slice(1, -1))) {
|
|
50
|
+
const k: RegExpExecArray | null = /^\s*([A-Za-z_$][\w$]*)\s*(?::|,|$)/.exec(e);
|
|
51
|
+
if (k !== null) { out.add(k[1]); }
|
|
52
|
+
}
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* GATE dialog-backboard-default: a custom dialog whose backboard keeps its defaults. The backboard has a 32vp default
|
|
58
|
+
* corner radius and a default blur that changed with API 26.0.0 (COMPONENT_ULTRA_THICK before, NONE after), so an
|
|
59
|
+
* unstyled backboard both adds a layer the source has none of and looks different per device. Options are judged
|
|
60
|
+
* when they are visible: an object literal, or an identifier initialised with one in this file.
|
|
61
|
+
*/
|
|
62
|
+
export function checkDialogBackboardDefault(fctx: FileCtx): void {
|
|
63
|
+
const masked: string = maskStrings(fctx.code);
|
|
64
|
+
const re: RegExp = /\bopenCustomDialog\s*\(|\bnew\s+CustomDialogController\s*\(/g;
|
|
65
|
+
let m: RegExpExecArray | null;
|
|
66
|
+
while ((m = re.exec(masked)) !== null) {
|
|
67
|
+
const open: number = m.index + m[0].length - 1;
|
|
68
|
+
const close: number = matchBracket(fctx.code, open);
|
|
69
|
+
if (close < 0) { continue; }
|
|
70
|
+
const args: string[] = splitTopLevel(fctx.code.slice(open + 1, close));
|
|
71
|
+
const controller: boolean = /CustomDialogController/.test(m[0]);
|
|
72
|
+
// openCustomDialog(options) | openCustomDialog(ComponentContent, options?) | new CustomDialogController(options)
|
|
73
|
+
let opt: string | null = null;
|
|
74
|
+
for (const a of controller ? args.slice(0, 1) : args.slice(0, 2).reverse()) {
|
|
75
|
+
opt = optionObject(fctx.code, masked, a);
|
|
76
|
+
if (opt !== null) { break; }
|
|
77
|
+
}
|
|
78
|
+
// openCustomDialog(<ComponentContent>) with no options keeps every default; other unresolved options are not visible.
|
|
79
|
+
const bareContent: boolean = !controller && args.length === 1 && isComponentContent(masked, args[0]);
|
|
80
|
+
if (opt === null && !bareContent) { continue; }
|
|
81
|
+
const keys: Set<string> = opt === null ? new Set() : keysOf(opt);
|
|
82
|
+
if (controller && opt !== null && /\bcustomStyle\s*:\s*true\b/.test(opt)) { continue; }
|
|
83
|
+
const missing: string[] = ['backgroundBlurStyle', 'cornerRadius'].filter((k) => !keys.has(k));
|
|
84
|
+
if (missing.length === 0) { continue; }
|
|
85
|
+
report('GATE', 'dialog-backboard-default', fctx.rel, lineOfIndex(fctx.code, m.index),
|
|
86
|
+
`${controller ? 'CustomDialogController' : 'openCustomDialog'} options leave ${missing.join(' and ')} at the backboard default ` +
|
|
87
|
+
'(cornerRadius 32vp; blur COMPONENT_ULTRA_THICK before API 26.0.0, NONE after): the backboard becomes an extra layer around the panel ' +
|
|
88
|
+
'and looks different per device. Make the backboard the Android panel: backgroundBlurStyle: BlurStyle.NONE, backgroundColor <panel>, ' +
|
|
89
|
+
"cornerRadius <panel radius>, width '<panel % of screen>'; no padding / background on the builder root (the Android window inset is transparent)");
|
|
90
|
+
}
|
|
91
|
+
}
|