@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
|
@@ -50,6 +50,13 @@ function live(s, unit, minutes, token) {
|
|
|
50
50
|
return must(s, { ev: 'confirm', unit, claimGen: iso(minutes), token, session: `ses_${unit}`, t: iso(minutes + 2) });
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/** Finish a chunk cleanly (done): the only state the queue/landing gates accept. */
|
|
54
|
+
function finish(s, unit, minutes, token) {
|
|
55
|
+
s = live(s, unit, minutes, token);
|
|
56
|
+
s = must(s, { ev: 'submit', unit, claimGen: iso(minutes), token, kind: 'completed', t: iso(minutes + 1) });
|
|
57
|
+
return must(s, { ev: 'release', unit, claimGen: iso(minutes), token, outcome: 'done', t: iso(minutes + 2) });
|
|
58
|
+
}
|
|
59
|
+
|
|
53
60
|
/* ------------------------------------------------------------------ */
|
|
54
61
|
/* claim / identity */
|
|
55
62
|
/* ------------------------------------------------------------------ */
|
|
@@ -518,7 +525,10 @@ test('group-reset refuses while a unit is active (B6)', () => {
|
|
|
518
525
|
});
|
|
519
526
|
|
|
520
527
|
test('group-reset drops a queued merge and succeeds (N2)', () => {
|
|
521
|
-
let s =
|
|
528
|
+
let s = mk();
|
|
529
|
+
s = finish(s, U1, 0, 'aaaa');
|
|
530
|
+
s = finish(s, U2, 3, 'bbbb');
|
|
531
|
+
s = must(s, { ev: 'queue-merge', group: G });
|
|
522
532
|
s = must(s, {
|
|
523
533
|
ev: 'group-reset',
|
|
524
534
|
group: G,
|
|
@@ -526,12 +536,121 @@ test('group-reset drops a queued merge and succeeds (N2)', () => {
|
|
|
526
536
|
base: 'x',
|
|
527
537
|
worktree: 'WT/g2r1',
|
|
528
538
|
branch: 'specpipe/g2r1',
|
|
529
|
-
t: iso(
|
|
539
|
+
t: iso(6),
|
|
530
540
|
});
|
|
531
541
|
assert.equal(s.groups[G].mergeQueued, false);
|
|
532
542
|
assert.equal(s.groups[G].wtGen, 1);
|
|
533
543
|
});
|
|
534
544
|
|
|
545
|
+
test('queue-merge requires every planned chunk to be done or accepted', () => {
|
|
546
|
+
nope(mk(), { ev: 'queue-merge', group: G }, 'chunks-incomplete');
|
|
547
|
+
// A closed/abandoned chunk is terminal but can never land: the queue must
|
|
548
|
+
// refuse it before `git merge`, or `group-merge` would dead-end on a coding
|
|
549
|
+
// group that `group-reopen` cannot repair.
|
|
550
|
+
let closed = mk();
|
|
551
|
+
closed = must(closed, { ev: 'close', unit: U1, reason: 'blocked', t: iso(0) });
|
|
552
|
+
closed = must(closed, { ev: 'close', unit: U2, reason: 'blocked', t: iso(0) });
|
|
553
|
+
nope(closed, { ev: 'queue-merge', group: G }, 'chunks-incomplete');
|
|
554
|
+
|
|
555
|
+
let s = live(mk(), U1, 0, 'aaaa');
|
|
556
|
+
s = must(s, { ev: 'submit', unit: U1, claimGen: iso(0), token: 'aaaa', kind: 'completed', t: iso(1) });
|
|
557
|
+
s = must(s, { ev: 'release', unit: U1, claimGen: iso(0), token: 'aaaa', outcome: 'done', t: iso(2) });
|
|
558
|
+
s = live(s, U2, 3, 'bbbb');
|
|
559
|
+
s = must(s, { ev: 'submit', unit: U2, claimGen: iso(3), token: 'bbbb', kind: 'completed', t: iso(4) });
|
|
560
|
+
s = must(s, { ev: 'release', unit: U2, claimGen: iso(3), token: 'bbbb', outcome: 'done', t: iso(5) });
|
|
561
|
+
s = must(s, { ev: 'queue-merge', group: G });
|
|
562
|
+
assert.equal(s.groups[G].mergeQueued, true);
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
test('group-reopen reopens a prematurely merged group into a new generation', () => {
|
|
566
|
+
let s = must(mk(), { ev: 'group-merge', group: G, t: iso(1) });
|
|
567
|
+
s = must(s, {
|
|
568
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
569
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(2),
|
|
570
|
+
});
|
|
571
|
+
assert.equal(s.groups[G].status, 'pending');
|
|
572
|
+
assert.equal(s.groups[G].wtGen, 1);
|
|
573
|
+
assert.equal(s.groups[G].landed, null);
|
|
574
|
+
assert.equal(s.groups[G].noop, false);
|
|
575
|
+
assert.equal(s.groups[G].history.at(-1).wtGen, 1);
|
|
576
|
+
assert.equal(s.groups[G].history.at(-1).branch, 'specpipe/g2r1');
|
|
577
|
+
// The new generation is claimable again (the old one is recorded in history).
|
|
578
|
+
s = claim(s, U1, 3, 'aaaa');
|
|
579
|
+
assert.equal(s.units[U1].wtGen, 1);
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
test('group-reopen keeps finished chunks done and reopens only the rest', () => {
|
|
583
|
+
let s = live(mk(), U1, 0, 'aaaa');
|
|
584
|
+
s = must(s, { ev: 'submit', unit: U1, claimGen: iso(0), token: 'aaaa', kind: 'completed', t: iso(1) });
|
|
585
|
+
s = must(s, { ev: 'release', unit: U1, claimGen: iso(0), token: 'aaaa', outcome: 'done', t: iso(2) });
|
|
586
|
+
s = must(s, { ev: 'group-merge', group: G, t: iso(3) });
|
|
587
|
+
s = must(s, {
|
|
588
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
589
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(4),
|
|
590
|
+
});
|
|
591
|
+
assert.equal(s.units[U1].state, 'done');
|
|
592
|
+
assert.equal(s.units[U2].state, 'pending');
|
|
593
|
+
assert.equal(s.units[U2].wtGen, 1);
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
test('group-reopen re-admits the group to the active plan and reopens the resolver', () => {
|
|
597
|
+
// A later wave's plan drops group 2; reopening must make it visible again or
|
|
598
|
+
// dispatch/isComplete would silently ignore the reopened chunks.
|
|
599
|
+
let s = mk();
|
|
600
|
+
s = must(s, { ev: 'plan', wave: 2, concurrency: 2, units: [chunkUnitId('3', 1)], t: iso(1) });
|
|
601
|
+
s = must(s, { ev: 'group-merge', group: G, t: iso(2) });
|
|
602
|
+
s = must(s, {
|
|
603
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
604
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(3),
|
|
605
|
+
});
|
|
606
|
+
assert.ok(s.plan.groups.includes(G));
|
|
607
|
+
assert.ok(s.plan.units.includes(U1));
|
|
608
|
+
assert.ok(s.plan.units.includes(U2));
|
|
609
|
+
assert.equal(s.units[U1].planned, true);
|
|
610
|
+
assert.equal(s.units[U2].planned, true);
|
|
611
|
+
assert.equal(s.units[R].state, 'pending');
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
test('group-reopen resets a resolver released by the first landing', () => {
|
|
615
|
+
let s = live(mk(), R, 0, 'rrrr');
|
|
616
|
+
s = must(s, { ev: 'submit', unit: R, claimGen: iso(0), token: 'rrrr', kind: 'completed', t: iso(1) });
|
|
617
|
+
s = must(s, { ev: 'release', unit: R, claimGen: iso(0), token: 'rrrr', outcome: 'merged', t: iso(2) });
|
|
618
|
+
s = must(s, { ev: 'group-merge', group: G, t: iso(3) });
|
|
619
|
+
s = must(s, {
|
|
620
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
621
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(4),
|
|
622
|
+
});
|
|
623
|
+
assert.equal(s.units[R].state, 'pending');
|
|
624
|
+
s = claim(s, R, 5, 'ssss');
|
|
625
|
+
assert.equal(s.units[R].state, 'claimed');
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
test('group-reopen refuses non-merged, nothing-to-reopen and active-unit shapes', () => {
|
|
629
|
+
nope(mk(), {
|
|
630
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
631
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(1),
|
|
632
|
+
}, 'not-merged');
|
|
633
|
+
|
|
634
|
+
let s = live(mk(), U1, 0, 'aaaa');
|
|
635
|
+
s = must(s, { ev: 'submit', unit: U1, claimGen: iso(0), token: 'aaaa', kind: 'completed', t: iso(1) });
|
|
636
|
+
s = must(s, { ev: 'release', unit: U1, claimGen: iso(0), token: 'aaaa', outcome: 'done', t: iso(2) });
|
|
637
|
+
s = live(s, U2, 3, 'bbbb');
|
|
638
|
+
s = must(s, { ev: 'submit', unit: U2, claimGen: iso(3), token: 'bbbb', kind: 'completed', t: iso(4) });
|
|
639
|
+
s = must(s, { ev: 'release', unit: U2, claimGen: iso(3), token: 'bbbb', outcome: 'done', t: iso(5) });
|
|
640
|
+
s = must(s, { ev: 'group-merge', group: G, t: iso(6) });
|
|
641
|
+
nope(s, {
|
|
642
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
643
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(7),
|
|
644
|
+
}, 'nothing-to-reopen');
|
|
645
|
+
|
|
646
|
+
let a = claim(mk(), U1, 0, 'aaaa');
|
|
647
|
+
a = must(a, { ev: 'group-merge', group: G, t: iso(1) });
|
|
648
|
+
nope(a, {
|
|
649
|
+
ev: 'group-reopen', group: G, wtGen: 1, base: 'x',
|
|
650
|
+
worktree: 'WT/g2r1', branch: 'specpipe/g2r1', t: iso(2),
|
|
651
|
+
}, 'active-units');
|
|
652
|
+
});
|
|
653
|
+
|
|
535
654
|
test('group-reset reopens submitted units', () => {
|
|
536
655
|
let s = live(mk(), U1, 0, 'aaaa');
|
|
537
656
|
s = must(s, { ev: 'submit', unit: U1, claimGen: iso(0), token: 'aaaa', kind: 'completed', t: iso(10) });
|
|
@@ -669,8 +788,8 @@ test('isComplete requires a claimed resolver to reach a terminal state', () => {
|
|
|
669
788
|
|
|
670
789
|
test('isComplete is false while a merge is queued', () => {
|
|
671
790
|
let s = mk();
|
|
672
|
-
s =
|
|
673
|
-
s =
|
|
791
|
+
s = finish(s, U1, 0, 'aaaa');
|
|
792
|
+
s = finish(s, U2, 3, 'bbbb');
|
|
674
793
|
s = must(s, { ev: 'queue-merge', group: G });
|
|
675
794
|
assert.equal(isComplete(s), false);
|
|
676
795
|
|
|
@@ -680,7 +799,10 @@ test('isComplete is false while a merge is queued', () => {
|
|
|
680
799
|
});
|
|
681
800
|
|
|
682
801
|
test('group-merge clears a queued merge', () => {
|
|
683
|
-
let s =
|
|
802
|
+
let s = mk();
|
|
803
|
+
s = finish(s, U1, 0, 'aaaa');
|
|
804
|
+
s = finish(s, U2, 3, 'bbbb');
|
|
805
|
+
s = must(s, { ev: 'queue-merge', group: G });
|
|
684
806
|
s = must(s, { ev: 'group-merge', group: G });
|
|
685
807
|
assert.equal(s.groups[G].mergeQueued, false);
|
|
686
808
|
assert.equal(s.groups[G].status, 'merged');
|
|
@@ -903,7 +1025,10 @@ test('group-worktree requires an explicit wtGen (DIFF-7)', () => {
|
|
|
903
1025
|
});
|
|
904
1026
|
|
|
905
1027
|
test('group-fail clears a queued merge (DIFF-6)', () => {
|
|
906
|
-
let s =
|
|
1028
|
+
let s = mk();
|
|
1029
|
+
s = finish(s, U1, 0, 'aaaa');
|
|
1030
|
+
s = finish(s, U2, 3, 'bbbb');
|
|
1031
|
+
s = must(s, { ev: 'queue-merge', group: G });
|
|
907
1032
|
s = must(s, { ev: 'group-fail', group: G });
|
|
908
1033
|
assert.equal(s.groups[G].mergeQueued, false);
|
|
909
1034
|
});
|
|
@@ -1045,4 +1170,40 @@ test("reject accepts an orphaned unit", () => {
|
|
|
1045
1170
|
assert.equal(s.units[U1].state, "orphaned");
|
|
1046
1171
|
s = must(s, { ev: "reject", unit: U1, claimGen: iso(0), token: "aaaa", reason: "evidence-invalid", t: iso(32) });
|
|
1047
1172
|
assert.equal(s.units[U1].state, "failed");
|
|
1048
|
-
});
|
|
1173
|
+
});
|
|
1174
|
+
// H4: a mid-flight resume (init --new-run --resume) keeps what the wave already finished
|
|
1175
|
+
test('a resume plan under a new runId keeps terminal groups; a plain new run resets them', () => {
|
|
1176
|
+
const G3 = '3';
|
|
1177
|
+
const U3 = chunkUnitId(G3, 1);
|
|
1178
|
+
let s = mk([{ id: 2, chunks: 2 }, { id: 3, chunks: 1 }]);
|
|
1179
|
+
s = must(s, { ev: 'close', unit: U1, reason: 'blocked', t: iso(1) });
|
|
1180
|
+
s = must(s, { ev: 'close', unit: U2, reason: 'blocked', t: iso(2) });
|
|
1181
|
+
s = must(s, { ev: 'group-merge', group: G });
|
|
1182
|
+
const plan = { ev: 'plan', wave: 1, units: [U1, U2, U3], runId: 'r-2', t: iso(10) };
|
|
1183
|
+
|
|
1184
|
+
const resumed = must(s, { ...plan, resume: true });
|
|
1185
|
+
assert.equal(resumed.groups[G].status, 'merged', 'the merged group stays merged');
|
|
1186
|
+
assert.equal(resumed.units[U1].state, s.units[U1].state);
|
|
1187
|
+
assert.equal(resumed.groups[G3].status, 'pending');
|
|
1188
|
+
assert.equal(resumed.units[U3].state, 'pending');
|
|
1189
|
+
|
|
1190
|
+
const fresh = must(s, plan);
|
|
1191
|
+
assert.equal(fresh.groups[G].status, 'pending', 'a new campaign reusing the ids starts over');
|
|
1192
|
+
assert.equal(fresh.units[U1].state, 'pending');
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
// M17: group-fail closes the group's open units, so one missed unit cannot hold the wave open
|
|
1196
|
+
test('group-fail closes every non-terminal unit of the group; other groups are untouched', () => {
|
|
1197
|
+
let s = mk([{ id: 2, chunks: 2 }, { id: 3, chunks: 1 }]);
|
|
1198
|
+
s = claim(s, U1, 1, 'aaaa');
|
|
1199
|
+
s = must(s, { ev: 'group-fail', group: G, t: iso(2) });
|
|
1200
|
+
assert.equal(s.groups[G].status, 'failed');
|
|
1201
|
+
for (const uid of [U1, U2, R]) {
|
|
1202
|
+
assert.equal(s.units[uid].state, 'closed', uid);
|
|
1203
|
+
assert.equal(s.units[uid].closeReason, 'group-failed');
|
|
1204
|
+
}
|
|
1205
|
+
assert.equal(s.units[chunkUnitId('3', 1)].state, 'pending');
|
|
1206
|
+
// a late event of the agent that was running is absorbed, not a resurrection
|
|
1207
|
+
const late = apply(s, { ev: 'intent', unit: U1, claimGen: iso(1), token: 'aaaa', t: iso(3) });
|
|
1208
|
+
assert.equal((late.state ?? s).units[U1].state, 'closed');
|
|
1209
|
+
});
|
|
@@ -50,6 +50,7 @@ const reason = (r) => {
|
|
|
50
50
|
const status = (root) => ok(run(root, "status"));
|
|
51
51
|
const provision = (root) => ok(run(root, "group-worktree", G, "--wt-gen", "0", "--base", "HEAD"));
|
|
52
52
|
const wtPath = (root) => join(dirname(root), "wt", root.split(/[\\/]/).pop(), "g2r0");
|
|
53
|
+
const wtPathGen = (root, gen) => join(dirname(root), "wt", root.split(/[\\/]/).pop(), `g2r${gen}`);
|
|
53
54
|
const head = (root, rev = "HEAD") => execFileSync("git", ["-C", root, "rev-parse", rev], { encoding: "utf8" }).trim();
|
|
54
55
|
|
|
55
56
|
function finishChunk(root, unit) {
|
|
@@ -68,6 +69,9 @@ function commitInWorktree(root, name = "work.txt") {
|
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
function land(root) {
|
|
72
|
+
// The landing gate now requires every planned chunk to be done (a landed
|
|
73
|
+
// branch alone is not a finished group); finish the fixture's one chunk first.
|
|
74
|
+
finishChunk(root, "chunk:g2c1");
|
|
71
75
|
commitInWorktree(root);
|
|
72
76
|
execFileSync("git", ["-C", root, "merge", "--no-ff", "--no-edit", BRANCH]);
|
|
73
77
|
return head(root);
|
|
@@ -209,7 +213,7 @@ test("no-op: a zero-commit branch with all chunks done merges without --landed",
|
|
|
209
213
|
assert.equal(g.noop, true);
|
|
210
214
|
});
|
|
211
215
|
|
|
212
|
-
test("no-op is refused when a chunk
|
|
216
|
+
test("no-op is refused when a chunk ended non-successfully (closed/blocked)", () => {
|
|
213
217
|
const root = mk();
|
|
214
218
|
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
215
219
|
provision(root);
|
|
@@ -217,7 +221,14 @@ test("no-op is refused when a chunk failed (closed/blocked)", () => {
|
|
|
217
221
|
ok(run(root, "intent", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token));
|
|
218
222
|
ok(run(root, "confirm", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token, "--session", "ses_1"));
|
|
219
223
|
ok(run(root, "submit", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token, "--kind", "failed"));
|
|
220
|
-
|
|
224
|
+
// A `failed` chunk is retryable, so it is not "settled" for the queue; close it
|
|
225
|
+
// first (the content-exhausted path).
|
|
226
|
+
ok(run(root, "close", "chunk:g2c1", "--expect-gen", c.claimGen, "--token", c.token, "--reason", "content-exhausted"));
|
|
227
|
+
// The queue now shares the landing predicate: a closed chunk can never land,
|
|
228
|
+
// so it is refused BEFORE any git merge (the same repair is group-fail).
|
|
229
|
+
const q = run(root, "queue-merge", G);
|
|
230
|
+
assert.equal(q.status, 2, q.stdout + q.stderr);
|
|
231
|
+
assert.match(reason(q), /chunks-incomplete/);
|
|
221
232
|
const r = run(root, "group-merge", G);
|
|
222
233
|
assert.equal(r.status, 2, r.stdout + r.stderr);
|
|
223
234
|
assert.match(reason(r), /landed-required/);
|
|
@@ -288,6 +299,125 @@ test("group-merge refuses a failed group", () => {
|
|
|
288
299
|
assert.equal(status(root).groups[G].status, "failed");
|
|
289
300
|
});
|
|
290
301
|
|
|
302
|
+
test("queue-merge is refused while a planned chunk is still open", () => {
|
|
303
|
+
const root = mk(3);
|
|
304
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
305
|
+
provision(root);
|
|
306
|
+
finishChunk(root, "chunk:g2c1");
|
|
307
|
+
const r = run(root, "queue-merge", G);
|
|
308
|
+
assert.equal(r.status, 2, r.stdout + r.stderr);
|
|
309
|
+
assert.match(reason(r), /chunks-incomplete/);
|
|
310
|
+
assert.equal(status(root).groups[G].mergeQueued, false);
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
test("group-merge refuses a landed branch while a planned chunk is still open", () => {
|
|
314
|
+
const root = mk(3);
|
|
315
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
316
|
+
provision(root);
|
|
317
|
+
finishChunk(root, "chunk:g2c1");
|
|
318
|
+
commitInWorktree(root);
|
|
319
|
+
execFileSync("git", ["-C", root, "merge", "--no-ff", "--no-edit", BRANCH]);
|
|
320
|
+
const M = head(root);
|
|
321
|
+
const r = run(root, "group-merge", G, "--landed", M);
|
|
322
|
+
assert.equal(r.status, 2, r.stdout + r.stderr);
|
|
323
|
+
assert.match(reason(r), /chunks-incomplete/);
|
|
324
|
+
const g = status(root).groups[G];
|
|
325
|
+
assert.equal(g.status, "coding");
|
|
326
|
+
assert.equal(g.landed, null);
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
test("group-reopen repairs a premature merge and keeps finished chunks", () => {
|
|
330
|
+
const root = mk(3);
|
|
331
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
332
|
+
provision(root);
|
|
333
|
+
finishChunk(root, "chunk:g2c1");
|
|
334
|
+
commitInWorktree(root);
|
|
335
|
+
execFileSync("git", ["-C", root, "merge", "--no-ff", "--no-edit", BRANCH]);
|
|
336
|
+
const M = head(root);
|
|
337
|
+
// A ledger written by an older release can carry `merged` while chunk 2/3 are
|
|
338
|
+
// pending; reproduce that shape (the gate now refuses to create it).
|
|
339
|
+
appendFileSync(join(root, ".hometrans", "dispatch", "ledger.jsonl"),
|
|
340
|
+
JSON.stringify({ t: new Date().toISOString(), runId: "r-1", ev: "group-merge", group: G, landed: M }) + "\n");
|
|
341
|
+
assert.equal(status(root).groups[G].status, "merged");
|
|
342
|
+
assert.equal(run(root, "claim", "chunk:g2c2").status, 1, "the lock this repair exists for");
|
|
343
|
+
|
|
344
|
+
const r = ok(run(root, "group-reopen", G, "--base", "HEAD"));
|
|
345
|
+
assert.equal(r.wtGen, 1);
|
|
346
|
+
const g = status(root).groups[G];
|
|
347
|
+
assert.equal(g.status, "pending");
|
|
348
|
+
assert.equal(g.wtGen, 1);
|
|
349
|
+
assert.equal(g.landed, null);
|
|
350
|
+
const s = ok(run(root, "status"));
|
|
351
|
+
assert.equal(s.units["chunk:g2c1"].state, "done", "a finished chunk stays done");
|
|
352
|
+
assert.equal(s.units["chunk:g2c2"].state, "pending");
|
|
353
|
+
assert.equal(s.units["chunk:g2c3"].state, "pending");
|
|
354
|
+
const claim = ok(run(root, "claim", "chunk:g2c2"));
|
|
355
|
+
assert.equal(claim.wtGen, 1);
|
|
356
|
+
assert.equal(claim.branch, "specpipe/g2r1");
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
test("group-reopen refuses a group with no open chunk", () => {
|
|
360
|
+
const root = mk();
|
|
361
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
362
|
+
provision(root);
|
|
363
|
+
const M = land(root);
|
|
364
|
+
ok(run(root, "group-merge", G, "--landed", M));
|
|
365
|
+
const r = run(root, "group-reopen", G, "--base", "HEAD");
|
|
366
|
+
assert.equal(r.status, 1, r.stdout + r.stderr);
|
|
367
|
+
assert.match(reason(r), /nothing-to-reopen/);
|
|
368
|
+
assert.equal(existsSync(wtPathGen(root, 1)), false, "a rejected reopen must not create the next generation tree");
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
test("group-reopen re-verifies a legacy merged row whose branch did land", () => {
|
|
372
|
+
const root = mk(3);
|
|
373
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
374
|
+
provision(root);
|
|
375
|
+
finishChunk(root, "chunk:g2c1");
|
|
376
|
+
commitInWorktree(root);
|
|
377
|
+
execFileSync("git", ["-C", root, "merge", "--no-ff", "--no-edit", BRANCH]);
|
|
378
|
+
// Pre-upgrade ledger row: merged with no recorded landing, but the generation
|
|
379
|
+
// branch really is on main, so keeping chunk 1 done is safe.
|
|
380
|
+
appendFileSync(join(root, ".hometrans", "dispatch", "ledger.jsonl"),
|
|
381
|
+
JSON.stringify({ t: new Date().toISOString(), runId: "r-1", ev: "group-merge", group: G }) + "\n");
|
|
382
|
+
assert.equal(status(root).groups[G].landed, null);
|
|
383
|
+
const r = ok(run(root, "group-reopen", G, "--base", "HEAD"));
|
|
384
|
+
assert.equal(r.wtGen, 1);
|
|
385
|
+
assert.equal(status(root).units["chunk:g2c1"].state, "done");
|
|
386
|
+
assert.equal(status(root).units["chunk:g2c2"].state, "pending");
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
test("group-reopen refuses an unrecorded, unlanded landing", () => {
|
|
390
|
+
const root = mk(2);
|
|
391
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
392
|
+
provision(root);
|
|
393
|
+
// Zero-commit branch: the legacy row claims `merged`, but nothing landed and
|
|
394
|
+
// no no-op was recorded. Keeping finished chunks `done` would be unfounded.
|
|
395
|
+
appendFileSync(join(root, ".hometrans", "dispatch", "ledger.jsonl"),
|
|
396
|
+
JSON.stringify({ t: new Date().toISOString(), runId: "r-1", ev: "group-merge", group: G }) + "\n");
|
|
397
|
+
const r = run(root, "group-reopen", G, "--base", "HEAD");
|
|
398
|
+
assert.equal(r.status, 1, r.stdout + r.stderr);
|
|
399
|
+
assert.match(reason(r), /landing-unrecorded/);
|
|
400
|
+
assert.equal(status(root).groups[G].status, "merged");
|
|
401
|
+
assert.equal(existsSync(wtPathGen(root, 1)), false, "the refused reopen must not move trees");
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
test("group-reopen rejects a mismatched --wt-gen before touching trees", () => {
|
|
405
|
+
const root = mk(2);
|
|
406
|
+
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
407
|
+
provision(root);
|
|
408
|
+
finishChunk(root, "chunk:g2c1");
|
|
409
|
+
commitInWorktree(root);
|
|
410
|
+
execFileSync("git", ["-C", root, "merge", "--no-ff", "--no-edit", BRANCH]);
|
|
411
|
+
const M = head(root);
|
|
412
|
+
appendFileSync(join(root, ".hometrans", "dispatch", "ledger.jsonl"),
|
|
413
|
+
JSON.stringify({ t: new Date().toISOString(), runId: "r-1", ev: "group-merge", group: G, landed: M }) + "\n");
|
|
414
|
+
const r = run(root, "group-reopen", G, "--base", "HEAD", "--wt-gen", "5");
|
|
415
|
+
assert.equal(r.status, 2, r.stdout + r.stderr);
|
|
416
|
+
assert.match(reason(r), /wtGen-mismatch/);
|
|
417
|
+
assert.equal(status(root).groups[G].wtGen, 0);
|
|
418
|
+
assert.equal(existsSync(wtPathGen(root, 1)), false);
|
|
419
|
+
});
|
|
420
|
+
|
|
291
421
|
test("legacy merged row with unlanded branch commits reports unlanded", () => {
|
|
292
422
|
const root = mk();
|
|
293
423
|
ok(run(root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"));
|
|
@@ -386,6 +516,13 @@ test("groupMergeGuard re-checks the no-op preconditions", () => {
|
|
|
386
516
|
guard({}, guardState());
|
|
387
517
|
});
|
|
388
518
|
|
|
519
|
+
test("groupMergeGuard re-checks chunk completeness for a landed merge", () => {
|
|
520
|
+
const guard = groupMergeGuard("2", { ...checked, requireComplete: true });
|
|
521
|
+
throwReason(() => guard({}, guardState({ chunkState: "pending" })), "chunks-incomplete");
|
|
522
|
+
throwReason(() => guard({}, guardState({ chunkState: "submitted" })), "chunks-incomplete");
|
|
523
|
+
guard({}, guardState());
|
|
524
|
+
});
|
|
525
|
+
|
|
389
526
|
test("plannedChunksDone counts older-wave chunk units too", () => {
|
|
390
527
|
const state = guardState({ planned: false });
|
|
391
528
|
assert.equal(plannedChunksDone(state, "2"), true);
|
|
@@ -79,3 +79,28 @@ test("a state_docs_used.md write in the attempt dir also produces a beat", () =>
|
|
|
79
79
|
assert.equal(beats.length, 1);
|
|
80
80
|
assert.equal(beats[0].unitId, chunkUnitId("2", 1));
|
|
81
81
|
});
|
|
82
|
+
|
|
83
|
+
// M16: the design step writes under DESIGN_DIR, outside git status; it is progress too
|
|
84
|
+
test("writing the chunk's SPEC_DESIGN file in DESIGN_DIR produces a beat", () => {
|
|
85
|
+
const root = repo();
|
|
86
|
+
execFileSync("git", ["-C", root, "commit", "--amend", "-q", "--no-edit", "--date", "2026-11-05T00:00:00Z"], {
|
|
87
|
+
env: { ...process.env, GIT_COMMITTER_DATE: "2026-11-05T00:00:00Z" },
|
|
88
|
+
});
|
|
89
|
+
const wt = provisionGroup({ hmos: root, G: 2, gen: 0, base: "HEAD" });
|
|
90
|
+
let s = createState({ runId: "r-1", concurrency: 1 });
|
|
91
|
+
s = applyEvent(s, { ev: "plan", wave: 1, units: [chunkUnitId("2", 1)], runId: "r-1", t: iso(0) }).state;
|
|
92
|
+
s = applyEvent(s, { ev: "group-worktree", group: "2", wtGen: 0, worktree: wt.worktree, branch: wt.branch, base: "HEAD" }).state;
|
|
93
|
+
s = applyEvent(s, { ev: "claim", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", t: iso(0) }).state;
|
|
94
|
+
s = applyEvent(s, { ev: "intent", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", t: iso(0) }).state;
|
|
95
|
+
s = applyEvent(s, { ev: "confirm", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", session: "ses", t: iso(1) }).state;
|
|
96
|
+
assert.equal(observeProgress(root, s, iso(5)).length, 0, "nothing written yet");
|
|
97
|
+
const dd = join(root, "design");
|
|
98
|
+
mkdirSync(dd, { recursive: true });
|
|
99
|
+
writeFileSync(join(root, ".hometrans", "spec_pipeline_state.json"), JSON.stringify({ config: { design_dir: dd } }));
|
|
100
|
+
const file = join(dd, "SPEC_DESIGN_G2_c1.md");
|
|
101
|
+
writeFileSync(file, "# design\n");
|
|
102
|
+
const t = new Date(Date.UTC(2026, 10, 5, 0, 6, 0));
|
|
103
|
+
utimesSync(file, t, t);
|
|
104
|
+
const beats = observeProgress(root, s, iso(5));
|
|
105
|
+
assert.deepEqual(beats.map((b) => b.unitId), [chunkUnitId("2", 1)]);
|
|
106
|
+
});
|
|
@@ -28,6 +28,19 @@ test("dispatchable allows only the first chunk and one per group", () => {
|
|
|
28
28
|
assert.deepEqual(out.dispatchable, []);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
test("dispatchable treats an accepted predecessor as satisfied", () => {
|
|
32
|
+
// group-reopen keeps finished chunks; an accepted one (wave-end absorption) must
|
|
33
|
+
// not block its successor, or the reopened group stalls with no residue hint.
|
|
34
|
+
let s = base();
|
|
35
|
+
s = claim(s, chunkUnitId("2", 1), 0, "aaaa");
|
|
36
|
+
s = applyEvent(s, { ev: "intent", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", t: iso(1) }).state;
|
|
37
|
+
s = applyEvent(s, { ev: "orphan", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", reason: "no-evidence", t: iso(30) }).state;
|
|
38
|
+
s = applyEvent(s, { ev: "accept", unit: chunkUnitId("2", 1), claimGen: iso(0), reason: "wave-end", t: iso(31) }).state;
|
|
39
|
+
assert.equal(s.units[chunkUnitId("2", 1)].state, "accepted");
|
|
40
|
+
const out = buildReconcileOutput(s, { now: iso(32) });
|
|
41
|
+
assert.deepEqual(out.dispatchable.map((d) => d.unitId), [chunkUnitId("2", 2)]);
|
|
42
|
+
});
|
|
43
|
+
|
|
31
44
|
test("units from an older plan are never dispatchable", () => {
|
|
32
45
|
let s = base();
|
|
33
46
|
s = applyEvent(s, { ev: "plan", wave: 2, concurrency: 2, units: [chunkUnitId("3", 1)], t: iso(1) }).state;
|
|
@@ -82,10 +95,85 @@ test("reconcile --check is read-only and reports phantom", () => {
|
|
|
82
95
|
const after = JSON.parse(run("status").stdout);
|
|
83
96
|
assert.deepEqual(after.units, before.units);
|
|
84
97
|
});
|
|
85
|
-
test("groupResidue reports a
|
|
98
|
+
test("groupResidue reports a terminal group that still owns an open chunk", () => {
|
|
86
99
|
let s = base();
|
|
87
|
-
s = applyEvent(s, { ev: "group-
|
|
100
|
+
s = applyEvent(s, { ev: "group-merge", group: "2", t: iso(1) }).state;
|
|
88
101
|
assert.deepEqual(computeGroupResidue(s), [{
|
|
89
|
-
group: "2", reason: "
|
|
102
|
+
group: "2", reason: "terminal-group-open-chunks",
|
|
103
|
+
units: [chunkUnitId("2", 1), chunkUnitId("2", 2)],
|
|
90
104
|
}]);
|
|
91
|
-
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
test("groupResidue reports open chunks of a non-terminal group outside the plan", () => {
|
|
108
|
+
// A later wave's plan replaces state.plan; a group left outside it is invisible
|
|
109
|
+
// to computeDispatchable and isComplete. Its open chunks must be surfaced.
|
|
110
|
+
let s = base();
|
|
111
|
+
s = applyEvent(s, { ev: "plan", wave: 2, concurrency: 2, units: [chunkUnitId("3", 1)], t: iso(1) }).state;
|
|
112
|
+
assert.deepEqual(computeGroupResidue(s), [{
|
|
113
|
+
group: "2", reason: "open-chunks-outside-plan",
|
|
114
|
+
units: [chunkUnitId("2", 1), chunkUnitId("2", 2)],
|
|
115
|
+
}]);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test("a failed group leaves no residue: group-fail closes its units (M17)", () => {
|
|
119
|
+
let s = base();
|
|
120
|
+
s = applyEvent(s, { ev: "group-fail", group: "2", t: iso(1) }).state;
|
|
121
|
+
assert.deepEqual(computeGroupResidue(s), []);
|
|
122
|
+
});
|
|
123
|
+
// T2: free slots go to the group with the most chunks left, so the longest group starts first
|
|
124
|
+
test("dispatchable lists the group with the most remaining chunks first", async () => {
|
|
125
|
+
const { computeDispatchable } = await import("./dispatch/reconcile.mjs");
|
|
126
|
+
let s = createState({ runId: "r-1", concurrency: 1, groups: [{ id: 2, chunks: 1 }, { id: 3, chunks: 4 }, { id: 4, chunks: 2 }] });
|
|
127
|
+
for (const G of ["2", "3", "4"]) {
|
|
128
|
+
s = applyEvent(s, { ev: "group-worktree", group: G, wtGen: 0, worktree: `WT/g${G}r0`, branch: `specpipe/g${G}r0`, base: "b" }).state;
|
|
129
|
+
}
|
|
130
|
+
const order = computeDispatchable(s, 3).map((d) => d.group);
|
|
131
|
+
assert.deepEqual(order, ["3", "4", "2"]);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// merge of T1 with the group-reopen work: each residue reason maps to its own repair
|
|
135
|
+
test("planNextActions routes each residue reason to its own repair", async () => {
|
|
136
|
+
const { planNextActions } = await import("./dispatch/reconcile.mjs");
|
|
137
|
+
const plan = planNextActions({
|
|
138
|
+
complete: false, freeSlots: 0, units: {},
|
|
139
|
+
groupResidue: [
|
|
140
|
+
{ group: "2", reason: "all-units-terminal" },
|
|
141
|
+
{ group: "3", reason: "terminal-group-open-chunks", units: ["chunk:g3c2"] },
|
|
142
|
+
{ group: "4", reason: "open-chunks-outside-plan", units: ["chunk:g4c1"] },
|
|
143
|
+
{ group: "5", reason: "failed-group-residue", units: ["chunk:g5c1"] },
|
|
144
|
+
],
|
|
145
|
+
});
|
|
146
|
+
assert.deepEqual(plan.actions.map((a) => a.do), ["queue-merge", "group-reopen-or-fail", "reinit-wave", "dispose"]);
|
|
147
|
+
assert.deepEqual(plan.actions[1].units, ["chunk:g3c2"]);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// T1: one pass of the coding loop as explicit actions
|
|
151
|
+
test("planNextActions orders the pass and picks the loop exit", async () => {
|
|
152
|
+
const { planNextActions } = await import("./dispatch/reconcile.mjs");
|
|
153
|
+
const plan = planNextActions({
|
|
154
|
+
complete: false, freeSlots: 1,
|
|
155
|
+
units: { a: { state: "live" } },
|
|
156
|
+
submitted: [{ unitId: "chunk:g2c1" }], failed: ["chunk:g3c1"], orphaned: [],
|
|
157
|
+
groupResidue: [{ group: "4", reason: "all-units-terminal" }], deadGroups: [],
|
|
158
|
+
dispatchable: [{ unitId: "chunk:g5c1", group: "5", remainingChunks: 3 }, { unitId: "chunk:g6c1", group: "6", remainingChunks: 1 }],
|
|
159
|
+
});
|
|
160
|
+
assert.deepEqual(plan.actions.map((a) => a.do), ["evidence-release", "retry-or-close", "queue-merge", "claim"]);
|
|
161
|
+
assert.equal(plan.actions.at(-1).unitId, "chunk:g5c1", "claims stop at freeSlots, longest group first");
|
|
162
|
+
assert.equal(plan.exit, "end-turn");
|
|
163
|
+
assert.equal(planNextActions({ complete: true, units: {} }).exit, "complete");
|
|
164
|
+
assert.equal(planNextActions({ complete: false, units: { a: { state: "pending" } }, freeSlots: 0 }).exit, "wait");
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
test("dispatch.mjs next prints the plan of the current ledger", () => {
|
|
168
|
+
const root = mkdtempSync(join(tmpdir(), "next-"));
|
|
169
|
+
mkdirSync(join(root, ".hometrans"), { recursive: true });
|
|
170
|
+
writeFileSync(join(root, ".hometrans", "spec_group_plan.json"), JSON.stringify({ schema: "spec_group_plan/v2", groups: [{ G: 2, chunks: [{}] }] }));
|
|
171
|
+
writeFileSync(join(root, ".hometrans", "spec_wave_plan.json"), JSON.stringify({ schema: "spec_wave_plan/v2", waves: [{ wave: 1, groups: [2] }] }));
|
|
172
|
+
const cli = join(dirname(fileURLToPath(import.meta.url)), "dispatch.mjs");
|
|
173
|
+
assert.equal(spawnSync(process.execPath, [cli, root, "init", "--wave", "1", "--concurrency", "2", "--run-id", "r-1"], { encoding: "utf8" }).status, 0);
|
|
174
|
+
const r = spawnSync(process.execPath, [cli, root, "next"], { encoding: "utf8" });
|
|
175
|
+
assert.equal(r.status, 0, r.stderr);
|
|
176
|
+
const out = JSON.parse(r.stdout);
|
|
177
|
+
assert.equal(out.complete, false);
|
|
178
|
+
assert.ok(["wait", "end-turn"].includes(out.exit));
|
|
179
|
+
});
|
|
@@ -72,3 +72,40 @@ test("a returned event advances the baseline so the next wait does not re-fire",
|
|
|
72
72
|
const second = await waitForChange({ hmos: root, state: s, baselineFile: baseline, eventFile, maxWaitSec: 0.05, pollSec: 0.01, now: iso(0), once: true });
|
|
73
73
|
assert.equal(second.code, 5);
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
// H6: the parent's own ledger writes must not wake it; a sub-agent's artifact still does
|
|
77
|
+
test("refreshBaselines moves both baselines past the parent's own writes, keeping sub-agent files as news", async () => {
|
|
78
|
+
const { refreshBaselines } = await import("./dispatch/wait.mjs");
|
|
79
|
+
const root = mk();
|
|
80
|
+
const snaps = join(root, ".hometrans", "dispatch", "snapshots");
|
|
81
|
+
const baseline = join(snaps, "waker.snapshot.json");
|
|
82
|
+
const eventFile = join(root, ".hometrans", "dispatch", "waker.event.json");
|
|
83
|
+
let s = createState({ runId: "r-1", concurrency: 1, groups: [{ id: 2, chunks: 1 }] });
|
|
84
|
+
s = applyEvent(s, { ev: "claim", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", t: iso(0) }).state;
|
|
85
|
+
await waitForChange({ hmos: root, state: s, baselineFile: baseline, eventFile, maxWaitSec: 0.01, pollSec: 0.01, now: iso(0) });
|
|
86
|
+
// the parent appends (confirm) and refreshes: no wake-up
|
|
87
|
+
writeFileSync(join(root, ".hometrans", "dispatch", "ledger.jsonl"), "confirm\n");
|
|
88
|
+
s = applyEvent(s, { ev: "intent", unit: chunkUnitId("2", 1), claimGen: iso(0), token: "aaaa", t: iso(1) }).state;
|
|
89
|
+
refreshBaselines(root, s, iso(1));
|
|
90
|
+
const quiet = await waitForChange({ hmos: root, state: s, baselineFile: baseline, eventFile, maxWaitSec: 0.05, pollSec: 0.01, now: iso(1), once: true });
|
|
91
|
+
assert.equal(quiet.code, 5, JSON.stringify(quiet));
|
|
92
|
+
// the sub-agent writes its artifact: that is news
|
|
93
|
+
const dir = join(root, ".hometrans", "spec_group_2", "chunk_1", "attempt_1");
|
|
94
|
+
mkdirSync(dir, { recursive: true });
|
|
95
|
+
writeFileSync(join(dir, "commit-info.md"), "commit-id: x\n");
|
|
96
|
+
const news = await waitForChange({ hmos: root, state: s, baselineFile: baseline, eventFile, maxWaitSec: 1, pollSec: 0.01, now: iso(1) });
|
|
97
|
+
assert.equal(news.event.kind, "artifact");
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test("a refresh written while a wait is running is picked up by that wait", async () => {
|
|
101
|
+
const { refreshBaselines } = await import("./dispatch/wait.mjs");
|
|
102
|
+
const root = mk();
|
|
103
|
+
const baseline = join(root, ".hometrans", "dispatch", "snapshots", "orch.snapshot.json");
|
|
104
|
+
const eventFile = join(root, ".hometrans", "dispatch", "orch.event.json");
|
|
105
|
+
const s = createState({ runId: "r-1", concurrency: 1, groups: [{ id: 2, chunks: 1 }] });
|
|
106
|
+
const running = waitForChange({ hmos: root, state: s, baselineFile: baseline, eventFile, maxWaitSec: 0.4, pollSec: 0.05, now: iso(0) });
|
|
107
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
108
|
+
writeFileSync(join(root, ".hometrans", "dispatch", "ledger.jsonl"), "own write\n");
|
|
109
|
+
refreshBaselines(root, s, iso(0));
|
|
110
|
+
assert.equal((await running).code, 5, "the in-flight wait re-reads the baseline and stays quiet");
|
|
111
|
+
});
|