@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
|
@@ -6,39 +6,50 @@
|
|
|
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, `<HMOS>` at I2/W0/B2/B3/B4/resume): `--create` initializes a missing local index, `--sync` refreshes an existing one unconditionally (`homegraph status` reads git's uncommitted set, so it reports "up to date" after a pipeline commit while the index is behind HEAD), `index --inplace` is the rebuild fallback, and a corrupt db is renamed to `.homegraph.corrupt-<ts>.db` before a fresh `init` (never deleted). Every failed `init`/`index` is re-read first: the engine can exit non-zero after the 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 live holder (identified or not) returns `lock_busy` without killing, unlocking, or rebuilding — on 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`). A nonexistent path is `repo_missing`. `--engine-mode off` spawns nothing and returns `action:"skip", reason:"engine_off"` (and touches no file, not even `.gitignore`). A linked worktree is refused (`not_main_checkout`), as is an index that resolves to an ancestor (`index_not_local`); an explicit path is literal, so a monorepo subdirectory gets its own index. Output is one JSON line (`ok/action/reason/degraded/initialized/attempts/reaped/projectPath/lastIndexed/fileCount/indexState/builtWithVersion/durationMs/detail`); `initialized` = local db present **and** the status `projectPath` resolves to this repo; `repo` is `state.engine.<index>.path`. Exit 0 usable (incl. `none`/`skip`/`sync_incomplete`), 1 degraded, 2 usage. Timeouts: `init` 300000 ms, `sync`/`index` 600000 ms, `status` 120000 ms (`--init-timeout-ms`/`--timeout-ms`/`--status-timeout-ms`).
|
|
10
10
|
- `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).
|
|
11
|
+
- `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).
|
|
12
|
+
- `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)`), 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 (`doc_source`/`declared_by` record the source actually used; an empty database doc does not suppress the later sources), and scans each candidate module root for satisfied markers in tracked `.ets`/`.ts` sources only — comments blanked and string/template/regex bodies masked by a small lexer, so `${...}` interpolation code stays visible and a regex body never unbalances an interpolation; markers are identifier-bounded, and `network.transport` needs a marker on an executable-export line (deterministic; has tests).
|
|
13
|
+
- `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; 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`), and `HEAD == docs_commit ?? commit` — or, with `--resume`, a descendant HEAD with a warning (deterministic; has tests).
|
|
11
14
|
- `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).
|
|
15
|
+
- `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).
|
|
12
16
|
- `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.
|
|
13
|
-
- `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 (
|
|
17
|
+
- `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).
|
|
14
18
|
- `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).
|
|
15
|
-
- `scripts/
|
|
16
|
-
- `scripts/
|
|
19
|
+
- `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).
|
|
20
|
+
- `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).
|
|
21
|
+
- `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).
|
|
22
|
+
- `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).
|
|
17
23
|
- `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.
|
|
18
|
-
- `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.
|
|
24
|
+
- `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.
|
|
19
25
|
- `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).
|
|
20
|
-
- `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).
|
|
21
|
-
- `scripts/dispatch/reconcile.mjs` — the reconcile projection: derived-timeout application, `dispatchable
|
|
26
|
+
- `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).
|
|
27
|
+
- `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`.
|
|
22
28
|
- `scripts/dispatch/state-mirror.mjs` — ledger → `spec_pipeline_state.json` mismatch projection (units, chunks, groups) for the orchestrator's one-way repair.
|
|
23
|
-
- `scripts/dispatch/wait.mjs` — snapshot/diff engine and the foreground `wait` (
|
|
29
|
+
- `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.
|
|
24
30
|
- `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).
|
|
25
|
-
- `scripts/dispatch/progress.mjs` — progress observation for live units (last commit / attempt-artifact / dirty-path mtimes) feeding `beat`.
|
|
26
|
-
- `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`.
|
|
31
|
+
- `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`.
|
|
32
|
+
- `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`.
|
|
27
33
|
- `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`).
|
|
28
34
|
- `scripts/dispatch/worktree.mjs` — generation-aware worktree plumbing: `WT/g<G>r<n>` / `specpipe/g<G>r<n>`, `provisionGroup` (rebuilds a stale branch at the requested base), `resetGroup` (reuse), `cleanupGenerations`, and `git`/`gitRaw`.
|
|
29
35
|
- `scripts/dispatch/timeouts.mjs` — `nextDeadline` over claimed/dispatched/live/orphaned/submitted and `buildDerived` for the next timeout projection.
|
|
36
|
+
- `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).
|
|
37
|
+
- `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).
|
|
30
38
|
- `scripts/lib/io.mjs` — shared plumbing: atomic JSON/file writes (temp + fsync + rename), BOM-tolerant JSON reads, `ensureDir`, and junction/case-safe `isMain`.
|
|
31
39
|
- `scripts/atomic_write.ts` — crash-safe file replacement (temp + fsync + rename, optional `.bak`) shared by the `.ts` scripts above.
|
|
32
|
-
- `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/
|
|
40
|
+
- `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>`).
|
|
41
|
+
- `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>`).
|
|
33
42
|
- `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>`).
|
|
34
43
|
- `references/specs.example.json` — example of the specs.json input format (the format is owned by the producing skill, a2h-spec-generate's publish-specs).
|
|
35
44
|
- `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.
|
|
36
45
|
- `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.
|
|
37
46
|
- `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.
|
|
38
|
-
- `references/
|
|
47
|
+
- `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.
|
|
48
|
+
- `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).
|
|
39
49
|
- `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).
|
|
40
50
|
- `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.
|
|
41
|
-
- `references/
|
|
51
|
+
- `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.
|
|
52
|
+
- `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.
|
|
42
53
|
- `references/legacy-cleanup.md` — the one-time runtime cleanup of retired `.hometrans` dispatch files on resume (exact filenames; runtime artifacts only).
|
|
43
54
|
- `references/final-report-template.md` — the Finalization summary report template (every section mandatory).
|
|
44
55
|
- `references/scripts.md` — this file.
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# State persistence, mid-flight resume, and the state file contract
|
|
2
|
+
|
|
3
|
+
Apply this file **verbatim** on any resume (a state file exists, or a wave was interrupted) and whenever
|
|
4
|
+
the state file must be read, restored, or compared with the resolved inputs.
|
|
5
|
+
|
|
6
|
+
## Mid-flight detection (resume into an interrupted wave)
|
|
7
|
+
|
|
8
|
+
Before starting a wave — before running S0 — if any group in state has `wave != null` and `status` not in
|
|
9
|
+
{done, failed}, that wave is interrupted — do NOT start the wave loop fresh. Re-enter it directly.
|
|
10
|
+
**Ledger reset on resume (first, before any re-dispatch):**
|
|
11
|
+
|
|
12
|
+
1. Disarm the waker: write `<HMOS>/.hometrans/dispatch/waker.stop` (idempotent; the waker's `exited`
|
|
13
|
+
event is optional).
|
|
14
|
+
2. Snapshot the ledger: `dispatch/ledger.jsonl` → `dispatch/ledger.resumed-<ts>.jsonl` (audit trail; the
|
|
15
|
+
ledger itself is never deleted).
|
|
16
|
+
3. Apply `references/legacy-cleanup.md` once if this project ran the retired dispatch scripts.
|
|
17
|
+
4. Re-establish the wave plan: `node <skill-dir>/scripts/dispatch.mjs <HMOS> init --wave <K>
|
|
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
|
+
5. Run `dispatch.mjs <HMOS> reconcile`, then repair `spec_pipeline_state.json` one way (ledger → state:
|
|
27
|
+
terminal unit → chunk `done`/`failed`; group status; chunk rows) before dispatching anything. Position
|
|
28
|
+
is re-derived from the ledger + git, never from a dead session's live bookkeeping.
|
|
29
|
+
|
|
30
|
+
**"Merged" = `branch_landed.ts`**, never `merge-base --is-ancestor` (a zero-commit branch is trivially an
|
|
31
|
+
ancestor). Check the group's current generation: `node <skill-dir>/scripts/branch_landed.ts <HMOS> <G>
|
|
32
|
+
--wt-gen <wtGen>`; `landed:true` also returns the landing's `pre..range` for a crash that left B4's range
|
|
33
|
+
unrecorded.
|
|
34
|
+
|
|
35
|
+
- **No `wave_<K>/wave_meta.json`** → the crash happened before W0: re-enter F0
|
|
36
|
+
idempotently (`shared_manifest.json` / `shared_inflight.json` /
|
|
37
|
+
`campaign_id`), then W0 for the groups whose `state.wave == K`
|
|
38
|
+
(their worktrees are created/classified by W0).
|
|
39
|
+
- **wave_meta.json exists** → read it for WAVE_BASE/members and classify every member:
|
|
40
|
+
- **Any group with a done chunk whose `specs[].design_file` is empty (run this FIRST, before the
|
|
41
|
+
branches below)** → look up `<DESIGN_DIR>/SPEC_DESIGN_G<G>_c<k>.md`; if it exists, backfill
|
|
42
|
+
`state.specs[].design_file` (basename) and `stage: "A"`; otherwise record a warning in the wave log
|
|
43
|
+
(do not fail the group);
|
|
44
|
+
- **no worktree** (state `pending` ∧ `WT/g<G>r<n>` absent on disk — the coding-incomplete branch reads
|
|
45
|
+
the worktree's git log and cannot apply to a worktree-less member; this is the dispatch-hold state):
|
|
46
|
+
route by the `deps_ready.ts` verdict — `ready` → the release procedure (the B1 deps release sweep),
|
|
47
|
+
`held` → wait for the release trigger;
|
|
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
|
+
write leaves it unrecorded; take the script's `merge_commit`/`range` and write `group-merge <G>
|
|
51
|
+
--landed <merge_commit>` if the ledger has not). `group-merge` is idempotent: an already-recorded
|
|
52
|
+
landing returns `{duplicate:true,verified:true}`, and a legacy `merged` row with no landing returns
|
|
53
|
+
`{duplicate:true,verified:false,legacy:true}` — both append nothing. A legacy answer carrying
|
|
54
|
+
`unlanded:true` is **not** a skip: the row claims `merged` but the generation branch still holds
|
|
55
|
+
commits that never landed. Fail it soft (`group-fail <G>`) and list it in the
|
|
56
|
+
final report; never continue as if its code were on main. A `MERGE_HEAD` left by the crashed landing
|
|
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.
|
|
65
|
+
- **coding incomplete** (some chunk not `done`) → before refreshing the index or dispatching, run
|
|
66
|
+
`node <skill-dir>/scripts/stage_design_inputs.ts <HMOS> WT/g<G>r<n>` (idempotent) and re-upsert this
|
|
67
|
+
wave's `design_map.md` row if it is absent (a crash between W0 step 3 and step 4 leaves the
|
|
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. Then claim the unit and dispatch
|
|
81
|
+
that group's next chunk in background (position from the worktree's so-id commit log);
|
|
82
|
+
- **coding complete & unmerged** (all chunks `done`/`accepted`, branch unlanded) → `queue-merge <G>` (or
|
|
83
|
+
leave it queued) in group order. A `closed`/`abandoned` chunk blocks the queue → `group-fail <G>`
|
|
84
|
+
instead (it can never land).
|
|
85
|
+
|
|
86
|
+
**F0 anchors (the no-`wave_meta` re-entry).** F0's idempotency is file-based: a
|
|
87
|
+
`wave_<K>/shared_manifest.json` with `status: "done"` and a matching `campaign_id` is re-validated with
|
|
88
|
+
`validate_shared_manifest.ts --resume` using **its own `base`** (never trust self-report; a recorded `docs_commit`
|
|
89
|
+
is checked against HEAD and both commits must carry the canonical F0 subjects; `--resume` tolerates a descendant
|
|
90
|
+
HEAD with a warning, a non-descendant fails, and any unrecorded F0-subject commit in `<commit>..HEAD` fails as
|
|
91
|
+
`unrecorded F0 commit: <sha>`). **Docs catch-up (before W0):** after a done manifest passes revalidation, run the
|
|
92
|
+
docs refresh/visibility procedure (`references/shared-layer.md` → Docs refresh / visibility) **only when
|
|
93
|
+
`HEAD == manifest.commit`** (no recorded `docs_commit`), `docs_refreshed !== true`, and
|
|
94
|
+
`wave_<K>/wave_meta.json` is absent; persist `docs_refreshed`/`docs_commit` into the manifest. If `HEAD` is
|
|
95
|
+
**advanced** beyond the recorded `commit`/`docs_commit`, do not create a docs commit and run nothing that dirties
|
|
96
|
+
the tree — leave `docs_refreshed:false`, record a manual follow-up note, and continue with `WAVE_BASE = HEAD`.
|
|
97
|
+
A `skipped` manifest with a matching `campaign_id` continues to W0 — with one
|
|
98
|
+
exception: the **`failed:post_agent_commit`** reason records a post-agent `HEAD`
|
|
99
|
+
that moved with no recorded commit (the unowned-history anomaly), so resume must
|
|
100
|
+
**stop for manual recovery**, must **never reset or delete** those commits, and
|
|
101
|
+
must never continue to W0. Every other reason (`members<2`, `all-satisfied`,
|
|
102
|
+
`no-candidates`, `insufficient_evidence`, `disabled`, `declined:*`,
|
|
103
|
+
`failed:<other>`) continues to W0 as documented. **A stale `done`
|
|
104
|
+
manifest whose `campaign_id` does not match is ignored — never resumed and never counted as
|
|
105
|
+
inventory**: delete it and re-run the F0 scan. A stale
|
|
106
|
+
`skipped` manifest or `shared_inflight.json` whose `campaign_id` does not match `state.config.campaign_id`
|
|
107
|
+
is an earlier campaign's residue — **first assert the main tree is clean** (`git status --porcelain -uall`
|
|
108
|
+
empty; dirty → stop under the W0 rule, never auto-reset user edits), then delete it and re-run the F0 scan;
|
|
109
|
+
a matching `shared_inflight.json` means F0 was interrupted mid-flight — run the F0 reset helper
|
|
110
|
+
(`references/shared-layer.md` → Resume / rollback) **under its ownership guard**: `git reset --hard <pre>` +
|
|
111
|
+
`git clean -fd` may run only in the **only two recorded cases** — `HEAD` is **exactly** the recorded F0
|
|
112
|
+
`commit`, or exactly its recorded `docs_commit` whose parent is `commit` — and only when every path in
|
|
113
|
+
`git status --porcelain -uall` is in the manifest's `files[] ∪ wiring[] ∪ {barrel}`. An **advanced** `HEAD`
|
|
114
|
+
beyond the recorded commits is **never reset** (stop under the W0 dirty-tree rule when dirty, otherwise
|
|
115
|
+
continue without rollback). A **skipped** manifest records no commit, so a post-agent `HEAD` that moved past
|
|
116
|
+
`PRE_F0` is an **unrecorded-commit anomaly**, not a rollback case: record `failed:post_agent_commit`, surface
|
|
117
|
+
it for **manual recovery**, and **never reset or delete those commits**. If either guard fails, **stop under
|
|
118
|
+
the dirty-tree rule — never reset**. When the guard holds, the helper resets and cleans and F0 re-scans;
|
|
119
|
+
a done manifest whose HEAD merely advanced continues **without** rollback (never delete later commits).
|
|
120
|
+
`docs_commit` (null when the refresh produced no commit) is the wave's docs-refresh commit; for a **validated
|
|
121
|
+
done** manifest, `WAVE_BASE = docs_commit ?? the F0 infra commit` — or `HEAD` when the docs catch-up was skipped
|
|
122
|
+
because HEAD advanced; a matching `skipped` manifest produced no commit — continue
|
|
123
|
+
directly to W0 and take `WAVE_BASE = HEAD` there (the existing W0 rule), **unless**
|
|
124
|
+
its `reason` is `failed:post_agent_commit` (the unowned-history anomaly above):
|
|
125
|
+
then stop for manual recovery instead of entering W0.
|
|
126
|
+
|
|
127
|
+
Then re-enter the B1⇄B2 event loop and drain it. At re-entry, if main is **mid-merge**
|
|
128
|
+
(`<HMOS>/.git/MERGE_HEAD` exists) → `git -C <HMOS> merge --abort`, then continue. If the main tree is
|
|
129
|
+
dirty with ONLY wiring-surface files modified (all `git status --porcelain` paths in
|
|
130
|
+
`state.config.wiring_files`), treat it as an interrupted wiring application — verify idempotently and
|
|
131
|
+
commit as `wiring`; any other dirt stops the run.
|
|
132
|
+
|
|
133
|
+
## State persistence & resume
|
|
134
|
+
|
|
135
|
+
`<HMOS>/.hometrans/spec_pipeline_state.json` (schema `spec_pipeline_state/v2`, gitignored) is written by
|
|
136
|
+
`plan_groups.ts --emit-state`, updated by `plan_waves.ts` (wave assignment), and updated by the
|
|
137
|
+
orchestrator after every stage — including the B1⇄B2 bookkeeping: chunk statuses (`pending` →
|
|
138
|
+
`in_flight` → `done`/`failed`), group statuses (`pending` → `coding`/`coded` → `merged` → `done`, or
|
|
139
|
+
`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`,
|
|
140
|
+
`config.design_granularity`, each group's coder snapshot `audit: { base, tip }` (additive group-level
|
|
141
|
+
field — the frozen per-spec field names stay untouched), `coding_base` (the release-fork main HEAD; the
|
|
142
|
+
audit base cache and the so-id resume anchor for held-then-released members, overwritten on re-release),
|
|
143
|
+
`review: { round, open, scenarios, carry_over, fix_commits }` (B4's per-group review state — which groups
|
|
144
|
+
the next round re-reviews and fixes; a resume inside B4 continues from `review.round` with the same
|
|
145
|
+
selection rule), and `wave`/`G`. The additive top-level `engine: { android, hmos, lastSyncAt }`
|
|
146
|
+
(each index's `path`/`initialized`/`lastIndexed`/`fileCount`/`degraded`/`reason`; the top-level
|
|
147
|
+
`lastSyncAt = {trigger, at, action, durationMs}`, never duplicated per index — per-index history
|
|
148
|
+
lives in the wave log; `lastSyncAt` is a cache and is excluded from the resume config comparison).
|
|
149
|
+
`path` = the `repo` field of the JSON line, `initialized` = the JSON `initialized` (local db present
|
|
150
|
+
**and** its `projectPath` resolves to that repo). Also `engine_blocked: { index: "hmos" | "android",
|
|
151
|
+
reason, at } | null` — written only under `ENGINE_MODE=required`, cleared by a successful retry of
|
|
152
|
+
that index. The wave start (W0 2b, beside the `wave_meta.json` write) records that opening `engine`
|
|
153
|
+
snapshot, and every `ensure_index` invocation appends `{trigger, action, ok, lastIndexed, durationMs}`
|
|
154
|
+
to the wave log — `reason === "sync_incomplete"` is booked degraded even when the JSON's
|
|
155
|
+
`degraded` is false. The dispatch truth lives only in `<HMOS>/.hometrans/dispatch/`, written only by
|
|
156
|
+
`dispatch.mjs`:
|
|
157
|
+
|
|
158
|
+
- `ledger.jsonl` — the append-only scheduling truth (events in `references/execution-model.md`);
|
|
159
|
+
- `state.json` — the fold cache; only `reconcile` writes it, and deleting it is legal (it is rebuilt);
|
|
160
|
+
- `ledger.lock` — `{pid,host,boot,nonce,at}`, the single-writer lock (atomic create; released only by its owner's `nonce`);
|
|
161
|
+
- `waker.lock` / `waker.stop` / `waker.event.json` — the durable wakeup channel;
|
|
162
|
+
- `orch.event.json` — the foreground `wait` event (consumed then deleted);
|
|
163
|
+
- `snapshots/{orch,waker}.snapshot.json` — the wait baselines.
|
|
164
|
+
|
|
165
|
+
The state file itself never carries dispatch timestamps, generations, or tokens — that is the ledger's
|
|
166
|
+
job. Resume snapshots the ledger rather than clearing it; live session bookkeeping is
|
|
167
|
+
conversation-transient and never part of the state (crash recovery re-derives position from the ledger +
|
|
168
|
+
git + state). The post-loop Homecheck check writes only `<HMOS>/.hometrans/homecheck/**`: the scan script
|
|
169
|
+
writes `findings.json`, the dispatched gate sub-agent writes `summary.json`; the group/spec state schema
|
|
170
|
+
is unchanged. Its outcome is mirrored in the additive top-level `post_homecheck` field (`status`,
|
|
171
|
+
`errorsBefore`, `errorsAfter`, `warningsBefore`, `warningsAfter`, `rounds`, `build`, `at` — a `skipped`
|
|
172
|
+
write carries `note` instead of the counts and happens at I2, without a dispatch and without touching
|
|
173
|
+
`.hometrans/homecheck/`). A non-zero `warningsAfter` is normal: migration-set warnings are advisory, so
|
|
174
|
+
the gate may leave some by judgement (each with its reason in `homecheck-fix-report.md`). The mirror —
|
|
175
|
+
not `summary.json` — is the completion authority for resume. The smoke gate writes no state of its own;
|
|
176
|
+
its verdict is mirrored in the additive top-level `post_smoke` field (`verdict`, `at`) before
|
|
177
|
+
Finalization. Finalization step 0 requires both mirrors — never `summary.json` or the final report.
|
|
178
|
+
Per-spec rows keep the v1 field names (`status`/`stage`/`design_file`/`commit`) — frozen,
|
|
179
|
+
do not rename (external tooling reads this file); `design_file` on a spec is the chunk design that governs
|
|
180
|
+
it; `stage` vocabulary is exactly `A | B | B2 | C`.
|
|
181
|
+
|
|
182
|
+
**One-way state repair.** `reconcile` reports `stateMismatches` (units, chunks, groups) but never edits
|
|
183
|
+
this file. The orchestrator repairs it in the ledger → state direction only: a terminal ledger chunk
|
|
184
|
+
(`done`/`accepted` → state `done`; `closed`/`abandoned` → state `failed`), the group status (`coding` →
|
|
185
|
+
`coding`, `merged` → `merged`, `failed` → `failed`), and the group's chunk rows; then reconcile once
|
|
186
|
+
more. Never write the ledger from state, and never resurrect a unit because state still says `pending`.
|
|
187
|
+
Vocabulary: ledger `coding` mirrors state `coding` (in progress); the orchestrator's `coded` stays the
|
|
188
|
+
"coding complete / merge queued" marker. `deps_ready.ts` treats `merged|done|failed` as satisfied, so
|
|
189
|
+
both markers correctly count as unsatisfied for dependency release.
|
|
190
|
+
|
|
191
|
+
**Every write replaces the file atomically** (temp file + rename — the scripts do it themselves via
|
|
192
|
+
`atomic_write.ts`, keeping the previous version as `spec_pipeline_state.json.bak`; the orchestrator writes
|
|
193
|
+
`.tmp` then renames) — never edit in place. On restart: if the state does not parse, restore it from
|
|
194
|
+
`.bak` — it predates the orchestrator updates since the last script write, so run the mid-flight
|
|
195
|
+
detection, which re-derives chunk/merge position from git/ledger — and list the restore in the final
|
|
196
|
+
report. Never delete the ledger to "fix" a parse error — that under-counts active units; restore the
|
|
197
|
+
state from `.bak` and re-derive instead. If the state exists, verify `config` matches the resolved inputs
|
|
198
|
+
— including `config.design_granularity === "chunk"` — (diverged → stop; the I2 probe results `state_docs_mode` / `api_docs_mode` are excluded), skip `done`/`failed` groups, and
|
|
199
|
+
resume the wave loop. A legacy state seeded before F0 carries no `shared_layer`/`source_kind` — resolve
|
|
200
|
+
the defaults (`auto`/`android`) and continue, never a divergence stop; once the fields exist they are
|
|
201
|
+
input-divergence items compared like the others. Designs are per-chunk and design-once: a chunk's
|
|
202
|
+
design is generated before its code, and a retry re-uses it unless an issue file exists.
|
|
203
|
+
|
|
204
|
+
**Worktree paths are generation-aware.** A group's worktree is `WT/g<G>r<wtGen>` and its branch
|
|
205
|
+
`specpipe/g<G>r<wtGen>` (generation 0 = `g<G>r0`; the bare `g<G>` name is never used). The ledger group
|
|
206
|
+
record is the only source of `wtGen`/worktree/branch; state mirrors it for the orchestrator's bookkeeping.
|
|
207
|
+
`group-worktree <G> --wt-gen <n>` is the only claim fence (it sets `provisioned`); `group-reset --mode
|
|
208
|
+
fresh` creates the next generation and `--mode reuse` resets the current one in place. `group-merge`
|
|
209
|
+
already removes every older generation (its `cleaned` field lists them). At C, clean the **current**
|
|
210
|
+
generation: `git -C <HMOS> worktree remove WT/g<G>r<wtGen>` (retry once, then `--force`, then
|
|
211
|
+
`git worktree prune`) and `git branch -D specpipe/g<G>r<wtGen>`.
|
|
212
|
+
|
|
213
|
+
## After the wave loop
|
|
214
|
+
|
|
215
|
+
`{"wave": null, "done": true}` — or a resume with every group terminal — never enters Finalization
|
|
216
|
+
directly (not a valid resume shortcut). Order: Homecheck → smoke gate → Finalization, each gated by its
|
|
217
|
+
marker.
|
|
218
|
+
|
|
219
|
+
- `state.post_homecheck` absent → run the gate (or write the I2 step 8b `skipped` mirror). A recorded skip
|
|
220
|
+
is not retried; an absent marker is not a pass.
|
|
221
|
+
- `state.post_smoke` absent → run the smoke gate (or record `SKIPPED_HOMECHECK_BUILD_FAILED`).
|
|
222
|
+
- Both present → Finalization step 0 passes; `state.finalization.homecheck` / `smoke` copy the two values.
|
|
223
|
+
|
|
224
|
+
**Carried-only exemption.** A round in which every spec was carried over unchanged (`plan_groups.ts`
|
|
225
|
+
seeds no group and writes `finalization = { done: true, final_build: "SKIPPED", smoke: "SKIPPED",
|
|
226
|
+
carried_only: true }`, stdout `carried_only: true`) recodes nothing: there is no wave loop, so Homecheck, the
|
|
227
|
+
smoke gate and Finalization are **not** re-run and `post_homecheck` / `post_smoke` are never written. That
|
|
228
|
+
is the explicit exemption, not a missing marker: `check_spec_pipeline_done.mjs` reports it done with
|
|
229
|
+
`carried_only: true, markers_exempt: true`. It applies only to that seed — a campaign with any group needs
|
|
230
|
+
both markers, whatever flag its `finalization` carries.
|
|
231
|
+
|
|
232
|
+
## Completion evidence
|
|
233
|
+
|
|
234
|
+
`check_spec_pipeline_done.mjs` does not take `status: done` and `finalization.done` alone for a campaign
|
|
235
|
+
seeded with `config.evidence_version >= 1` (plan_groups `--emit-state` sets it). Each step must also have
|
|
236
|
+
left its output on disk, which a skipped step cannot have:
|
|
237
|
+
|
|
238
|
+
- **B4** — every done group has `review.round >= 1` and a non-empty `spec_group_<G>/review-round_1/`.
|
|
239
|
+
- **B5** — every wave with a done group has `wave_<K>/docs_refresh.json` (`{wave, mode, result, at}`).
|
|
240
|
+
- **C** — every done group has its `commit`, and no `specpipe/g<G>r*` branch is left.
|
|
241
|
+
- **Homecheck** — `finalization.homecheck` holds the gate's result (a fail-soft result counts; absent or
|
|
242
|
+
`not_run` does not).
|
|
243
|
+
|
|
244
|
+
Any gap reports the campaign unfinished (exit 1, `evidence_gaps`). Campaigns seeded before the rule keep
|
|
245
|
+
the old verdict. A carried-only campaign (above) coded no group, so none of these traces is required of it —
|
|
246
|
+
the Homecheck line included.
|