@buaa_smat/hometrans 26.0.3 → 26.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agents/code-reviewer.md +91 -21
- package/env-requirements.json +1 -1
- package/i18n/agents/code-reviewer.md +93 -21
- package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
- package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
- package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
- package/package.json +3 -6
- package/skills/a2h-app-migrate/SKILL.md +19 -11
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
- package/skills/a2h-batch-ui-align/SKILL.md +72 -22
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
- package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-page-specgen/SKILL.md +124 -20
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/skills/a2h-page-specgen/references/evidence.md +35 -0
- package/skills/a2h-page-specgen/references/execution-model.md +135 -26
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
- package/skills/a2h-page-specgen/references/gates.md +120 -52
- package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +112 -109
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
- package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
- package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
- package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
- package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
- package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
- package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
- package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
- package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
- package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
- package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
- package/skills/a2h-spec-generate/SKILL.md +2 -2
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
- package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// shell_requests.mjs: every group's `shell requests` bullet gets an id, and Step 5.5's report must answer each one;
|
|
2
|
+
// a deleted .ets needs a capability-diff line (CoolMall 11-19: G003's theme request dropped, G029's fixed captcha
|
|
3
|
+
// copy deleted).
|
|
4
|
+
// Run from scripts/: node --test tests/shell_requests.test.mjs
|
|
5
|
+
import { test } from 'node:test';
|
|
6
|
+
import assert from 'node:assert/strict';
|
|
7
|
+
import { spawnSync } from 'node:child_process';
|
|
8
|
+
import * as fs from 'node:fs';
|
|
9
|
+
import * as os from 'node:os';
|
|
10
|
+
import * as path from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
import { parseShellRequests, answers, verify } from '../shell_requests.mjs';
|
|
13
|
+
|
|
14
|
+
const SCRIPT = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'shell_requests.mjs');
|
|
15
|
+
|
|
16
|
+
const G003 = `# G003 report
|
|
17
|
+
## 文件
|
|
18
|
+
- pages/HomeRoutePage.ets
|
|
19
|
+
|
|
20
|
+
## shell requests
|
|
21
|
+
|
|
22
|
+
- 运行时主题色:Android primary 由 ThemePreferenceManager.themeColor 运行时切换;
|
|
23
|
+
鸿蒙侧尚无可观测主题状态。
|
|
24
|
+
- CouponModal(page_0007):请 Step 5.5 接线。
|
|
25
|
+
|
|
26
|
+
## 轮次
|
|
27
|
+
- 第 1 轮: blocking 0
|
|
28
|
+
`;
|
|
29
|
+
const G029 = `## shell requests
|
|
30
|
+
|
|
31
|
+
- pages/UserAgreementPage 需在 main_pages 注册。
|
|
32
|
+
- 无其它(无壳状态读写,无窗口层改动)。
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
test('bullets under shell requests become requests; continuation lines join; "nothing" bullets drop', () => {
|
|
36
|
+
assert.deepEqual(parseShellRequests(G003), [
|
|
37
|
+
'运行时主题色:Android primary 由 ThemePreferenceManager.themeColor 运行时切换; 鸿蒙侧尚无可观测主题状态。',
|
|
38
|
+
'CouponModal(page_0007):请 Step 5.5 接线。',
|
|
39
|
+
]);
|
|
40
|
+
assert.deepEqual(parseShellRequests(G029), ['pages/UserAgreementPage 需在 main_pages 注册。']);
|
|
41
|
+
assert.deepEqual(parseShellRequests('## shell requests\n- (none)\n'), []);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('verdicts are read from table rows and list lines', () => {
|
|
45
|
+
const md = `| id | request | verdict |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| G003#1 | runtime theme | deferred:logic: persistence only; state module built by G001 |
|
|
48
|
+
| G003#2 | coupon modal | applied |
|
|
49
|
+
- G029#1: rejected: page is a skip row
|
|
50
|
+
`;
|
|
51
|
+
const got = answers(md);
|
|
52
|
+
assert.equal(got.get('G003#2'), 'applied');
|
|
53
|
+
assert.match(got.get('G003#1'), /^deferred:logic/);
|
|
54
|
+
assert.match(got.get('G029#1'), /^rejected: page is a skip row/);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('missing answers, verdict-less rows, reasonless rejections and unexplained deletions are problems', () => {
|
|
58
|
+
const rows = [{ id: 'G003#1', text: 'theme' }, { id: 'G003#2', text: 'modal' }, { id: 'G033#1', text: 'repoint' }];
|
|
59
|
+
const md = `| G003#1 | theme | ✔ via unification |
|
|
60
|
+
| G033#1 | repoint | rejected |
|
|
61
|
+
`;
|
|
62
|
+
const p = verify(rows, md, ['products/entry/src/main/ets/components/34ImageCaptchaDialog.ets']);
|
|
63
|
+
assert.equal(p.length, 4, p.join('\n'));
|
|
64
|
+
assert.ok(p.some((x) => x.startsWith('G003#1 has no verdict')));
|
|
65
|
+
assert.ok(p.some((x) => x.startsWith('G003#2 not answered')));
|
|
66
|
+
assert.ok(p.some((x) => x.startsWith('G033#1 rejected without a reason')));
|
|
67
|
+
assert.ok(p.some((x) => x.includes('34ImageCaptchaDialog.ets deleted without')));
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('a deletion with a capability-diff line passes', () => {
|
|
71
|
+
const md = 'deleted components/34ImageCaptchaDialog.ets → merged into components/ImageCaptchaDialog.ets: ' +
|
|
72
|
+
'decode kept from 34 (bytes.buffer), loading state kept from G033';
|
|
73
|
+
assert.deepEqual(verify([], md, ['products/entry/src/main/ets/components/34ImageCaptchaDialog.ets']), []);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('cli: collect writes the ledger, verify exits 1 until every id is answered', () => {
|
|
77
|
+
const hp = fs.mkdtempSync(path.join(os.tmpdir(), 'ledger-'));
|
|
78
|
+
try {
|
|
79
|
+
fs.mkdirSync(path.join(hp, '.hometrans/queue_logs'), { recursive: true });
|
|
80
|
+
fs.mkdirSync(path.join(hp, '.hometrans/work'), { recursive: true });
|
|
81
|
+
fs.writeFileSync(path.join(hp, '.hometrans/queue_logs/G003.report.md'), G003, 'utf8');
|
|
82
|
+
fs.writeFileSync(path.join(hp, '.hometrans/queue_logs/G029.report.md'), G029, 'utf8');
|
|
83
|
+
const c = spawnSync(process.execPath, [SCRIPT, 'collect', '--hp', hp], { encoding: 'utf8' });
|
|
84
|
+
assert.equal(c.status, 0, c.stderr);
|
|
85
|
+
const ledger = JSON.parse(fs.readFileSync(path.join(hp, '.hometrans/work/shell_requests.json'), 'utf8'));
|
|
86
|
+
assert.deepEqual(ledger.requests.map((r) => r.id), ['G003#1', 'G003#2', 'G029#1']);
|
|
87
|
+
const report = path.join(hp, '.hometrans/work/wiring.report.md');
|
|
88
|
+
fs.writeFileSync(report, '| G003#1 | t | applied |\n| G003#2 | m | applied |\n', 'utf8');
|
|
89
|
+
const v1 = spawnSync(process.execPath, [SCRIPT, 'verify', '--hp', hp, '--deleted'], { encoding: 'utf8' });
|
|
90
|
+
assert.equal(v1.status, 1);
|
|
91
|
+
assert.match(v1.stdout, /\[LEDGER\] G029#1 not answered/);
|
|
92
|
+
fs.appendFileSync(report, '| G029#1 | r | applied |\n', 'utf8');
|
|
93
|
+
const v2 = spawnSync(process.execPath, [SCRIPT, 'verify', '--hp', hp, '--deleted'], { encoding: 'utf8' });
|
|
94
|
+
assert.equal(v2.status, 0, v2.stdout);
|
|
95
|
+
} finally {
|
|
96
|
+
fs.rmSync(hp, { recursive: true, force: true });
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// ---- review round 1 (!192)
|
|
101
|
+
|
|
102
|
+
test('the combined registry_requests / shell requests heading and a JSON body are read', () => {
|
|
103
|
+
assert.deepEqual(parseShellRequests('## registry_requests / shell requests\n- need X\n'), ['need X']);
|
|
104
|
+
const json = '## Shell Requests\n```json\n[{"kind":"theme","ask":"runtime primary"},"mount CouponModal"]\n```\n';
|
|
105
|
+
assert.deepEqual(parseShellRequests(json), ['{"kind":"theme","ask":"runtime primary"}', 'mount CouponModal']);
|
|
106
|
+
// a registry_requests object under the combined heading is not a shell request
|
|
107
|
+
const reg = '## registry_requests / shell requests\n```json\n{"main_pages":["pages/X"]}\n```\n';
|
|
108
|
+
assert.deepEqual(parseShellRequests(reg), []);
|
|
109
|
+
// CoolMall G036 / G038 numbered their requests
|
|
110
|
+
assert.deepEqual(parseShellRequests('### shell requests\n1. 登录拦截\n2. 路由接线:传 orderId\n'), ['登录拦截', '路由接线:传 orderId']);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test('a section with content the parser cannot read is reported; "none" is not', () => {
|
|
114
|
+
const hp = fs.mkdtempSync(path.join(os.tmpdir(), 'ledger-u-'));
|
|
115
|
+
try {
|
|
116
|
+
fs.mkdirSync(path.join(hp, '.hometrans/queue_logs'), { recursive: true });
|
|
117
|
+
fs.writeFileSync(path.join(hp, '.hometrans/queue_logs/G001.report.md'), '## shell requests\nPlease mount the coupon modal.\n', 'utf8');
|
|
118
|
+
// CoolMall G025: "nothing" in full-width parentheses with a reason
|
|
119
|
+
fs.writeFileSync(path.join(hp, '.hometrans/queue_logs/G002.report.md'),
|
|
120
|
+
'### shell requests\n(无——登录拦截由导航层实现,本页按已登录态渲染)\n', 'utf8');
|
|
121
|
+
const c = spawnSync(process.execPath, [SCRIPT, 'collect', '--hp', hp], { encoding: 'utf8' });
|
|
122
|
+
assert.equal(c.status, 1);
|
|
123
|
+
assert.match(c.stderr, /\[LEDGER\] G001: its shell-requests section has content/);
|
|
124
|
+
assert.doesNotMatch(c.stderr, /G002:/);
|
|
125
|
+
} finally {
|
|
126
|
+
fs.rmSync(hp, { recursive: true, force: true });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test('a row answers only the id in its first cell; ids mentioned later are references', () => {
|
|
131
|
+
const got = answers('| G003#1 | same as G003#2 | applied |\n- G004#1: applied, see G004#2\n');
|
|
132
|
+
assert.equal(got.get('G003#1'), 'applied');
|
|
133
|
+
assert.equal(got.has('G003#2'), false);
|
|
134
|
+
assert.match(got.get('G004#1'), /^applied/);
|
|
135
|
+
assert.equal(got.has('G004#2'), false);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test('merge lines match whole path segments and accept backticks', () => {
|
|
139
|
+
const md = 'deleted components/34ImageCaptchaDialog.ets → merged into components/X.ets: y';
|
|
140
|
+
// a merge line for 34ImageCaptchaDialog does not cover ImageCaptchaDialog
|
|
141
|
+
assert.equal(verify([], md, ['x/components/ImageCaptchaDialog.ets']).length, 1);
|
|
142
|
+
assert.deepEqual(verify([], 'deleted `components/A.ets` → merged into `components/B.ets`: kept decode',
|
|
143
|
+
['products/entry/src/main/ets/components/A.ets']), []);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('cli: --deleted takes values only up to the next flag; a non-git hp is a problem, not "nothing deleted"', () => {
|
|
147
|
+
const hp = fs.mkdtempSync(path.join(os.tmpdir(), 'ledger-c-'));
|
|
148
|
+
try {
|
|
149
|
+
fs.mkdirSync(path.join(hp, '.hometrans/queue_logs'), { recursive: true });
|
|
150
|
+
const a = spawnSync(process.execPath, [SCRIPT, 'verify', '--deleted', '--hp', hp], { encoding: 'utf8' });
|
|
151
|
+
assert.equal(a.status, 0, a.stdout);
|
|
152
|
+
const b = spawnSync(process.execPath, [SCRIPT, 'verify', '--hp', hp], { encoding: 'utf8' });
|
|
153
|
+
assert.equal(b.status, 1);
|
|
154
|
+
assert.match(b.stdout, /is not a git work tree/);
|
|
155
|
+
} finally {
|
|
156
|
+
fs.rmSync(hp, { recursive: true, force: true });
|
|
157
|
+
}
|
|
158
|
+
});
|
|
@@ -46,3 +46,15 @@ test('every ./references/… path named in SKILL.md and the step references exis
|
|
|
46
46
|
assert.match(fs.readFileSync(path.join(SKILL, 'references', 'cards', card), 'utf8'), /^# 知识卡 — /, card);
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
+
|
|
50
|
+
test('incremental baseline: the shell contract is written before the baseline, so the theme rules are in it', () => {
|
|
51
|
+
const para = md.split('**Incremental mode — record the static-check baseline before the first write.**')[1].split('\n')[0];
|
|
52
|
+
const contractAt = para.indexOf('`shell_contract.mjs`');
|
|
53
|
+
assert.ok(contractAt >= 0 && contractAt < para.indexOf('--write-baseline'), 'shell_contract.mjs runs before --write-baseline');
|
|
54
|
+
// The rules the paragraph names are the ones that read the contract; a rename or a new reader shows here.
|
|
55
|
+
const rules = fs.readFileSync(path.join(SKILL, 'scripts', 'static_check', 'rules', 'theme_color.ts'), 'utf8');
|
|
56
|
+
assert.match(rules, /shell_contract\.json/);
|
|
57
|
+
const ids = new Set([...rules.matchAll(/report\([^,]+,\s*'(theme-[a-z-]+)'/g)].map((m) => m[1]));
|
|
58
|
+
assert.deepEqual([...ids].sort(), ['theme-color-literal', 'theme-runtime-color-static', 'theme-sheet-background-default']);
|
|
59
|
+
for (const id of ids) { assert.ok(para.includes(`\`${id}\``), id); }
|
|
60
|
+
});
|
|
@@ -117,6 +117,14 @@ describe('matchEntry paradigm guard', () => {
|
|
|
117
117
|
const e = DOCS['v1-mvvm'];
|
|
118
118
|
assert.equal(matchEntry(e, [{ title: 'x', documentId: `${G}/MVVM模式_V2/MVVM模式_V1/arkts-mvvm` }]), null);
|
|
119
119
|
});
|
|
120
|
+
// mihon-more-tab round 1 (devecocli 1.3.12): the chapter is now 状态管理V1/V2迁移指导/ and check failed on all three mix keys
|
|
121
|
+
test('mix keys match the V1 → V2 chapter under its old and its new name', () => {
|
|
122
|
+
const old = { title: 'x', documentId: `${G}/状态管理V1-V2迁移指导/V1-V2迁移概述/arkts-v1-v2-migration` };
|
|
123
|
+
const renamed = { title: 'x', documentId: `guides/harmonyos-guides/指南/应用框架/ArkUI_方舟UI框架/UI开发_ArkTS声明式开发范式/学习UI范式状态管理/状态管理V1/V2迁移指导/V1/V2迁移概述/arkts-v1-v2-migration` };
|
|
124
|
+
assert.equal(matchEntry(DOCS['mix-migration'], [old]).documentId, old.documentId);
|
|
125
|
+
assert.equal(matchEntry(DOCS['mix-migration'], [renamed]).documentId, renamed.documentId);
|
|
126
|
+
assert.equal(matchEntry(DOCS['mix-migration'], [{ title: 'x', documentId: `${G}/其他/arkts-v1-v2-migration` }]), null);
|
|
127
|
+
});
|
|
120
128
|
});
|
|
121
129
|
|
|
122
130
|
describe('resolveKey', () => {
|
|
@@ -10,6 +10,7 @@ Gate a built HarmonyOS app on a real cold start. Compile-green does not mean usa
|
|
|
10
10
|
## Inputs
|
|
11
11
|
|
|
12
12
|
- `harmony_project_dir` (required); `device` / `--module` / `--ability` only when several exist and auto-select picks wrong
|
|
13
|
+
- `image_read` — `true` only when the caller knows this session can read image files. Anything else (`false`, absent): **never open the `.png` evidence** — on a host without image input one image read breaks the session for good, resumes included. Report its path; diagnose `FAIL_BLANK` from ①–④ and the project.
|
|
13
14
|
- Fixed, do not parameterize: **max 5 rounds, 5000 ms wait**
|
|
14
15
|
|
|
15
16
|
## Round 1 — preconditions & run
|
|
@@ -24,10 +25,10 @@ No installable artifacts → run round 1 as a full `devecocli run` (it builds).
|
|
|
24
25
|
|
|
25
26
|
```
|
|
26
27
|
DEVECO_CLI_SMOKE_WAIT_MS=5000 devecocli run --skip-build # bash
|
|
27
|
-
cmd /c "set DEVECO_CLI_SMOKE_WAIT_MS=5000&& devecocli run --skip-build > smoke.log 2>&1" # Windows (cmd)
|
|
28
|
+
cmd /c "(if not exist .hometrans mkdir .hometrans)& set DEVECO_CLI_SMOKE_WAIT_MS=5000&& devecocli run --skip-build > .hometrans\smoke.log 2>&1" # Windows (cmd)
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
The default 1000 ms wait misses crashes landing at 1–5 s (splash → main chains); set the env var temporarily per invocation. On Windows run it through `cmd /c` with the redirect inside cmd and read the verdict from the first `Smoke:` line of
|
|
31
|
+
The default 1000 ms wait misses crashes landing at 1–5 s (splash → main chains); set the env var temporarily per invocation. On Windows run it through `cmd /c` with the redirect inside cmd and read the verdict from the first `Smoke:` line of `.hometrans\smoke.log` (never a log in the project root: it would be committed with the next change and land in the patch) — never pipe through PowerShell (`| Out-File`, `2>&1 | ...`): `devecocli run` may build, and the hvigor daemon it starts inherits the pipe handle (same hazard as `devecocli build`, see build-fixer).
|
|
31
32
|
|
|
32
33
|
## Verdict — first output line (failures exit 1)
|
|
33
34
|
|
|
@@ -40,16 +41,18 @@ The default 1000 ms wait misses crashes landing at 1–5 s (splash → main chai
|
|
|
40
41
|
|
|
41
42
|
Non-`Smoke:` failures (signing / install / build / device) are **deployment errors** — fix and retry the round; never a smoke pass. Unresolvable → `DEPLOY_ERROR`.
|
|
42
43
|
|
|
44
|
+
`SKIPPED_HOMECHECK_BUILD_FAILED` is **not** a verdict this skill returns: when the post-Homecheck build is still red (the pipeline's `build-fixer` could not turn it green), the caller records that skip itself and never runs this skill — there is no fresh HAP to launch. A caller that passes it in the return enum below refers to its own marker, not to an outcome of this run.
|
|
45
|
+
|
|
43
46
|
## Fix loop — rounds 2–5
|
|
44
47
|
|
|
45
|
-
Per round: read the evidence file → fix the root cause directly (no `a2h-fix-build-errors`) → commit `smoke fix` → re-run as full **`devecocli run`** (code changed; `--skip-build` would redeploy the stale HAP), same env var and same Windows `cmd /c` form. An interrupted run re-enters at round 1. Round 5 still `FAIL_*` → stop and report.
|
|
48
|
+
Per round: read the evidence file (a `.png` only when `image_read` is `true`) → fix the root cause directly (no `a2h-fix-build-errors`) → commit `smoke fix` → re-run as full **`devecocli run`** (code changed; `--skip-build` would redeploy the stale HAP), same env var and same Windows `cmd /c` form. An interrupted run re-enters at round 1. Round 5 still `FAIL_*` → stop and report.
|
|
46
49
|
|
|
47
50
|
## Diagnosis
|
|
48
51
|
|
|
49
52
|
The evidence file is authoritative — the lists below are prioritized hypotheses, not an exhaustive space; when the evidence points elsewhere, follow the evidence.
|
|
50
53
|
|
|
51
54
|
- **`FAIL_CRASH`** — the crash log's JS stack names the throwing `file:line`. Usual suspects: function stored into `AppStorage` (observed properties reject functions, error 140115), undefined field, bad resource key, lifecycle misuse.
|
|
52
|
-
- **`FAIL_BLANK`** — in order: ① product module `module.json5` missing `"pages": "$profile:main_pages"` (most common — router page table never loads; everything compiles, window stays blank); ② `loadContent()` path ≠ designed first page; ③ window flags hiding the first screen; ④ first `NavDestination` never pushed; ⑤ none of ①–④ — diagnose the cause yourself from the
|
|
55
|
+
- **`FAIL_BLANK`** — in order: ① product module `module.json5` missing `"pages": "$profile:main_pages"` (most common — router page table never loads; everything compiles, window stays blank); ② `loadContent()` path ≠ designed first page; ③ window flags hiding the first screen; ④ first `NavDestination` never pushed; ⑤ none of ①–④ — diagnose the cause yourself from the project (and the screenshot, only when `image_read` is `true`).
|
|
53
56
|
|
|
54
57
|
## Return contract
|
|
55
58
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// The HarmonyOS permission dialog follows the device language: every build taps / detects both forms.
|
|
2
|
+
import { test } from 'node:test';
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
|
|
7
|
+
const SRC = fs.readFileSync(path.join(import.meta.dirname, '..', 'scripts', 'device_capture.mjs'), 'utf8');
|
|
8
|
+
|
|
9
|
+
test('device_capture recognises the permission dialog in Chinese and in English', () => {
|
|
10
|
+
const labels = /function permissionAllowCoordinate[\s\S]*?const labels = \[([\s\S]*?)\];/.exec(SRC);
|
|
11
|
+
assert.ok(labels, 'labels list not found');
|
|
12
|
+
assert.match(labels[1], /'允许'/);
|
|
13
|
+
assert.match(labels[1], /'allow'/);
|
|
14
|
+
const detects = SRC.match(/\|\|\s*\/[^\n]*allow\(\?: access\)\?\/i\.test\(pageXml\)/g) ?? [];
|
|
15
|
+
assert.equal(detects.length, 2);
|
|
16
|
+
for (const d of detects) assert.match(d, /允许访问/);
|
|
17
|
+
});
|
|
@@ -19,13 +19,14 @@ All generated content written into `project_design.md` and `module_design.md` mu
|
|
|
19
19
|
## Invocation
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
|
-
/module-semantic <target_directory> [--engine-mode auto|off|required] [--incremental off|preserve] [--scope project-source|ask]
|
|
22
|
+
/module-semantic <target_directory> [--engine-mode auto|off|required] [--homegraph-index auto|ready|missing] [--incremental off|preserve] [--scope project-source|ask]
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Inputs
|
|
26
26
|
|
|
27
27
|
* `target_directory`: analysis root directory. It must directly contain `build-profile.json5`. The scanner reads `modules[].srcPath` from this file to determine content scan directories. All generated documents and scanner state live under the fixed directory `<target_directory>/.hometrans/`.
|
|
28
28
|
* `engine_mode`: optional semantic-enrichment mode supplied through `--engine-mode`; valid values are `auto`, `off`, and `required`. The default value is `auto`.
|
|
29
|
+
* `homegraph_index`: optional index-ownership mode supplied through `--homegraph-index`; valid values are `auto`, `ready`, and `missing`. The default value is `auto` (standalone behavior). A pipeline dispatch (`a2h-spec-design-pipeline` F0/B5) passes `ready` or `missing` explicitly and is the only writer of the shared index.
|
|
29
30
|
* `incremental_mode`: optional preservation mode supplied through `--incremental`; valid values are `off` and `preserve`. The default value is `preserve`.
|
|
30
31
|
* `scope_mode`: optional write-scope mode supplied through `--scope`; valid values are `project-source` and `ask`. The default value is `project-source`.
|
|
31
32
|
|
|
@@ -39,15 +40,18 @@ The scanner always stores temporary analysis files and incremental state beneath
|
|
|
39
40
|
|
|
40
41
|
### Step 1: Validate and Scan
|
|
41
42
|
|
|
42
|
-
1. Resolve `target_directory`, `engine_mode`, `incremental_mode`, and `scope_mode` from `$ARGUMENTS`.
|
|
43
|
+
1. Resolve `target_directory`, `engine_mode`, `homegraph_index`, `incremental_mode`, and `scope_mode` from `$ARGUMENTS`.
|
|
43
44
|
2. Run the scanner before generation (it is a Node.js script with no external dependencies; Node is provisioned by `ht init`):
|
|
44
45
|
|
|
45
46
|
```bash
|
|
46
|
-
node "${
|
|
47
|
+
node "${SKILL_DIR}/scripts/scan_modules.mjs" \
|
|
47
48
|
"<target_directory>" \
|
|
48
|
-
--scope "<scope_mode>"
|
|
49
|
+
--scope "<scope_mode>" \
|
|
50
|
+
--incremental "<incremental_mode>"
|
|
49
51
|
```
|
|
50
52
|
|
|
53
|
+
The plan's `state_status` says how the baseline was read: `missing` (first run), `recovered` (the state file was unreadable and its `.bak` was used — tell the user), or `corrupt` (unreadable, no usable `.bak`: every module regenerates with reason `state_corrupt` — tell the user). Fingerprints are by file content, so a checkout or copy that only resets modification times regenerates nothing; `--incremental off` regenerates every module (reason `incremental_off`).
|
|
54
|
+
|
|
51
55
|
3. Read the scanner stdout. If it reports `requires_user_input=true`, ask the user to provide the actual module directory path and do not continue generation until the user provides it.
|
|
52
56
|
4. If scanning fails, stop generation and report the error.
|
|
53
57
|
5. Read the scanner outputs from `.hometrans/module_understanding/`:
|
|
@@ -70,19 +74,53 @@ The scanner outputs are authoritative. Do not add, remove, reclassify, or restru
|
|
|
70
74
|
|
|
71
75
|
### Step 2: Collect Engine Evidence
|
|
72
76
|
|
|
73
|
-
Use the
|
|
77
|
+
Use the HomeGraph code-analysis engine CLI. `engine_mode` controls how strictly the evidence is required;
|
|
78
|
+
`homegraph_index` controls who owns `<target_directory>/.homegraph`:
|
|
79
|
+
|
|
80
|
+
* `homegraph_index=ready` — **pipeline dispatch, shared index available.** The orchestrator owns the index,
|
|
81
|
+
so read it only. Never run `homegraph init` / `sync` / `index` / `unlock` (concurrent writes race), and
|
|
82
|
+
never treat `homegraph status` as a freshness gate: its `pendingChanges` only sees uncommitted edits, so a
|
|
83
|
+
clean tree reports "up to date" while the index lags HEAD.
|
|
84
|
+
* `homegraph_index=missing` — **pipeline dispatch, no usable index.** Do not probe, initialize, sync or
|
|
85
|
+
index anything. Note `degraded: homegraph-index-missing` in your run summary (never inside the generated
|
|
86
|
+
documents, whose format is fixed) and continue with local analysis; documentation is never blocked.
|
|
87
|
+
* `homegraph_index=auto` — **standalone (default).** Keep the existing probe/initialize/index behavior
|
|
88
|
+
described below. `a2h-app-migrate` and other standalone callers pass no flag and therefore stay in this
|
|
89
|
+
mode.
|
|
74
90
|
|
|
75
|
-
|
|
91
|
+
**`engine_mode` in all three modes:**
|
|
92
|
+
|
|
93
|
+
* `auto`: attempt the engine with timeout `120000ms`. If the command times out, or starts but does not complete, retry the same command once with timeout `300000ms`. Once the engine is up (indexed in `auto`, or the shared index in `ready`), use its graph evidence (CLI `explore` / `query` / `impact` results, when available) as auxiliary evidence. If both attempts fail, or no usable graph evidence is available, continue with local analysis.
|
|
76
94
|
* `off`: skip engine evidence entirely.
|
|
77
|
-
* `required`: stop generation if the engine cannot
|
|
95
|
+
* `required`: stop generation if the engine cannot provide usable graph evidence.
|
|
78
96
|
|
|
79
|
-
**
|
|
97
|
+
**Engine and index commands.** The CLI binary is `homegraph`; ArkTS analysis additionally requires
|
|
98
|
+
`arkanalyzer`. Both are provisioned globally by `ht init` — never install or fetch them from this skill. If
|
|
99
|
+
`homegraph` is not on PATH, stop and ask the user to run `ht init` (or manually
|
|
100
|
+
`npm install -g homegraph arkanalyzer`).
|
|
80
101
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
102
|
+
* `ready` — query the shared index (CamelCase symbol names, 2–5 names per `explore`; `-j` only on
|
|
103
|
+
`status`/`query`/`callers`/`callees`/`impact`/`affected`/`files`, since `explore` and `node` take no `-j`):
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
homegraph explore -p "<target_directory>" "<TypeA TypeB Type.member>"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
A failed or empty query falls back to local analysis with `degraded: <reason>` noted in your run summary.
|
|
110
|
+
* `missing` — no command; local analysis only, with `degraded: homegraph-index-missing`.
|
|
111
|
+
* `auto` — probe the literal `<target_directory>/.homegraph/homegraph.db` and build the local index only when
|
|
112
|
+
it is absent or unusable (`init` timeout `300000` ms, `sync`/`index` timeout `600000` ms). Do **not** use
|
|
113
|
+
`homegraph status` as the presence check: the engine resolves upward to an ancestor workspace's index and
|
|
114
|
+
reports `initialized: true` for a repo with no local db.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
homegraph init "<target_directory>"
|
|
118
|
+
homegraph sync -q "<target_directory>"
|
|
119
|
+
```
|
|
84
120
|
|
|
85
|
-
|
|
121
|
+
A corrupt or unusable index is rebuilt with `homegraph index --inplace "<target_directory>"`; never delete
|
|
122
|
+
`.homegraph/`. Once indexed, use `homegraph explore -p "<target_directory>" "<query>"` for the code-graph
|
|
123
|
+
queries. Under `engine_mode=required`, stop generation if indexing cannot complete.
|
|
86
124
|
|
|
87
125
|
Engine evidence may refine semantic descriptions, but it must not determine documentation placement.
|
|
88
126
|
|
|
@@ -201,7 +239,7 @@ Rules:
|
|
|
201
239
|
After `project_design.md` and all selected `module_design.md` files have been written successfully, run:
|
|
202
240
|
|
|
203
241
|
```bash
|
|
204
|
-
node "${
|
|
242
|
+
node "${SKILL_DIR}/scripts/commit_module_state.mjs" \
|
|
205
243
|
"<target_directory>"
|
|
206
244
|
```
|
|
207
245
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
//
|
|
9
9
|
// Node.js port of scan_modules.py; output is byte-for-byte equivalent.
|
|
10
10
|
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
11
12
|
import {
|
|
12
13
|
compareLower,
|
|
13
14
|
expanduser,
|
|
@@ -632,14 +633,36 @@ function semanticSourceFileSignature(targetDir, moduleDir, semanticFilePath) {
|
|
|
632
633
|
}
|
|
633
634
|
throw err;
|
|
634
635
|
}
|
|
636
|
+
let sha256 = null;
|
|
637
|
+
try {
|
|
638
|
+
sha256 = createHash("sha256").update(fs.readFileSync(absolutePath)).digest("hex");
|
|
639
|
+
} catch { /* unreadable: the fingerprint falls back to mtime / size for this file */ }
|
|
635
640
|
return {
|
|
636
641
|
path: semanticFilePath,
|
|
637
642
|
exists: true,
|
|
638
643
|
mtime_ns: stat.mtimeNs,
|
|
639
644
|
size: stat.size,
|
|
645
|
+
sha256,
|
|
640
646
|
};
|
|
641
647
|
}
|
|
642
648
|
|
|
649
|
+
/**
|
|
650
|
+
* Module fingerprint v2: by content (a checkout or copy resets mtimes without changing anything; an edit that keeps
|
|
651
|
+
* mtime and size is still a change). v1 hashed mtime / size; legacyFingerprint recomputes it so an old baseline
|
|
652
|
+
* still recognises an unchanged module once, and the next state is written as v2 (no full regeneration on upgrade).
|
|
653
|
+
*/
|
|
654
|
+
function contentFingerprint(structureHash, fileSignatures) {
|
|
655
|
+
const files = new Map();
|
|
656
|
+
for (const [p, s] of fileSignatures) files.set(p, { exists: s.exists, sha256: s.sha256 ?? null, size: s.sha256 ? null : s.size });
|
|
657
|
+
return hashJsonPayload({ module_structure_tree_hash: structureHash, semantic_source_files: files, fingerprint_version: 2 });
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
function legacyFingerprint(structureHash, fileSignatures) {
|
|
661
|
+
const files = new Map();
|
|
662
|
+
for (const [p, s] of fileSignatures) files.set(p, { path: s.path, exists: s.exists, mtime_ns: s.mtime_ns, size: s.size });
|
|
663
|
+
return hashJsonPayload({ module_structure_tree_hash: structureHash, semantic_source_files: files });
|
|
664
|
+
}
|
|
665
|
+
|
|
643
666
|
function moduleStateEntry(targetDir, moduleRecord) {
|
|
644
667
|
const moduleDir = String(moduleRecord.path);
|
|
645
668
|
const semanticSourceFiles = (moduleRecord.semantic_source_files === undefined ? [] : moduleRecord.semantic_source_files)
|
|
@@ -651,16 +674,14 @@ function moduleStateEntry(targetDir, moduleRecord) {
|
|
|
651
674
|
const structureHash = hashJsonPayload(
|
|
652
675
|
moduleRecord.module_structure_tree === undefined ? "" : moduleRecord.module_structure_tree,
|
|
653
676
|
);
|
|
654
|
-
const fingerprintPayload = {
|
|
655
|
-
module_structure_tree_hash: structureHash,
|
|
656
|
-
semantic_source_files: fileSignatures,
|
|
657
|
-
};
|
|
658
677
|
return {
|
|
659
678
|
path: moduleDir,
|
|
660
679
|
module_design_path: String(moduleRecord.module_design_path),
|
|
661
680
|
module_structure_tree_hash: structureHash,
|
|
662
681
|
semantic_source_files: fileSignatures,
|
|
663
|
-
|
|
682
|
+
fingerprint_version: 2,
|
|
683
|
+
module_fingerprint: contentFingerprint(structureHash, fileSignatures),
|
|
684
|
+
legacy_fingerprint: legacyFingerprint(structureHash, fileSignatures),
|
|
664
685
|
};
|
|
665
686
|
}
|
|
666
687
|
|
|
@@ -668,9 +689,24 @@ function moduleDesignExists(docBase, moduleDesignPathValue) {
|
|
|
668
689
|
return pathExists(path.join(docBase, moduleDesignPathValue));
|
|
669
690
|
}
|
|
670
691
|
|
|
671
|
-
|
|
692
|
+
/**
|
|
693
|
+
* The incremental baseline, saying how it was obtained: ok | missing | recovered (the file was unreadable and
|
|
694
|
+
* commit_module_state.mjs's .bak was used) | corrupt (unreadable, no usable .bak: every module regenerates, and
|
|
695
|
+
* the plan says why instead of looking like a first run).
|
|
696
|
+
*/
|
|
697
|
+
function loadState(statePath) {
|
|
698
|
+
if (!pathExists(statePath)) return { state: {}, status: "missing" };
|
|
699
|
+
const s = loadJsonIfPresent(statePath);
|
|
700
|
+
if (Object.keys(s).length > 0) return { state: s, status: "ok" };
|
|
701
|
+
const bak = loadJsonIfPresent(`${statePath}.bak`);
|
|
702
|
+
if (Object.keys(bak).length > 0) return { state: bak, status: "recovered" };
|
|
703
|
+
return { state: {}, status: "corrupt" };
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
function buildModuleUpdatePlan(targetDir, moduleRecords, scopeMode, docBase, hometransDir, incremental = "preserve") {
|
|
672
707
|
const statePath = path.join(hometransDir, MODULE_UNDERSTANDING_DIR, INCREMENTAL_STATE_JSON);
|
|
673
|
-
const
|
|
708
|
+
const loaded = loadState(statePath);
|
|
709
|
+
const previousState = loaded.state;
|
|
674
710
|
let previousModules = {};
|
|
675
711
|
if (previousState !== null && Object.keys(previousState).length > 0) {
|
|
676
712
|
previousModules = previousState.modules === undefined ? {} : previousState.modules;
|
|
@@ -692,13 +728,18 @@ function buildModuleUpdatePlan(targetDir, moduleRecords, scopeMode, docBase, hom
|
|
|
692
728
|
const previousEntry = hasPrevious ? previousModules[moduleDir] : undefined;
|
|
693
729
|
const reasons = [];
|
|
694
730
|
|
|
695
|
-
if (
|
|
731
|
+
if (incremental === "off") reasons.push("incremental_off");
|
|
732
|
+
if (!stateExists) reasons.push(loaded.status === "corrupt" ? "state_corrupt" : "state_missing");
|
|
696
733
|
if (!moduleDesignExists(docBase, moduleDesignPathValue)) reasons.push("module_design_missing");
|
|
697
734
|
if (previousEntry === undefined || previousEntry === null) {
|
|
698
735
|
reasons.push("module_not_in_previous_state");
|
|
699
736
|
} else if (typeof previousEntry !== "object" || Array.isArray(previousEntry)) {
|
|
700
737
|
reasons.push("previous_state_invalid");
|
|
701
|
-
|
|
738
|
+
// the state is read with parseStrictJson: integers come back as BigInt (2n), so compare as a number
|
|
739
|
+
} else if (Number(previousEntry.fingerprint_version) === 2
|
|
740
|
+
? previousEntry.module_fingerprint !== currentEntry.module_fingerprint
|
|
741
|
+
// a v1 baseline: compare the way it was written; an unchanged module is not regenerated on upgrade
|
|
742
|
+
: previousEntry.module_fingerprint !== currentEntry.legacy_fingerprint) {
|
|
702
743
|
reasons.push("module_input_changed");
|
|
703
744
|
}
|
|
704
745
|
|
|
@@ -732,6 +773,8 @@ function buildModuleUpdatePlan(targetDir, moduleRecords, scopeMode, docBase, hom
|
|
|
732
773
|
scope_mode: scopeMode,
|
|
733
774
|
state_path: INCREMENTAL_STATE_JSON,
|
|
734
775
|
state_exists: stateExists,
|
|
776
|
+
state_status: loaded.status,
|
|
777
|
+
incremental,
|
|
735
778
|
requires_scope_confirmation: scopeMode === "ask",
|
|
736
779
|
normal_run_scope: "project-source",
|
|
737
780
|
module_update_policy: "changed-or-missing",
|
|
@@ -756,6 +799,7 @@ function parseArgs(argv) {
|
|
|
756
799
|
|
|
757
800
|
const targetDir = resolveLikePython(expanduser(argv[0]));
|
|
758
801
|
let scopeMode = "project-source";
|
|
802
|
+
let incremental = "preserve";
|
|
759
803
|
let index = 1;
|
|
760
804
|
|
|
761
805
|
while (index < argv.length) {
|
|
@@ -769,6 +813,16 @@ function parseArgs(argv) {
|
|
|
769
813
|
index += 2;
|
|
770
814
|
continue;
|
|
771
815
|
}
|
|
816
|
+
if (arg === "--incremental" || arg.startsWith("--incremental=")) {
|
|
817
|
+
const value = arg.includes("=") ? arg.slice(arg.indexOf("=") + 1) : argv[index + 1];
|
|
818
|
+
if (value !== "preserve" && value !== "off") {
|
|
819
|
+
process.stdout.write(`${pyJsonDump({ error: "--incremental must be preserve or off", value: value ?? null })}\n`);
|
|
820
|
+
return [null, null, 2];
|
|
821
|
+
}
|
|
822
|
+
incremental = value;
|
|
823
|
+
index += arg.includes("=") ? 1 : 2;
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
772
826
|
if (arg.startsWith("--scope=")) {
|
|
773
827
|
scopeMode = arg.slice(arg.indexOf("=") + 1);
|
|
774
828
|
index += 1;
|
|
@@ -787,7 +841,7 @@ function parseArgs(argv) {
|
|
|
787
841
|
return [null, null, 2];
|
|
788
842
|
}
|
|
789
843
|
|
|
790
|
-
return [targetDir, scopeMode, 0];
|
|
844
|
+
return [targetDir, scopeMode, 0, incremental];
|
|
791
845
|
}
|
|
792
846
|
|
|
793
847
|
function writeJson(p, payload) {
|
|
@@ -796,7 +850,7 @@ function writeJson(p, payload) {
|
|
|
796
850
|
|
|
797
851
|
function main() {
|
|
798
852
|
const argv = process.argv.slice(2);
|
|
799
|
-
const [targetDir, scopeMode, parseStatus] = parseArgs(argv);
|
|
853
|
+
const [targetDir, scopeMode, parseStatus, incremental] = parseArgs(argv);
|
|
800
854
|
if (parseStatus !== 0) return parseStatus;
|
|
801
855
|
const hometransDir = resolveLikePython(path.join(targetDir, HOMETRANS_DIR_NAME));
|
|
802
856
|
|
|
@@ -970,6 +1024,7 @@ function main() {
|
|
|
970
1024
|
scopeMode,
|
|
971
1025
|
docBase,
|
|
972
1026
|
hometransDir,
|
|
1027
|
+
incremental,
|
|
973
1028
|
);
|
|
974
1029
|
|
|
975
1030
|
const inventory = {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Module-docs incremental baseline (incremental phase 2, W3.2): content fingerprints, v1 baselines, a corrupt state,
|
|
2
|
+
// and --incremental off. Self-contained fixture: one HarmonyOS module.
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import os from "node:os";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import test from "node:test";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
|
|
11
|
+
const SCAN = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "scripts", "scan_modules.mjs");
|
|
12
|
+
|
|
13
|
+
function project() {
|
|
14
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), "msd-fp-"));
|
|
15
|
+
const w = (p, s) => { fs.mkdirSync(path.dirname(path.join(d, p)), { recursive: true }); fs.writeFileSync(path.join(d, p), s); };
|
|
16
|
+
w("build-profile.json5", '{ app: {}, modules: [{ name: "entry", srcPath: "./entry" }] }');
|
|
17
|
+
w("entry/src/main/ets/pages/Index.ets", "@Entry @Component struct Index { build() {} }\n");
|
|
18
|
+
w("entry/src/main/module.json5", '{ module: { name: "entry", type: "entry" } }');
|
|
19
|
+
w("entry/oh-package.json5", '{ name: "entry" }');
|
|
20
|
+
return d;
|
|
21
|
+
}
|
|
22
|
+
const understanding = (d) => path.join(d, ".hometrans", "module_understanding");
|
|
23
|
+
function scan(d, ...args) {
|
|
24
|
+
const r = spawnSync(process.execPath, [SCAN, d, ...args], { encoding: "utf8" });
|
|
25
|
+
assert.equal(r.status, 0, r.stdout + r.stderr);
|
|
26
|
+
return JSON.parse(fs.readFileSync(path.join(understanding(d), "module_update_plan.json"), "utf8"));
|
|
27
|
+
}
|
|
28
|
+
/** What commit_module_state.mjs does after the documents are written: the plan's next_state becomes the baseline. */
|
|
29
|
+
function commit(d, plan) {
|
|
30
|
+
for (const m of [...plan.modules_to_update, ...plan.skipped_modules]) {
|
|
31
|
+
const doc = path.join(d, ".hometrans", m.module_design_path);
|
|
32
|
+
fs.mkdirSync(path.dirname(doc), { recursive: true });
|
|
33
|
+
fs.writeFileSync(doc, "# module\n");
|
|
34
|
+
}
|
|
35
|
+
fs.writeFileSync(path.join(understanding(d), ".module_semantic_docs_state.json"), JSON.stringify(plan.next_state));
|
|
36
|
+
}
|
|
37
|
+
const reasons = (plan) => plan.modules_to_update.map((m) => m.reasons.join(","));
|
|
38
|
+
|
|
39
|
+
test("content fingerprint: an mtime-only change regenerates nothing, a content change does", () => {
|
|
40
|
+
const d = project();
|
|
41
|
+
const first = scan(d);
|
|
42
|
+
assert.ok(first.modules_to_update.length >= 1);
|
|
43
|
+
assert.equal(first.state_status, "missing");
|
|
44
|
+
commit(d, first);
|
|
45
|
+
assert.deepEqual(scan(d).modules_to_update, [], "nothing changed");
|
|
46
|
+
const src = path.join(d, "entry/src/main/ets/pages/Index.ets");
|
|
47
|
+
const later = new Date(Date.now() + 3600_000);
|
|
48
|
+
fs.utimesSync(src, later, later); // a checkout / copy: same bytes, new mtime
|
|
49
|
+
assert.deepEqual(scan(d).modules_to_update, [], "mtime alone is not a change");
|
|
50
|
+
fs.writeFileSync(src, "@Entry @Component struct Index { build() { Text('x') } }\n");
|
|
51
|
+
const after = scan(d);
|
|
52
|
+
assert.ok(reasons(after).some((r) => r.includes("module_input_changed")));
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("a v1 baseline (mtime fingerprint) still recognises an unchanged module, and the next state is v2", () => {
|
|
56
|
+
const d = project();
|
|
57
|
+
const first = scan(d);
|
|
58
|
+
const v1 = structuredClone(first.next_state);
|
|
59
|
+
for (const e of Object.values(v1.modules)) {
|
|
60
|
+
e.module_fingerprint = e.legacy_fingerprint; // what the old scanner stored
|
|
61
|
+
delete e.fingerprint_version;
|
|
62
|
+
}
|
|
63
|
+
commit(d, { ...first, next_state: v1 });
|
|
64
|
+
const plan = scan(d);
|
|
65
|
+
assert.deepEqual(plan.modules_to_update, [], "upgrading the scanner regenerates nothing");
|
|
66
|
+
assert.ok(Object.values(plan.next_state.modules).every((e) => e.fingerprint_version === 2));
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("a corrupt baseline: recovered from .bak when it can be, otherwise named state_corrupt", () => {
|
|
70
|
+
const d = project();
|
|
71
|
+
const first = scan(d);
|
|
72
|
+
commit(d, first);
|
|
73
|
+
const state = path.join(understanding(d), ".module_semantic_docs_state.json");
|
|
74
|
+
fs.copyFileSync(state, `${state}.bak`);
|
|
75
|
+
fs.writeFileSync(state, "{ broken");
|
|
76
|
+
const rec = scan(d);
|
|
77
|
+
assert.equal(rec.state_status, "recovered");
|
|
78
|
+
assert.deepEqual(rec.modules_to_update, [], "the .bak baseline still says nothing changed");
|
|
79
|
+
fs.rmSync(`${state}.bak`);
|
|
80
|
+
const bad = scan(d);
|
|
81
|
+
assert.equal(bad.state_status, "corrupt");
|
|
82
|
+
assert.ok(reasons(bad).every((r) => r.includes("state_corrupt")), "not mistaken for a first run");
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test("--incremental off regenerates every module; a bad value is a usage error", () => {
|
|
86
|
+
const d = project();
|
|
87
|
+
commit(d, scan(d));
|
|
88
|
+
const off = scan(d, "--incremental", "off");
|
|
89
|
+
assert.equal(off.incremental, "off");
|
|
90
|
+
assert.ok(off.modules_to_update.length >= 1);
|
|
91
|
+
assert.ok(reasons(off).every((r) => r.includes("incremental_off")));
|
|
92
|
+
assert.deepEqual(scan(d, "--incremental=preserve").modules_to_update, []);
|
|
93
|
+
assert.equal(spawnSync(process.execPath, [SCAN, d, "--incremental", "sometimes"], { encoding: "utf8" }).status, 2);
|
|
94
|
+
});
|