@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,46 @@
|
|
|
1
|
+
# B4 — Unified review loop (parallel per group, per-group serial fix, only open groups re-reviewed)
|
|
2
|
+
|
|
3
|
+
Authoritative B4 procedure, applied verbatim (SKILL.md → B4 keeps only the navigation summary). Also read SKILL.md's rule for recording every `ensure_index` call: it applies to every trigger point below.
|
|
4
|
+
|
|
5
|
+
Every group carries its review state in `state.groups[G].review = { round, open, scenarios, carry_over, fix_commits }` (written after every step below; atomic like every state write):
|
|
6
|
+
- `open` — `true` while the group still has a defect the fixer can act on.
|
|
7
|
+
- `scenarios` — the scenario ids (`so-N 场景X`) the last report judged FAIL / PARTIAL.
|
|
8
|
+
- `carry_over` — path of the group's last `review-fix-report.md`, whose Remaining Issues the next fixer re-attempts.
|
|
9
|
+
- `fix_commits` — every `fix(review)` commit made for this group.
|
|
10
|
+
|
|
11
|
+
A group is **open** after a review when its report has any FAIL / PARTIAL scenario, a broken Launch Path hop, a non-PASS Cross-Cutting section, or a wave-audit finding that names it — or when the report is **missing** (reviewer failed twice). PASS and UNABLE TO VERIFY are **closed** verdicts: UNABLE TO VERIFY is evidence debt no code change closes, so it never keeps a group open and never costs a round. A closed group is never re-reviewed or handed to a fixer again unless step 1(c) reopens it.
|
|
12
|
+
|
|
13
|
+
Loop rounds `r = 1 .. MAX_ROUNDS_REVIEW` (default `2`):
|
|
14
|
+
|
|
15
|
+
0. **Single-writer index sync (main tree)** — the orchestrator is the only writer of `<HMOS>`'s index; coders, reviewers, fixers, resolvers and the semantic-docs sub-agent are read-only, and no worktree index exists to refresh. **Skip entirely when `ENGINE_MODE=off`**. Before dispatching this round's reviewers: `node <skill-dir>/scripts/ensure_index.ts <HMOS> --sync` (trigger `b4-step0`). Never gate on `homegraph status`: after the B2/B3 commits the tree is clean, so it reports "up to date" while the index is behind HEAD. Exit 1 → record `reason`; under `required` hard-stop (`state.engine_blocked`), under `auto` record `engine_degraded` and continue (reviewers receive `engine_degraded_reason`). After two consecutive non-`lock_busy` failures the circuit breaker skips this step for the rest of the campaign.
|
|
16
|
+
|
|
17
|
+
(Recording every `ensure_index` call: SKILL.md → B4 — it applies to every trigger point.)
|
|
18
|
+
1. **Select this round's review set — exactly these groups, computed from state, never by judgment:**
|
|
19
|
+
- `r = 1`: every `merged` member of the wave, all scenarios.
|
|
20
|
+
- `r ≥ 2`: only (a) groups still **open** after the previous round's fix; (b) groups whose previous report is missing; (c) **regression check** — a closed group whose files were touched by a `fix(review)` or rebuild commit of the previous round (`git -C <HMOS> diff --name-only <commit>^..<commit>` intersected with `git diff --name-only` of the group's B2 range). This reopens the group. Every other group is skipped — not reviewed again.
|
|
21
|
+
- The set is empty → exit the loop.
|
|
22
|
+
2. **Dispatch the selected reviewers as ONE foreground batch — every reviewer call of the round in a single assistant message, never one-per-message** (reviewers are read-only, so overlap is always safe). Per selected group: a `code-reviewer` sub-agent call with:
|
|
23
|
+
- `harmonyos_project_path: <HMOS>`;
|
|
24
|
+
- `commit_range: <the group's net-change range recorded at B2 — PRE..<merge-commit>>`;
|
|
25
|
+
- `test_case_path: <merged_spec abs path>`;
|
|
26
|
+
- `output_path: <HMOS>/.hometrans/spec_group_<G>/review-round_<r>`;
|
|
27
|
+
- from `r ≥ 2` also `extra_commits: <review.fix_commits plus the previous round's rebuild commit, when any>`, so the fixes are in the change context (the B2 range alone predates them);
|
|
28
|
+
- from `r ≥ 2` also `scenarios`: case (a) the group's `review.scenarios` plus the scenarios its cross-cutting / launch-path / audit findings cite; cases (b)/(c) omitted, so all scenarios are reviewed;
|
|
29
|
+
- `android_project_path: <ANDROID>`;
|
|
30
|
+
- `hmos_index_ready` / `android_index_ready`: the orchestrator's `<true|false>` verdict for each index;
|
|
31
|
+
- `homegraph_guide`: `<skill-dir>/references/homegraph-cli.md`;
|
|
32
|
+
- `engine_mode` / `engine_degraded_reason`: `<ENGINE_MODE>` / the recorded degraded reason (`null` when none).
|
|
33
|
+
|
|
34
|
+
Add exactly these fields — `harmonyos_project_path` is both the review target and the HomeGraph index root (the same `<HMOS>` main checkout). Wiring registrations live in the `wiring` commit, outside every group's range.
|
|
35
|
+
|
|
36
|
+
**Failure handling — retry once, never a stop.** A reviewer call that errors → re-dispatch once with the same contract, batched with every other same-round failure. A second failure → record it and continue: that group's report is missing, it stays open, and it is flagged in the final report. Reports are per-spec sectioned.
|
|
37
|
+
3. For every reviewer that returned, run `node <skill-dir>/scripts/check_review_evidence.ts <output_path>/code-review-report.md --engine-mode <ENGINE_MODE>`. `<report>` is the per-group report produced in this round — never `findings.md` (it is assembled only in step 5, so it would read as `report-unreadable`). A missing section is a warning under `auto` and a failure under `required`: re-dispatch that reviewer once; if still missing, record `review_contract_violation` and keep the round's verdicts.
|
|
38
|
+
|
|
39
|
+
**Update each reviewed group's state.** Extract per-spec verdicts into `state.specs[]` (stage stays `B`); set `review.round = r`, recompute `open`, and set `scenarios` to this report's FAIL / PARTIAL ids — a scenario reviewed this round replaces its old verdict, one not in this round's `scenarios` subset keeps it. The wave audit's findings (`.hometrans/wave_<K>/claim_audit.json`: registry edits, resolver registry edits / wiring-mode violations, cross-group actual overlaps) are attributed in round 1 to every group they name and keep that group open until a fixer processes them; a finding naming two groups goes to the lower `G`.
|
|
40
|
+
4. **Exit check.** No group is open → exit the loop. Open groups whose only cause is a missing report get no fixer: go straight to the next round.
|
|
41
|
+
5. **Fix — one fix-mode `code-reviewer` per open group, dispatched serially in group order** (fixers write to the main tree, so one runs at a time). Each fix call gets: `mode: fix`; `review_report_path: <HMOS>/.hometrans/spec_group_<G>/review-round_<r>/findings.md` (the group's round-`r` report plus the audit findings attributed to it in round 1 — the orchestrator writes this file and **copies each reviewer's `## HomeGraph evidence` section into it verbatim**, so the fixer reads the evidence); `carry_over_report_path: <review.carry_over>` when set (the previous round's fix report whose Remaining Issues are re-attempted); `harmonyos_project_path: <HMOS>`, `android_project_path: <ANDROID>`; `output_path`: the same `review-round_<r>` dir; `build: false` (the orchestrator builds once per round); `homegraph_guide: <skill-dir>/references/homegraph-cli.md`; `engine_mode: <ENGINE_MODE>`; `engine_degraded_reason: <the recorded reason or null>`; `permission_index: <skill-dir>/references/permission-index.json`. Pass exactly these fields and add no scope restrictions of your own. `wiring-mode` binds only B1 coders in their worktrees; a fixer runs alone on the main tree with nothing left to merge, so it may edit `state.config.wiring_files` files when a finding needs it (e.g. a missing `requestPermissions` entry in `module.json5`) — additive, allowlisted, non-restricted names only (code-reviewer Step F1), never reordering or removing other entries, and every wiring file it touches is listed in its `review-fix-report.md`.
|
|
42
|
+
|
|
43
|
+
After each fixer returns: append its `commit` to `review.fix_commits` when not `none`, and set `review.carry_over` to its `review-fix-report.md`; then run `node <skill-dir>/scripts/ensure_index.ts <HMOS> --sync` (trigger `b4-fix`; skip when `ENGINE_MODE=off`; record the JSON line — a degraded refresh never blocks the round). A fixer that errors → retry once; a second failure → record it, the group stays open, dispatch the next fixer.
|
|
44
|
+
|
|
45
|
+
When every fixer has returned, dispatch **one** `build-fixer` (B3's fields, `output_path: <HMOS>/.hometrans/wave_<K>/review_round_<r>/build`) and validate its reply exactly as in B3; its fix commit, when any, counts as a previous-round commit for step 1(c). After that round rebuild, run `node <skill-dir>/scripts/ensure_index.ts <HMOS> --sync` (trigger `b4-rebuild`; skip when `ENGINE_MODE=off`; record the JSON line). Then the next round.
|
|
46
|
+
6. **Last round.** After `r = MAX_ROUNDS_REVIEW`'s fixes, re-review the fixed groups once (step 1–3 rules, `review-round_<r+1>`, no fixer); that verdict is final. Groups still open are listed in the final report with their open scenarios and last `review-fix-report.md` as manual follow-up.
|
|
@@ -6,26 +6,48 @@
|
|
|
6
6
|
- `scripts/resolve_wiring.ts` — three-tier wiring-surface derivation into `state.config.wiring_files` (single source of truth) **and** its compact rendering into `state.config.wiring_compact` (a cache of the same rendering; deterministic; has tests).
|
|
7
7
|
- `scripts/git_baseline.ts` — I3 campaign-start baseline: gitignores `.hometrans/` + `.homegraph/` (plus an in-repo custom `--design-dir`), and before the first wave commits an unborn-HEAD / dirty tree as `pre-campaign baseline` so W0 has a `WAVE_BASE` and a clean tree; no-op once a wave is assigned (deterministic; has tests).
|
|
8
8
|
- `scripts/stage_design_inputs.ts` — W0 and the deps release sweep: stages the semantic design docs (`project_design.md`, `database_design.md` / `preferences_design.md` when present, and per-module `module_design.md`) from `<HMOS>/.hometrans` into a worktree's `.hometrans`, so the coder's design step resolves them from the worktree; skips the runtime subtrees (`spec_design`, `dispatch`, `spec_pipeline_archive`, `spec_group_*`, `wave_*`) (deterministic; has tests).
|
|
9
|
-
- `scripts/
|
|
9
|
+
- `scripts/ensure_index.ts` — the single writer for both HomeGraph indexes (`<ANDROID>` at I2,
|
|
10
|
+
`<HMOS>` at I2/W0/B2/B3/B4/resume): `--create` initializes a missing local index, `--sync` refreshes
|
|
11
|
+
an existing one unconditionally (`homegraph status` reads git's uncommitted set, so it reports
|
|
12
|
+
"up to date" after a pipeline commit while the index is behind HEAD), `index --inplace` is the
|
|
13
|
+
rebuild fallback, and a corrupt db is renamed to `.homegraph.corrupt-<ts>.db` before a fresh `init`
|
|
14
|
+
(never deleted). Every failed `init`/`index` is re-read first: the engine can exit non-zero after the
|
|
15
|
+
rows are complete, so a usable snapshot is accepted and recorded as success. Lock safety: `homegraph unlock` runs only when the lock holder is dead/absent; a
|
|
16
|
+
live holder (identified or not) returns `lock_busy` without killing, unlocking, or rebuilding — on
|
|
17
|
+
the main checkout a live writer is never killed; no writer is ever killed: a timed-out attempt leaves its lock for the next call (live → `lock_busy`, dead → `unlock`).
|
|
18
|
+
A nonexistent path is `repo_missing`. `--engine-mode off` spawns nothing and returns
|
|
19
|
+
`action:"skip", reason:"engine_off"` (and touches no file, not even `.gitignore`). A linked worktree is
|
|
20
|
+
refused (`not_main_checkout`), as is an index that resolves to an ancestor (`index_not_local`); an
|
|
21
|
+
explicit path is literal, so a monorepo subdirectory gets its own index. Output is one JSON line
|
|
22
|
+
(`ok/action/reason/degraded/initialized/attempts/reaped/projectPath/lastIndexed/fileCount/indexState/builtWithVersion/durationMs/detail`);
|
|
23
|
+
`initialized` = local db present **and** the status `projectPath` resolves to this repo; `repo` is `state.engine.<index>.path`.
|
|
24
|
+
Exit 0 usable (incl. `none`/`skip`/`sync_incomplete`), 1 degraded, 2 usage. Timeouts: `init`
|
|
25
|
+
300000 ms, `sync`/`index` 600000 ms, `status` 120000 ms
|
|
26
|
+
(`--init-timeout-ms`/`--timeout-ms`/`--status-timeout-ms`).
|
|
10
27
|
- `scripts/plan_waves.ts` — deterministic deps-aware backfill wave slicing (bump same-wave-dep candidates when a clean candidate can backfill, else hold in-wave for runtime dispatch-hold) with a flat fallback: a pool larger than one wave whose deps forecast exceeds 2× the width-bound ideal dispatch rounds slices pure group order with `mode: "flat"` (deps stop shaping concurrency; has tests).
|
|
28
|
+
- `scripts/sync_permission_index.ts` — regenerates `references/permission-index.json`, the allowlist F0 checks a looked-up `ohos.permission.*` name against and its offline fallback (the `desc` field is how a capability is matched without a docs index): reads the four official pages (`开放权限_系统授权`, `开放权限_用户授权`, `受限开放权限`, `应用权限组列表`) through `devecocli docs read` and records per permission its grant class, `level`, `restricted` flag, `since`, permission group and first description line (names carry dotted namespaces — `ohos.permission.kernel.NET_RAW`; the grant marker is `(user_grant)` with full-width parentheses, so the page default is a fallback only), one permission per line so the reviewed diff stays readable; `--check` re-derives in memory and exits 1 on drift without writing, `--raw-dir` replays saved pages (fixtures, no docs index), and an unavailable docs index is exit 2 — the committed snapshot is what keeps F0 offline and deterministic (has tests).
|
|
11
29
|
- `scripts/scan_shared.ts` — F0's deterministic candidate scan (read-only except the atomic candidates file): resolves the semantic docs (`lib/shared_docs.ts`), reads the plan/state/wave plan, classifies the doc rows into the three shared classes (`lib/shared_classes.ts`; EVERY declaration row is classified — invalid roots are recorded in `skipped[]` with accurate reasons, deduped by `(id, reason)`, even when valid roots remain), gates on members ≥ 2, scopes the prior-work inventory to strictly earlier waves' done manifests **of the current `campaign_id`** (the current wave's own output is never evidence; a manifest from another campaign satisfies nothing), takes module roots **only** from `build-profile.json5` `modules[].srcPath` (`.hometrans/module_understanding/` is never a registration source), resolves the database table list as `database_design` → `project_design` → the wave's merged-spec union (an empty database doc does not suppress the later sources; `doc_source`/`declared_by` record the source actually used and `multi_database_doc` only reflects the database doc itself), scans each candidate module root for satisfied markers in tracked `.ets`/`.ts` sources only (comments blanked and single/double-quoted string contents plus template-literal TEXT and regular-expression-literal bodies masked by a small lexer, so `${...}` interpolation code stays visible, a template nested inside an interpolation is masked recursively, and `{`/`}` inside a regex never unbalance an interpolation; regex bodies are recognized only where an expression may start — file/statement start, after `( [ { , : ; = ! & | ? + - * % < > ~ ^`, after `return`/`typeof`/`case`/`in`/`of`/`new`/`delete`/`void`/`instanceof`/`do`/`else`/`yield`/`await`, or after `=>` — everything else is division; markers identifier-bounded; `network.transport` needs a marker on an executable-export line — `export [default] function/class/const/let/var` or a non-type `export { ... }`, interface/type/type-only exports do not count — or an explicit `export [default] class …(Http|Api|Network|Request|Transport)…` client class, which satisfies without an accompaniment word; table satisfaction needs real DDL/schema evidence — a `CREATE TABLE` naming the table (DDL may live in a string), or a quoted/backticked table name within ±3 lines of a TABLE/SCHEMA/DDL/COLUMN keyword **in the masked code text** (so prose like `const warning = "TABLE was not created"` is not schema evidence), never a bare occurrence; a partially-built database root sets `partial:true` → `mode:"complete"` for unsatisfied candidates only — any satisfied root wins and a satisfied candidate stays `create`), fills `lexicon_hits` with the per-consumer matched doc keywords, and writes `wave_<K>/shared_candidates.json`; the skip verdict (`members<2 | no-candidates | insufficient_evidence | all-satisfied`) is JSON, never an exit code — exit 2 = malformed/missing input (deterministic; has tests).
|
|
12
30
|
- `scripts/validate_shared_manifest.ts` — F0's deterministic done-manifest gate: `campaign_id`, `schema`/`wave` identity (`spec_shared_manifest/v1` / `spec_shared_candidates/v1` / `manifest.wave == --wave`), `base`, `status:"done"` with non-empty `modules`, the per-module candidate/mode/`files`-under-`path`/`api`/barrel checks (the barrel is parsed after masking string/template literals, so export text inside a literal never counts; named exports grepped; the barrel entry never resolves outside its module; a re-export from a bare/foreign specifier fails that symbol; `export *` is not proof), the `base..commit` diff allowlist `files[] ∪ wiring[]` with the page/VM and `build-profile.json5`/`hvigorfile.ts`/foreign `oh-package.json5` vetoes (`wiring[]` entries outside `state.config.wiring_files` are allowed only as the module barrel, the module's own root-level `oh-package.json5`, or a recognized wiring category **under that module's root** — `module.json5`, `main_pages.json`, `route_map.json`, `resources/**/element/*.json`, `Routes.ets`, or a `getRdbStore` registration file under the module root; a foreign path that merely matches a category is rejected), the database single-writer rule (multiple `database` module entries are allowed; at most **one** entry may contain `getRdbStore`/schema), `mode:"complete"` only for `database`, `placement_fallback` never true, the exactly-one-commit gate (`commit` has exactly one parent == `base`; `base..commit` holds exactly one commit), the canonical commit subjects (`infra(wave K): shared layer` on the commit, `docs(wave K): refresh semantic docs after shared layer` on a recorded `docs_commit`; with `--resume`, any unrecorded F0-subject commit in `<commit>..HEAD` fails as `unrecorded F0 commit: <sha>`), the clean tree (`--porcelain --untracked-files=all`, so `status.showUntrackedFiles=no` hides nothing), `HEAD == docs_commit ?? commit` — or, with `--resume` (the resume re-validation call), a descendant HEAD with a warning — and the optional `docs_commit` (parent = the infra commit, touches only `.hometrans/`); evidence source paths are warnings only. Prints exactly one compact JSON line `{ ok, errors, warnings }`; exit 0 ok / 1 validation error / 2 usage-input (deterministic; has tests).
|
|
13
31
|
- `scripts/deps_ready.ts` — dispatch-hold verdicts for a wave's pending members: `ready`/`held` per group-level deps (cycle edges ignored + recorded) plus the `released` (no-dispatch-yet) subset; a `mode: "flat"` wave yields `ready` for every pending member; read-only over plan + state + wave plan (deterministic; has tests).
|
|
32
|
+
- `scripts/check_design_map.ts` — Finalization step 3: checks `design_map.md` against the state — one row per done/failed group, `Scenarios` an integer, a done group's `Start`/`End` real timestamps with Start ≤ End (not `进行中`), every named design file present in the design dir; JSON `{ ok, problems }`, exit 1 lists problems for the report (a placeholder-filled map no longer passes as complete; has tests).
|
|
14
33
|
- `scripts/branch_landed.ts` — the read-only resume "merged" predicate: landed ⇔ a `--no-ff` merge on main's first-parent line has the branch tip as its second parent (a zero-commit branch is never landed, unlike `merge-base --is-ancestor`); takes `[--wt-gen <n>] [--branch <name>]` (the generation branch `specpipe/g<G>r<n>`; `--branch` wins) and returns the landing's B4 range `PRE..M` (has tests). The predicate itself lives in `scripts/dispatch/landing.mjs` so `dispatch.mjs group-merge` uses exactly one implementation.
|
|
15
|
-
- `scripts/resolver_prompt.ts` — the deterministic B2 hop-a conflict-resolver prompt: derives the involved groups from each landed group's `<merge>^1..<merge>` net-change range intersected with the conflicted files, and renders `references/resolver-prompt.md` with every involved group's ORIGINAL SPEC + chunk SPECs + design docs, the worktree-only rule, the compact wiring list (derived from `state.config.wiring_files`, `wiring_compact` as fallback), the HomeGraph rule (
|
|
34
|
+
- `scripts/resolver_prompt.ts` — the deterministic B2 hop-a conflict-resolver prompt: derives the involved groups from each landed group's `<merge>^1..<merge>` net-change range intersected with the conflicted files, and renders `references/resolver-prompt.md` with every involved group's ORIGINAL SPEC + chunk SPECs + design docs, the worktree-only rule, the compact wiring list (derived from `state.config.wiring_files`, `wiring_compact` as fallback), the always-present HomeGraph rule (read-only CLI on the shared indexes interpolated as real absolute paths; `<HMOS>` always, `<ANDROID>` only when `--android` is given; never a worktree index), the absolute `resolver/attempt_<n>/issues.md` + `notes.md` paths (the notes file is outside the worktree, so it never trips the release gate or pollutes the merge commit), the strict-JSON return, and an empty-conflict `{resolver_needed:false}` (phantom) path. A non-dry-run render requires a claimed resolver (claim-first). Output is one strict-JSON line carrying `hmos_project_path` / `android_project_path` (`null` when absent) / `notes_file`; `--groups` overrides derivation, `--android <abs>` adds the Android source index to the rule (absent or empty → the rule names `<HMOS>` only), `--worktree <abs>` overrides the ledger worktree (never `<hmos>`), and `--dry-run` (operator-only) prints the markdown. Read-only; no `--out`/`--intent`/`--attempt`/prompt hash (has tests).
|
|
16
35
|
- `scripts/audit_claims.ts` — actual-write audit when B1⇄B2 finish (B2 step 0), on recorded per-group coder pairs, with each group's generation read from the dispatch ledger (`--wt-gen` is the no-ledger fallback, `--branch` overrides) for the fallback range: wiring-surface violations, resolver hand-edit violations, empty diffs, same-wave cross-group overlaps (deterministic; has tests).
|
|
17
|
-
- `scripts/
|
|
18
|
-
- `scripts/
|
|
36
|
+
- `scripts/check_permissions.ts` — B2's deterministic permission completeness check for the wiring step (`<HMOS> --wave <K>`): sweeps this wave's `merged_spec.md` + chunk SPEC/design docs for every `ohos.permission.*` name (consent ids included), reads the entry module's `module.json5` `requestPermissions`, F0's per-wave `shared_manifest.json` `notes` and `references/permission-index.json`, and classifies each name — `toAdd[]` only when the index says `restricted: false` **and** `level: normal`; `held[]` for a restricted / ACL / non-`normal` / picker / notification name and for one F0 already judged (`<name> | skip | <documentId> | restricted|picker|none`), never re-added and never re-counted as missing; `unknown[]` for a name outside the index (report-only); `unused[]` for a declared name no merged/done group's spec and no F0 note mentions (campaign-wide reverse check, never this wave alone); `declaredForbidden[]` for a restricted name already declared (final-report follow-up, never auto-removed); plus the coder-side `requestPermissionsFromUser` call sites (`consent.callSites`) (deterministic; has tests).
|
|
37
|
+
- `scripts/check_review_evidence.ts` — the reviewer's mechanical `## HomeGraph evidence` gate: reads the report, parses that section only (`parseHomeGraphEvidence` from `dispatch/evidence.mjs`) and passes when it carries file:line anchors or a `degraded:`/`fallback:`/`not-applicable:` record. One JSON line (`ok/mode/path/present/anchors/degraded/notApplicable/warning`, plus `skipped:true` for `off`); `--engine-mode auto|off|required` (`ENGINE_MODE` is the default; `off` skips without reading the file, `required` turns a missing section into a contract failure). Exit 0 pass/skip, 1 contract failure, 2 usage; read-only (deterministic; has tests).
|
|
38
|
+
- `scripts/test_arkui_runtime_pitfall.ts`, `scripts/test_platform_api_contract.ts`, `scripts/test_api_permission_declared.ts` — the migration rule package's tests: every `@hometrans` checker's detection and per-issue severity (pitfall: text-level sub-codes over a temp project; platform-api-contract: statement-event selectors plus a fake CFG whose `ArkIfStmt` text spans the block and whose closure bodies must not be attributed to the outer statement; api-permission: Kit import vs `module.json5` declarations). Run with `node --test <file>`; no installed HomeCheck is needed (a stub stands in for the `homecheck` module), so the rule logic is covered in plain CI — a real-scene A/B scan still needs an installed HomeCheck/ArkAnalyzer.
|
|
39
|
+
- `scripts/homecheck_scan.ts` — post-loop Homecheck scan: generates the project/rule configs for the two fixed rule sets plus the skill's `rules/migration-rules` set (`plugin:@hometrans/all`, installed by Homecheck's ext-rule loader into an OS-temp sandbox), runs the installed CLI, and writes `findings.json` with every `error` plus the custom set's `warnings[]` (advisory for the gate — only this set's warnings are judged; every other set's warnings are dropped as out of scope; a previous `findings.json` is deleted before any probe, so a killed run never leaves a stale clean result). A scan whose log does not prove the custom set and every one of its rules loaded, or that aborted checker callbacks, is recorded as `scan_error` — never as a clean pass. Reports are English by default (`--language cn` on demand) so the messages and the rule docs behind `docPath` match the English gate contract (deterministic; has tests).
|
|
40
|
+
- `scripts/dispatch.mjs` — the dispatch CLI and the **only writer** of `<HMOS>/.hometrans/dispatch/ledger.jsonl`: `init` (plan per wave; `--new-run` starts a new `runId`), `group-worktree`, `claim` / `intent` / `confirm` / `start` / `beat` / `submit` / `abandon` / `orphan` / `reject` / `retry` / `release` / `accept` / `close` / `artifact`, `group-reset` / `group-reopen` / `group-merge --landed` / `group-fail` / `queue-merge` / `dequeue-merge`, and the read/projection commands `reconcile [--check]`, `next` (this pass's ordered actions and loop exit, from the reconcile projection), `wait`, `waker`, `probe`, `status`, `progress`, `evidence` (read-only per-attempt gate; exit 0 = completed). `group-merge` is a landing gate (`landed-required` / `landed-unknown` / `landed-mismatch` / `merge-in-progress` / `group-failed` / `chunks-incomplete`; an explicit no-op for a zero-commit queued branch; duplicate/legacy answers append nothing and a legacy row with unlanded branch commits reports `unlanded:true`). `queue-merge` applies the same predicate (every planned chunk `done`/`accepted`) before any `git merge` (`chunks-incomplete`), and `group-reopen` is the sanctioned repair for a premature landing (new generation; finished chunks kept, the rest and the resolver reopened, the group re-admitted to the plan; `--wt-gen` must equal the next generation and an unrecorded landing is verified first). It is the CAS + lock layer (claimGen/token identity, stale events ignored), prints compact JSON, and is the only command the runbook uses for dispatch state (has tests).
|
|
19
41
|
- `scripts/dispatch/ledger.mjs` — ledger file paths, the atomic `{pid,host,boot,nonce,at}` lock (boot/nonce-aware stale-owner takeover, nonce-owned release, orphan-temp pruning), tail repair, fatal corrupt detection, append/fsync, `foldLedger` + the `dispatch/state.json` cache writer, and the `runId`/token/claimGen generators.
|
|
20
|
-
- `scripts/dispatch/fold.mjs` — the pure dispatch FSM: `createState`, `applyEvent`, `foldEvents`, `deriveTimeouts`, `isComplete`, `parseUnitId`, `DEFAULTS` (claim/no-evidence/lease/evidence TTLs, content/dispatch attempts, generations), terminal/active sets.
|
|
42
|
+
- `scripts/dispatch/fold.mjs` — the pure dispatch FSM: `createState`, `applyEvent`, `foldEvents`, `deriveTimeouts`, `isComplete`, `parseUnitId`, `plannedChunksDone` (the shared queue/landing completeness predicate), `DEFAULTS` (claim/no-evidence/lease/evidence TTLs, content/dispatch attempts, generations), terminal/active sets.
|
|
21
43
|
- `scripts/dispatch/plan.mjs` — `buildPlanEvent`: reads `spec_wave_plan.json` + `spec_group_plan.json` and builds the wave's `plan` event (unit universe per group).
|
|
22
|
-
- `scripts/dispatch/evidence.mjs` — per-attempt evidence: attempt-directory layout, `commit-info.md` parsing, `state_docs_used.md` verdict parsing (unrecognised verdict → `warnings: ["state-docs-invalid"]`), chunk/resolver evidence rules, quiet-worktree check (`git status --porcelain=v1 -z --untracked-files=all --no-renames`), and `promoteAttempt` (the winning attempt's artifacts — `commit-info.md`, `issues.md`, `wiring.md`, `state_docs_used.md` — copied to the chunk/resolver dir on release).
|
|
23
|
-
- `scripts/dispatch/reconcile.mjs` — the reconcile projection: derived-timeout application, `dispatchable
|
|
44
|
+
- `scripts/dispatch/evidence.mjs` — per-attempt evidence: attempt-directory layout, `commit-info.md` parsing, `state_docs_used.md` verdict parsing (unrecognised verdict → `warnings: ["state-docs-invalid"]`), `## HomeGraph evidence` parsing (file:line anchors, `degraded:`/`fallback:` runs and `not-applicable:` inside that section only; a missing or evidence-less section is `homegraph-evidence-missing`, anchors without a `start | hmos` line are `homegraph-start-missing`, both appended to `warnings` under `ENGINE_MODE=auto`, failed under `required`, skipped entirely under `off`), chunk/resolver evidence rules, quiet-worktree check (`git status --porcelain=v1 -z --untracked-files=all --no-renames`), and `promoteAttempt` (the winning attempt's artifacts — `commit-info.md`, `issues.md`, `wiring.md`, `state_docs_used.md` — copied to the chunk/resolver dir on release).
|
|
45
|
+
- `scripts/dispatch/reconcile.mjs` — the reconcile projection: derived-timeout application, `dispatchable` (`chunk k-1` `done`/`accepted`), `groupResidue` (`all-units-terminal` / `failed-group-residue` / `terminal-group-open-chunks` / `open-chunks-outside-plan`), `deadGroups`, verdicts, `nextDeadline`; the ledger write path stays in `dispatch.mjs`.
|
|
24
46
|
- `scripts/dispatch/state-mirror.mjs` — ledger → `spec_pipeline_state.json` mismatch projection (units, chunks, groups) for the orchestrator's one-way repair.
|
|
25
|
-
- `scripts/dispatch/wait.mjs` — snapshot/diff engine and the foreground `wait` (
|
|
47
|
+
- `scripts/dispatch/wait.mjs` — snapshot/diff engine and the foreground `wait` (commits — `logs/HEAD`/`COMMIT_EDITMSG`, not the git index —, attempt artifacts, ledger, state, deadline), baseline seeding from `claim`, `refreshBaselines` (every ledger write by `dispatch.mjs` moves the `wait` and waker baselines past it, keeping sub-agent files as news; a running wait re-reads its baseline each poll), and the durable event file.
|
|
26
48
|
- `scripts/dispatch/waker.mjs` — the durable waker: `waker.lock` ownership, 30-second wait slices, lock renewal, relay after 120 timeouts, `waker.stop` disarm, and the event payload (`runId` checked by the parent).
|
|
27
|
-
- `scripts/dispatch/progress.mjs` — progress observation for live units (last commit / attempt-artifact / dirty-path mtimes) feeding `beat`.
|
|
28
|
-
- `scripts/dispatch/landing.mjs` — the single landing predicate (`landingInfo`): branch tip as a non-first parent of a first-parent merge on main, zero-commit branches excluded, returns `merge_commit`/`pre`/`range` or `commits_ahead_of_main`; also the lock-time `groupMergeGuard` and the all-waves `plannedChunksDone` used by `dispatch.mjs`.
|
|
49
|
+
- `scripts/dispatch/progress.mjs` — progress observation for live units (last commit / attempt-artifact / dirty-path / the chunk's `SPEC_DESIGN_G<G>_c<k>[_issue].md` mtimes in DESIGN_DIR or the worktree) feeding `beat`.
|
|
50
|
+
- `scripts/dispatch/landing.mjs` — the single landing predicate (`landingInfo`): branch tip as a non-first parent of a first-parent merge on main, zero-commit branches excluded, returns `merge_commit`/`pre`/`range` or `commits_ahead_of_main`; also the lock-time `groupMergeGuard` and the all-waves `plannedChunksDone` (implemented in `fold.mjs`, re-exported here) used by `dispatch.mjs`.
|
|
29
51
|
- `scripts/lib/wiring.ts` — the compact wiring rendering shared by `resolve_wiring.ts` and `resolver_prompt.ts`: the fixed Tier-1 category rules, the discrete non-category entries, and the lock-file rule (also exported as `TIER1_BASENAMES`/`isTier1`).
|
|
30
52
|
- `scripts/lib/shared_classes.ts` — the default shared-layer class definitions for F0 (`network.transport` / `database` / `preferences` only — no fourth class): doc/strong/negative keywords, path segments, and satisfied markers per class, plus the shared-root prefixes (`common/`/`shared/`/`core/`, with `pages/`, `features/`, `products/` and root-level roots hard-denied). A project may override only the keyword lists/segments/markers and prefixes via `shared_classes.json` (`.hometrans/` first, then the project root; an override that hard-denies everything falls back to the defaults with a warning) — project-specific naming is never hardcoded (deterministic; has tests).
|
|
31
53
|
- `scripts/lib/shared_docs.ts` — deterministic semantic-docs parsing for F0: the explicit doc-candidate resolution order (`.hometrans/<name>.md`, then the project root, lowercase before uppercase, `.hometrans/<NAME>.md` as the last resort), function-column-only row classification (never path/module names; `network.transport` requires a positive doc keyword AND a strong keyword — a strong hit only bypasses the negative words — while the other classes require positives with no negatives), per-row root resolution that also reports invalid rows with reasons (`missing_module_root` / `not_shared_root`; page-vetoed roots are `not_shared_root`), and database table extraction; no project naming is hardcoded (deterministic; has tests).
|
|
@@ -33,17 +55,19 @@
|
|
|
33
55
|
- `scripts/dispatch/timeouts.mjs` — `nextDeadline` over claimed/dispatched/live/orphaned/submitted and `buildDerived` for the next timeout projection.
|
|
34
56
|
- `scripts/lib/io.mjs` — shared plumbing: atomic JSON/file writes (temp + fsync + rename), BOM-tolerant JSON reads, `ensureDir`, and junction/case-safe `isMain`.
|
|
35
57
|
- `scripts/atomic_write.ts` — crash-safe file replacement (temp + fsync + rename, optional `.bak`) shared by the `.ts` scripts above.
|
|
36
|
-
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_wiring.ts`, `scripts/test_resolver_prompt.ts`, `scripts/test_git_baseline.ts`, `scripts/test_stage_design_inputs.ts`, `scripts/
|
|
37
|
-
- `scripts/test_shared_classes.ts`, `scripts/test_shared_docs.ts`, `scripts/test_scan_shared.ts`, `scripts/test_validate_shared_manifest.ts`, `scripts/test_shared_layer_docs.ts`, `scripts/test_shared_layer_e2e.ts` — the shared-layer (F0) tests: class-config defaults/overrides and the shared-root hard-deny, doc resolution and row classification, the candidate scan (members gate, strictly-earlier-wave inventory, partial database mode), done-manifest validation (base/campaign_id/dirty/page vetoes), the SKILL + references doc contracts, and the scan → manifest → validate end-to-end mini-campaign (run with `node --test <file>`).
|
|
58
|
+
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_wiring.ts`, `scripts/test_resolver_prompt.ts`, `scripts/test_git_baseline.ts`, `scripts/test_stage_design_inputs.ts`, `scripts/test_ensure_index.ts`, `scripts/test_ensure_index_real.ts`, `scripts/test_homegraph_docs.ts`, `scripts/test_branch_landed.ts`, `scripts/test_plan_waves.ts`, `scripts/test_deps_ready.ts`, `scripts/test_audit_claims.ts`, `scripts/test_atomic_write.ts`, `scripts/test_homecheck_scan.ts` — unit tests (run with `node --test <file>`).
|
|
59
|
+
- `scripts/test_shared_classes.ts`, `scripts/test_shared_docs.ts`, `scripts/test_scan_shared.ts`, `scripts/test_validate_shared_manifest.ts`, `scripts/test_shared_layer_docs.ts`, `scripts/test_shared_layer_e2e.ts`, `scripts/test_permission_index.ts`, `scripts/test_check_permissions.ts` — the shared-layer (F0) tests: class-config defaults/overrides and the shared-root hard-deny, doc resolution and row classification, the candidate scan (members gate, strictly-earlier-wave inventory, partial database mode), done-manifest validation (base/campaign_id/dirty/page vetoes), the SKILL + references doc contracts, and the scan → manifest → validate end-to-end mini-campaign, and the permission index's snapshot contract (schema, provenance, sorted unique names, a `desc` long enough for offline matching) with the index generator's fixture round-trip and `--check` drift detection, plus the docs-driven lookup, evidence-line and restricted/picker discipline asserted over `shared-layer.md` (run with `node --test <file>`).
|
|
38
60
|
- `scripts/test_dispatch_commands.mjs`, `scripts/test_dispatch_e2e.mjs`, `scripts/test_dispatch_evidence.mjs`, `scripts/test_dispatch_fold.mjs`, `scripts/test_dispatch_landing.mjs`, `scripts/test_dispatch_ledger.mjs`, `scripts/test_dispatch_plan.mjs`, `scripts/test_dispatch_progress.mjs`, `scripts/test_dispatch_reconcile.mjs`, `scripts/test_dispatch_wait.mjs`, `scripts/test_dispatch_waker.mjs`, `scripts/test_dispatch_worktree.mjs` — the dispatch ledger's unit and end-to-end tests: lock/CAS, fold, plan, evidence, the group-merge landing gate, reconcile, wait/waker, progress, worktree generations, and the mini-wave harness (run with `node --test <file>`).
|
|
39
61
|
- `references/specs.example.json` — example of the specs.json input format (the format is owned by the producing skill, a2h-spec-generate 的 publish-specs).
|
|
40
62
|
- `references/initialization.md` — I1–I4 verbatim (steps 1–12): input validation, the `plan_groups.ts` + `resolve_wiring.ts` precompute, environment prerequisites, one-time setup (git baseline, docs baseline), announcement.
|
|
41
63
|
- `references/coding-loop.md` — B1 verbatim: chunk pointers, the dispatch ledger protocol (`claim/intent/confirm/start/beat/submit/release/...`), the spec §11 event loop, the turn-end guard with `reconcile`/`wait`/`waker`, and the chunk dispatch contract with the so-id resume rule.
|
|
42
64
|
- `references/merge-queue.md` — B2 verbatim: the step-0 actual-write audit, generation-branch landing (`branch_landed --wt-gen`, `group-merge --landed` after the landing commit), the claim-first resolver recovery ladder (`resolver_prompt.ts`), and the wave-end wiring application.
|
|
43
|
-
- `references/
|
|
65
|
+
- `references/review-loop.md` — B4 verbatim: the per-group review state, the open/closed rule, the review-set selection, the one-batch reviewer dispatch with its exact fields, the evidence check, the serial fix rounds and the round rebuild.
|
|
66
|
+
- `references/resolver-prompt.md` — the conflict-resolver prompt template rendered by `scripts/resolver_prompt.ts`; placeholders are `{{G}}`, `{{UNIT_ID}}`, `{{WORKTREE}}`, `{{HMOS}}`, `{{CONFLICTS}}`, `{{GROUPS}}`, `{{WIRING}}`, `{{HOMEGRAPH_RULE}}`, `{{ISSUES_PATH}}`, `{{NOTES_PATH}}`, `{{BASE_HEAD}}`, `{{ATTEMPT}}` (the renderer fails closed on any leftover).
|
|
44
67
|
- `references/state-and-resume.md` — mid-flight detection (resume into an interrupted wave), `runId` + reconcile, one-way state repair, generation-aware `WT/g<G>r<n>` paths, and the state file contract (schema, sibling-file ownership, atomic writes, `.bak` restore).
|
|
45
68
|
- `references/execution-model.md` — the dispatch ledger contract: files, events, identity/CAS, the state machine, timeouts/`runId`, commands, reconcile output, `wait`/waker discipline, ledger integrity.
|
|
46
|
-
- `references/
|
|
69
|
+
- `references/post-loop.md` — after the wave loop verbatim: the Homecheck step, the runtime smoke gate and Finalization (steps 0–5), with the `post_homecheck` / `post_smoke` / `finalization` markers.
|
|
70
|
+
- `references/static-defect-gate.md` — the post-loop Homecheck check before the smoke gate: fixed plus migration rule sets, scan/fix rounds, mandatory error repair + advisory custom-warning judgement, the closing verification scan, the per-campaign `runId`, build-before-smoke rule, summary schema, and resume behavior.
|
|
47
71
|
- `references/legacy-cleanup.md` — the one-time runtime cleanup of retired `.hometrans` dispatch files on resume (exact filenames; runtime artifacts only).
|
|
48
72
|
- `references/final-report-template.md` — the Finalization summary report template (every section mandatory).
|
|
49
73
|
- `references/scripts.md` — this file.
|
|
@@ -17,6 +17,8 @@ sub-agent** (not background, not in the dispatch ledger; same protocol as B3).
|
|
|
17
17
|
| `shared_classes` | effective class config |
|
|
18
18
|
| `design_dir` | `DESIGN_DIR` (read-only) |
|
|
19
19
|
| `wiring_files` | filtered exact paths under the candidate module roots + `wiring_compact` |
|
|
20
|
+
| `entry_module` | the app's entry module: the `build-profile.json5` `modules[]` row with `type:"entry"` (when several, the one owning the ability the wave's specs name) |
|
|
21
|
+
| `entry_module_json5` / `entry_module_strings` | that module's `src/main/module.json5` and `src/main/resources/base/element/string.json`, repo-relative — or `absent` |
|
|
20
22
|
| `barrel_allowed` | `true` |
|
|
21
23
|
| `pre_f0` | `PRE_F0` |
|
|
22
24
|
| `engine_mode` | `ENGINE_MODE` |
|
|
@@ -31,6 +33,10 @@ sub-agent** (not background, not in the dispatch ledger; same protocol as B3).
|
|
|
31
33
|
`mode:"complete"`, append missing tables/DAOs to the existing `AppDatabase`,
|
|
32
34
|
never a second `getRdbStore`.
|
|
33
35
|
- `preferences`: get/set/delete + key constants.
|
|
36
|
+
- `permissions`: declare the permissions this wave's specs require in the
|
|
37
|
+
**entry** module's `module.json5` — see "Permissions (wave-scoped)" below.
|
|
38
|
+
It rides along with the same commit; it is never a manifest `modules[]`
|
|
39
|
+
entry of its own.
|
|
34
40
|
No pages/VM/components/business aggregation/route-table content.
|
|
35
41
|
3. Placement: only under `module_roots`/`ets_roots` from the candidate. Create
|
|
36
42
|
`ets_root` and subdirs if absent. Do not create HAR/HSP, do not edit
|
|
@@ -42,6 +48,10 @@ sub-agent** (not background, not in the dispatch ledger; same protocol as B3).
|
|
|
42
48
|
barrel, list each edited file in `wiring[]`** (the validator's diff
|
|
43
49
|
allowlist is `files[] ∪ wiring[] ∪ {barrel}`, and `files[]` may only contain
|
|
44
50
|
paths under `path`). Never use `export *` for the exports you add.
|
|
51
|
+
The same rule covers every `module.json5` and `resources/**/element/*.json`
|
|
52
|
+
you touch for permissions: they sit outside `path`, so they belong in
|
|
53
|
+
`wiring[]` (under the first `modules[]` entry — a reporting bucket, see
|
|
54
|
+
"Permissions (wave-scoped)"), never in `files[]`.
|
|
45
55
|
5. Commit exactly once: `infra(wave <K>): shared layer`; parent must be
|
|
46
56
|
`pre_f0`; no merge, no amend, no second commit. Leave the tree clean.
|
|
47
57
|
6. Write `manifest_path` with `schema:"spec_shared_manifest/v1"`, `campaign_id`,
|
|
@@ -64,6 +74,117 @@ sub-agent** (not background, not in the dispatch ledger; same protocol as B3).
|
|
|
64
74
|
9. A `requires_user_input` state from the semantic-docs step is not yours: the
|
|
65
75
|
orchestrator records it and continues.
|
|
66
76
|
|
|
77
|
+
## Permissions (wave-scoped)
|
|
78
|
+
|
|
79
|
+
F0's commit is the wave's one pre-W0 window on `module.json5`, so when F0 runs it
|
|
80
|
+
also declares the permissions this wave needs — once, up front — instead of
|
|
81
|
+
letting each group's `add-permission` wiring row patch the same file at B2.
|
|
82
|
+
|
|
83
|
+
The official docs are organised by capability, and a Kit's `申请<能力>权限` page is
|
|
84
|
+
that capability's source of truth. `references/permission-index.json` is the
|
|
85
|
+
**allowlist** — every name that exists, with its grant class, `level`, restricted
|
|
86
|
+
flag, `since`, group and a Chinese description — and the offline fallback when
|
|
87
|
+
the docs are not readable.
|
|
88
|
+
|
|
89
|
+
- **Scope**: only when F0 actually dispatches (this wave has shared candidates).
|
|
90
|
+
A skipped F0 (`members<2` / `all-satisfied` / `no-candidates` / `disabled`)
|
|
91
|
+
declares nothing: those permissions keep the existing B1 `add-permission`
|
|
92
|
+
wiring-row path (applied at B2, before B3's build). See *Known limitations*.
|
|
93
|
+
- **The wave's specs gate the set; the manifest only confirms it.** The
|
|
94
|
+
candidate set is what this wave's merged specs require (scenario text,
|
|
95
|
+
dependencies, technical notes). `AndroidManifest.xml` `uses-permission`
|
|
96
|
+
entries and `requestPermissions(...)` call sites — `manifest.json` when
|
|
97
|
+
`source_kind=uniapp` — are used only to confirm the Android name and the
|
|
98
|
+
owning module/ability behind a requirement the specs already state; they never
|
|
99
|
+
add a permission on their own. App-wide declarations this wave does not use
|
|
100
|
+
stay undeclared and go to `notes` as candidates for a later wave: an extra
|
|
101
|
+
`user_grant` declaration is an app-store privacy item even when it is never
|
|
102
|
+
requested.
|
|
103
|
+
- **Look the names up in the docs, then check them against the allowlist.**
|
|
104
|
+
1. Name the capability from the wave's specs (camera, precise location,
|
|
105
|
+
bluetooth scan, read media, contacts, …); the Android manifest only
|
|
106
|
+
confirms which capabilities the wave actually exercises.
|
|
107
|
+
2. `devecocli docs search "<capability> 权限 申请"` and read the Kit's
|
|
108
|
+
`申请<能力>权限` guide — e.g.
|
|
109
|
+
`…/Camera_Kit_相机服务/申请相机开发的权限/camera-preparation`,
|
|
110
|
+
`…/Location_Kit_位置服务/开发准备/申请位置权限开发指导/location-permission-guidelines`.
|
|
111
|
+
Read `…/应用权限组列表/app-permission-group-list` for the pairing rules
|
|
112
|
+
(a precise-location request always carries `LOCATION` **and**
|
|
113
|
+
`APPROXIMATELY_LOCATION`; coarse alone carries only the latter).
|
|
114
|
+
3. Check every candidate against `references/permission-index.json`: the name
|
|
115
|
+
must be there with the same spelling, and its `grant` / `restricted` /
|
|
116
|
+
`level` decide the entry's shape. An API page's `**需要权限**:` line is
|
|
117
|
+
supporting evidence only — many pages carry none (the camera API page has
|
|
118
|
+
zero).
|
|
119
|
+
4. Record one evidence line per declared permission in the manifest's `notes`:
|
|
120
|
+
`<android.permission.X> -> <ohos.permission.Y> | <documentId> | <grant>`.
|
|
121
|
+
No evidence line, no declaration.
|
|
122
|
+
5. Docs unavailable — `devecocli` missing, an index being rebuilt, or
|
|
123
|
+
`Document not found` after a docs update — match the capability against the
|
|
124
|
+
index's `desc` fields instead; still uncertain is `notes: unmapped`. Never
|
|
125
|
+
invent a name, never derive one from the Android spelling alone, and never
|
|
126
|
+
fall back to what the permission "should" be.
|
|
127
|
+
- **Only what a normal application may request.** Three rules the docs cannot
|
|
128
|
+
give you, because they describe migration intent rather than the API:
|
|
129
|
+
- a name on the `受限开放权限` (restricted / ACL) page is **never** declared,
|
|
130
|
+
even when a Kit guide names it: media reads, contacts, call log, system
|
|
131
|
+
window and whole-calendar are ACL, and a normal app is not granted them;
|
|
132
|
+
- a capability HarmonyOS exposes through a system picker or UI takes that path
|
|
133
|
+
with **no** declaration — media read (`PhotoViewPicker`), contact selection,
|
|
134
|
+
audio pick (`AudioViewPicker`), placing a call (`tel:` UI);
|
|
135
|
+
- publishing a notification needs no permission: `requestEnableNotification()`
|
|
136
|
+
is runtime consent, which is the chunk coder's work.
|
|
137
|
+
When the only documented path is one of these, record one machine-readable
|
|
138
|
+
judgement line per name in the manifest's `notes` —
|
|
139
|
+
`<ohos.permission.Y> | skip | <documentId> | restricted|picker|none` — and
|
|
140
|
+
stop: the build would pass, the store review would not. The B2 wiring step
|
|
141
|
+
(`scripts/check_permissions.ts`) parses these lines, so a name you judged
|
|
142
|
+
here is never re-added and never re-counted as missing in a later wave. A
|
|
143
|
+
judgement with no HarmonyOS name has nothing to hold — the wiring check's
|
|
144
|
+
required set is built from `ohos.permission.*` names in the specs.
|
|
145
|
+
- the same discipline decides the shape the wiring check applies when F0 did
|
|
146
|
+
not run: an index entry that is `restricted` **or** whose `level` is not
|
|
147
|
+
`normal` is never declared, whatever a spec says.
|
|
148
|
+
- **Target**: `entry_module_json5` — the entry module's `module.json5` (HAR/HSP
|
|
149
|
+
modules cannot declare permissions). Append to `requestPermissions` only:
|
|
150
|
+
never remove or rewrite an existing entry, and skip a name that is already
|
|
151
|
+
declared there.
|
|
152
|
+
- **`user_grant` entries** need a `reason` that points at a same-module string
|
|
153
|
+
resource (`$string:<key>`) and a `usedScene` whose `abilities[]` names an
|
|
154
|
+
ability that already exists in that `module.json5`; add the `reason` key to
|
|
155
|
+
`entry_module_strings`. When that file is `absent`, do not create it: record
|
|
156
|
+
`notes: string_resource_absent` and skip the `user_grant` entries (a `reason`
|
|
157
|
+
that resolves to nothing is worse than a later wave adding it). `system_grant`
|
|
158
|
+
entries need neither.
|
|
159
|
+
- **Not yours**: runtime consent. `requestPermissionsFromUser` is the chunk
|
|
160
|
+
coder's work — F0 declares, it never requests at runtime.
|
|
161
|
+
- **Manifest**: every `module.json5` / `resources/**/element/*.json` you edit
|
|
162
|
+
goes into `wiring[]` — under the **first `modules[]` entry** (a reporting
|
|
163
|
+
bucket, see below) — never into `files[]`.
|
|
164
|
+
- **Failure is fail-soft**: an unreadable `module.json5`, a capability you cannot
|
|
165
|
+
map, or a missing ability is a `notes` entry — the primitives still land and
|
|
166
|
+
the wave still proceeds to W0.
|
|
167
|
+
|
|
168
|
+
### Known limitations
|
|
169
|
+
|
|
170
|
+
- **The wiring row is a reporting bucket, not an ownership claim.** `modules[]`
|
|
171
|
+
describes shared primitive modules and every entry's `module_root` must be a
|
|
172
|
+
shared candidate, so the entry module has no entry of its own. The permission
|
|
173
|
+
files are listed under the first `modules[]` entry's `wiring[]`; the validator
|
|
174
|
+
accepts them because `module.json5` and `resources/**/element/*.json` are
|
|
175
|
+
Tier-1 `state.config.wiring_files` entries, which short-circuit the
|
|
176
|
+
module-local check. Never read module ownership out of that row.
|
|
177
|
+
- **The dispatch gate is about the shared layer, not about permissions.** A
|
|
178
|
+
single-group wave (`members<2`) or an `all-satisfied` wave never runs F0, so
|
|
179
|
+
its permissions are declared at B2 through the `add-permission` wiring row
|
|
180
|
+
instead — and the B2 wiring check (`scripts/check_permissions.ts`) applies the
|
|
181
|
+
same rules there (index `restricted` / `level`, no picker / notification
|
|
182
|
+
names), so a skipped F0 changes the timing, not what may be declared.
|
|
183
|
+
- **The allowlist is not a build-time check.** It is a prompt contract plus
|
|
184
|
+
`scripts/test_permission_index.ts`, and the evidence line is what makes a
|
|
185
|
+
declaration reviewable; a name that slips through still fails at B3's build and
|
|
186
|
+
is fixed there.
|
|
187
|
+
|
|
67
188
|
## Manifest example
|
|
68
189
|
|
|
69
190
|
```json
|
|
@@ -226,10 +347,12 @@ false, and record the manual follow-up note instead.
|
|
|
226
347
|
(independent of `DOCS_MODE`).
|
|
227
348
|
2. If `DOCS_MODE != off`, run
|
|
228
349
|
`/a2h-module-semantic-docs <HMOS> --engine-mode <ENGINE_MODE>
|
|
229
|
-
--incremental preserve --scope project-source`
|
|
230
|
-
text never enters the orchestrator's context), or the script fallback.
|
|
231
|
-
|
|
232
|
-
the
|
|
350
|
+
--homegraph-index <ready|missing> --incremental preserve --scope project-source`
|
|
351
|
+
**via a sub-agent** (sub-skill text never enters the orchestrator's context), or the script fallback.
|
|
352
|
+
Pass `--homegraph-index ready` only when this round's `<HMOS>` index is usable; otherwise pass
|
|
353
|
+
`missing`. Never omit the flag from a pipeline call — the skill's `auto` default is for standalone
|
|
354
|
+
callers and would let the sub-agent probe/init/sync the shared index. This is an incremental
|
|
355
|
+
visibility catch-up for the code F0 just added; B5 remains the wave's single semantic-docs refresh.
|
|
233
356
|
3. If `git status --porcelain -- .hometrans` is non-empty, add one
|
|
234
357
|
`docs(wave <K>): refresh semantic docs after shared layer` commit:
|
|
235
358
|
`git add -u .hometrans`; add a copied root-only file only when
|
|
@@ -15,14 +15,14 @@ Before starting a wave — before running S0 — if any group in state has `wave
|
|
|
15
15
|
ledger itself is never deleted).
|
|
16
16
|
3. Apply `references/legacy-cleanup.md` once if this project ran the retired dispatch scripts.
|
|
17
17
|
4. Re-establish the wave plan: `node <skill-dir>/scripts/dispatch.mjs <HMOS> init --wave <K>
|
|
18
|
-
--concurrency <WAVE_WIDTH> --new-run`. The **mid-flight reset**
|
|
19
|
-
|
|
20
|
-
`
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
plain `init --wave <K>` under the same `runId` (it appends a
|
|
25
|
-
Never use `--new-run` between normal waves.
|
|
18
|
+
--concurrency <WAVE_WIDTH> --new-run --resume`. The **mid-flight reset** gives this session its own
|
|
19
|
+
`runId`, so every old-run active unit immediately gets `abandon(dead-run)` / `orphan(dead-run)` on the
|
|
20
|
+
first `reconcile`. `--resume` marks it as the same campaign: a group of the wave that already reached
|
|
21
|
+
merged / done / failed keeps that status and its units (only the unfinished groups start over), and
|
|
22
|
+
`spec_pipeline_state.json` stays in place, with an audit copy under `spec_pipeline_archive/`. Without
|
|
23
|
+
`--resume`, `--new-run` is a brand-new campaign: it resets every reused group id and moves the state
|
|
24
|
+
to the archive. A **normal later wave** is plain `init --wave <K>` under the same `runId` (it appends a
|
|
25
|
+
plan and is a no-op when identical). Never use `--new-run` between normal waves.
|
|
26
26
|
5. Run `dispatch.mjs <HMOS> reconcile`, then repair `spec_pipeline_state.json` one way (ledger → state:
|
|
27
27
|
terminal unit → chunk `done`/`failed`; group status; chunk rows) before dispatching anything. Position
|
|
28
28
|
is re-derived from the ledger + git, never from a dead session's live bookkeeping.
|
|
@@ -45,27 +45,45 @@ unrecorded.
|
|
|
45
45
|
the worktree's git log and cannot apply to a worktree-less member; this is the dispatch-hold state):
|
|
46
46
|
route by the `deps_ready.ts` verdict — `ready` → the release procedure (the B1 deps release sweep),
|
|
47
47
|
`held` → wait for the release trigger;
|
|
48
|
-
- **merged** (`branch_landed.ts --wt-gen <n>` → `landed: true`, or state status `merged`/`done`) →
|
|
49
|
-
(first ensuring the group's B4 range is recorded — a crash between the landing commit and the state
|
|
48
|
+
- **merged** (`branch_landed.ts --wt-gen <n>` → `landed: true`, or state status `merged`/`done`) →
|
|
49
|
+
skip **only when every planned chunk is `done`/`accepted`** (first ensuring the group's B4 range is recorded — a crash between the landing commit and the state
|
|
50
50
|
write leaves it unrecorded; take the script's `merge_commit`/`range` and write `group-merge <G>
|
|
51
51
|
--landed <merge_commit>` if the ledger has not). `group-merge` is idempotent: an already-recorded
|
|
52
52
|
landing returns `{duplicate:true,verified:true}`, and a legacy `merged` row with no landing returns
|
|
53
53
|
`{duplicate:true,verified:false,legacy:true}` — both append nothing. A legacy answer carrying
|
|
54
54
|
`unlanded:true` is **not** a skip: the row claims `merged` but the generation branch still holds
|
|
55
|
-
commits that never landed
|
|
55
|
+
commits that never landed. Fail it soft (`group-fail <G>`) and list it in the
|
|
56
56
|
final report; never continue as if its code were on main. A `MERGE_HEAD` left by the crashed landing
|
|
57
57
|
is aborted first (see below); `group-merge` refuses while it exists.
|
|
58
|
+
A `merged`/`done` row with **an open planned chunk** is not a skip either: it is a premature landing.
|
|
59
|
+
Run `group-reopen <G> --base <current main HEAD>` — new generation, finished chunks
|
|
60
|
+
kept, the rest (and the resolver) reopened and the group re-admitted to the plan — repair state one way
|
|
61
|
+
(group `coding`, chunk rows `pending`, those specs back to stage `A`/`B` as their design dictates), and
|
|
62
|
+
continue B1. When the row has no recorded landing, `group-reopen` verifies generation `wtGen` first and
|
|
63
|
+
refuses `landing-unrecorded`/`landing-unverifiable` rather than assume the finished chunks reached main.
|
|
64
|
+
Never mark the open chunks done to silence the completion check.
|
|
58
65
|
- **coding incomplete** (some chunk not `done`) → before refreshing the index or dispatching, run
|
|
59
66
|
`node <skill-dir>/scripts/stage_design_inputs.ts <HMOS> WT/g<G>r<n>` (idempotent) and re-upsert this
|
|
60
67
|
wave's `design_map.md` row if it is absent (a crash between W0 step 3 and step 4 leaves the
|
|
61
|
-
worktree/staging incomplete). Then **
|
|
62
|
-
(`node <skill-dir>/scripts/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
worktree/staging incomplete). Then **sync the shared main index once per resume, before the first dispatch**
|
|
69
|
+
(`node <skill-dir>/scripts/ensure_index.ts <HMOS> --sync`, trigger `resume`; skip when
|
|
70
|
+
`ENGINE_MODE=off`). A resume with N unfinished groups must not sync N times. There is no worktree
|
|
71
|
+
index. The `<ANDROID>` index is static and verified once at I2; do not re-open it on resume.
|
|
72
|
+
**This run's JSON is the only source** for the coder's `hmos-index-ready` /
|
|
73
|
+
`engine-degraded-reason` (a resume has no wave log) — never assume W0's index is still usable.
|
|
74
|
+
If `state.engine_blocked` is set, retry **that index only** with `--create --sync`
|
|
75
|
+
(`engine_blocked.index === "android"` → `<ANDROID>`, otherwise `<HMOS>`), trigger `resume`.
|
|
76
|
+
`--sync` alone cannot recover an index whose db was never created (it returns
|
|
77
|
+
`not_initialized`), so the blocked path always passes `--create`. On exit 0 (`action` in
|
|
78
|
+
`init|sync|index|none`) clear `engine_blocked` and reset `engine.<that index>.degraded=false`
|
|
79
|
+
(never touch the other index); a second failure keeps the flag and hard-stops again. A normal
|
|
80
|
+
resume (no `engine_blocked`) keeps the single `<HMOS> --sync` above; on exit 0 (`action` in
|
|
81
|
+
`init|sync|index|none`) it also resets `engine.hmos.degraded=false` and clears `circuit_open`
|
|
82
|
+
(never touch the other index). Then claim the unit and dispatch
|
|
66
83
|
that group's next chunk in background (position from the worktree's so-id commit log);
|
|
67
|
-
- **coding complete & unmerged** (all chunks `done`, branch unlanded) → `queue-merge <G>` (or
|
|
68
|
-
queued) in group order.
|
|
84
|
+
- **coding complete & unmerged** (all chunks `done`/`accepted`, branch unlanded) → `queue-merge <G>` (or
|
|
85
|
+
leave it queued) in group order. A `closed`/`abandoned` chunk blocks the queue → `group-fail <G>`
|
|
86
|
+
instead (it can never land).
|
|
69
87
|
|
|
70
88
|
**F0 anchors (the no-`wave_meta` re-entry).** F0's idempotency is file-based: a
|
|
71
89
|
`wave_<K>/shared_manifest.json` with `status: "done"` and a matching `campaign_id` is re-validated with
|
|
@@ -120,13 +138,23 @@ commit as `wiring`; any other dirt stops the run.
|
|
|
120
138
|
`plan_groups.ts --emit-state`, updated by `plan_waves.ts` (wave assignment), and updated by the
|
|
121
139
|
orchestrator after every stage — including the B1⇄B2 bookkeeping: chunk statuses (`pending` →
|
|
122
140
|
`in_flight` → `done`/`failed`), group statuses (`pending` → `coding`/`coded` → `merged` → `done`, or
|
|
123
|
-
`failed`), chunk pointers `groups[G].chunks[k].spec_file/design_file/ui_sequence`,
|
|
141
|
+
`failed`; a premature `merged` is repaired by `group-reopen` → `pending` on the next generation), chunk pointers `groups[G].chunks[k].spec_file/design_file/ui_sequence`,
|
|
124
142
|
`config.design_granularity`, each group's coder snapshot `audit: { base, tip }` (additive group-level
|
|
125
143
|
field — the frozen per-spec field names stay untouched), `coding_base` (the release-fork main HEAD; the
|
|
126
144
|
audit base cache and the so-id resume anchor for held-then-released members, overwritten on re-release),
|
|
127
145
|
`review: { round, open, scenarios, carry_over, fix_commits }` (B4's per-group review state — which groups
|
|
128
146
|
the next round re-reviews and fixes; a resume inside B4 continues from `review.round` with the same
|
|
129
|
-
selection rule), and `wave`/`G`. The
|
|
147
|
+
selection rule), and `wave`/`G`. The additive top-level `engine: { android, hmos, lastSyncAt }`
|
|
148
|
+
(each index's `path`/`initialized`/`lastIndexed`/`fileCount`/`degraded`/`reason`; the top-level
|
|
149
|
+
`lastSyncAt = {trigger, at, action, durationMs}`, never duplicated per index — per-index history
|
|
150
|
+
lives in the wave log; `lastSyncAt` is a cache and is excluded from the resume config comparison).
|
|
151
|
+
`path` = the `repo` field of the JSON line, `initialized` = the JSON `initialized` (local db present
|
|
152
|
+
**and** its `projectPath` resolves to that repo). Also `engine_blocked: { index: "hmos" | "android",
|
|
153
|
+
reason, at } | null` — written only under `ENGINE_MODE=required`, cleared by a successful retry of
|
|
154
|
+
that index. The wave start (W0 2b, beside the `wave_meta.json` write) records that opening `engine`
|
|
155
|
+
snapshot, and every `ensure_index` invocation appends `{trigger, action, ok, lastIndexed, durationMs}`
|
|
156
|
+
to the wave log — `reason === "sync_incomplete"` is booked degraded even when the JSON's
|
|
157
|
+
`degraded` is false. The dispatch truth lives only in `<HMOS>/.hometrans/dispatch/`, written only by
|
|
130
158
|
`dispatch.mjs`:
|
|
131
159
|
|
|
132
160
|
- `ledger.jsonl` — the append-only scheduling truth (events in `references/execution-model.md`);
|
|
@@ -144,9 +172,12 @@ writes `findings.json`, the dispatched gate sub-agent writes `summary.json`; the
|
|
|
144
172
|
is unchanged. Its outcome is mirrored in the additive top-level `post_homecheck` field (`status`,
|
|
145
173
|
`errorsBefore`, `errorsAfter`, `warningsBefore`, `warningsAfter`, `rounds`, `build`, `at` — a `skipped`
|
|
146
174
|
write carries `note` instead of the counts and happens at I2, without a dispatch and without touching
|
|
147
|
-
`.hometrans/homecheck/`).
|
|
148
|
-
|
|
149
|
-
|
|
175
|
+
`.hometrans/homecheck/`). A non-zero `warningsAfter` is normal: migration-set warnings are advisory, so
|
|
176
|
+
the gate may leave some by judgement (each with its reason in `homecheck-fix-report.md`). The mirror —
|
|
177
|
+
not `summary.json` — is the completion authority for resume. The smoke gate writes no state of its own;
|
|
178
|
+
its verdict is mirrored in the additive top-level `post_smoke` field (`verdict`, `at`) before
|
|
179
|
+
Finalization. Finalization step 0 requires both mirrors — never `summary.json` or the final report.
|
|
180
|
+
Per-spec rows keep the v1 field names (`status`/`stage`/`design_file`/`commit`) — frozen,
|
|
150
181
|
do not rename (external tooling reads this file); `design_file` on a spec is the chunk design that governs
|
|
151
182
|
it; `stage` vocabulary is exactly `A | B | B2 | C`.
|
|
152
183
|
|
|
@@ -166,7 +197,7 @@ both markers correctly count as unsatisfied for dependency release.
|
|
|
166
197
|
detection, which re-derives chunk/merge position from git/ledger — and list the restore in the final
|
|
167
198
|
report. Never delete the ledger to "fix" a parse error — that under-counts active units; restore the
|
|
168
199
|
state from `.bak` and re-derive instead. If the state exists, verify `config` matches the resolved inputs
|
|
169
|
-
— including `config.design_granularity === "chunk"` — (diverged → stop; the I2 probe
|
|
200
|
+
— including `config.design_granularity === "chunk"` — (diverged → stop; the I2 probe results `state_docs_mode` / `api_docs_mode` are excluded), skip `done`/`failed` groups, and
|
|
170
201
|
resume the wave loop. A legacy state seeded before F0 carries no `shared_layer`/`source_kind` — resolve
|
|
171
202
|
the defaults (`auto`/`android`) and continue, never a divergence stop; once the fields exist they are
|
|
172
203
|
input-divergence items compared like the others. Designs are per-chunk and design-once: a chunk's
|
|
@@ -180,3 +211,38 @@ fresh` creates the next generation and `--mode reuse` resets the current one in
|
|
|
180
211
|
already removes every older generation (its `cleaned` field lists them). At C, clean the **current**
|
|
181
212
|
generation: `git -C <HMOS> worktree remove WT/g<G>r<wtGen>` (retry once, then `--force`, then
|
|
182
213
|
`git worktree prune`) and `git branch -D specpipe/g<G>r<wtGen>`.
|
|
214
|
+
|
|
215
|
+
## After the wave loop
|
|
216
|
+
|
|
217
|
+
`{"wave": null, "done": true}` — or a resume with every group terminal — never enters Finalization
|
|
218
|
+
directly (not a valid resume shortcut). Order: Homecheck → smoke gate → Finalization, each gated by its
|
|
219
|
+
marker.
|
|
220
|
+
|
|
221
|
+
- `state.post_homecheck` absent → run the gate (or write the I2 step 8b `skipped` mirror). A recorded skip
|
|
222
|
+
is not retried; an absent marker is not a pass.
|
|
223
|
+
- `state.post_smoke` absent → run the smoke gate (or record `SKIPPED_HOMECHECK_BUILD_FAILED`).
|
|
224
|
+
- Both present → Finalization step 0 passes; `state.finalization.homecheck` / `smoke` copy the two values.
|
|
225
|
+
|
|
226
|
+
**Carried-only exemption.** A round in which every spec was carried over unchanged (`plan_groups.ts`
|
|
227
|
+
seeds no group and writes `finalization = { done: true, final_build: "SKIPPED", smoke: "SKIPPED",
|
|
228
|
+
carried_only: true }`, stdout `carried_only: true`) recodes nothing: there is no wave loop, so Homecheck, the
|
|
229
|
+
smoke gate and Finalization are **not** re-run and `post_homecheck` / `post_smoke` are never written. That
|
|
230
|
+
is the explicit exemption, not a missing marker: `check_spec_pipeline_done.mjs` reports it done with
|
|
231
|
+
`carried_only: true, markers_exempt: true`. It applies only to that seed — a campaign with any group needs
|
|
232
|
+
both markers, whatever flag its `finalization` carries.
|
|
233
|
+
|
|
234
|
+
## Completion evidence
|
|
235
|
+
|
|
236
|
+
`check_spec_pipeline_done.mjs` does not take `status: done` and `finalization.done` alone for a campaign
|
|
237
|
+
seeded with `config.evidence_version >= 1` (plan_groups `--emit-state` sets it). Each step must also have
|
|
238
|
+
left its output on disk, which a skipped step cannot have:
|
|
239
|
+
|
|
240
|
+
- **B4** — every done group has `review.round >= 1` and a non-empty `spec_group_<G>/review-round_1/`.
|
|
241
|
+
- **B5** — every wave with a done group has `wave_<K>/docs_refresh.json` (`{wave, mode, result, at}`).
|
|
242
|
+
- **C** — every done group has its `commit`, and no `specpipe/g<G>r*` branch is left.
|
|
243
|
+
- **Homecheck** — `finalization.homecheck` holds the gate's result (a fail-soft result counts; absent or
|
|
244
|
+
`not_run` does not).
|
|
245
|
+
|
|
246
|
+
Any gap reports the campaign unfinished (exit 1, `evidence_gaps`). Campaigns seeded before the rule keep
|
|
247
|
+
the old verdict. A carried-only campaign (above) coded no group, so none of these traces is required of it —
|
|
248
|
+
the Homecheck line included.
|