@buaa_smat/hometrans 26.0.3 → 26.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agents/code-reviewer.md +91 -21
- package/env-requirements.json +1 -1
- package/i18n/agents/code-reviewer.md +93 -21
- package/i18n/skills/a2h-app-migrate/SKILL.md +19 -11
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +320 -73
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/i18n/skills/a2h-arch-generate/SKILL.md +20 -17
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +52 -11
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +70 -21
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +22 -6
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +386 -16
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +133 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +11 -9
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/i18n/skills/a2h-page-specgen/SKILL.md +123 -20
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/i18n/skills/a2h-page-specgen/references/gates.md +119 -52
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +113 -110
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +171 -62
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +314 -192
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +364 -76
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +216 -8
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -223
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +521 -13
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +483 -125
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +10 -33
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +134 -163
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +206 -9
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +862 -12
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +166 -3
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +69 -44
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +658 -120
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/i18n/skills/a2h-resource-convert/SKILL.md +9 -1
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +69 -109
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +135 -37
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +24 -13
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +170 -7
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +2 -2
- package/i18n/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +74 -84
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +211 -61
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +724 -47
- package/i18n/skills/a2h-utg-static/SKILL.md +6 -2
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +82 -12
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +50 -5
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +17 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +181 -17
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +118 -19
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +113 -70
- package/package.json +3 -6
- package/skills/a2h-app-migrate/SKILL.md +19 -11
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +2 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +307 -74
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -5
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +79 -11
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +75 -4
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +64 -6
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +33 -9
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +27 -17
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +25 -10
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +35 -7
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +7 -7
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +10 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +33 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +52 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +26 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +36 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +71 -7
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +13 -5
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +117 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +7 -3
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +170 -3
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +12 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +38 -2
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +10 -8
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +3 -3
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +17 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +26 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +146 -17
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +2 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +59 -2
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +42 -11
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +328 -38
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +244 -0
- package/skills/a2h-batch-ui-align/SKILL.md +72 -22
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +5 -0
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +236 -11
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +8 -5
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -4
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +3 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +26 -4
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +380 -16
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +39 -5
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +19 -1
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +134 -11
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +213 -30
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +231 -5
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +82 -8
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +21 -7
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +48 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +24 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +45 -11
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +60 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +63 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +24 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +14 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +224 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +41 -7
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +1 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +19 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +15 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +155 -1
- package/skills/a2h-batch-ui-align/scripts/tests/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +5 -3
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +33 -2
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +5 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +12 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +8 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- package/skills/a2h-module-semantic-docs/test/test_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-page-specgen/SKILL.md +124 -20
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +11 -9
- package/skills/a2h-page-specgen/references/evidence.md +35 -0
- package/skills/a2h-page-specgen/references/execution-model.md +135 -26
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +20 -15
- package/skills/a2h-page-specgen/references/gates.md +120 -52
- package/skills/a2h-page-specgen/references/page-inventory.md +69 -22
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +112 -109
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +8 -5
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +170 -61
- package/skills/a2h-page-specgen/scripts/finalize.mjs +466 -63
- package/skills/a2h-page-specgen/scripts/footprint.mjs +302 -180
- package/skills/a2h-page-specgen/scripts/gate.mjs +372 -82
- package/skills/a2h-page-specgen/scripts/interactions.mjs +215 -8
- package/skills/a2h-page-specgen/scripts/inventory.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +116 -216
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +105 -13
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +520 -12
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +129 -6
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +12 -8
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +106 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +470 -122
- package/skills/a2h-page-specgen/scripts/render.mjs +11 -34
- package/skills/a2h-page-specgen/scripts/report.mjs +339 -6
- package/skills/a2h-page-specgen/scripts/submission.mjs +253 -88
- package/skills/a2h-page-specgen/scripts/submit.mjs +12 -6
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +288 -7
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +135 -137
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +40 -1
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +178 -9
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +19 -1
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +459 -188
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +89 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +869 -13
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +139 -5
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +378 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +69 -2
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +267 -2
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +111 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +10 -8
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +1 -1
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +143 -51
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +42 -2
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +171 -3
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +13 -5
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +365 -1
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +102 -7
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1308 -72
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +85 -42
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +645 -115
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +101 -65
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +88 -74
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +30 -1
- package/skills/a2h-page-specgen/scripts/waker.mjs +79 -12
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +18 -17
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +67 -3
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- package/skills/a2h-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +48 -72
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +123 -37
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +40 -8
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +5 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +37 -5
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +126 -23
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +7 -1
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +38 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +127 -4
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +90 -24
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +65 -34
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +11 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +10 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/{HttpExtraDataEmptyStringCheck.js → platform/ExtraDataSubCheck.js} +27 -30
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +4 -2
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +3 -2
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +55 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +138 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +10 -13
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +21 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +32 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +109 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +12 -17
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +172 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +36 -16
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +27 -3
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +20 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +143 -13
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +168 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +139 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +25 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +37 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +4 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +59 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +44 -0
- package/skills/a2h-spec-generate/SKILL.md +2 -2
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +1 -2
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +3 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +56 -5
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -0
- package/skills/a2h-utg-explorer/scripts/tests/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +122 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +15 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +6 -2
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +122 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +138 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +22 -13
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +65 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +116 -5
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +8 -1
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +32 -4
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +0 -55
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +0 -60
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -948
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -1014
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Minimal stand-in for the `homecheck` package so the migration rule checkers can
|
|
5
|
+
* be unit-tested without an ArkAnalyzer scene or a installed HomeCheck build.
|
|
6
|
+
*
|
|
7
|
+
* Set HOMECHECK_MODULE_PATH to this file before requiring a checker.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
class GlobalChecker {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.issues = [];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
addIssue(issue) {
|
|
16
|
+
this.issues.push(issue);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
reset() {
|
|
20
|
+
this.issues = [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class MethodChecker {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.issues = [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
addIssue(issue) {
|
|
30
|
+
this.issues.push(issue);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
reset() {
|
|
34
|
+
this.issues = [];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function Rule() {
|
|
39
|
+
return (cls) => cls;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = {
|
|
43
|
+
GlobalChecker,
|
|
44
|
+
MethodChecker,
|
|
45
|
+
Rule,
|
|
46
|
+
AlertLevel: { OFF: 0, WARN: 1, ERROR: 2, SUGGESTION: 3 },
|
|
47
|
+
};
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
//
|
|
3
3
|
// node homecheck_scan.ts <hmos> --report-dir <dir> [options]
|
|
4
4
|
//
|
|
5
|
-
// Generates a project config and a rule config for the
|
|
5
|
+
// Generates a project config and a rule config for the two fixed rule sets plus the
|
|
6
6
|
// migration rule set shipped with this skill, runs the installed Homecheck CLI, and writes a
|
|
7
|
-
// normalized findings file. `errors` holds every `error` finding; `warnings` holds the warnings
|
|
8
|
-
//
|
|
9
|
-
//
|
|
7
|
+
// normalized findings file. `errors` holds every `error` finding; `warnings` holds the warnings of the
|
|
8
|
+
// custom rule set only (only this set's warnings are judged; every other set's warnings are out of
|
|
9
|
+
// scope). The gate sub-agent fixes the errors and judges each custom warning (fix a real defect,
|
|
10
|
+
// record why a finding is left).
|
|
10
11
|
//
|
|
11
12
|
// Exit codes:
|
|
12
13
|
// 0 scan succeeded and found no errors
|
|
@@ -27,21 +28,20 @@ import { isMain } from './lib/io.mjs';
|
|
|
27
28
|
|
|
28
29
|
/** Custom rule set shipped with this skill: <skill>/rules/migration-rules. */
|
|
29
30
|
export const CUSTOM_RULE_SET = '@hometrans/migration-rules';
|
|
30
|
-
/** Rule-id domain owned by CUSTOM_RULE_SET: its warnings are
|
|
31
|
+
/** Rule-id domain owned by CUSTOM_RULE_SET: only its warnings are surfaced for the gate to judge. */
|
|
31
32
|
export const CUSTOM_RULE_DOMAIN = '@hometrans/';
|
|
32
33
|
export const CUSTOM_RULE_SET_PLUGIN = 'plugin:@hometrans/all';
|
|
33
34
|
|
|
34
35
|
export const RULE_SETS = [
|
|
35
36
|
'plugin:@arkui-semantic-correctness/all',
|
|
36
37
|
'plugin:@correctness/all',
|
|
37
|
-
'plugin:@compatibility/all',
|
|
38
38
|
CUSTOM_RULE_SET_PLUGIN,
|
|
39
39
|
];
|
|
40
40
|
|
|
41
41
|
export const RULE_PACKAGE_ROOT = path.resolve(
|
|
42
42
|
path.dirname(fileURLToPath(import.meta.url)), '..', 'rules', 'migration-rules');
|
|
43
43
|
|
|
44
|
-
const RULE_DOMAINS = ['@arkui-semantic-correctness/', '@correctness/'
|
|
44
|
+
const RULE_DOMAINS = ['@arkui-semantic-correctness/', '@correctness/'];
|
|
45
45
|
// The gate sub-agent runs this script from a foreground shell capped at 600000 ms (the same cap
|
|
46
46
|
// the build check uses). The default keeps a margin below that cap: resolution probes (npm/where)
|
|
47
47
|
// before the scan and report parsing after it consume real time, so a default equal to the cap
|
|
@@ -99,10 +99,9 @@ export interface Findings {
|
|
|
99
99
|
scan: Record<string, unknown>;
|
|
100
100
|
totals: { error: number; warn: number; suggestion: number };
|
|
101
101
|
errors: Finding[];
|
|
102
|
-
/** Warnings of the custom rule set only — the
|
|
102
|
+
/** Warnings of the custom rule set only — the only ones judged; every other set's warnings are dropped. */
|
|
103
103
|
warnings: Finding[];
|
|
104
104
|
byRule: Record<string, number>;
|
|
105
|
-
signatureScan: { enabled: boolean; reason: string };
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
function positiveInt(name: string, raw: string): number {
|
|
@@ -455,10 +454,7 @@ export function buildRuleConfig(): Record<string, unknown> {
|
|
|
455
454
|
'**/.hometrans/**/*',
|
|
456
455
|
'**/.homegraph/**/*',
|
|
457
456
|
],
|
|
458
|
-
rules: {
|
|
459
|
-
// Report-all mode would flag every SDK signature in the project.
|
|
460
|
-
'@compatibility/signature-scan-check': 0,
|
|
461
|
-
},
|
|
457
|
+
rules: {},
|
|
462
458
|
ruleSet: RULE_SETS,
|
|
463
459
|
overrides: [],
|
|
464
460
|
// Install + load the migration rule set shipped with this skill. Enabled as a whole set
|
|
@@ -560,7 +556,7 @@ function relativePath(hmos: string, filePath: string): string {
|
|
|
560
556
|
|
|
561
557
|
export interface NormalizedReport {
|
|
562
558
|
errors: Finding[];
|
|
563
|
-
/** Custom-rule-set warnings only (`@hometrans/`) —
|
|
559
|
+
/** Custom-rule-set warnings only (`@hometrans/`) — only these are judged; every other set's warnings stay out of scope. */
|
|
564
560
|
warnings: Finding[];
|
|
565
561
|
totals: { error: number; warn: number; suggestion: number };
|
|
566
562
|
byRule: Record<string, number>;
|
|
@@ -619,8 +615,8 @@ export function normalizeReport(hmos: string, reports: unknown): NormalizedRepor
|
|
|
619
615
|
};
|
|
620
616
|
if (severity === 1) {
|
|
621
617
|
totals.warn++;
|
|
622
|
-
// Warnings of the custom rule set are
|
|
623
|
-
// deliberately dropped here so the gate never touches them.
|
|
618
|
+
// Warnings of the custom rule set are the only ones judged by the gate; every other set's
|
|
619
|
+
// warnings are deliberately dropped here so the gate never touches them.
|
|
624
620
|
if (ruleId.startsWith(CUSTOM_RULE_DOMAIN)) {
|
|
625
621
|
const warnKey = fixKey ? `${filePath}|${fixKey}` : `${filePath}|${finding.line}|${ruleId}`;
|
|
626
622
|
if (!seen.has(warnKey)) {
|
|
@@ -665,7 +661,6 @@ function emptyFindings(homecheckVersion: string | null): Findings {
|
|
|
665
661
|
errors: [],
|
|
666
662
|
warnings: [],
|
|
667
663
|
byRule: {},
|
|
668
|
-
signatureScan: { enabled: false, reason: 'no target version set' },
|
|
669
664
|
};
|
|
670
665
|
}
|
|
671
666
|
|
|
@@ -56,12 +56,43 @@ interface SpecEntry {
|
|
|
56
56
|
so_id: number; index: number; spec_file: string; spec_stem: string;
|
|
57
57
|
ui_sequence: string; scenarios: number; title: string; content: string;
|
|
58
58
|
deps: number[];
|
|
59
|
+
/** Incremental migration: HarmonyOS files of this spec's page that existed before this run (edit, never recreate). */
|
|
60
|
+
existing?: string[];
|
|
61
|
+
/** Incremental feature scope: this round's features on a page that already exists (SUP / CHG work). */
|
|
62
|
+
features?: FeatureWork[];
|
|
63
|
+
/** Run-independent identity (specs.json spec_id / content_sha256): what carry-over matches on. */
|
|
64
|
+
spec_id?: string; content_sha256?: string;
|
|
65
|
+
}
|
|
66
|
+
interface Carried { so_id: number; spec_id: string; content_sha256: string; commit: string | null; from: string; }
|
|
67
|
+
interface FeatureWork { id: string; title: string; type: string; change?: string; }
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Incremental migration (a2h-app-migrate PROFILE=incremental): spec_id -> the HarmonyOS files of that page that
|
|
71
|
+
* existed BEFORE this run. The UI lane already computed them: a2h-batch-ui-align's conversion_set.json marks every
|
|
72
|
+
* group whose predicted writes hit existing.json (enumerated at I3, before any write) with `existing_writes`.
|
|
73
|
+
* Reusing that verdict keeps one naming rule; re-deriving file names here would drift from the builder's.
|
|
74
|
+
*
|
|
75
|
+
* Trusted only when the plan is incremental and its scope_id equals specs.json's scope.scope_id: a conversion set
|
|
76
|
+
* left by another scope (or a full run) must never mark this scope's specs. Returns an empty map otherwise.
|
|
77
|
+
*/
|
|
78
|
+
export function existingBySpec(conversionSet: unknown, specsScopeId: string | null | undefined): Map<string, string[]> {
|
|
79
|
+
const out = new Map<string, string[]>();
|
|
80
|
+
const plan = (conversionSet as { plan?: any } | null)?.plan;
|
|
81
|
+
if (!plan || plan.mode !== 'incremental' || !plan.scope_id || plan.scope_id !== specsScopeId) return out;
|
|
82
|
+
for (const g of Array.isArray(plan.groups) ? plan.groups : []) {
|
|
83
|
+
const hits: string[] = Array.isArray(g?.existing_writes) ? g.existing_writes.map(String) : [];
|
|
84
|
+
if (!hits.length) continue;
|
|
85
|
+
const nodes = [g.anchor, ...(Array.isArray(g.members) ? g.members.map((m: any) => m?.node) : [])]
|
|
86
|
+
.filter((n): n is string => typeof n === 'string' && n !== '');
|
|
87
|
+
for (const n of new Set(nodes)) out.set(n, [...new Set([...(out.get(n) ?? []), ...hits])].sort());
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
59
90
|
}
|
|
60
91
|
interface PackedChunk { spec_ids: number[]; scenario_count: number; oversized: boolean; }
|
|
61
92
|
interface Chunk extends PackedChunk { spec_file: string; design_file: string; ui_sequence: string; }
|
|
62
93
|
interface PlanGroupSpecRow {
|
|
63
94
|
so_id: number; index: number; spec_file: string; spec_stem: string;
|
|
64
|
-
ui_sequence: string; scenarios: number;
|
|
95
|
+
ui_sequence: string; scenarios: number; existing?: string[];
|
|
65
96
|
}
|
|
66
97
|
interface PlanGroup {
|
|
67
98
|
G: number; group_id: string; deps?: number[]; specs: PlanGroupSpecRow[]; total_scenarios: number;
|
|
@@ -175,6 +206,45 @@ function packChunks(entries: SpecEntry[], maxScenarios: number): PackedChunk[] {
|
|
|
175
206
|
return chunks;
|
|
176
207
|
}
|
|
177
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Carry-over (incremental phase 2, W2.3): a new campaign does not re-code a spec the previous campaign already
|
|
211
|
+
* landed. The latest archived campaign whose specs.json is still the one it was seeded from (sha256) gives
|
|
212
|
+
* spec_id -> content_sha256 of every spec it finished (status done) or itself carried; an entry of this campaign
|
|
213
|
+
* with the same spec_id AND content_sha256 is carried: its code is already merged, so it is planned nowhere.
|
|
214
|
+
* Changed (other hash) and new specs are planned as usual. A spec without spec_id / content_sha256 never carries.
|
|
215
|
+
*/
|
|
216
|
+
export function carryOver(hometrans: string, entries: SpecEntry[]): Carried[] {
|
|
217
|
+
const dir = path.join(hometrans, 'spec_pipeline_archive');
|
|
218
|
+
let names: string[] = [];
|
|
219
|
+
try { names = readdirSync(dir).sort().reverse(); } catch { return []; }
|
|
220
|
+
for (const n of names) {
|
|
221
|
+
let s: any;
|
|
222
|
+
try { s = readJson(path.join(dir, n, 'spec_pipeline_state.json')); } catch { continue; }
|
|
223
|
+
const sp = s?.config?.specs_json;
|
|
224
|
+
if (typeof sp !== 'string' || !existsSync(sp)) continue;
|
|
225
|
+
if (createHash('sha256').update(readFileSync(sp)).digest('hex') !== s.config.specs_json_sha256) continue;
|
|
226
|
+
let old: any;
|
|
227
|
+
try { old = readJson(sp); } catch { continue; }
|
|
228
|
+
const done = new Map<number, string | null>();
|
|
229
|
+
for (const x of Array.isArray(s.specs) ? s.specs : []) if (x?.status === 'done') done.set(Number(x['so-id']), x.commit ?? null);
|
|
230
|
+
const byId = new Map<string, { content_sha256: string; commit: string | null }>();
|
|
231
|
+
(Array.isArray(old?.specs) ? old.specs : []).forEach((r: any, i: number) => {
|
|
232
|
+
const so = Number(r?.['so-id'] ?? i + 1);
|
|
233
|
+
if (typeof r?.spec_id === 'string' && typeof r?.content_sha256 === 'string' && done.has(so)) {
|
|
234
|
+
byId.set(r.spec_id, { content_sha256: r.content_sha256, commit: done.get(so) ?? null });
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
for (const c of Array.isArray(s.carried) ? s.carried : []) {
|
|
238
|
+
if (typeof c?.spec_id === 'string' && typeof c?.content_sha256 === 'string') byId.set(c.spec_id, { content_sha256: c.content_sha256, commit: c.commit ?? null });
|
|
239
|
+
}
|
|
240
|
+
if (!byId.size) continue;
|
|
241
|
+
return entries
|
|
242
|
+
.filter((e) => e.spec_id && e.content_sha256 && byId.get(e.spec_id)?.content_sha256 === e.content_sha256)
|
|
243
|
+
.map((e) => ({ so_id: e.so_id, spec_id: e.spec_id!, content_sha256: e.content_sha256!, commit: byId.get(e.spec_id!)!.commit, from: n }));
|
|
244
|
+
}
|
|
245
|
+
return [];
|
|
246
|
+
}
|
|
247
|
+
|
|
178
248
|
/** Write the per-chunk spec slice: same wrapper as merged_spec, members only. */
|
|
179
249
|
function writeChunkSpec(file: string, groupId: string, G: number, k: number, members: SpecEntry[]): void {
|
|
180
250
|
const lines: string[] = [
|
|
@@ -186,10 +256,58 @@ function writeChunkSpec(file: string, groupId: string, G: number, k: number, mem
|
|
|
186
256
|
lines.push(`## Spec so-${e.so_id}: ${e.title}`, '');
|
|
187
257
|
lines.push(nestSpecBody(e.content).trim());
|
|
188
258
|
lines.push('');
|
|
259
|
+
lines.push(...featureSection(e));
|
|
260
|
+
lines.push(...existingSection(e));
|
|
189
261
|
}
|
|
190
262
|
writeFileAtomic(file, lines.join('\n') + '\n');
|
|
191
263
|
}
|
|
192
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Incremental feature scope: spec_id -> this round's SUP / CHG features on that page, from the confirmed
|
|
267
|
+
* <HMOS>/.hometrans/incremental/scope.json. Trusted only when its scope_id equals specs.json's scope.scope_id
|
|
268
|
+
* (a scope file of another run never steers this one). Empty for a v1 scope and for NEW pages.
|
|
269
|
+
*/
|
|
270
|
+
export function featuresBySpec(scopeDoc: unknown, specsScopeId: string | null | undefined): Map<string, FeatureWork[]> {
|
|
271
|
+
const out = new Map<string, FeatureWork[]>();
|
|
272
|
+
const doc = scopeDoc as { version?: number; scope_id?: string; features?: any[] } | null;
|
|
273
|
+
if (!doc || doc.version !== 2 || !doc.scope_id || doc.scope_id !== specsScopeId) return out;
|
|
274
|
+
for (const f of Array.isArray(doc.features) ? doc.features : []) {
|
|
275
|
+
for (const w of Array.isArray(f?.work) ? f.work : []) {
|
|
276
|
+
if ((w?.type !== 'SUP' && w?.type !== 'CHG') || typeof w.page !== 'string') continue;
|
|
277
|
+
const list = out.get(w.page) ?? [];
|
|
278
|
+
list.push({ id: String(f.id), title: String(f.title ?? f.id), type: w.type, ...(w.change ? { change: String(w.change) } : {}) });
|
|
279
|
+
out.set(w.page, list);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return out;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** The per-spec "this round's features" block of an incremental run (empty for every other spec). */
|
|
286
|
+
export function featureSection(e: Pick<SpecEntry, 'features'>): string[] {
|
|
287
|
+
if (!e.features?.length) return [];
|
|
288
|
+
return [
|
|
289
|
+
"### 本轮增量功能(只做这些,在已有代码上实现)", '',
|
|
290
|
+
"本页已在鸿蒙工程中,本轮只迁移下列功能:在已有代码里实现它们的行为,页面上的其它行为保持不动。",
|
|
291
|
+
"CHG(行为变更)是改已经实现过的行为:修改原实现,不要在旁边再写一份。",
|
|
292
|
+
'',
|
|
293
|
+
...e.features.map((x) => `- \`${x.id}\` (${x.type}) ${x.title}${x.change ? ` — 变更: ${x.change}` : ''}`),
|
|
294
|
+
'',
|
|
295
|
+
];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** The per-spec "existing HarmonyOS code" block of an incremental run (empty for every other spec). */
|
|
299
|
+
export function existingSection(e: Pick<SpecEntry, 'existing'>): string[] {
|
|
300
|
+
if (!e.existing?.length) return [];
|
|
301
|
+
return [
|
|
302
|
+
'### 已有鸿蒙代码(增量迁移前就存在,只改不重建)', '',
|
|
303
|
+
'下列文件在本轮迁移开始前已在鸿蒙工程中(用户手写或上一轮迁移)。设计与编码先读它们:沿用其中已实现的状态、方法与导出,',
|
|
304
|
+
'在原文件上补齐本 spec 缺的行为;不得新建同名或同职责的文件,也不得整体重写。',
|
|
305
|
+
'',
|
|
306
|
+
...e.existing.map((f) => `- \`${f}\``),
|
|
307
|
+
'',
|
|
308
|
+
];
|
|
309
|
+
}
|
|
310
|
+
|
|
193
311
|
/** Delete our own runtime design artifacts before a fresh campaign seeds state. */
|
|
194
312
|
function cleanupDesignArtifacts(designDir: string): number {
|
|
195
313
|
let names: string[] = [];
|
|
@@ -237,7 +355,11 @@ function main(): number {
|
|
|
237
355
|
'engine-mode': { type: 'string', default: 'auto' },
|
|
238
356
|
'wave-width': { type: 'string', default: '10' },
|
|
239
357
|
'design-dir': { type: 'string' },
|
|
358
|
+
// incremental: a2h-batch-ui-align's conversion_set.json (default <HMOS>/.hometrans/ui_info/conversion_set.json)
|
|
359
|
+
'conversion-set': { type: 'string' },
|
|
240
360
|
'emit-state': { type: 'boolean', default: false },
|
|
361
|
+
// incremental phase 2: re-plan every spec even when the previous campaign landed it unchanged
|
|
362
|
+
'no-carry': { type: 'boolean', default: false },
|
|
241
363
|
force: { type: 'boolean', default: false },
|
|
242
364
|
},
|
|
243
365
|
}));
|
|
@@ -292,6 +414,7 @@ function main(): number {
|
|
|
292
414
|
// list at the same path (new run of the producer) silently resumed the old campaign's groups.
|
|
293
415
|
const specsSha256 = createHash('sha256').update(readFileSync(specsJson)).digest('hex');
|
|
294
416
|
const existingState = path.join(hometrans, 'spec_pipeline_state.json');
|
|
417
|
+
let existingCarried: Carried[] = [];
|
|
295
418
|
if (!values['emit-state'] && existsSync(existingState)) {
|
|
296
419
|
let seeded: string | undefined;
|
|
297
420
|
let granularity: string | undefined;
|
|
@@ -300,6 +423,7 @@ function main(): number {
|
|
|
300
423
|
try {
|
|
301
424
|
const s = readJson(existingState);
|
|
302
425
|
existing = s;
|
|
426
|
+
if (Array.isArray(s?.carried)) existingCarried = s.carried;
|
|
303
427
|
seeded = s?.config?.specs_json_sha256;
|
|
304
428
|
granularity = s?.config?.design_granularity;
|
|
305
429
|
parsed = true;
|
|
@@ -335,6 +459,21 @@ function main(): number {
|
|
|
335
459
|
return 2;
|
|
336
460
|
}
|
|
337
461
|
|
|
462
|
+
// Incremental: which specs' pages already had HarmonyOS code before this run (see existingBySpec).
|
|
463
|
+
const specsScopeId = (data as { scope?: { scope_id?: string } }).scope?.scope_id ?? null;
|
|
464
|
+
let conversionSet: unknown = null;
|
|
465
|
+
if (specsScopeId) {
|
|
466
|
+
const csPath = values['conversion-set'] !== undefined
|
|
467
|
+
? path.resolve(String(values['conversion-set'])) : path.join(hometrans, 'ui_info', 'conversion_set.json');
|
|
468
|
+
try { conversionSet = readJson(csPath); } catch { conversionSet = null; }
|
|
469
|
+
}
|
|
470
|
+
const existingMap = existingBySpec(conversionSet, specsScopeId);
|
|
471
|
+
let scopeDoc: unknown = null;
|
|
472
|
+
if (specsScopeId) {
|
|
473
|
+
try { scopeDoc = readJson(path.join(hometrans, 'incremental', 'scope.json')); } catch { scopeDoc = null; }
|
|
474
|
+
}
|
|
475
|
+
const featureMap = featuresBySpec(scopeDoc, specsScopeId);
|
|
476
|
+
|
|
338
477
|
const warnings: string[] = [];
|
|
339
478
|
// deps warnings ride both channels: plan.warnings (surfaced at the I4
|
|
340
479
|
// announcement) and stderr (immediate visibility).
|
|
@@ -403,15 +542,29 @@ function main(): number {
|
|
|
403
542
|
title: specTitle(specPath, stem),
|
|
404
543
|
content: readFileSync(specPath, 'utf8'),
|
|
405
544
|
deps,
|
|
545
|
+
...(typeof row['spec_id'] === 'string' && existingMap.has(row['spec_id'] as string)
|
|
546
|
+
? { existing: existingMap.get(row['spec_id'] as string)! } : {}),
|
|
547
|
+
...(typeof row['spec_id'] === 'string' && featureMap.has(row['spec_id'] as string)
|
|
548
|
+
? { features: featureMap.get(row['spec_id'] as string)! } : {}),
|
|
549
|
+
...(typeof row['spec_id'] === 'string' ? { spec_id: row['spec_id'] as string } : {}),
|
|
550
|
+
...(typeof row['content_sha256'] === 'string' ? { content_sha256: row['content_sha256'] as string } : {}),
|
|
406
551
|
});
|
|
407
552
|
}
|
|
408
553
|
|
|
554
|
+
// ---- carry-over: specs the previous campaign already landed (fresh run decides, resume keeps it) ----
|
|
555
|
+
const carried: Carried[] = values['emit-state'] ? (values['no-carry'] ? [] : carryOver(hometrans, entries)) : existingCarried;
|
|
556
|
+
const carriedSo = new Set(carried.map((c) => c.so_id));
|
|
557
|
+
const allEntries = entries;
|
|
558
|
+
const active = entries.filter((e) => !carriedSo.has(e.so_id));
|
|
559
|
+
// a dep on a carried spec is satisfied: its code is merged already
|
|
560
|
+
for (const e of active) e.deps = e.deps.filter((d) => !carriedSo.has(d));
|
|
561
|
+
|
|
409
562
|
// ---- grouping ----
|
|
410
563
|
interface Group { G: number; group_id: string; specs: SpecEntry[]; }
|
|
411
564
|
const keyToGroup = new Map<string, Group>();
|
|
412
565
|
const order: string[] = [];
|
|
413
566
|
const keyOf = (e: SpecEntry): string => parentDirOf(e.spec_file);
|
|
414
|
-
for (const e of
|
|
567
|
+
for (const e of active) {
|
|
415
568
|
const key = keyOf(e);
|
|
416
569
|
let g = keyToGroup.get(key);
|
|
417
570
|
if (!g) {
|
|
@@ -434,16 +587,16 @@ function main(): number {
|
|
|
434
587
|
// contiguity warning (design §3.1 defensive rule).
|
|
435
588
|
{
|
|
436
589
|
const seen = new Set<string>();
|
|
437
|
-
let
|
|
438
|
-
for (const e of
|
|
590
|
+
let current: string | null = null;
|
|
591
|
+
for (const e of active) {
|
|
439
592
|
const key = keyOf(e);
|
|
440
|
-
if (key !==
|
|
593
|
+
if (key !== current) {
|
|
441
594
|
if (seen.has(key)) {
|
|
442
595
|
warnings.push(`non-contiguous directory block: '${ids.get(key)}' reappears after other `
|
|
443
596
|
+ `groups; grouped by first-occurrence order anyway`);
|
|
444
597
|
}
|
|
445
598
|
seen.add(key);
|
|
446
|
-
|
|
599
|
+
current = key;
|
|
447
600
|
}
|
|
448
601
|
}
|
|
449
602
|
}
|
|
@@ -486,6 +639,8 @@ function main(): number {
|
|
|
486
639
|
lines.push(`## Spec so-${e.so_id}: ${e.title}`, '');
|
|
487
640
|
lines.push(nestSpecBody(e.content).trim());
|
|
488
641
|
lines.push('');
|
|
642
|
+
lines.push(...featureSection(e));
|
|
643
|
+
lines.push(...existingSection(e));
|
|
489
644
|
}
|
|
490
645
|
writeFileAtomic(mergedPath, lines.join('\n') + '\n');
|
|
491
646
|
if (g.specs.some((e) => e.scenarios === 0)) {
|
|
@@ -499,6 +654,7 @@ function main(): number {
|
|
|
499
654
|
specs: g.specs.map((e) => ({
|
|
500
655
|
so_id: e.so_id, index: e.index, spec_file: e.spec_file, spec_stem: e.spec_stem,
|
|
501
656
|
ui_sequence: e.ui_sequence, scenarios: e.scenarios,
|
|
657
|
+
...(e.existing?.length ? { existing: e.existing } : {}),
|
|
502
658
|
})),
|
|
503
659
|
total_scenarios: total,
|
|
504
660
|
group_ui_sequence: lcpSequence(g.specs.map((e) => e.ui_sequence)),
|
|
@@ -529,6 +685,7 @@ function main(): number {
|
|
|
529
685
|
max_scenarios_per_chunk: maxScenarios,
|
|
530
686
|
},
|
|
531
687
|
groups: planGroups,
|
|
688
|
+
...(carried.length ? { carried } : {}),
|
|
532
689
|
warnings,
|
|
533
690
|
};
|
|
534
691
|
const planPath = path.join(hometrans, 'spec_group_plan.json');
|
|
@@ -553,6 +710,8 @@ function main(): number {
|
|
|
553
710
|
grouping: 'dir', wave_width: waveWidth,
|
|
554
711
|
design_granularity: 'chunk',
|
|
555
712
|
max_scenarios_per_chunk: maxScenarios,
|
|
713
|
+
// check_spec_pipeline_done holds this campaign to on-disk evidence of B4 / B5 / C / Homecheck
|
|
714
|
+
evidence_version: 1,
|
|
556
715
|
},
|
|
557
716
|
groups: planGroups.map((g) => ({
|
|
558
717
|
G: g.G, group_id: g.group_id, merged_spec: g.merged_spec,
|
|
@@ -561,6 +720,9 @@ function main(): number {
|
|
|
561
720
|
})),
|
|
562
721
|
status: 'pending', wave: null, commit: null,
|
|
563
722
|
})),
|
|
723
|
+
...(carried.length ? { carried } : {}),
|
|
724
|
+
// every spec carried: nothing to code, the campaign is complete as seeded
|
|
725
|
+
...(carried.length && !planGroups.length ? { finalization: { done: true, final_build: 'SKIPPED', smoke: 'SKIPPED', carried_only: true, at: new Date().toISOString() } } : {}),
|
|
564
726
|
specs: planGroups.flatMap((g) => g.specs.map((e) => ({
|
|
565
727
|
'so-id': e.so_id, index: e.index, spec_file: e.spec_file,
|
|
566
728
|
spec_stem: e.spec_stem, ui_sequence: e.ui_sequence,
|
|
@@ -577,7 +739,10 @@ function main(): number {
|
|
|
577
739
|
console.log(JSON.stringify({
|
|
578
740
|
plan: normSep(planPath),
|
|
579
741
|
groups: planGroups.length,
|
|
580
|
-
specs:
|
|
742
|
+
specs: allEntries.length,
|
|
743
|
+
carried: carried.length,
|
|
744
|
+
...(carried.length && !planGroups.length ? { carried_only: true } : {}),
|
|
745
|
+
existing_specs: entries.filter((e) => e.existing?.length).length,
|
|
581
746
|
scenarios: totalScenarios,
|
|
582
747
|
chunks: planGroups.reduce((s, g) => s + g.chunks.length, 0),
|
|
583
748
|
design_reset: designReset,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Render the deterministic conflict-resolver prompt (B2 hop a).
|
|
2
2
|
//
|
|
3
|
-
// node resolver_prompt.ts <hmos> <G> [--groups G1,G2] [--
|
|
3
|
+
// node resolver_prompt.ts <hmos> <G> [--groups G1,G2] [--android <abs>]
|
|
4
4
|
// [--worktree <abs>] [--dry-run]
|
|
5
5
|
//
|
|
6
6
|
// Why a renderer: the 2026-11-09 CoolMall campaign hand-wrote five resolver
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
// Output (stdout, one strict-JSON line):
|
|
19
19
|
// { ok:true, resolver_needed:true, group:"9", unitId:"resolver:g9",
|
|
20
20
|
// wtGen:0, attempt:1, worktree:"<abs>", conflicts:["..."],
|
|
21
|
-
// groups:["3","9"],
|
|
22
|
-
// prompt:"<markdown>" }
|
|
21
|
+
// groups:["3","9"], hmos_project_path:"<abs>", android_project_path:"<abs>"|null,
|
|
22
|
+
// issues_file:"<abs>", notes_file:"<abs>", prompt:"<markdown>" }
|
|
23
23
|
// { ok:true, resolver_needed:false, ... } — no conflicted files; the
|
|
24
24
|
// orchestrator abandons the claim with `--reason phantom` instead of
|
|
25
25
|
// dispatching a do-nothing resolver.
|
|
@@ -42,7 +42,7 @@ import { compactWiring } from './lib/wiring.ts';
|
|
|
42
42
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
43
43
|
const TEMPLATE = join(HERE, '..', 'references', 'resolver-prompt.md');
|
|
44
44
|
const USAGE = 'usage: node resolver_prompt.ts <hmos> <G> [--groups G1,G2] '
|
|
45
|
-
+ '[--
|
|
45
|
+
+ '[--android <abs>] [--worktree <abs>] [--dry-run]';
|
|
46
46
|
|
|
47
47
|
const POSITIVE_INT = /^[1-9]\d*$/;
|
|
48
48
|
|
|
@@ -136,7 +136,7 @@ function main(): number {
|
|
|
136
136
|
allowPositionals: true,
|
|
137
137
|
options: {
|
|
138
138
|
groups: { type: 'string' },
|
|
139
|
-
|
|
139
|
+
android: { type: 'string' },
|
|
140
140
|
worktree: { type: 'string' },
|
|
141
141
|
'dry-run': { type: 'boolean' },
|
|
142
142
|
},
|
|
@@ -150,11 +150,10 @@ function main(): number {
|
|
|
150
150
|
const G = positionals[1]!;
|
|
151
151
|
if (!POSITIVE_INT.test(G)) return usage(`invalid group: ${G}`);
|
|
152
152
|
const dryRun = values['dry-run'] === true;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const indexUsable = indexUsableRaw === 'yes';
|
|
153
|
+
// An empty / whitespace-only --android means "no Android root": resolve('')
|
|
154
|
+
// would silently point the rule at the CWD.
|
|
155
|
+
const androidRaw = values.android === undefined ? '' : String(values.android).trim();
|
|
156
|
+
const android = androidRaw ? resolve(androidRaw) : null;
|
|
158
157
|
|
|
159
158
|
const planPath = join(hmos, '.hometrans', 'spec_group_plan.json');
|
|
160
159
|
if (!existsSync(planPath)) return err(`spec_group_plan.json not found: ${planPath}`);
|
|
@@ -269,7 +268,12 @@ function main(): number {
|
|
|
269
268
|
}
|
|
270
269
|
const groups = [...involved].sort((a, b) => Number(a) - Number(b));
|
|
271
270
|
|
|
272
|
-
|
|
271
|
+
// The resolver's writable evidence lives beside issues.md, OUTSIDE the
|
|
272
|
+
// worktree: notes written into the worktree would either trip the release
|
|
273
|
+
// gate (`not-quiet`) or pollute the merge commit the resolver is producing.
|
|
274
|
+
const attemptDir = join(hmos, '.hometrans', `spec_group_${G}`, 'resolver', `attempt_${attempt}`);
|
|
275
|
+
const issuesFile = join(attemptDir, 'issues.md');
|
|
276
|
+
const notesFile = join(attemptDir, 'notes.md');
|
|
273
277
|
|
|
274
278
|
const base = {
|
|
275
279
|
ok: true,
|
|
@@ -280,8 +284,10 @@ function main(): number {
|
|
|
280
284
|
worktree,
|
|
281
285
|
conflicts: conflicts.files,
|
|
282
286
|
groups,
|
|
283
|
-
|
|
287
|
+
hmos_project_path: hmos,
|
|
288
|
+
android_project_path: android,
|
|
284
289
|
issues_file: issuesFile,
|
|
290
|
+
notes_file: notesFile,
|
|
285
291
|
};
|
|
286
292
|
|
|
287
293
|
// A real dispatch with no conflicts is a phantom (the merge was already
|
|
@@ -298,10 +304,23 @@ function main(): number {
|
|
|
298
304
|
return err(`resolver prompt template unreadable: ${(e as Error).message}`);
|
|
299
305
|
}
|
|
300
306
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
307
|
+
// The resolver sub-agent receives only `prompt`, so the real absolute index
|
|
308
|
+
// paths must be interpolated here — a `<HMOS>`/`<ANDROID>` placeholder would
|
|
309
|
+
// hand it no path at all.
|
|
310
|
+
const q = (p: string) => `"${p.replace(/"/g, '\\"')}"`;
|
|
311
|
+
// The tail must stay true in both branches: it names no index count, and the
|
|
312
|
+
// notes path is the absolute attempt directory (never worktree-relative).
|
|
313
|
+
const tail = ' Never run `homegraph init` / `sync` / `index` / `unlock` (the orchestrator owns index '
|
|
314
|
+
+ 'maintenance), never query a worktree index (no worktree index is used by this pipeline), and never '
|
|
315
|
+
+ 'copy a symbol the index shows that is absent from this worktree (`index_ahead`). Record the queries '
|
|
316
|
+
+ `in \`${notesFile}\`.`;
|
|
317
|
+
const homegraphRule = android
|
|
318
|
+
? '- HomeGraph is read-only and CLI-only: the shared main index is ' + q(hmos)
|
|
319
|
+
+ ' and the Android source index is ' + q(android)
|
|
320
|
+
+ `. Locate code with \`homegraph explore -p ${q(hmos)} "<Symbol>"\` or `
|
|
321
|
+
+ `\`homegraph explore -p ${q(android)} "<Symbol>"\`, plus \`impact\` and \`callers\`.` + tail
|
|
322
|
+
: '- HomeGraph is read-only and CLI-only: the shared main index is ' + q(hmos)
|
|
323
|
+
+ `. Locate code with \`homegraph explore -p ${q(hmos)} "<Symbol>"\`, plus \`impact\` and \`callers\`.` + tail;
|
|
305
324
|
|
|
306
325
|
// Every involved group's original SPEC is the one invariant this renderer
|
|
307
326
|
// guarantees; a missing plan entry or a deleted file fails closed.
|
|
@@ -323,6 +342,7 @@ function main(): number {
|
|
|
323
342
|
WIRING: wiringSurface(hmos),
|
|
324
343
|
HOMEGRAPH_RULE: homegraphRule,
|
|
325
344
|
ISSUES_PATH: issuesFile,
|
|
345
|
+
NOTES_PATH: notesFile,
|
|
326
346
|
BASE_HEAD: typeof resolverUnit?.baseHead === 'string' && resolverUnit.baseHead
|
|
327
347
|
? resolverUnit.baseHead
|
|
328
348
|
: '<claim baseHead>',
|