@buaa_smat/hometrans 26.0.3 → 26.0.4-devecocli.1
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/agents/code-reviewer.md +91 -21
- package/devecocli-plugin/common.ts +2271 -0
- package/devecocli-plugin/content-resolver.ts +363 -0
- package/devecocli-plugin/install.ts +72 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +77 -0
- 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/index.js +1643 -0
- package/package.json +10 -13
- package/plugin.jsonc +12 -0
- 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/README.md +0 -440
- package/dist/cli/config-store.js +0 -128
- package/dist/cli/config.js +0 -48
- package/dist/cli/editors.json +0 -114
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -76
- package/dist/cli/init.js +0 -2618
- package/dist/cli/uninstall.js +0 -406
- package/dist/platform/compose.js +0 -228
- package/dist/platform/frontmatter.js +0 -151
- package/dist/platform/installer.js +0 -417
- package/dist/platform/language.js +0 -77
- package/dist/platform/registry.js +0 -337
- package/dist/platform/transform.js +0 -363
- package/dist/platform/types.js +0 -9
- package/dist/platform/validate.js +0 -152
- package/dist/utils/regex.js +0 -7
- package/env-requirements.json +0 -536
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- 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
|
@@ -84,6 +84,13 @@ function main() {
|
|
|
84
84
|
let r = decide(src, path.join(root, "absent"), null);
|
|
85
85
|
check("absent target → generate (fresh)", r.mode === "generate" && !("resume" in r), r);
|
|
86
86
|
|
|
87
|
+
// M22: the orchestrator's bookkeeping (.hometrans) written before the shell does not block it
|
|
88
|
+
const booked = path.join(root, "booked");
|
|
89
|
+
fs.mkdirSync(path.join(booked, ".hometrans", "app-migrate"), { recursive: true });
|
|
90
|
+
fs.writeFileSync(path.join(booked, ".hometrans", "app-migrate", "stage-ledger.jsonl"), "{}\n");
|
|
91
|
+
r = decide(src, booked, null);
|
|
92
|
+
check(".hometrans-only target → generate (fresh)", r.mode === "generate", r);
|
|
93
|
+
|
|
87
94
|
const t = shell(root);
|
|
88
95
|
r = decide(src, t, null);
|
|
89
96
|
check("shell without marker → reconcile (legacy behaviour kept)", r.mode === "reconcile", r);
|
|
@@ -128,6 +135,25 @@ function main() {
|
|
|
128
135
|
"--target-project-dir", path.join(root, "absent3"), "--mode", "auto"]);
|
|
129
136
|
check("CLI --mode auto is accepted",
|
|
130
137
|
cli.returncode === 0 && cli.stdout.includes('"mode": "generate"'), cli.stderr.slice(-300));
|
|
138
|
+
|
|
139
|
+
// D8: a partial formal-document set is rebuilt, not skipped; the CLI archives the partial set first
|
|
140
|
+
const p = path.join(root, "partial");
|
|
141
|
+
fs.mkdirSync(p);
|
|
142
|
+
for (const rel of ["build-profile.json5", "oh-package.json5"]) fs.writeFileSync(path.join(p, rel), "{}\n", "utf8");
|
|
143
|
+
fs.mkdirSync(path.join(p, ".hometrans"));
|
|
144
|
+
fs.writeFileSync(path.join(p, ".hometrans", "project_design.md"), "# x\n", "utf8");
|
|
145
|
+
r = decide(src, p, null);
|
|
146
|
+
check("partial docs → routed reconcile with rebuild (not skipped)",
|
|
147
|
+
r.status === "routed" && r.mode === "reconcile"
|
|
148
|
+
&& JSON.stringify(r.rebuild) === JSON.stringify({ existing: ["project_design.md"],
|
|
149
|
+
missing: ["database_design.md", "preferences_design.md"] }), r);
|
|
150
|
+
const pc = runCapture([process.execPath, path.join(SCRIPTS, "inspect_and_route.mjs"), src, "--target-project-dir", p]);
|
|
151
|
+
const archived = JSON.parse(pc.stdout).rebuild?.archived_to;
|
|
152
|
+
check("CLI archives the partial set",
|
|
153
|
+
pc.returncode === 0 && /^\.hometrans\/arch_archive\/\d{8}T\d{6}Z$/.test(archived || "")
|
|
154
|
+
&& fs.existsSync(path.join(p, archived, "project_design.md"))
|
|
155
|
+
&& !fs.existsSync(path.join(p, ".hometrans", "project_design.md")), pc.stdout.slice(-300));
|
|
156
|
+
check("after archiving: plain reconcile, no rebuild", !("rebuild" in decide(src, p, null)));
|
|
131
157
|
} finally {
|
|
132
158
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
133
159
|
}
|
|
@@ -185,8 +185,9 @@ function checkAnnotations(annotatedPaths, projectRoot, targetDirs, report) {
|
|
|
185
185
|
{ path: pathStr },
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
+
// existing-target-annotation.md rule 5 (age check): a stale inspection is an error, not a warning
|
|
188
189
|
if (!targetDirs.has(pathStr)) {
|
|
189
|
-
report.
|
|
190
|
+
report.error(
|
|
190
191
|
"annotation_not_in_inspection",
|
|
191
192
|
`Annotated path ${pyRepr(pathStr)} exists on disk but was not in target_inspection.json; `
|
|
192
193
|
+ "the inspection may be stale",
|
|
@@ -240,7 +241,8 @@ function checkReconciliationCoverage(annotatedPaths, archReconciliation, report)
|
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
for (const pathStr of [...existingTargets].filter((p) => p && !annotatedPaths.has(p)).sort(compareCodePoints)) {
|
|
243
|
-
|
|
244
|
+
// rule 6 checks both directions; this one is as blocking as annotation_missing_in_reconcile
|
|
245
|
+
report.error(
|
|
244
246
|
"reconcile_target_not_annotated",
|
|
245
247
|
`architecture_reconciliation.json names ${pyRepr(pathStr)} as an existing target, `
|
|
246
248
|
+ "but it carries no # EXISTING annotation in project_design.md",
|
|
@@ -30,7 +30,19 @@ extraction to the commit.
|
|
|
30
30
|
`a2h-spec-design-pipeline` verified `devecocli docs` at Initialization. `unavailable` means the
|
|
31
31
|
wrapper may stall on a cold or busy docs index, so skip it, use `references/ISSUES.md`, and
|
|
32
32
|
record `state-docs: unavailable`; the chunk is never blocked on the docs.
|
|
33
|
-
- `
|
|
33
|
+
- `api-docs-mode` (optional `available` / `unavailable`, default `available`) — whether the
|
|
34
|
+
**API-reference** catalogue answered during the same Initialization probe. This gate is soft:
|
|
35
|
+
`unavailable` skips the API lookups (use the local `.d.ts` and `references/ISSUES.md`) and
|
|
36
|
+
records `api-docs: unavailable`. It never gates the chunk and never changes the
|
|
37
|
+
`state-docs` verdict.
|
|
38
|
+
- `harmonyos-project-path` (abs) — target HarmonyOS project (the worktree under a pipeline dispatch): the
|
|
39
|
+
tree you edit, and the only truth for what exists on this branch.
|
|
40
|
+
- `android-project-path` (optional, abs) — Android source project root, consulted as a **reference**
|
|
41
|
+
when the spec's description of a detail is uncertain (the spec stays the implementation baseline).
|
|
42
|
+
It is the join base for the spec's `## 安卓代码参考` anchors, which are project-root-relative
|
|
43
|
+
(`app/src/main/java/…/MainFragment.java:45`). Absent or not a directory → implement from the spec
|
|
44
|
+
alone: never hunt the disk for a look-alike source file and never claim "the source says" — see
|
|
45
|
+
Scenario Principles 3–4 in `references/code-generation.md`.
|
|
34
46
|
- `unitId` (optional) — the dispatch ledger unit (`chunk:g<G>c<k>`) this run implements; echo it in the final JSON and logs. It is **not** a credential: the coder never writes the ledger.
|
|
35
47
|
- `output-path` (abs) — the per-attempt output directory `.../spec_group_<G>/chunk_<k>/attempt_<n>`; where `commit-info.md`, `issues.md` (when blocked), `state_docs_used.md`, and `wiring.md` (wiring-mode) are written. The orchestrator owns every ledger write (claim/intent/confirm/beat/submit/release); the coder only writes its artifacts.
|
|
36
48
|
- `wiring-mode` (optional, `true`/`false`, default `false`) — batch-wave mode flag. When `true`,
|
|
@@ -41,14 +53,55 @@ extraction to the commit.
|
|
|
41
53
|
- `shared-layer-list`: cumulative shared-layer inventory from the orchestrator
|
|
42
54
|
(`none` if absent). Advisory only: prefer these APIs; append to the shared
|
|
43
55
|
module when insufficient; never skip a scenario because it is "shared".
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
- `hmos-project-path` (optional, abs) — the shared `<HMOS>` main checkout: the HomeGraph **index root** for
|
|
57
|
+
existing APIs, shared layers and call chains. Never the worktree. Absent on a standalone run → the
|
|
58
|
+
HomeGraph project is `harmonyos-project-path` itself.
|
|
59
|
+
- `hmos-index-ready` / `android-index-ready` (optional `true`/`false`) — the dispatcher's verdict for each
|
|
60
|
+
shared index. `true` → that index is queryable; `false`/absent → omit that index and use plain
|
|
61
|
+
`Read`/`Grep` for it.
|
|
62
|
+
- `homegraph-guide` (optional, abs, pipeline dispatch) — the `a2h-spec-design-pipeline` skill's
|
|
63
|
+
`references/homegraph-cli.md` (the dispatcher passes its absolute path): the shared CLI query discipline and
|
|
64
|
+
evidence format. Read it before the first HomeGraph query.
|
|
65
|
+
- `engine-mode` (optional, `auto`/`off`/`required`, default `auto`) and `engine-degraded-reason` (optional,
|
|
66
|
+
`null` when none) — the engine verdict for this chunk. `required` + an unusable `<HMOS>` index → stop
|
|
67
|
+
before generating. A non-null reason means the snapshot may lag HEAD: do not retry or rebuild it, fall
|
|
68
|
+
back to `Read`/`Grep` where it looks stale, and record `degraded: <reason>`.
|
|
69
|
+
- **HomeGraph rule** (pipeline dispatch: `hmos-project-path` + `homegraph-guide` present). The shared
|
|
70
|
+
indexes are **read-only** and **CLI-only**:
|
|
71
|
+
- `<hmos-project-path>` = architecture, existing APIs, shared layers, call chains;
|
|
72
|
+
`<android-project-path>` = the reference implementation.
|
|
73
|
+
- Locate code with `homegraph explore -p "<hmos-project-path>" "<TypeA TypeB Type.member>"` and
|
|
74
|
+
`homegraph explore -p "<android-project-path>" "<Symbol>"`; add `impact` / `callers` only when the
|
|
75
|
+
change's blast radius matters (2–5 names per `explore`; `-j` only on
|
|
76
|
+
`status`/`query`/`callers`/`callees`/`impact`/`affected`/`files` — `explore` and `node` take no `-j`).
|
|
77
|
+
- **Start with `<HMOS>`, before reading source.** One `explore` on `<hmos-project-path>` with this chunk's
|
|
78
|
+
modules / pages / VMs / shared-layer symbols establishes what the main checkout already implements. Query
|
|
79
|
+
`<android-project-path>` during design only when the SPEC's `## 安卓代码参考` anchor is missing, ambiguous,
|
|
80
|
+
or the scenario needs a cross-file call chain; when the anchor gives `file:line`, `read` that file. Do
|
|
81
|
+
**not** query once per scenario. Add `impact`/`callers` when the change touches a shared layer or public
|
|
82
|
+
API.
|
|
83
|
+
- **Never truncate `explore` output** (`| Select-Object -First N`). The first screenfuls are often
|
|
84
|
+
`Partial locator` / import-resolution notes; truncating them makes a present file look unindexed. Use
|
|
85
|
+
`query -l` or `node -f ... --symbols-only` for targeted facts and `files --pattern` to check presence.
|
|
86
|
+
- Never run `homegraph init` / `sync` / `index` / `unlock`: the orchestrator owns both indexes and is
|
|
87
|
+
their only writer. There is **no worktree index** — never create or query one.
|
|
88
|
+
- **`index_ahead`**: a symbol an index lists but this worktree lacks is another group's merged code or a
|
|
89
|
+
later commit — **never import, copy or re-implement it**; cite the worktree. The reverse (`trust the
|
|
90
|
+
worktree`): a symbol present here but absent from the index is real — re-query once, then read the file
|
|
91
|
+
and cite `file:line`.
|
|
92
|
+
- Record the queries **by phase** — the first line is `start | hmos`, then `design | android` for SPEC
|
|
93
|
+
anchor gaps and `code | hmos` for impact — and their `file:line` anchors, or `degraded: <reason>` /
|
|
94
|
+
`fallback: <reason>` / `not-applicable: <files>` when no query was possible, inside `commit-info.md`'s
|
|
95
|
+
`## HomeGraph evidence` section (see step 6). A section with anchors but **without** a `start | hmos`
|
|
96
|
+
line is `homegraph-start-missing` (warning under `auto`, failure under `required`); an anchor written
|
|
97
|
+
outside that section does not count.
|
|
98
|
+
- **Standalone exception**: only a **standalone coder run** — one whose prompt carries neither
|
|
99
|
+
`hmos-project-path` nor `homegraph-guide`, so `references/spec-design.md` is not dispatched with
|
|
100
|
+
`homegraph_project`/`homegraph_guide` at all — is outside the read-only rule. There,
|
|
101
|
+
`harmonyos-project-path` may itself be the main checkout, and its index is then simply your local one
|
|
102
|
+
(the engine step of `references/spec-design.md` may probe, `init`/`sync` it). A pipeline dispatch always
|
|
103
|
+
sends both fields; the design step's fallback of `homegraph_project` to `harmonyos-project-path` is only
|
|
104
|
+
a path default, never an opt-out. Absent → plain `Grep`/`Read`.
|
|
52
105
|
|
|
53
106
|
## Procedure
|
|
54
107
|
|
|
@@ -64,6 +117,14 @@ extraction to the commit.
|
|
|
64
117
|
- `database_design` / `preferences_design` = `design-database-design` /
|
|
65
118
|
`design-preferences-design` (pass `--database-design` / `--preferences-design`
|
|
66
119
|
only when provided)
|
|
120
|
+
- `homegraph_project` = `hmos-project-path` when present, otherwise `harmonyos-project-path` (standalone coder run)
|
|
121
|
+
- `android_project` = `android-project-path`
|
|
122
|
+
- `homegraph_guide` = `homegraph-guide`
|
|
123
|
+
|
|
124
|
+
`homegraph_project` / `android_project` / `homegraph_guide` are **prompt inputs** to
|
|
125
|
+
`references/spec-design.md`, not CLI options: never append them to the
|
|
126
|
+
`inspect_spec_design_inputs.mjs` invocation (it accepts only its documented flags and exits with
|
|
127
|
+
`unrecognized arguments` on anything else).
|
|
67
128
|
If the Step 1 inspect command exits non-zero, write `{output-path}/issues.md`
|
|
68
129
|
with type `design_gap_blocked` when `project_design.md` is missing, otherwise
|
|
69
130
|
`validation_failure`; never commit, and stop. If validation writes an issue
|
|
@@ -73,7 +134,9 @@ extraction to the commit.
|
|
|
73
134
|
1. **Generate the code.** Follow `references/code-generation.md` with:
|
|
74
135
|
- spec document = `spec-file`
|
|
75
136
|
- design document = `spec-design-file`
|
|
76
|
-
-
|
|
137
|
+
- Android source root = `android-project-path` (may be absent)
|
|
138
|
+
- `<HMOS>` in the hook-check commands = `harmonyos-project-path` (the worktree); the HomeGraph queries
|
|
139
|
+
in Design Principle 2 use `hmos-project-path` / `android-project-path` as described above.
|
|
77
140
|
|
|
78
141
|
**State-management doc gate (mandatory when the chunk touches UI state).** Before choosing any
|
|
79
142
|
state variable or decorator, run the gate in `references/code-generation.md` Step 2 — it owns the
|
|
@@ -83,9 +146,33 @@ extraction to the commit.
|
|
|
83
146
|
(unresolved key, lock budget, moved document) takes the same fallback with the key and error
|
|
84
147
|
recorded. Never guess silently and never block the chunk on the docs.
|
|
85
148
|
|
|
149
|
+
**Platform API doc gate (soft).** When the chunk calls a platform API whose call shape the
|
|
150
|
+
worktree does not already show, run the gate in `references/code-generation.md` Step 2 — it owns
|
|
151
|
+
the trigger, the `state_doc.mjs search` / `read-id --section` commands, the
|
|
152
|
+
worktree > `.d.ts` > docs precedence, the per-chunk budget and the API-level check. Record the
|
|
153
|
+
rows plus `api-docs: available` / `unavailable` / `not-applicable` in the same
|
|
154
|
+
`state_docs_used.md`. With `api-docs-mode: unavailable`, skip the wrapper and record
|
|
155
|
+
`api-docs: unavailable`; this gate never blocks the chunk and never changes the `state-docs`
|
|
156
|
+
verdict.
|
|
157
|
+
|
|
86
158
|
Do the code generation, its scenario self-check (up to 3 iterations), and its
|
|
87
159
|
MVVM + px/vp unit hook checks. Do not re-plan or override that workflow.
|
|
88
160
|
|
|
161
|
+
**Network verification (soft).** For a scenario that performs a network exchange or decodes its
|
|
162
|
+
response — HTTP(S) request, WebSocket frame, socket/private-protocol message, or gRPC call —
|
|
163
|
+
Implementation Principle 9 in `references/code-generation.md` recommends a real check of both the
|
|
164
|
+
sent and the decoded payload when reachable. Confirm each request's body/query/headers, defaults and
|
|
165
|
+
encoding and its response field mapping from the spec, or from the anchored Android source where
|
|
166
|
+
the spec leaves them open — never guess a body key or a default. Only idempotent read-only exchanges
|
|
167
|
+
(HTTP GET/HEAD, or a query/command the source declares read-only) may be replayed; a side-effecting
|
|
168
|
+
request is never sent and is recorded as `network-evidence: unavailable (side-effecting)`. A spec
|
|
169
|
+
may contain several requests (even chained): each request has its own 3-attempt budget, and one
|
|
170
|
+
request's failure never skips the next. A request that consumes an earlier response (including a
|
|
171
|
+
token) is recorded as `network-evidence: unavailable (upstream … unavailable)` instead of being
|
|
172
|
+
retried when that upstream has no evidence. It is best-effort: skip after 3 failed attempts **for
|
|
173
|
+
that request**, note `network-evidence: unavailable (<reason>)` per request in the self-check, and
|
|
174
|
+
never block the chunk.
|
|
175
|
+
|
|
89
176
|
**Absolute-path discipline**: use only the `spec-file` and `spec-design-file` absolute paths
|
|
90
177
|
passed in. When the working directory is a git worktree (batch-wave mode), the project may
|
|
91
178
|
contain same-named design-file copies from earlier runs — **never** search for, or act on, any
|
|
@@ -152,21 +239,63 @@ extraction to the commit.
|
|
|
152
239
|
- `commit-id: <full hex hash>` (or `commit-id: none` for an honest verification-only pass).
|
|
153
240
|
- `change-type: code` | `change-type: comment-only` | `change-type: none` — the verified
|
|
154
241
|
classification from step 5.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
242
|
+
- plus a `## Spec 偏差` section whenever the implementation deliberately departs from the spec
|
|
243
|
+
(a Scenario Principle 4 conflict, or an unavailable Android source that left a behavior
|
|
244
|
+
unclear). It is the canonical record of the departure — a local code comment may point to it,
|
|
245
|
+
nothing else replaces it — and the review and fix stages read it so a deliberate port is not
|
|
246
|
+
fixed back to the spec's wording:
|
|
247
|
+
|
|
248
|
+
```markdown
|
|
249
|
+
## Spec 偏差
|
|
250
|
+
|
|
251
|
+
- android-source: available | unavailable (one-line reason)
|
|
252
|
+
|
|
253
|
+
| scenario | spec says | implemented | basis |
|
|
254
|
+
|---|---|---|---|
|
|
255
|
+
| so-26 | default page is 0 | default page is 1 | app/src/main/java/…/Pager.java:45 |
|
|
256
|
+
| so-27 | label from strings.xml | label computed in page | design §技术参考: LabelUtil |
|
|
257
|
+
```
|
|
258
|
+
Omit the section when there is no deviation.
|
|
259
|
+
- plus a `## HomeGraph evidence` section — the canonical record of the queries this chunk ran. The
|
|
260
|
+
orchestrator's `parseHomeGraphEvidence` scans **only inside this section**, so the anchor,
|
|
261
|
+
`degraded:`, `fallback:` or `not-applicable:` must be written here (an anchor anywhere else does not
|
|
262
|
+
count). Omit it only under the standalone exception, where no shared index exists:
|
|
263
|
+
|
|
264
|
+
```markdown
|
|
265
|
+
## HomeGraph evidence
|
|
266
|
+
|
|
267
|
+
- `explore -p "<hmos-project-path>" "LoginPage LoginViewModel AuthRepository"` → `LoginViewModel.ets:88`
|
|
268
|
+
- `explore -p "<android-project-path>" "LoginActivity LoginViewModel AuthRepository"` → `LoginActivity.kt:104`
|
|
269
|
+
- anchors: `LoginViewModel.ets:88`, `AuthRepository.ets:41`
|
|
270
|
+
- index_ahead: none
|
|
271
|
+
- degraded: none
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
At least one `file:line` anchor, `degraded: <reason>`, `fallback: <reason>` or
|
|
275
|
+
`not-applicable: <files>` must appear inside the section; otherwise the chunk's evidence is
|
|
276
|
+
`homegraph-evidence-missing` (a warning under `engine-mode: auto`, a failure under `required`).
|
|
277
|
+
`commit-id` and `change-type` are the fields the **build/review** stages consume for scoping
|
|
278
|
+
(`state_docs_used.md` is the audit artifact of the state-management gate; `## Spec 偏差` is what
|
|
279
|
+
keeps a deliberate departure from being reviewed as a defect). The pipeline trusts `change-type`
|
|
280
|
+
directly: a `none`/`comment-only` value skips the Stage-2 build when a reusable HAP exists, with
|
|
281
|
+
no independent re-verification — the step-5 counter is the only safeguard, so run it; never
|
|
159
282
|
write the field from memory or intent.
|
|
160
283
|
|
|
161
284
|
## Output
|
|
162
285
|
|
|
163
286
|
- `{output-path}/commit-info.md` — required on success; contains `commit-id` (full hex hash, or
|
|
164
|
-
`none`)
|
|
287
|
+
`none`), `change-type` (`code` / `comment-only` / `none`), a `## HomeGraph evidence` section (the
|
|
288
|
+
queries plus at least one `file:line` anchor, or `degraded:` / `fallback:` / `not-applicable:`, all
|
|
289
|
+
inside that section), and a `## Spec 偏差` section only when a deliberate deviation from the spec must be
|
|
290
|
+
recorded.
|
|
165
291
|
- `{output-path}/issues.md` — written only when blocked; diagnostic. Type limited to
|
|
166
292
|
`design_gap_blocked` / `missing_proof` / `validation_failure`.
|
|
167
|
-
- `{output-path}/state_docs_used.md` — written by the
|
|
293
|
+
- `{output-path}/state_docs_used.md` — written by the doc gates: one row per state
|
|
168
294
|
value (`value | scope | decorator | doc key`) plus `state-docs: available` / `unavailable` /
|
|
169
|
-
`not-applicable` (the last when the chunk touches no UI state)
|
|
295
|
+
`not-applicable` (the last when the chunk touches no UI state), and a `## Platform API lookups`
|
|
296
|
+
section (one row per lookup, or "none") plus `api-docs: available` / `unavailable` /
|
|
297
|
+
`not-applicable`. The two verdict lines are independent: a missing or `unavailable` API line never
|
|
298
|
+
changes the `state-docs` verdict the pipeline reads.
|
|
170
299
|
|
|
171
300
|
Do not fabricate a commit or a `commit-id`. If the work cannot be honestly closed, `issues.md` is the
|
|
172
301
|
correct output and `commit-info.md` must be absent (or carry `commit-id: none` for a safe partial).
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* ArkTS 自定义组件的成员名不得与 CustomComponent 基类的内置通用属性方法同名。
|
|
3
3
|
* `@Builder` 参数默认按值传递:调用处传 `this.xxx` 后,`xxx` 再变化(如异步加载完成、偏好值回填)不会刷新 Builder 内的 UI。需要随状态刷新时,在 Builder 内直接读 `this.xxx`,或改为按引用传参:Builder 只声明一个 class/interface 类型参数,调用处传对象字面量(如 `this.row({ isOn: this.incognito })`)。
|
|
4
4
|
* `ForEach` 的 key 生成函数必须包含所有会影响该项渲染的字段:只用 `id` 作 key 时,原地修改该项其他字段(状态、文案)后 ArkUI 会复用旧节点,界面不更新。key 应拼接影响显示的字段(如 `${item.id}:${item.status}`),或在修改时整体替换该项对象并触发数组更新。
|
|
5
|
-
* 把父组件的 `@Builder` 方法传给子组件的 `@BuilderParam` 时,不能写成方法引用(如 `content: this.listContent`):Builder 实际在子组件里执行,`this` 指向子组件,读父组件的状态变量或 ViewModel 会得到 `undefined`,渲染时直接崩溃。这类问题常出在加载态/空态容器上,只有数据返回、首次渲染内容态时才触发,冷启动看不出来。传参时用箭头函数包一层以保留父组件的 `this`:`content: (): void => { this.listContent() }
|
|
5
|
+
* 把父组件的 `@Builder` 方法传给子组件的 `@BuilderParam` 时,不能写成方法引用(如 `content: this.listContent`):Builder 实际在子组件里执行,`this` 指向子组件,读父组件的状态变量或 ViewModel 会得到 `undefined`,渲染时直接崩溃。这类问题常出在加载态/空态容器上,只有数据返回、首次渲染内容态时才触发,冷启动看不出来。传参时用箭头函数包一层以保留父组件的 `this`:`content: (): void => { this.listContent() }`。箭头函数体里**只能调用 @Builder**,不能直接写组件:`content: () => { RefreshLayout({…}) }` 能编译,但只有 @Builder 函数体会被编译成 UI 代码,箭头函数里的 `RefreshLayout({…})` 是对组件类的普通调用,渲染到该槽位即抛 `class constructor cannot called without 'new'` 闪退。组件写进 `@Builder listContent()`(或 `@LocalBuilder`),箭头函数只调它。
|
|
6
6
|
* `@ComponentV2` 中,没有 `@Trace` 的字段被修改时 UI 不刷新,也不报错。在 `aboutToAppear` 里根据 `@Param` 算出来的值只算一次,父组件之后传入新值也不会更新:这类值放到 `build` 里计算,或用 `@Computed`;必须存成本地状态的,用 `@Monitor` 监听对应的 `@Param` 再赋值。
|
|
7
7
|
* 文本测量结果是 px,不是 vp:`MeasureText.measureText` / `measureTextSize`(`@ohos.measure`)和 `getUIContext().getMeasureUtils()` 的同名方法,入参 `fontSize` 是 fp,但返回的宽高都是 **px**(`.d.ts` `@returns`:"both in px")。拿它和 vp 预算比较、或传给 `.width()` 之前,必须先 `this.getUIContext().px2vp(...)` 换算。实测(where-to-study 底部导航):把 `measureTextSize().width`(px)直接与 vp 格宽比较,在 3.5 倍密度下永远判定“放不下”,标签文字在任何设备上都不显示,而评审信了代码注释里“vp 输出”的说法。Canvas 的 `context.measureText()` 默认返回 vp,和它不同,不要混用经验。其他 API 的单位以 `.d.ts` 为准,见 code-generation.md Implementation Principle 6 的单位表;`scripts/check_units.ts` 会拦截这类写法。
|
|
8
8
|
* 大量列表(歌曲、消息、动态等可能上百条的列表/网格)不要用 `ForEach`:它首次加载就创建全部子节点,条目多时首帧卡顿明显甚至白屏超时。优先 `LazyForEach` + `IDataSource` 按需创建屏幕内节点;注意数据源变更必须经 `notifyDataReload` / `notifyDataAdd` / `notifyDataChange` 等接口通知,整体替换数组而不通知时 UI 不刷新(配合 `@Observed`/`@ObjectLink` 时是已见过的坑)。固定少量选项(菜单、页签)仍用 `ForEach` 即可。
|
|
9
9
|
* 跨「无类型边界」进入强类型代码的值一律按可空归一,不允许假设有值:反序列化结果、数据库行、本地缓存、跨页传参都算。ArkTS 的类型只是编译期标注,运行时不做校验,`as T` 不会补默认值,`null` 会原样进入实体;映射只判 `=== undefined` 就漏了它——读侧在 `.length`、遍历、方法调用处抛 `TypeError`(闪退),数值比较则把 `null` 静默当 0;写侧被非空约束拒绝而写不进库,或写进 JSON 后读回缺值(对象内的 `null` 仍是 `null`,`undefined` 属性的键直接消失)。规则:归一一律写在做「外部数据→实体」映射的那个函数里,没有就先补一个;字段声明成 `?: T | null`,缺失时用 `??` 取类型默认值(字符串 `''`、数值 `0`、数组 `[]`、对象 `{}`),整体兜住后再逐项、逐字段归一;读库按列的可空声明取值,不要用空串或 0 冒充缺失;兜底只用 `??`,不要 `||` 或 `if (!v)`,它们会把合法的 `0`、`''` 当空值。非空字段上写 `=== null` 不算兜底:漏掉 `undefined`,还会被判为无重叠比较;正解是先把声明改成 `?: T | null`。
|
|
10
|
+
* 平台 API 别凭记忆写,也别凭一次搜索结果选页:参数顺序、同步/异步、生命周期(create → use → destroy/off)和返回值单位以本地 `.d.ts` 为准,调用顺序与用法用 `scripts/state_doc.mjs search "<模块或方法>"` + `read-id "<documentId>" --section "<小节标题>" --max-lines 80` 取一段(API 页动辄两三千行,整页读会把正文上下文挤掉;重载会重复同名小节,`--section` 会把几个同名小节全带出来并标 `<!-- section "request" 2/3 -->`,要挑某一个时加 `--occurrence <n>`)。工作区里已有同一 API 的可用调用点时直接照抄,不再查文档;文档与 `.d.ts` 冲突时以 `.d.ts` 为准;小节标题旁的 `phone 12+` 之类标签高于工程 `compatibleSdkVersion` 时改用低版本重载或 `canIUse`。查不到就记 `api-docs: unavailable`,走 `.d.ts` 和本文件,不要静默猜。
|
|
@@ -7,6 +7,7 @@ Reference for generating ArkTS logic code of a given spec document and a design
|
|
|
7
7
|
|--------------------|---|----------------------|
|
|
8
8
|
| `spec-file` | Yes | spec document path |
|
|
9
9
|
| `spec-design-file` | Yes | design document path |
|
|
10
|
+
| `android-project-path` | No | Android source project root — the join base of the spec's `## 安卓代码参考` anchors; absent → spec-only implementation (Scenario Principles 3–4) |
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -22,10 +23,12 @@ Implementation principles conclude the principles that must be strictly followed
|
|
|
22
23
|
### Scenario Principles
|
|
23
24
|
1. A scenario is an atomic requirement, thus all scenarios must be implemented in the spec document without omission.
|
|
24
25
|
2. The logic steps of each scenario are defined in the spec document, thus the generated code must follow the logic steps.
|
|
26
|
+
3. **The spec is the baseline; consult the Android source only where it is uncertain.** When `android-project-path` exists and the spec leaves a scenario's detail unsettled — an exact condition, default, ordering, failure path, constant or label — read the anchored source (`## 安卓代码参考` paths are relative to that root: `app/src/main/java/…/MainFragment.java:45`, ranges 1-based and inclusive, `整页` = the whole page, `场景N` = that scenario, union of bullets sharing a label) and fill just that detail from what the source does; never transliterate the file, and never replace spec behavior the spec does state. The anchors are the only lookup channel — never search outside `android-project-path` for a same-named file, and never cite a source you did not open. Without the path, or when an anchor does not resolve, implement from the spec alone and record `android-source: unavailable (<reason>)` in `commit-info.md`'s `## Spec 偏差`; block (`issues.md`, type `missing_proof`) only when a scenario is genuinely undecidable without it.
|
|
27
|
+
4. **A conflict between the two is a spec gap, so the detail comes from the source.** Where the spec's wording and the source disagree on something the spec does not state clearly, implement what the source does and record one row in `commit-info.md`'s `## Spec 偏差` plus a code comment at the divergence. Where the spec states the behavior explicitly, the spec wins — URLs follow Implementation Principle 7 (the spec's literal URL is kept and the mismatch recorded), HarmonyOS-side decisions (API, module, state management, UI anchor) follow the design document, and a capability gap follows Implementation Principle 4, which owns that case.
|
|
25
28
|
|
|
26
29
|
### Design Principles
|
|
27
30
|
1. If the design document contains "## 技术参考", make sure that the generated code use the references (such as API, permission and so on) in "技术参考".
|
|
28
|
-
2. Before generating code, use the content in "## 相关 UI", "## 相关数据", and "## 相关逻辑" as the exploring anchor point in the design document for exploring the code context of scenarios. Agentic search (such as grep and glob) is allowed to expand the code context — and so
|
|
31
|
+
2. Before generating code, use the content in "## 相关 UI", "## 相关数据", and "## 相关逻辑" as the exploring anchor point in the design document for exploring the code context of scenarios. Agentic search (such as grep and glob) is allowed to expand the code context — and so are the shared read-only HomeGraph indexes when the dispatch advertises them: `homegraph explore -p "<hmos-project-path>" "<query>"` for existing APIs, shared layers and call chains, and `homegraph explore -p "<android-project-path>" "<query>"` for the reference implementation. Never `init`/`sync`/`index`/`unlock` a shared index (`-j` only on `status`/`query`/`callers`/`callees`/`impact`/`affected`/`files`; `explore` and `node` take no `-j`). The index answers from the main checkout, so an `index_ahead` symbol — listed there but absent from this worktree — is never imported, copied or re-implemented; the worktree's own `Read`/`Grep` is the truth for what exists here.
|
|
29
32
|
|
|
30
33
|
### Implementation Principles
|
|
31
34
|
1. **No placeholders in the chain**: any business-observable chain (page rendering, callback firing, data persistence, device state change, etc.) must never end in empty implementations, log-only TODO stubs, or placeholder comments. Every scenario step must be fully implemented — no fake endings.
|
|
@@ -59,7 +62,14 @@ Implementation principles conclude the principles that must be strictly followed
|
|
|
59
62
|
|
|
60
63
|
Observed: a coder read only the `fontSize` doc ("fp since API 12"), concluded the result was vp too, and compared `measureTextSize().width` (px) with a vp budget. The check failed at every density, and the bottom navigation labels never rendered. A code comment claiming "fp in, vp out" was believed by the reviewers as well. `scripts/check_units.ts` (Step 4) blocks this pattern.
|
|
61
64
|
|
|
62
|
-
7. **URLs are literal — never rewrite them**: copy every URL/endpoint from the spec (or 技术参考) exactly — scheme, host, port, path, query. No `http` → `https` upgrade, no host/slash/port/path normalization.
|
|
65
|
+
7. **URLs are literal — never rewrite them**: copy every URL/endpoint from the spec (or 技术参考) exactly — scheme, host, port, path, query. No `http` → `https` upgrade, no host/slash/port/path normalization. This rule outranks Scenario Principle 4 for URLs: when the Android source carries a different URL, keep the spec's URL and record the mismatch as a `## Spec 偏差` row — never port the Android URL. A spec that states no URL for a chain needing one is a gap: report it in `issues.md` rather than inventing one from the source.
|
|
66
|
+
8. **Implement it the HarmonyOS project's way**: reuse the existing project's modules, data/state layer, utilities, naming and ArkTS/ArkUI idioms — read the neighbouring code first. Android constructs (Activity/Fragment lifecycle, `dp`/`px` math, Java collections, Gson/Room/OkHttp) are evidence of *intent*, not an implementation: realize the same logic with real HarmonyOS APIs, following Scenario Principle 4 for behavior and this project's own conventions for structure.
|
|
67
|
+
9. **Prefer a real read-only exchange to confirm a network chain (best-effort, 3 attempts per request)**: when a scenario sends a network request or decodes its response, check it against reality where the endpoint is reachable — replay exactly what the spec/design gives (literal URL/method/headers/body for HTTP(S); handshake URL and subprotocol for WebSocket; direction/command/version/length/payload for a private protocol; service/method/message for gRPC) with a protocol-appropriate probe (`curl -i` or a small `node` fetch for HTTP(S), `grpcurl` for gRPC, a small `node` WebSocket or `net`/`dgram` client for WebSocket or raw sockets). Every probe runs under a hard timeout of **30 s** (`curl --max-time 30`, an abort timer in a `node` client; `grpcurl -max-time 30`): a probe that hangs — a socket server that never answers — counts as one failed attempt for that request and is never left running, because a silent probe produces no progress and the unit's lease expires. **No device probes:** an endpoint only the device can reach is recorded as `network-evidence: unavailable (device-only)` and left to the post-merge build and smoke check; the coder never builds, installs or logs on a device for it (worktrees forbid `devecocli build` / `hvigorw` / `ohpm install`, see the pipeline's coding-loop). Confirm both the exchange as sent and the response as decoded (message or envelope, field names, types, nullability), and fix the model to what came back where the spec leaves it open (Scenario Principle 4; any URL stays literal, Principle 7).
|
|
68
|
+
**Settle the request body and the response parsing before sending.** A request is only "sent right" when its body/query/path parameters/headers and encoding are exact — key names, types, nesting, required/optional, default values, and which response field maps to which model field. When the spec leaves any of that open, read the anchored Android source that builds the request and parses the response (Scenario Principle 3) and fill just that detail. Never invent a body key, drop a key the source sends, or guess a default.
|
|
69
|
+
**Each request has its own 3-attempt budget.** One spec/chunk may carry several requests, sometimes chained (a response feeding the next request). Count attempts per request: an exhausted budget on one request neither consumes another request's attempts nor skips it — every request still gets its own 3 attempts and its own verification record.
|
|
70
|
+
**A dependent request inherits an unavailable upstream.** A request is dependent when its URL, headers or body use a value from an earlier response (including a credential such as a login token). When that upstream produced no evidence, do not attempt the dependent request and do not spend its budget: record `network-evidence: unavailable (upstream <request> unavailable)` and name the blocked chain in the self-check.
|
|
71
|
+
**Probe only idempotent read-only exchanges.** Only HTTP GET/HEAD, or a query/command the source declares read-only, may be replayed. Never send a side-effecting exchange to a real service — POST/PUT/PATCH/DELETE, login, SMS/verification code, order, payment, delete, a notification push, or any state-changing command/frame: batch waves may hit the same endpoint from several chunks and duplicate the effect. Record `network-evidence: unavailable (side-effecting)` for it, take its body from the spec or, where the spec is open, from the anchored source (read the code that fills the payload; never send it); when neither settles it, report the gap instead of probing.
|
|
72
|
+
This is never a gate: skip it when no route exists or no protocol-appropriate probe is available, and stop after 3 failed attempts **for that request** (retry only after correcting the request's own inputs; a protocol-level rejection — a non-2xx status, a non-OK gRPC status, or an error command/frame — is evidence, not a retry). Record one `network-evidence: <request> → <result> (verified)` line per request, where `<result>` is the status code, gRPC status, or response command/frame, or `network-evidence: unavailable (<reason>)` (again one per request) in the Step 3 self-check; only a scenario truly undecidable without the response becomes `issues.md` `missing_proof`. Never commit probe-only code, a token, or a captured payload.
|
|
63
73
|
|
|
64
74
|
## ArkTS Code Generate Workflow
|
|
65
75
|
|
|
@@ -127,6 +137,51 @@ rendered value, write `state-docs: not-applicable` to `{output-path}/state_docs_
|
|
|
127
137
|
dispatcher's field) → skip step 2, use `references/ISSUES.md`, write `state-docs: unavailable`,
|
|
128
138
|
and continue; the chunk is never blocked on the docs.
|
|
129
139
|
|
|
140
|
+
**Platform API doc gate (soft, before writing a platform call whose shape you do not know).**
|
|
141
|
+
A platform API guessed by analogy compiles and misbehaves at runtime (wrong param order, a missing
|
|
142
|
+
`await`, a callback that fires before the resource is ready). Run this gate when the chunk calls an
|
|
143
|
+
API imported from `@kit.*` / `@ohos.*` and **the worktree does not already contain a working call
|
|
144
|
+
site for it**, and any of these is unclear: parameter order/types, sync vs async, lifecycle
|
|
145
|
+
(`create`/`destroy`, unregister), the return value's shape or unit, or the throwing/error path.
|
|
146
|
+
Otherwise skip it — a local, already-used call site beats any doc — and record
|
|
147
|
+
`api-docs: not-applicable`.
|
|
148
|
+
|
|
149
|
+
Source precedence, always: **worktree code > local SDK `.d.ts` > docs**. The `.d.ts` wins on what
|
|
150
|
+
exists, its signature, defaults, units and since-level; the doc wins on usage, parameter meaning,
|
|
151
|
+
lifecycle and a runnable example. Both may be right about the signature and the doc still decide
|
|
152
|
+
the `await`.
|
|
153
|
+
|
|
154
|
+
1. Search once for the module, not for prose: `node <skill-dir>/scripts/state_doc.mjs search
|
|
155
|
+
"@ohos.net.http request" --limit 3`. Only the `harmonyos-guides` and `harmonyos-references`
|
|
156
|
+
catalogues are allowed — a raw `devecocli docs search` also returns FAQ / error-code / release
|
|
157
|
+
pages, and a cold index can make the first call wait; never run `devecocli docs` yourself.
|
|
158
|
+
2. Read one section of the page, never the page (an API page runs to a few thousand lines —
|
|
159
|
+
`js-apis-http` is ~2.8k): `node <skill-dir>/scripts/state_doc.mjs read-id "<documentId>"
|
|
160
|
+
--section "request" --max-lines 80`. An overload list repeats the heading (`### request`
|
|
161
|
+
appears three times on that page: callback, options+callback, Promise), so a section read
|
|
162
|
+
returns **every** occurrence, each marked `<!-- section "request" 2/3 -->` (`--max-lines` caps each
|
|
163
|
+
occurrence, not the whole answer; a truncated one ends with the exact command that reads it whole): read them all
|
|
164
|
+
before deciding between the callback and the `Promise` form, and pass `--occurrence <n>` when
|
|
165
|
+
only one is relevant. A keyed read of a known module (`api-http`, `api-preferences`, `api-rdb`,
|
|
166
|
+
`api-fs`, `api-picker`, `api-media`, `api-image`, `api-request`, `api-permission`,
|
|
167
|
+
`api-notification`, `api-prompt`, `api-router`, `api-uicontext`, `api-window`, `api-worker`,
|
|
168
|
+
`api-taskpool`, `api-crypto`, `api-i18n`, `api-webview`, `api-socket`, `api-common-event`,
|
|
169
|
+
`api-background-task`; `list --api` prints the table) resolves the ID for you and is capped at
|
|
170
|
+
400 lines by default.
|
|
171
|
+
3. Budget: at most 3 `search` calls and 2 section reads per chunk, batched into one turn. If that
|
|
172
|
+
is not enough, re-read the local `.d.ts` instead of searching further.
|
|
173
|
+
4. Guard the API level: the doc tags a section `phone 12+ | 2in1 13+ …`. If the tag is above the
|
|
174
|
+
project's `compatibleSdkVersion` (or the module's `minAPIVersion`), use the fallback the doc
|
|
175
|
+
names (`canIUse`, an older overload, or a different API) instead of the newer call.
|
|
176
|
+
5. Record one row per lookup in the `## Platform API lookups` section of `state_docs_used.md`
|
|
177
|
+
(`api | catalog | documentId or key | section | API level | conclusion`), plus one verdict line
|
|
178
|
+
`api-docs: available`.
|
|
179
|
+
- Not needed → `api-docs: not-applicable`.
|
|
180
|
+
- `api-docs-mode: unavailable` (the dispatcher's field), the wrapper exits non-zero, or the
|
|
181
|
+
section is not found → `api-docs: unavailable`, record the failed query/ID and the error, then
|
|
182
|
+
continue from the `.d.ts` and `references/ISSUES.md`. Never block the chunk and never guess
|
|
183
|
+
silently.
|
|
184
|
+
|
|
130
185
|
Before writing any code, run the mock sweep (Implementation Principle 3):
|
|
131
186
|
1. From the design document anchors ("## 相关 UI", "## 相关数据", "## 相关逻辑"), list every file on the scenario chains, including the modules those files import from on the chain.
|
|
132
187
|
2. Search those files for the sweep markers: `mock` / `Mock` / `MOCK`, `simulate`, `seed`, `TODO`, `loadMockData`.
|
|
@@ -141,6 +196,8 @@ For each scenario in the spec document, check it one by one:
|
|
|
141
196
|
4. whether every API-returned number used in layout math has its unit confirmed from the `.d.ts` `@returns` (Implementation Principle 6), and every comparison or assignment has the same unit on both sides. For each `check_units.ts` CANDIDATE, state the unit of both sides.
|
|
142
197
|
5. whether every state value that changes at runtime uses the decorator/observation path the official page says triggers a refresh (cross-check `state_docs_used.md`), including nested-object properties and arrays mutated in place.
|
|
143
198
|
6. whether every URL matches the spec byte-for-byte (scheme/host/port/path/query) — a `http` → `https` rewrite is a failure (Implementation Principle 7).
|
|
199
|
+
7. whether every platform API call the chunk introduced matches the signature, parameter order, sync/async shape and lifecycle (create → use → destroy/unregister) of its `.d.ts` and, where consulted, the doc section recorded in `state_docs_used.md`, and whether no call exceeds the project's API level.
|
|
200
|
+
8. whether each idempotent network exchange/decode chain was checked against a real response where reachable, each side-effecting chain was left unsent and recorded as `network-evidence: unavailable (side-effecting)`, and any remaining unreachable chain was recorded as `network-evidence: unavailable (<reason>)` (Implementation Principle 9), with no probe-only code left in the change; whether **every** request in the spec got its own 3 attempts with its own `network-evidence` line (a failure on one request must not skip the next), whether each request body/parameter/header/default and its response field mapping came from the spec or the anchored source rather than a guess, and whether a dependent request was recorded as `unavailable (upstream … unavailable)` instead of being retried without its upstream input.
|
|
144
201
|
|
|
145
202
|
Output the check report in the following format:
|
|
146
203
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Generate the chunk's design document at `--output-file` for an input SPEC.
|
|
6
6
|
|
|
7
|
-
Inputs are the SPEC file, the raw UI operation sequence, `project_design.md`, optional `database_design.md`, optional `preferences_design.md`, selected `module_design.md`, Homegraph engine evidence (controlled by `--engine-mode`),
|
|
7
|
+
Inputs are the SPEC file, the raw UI operation sequence, `project_design.md`, optional `database_design.md`, optional `preferences_design.md`, selected `module_design.md`, Homegraph engine evidence (controlled by `--engine-mode`), directed local source lookup when needed, and the HomeGraph **prompt** fields `homegraph_project` / `android_project` / `homegraph_guide` supplied by the coder.
|
|
8
8
|
|
|
9
9
|
All generated content in the design document must be in Chinese.
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ All generated content in the design document must be in Chinese.
|
|
|
19
19
|
## Invocation
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
|
-
node "${
|
|
22
|
+
node "${SKILL_DIR}/scripts/design/inspect_spec_design_inputs.mjs" <target_directory> <input_file> --task spec --engine-mode auto|off|required [--database-design <file>] [--preferences-design <file>] [--mvvm true|false] --output-file <design_output_file> --display-root <project_dir_name>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Arguments:
|
|
@@ -33,7 +33,13 @@ Arguments:
|
|
|
33
33
|
* `--preferences-design`: optional Preferences design file. Default is resolved by the validation script.
|
|
34
34
|
* `--mvvm`: `true` or `false`. Default is `false`. When `true`, related UI files and related logic files must be orthogonal.
|
|
35
35
|
* `--display-root`: the `<path_display_root>/` prefix written into every design path. Default is `basename(target_directory)`. The worktree basename (`g<G>`) must never leak into the design.
|
|
36
|
-
*
|
|
36
|
+
* `homegraph_project` / `android_project` / `homegraph_guide`: **prompt inputs** from the coder (Procedure 0
|
|
37
|
+
of `SKILL.md`), never CLI options of this script. Do not append them to the
|
|
38
|
+
`inspect_spec_design_inputs.mjs` invocation: it accepts only the flags shown above and exits
|
|
39
|
+
`unrecognized arguments` on anything else. `homegraph_project` is the shared `<HMOS>` main checkout — the
|
|
40
|
+
coder's `hmos-project-path`, or `target_directory` on a standalone coder run (one not dispatched with these
|
|
41
|
+
fields at all). `android_project` is the Android source root (may be absent); `homegraph_guide` is the
|
|
42
|
+
coder's `homegraph-guide` (may be absent).
|
|
37
43
|
* `--output-file`: exact output file path (required); the design is always written here.
|
|
38
44
|
|
|
39
45
|
## Output
|
|
@@ -52,7 +58,7 @@ After generation, run output validation. Deterministic issues are written to
|
|
|
52
58
|
Run:
|
|
53
59
|
|
|
54
60
|
```bash
|
|
55
|
-
node "${
|
|
61
|
+
node "${SKILL_DIR}/scripts/design/inspect_spec_design_inputs.mjs" "<target_directory>" "<input_file>" --task spec --engine-mode <engine_mode> --mvvm <mvvm_mode> [--database-design <database_design_file>] [--preferences-design <preferences_design_file>] --output-file <output_file> --display-root <project_dir_name>
|
|
56
62
|
```
|
|
57
63
|
|
|
58
64
|
Stop if validation fails. Do not check design-file existence yourself (Hard Rules).
|
|
@@ -103,7 +109,7 @@ Each iteration:
|
|
|
103
109
|
2. Resolve their `module_design.md` files in one call:
|
|
104
110
|
|
|
105
111
|
```bash
|
|
106
|
-
node "${
|
|
112
|
+
node "${SKILL_DIR}/scripts/design/resolve_module_design.mjs" "<target_directory>" "<candidate_module_1>" ["<candidate_module_2>" ...] --display-root <project_dir_name>
|
|
107
113
|
```
|
|
108
114
|
|
|
109
115
|
The script performs the layered lookup itself and returns a `modules` array containing each module path, resolved `module_design` path (`null` when absent), and layout.
|
|
@@ -123,20 +129,45 @@ After loading the batch, analyze its modules together. Use the Homegraph and dir
|
|
|
123
129
|
|
|
124
130
|
#### Homegraph
|
|
125
131
|
|
|
126
|
-
Use the
|
|
132
|
+
Use the HomeGraph code-analysis engine according to `--engine-mode`:
|
|
127
133
|
|
|
128
134
|
* `auto`: attempt the engine with timeout `120000ms`. If it times out, or starts but does not complete, retry once with timeout `300000ms`. Use the successful output as auxiliary evidence. If both attempts fail, continue with local analysis.
|
|
129
135
|
* `off`: skip engine evidence entirely.
|
|
130
|
-
* `required`: the engine is mandatory.
|
|
136
|
+
* `required`: the engine is mandatory. Before starting Step 3, confirm `homegraph` is on PATH and that `homegraph_project` is a directory with a usable shared index (see the shared-index rule below); stop generation if the engine cannot provide usable evidence.
|
|
131
137
|
|
|
132
138
|
The CLI binary is `homegraph`; ArkTS analysis additionally requires `arkanalyzer`. Both are provisioned globally by `ht init` — never install or fetch them from this skill. If `homegraph` is not on PATH, stop and ask the user to run `ht init` (or manually `npm install -g homegraph arkanalyzer`).
|
|
133
139
|
|
|
134
|
-
|
|
140
|
+
Read `homegraph_guide` (the `a2h-spec-design-pipeline` skill's `references/homegraph-cli.md`; the dispatcher
|
|
141
|
+
passes its absolute path) before the first query; it owns the query discipline, the output reading rules and
|
|
142
|
+
the evidence format. Without it, follow the rules below.
|
|
135
143
|
|
|
136
|
-
|
|
144
|
+
**Shared-index rule (pipeline dispatch).** There is no worktree index. Read the shared indexes only, both read-only:
|
|
145
|
+
|
|
146
|
+
* `<homegraph_project>` (`<HMOS>` main checkout) — architecture, existing APIs, shared layers, call chains.
|
|
147
|
+
* `<android_project>` (`<ANDROID>` source root, when present) — the reference implementation and the spec's source anchors.
|
|
148
|
+
|
|
149
|
+
Query them with the CLI only:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
homegraph explore -p "<homegraph_project>" "<TypeA TypeB Type.member>"
|
|
153
|
+
homegraph explore -p "<android_project>" "<Symbol>"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Add `impact` / `callers` only when a symbol's blast radius or caller chain matters (2–5 names per `explore`; `-j` only on `status`/`query`/`callers`/`callees`/`impact`/`affected`/`files` — `explore` and `node` take no `-j`). Never run `homegraph init` / `sync` / `index` / `unlock`: the orchestrator owns these indexes and is their only writer; `homegraph status` is diagnostics only, never a freshness gate.
|
|
157
|
+
|
|
158
|
+
**Start with `homegraph_project` before reading source**: one `explore` with this chunk's modules / pages / VMs / shared-layer symbols establishes what the main checkout already implements. Query `android_project` only when the SPEC's `## 安卓代码参考` anchor is missing, ambiguous, or the scenario needs a cross-file call chain; when the anchor gives `file:line`, read that file directly — do not query once per scenario. Never truncate `explore` output (`| Select-Object -First N`); `Partial locator` means the call was budget-limited, not that the file is missing — confirm with `files --pattern` or `query`.
|
|
159
|
+
|
|
160
|
+
**The worktree is the truth for what exists on this branch.**
|
|
161
|
+
|
|
162
|
+
* `index_ahead`: a symbol an index lists but the worktree lacks is another group's merged code or a later commit — never import, copy or re-implement it; that fact alone is not evidence the code exists here. Only design anchors that exist in `target_directory` may enter the document.
|
|
163
|
+
* Reverse case: a symbol present in the worktree but absent from the index is real — re-query once, then read the file and cite `file:line`.
|
|
164
|
+
|
|
165
|
+
**Standalone exception.** Only a design step that was **not dispatched with `homegraph_project`/`homegraph_guide` at all** — a standalone coder run — has no shared index to read; there `target_directory` may itself be the main checkout, so under `auto`/`required` you may probe it and run `homegraph init`/`sync`/`index` for your local index. A pipeline dispatch always supplies the pair, so the read-only rule above still governs `homegraph_project`: the fallback to `target_directory` is only a path default, never an opt-out from the read-only rule.
|
|
137
166
|
|
|
138
167
|
Engine evidence may only locate related UI, data entity, database, Preferences, logic files, table structures, Preferences keys, symbols, and their relationships. The engine **must not** rewrite semantic descriptions copied from `project_design.md` or `module_design.md`.
|
|
139
168
|
|
|
169
|
+
Record the queries you ran by phase in `commit-info.md`'s `## HomeGraph evidence` section — first line `start | hmos`, then `design | android` for SPEC anchor gaps and `code | hmos` for impact — with at least one `file:line` anchor, or `degraded: <reason>` / `fallback: <reason>`, **inside that section** — `parseHomeGraphEvidence` stops at the next `##` heading, so the same text written outside the section does not count. Anchors without a `start | hmos` line are `homegraph-start-missing` (warning under `auto`, failure under `required`).
|
|
170
|
+
|
|
140
171
|
#### Directed Source Lookup
|
|
141
172
|
|
|
142
173
|
Use local source lookup only when foundational design evidence, confirmed module evidence, and Homegraph evidence are insufficient.
|
|
@@ -263,7 +294,7 @@ For database table metadata, omit `关联数据实体` when it is `None`, and om
|
|
|
263
294
|
After writing the design document, run:
|
|
264
295
|
|
|
265
296
|
```bash
|
|
266
|
-
node "${
|
|
297
|
+
node "${SKILL_DIR}/scripts/design/move_spec_technical_reference.mjs" "<input_file>" "<design_path>"
|
|
267
298
|
```
|
|
268
299
|
|
|
269
300
|
If the input SPEC contains an exact level-2 section named `## 技术参考`, the script moves the complete section from the input SPEC to the design document immediately before `## 相关 UI`.
|
|
@@ -275,7 +306,7 @@ If the section does not exist, leave both files unchanged.
|
|
|
275
306
|
After Step 5, run:
|
|
276
307
|
|
|
277
308
|
```bash
|
|
278
|
-
node "${
|
|
309
|
+
node "${SKILL_DIR}/scripts/design/validate_spec_design_output.mjs" "<target_directory>" "<design_path>" --display-root <project_dir_name>
|
|
279
310
|
```
|
|
280
311
|
|
|
281
312
|
If the script reports issues, keep the generated design file unchanged and report the issue file path.
|