@buaa_smat/hometrans 0.1.19 → 26.0.0-devecocli.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/build-fixer.md +406 -0
- package/agents/code-reviewer.md +461 -496
- package/agents/model-render-worker.md +34 -0
- package/agents/model-worker.md +23 -0
- package/agents/specgen-worker.md +18 -0
- package/commands/hometrans.md +17 -0
- package/devecocli-plugin/common.ts +2203 -0
- package/devecocli-plugin/install.ts +61 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +66 -0
- package/index.js +1418 -0
- package/package.json +81 -66
- package/platforms/atomcode/agents/build-fixer.frontmatter.md +6 -0
- package/platforms/atomcode/agents/code-reviewer.frontmatter.md +6 -0
- package/platforms/atomcode/agents/model-render-worker.frontmatter.md +6 -0
- package/platforms/atomcode/agents/model-worker.frontmatter.md +6 -0
- package/platforms/atomcode/agents/specgen-worker.frontmatter.md +6 -0
- package/platforms/deveco/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/deveco/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/deveco/agents/model-worker.frontmatter.md +5 -0
- package/platforms/deveco/agents/specgen-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/build-fixer.frontmatter.md +5 -0
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +5 -0
- package/platforms/opencode/agents/model-render-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/model-worker.frontmatter.md +5 -0
- package/platforms/opencode/agents/specgen-worker.frontmatter.md +5 -0
- package/plugin.jsonc +12 -0
- package/skills/a2h-app-migrate/SKILL.md +181 -0
- package/skills/a2h-app-migrate/references/config.example.json +27 -0
- package/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/skills/a2h-app-migrate/references/stage-map.md +33 -0
- package/skills/a2h-app-migrate/references/workflow.yaml +1600 -0
- package/skills/a2h-app-migrate/scripts/android_index.mjs +109 -0
- package/skills/a2h-app-migrate/scripts/check_arch_done.mjs +80 -0
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +95 -0
- package/skills/a2h-app-migrate/scripts/check_signing.mjs +152 -0
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +277 -0
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +77 -0
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +147 -0
- package/skills/a2h-app-migrate/scripts/cli_values.mjs +32 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +1388 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +651 -0
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +53 -0
- package/skills/a2h-app-migrate/scripts/json_io.mjs +35 -0
- package/skills/a2h-app-migrate/scripts/ledger.mjs +104 -0
- package/skills/a2h-app-migrate/scripts/lib-yaml-lite.mjs +288 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +713 -0
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +205 -0
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +121 -0
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +212 -0
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +30 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +455 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +80 -0
- package/skills/a2h-app-migrate/test/test_apk_preflight.mjs +63 -0
- package/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +92 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +93 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +505 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/skills/a2h-app-migrate/test/test_gate_checkpoint.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_hmos_fingerprint.mjs +68 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +91 -0
- package/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/skills/a2h-app-migrate/test/test_json_io.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_leaf_questions.mjs +109 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_parse_args.mjs +69 -0
- package/skills/a2h-app-migrate/test/test_preflight_report.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +315 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +133 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +133 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +158 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +181 -0
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +53 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +39 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +168 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-arch-generate/SKILL.md +375 -0
- package/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-android.md +103 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/skills/a2h-arch-generate/examples/simple-conversion-uniapp.md +106 -0
- package/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/skills/a2h-arch-generate/references/clustering-guidance.md +33 -0
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +45 -0
- package/skills/a2h-arch-generate/references/reconciliation-model.md +204 -0
- package/skills/a2h-arch-generate/references/scope-policy.md +28 -0
- package/skills/a2h-arch-generate/references/semantic-review.md +65 -0
- package/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/skills/a2h-arch-generate/references/source-ecosystems.md +54 -0
- package/skills/a2h-arch-generate/references/transformation-model.md +78 -0
- package/skills/a2h-arch-generate/scripts/check_module_staleness.mjs +284 -0
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +260 -0
- package/skills/a2h-arch-generate/scripts/compute_processing_order.mjs +325 -0
- package/skills/a2h-arch-generate/scripts/create_project.mjs +149 -0
- package/skills/a2h-arch-generate/scripts/dump_core_facts.mjs +151 -0
- package/skills/a2h-arch-generate/scripts/extract_core_components.mjs +167 -0
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +363 -0
- package/skills/a2h-arch-generate/scripts/generate_state.mjs +60 -0
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +326 -0
- package/skills/a2h-arch-generate/scripts/inspect_android_project.mjs +3739 -0
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +800 -0
- package/skills/a2h-arch-generate/scripts/inspect_project.mjs +251 -0
- package/skills/a2h-arch-generate/scripts/inspect_uniapp_project.mjs +809 -0
- package/skills/a2h-arch-generate/scripts/lib/py_compat.mjs +1454 -0
- package/skills/a2h-arch-generate/scripts/module_create/create.mjs +136 -0
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +636 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/build-profile.json5 +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/oh-package.json5 +10 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/applicationability/ApplicationAbility.ets +43 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/pages/Index.ets +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/module.json5 +26 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/color.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/element/string.json +16 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/background.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/foreground.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/layered_image.json +7 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/media/startIcon.png +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/resources/base/profile/main_pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/mock/mock-config.json5 +2 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/Index.ets +1 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/build-profile.json5 +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/ets/components/MainPage.ets +19 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/module.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/resources/base/element/string.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/har/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/Index.ets +1 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/build-profile.json5 +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/consumer-rules.txt +0 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/hvigorfile.ts +6 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/obfuscation-rules.txt +23 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/oh-package.json5 +10 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/pages/Index.ets +20 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/utils/Calc.ets +3 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/module.json5 +12 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/element/float.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/element/string.json +8 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/resources/base/profile/main_pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/ets/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/ohosTest/module.json5 +11 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/test/List.test.ets +5 -0
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/test/LocalUnit.test.ets +33 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/skills/a2h-arch-generate/scripts/resolve_android_stores.mjs +529 -0
- package/skills/a2h-arch-generate/scripts/scaffold_project.mjs +230 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/build.gradle +11 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/AndroidManifest.xml +12 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/MainActivity.kt +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/app/src/main/java/com/example/notes/NotesStore.kt +17 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/build.gradle +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/android_source/settings.gradle +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/AppScope/app.json5 +8 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/build-profile.json5 +14 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/common/utils/src/main/ets/utils/Format.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/home/src/main/ets/pages/Home.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/features/sync/src/main/ets/engine/SyncEngine.ets +3 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/hvigorfile.ts +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/oh-package.json5 +1 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/build-profile.json5 +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/oh-package.json5 +9 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/harmony_target/products/app/src/main/ets/pages/Index.ets +7 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/App.vue +10 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/manifest.json +6 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages/index/index.vue +16 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1122 -0
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +191 -0
- package/skills/a2h-arch-generate/scripts/tests/test_console_encoding.mjs +52 -0
- package/skills/a2h-arch-generate/scripts/tests/test_git_root.mjs +34 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +829 -0
- package/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +937 -0
- package/skills/a2h-arch-generate/scripts/validate_homegraph_artifacts.mjs +542 -0
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +415 -0
- package/skills/a2h-arkts-logic-coder/SKILL.md +125 -0
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +6 -0
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +124 -0
- package/skills/a2h-arkts-logic-coder/scripts/check_module_scope.ts +224 -0
- package/skills/a2h-arkts-logic-coder/scripts/check_mvvm.ts +377 -0
- package/skills/a2h-arkts-logic-coder/scripts/stop_check_hook.ts +443 -0
- package/skills/a2h-arkts-logic-coder/scripts/test_check_scripts.ts +211 -0
- package/skills/a2h-arkts-logic-coder/scripts/test_worktree_compat.ts +81 -0
- package/skills/a2h-batch-ui-align/SKILL.md +309 -0
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +81 -0
- package/skills/a2h-batch-ui-align/flowchart.html +271 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/conversion-procedure.md +523 -661
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
- package/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +8 -8
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +3 -0
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +32 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +211 -0
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +192 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +202 -0
- package/skills/a2h-batch-ui-align/scripts/agent_cli.mjs +572 -0
- package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/scripts/android_parse_fast.ts +246 -39
- package/skills/a2h-batch-ui-align/scripts/answers_check.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/arkts_static_check.ts +2689 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1656 -0
- package/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +258 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1524 -0
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/skills/a2h-batch-ui-align/scripts/group_commit.mjs +166 -0
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1437 -0
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +1869 -0
- package/skills/a2h-batch-ui-align/scripts/group_watch.mjs +696 -0
- package/skills/a2h-batch-ui-align/scripts/harmony_index.mjs +218 -0
- package/skills/a2h-batch-ui-align/scripts/host_env.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1229 -0
- package/skills/a2h-batch-ui-align/scripts/occlusion.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1124 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +996 -0
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +253 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +72 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +353 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +345 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +290 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +74 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_commit.test.mjs +126 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +189 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1451 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_watch.test.mjs +215 -0
- package/skills/a2h-batch-ui-align/scripts/tests/harmony_index.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/host_env.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +170 -0
- package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +130 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +57 -0
- package/skills/a2h-dashboard-render/SKILL.md +65 -0
- package/skills/a2h-dashboard-render/references/artifact-contract.jsonc +147 -0
- package/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/skills/a2h-dashboard-render/references//347/234/213/346/235/277/350/257/264/346/230/216.md +83 -0
- package/skills/a2h-dashboard-render/scripts/artifact_contract.mjs +138 -0
- package/skills/a2h-dashboard-render/scripts/check-registry.mjs +87 -0
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +3215 -0
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +2010 -0
- package/skills/a2h-dashboard-render/scripts/page_capture.mjs +828 -0
- package/skills/a2h-dashboard-render/scripts/usage_readers.mjs +459 -0
- package/skills/a2h-dashboard-render/scripts/usage_worker.mjs +13 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/broken.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/skills/a2h-dashboard-render/test/fixtures/page_capture/nested_scroll.xml +1 -0
- package/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +170 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +182 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +64 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1172 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +251 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +303 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +444 -0
- package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/SKILL.md +305 -293
- package/skills/a2h-module-semantic-docs/SKILL.md +227 -0
- package/skills/a2h-module-semantic-docs/scripts/commit_module_state.mjs +168 -0
- package/skills/a2h-module-semantic-docs/scripts/lib/py_compat.mjs +688 -0
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +1021 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/skills/a2h-resource-convert/SKILL.md +369 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/code-vector-icon-rules.md +4 -4
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/conversion-rules.md +16 -5
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/lottie-conversion-rules.md +17 -17
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/resource-mapping-rules.md +15 -4
- package/skills/a2h-resource-convert/references/step3_5-dependency-filter.md +54 -0
- package/skills/a2h-resource-convert/references/step4-qualifiers-and-values.md +142 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
- package/skills/a2h-resource-convert/references/step5-reference-resolution.md +154 -0
- package/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/references/xml-drawable-to-svg-rules.md +38 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/a2h_resource_convert.ts +456 -90
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +1072 -0
- package/skills/a2h-resource-convert/scripts/app_identity.ts +947 -0
- package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/code_vector_icons.ts +19 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +989 -0
- package/skills/a2h-resource-convert/scripts/extract_project_resources.ts +1464 -0
- package/skills/a2h-resource-convert/scripts/tests/adaptive_icon.test.mjs +182 -0
- package/skills/a2h-resource-convert/scripts/tests/app_identity.test.mjs +206 -0
- package/skills/a2h-spec-design/SKILL.md +336 -0
- package/skills/a2h-spec-design/scripts/inspect_spec_design_inputs.mjs +146 -0
- package/skills/a2h-spec-design/scripts/lib/py_compat.mjs +481 -0
- package/skills/a2h-spec-design/scripts/move_spec_technical_reference.mjs +159 -0
- package/skills/a2h-spec-design/scripts/resolve_module_design.mjs +102 -0
- package/skills/a2h-spec-design/scripts/validate_spec_design_output.mjs +285 -0
- package/skills/a2h-spec-design/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-spec-design/test/golden/move_design.md +18 -0
- package/skills/a2h-spec-design/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-spec-design/test/golden/move_spec.md +7 -0
- package/skills/a2h-spec-design/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-spec-design/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-spec-design/test/golden/validate_issues.json +57 -0
- package/skills/a2h-spec-design/test/test_spec_design_scripts.mjs +381 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +228 -0
- package/skills/a2h-spec-design-pipeline/package.json +4 -0
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +63 -0
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +69 -0
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +24 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +57 -0
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +21 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +27 -0
- package/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +21 -0
- package/skills/a2h-spec-design-pipeline/scripts/atomic_write.ts +42 -0
- package/skills/a2h-spec-design-pipeline/scripts/audit_claims.ts +252 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +77 -0
- package/skills/a2h-spec-design-pipeline/scripts/deps_ready.ts +195 -0
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +651 -0
- package/skills/a2h-spec-design-pipeline/scripts/git_baseline.ts +124 -0
- package/skills/a2h-spec-design-pipeline/scripts/inflight.mjs +944 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/bgcli.mjs +95 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +502 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_waves.ts +475 -0
- package/skills/a2h-spec-design-pipeline/scripts/reconcile.mjs +218 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +164 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_atomic_write.ts +44 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_audit_claims.ts +301 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_bgcli.mjs +64 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_branch_landed.ts +87 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_deps_ready.ts +265 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +675 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_git_baseline.ts +105 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_inflight.mjs +452 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +375 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_waves.ts +561 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_reconcile.mjs +182 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +138 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_watchdog.mjs +289 -0
- package/skills/a2h-spec-design-pipeline/scripts/watchdog.mjs +441 -0
- package/skills/a2h-spec-generate/SKILL.md +285 -0
- package/skills/a2h-spec-generate/package.json +9 -0
- package/skills/a2h-spec-generate/references/batch-mode.md +151 -0
- package/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +114 -0
- package/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/skills/a2h-spec-generate/references/recall-guide.md +83 -0
- package/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +21 -0
- package/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/skills/a2h-spec-generate/references/specs.schema.json +79 -0
- package/skills/a2h-spec-generate/references/synthesis-rules.md +143 -0
- package/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/skills/a2h-spec-generate/references/worker-rules.md +126 -0
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +514 -0
- package/skills/a2h-spec-generate/scripts/check_spec.ts +361 -0
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +470 -0
- package/skills/a2h-spec-generate/scripts/detect-project.mjs +271 -0
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +188 -0
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +150 -0
- package/skills/a2h-spec-generate/scripts/inspect-uniapp.mjs +733 -0
- package/skills/{hmos-spec-generate → a2h-spec-generate}/scripts/parse_requirements.ts +1 -1
- package/skills/a2h-spec-generate/scripts/prepare-facts.mjs +307 -0
- package/skills/a2h-spec-generate/scripts/publication-verdict.mjs +171 -0
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +280 -0
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +399 -0
- package/skills/a2h-spec-generate/scripts/report.mjs +132 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/dashboard.html +149 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-api.js +49 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-code-view.js +140 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-format.js +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-handoff.js +42 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-splitters.js +78 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-state.js +47 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-tree.js +194 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz-virtual-list.js +118 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.css +245 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.html +99 -0
- package/skills/a2h-spec-generate/scripts/reqgen/assets/viz.js +220 -0
- package/skills/a2h-spec-generate/scripts/reqgen/package-lock.json +47 -0
- package/skills/a2h-spec-generate/scripts/reqgen/package.json +23 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/agent-render/serve.ts +95 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/callback-call-sites.ts +82 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/area-ownership.ts +496 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/callback-flow.ts +386 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/index.ts +24 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/index.ts +22 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1270 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/index.ts +10 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/projection.ts +804 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/render-projection.ts +51 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/android-interaction-registry.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/builder.ts +453 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/compose-api-registry.ts +526 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/source-facts/index.ts +15 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/connector/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/connector/utg-inbound.ts +763 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/area-graph.ts +383 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/artifact.ts +68 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/common.ts +88 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/diagnostic.ts +64 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/gap-audit.ts +113 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/index.ts +12 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/name-traceability.ts +108 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/raw-fact.ts +377 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/req-model.ts +238 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/run.ts +134 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/semantic-completeness.ts +35 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/source-facts.ts +48 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/contracts/utg.ts +133 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/core/output-guard.ts +42 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/core/stable-id.ts +118 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/cross-area-tally-cli.ts +179 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dashboard-cli.ts +188 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump/dump.ts +1184 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/dump-cli.ts +373 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1014 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-output.ts +32 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +142 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +312 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +310 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +685 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/graph/paths.ts +575 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/homegraph-cli.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/android-resource-resolver.ts +391 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/androidx-preference-contracts.ts +44 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +640 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/cross-area.ts +207 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/finalizer.ts +1297 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/identity.ts +186 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/index.ts +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/planner.ts +312 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/preference-enrichment.ts +793 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/raw-facts.ts +355 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/rules.ts +271 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/scanner.ts +666 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/schema.ts +365 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/stable-key.ts +144 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +301 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/uniapp-utg-adapter.ts +543 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/xml-adapter.ts +262 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/assemble.ts +2079 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +157 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +809 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/index.ts +17 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/io.ts +165 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +806 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/query.ts +360 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/seeds.ts +218 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/spec-bindings-sidecar.ts +240 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +359 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/model-cli.ts +500 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/pipeline/index.ts +7 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/pipeline/output.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +172 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-cov/index.ts +1 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-cov/source-cov.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/area-graph.ts +490 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/index.ts +23 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-model.ts +957 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +248 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/semantic-area-graph.ts +1600 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/types.ts +10 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/artifact-data.ts +201 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-api.ts +74 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-code-view.ts +180 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-format.ts +18 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-handoff.ts +55 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-splitters.ts +78 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-state.ts +66 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-tree.ts +232 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz-virtual-list.ts +179 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/client/viz.ts +240 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/contracts.d.ts +86 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/index.ts +3 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/server.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz/source-project.ts +316 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/viz-cli.ts +200 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-fact-join.test.ts +50 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/control-name-uniapp.test.ts +75 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/cross-area-anchor.test.ts +256 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +290 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1323 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +574 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +831 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +548 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-cli-blockers.test.ts +117 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +396 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-seeds.test.ts +175 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +298 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/specgen-completeness.test.ts +286 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/stagem-stored-path.test.ts +25 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/skills/a2h-spec-generate/scripts/reqgen/tsconfig.json +16 -0
- package/skills/a2h-spec-generate/scripts/reqgen/tsconfig.viz-client.json +12 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +632 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +200 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +538 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +45 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +147 -0
- package/skills/a2h-spec-generate/test/fixtures/android/app/src/main/AndroidManifest.xml +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/build.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/android/settings.gradle +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/package.json +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/App.vue +8 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/main.ts +6 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/manifest.json +4 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/services/items.ts +3 -0
- package/skills/a2h-spec-generate/test/fixtures/uniapp-src/tsconfig.json +8 -0
- package/skills/a2h-spec-generate/test/fixtures/unknown/README.txt +1 -0
- package/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +157 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +282 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +593 -0
- package/skills/a2h-utg-explorer/SKILL.md +120 -0
- package/skills/a2h-utg-explorer/assets/final_viewer.html +64 -0
- package/skills/a2h-utg-explorer/assets/u2.LICENSE +21 -0
- package/skills/a2h-utg-explorer/assets/u2.NOTICE +25 -0
- package/skills/a2h-utg-explorer/assets/u2.jar +0 -0
- package/skills/a2h-utg-explorer/references/architecture.md +270 -0
- package/skills/a2h-utg-explorer/references/protocol.md +9 -0
- package/skills/a2h-utg-explorer/scripts/app_settings.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +167 -0
- package/skills/a2h-utg-explorer/scripts/close_phases.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +749 -0
- package/skills/a2h-utg-explorer/scripts/d_prereqs.mjs +597 -0
- package/skills/a2h-utg-explorer/scripts/device_health.mjs +227 -0
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +276 -0
- package/skills/a2h-utg-explorer/scripts/evidence.mjs +108 -0
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +258 -0
- package/skills/a2h-utg-explorer/scripts/promote_dynamic.mjs +170 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +467 -0
- package/skills/a2h-utg-explorer/scripts/recover_b.mjs +542 -0
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +203 -0
- package/skills/a2h-utg-explorer/scripts/report.mjs +143 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +831 -0
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +137 -0
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/coverage_rules.test.mjs +104 -0
- package/skills/a2h-utg-explorer/scripts/tests/d_prereqs.test.mjs +223 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +88 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +187 -0
- package/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/skills/a2h-utg-explorer/scripts/tests/explorer_review_fixes.test.mjs +136 -0
- package/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/skills/a2h-utg-explorer/scripts/tests/first_round_phases.test.mjs +16 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +251 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +42 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +162 -0
- package/skills/a2h-utg-explorer/scripts/tests/node_coverage.test.mjs +193 -0
- package/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +355 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover.test.mjs +212 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +207 -0
- package/skills/a2h-utg-explorer/scripts/tests/review_fixes.test.mjs +213 -0
- package/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle.test.mjs +453 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +131 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +321 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/u2_backend.test.mjs +346 -0
- package/skills/a2h-utg-explorer/scripts/tests/ui_state_anchors.test.mjs +112 -0
- package/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/tests/worklist_parts.test.mjs +24 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/_device_io.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/_py.mjs +2097 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +1213 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/attest.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/chain.mjs +63 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/coverage.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/device_lock.mjs +46 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1136 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +1513 -0
- package/skills/a2h-utg-explorer/scripts/variant.mjs +75 -0
- package/skills/a2h-utg-explorer/scripts/worklist_parts.mjs +122 -0
- package/skills/a2h-utg-static/SKILL.md +361 -0
- package/skills/a2h-utg-static/config.json +19 -0
- package/skills/a2h-utg-static/references/extractors.md +217 -0
- package/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/skills/a2h-utg-static/scripts/_graph.mjs +361 -0
- package/skills/a2h-utg-static/scripts/_py.mjs +2177 -0
- package/skills/a2h-utg-static/scripts/_spawn.mjs +45 -0
- package/skills/a2h-utg-static/scripts/activity_nav.mjs +738 -0
- package/skills/a2h-utg-static/scripts/activity_widgets.mjs +254 -0
- package/skills/a2h-utg-static/scripts/adapter_nav.mjs +229 -0
- package/skills/a2h-utg-static/scripts/androidfragment_nav.mjs +208 -0
- package/skills/a2h-utg-static/scripts/assemble.mjs +2065 -0
- package/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/skills/a2h-utg-static/scripts/carry_answers.mjs +201 -0
- package/skills/a2h-utg-static/scripts/click_paths.mjs +594 -0
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +172 -0
- package/skills/a2h-utg-static/scripts/compose_merge.mjs +263 -0
- package/skills/a2h-utg-static/scripts/compose_nav.mjs +1216 -0
- package/skills/a2h-utg-static/scripts/compose_navbar_nav.mjs +238 -0
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +2760 -0
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +365 -0
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/skills/a2h-utg-static/scripts/dialog_listener_nav.mjs +237 -0
- package/skills/a2h-utg-static/scripts/dialogshow_nav.mjs +308 -0
- package/skills/a2h-utg-static/scripts/fragfactory_nav.mjs +170 -0
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +1136 -0
- package/skills/a2h-utg-static/scripts/guard_subjects.mjs +162 -0
- package/skills/a2h-utg-static/scripts/hg_query.mjs +137 -0
- package/skills/a2h-utg-static/scripts/host_resolve.mjs +393 -0
- package/skills/a2h-utg-static/scripts/hybrid_bundle.mjs +165 -0
- package/skills/a2h-utg-static/scripts/hybrid_pages.mjs +713 -0
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
- package/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/skills/a2h-utg-static/scripts/io_utils.mjs +59 -0
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +864 -0
- package/skills/a2h-utg-static/scripts/launch_extras.mjs +91 -0
- package/skills/a2h-utg-static/scripts/layout_resolve.mjs +148 -0
- package/skills/a2h-utg-static/scripts/manifest.mjs +483 -0
- package/skills/a2h-utg-static/scripts/measure/measure_corpus.mjs +297 -0
- package/skills/a2h-utg-static/scripts/measure/measure_guards.mjs +98 -0
- package/skills/a2h-utg-static/scripts/media_browse_nav.mjs +356 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +603 -0
- package/skills/a2h-utg-static/scripts/navactions_nav.mjs +255 -0
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +453 -0
- package/skills/a2h-utg-static/scripts/orphan_overlay_nav.mjs +89 -0
- package/skills/a2h-utg-static/scripts/phase_plan.mjs +108 -0
- package/skills/a2h-utg-static/scripts/phase_planner.mjs +119 -0
- package/skills/a2h-utg-static/scripts/plaindialog_nav.mjs +411 -0
- package/skills/a2h-utg-static/scripts/preference_nav.mjs +761 -0
- package/skills/a2h-utg-static/scripts/preference_widgets.mjs +142 -0
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/skills/a2h-utg-static/scripts/registry_nav.mjs +288 -0
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +870 -0
- package/skills/a2h-utg-static/scripts/scope_utils.mjs +430 -0
- package/skills/a2h-utg-static/scripts/screen_merge.mjs +287 -0
- package/skills/a2h-utg-static/scripts/screen_nav.mjs +279 -0
- package/skills/a2h-utg-static/scripts/single_host_nav.mjs +291 -0
- package/skills/a2h-utg-static/scripts/starter_nav.mjs +198 -0
- package/skills/a2h-utg-static/scripts/state_guard.mjs +579 -0
- package/skills/a2h-utg-static/scripts/static_prior.mjs +904 -0
- package/skills/a2h-utg-static/scripts/tests/_zipw.mjs +28 -0
- package/skills/a2h-utg-static/scripts/tests/probe_autoload.mjs +108 -0
- package/skills/a2h-utg-static/scripts/tests/probe_layout_fragments.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/probe_unknown_scope.mjs +61 -0
- package/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_alias_launcher.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_supertype_chain.mjs +106 -0
- package/skills/a2h-utg-static/scripts/tests/test_bottom_sheet_container.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_branch_guard.mjs +19 -0
- package/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_commit_scope.mjs +113 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_file_private_route.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_nested_graph.mjs +166 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_route_holder_collision.mjs +112 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +267 -0
- package/skills/a2h-utg-static/scripts/tests/test_custom_source_root.mjs +71 -0
- package/skills/a2h-utg-static/scripts/tests/test_defensive_null_guard.mjs +77 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_orphan_entries.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_page_owner.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_builder_forms.mjs +96 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_java_factory.mjs +37 -0
- package/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_dedupe_by_gesture.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_provenance_lint.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_enclosing_gesture.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_external_surface_roots.mjs +43 -0
- package/skills/a2h-utg-static/scripts/tests/test_find_package_indirect.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_forwarding_wrapper.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_containment.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_helper_trigger.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_graph.mjs +55 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_clause.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +119 -0
- package/skills/a2h-utg-static/scripts/tests/test_host_kind_by_chain.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/skills/a2h-utg-static/scripts/tests/test_interaction_sites.mjs +272 -0
- package/skills/a2h-utg-static/scripts/tests/test_item_data_instance.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_kotlin_fn_spans.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_layout_declared_fragment.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_call_forms.mjs +79 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_receiver_binding.mjs +47 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_exported_default.mjs +40 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_filters_modules.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_srcfile.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_namespace.mjs +33 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/skills/a2h-utg-static/scripts/tests/test_multiple_entry_contracts.mjs +80 -0
- package/skills/a2h-utg-static/scripts/tests/test_nav_graph_xml.mjs +35 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_node_id_collision.mjs +57 -0
- package/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/skills/a2h-utg-static/scripts/tests/test_out_of_scope_and_settings.mjs +72 -0
- package/skills/a2h-utg-static/scripts/tests/test_overload_and_climb.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_page_source.mjs +78 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_position_zero.mjs +65 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_variant_guard.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +107 -0
- package/skills/a2h-utg-static/scripts/tests/test_plain_dialog_nodes.mjs +167 -0
- package/skills/a2h-utg-static/scripts/tests/test_plaindialog_shared_anchor.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_click_nav.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_host_binding.mjs +87 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_nesting.mjs +183 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_resolver_tier_parity.mjs +126 -0
- package/skills/a2h-utg-static/scripts/tests/test_result_launcher.mjs +142 -0
- package/skills/a2h-utg-static/scripts/tests/test_review_fixes.mjs +135 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +66 -0
- package/skills/a2h-utg-static/scripts/tests/test_same_name_decl_scope.mjs +236 -0
- package/skills/a2h-utg-static/scripts/tests/test_scope_utils.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_overlay_split.mjs +63 -0
- package/skills/a2h-utg-static/scripts/tests/test_slug_parity.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_starter_node_id.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_arity.mjs +109 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_commented_candidates.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_model_gates.mjs +127 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_method_layout.mjs +81 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_trigger_id_spelling.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_action_override.mjs +91 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_nl_hint_key.mjs +89 -0
- package/skills/a2h-utg-static/scripts/tests/test_uiless_host_fold.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_click_refs.mjs +104 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_id_label.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_interactions.mjs +346 -0
- package/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +273 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_widget_class_scope.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_window_nav_kotlin.mjs +158 -0
- package/skills/a2h-utg-static/scripts/tests/test_worklist_parts.mjs +65 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1119 -0
- package/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/skills/a2h-utg-static/scripts/utg_html.mjs +721 -0
- package/skills/a2h-utg-static/scripts/view_interactions.mjs +799 -0
- package/skills/a2h-utg-static/scripts/view_widgets.mjs +512 -0
- package/skills/a2h-utg-static/scripts/viewpage_nav.mjs +485 -0
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +422 -0
- package/skills/a2h-utg-static/scripts/window_nav.mjs +240 -0
- package/skills/a2h-utg-static/scripts/worklist_parts.mjs +154 -0
- package/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/skills/a2h-utg-static/tools/package.json +3 -0
- package/README.md +0 -427
- package/agents/logic-coder.md +0 -224
- package/agents/logic-context-builder.md +0 -212
- package/agents/scripts/hmos-precheck/backends/arkts.mjs +0 -567
- package/agents/scripts/hmos-precheck/backends/arkts_diff.mjs +0 -159
- package/agents/scripts/hmos-precheck/backends/arkts_project_rules.mjs +0 -398
- package/agents/scripts/hmos-precheck/backends/codelinter.mjs +0 -250
- package/agents/scripts/hmos-precheck/backends/project_integrity.mjs +0 -321
- package/agents/scripts/hmos-precheck/backends/static_precheck.mjs +0 -247
- package/agents/scripts/hmos-precheck/core/config.mjs +0 -184
- package/agents/scripts/hmos-precheck/core/diagnostic_scope.mjs +0 -20
- package/agents/scripts/hmos-precheck/core/process_adapter.mjs +0 -47
- package/agents/scripts/hmos-precheck/core/project_catalog.mjs +0 -50
- package/agents/scripts/hmos-precheck/core/result_projection.mjs +0 -147
- package/agents/scripts/hmos-precheck/core/scope_plan.mjs +0 -131
- package/agents/scripts/hmos-precheck/core/sdk_context.mjs +0 -67
- package/agents/scripts/hmos-precheck/docs/architecture.md +0 -37
- package/agents/scripts/hmos-precheck/docs/performance-optimization.md +0 -28
- package/agents/scripts/hmos-precheck/docs/upstream-reference.json +0 -19
- package/agents/scripts/hmos-precheck/docs/validation.md +0 -50
- package/agents/scripts/hmos-precheck/index.mjs +0 -17
- package/agents/scripts/hmos-precheck/invocation.mjs +0 -231
- package/agents/scripts/hmos-precheck/rules/rule_case_matrix.csv +0 -32
- package/agents/scripts/hmos-precheck/rules/rule_inventory.csv +0 -64
- package/agents/scripts/hmos-precheck/rules/rule_inventory.mjs +0 -59
- package/agents/scripts/hmos-precheck/rules/rule_policy.mjs +0 -54
- package/agents/scripts/platform_query.mjs +0 -626
- package/agents/scripts/platform_query.test.mjs +0 -422
- package/agents/self-test-fixer.md +0 -298
- package/agents/self-tester.md +0 -376
- package/agents/test-case-generation-generator.md +0 -317
- package/agents/test-case-generation-validator.md +0 -231
- package/dist/cli/config-store.js +0 -390
- package/dist/cli/config.js +0 -46
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -56
- package/dist/cli/init.js +0 -1194
- package/dist/cli/uninstall.js +0 -427
- package/dist/utils/regex.js +0 -8
- package/env-requirements.json +0 -178
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -103
- package/resource/project_architecture.svg +0 -122
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +0 -413
- package/skills/hmos-batch-ui-align/scripts/arkts_static_check.ts +0 -1592
- package/skills/hmos-batch-ui-align/scripts/measure_pack.ts +0 -752
- package/skills/hmos-convert-pipeline/SKILL.md +0 -476
- package/skills/hmos-incremental-ui-align/README.md +0 -251
- package/skills/hmos-incremental-ui-align/SKILL.md +0 -375
- package/skills/hmos-incremental-ui-align/diff_analysis.md +0 -53
- package/skills/hmos-incremental-ui-align/page_align.md +0 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +0 -38
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +0 -2089
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +0 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +0 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +0 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +0 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -903
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +0 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +0 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +0 -355
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +0 -11
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md +0 -206
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md +0 -373
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md +0 -158
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md +0 -750
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md +0 -1704
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md +0 -1012
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md +0 -164
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md +0 -840
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md +0 -856
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md +0 -83
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md +0 -294
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +0 -1220
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +0 -47
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md +0 -840
- package/skills/hmos-incremental-ui-align/references/State_Model_Template.md +0 -74
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +0 -34
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +0 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +0 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +0 -117
- package/skills/hmos-incremental-ui-align/scripts/app_feature_verify.ts +0 -937
- package/skills/hmos-incremental-ui-align/scripts/extract_checklist.ts +0 -343
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +0 -76
- package/skills/hmos-incremental-ui-align/scripts/page_capture.ts +0 -977
- package/skills/hmos-incremental-ui-align/scripts/page_capture_burst.ts +0 -188
- package/skills/hmos-integration-test/README.md +0 -300
- package/skills/hmos-integration-test/SKILL.md +0 -397
- package/skills/hmos-resources-convert/SKILL.md +0 -891
- package/skills/hmos-spec-generate/SKILL.md +0 -404
- package/skills/hmos-test-case-generation/README.md +0 -241
- package/skills/hmos-test-case-generation/SKILL.md +0 -324
- package/skills/hmos-test-case-generation/references/contract.md +0 -315
- package/skills/hmos-test-case-generation/references/review-notes-template.md +0 -84
- package/skills/hmos-test-case-generation/references/ui-elements-schema.md +0 -142
- package/skills/hmos-test-case-generation/tools/convert_to_ui_elements.ts +0 -550
- package/skills/hmos-test-case-generation/tools/validate.ts +0 -1312
- package/tools/bfs-crawl/README.md +0 -73
- package/tools/bfs-crawl/android_viewtree_bfs_crawler.ts +0 -1662
- package/tools/test-tools/autotest/config.ts +0 -175
- package/tools/test-tools/autotest/deps/autotest-agent-0.1.1.tgz +0 -0
- package/tools/test-tools/autotest/docs/README.md +0 -266
- package/tools/test-tools/autotest/docs/testcases_schema.md +0 -143
- package/tools/test-tools/autotest/engine/batch-launcher.ts +0 -327
- package/tools/test-tools/autotest/engine/report-tool.ts +0 -773
- package/tools/test-tools/autotest/engine/self-test-runner.ts +0 -961
- package/tools/test-tools/autotest/engine/testcases-tool.ts +0 -246
- package/tools/test-tools/autotest/paths.ts +0 -41
- package/tools/test-tools/autotest/resolve-metadata-tool.ts +0 -143
- package/tools/test-tools/autotest/runner/logger.ts +0 -45
- package/tools/test-tools/autotest/runner/process-utils.ts +0 -41
- package/tools/test-tools/autotest/validate.ts +0 -167
- /package/skills/{hmos-batch-ui-align/references/mvvm-v2/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md" → a2h-arch-generate/references/arkts-mvvm-v2.md} +0 -0
- /package/{README.en.md → skills/a2h-arch-generate/scripts/module_create/har/consumer-rules.txt} +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/!!/350/257/255/346/263/225/357/274/232/345/217/214/345/220/221/347/273/221/345/256/232.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Computed/350/243/205/351/245/260/345/231/250/357/274/232/350/256/241/347/256/227/345/261/236/346/200/247.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Event/350/243/205/351/245/260/345/231/250/357/274/232/350/247/204/350/214/203/347/273/204/344/273/266/350/276/223/345/207/272.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Local/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/351/203/250/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Monitor/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/344/277/256/346/224/271/345/274/202/346/255/245/347/233/221/345/220/254.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@ObservedV2/350/243/205/351/245/260/345/231/250/345/222/214@Trace/350/243/205/351/245/260/345/231/250/357/274/232/347/261/273/345/261/236/346/200/247/345/217/230/345/214/226/350/247/202/346/265/213.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Once/350/243/205/351/245/260/345/231/250/357/274/232/345/210/235/345/247/213/345/214/226/345/220/214/346/255/245/344/270/200/346/254/241.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Param/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/244/226/351/203/250/350/276/223/345/205/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Provider/350/243/205/351/245/260/345/231/250/345/222/214@Consumer/350/243/205/351/245/260/345/231/250/357/274/232/350/267/250/347/273/204/344/273/266/345/261/202/347/272/247/345/217/214/345/220/221/345/220/214/346/255/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/@Type/350/243/205/351/245/260/345/231/250/357/274/232/346/240/207/350/256/260/347/261/273/345/261/236/346/200/247/347/232/204/347/261/273/345/236/213.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/AppStorageV2/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200UI/347/212/266/346/200/201/345/255/230/345/202/250.md" +0 -0
- /package/skills/{hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243V2 → a2h-batch-ui-align/references/mvvm-v2}/MVVM/346/250/241/345/274/217/357/274/210V2/357/274/211.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/PersistenceV2/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md" +0 -0
- /package/skills/{hmos-batch-ui-align → a2h-batch-ui-align}/references/mvvm-v2//347/212/266/346/200/201/347/256/241/347/220/206V1/345/220/221V2/350/277/201/347/247/273/344/270/216/346/267/267/347/224/250/346/214/207/345/257/274.md" +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/arkts-strict-patterns.md +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/known-patterns.md +0 -0
- /package/skills/{hmos-fix-build-errors → a2h-fix-build-errors}/references/rdb-entity-pattern.md +0 -0
- /package/skills/{hmos-resources-convert → a2h-resource-convert}/references/dependency-analysis-rules.md +0 -0
- /package/skills/{hmos-resources-convert → a2h-resource-convert}/scripts/svg_fidelity_check.ts +0 -0
- /package/skills/{hmos-spec-generate → a2h-spec-generate}/template/REQ.txt +0 -0
- /package/skills/{hmos-spec-generate → a2h-spec-generate}/template/REQ.xlsx +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# B1 — Parallel coding: ledger protocol, event loop, turn-end guard, chunk contract
|
|
2
|
+
|
|
3
|
+
Apply this file **verbatim**. Read it before entering the wave loop and re-read the section that applies
|
|
4
|
+
on every wakeup. `SKILL.md` carries the navigation summary; this file is the authoritative B1 discipline.
|
|
5
|
+
Its numbering (event-loop steps 1–4, turn-end items 1–4, the guard bullets) is cross-referenced by B2,
|
|
6
|
+
the fail-soft rules, and `references/execution-model.md`.
|
|
7
|
+
|
|
8
|
+
### B1 — Parallel coding (chunked, per-group serial, background-dispatched)
|
|
9
|
+
|
|
10
|
+
Chunk sub-agents are dispatched with the `Agent` tool in **background mode** (`background: true`). Maintain a **chunk pointer per group** (`state.groups[G].chunks[k].status`: `pending` → `in_flight` → `done`/`failed`); at any moment each group has at most one chunk sub-agent in flight; up to `WAVE_WIDTH` chunk agents run concurrently; at most one merge (B2) is ever in progress.
|
|
11
|
+
|
|
12
|
+
**In-flight ledger (the dropped-notification defense).** The session only wakes on background notifications — a chunk agent that finishes with its notification lost looks exactly like one still coding, and the wave waits forever. The defense is mechanical: every background dispatch is registered on disk **before** it leaves, and a watchdog sentinel holds a wakeup independently of any notification. At W0 (every wave, idempotent): `node <skill-dir>/scripts/inflight.mjs <HMOS> configure --concurrency <WAVE_WIDTH>`. Then **every** background dispatch — chunk, retry, resolver, release-time chunk 1 — follows this protocol, no exceptions:
|
|
13
|
+
|
|
14
|
+
1. **Add before dispatch.** `node <skill-dir>/scripts/inflight.mjs <HMOS> add chunk:g<G>c<k> --phase chunk --target g<G>c<k>` (resolver: `add resolver:g<G> --phase resolver --target g<G>`). The printed `dispatchedAt` is the generation stamp.
|
|
15
|
+
2. **Dispatch** with `unitId` and `dispatchedAt` in the prompt; the return JSON **must echo both** (`"unitId": "chunk:g<G>c<k>", "dispatchedAt": "<echo>"`) — every receipt is self-identifying, no sessionID bookkeeping.
|
|
16
|
+
3. **On the receipt** (success or failure): persist the raw JSON to `<HMOS>/.hometrans/receipts/<sanitized unitId>/<sanitized dispatchedAt>.json` — sanitize each path component by replacing every character outside `[A-Za-z0-9_-]` with `-` (`:` and `.` are illegal/awkward in Windows path components): `receipts/chunk-g2c1/2026-10-22T13-16-42-125Z.json`. On **success**: remove the completed unit **first** — `node <skill-dir>/scripts/inflight.mjs <HMOS> remove <unitId> --expect-dispatched-at <echo> --from-receipt <file>` — then dispatch the successor (a step-1 add) and apply the state marks. The remove-first order is deliberate: the concurrency guard counts active rows, and at full-wave occupancy a completed-but-unremoved row would block the successor's add; the remove→add crash window is covered twice — in-session by the turn-end reconcile (the so-id rule re-derives the position and re-dispatches), across sessions by the resume ledger reset. On **failure**: take the retry path (below) or record `inflight.mjs failure <unitId> --from-receipt <file>` and apply the failure state marks; the row is then already terminal — remove without `--from-receipt`.
|
|
17
|
+
|
|
18
|
+
A retry is the in-place `add <unitId> --phase <p> --target <t> --after <current dispatchedAt> --from-receipt <failure receipt>` — **never** remove→add. A receipt whose `dispatchedAt` echo does not match the ledger's current generation is stale — report it and ignore: a zombie agent's late output never mutates a newer generation. **Harness-error dispatch failure** (the Agent call itself errors in-turn — no sessionID, no receipt; the row was added first, so the phantom is visible on disk): write the failure receipt yourself from the in-context error — `{ "ok": false, "unitId": "<id>", "dispatchedAt": "<the row's>", "note": "harness dispatch error" }` into `receipts/<sanitized unitId>/…` — and take the receipt-bound in-place retry (1×; a second harness error → the unit's normal second-failure path: chunk → group `failed`; resolver → the ladder advances to hop (b)/(c)). Never leave the row to the ladder when the error is in hand; the ladder is for the silent case. A re-code or re-dispatch over a **tombstoned** unit (a completed group's chunk rows are tombstoned by their success removes) passes `--after <that unitId's tombstone generation>` — read it from `<HMOS>/.hometrans/tombstones.json` (reading is fine; only editing is forbidden); a success tombstone is terminal, so no failure receipt is required. The ledger file (`<HMOS>/.hometrans/spec_pipeline_inflight.json`) is written ONLY by `inflight.mjs` — never hand-edit it, never let another script touch it.
|
|
19
|
+
|
|
20
|
+
**Event loop.** After W0: dispatch chunk 1 of every **ready** member (background — each dispatch through the ledger protocol above), mark the chunks `in_flight`, then end the turn and wait for notifications — `held` members are not dispatched; the release trigger below starts them. Notifications come from chunk agents, the B2 conflict resolver, and the watchdog sentinel. On each completion notification:
|
|
21
|
+
|
|
22
|
+
1. Parse the return JSON; the `unitId` echo identifies the unit (`chunk:g<G>c<k>` / `resolver:g<G>`), and its `dispatchedAt` must match the ledger's current generation — a **mismatch**, a unit with **no row**, or an **`accepted`/`outcome` row** is a stale receipt: report it and ignore (the group was already disposed; a zombie's late output never mutates a newer generation, and an accepted/outcome row is audit-only). The one exception is an **`orphaned`** row: its late receipt is exactly what the orphan retains ownership for — process it normally, and the success receipt removes the row (`remove --from-receipt` works on an orphaned row). A notification that is missing or unparseable reconciles from the worktree's git log — the so-id-prefix resume rule below already computes the position.
|
|
23
|
+
2. `ok` → if G has a next chunk: remove the completed unit (`remove <unitId> --expect-dispatched-at <echo> --from-receipt <receipt>`), then ledger-add the successor unit **and dispatch it now** (background, same worktree) **before** updating state, then mark the chunk `done` and the next `in_flight` (the dispatch-before-marks order is deliberate — the reverse strands an `in_flight` chunk with no session; the remove-first order feeds the concurrency guard — the protocol above). If G has no next chunk → mark the chunk `done`, set `state.groups[G].status = "coded"`, record `state.groups[G].audit = { base: <the group's coding base — `WAVE_BASE`, the hop-b reset HEAD of a re-coded group, or the release-fork HEAD (`coding_base`) of a held-then-released member>, tip: `git -C <worktree> rev-parse HEAD` }` (the frozen coder snapshot B2 step 0 audits — recorded before any merge or resolver can mutate the branch), enqueue G's merge into the B2 queue, and remove the completed unit the same way.
|
|
24
|
+
3. Failure → retry **once**: the receipt-bound in-place retry (`add <unitId> --phase chunk --target <t> --after <echo> --from-receipt <failure receipt>`), then dispatch the retry now (background, same worktree, resume from last committed so-id) — the chunk stays `in_flight` through the retry. A second failure → `inflight.mjs failure <unitId> --from-receipt <file>` (records the terminal `ended-failed` row), mark the chunk `failed` and the whole group `failed`, drop its queued merge if any, discard its worktree branch (W0's discard path), then `remove <unitId> --expect-dispatched-at <echo>` — the wave continues.
|
|
25
|
+
4. **Resolver completion** (the receipt's `unitId` is `resolver:g<G>`): `ok` → `PRE = git -C <HMOS> rev-parse HEAD`, then land the resolver's merge with `git -C <HMOS> merge --no-ff --no-edit specpipe/g<G>` (main is frozen during the resolver's run, so this cannot fail; if it ever does → `git -C <HMOS> merge --abort`, reconcile as a resolver failure). Record the group's net-change range for B4 as `PRE..<merge-commit>` and set the group `merged` (specs to `stage: "B"`) — the turn-end drain below pops the next queued merge. Failure or unparseable → reconcile from the worktree's git state: merge committed → same as `ok`; otherwise `git -C <worktree> merge --abort` and take ladder hop (b). Then dispose of the resolver unit: `remove resolver:g<G> --expect-dispatched-at <echo> --from-receipt <receipt>` (after a failure, `inflight.mjs failure` makes the row terminal — then the plain remove; an unparseable receipt with the merge committed → the plain `--force --reason` remove — the reconciled git state is the evidence).
|
|
26
|
+
|
|
27
|
+
**Turn-end sequence (every turn, in this order).**
|
|
28
|
+
|
|
29
|
+
1. **Reconcile in-flight.** Run `node <skill-dir>/scripts/inflight.mjs <HMOS> show` first — it self-heals rows whose completion is already certain in the state (chunk `done` / resolver's group `merged`) and reports `active / stale / unknown / ended / orphaned / outcome / accepted / unresolved / barrierClear / free`. Then align state with the session's live dispatches (a live entry exists only once its subagent call returned a sessionID; the ledger's active rows are the durable cross-check). Chunk level, both directions: a live entry whose chunk is still `pending` → mark it `in_flight`; a chunk marked `in_flight` with no live entry **and no active ledger row** → a handler was interrupted mid-chain. A current-wave group past W0 that is still `pending` **and holds a worktree** must be covered by a live session or an active ledger row. A `pending` member **with no worktree** (the dispatch-hold state; chunk marks are commentary, not the criterion — a worktree-bearing group with all chunks `pending` is the ordinary coding-incomplete case, already correct) routes by its `deps_ready.ts` verdict: `held` → not dispatched; `ready` → the release procedure (item 3), **never a bare chunk dispatch**. Any mismatch recovers the same way: reconcile the group's chunk marks from the worktree's git log (step 1's rule — a chunk whose so-ids are all committed counts as `done`), then dispatch the first chunk that is neither `done` nor covered by a live session or an active ledger row (background, same worktree, the ledger protocol); when every chunk is `done`, finish the handler instead — set `coded`, record the `audit` pair (step 2's rule), enqueue the merge. A parked merge queue implies a resolver entry — a missing one (no row, no tombstone) → re-dispatch ladder hop (a) (a lost dispatch does not consume the 1×); an active-but-sessionless or terminal one → guard item 4's merge-queue rule handles it (the sentinel walks an active row to a terminal state first). A group marked `coded` must hold a queued, resolver-backed, or already-merged merge — already-merged (`branch_landed.ts` → `landed: true`) but still `coded` → set `merged` and specs `stage: "B"`, re-deriving its B4 net-change range if unrecorded; no merge at all → enqueue it now.
|
|
30
|
+
2. **Drain the merge queue.** If no merge is in progress and the queue is non-empty, pop the next merge (B2 step 1) — a normal merge is an orchestrator shell command, completing in-turn; a conflict dispatches the background resolver (ladder hop a) and parks the queue until event-loop step 4 lands it. **Keep popping until the queue empties or a pop conflicts.**
|
|
31
|
+
3. **Deps release sweep (the chain's tail).** Run `node <skill-dir>/scripts/deps_ready.ts <HMOS> --wave <K>` (a pure function of plan deps + group/chunk statuses — every sweep re-derives the whole hold state). A nonzero exit → record it and skip this sweep; the next turn end retries it (item 4 forces that retry when nothing else is live). A **flat** wave (its entry carries `mode: "flat"`) yields `ready` for every pending member — the sweep then releases anything not yet dispatched, exactly as for deps-mode waves. For every member newly in `released` (ready ∧ all chunks still `pending` — a group already coding is never re-released): remove a leftover `WT/g<G>` first (`worktree remove --force`, else `worktree prune` — a held member has no legal worktree, W0 step 3), then delete a stale branch (`git -C <HMOS> branch -D specpipe/g<G>` if it exists), then **record `state.groups[G].coding_base = <current main HEAD>` BEFORE `git -C <HMOS> worktree add WT/g<G> -b specpipe/g<G> <coding_base>`** (the order is deliberate — no "worktree without coding_base" crash window; a re-release overwrites the field and self-heals). Worktree creation failure → fail-soft: mark the group `failed`, record it, the wave continues. If the worktree was created, build its index next (before any coder exists) exactly as W0 does: `node <skill-dir>/scripts/ensure_wt_index.ts <HMOS> WT/g<G>` (skip when `ENGINE_MODE=off`) — record `action`/`reason`/`detail`; exit 1 is degraded (the coder falls back to grep/read), never a release failure. Then ledger-add `chunk:g<G>c1` and dispatch chunk 1 (background, the same chunk contract — the ledger protocol above), mark it `in_flight`, and record the release in the wave log (held-then-released, with its `coding_base`). A release never takes an extra concurrency slot — the ≤ `WAVE_WIDTH` bound is unchanged.
|
|
32
|
+
4. **Guard — never strand anything that cannot wake itself.** The session resumes only on a background completion notification, a **watchdog sentinel exit**, or user input. Evaluate in order, **re-running from the top after any action** until a rule fires terminally (proceed to B3) or a live dispatch/resolver licenses the turn-end:
|
|
33
|
+
- **Merge-queue rule.** A non-empty merge queue with no live resolver entry and no in-progress resolver-backed merge → keep popping until the queue empties or a pop conflicts (the conflict's background resolver then licenses the turn-end) — no resolver row at all, or a disposed (`accepted`) one, means the queue is unblocked. A **parked resolver-backed merge whose resolver row is terminal — `orphaned` (the phantom/zombie dispatch: never re-dispatchable, and with no active row no wakeup source remains) or `outcome` — disposes identically regardless of what is queued behind it** (including nothing — the wave's last merge): `inflight.mjs accept resolver:g<G> --force --ack-agent-may-still-run --reason "resolver orphaned"` (an `outcome` row is already terminal — plain `remove`), `git -C <worktree> merge --abort` (the hop-a setup's in-progress merge), then advance the ladder **without hop (a)** — the phantom dispatch consumed hop (a)'s 1× — hop (b) group re-code if its 1× is unconsumed, else hop (c) fail-soft (group `failed`, merge dropped); then re-run this guard from the top. A parked merge with a live resolver session or an **active** resolver row waits — an active-but-sessionless row is the ladder's to resolve (the sentinel stays armed and walks it to `orphan`, whose wakeup re-runs this rule).
|
|
34
|
+
- Queue empty, no live session, and **no active ledger row** → nothing can progress on its own (the ordinary case: every member `merged`/`failed`). Run the wave-end disposal, in order: (a) a member still **coding** whose ledger row is `orphaned` — the group can no longer progress (orphaned rows are never re-dispatched over, and with no active row no wakeup source remains) → `inflight.mjs accept <unitId> --force --ack-agent-may-still-run --reason "wave drained, orphaned"` + group `failed`; (b) an `ended` row (confirmed, no outcome yet) — normally resolved by the wakeup `ended` rung before this point (an `ended` row is **active** and keeps the sentinel waking until handled); if one is present here anyway → the wakeup `ended` disposal (recovery if so-id coverage is complete; `inflight.mjs outcome <unitId> --outcome ended-incomplete --reason ...` + group `failed` otherwise) — then `remove --expect-dispatched-at <echo>` (the row is terminal either way); (c) an `outcome` row → group `failed` (worktree discarded, W0's path), then `remove` (already terminal); (d) any other `orphaned` row → `inflight.mjs accept <unitId> --force --ack-agent-may-still-run --reason "wave-end fail-soft"` — the accepted row is the audit record (an `agentMayStillRun` zombie may still exist; the failed-group-residue path may reap it after `residue-after` minutes, and the Finalization ledger clear reaps the rest); (e) an `invalid` row → repair or `remove --force --reason` (the `invalid` rung) — never left to re-check. Then re-check: every member `merged`/`failed` **and** `inflight.mjs show` reports `barrierClear: true` → stop the sentinel (`node <skill-dir>/scripts/watchdog.mjs <HMOS> --stop` — idempotent) → wiring application → B3 **in the same turn**.
|
|
35
|
+
- Queue empty, no live session, yet a member still `pending` **and not covered by an active ledger row** (that shape is the reconcile's/ladder's to resolve) → never end the turn (nothing would wake it): re-run item 3 now; members it still holds can never be released — mark them `failed` (`deps never satisfied`, with `behind`) and re-run this guard from the top.
|
|
36
|
+
|
|
37
|
+
**Sentinel arming rule** (checked last, every turn end): if the ledger holds any **active** row and no watchdog is in place (`node <skill-dir>/scripts/watchdog.mjs <HMOS> --probe` → `inPlace: false`), arm one — dispatch a general-purpose sub-agent in **background mode** whose entire task is ONE shell call (timeout 0): `node <skill-dir>/scripts/watchdog.mjs <HMOS> --interval 300 --stale-after 30 --residue-after 90`; its final message is only `{ "code": <exit>, "output": "<stdout>" }`. It occupies no concurrency slot and is never a ledger entry. If the harness caps background shell duration, the sentinel loops the degraded `--once` form in one shell (exit on any code ≠ 5, `sleep <interval>` between cycles). An unprocessed completion already in context is not in flight — process it, never end on it.
|
|
38
|
+
|
|
39
|
+
**Watchdog wakeup (the sentinel's exit notification).** The sentinel completing is itself a wakeup — apply `references/execution-model.md` (the full discipline); the hot path:
|
|
40
|
+
|
|
41
|
+
1. **Demux** the sentinel's report (`WATCHDOG-EXIT <code>` + disposal plan JSON). `1` (stale / failed-group-residue checkpoint) → re-arm a fresh sentinel first (arming rule), then handle the plan. `2` (invalid / ended / orphan-due / only-unresolved) → handle it **this turn**; re-arm only if active work remains — an exit 2 whose plan shows **none** of those is the `--max-hours` relay (the periodic forced wakeup — the running sentinel's logical shift exceeded the bound, which healthy long waves routinely do): nothing to handle, re-arm; the exit's terminal marker resets `startedAt`, so a fresh window begins (at most one relay per `--max-hours` of wave time). `3` (fatal — ledger or state unparseable) → no re-arm; repair per State persistence (restore `.bak`, never delete the ledger — that would under-count in-flight units). `0` (retire — ledger empty/accepted-only) → nothing to do.
|
|
42
|
+
2. **Probe per flagged unit** — the liveness evidence recipe: **worktree activity** = last commit (`git -C <WT/g<G>> log -1 --format=%cI HEAD`) newer than 30 min, OR uncommitted changes (`git -C <WT> status --porcelain` non-empty), OR any source-tree file mtime newer than 30 min; **so-id coverage** = the so-id-prefix commits in `<TASK_BASE>..HEAD` (the resume rule's parse).
|
|
43
|
+
- `stale` → probe: activity → `inflight.mjs checked <unitId> --liveness alive --last-activity <evidence ts> --source "<evidence>"`; quiet but so-ids incomplete → `checked <unitId> --liveness unknown`; first ended observation → record only (`checked --liveness ended` stays `unknown` until a second observation ≥5 min later) — **unless terminal evidence** (so-id coverage complete ∧ `commit-info.md` present ∧ quiet worktree): `checked <unitId> --liveness ended --terminal --source "so-ids complete + commit-info.md, no activity 30min"` confirms `ended` in one observation → recover per the `ended` bullet immediately. **Never remove or re-dispatch from a stale checkpoint without confirmed `ended`.**
|
|
44
|
+
- `orphan-due` → final probe: alive → `checked alive`; ended (two observations, or terminal evidence) → recover as below; still unknown → `inflight.mjs orphan <unitId> --reason "no activity past orphanAfter"` (releases the slot, retains ownership — a late receipt is still processed when it arrives; never re-dispatch over it).
|
|
45
|
+
- `ended` (confirmed) → **recovery beats re-dispatch**: so-id coverage complete ∧ `commit-info.md` present in the chunk output dir ∧ quiet worktree → the agent finished and the notification was dropped — reconcile the chunk marks from the worktree's git log (item 1's so-id rule) and continue the chain exactly as a normal `ok` receipt (remove the ended row first — the plain `remove --expect-dispatched-at <echo>`; it is terminal, no receipt file exists in this scenario → successor add + dispatch, or `coded` + merge enqueue — no retry budget burned). so-ids incomplete → `inflight.mjs outcome <unitId> --outcome ended-incomplete --reason "agent ended with partial so-ids"` + group `failed` + discard the worktree branch (W0's path), then `remove <unitId> --expect-dispatched-at <echo>`.
|
|
46
|
+
- `failed-group-residue` → `remove <unitId> --expect-dispatched-at <echo>` only (the group already failed; no recovery, no budget).
|
|
47
|
+
- `invalid` → repair or remove explicitly (`--force --reason`); never auto-dead, never re-dispatch — it re-reports every poll until handled.
|
|
48
|
+
3. **Drain the turn-end sequence** (items 1–4) — a wakeup is just another turn end.
|
|
49
|
+
|
|
50
|
+
**Coding-complete** (no member still coding — every member `coded`, `merged`, or `failed`): keep draining the merge queue per item 2. B1⇄B2 finish together when every member is `merged` or `failed`, the queue is empty, **and the ledger reports `barrierClear: true`** (dispose per the guard first, then stop the sentinel) → run the wave's actual-write audit (B2 step 0) → wiring application → B3.
|
|
51
|
+
|
|
52
|
+
Each chunk dispatch is a general-purpose sub-agent whose prompt invokes the `a2h-arkts-logic-coder` skill with these fields (the skill's Inputs):
|
|
53
|
+
|
|
54
|
+
- `harmonyos-project-path`: the group's worktree `WT/g<G>` (W0's per-project worktree root)
|
|
55
|
+
- `spec-file`: the group's merged spec (absolute path into main-tree `.hometrans`)
|
|
56
|
+
- `spec-design-file`: `<DESIGN_DIR>/SPEC_DESIGN_G<G>.md` (absolute path into main tree)
|
|
57
|
+
- `output-path`: `<HMOS>/.hometrans/spec_group_<G>/chunk_<k>`
|
|
58
|
+
- `wiring-mode`: `true`
|
|
59
|
+
- `wiring-list`: the wiring surface in **compact form** — the Tier-1 categorical rules (any `Index.ets`, `module.json5`, `oh-package*.json5`, `main_pages.json`, `route_map.json`, `resources/**/element/*.json` — all locale variants) + the discrete entries of `state.config.wiring_files` that match no category (project-specific: ability sources, the DB registration file, `*Routes.ets`) + the lock-file rule (never edit, no wiring rows — the build regenerates). Never paste the raw full list (~167 paths ≈ ~3k tokens per dispatch).
|
|
60
|
+
- worktree index: `<worktree>/.homegraph/`, built by the dispatcher when the worktree was created (`ensure_wt_index.ts` — W0 for ready members, the deps release sweep for held ones). Read-only for the coder; the prompt clause below carries the usage rules. **No usable index** (the script exited 1, or the orchestrator skipped the build for `ENGINE_MODE=off` — both recorded in the wave log) → the clause is omitted and the coder uses plain grep/read.
|
|
61
|
+
- worktree index clause (append it to the `prompt extra` **only** when the index build exited 0 — the same condition as the bullet above; omit the whole clause when the build was degraded or skipped, never paste a conditional sentence): "**HomeGraph rule**: this worktree has its own read-only index — query it with `homegraph explore -p <this worktree> \"<query>\"`. Prefer the CLI; the MCP tool may be used only when the MCP session's bound root is this worktree (a mismatched `projectPath` is ignored by the server and answers from the bound tree). Never run `homegraph init`/`sync`/`index`, and never query `<HMOS>`'s index — it answers from a different branch and the CLI prints no mismatch warning. The index is a snapshot from this worktree's creation (or its last `--sync`), so symbols you write now may be missing from it."
|
|
62
|
+
- prompt extra: "Implement ONLY the scenarios of spec(s) so-<ids of this chunk> (其余 spec 的场景不实现). Every commit message MUST start with the so-ids implemented in that commit ('so-26,so-27: ...'). Resume note: so-<id> 已提交的实现从 so-<next> 继续。**Code-first rule**: the design document's semantic descriptions may lag the actual code — always treat the ACTUAL code in this worktree as ground truth; when an implementation already exists, reuse/extend it instead of rewriting; the design's binding constraints (module paths / entities / tables) are unchanged. **No-build rule**: the coder must not build, compile, or install dependencies in the worktree — no `devecocli build`, `hvigorw`, `ohpm install`, or any equivalent; static checks (the skill's node scripts, git) are fine. Compile verification belongs to B3 alone (`build-fixer` runs `devecocli build` once per wave on the main tree). **Your final JSON must echo the `unitId` and `dispatchedAt` given above, exactly.**" — resume detection is mechanical: parse `git -C <worktree> log --oneline <TASK_BASE>..` commit-message so-id prefixes to find the last completed so-id before any re-dispatch. `TASK_BASE` = the group's coding base (the same three cases as `audit.base`) so the log range never contains the dep groups' commits; the parsed so-id prefixes are filtered against this group's own spec so-id set as a backstop (non-contiguous so-id inputs are never skip-read).
|
|
63
|
+
- return JSON: `{ "ok": true, "unitId": "chunk:g<G>c<k>", "dispatchedAt": "<echo>", "commits": "<TASK_BASE>..<HEAD>", "change_type": "code", "wiring": "wiring.md"|null, "note": null }`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Execution model — in-flight ledger, 30-minute checkpoints, watchdog, disposal
|
|
2
|
+
|
|
3
|
+
Apply this file verbatim on **every wakeup** (chunk/resolver receipt, watchdog exit, user message) and **before the first background dispatch** of a wave. `coding-loop.md` carries the B1 hot path; this file carries the recovery discipline. The model is adapted from `a2h-spec-fastgen`'s proven execution model — the liveness ladder and guard semantics are deliberately identical; the evidence sources and recovery actions are spec-pipeline's.
|
|
4
|
+
|
|
5
|
+
## Why this exists
|
|
6
|
+
|
|
7
|
+
The orchestrator session wakes **only** on background completion notifications. A notification that is created but never delivered (a persisted-late DB row overtaken by a later message — the G2 incident) is indistinguishable from an agent still coding: the wave waits forever. The defense: register every background dispatch on disk before it leaves (`inflight.mjs` — the ledger), and run a zero-model-turn watchdog sentinel whose exit is itself a wakeup. **Stale never means dead; recovery beats re-dispatch.**
|
|
8
|
+
|
|
9
|
+
## Ledger operation order (every receipt-processing turn — fixed)
|
|
10
|
+
|
|
11
|
+
1. **Persist the receipt** to `receipts/<sanitized unitId>/<sanitized dispatchedAt>.json` — sanitize each path component by replacing every character outside `[A-Za-z0-9_-]` with `-` (`:` and `.` are illegal/awkward in Windows path components).
|
|
12
|
+
2. **Remove the completed unit first** on a success receipt: `remove <unitId> --expect-dispatched-at <echoed> --from-receipt <path>`. The order is deliberate: the concurrency guard counts active rows, and at full-wave occupancy a completed-but-unremoved row would block the successor's add (the reference's add-before-remove ordering presumes a bulk phase that removes before refilling; this pipeline's fill-to-width chunks make remove-first the common path). The remove→add crash window is covered twice — in-session by the turn-end reconcile's so-id rule (position re-derives from the worktree's git log), across sessions by the resume ledger reset.
|
|
13
|
+
3. **Add the successor** (a different unitId: `chunk:g<G>c<k+1>`) and dispatch it **before** the state marks.
|
|
14
|
+
4. **State mark** for a success receipt (chunk `done` / next `in_flight`, or — no successor — group `coded` + `audit` pair + merge enqueue).
|
|
15
|
+
5. A **failure receipt** (`ok:false`) on the retry path is recorded with `inflight.mjs failure <unitId> --from-receipt <path>` — it sets the terminal `ended-failed` row — then the group-failed state mark, then `remove --expect-dispatched-at <echo>`.
|
|
16
|
+
6. A **retry** is the in-place `add <unitId> --phase <p> --target <t> --after <current dispatchedAt> --from-receipt <failure receipt>`; it is **never** `remove → add`. Replacing a live/unknown/orphaned unit always requires the matching `ok:false` receipt; the ledger's `retryCount` (carried across generations by the tombstone) enforces the one-retry budget durably.
|
|
17
|
+
|
|
18
|
+
`remove` requires `--expect-dispatched-at` and writes a tombstone **before** deleting the entry. A later add for the same unitId is bound to that tombstone: a non-terminal tombstone requires a failure receipt, so `remove → add` cannot bypass the generation guard. A receipt whose echo does not match the current generation is **stale** — report and ignore; a zombie agent's late output never mutates a newer generation.
|
|
19
|
+
|
|
20
|
+
## Wakeup discipline (fixed order)
|
|
21
|
+
|
|
22
|
+
0. **Notification-aware re-arm**
|
|
23
|
+
- Watchdog `exit 1` (stale / failed-group-residue checkpoint) with the run not terminal: arm a fresh sentinel immediately (the arming rule); handle the plan next.
|
|
24
|
+
- `exit 2` (invalid / ended / orphan-due / only-unresolved): do **not** re-arm until handled; handle it this turn, then re-arm only if active work remains — an exit 2 whose plan shows **none** of those is the `--max-hours` relay (the periodic forced wakeup; the exit's terminal marker resets `startedAt`, so a fresh window begins — at most one relay per `--max-hours` of wave time).
|
|
25
|
+
- `exit 3` (fatal): no re-arm; repair (state restore from `.bak` per SKILL.md State persistence; never delete the ledger) and report.
|
|
26
|
+
- `exit 0` (retire): nothing to do.
|
|
27
|
+
1. **Drain receipts** per the order above. The receipt is self-identifying (`unitId` + `dispatchedAt` echo); a receipt for a **mismatched generation, an absent unit, or an `accepted`/`outcome` row is stale — ignored** (audit-only; the group was already disposed); a receipt for a still-**`orphaned`** row is processed (the ownership the orphan retains — the success receipt removes the row). A missing/unparseable notification reconciles from the worktree's git log (the so-id-prefix resume rule).
|
|
28
|
+
2. **`inflight.mjs show`** — heals only non-terminal state-side completions (chunk `done` in state; resolver's group `merged`/`done` — a failed group never heals wholesale), writes heal tombstones, and reports `active / stale / unknown / ended / orphaned / outcome / accepted / unresolved / barrierClear / free`.
|
|
29
|
+
3. **Heartbeat probe** only when there is active work and no exit notification in hand: `watchdog.mjs <HMOS> --probe`; `inPlace` → covered, else arm (the arming rule). Accepted-only / orphaned-only / outcome-only is the terminal handoff state: no probe, no arm — dispose instead.
|
|
30
|
+
4. **Execute the plan** (the liveness evidence recipe is below):
|
|
31
|
+
- `invalid`: repair or remove explicitly (`--force --reason`); **never auto-dead**, never re-dispatch; it is surfaced on every poll until handled.
|
|
32
|
+
- `stale`: probe liveness. `alive` → `checked --liveness alive --last-activity <iso> --source <evidence>`; quiet but so-ids incomplete → `checked --liveness unknown`; first `ended` observation → record only; a second observation ≥5 minutes later **or `--terminal` with the durable evidence** (so-id coverage complete ∧ `commit-info.md` ∧ quiet worktree) → `checked --liveness ended` — the terminal form confirms in one observation and recovers per the `ended` rung immediately. Never remove or re-dispatch from `stale`.
|
|
33
|
+
- `orphan-due`: final liveness check. alive → `checked alive`; ended → the two-observation rule (or `--terminal` evidence); still unknown → `inflight.mjs orphan <unitId> --reason ...` — releases the slot, retains ownership; a late receipt is still processed when it arrives; never re-dispatch over it.
|
|
34
|
+
- `ended` (confirmed): **recovery beats re-dispatch.** Complete (so-id coverage full ∧ `commit-info.md` present ∧ quiet worktree) → reconcile the chunk marks from the worktree's git log and continue the chain exactly as a normal `ok` receipt (remove the ended row first — the plain `remove --expect-dispatched-at <echo>`; it is terminal, and no receipt file exists in this scenario → successor add + dispatch, or `coded` + merge enqueue) — no retry budget burned. Incomplete → `inflight.mjs outcome <unitId> --outcome ended-incomplete --reason ...`, group `failed`, discard the worktree branch, then `remove`.
|
|
35
|
+
- `failed-group-residue`: `remove --expect-dispatched-at <echo>` only — the group already failed; no recovery, no budget.
|
|
36
|
+
- `orphaned` / `outcome`: no automatic action **while active work remains** — wait for a late receipt (a still-`orphaned` row's late receipt is processed; the success receipt removes the row). Carve-out: a **parked resolver-backed merge** with a terminal resolver row is disposed immediately by guard item 4's merge-queue rule (orphaning requires ~60 min of zero worktree activity — stale at +30, `unknown`, orphan-due at +30 more; a live, editing resolver probes `alive` and never orphans; waiting would strand the wave). When the wave has drained (guard item 4's wave-end disposal): an `orphaned` row → `accept --force --ack-agent-may-still-run` + group `failed`; an `outcome` row → plain `remove` (the group was already failed when the outcome was recorded). An accepted-from-orphaned row carries `agentMayStillRun` — a zombie coder may still be writing; its eventual receipt arrives after accept and is ignored (audit-only row).
|
|
37
|
+
- `healed` / `accepted`: no action.
|
|
38
|
+
5. **Wave-progression re-eval**: re-run the turn-end sequence (reconcile → merge-queue drain → deps release sweep → guard). New dispatch keeps the arming rule: any active unit must have a watchdog in place. **Wave-strand check (the drain test)**: queue empty ∧ no live session ∧ no active ledger row → nothing can progress on its own — a member still coding in that state is orphan-blocked (never re-dispatchable, no wakeup source remaining); run guard item 4's wave-end disposal in the same turn and proceed. The parked-merge mirror: a parked resolver-backed merge with a terminal (`orphaned`/`outcome`) resolver row can never land — regardless of what is queued behind it — accept/remove the row, abort the worktree's in-progress merge, advance the ladder without hop (a) (hop (b) re-code, else hop (c) fail-soft). Never end a turn in either state.
|
|
39
|
+
6. **Terminal** (barrierClear reached / wave end): no disposal, no re-arm. **Disarm the sentinel before proceeding**: `node <skill-dir>/scripts/watchdog.mjs <HMOS> --stop` (idempotent; no-op when none is running) — then the audit → wiring → B3 chain. Apply the same disarm on a hard stop, an abort, or `exit 3`; never leave a background watchdog alive after the flow it guards ends.
|
|
40
|
+
|
|
41
|
+
## Liveness / terminal rules
|
|
42
|
+
|
|
43
|
+
- Every checkpoint is 30 minutes (`checkAfter`). `stale` never means dead.
|
|
44
|
+
- `alive` requires recent evidence (`lastActivityAt` within 30 minutes, not in the future) and `--source`.
|
|
45
|
+
- `unknown` shortens `orphanAfter` to +30 minutes; a unit becomes `orphaned` only after a final liveness check, retaining coverage/ownership but releasing the dispatch slot.
|
|
46
|
+
- `ended` is confirmed only by two observations ≥5 minutes apart or `--terminal` with durable evidence; `checked alive/unknown` resets `endedCount`/`lastEndedAt`; `ended` cannot be resurrected by `checked`.
|
|
47
|
+
- `barrierClear = active === 0 && unresolved === 0` — the B1⇄B2 finish condition; a raw-empty ledger is neither necessary nor sufficient.
|
|
48
|
+
|
|
49
|
+
## Liveness evidence (spec-pipeline)
|
|
50
|
+
|
|
51
|
+
- **Worktree activity** = any of: last commit (`git -C <WT/g<G>> log -1 --format=%cI HEAD`) newer than 30 min; uncommitted changes (`git -C <WT> status --porcelain` non-empty); a source-tree file mtime newer than 30 min.
|
|
52
|
+
- **so-id coverage** = the so-id-prefix commits in `<TASK_BASE>..HEAD` (the so-id resume rule's parse), filtered against the group's own spec so-id set.
|
|
53
|
+
- **`ended --terminal` evidence** = so-id coverage complete ∧ `commit-info.md` present in the chunk output dir (`<HMOS>/.hometrans/spec_group_<G>/chunk_<k>/`) ∧ no worktree activity for 30 minutes — the agent demonstrably finished and only the notification was lost.
|
|
54
|
+
- A resolver's evidence is the worktree merge state: merge committed → ended (recover by landing); no merge and quiet → ended (recover via ladder hop (b)).
|
|
55
|
+
|
|
56
|
+
## Watchdog discipline
|
|
57
|
+
|
|
58
|
+
- Arm: `node <skill-dir>/scripts/watchdog.mjs <HMOS> --interval 300 --stale-after 30 --residue-after 90` (timeout 0), run by the sentinel sub-agent. When shell duration is capped, loop `--once` (exit on any code ≠ 5, sleep `--interval` between cycles) — the degraded form; its beats land once per outer cycle, hence the 3× probe window.
|
|
59
|
+
- Exit codes: `3` fatal; `2` interrupted (invalid / ended / orphan-due / only-unresolved); `1` checkpoint (stale / failed-group-residue); `0` retire (empty or accepted-only); `5` healthy (`--once` only). Exception: an `ended` row coexisting with a fresh (unreported) failed-group-residue verdict exits `1` — the mechanical remove-only residue disposal rides the checkpoint channel; the ended recovery re-fires next cycle as `2`.
|
|
60
|
+
- The same stale/residue generation is reported once; `orphan-due` repeats at most every 30 minutes; `invalid` is never deduped. A repeated `exit 2` with zero disposal and zero progress is the existing fail-soft/escalation path.
|
|
61
|
+
- The watchdog occupies no concurrency slot and is never a ledger entry.
|
|
62
|
+
- Probe before every arm (`--probe`): `inPlace: true` → a sentinel is already running (its heartbeat retains `startedAt` across re-arms; a corpse — `exitedAt` — is replaced wholesale by the next arm).
|
|
63
|
+
|
|
64
|
+
## Ledger integrity
|
|
65
|
+
|
|
66
|
+
- `readLedger` (in `inflight.mjs`) is the pure read for read-only consumers (`reconcile.mjs`, `watchdog.mjs`); only `inflight.mjs` writes `spec_pipeline_inflight.json`.
|
|
67
|
+
- Missing lifecycle fields are legal old/terminal shapes; present-but-invalid values are `invalid` and **keep their slot** (held-too-long, never released-early).
|
|
68
|
+
- Any `invalid` entry or unresolved terminal row goes into the final report; do not hand-edit the ledger. The orchestrator stays the sole writer of `spec_pipeline_state.json` — retry budgets live in the ledger (`retryCount`), never in the state.
|
|
69
|
+
- On resume: snapshot → `inflight.mjs clear` (ledger + tombstones) → `configure --concurrency <WAVE_WIDTH>`; persisted receipts under `receipts/` are the audit trail and are kept.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Finalization summary report — template (every section is mandatory)
|
|
2
|
+
|
|
3
|
+
The orchestrator prints this at Finalization step 4, filling every placeholder. All outcomes — including failures — are carried in the report; nothing is silently dropped.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
## Spec Pipeline Overview (grouped, wave-parallel)
|
|
7
|
+
- Specs: N Groups: G Scenarios: S Waves: W
|
|
8
|
+
- Designed (B0): A Coded+Merged (B1/B2): K Docs refreshed (B5): D Groups committed (C): C
|
|
9
|
+
- Final build: SUCCESS / PARTIAL; Smoke: <verdict>
|
|
10
|
+
- Actual-write audit: registry edits Y (coder) + R (resolver), cross-group overlaps Z, empty-diff groups (per-wave details: .hometrans/wave_<k>/claim_audit.json)
|
|
11
|
+
- Dispatch-hold: held-then-released groups [G...], cycle edges ignored [G→G...] (per-wave details in the wave log); flat waves (deps forecast collapsed concurrency): waves [k...] sliced `mode: "flat"` — deps ignored, overlaps handled at B2
|
|
12
|
+
- Failed groups: [...] (with downstream impact notes)
|
|
13
|
+
|
|
14
|
+
### Per-Group Results
|
|
15
|
+
| G | Group (dir) | Specs | Scenarios | Wave | Design File | Commit | Status |
|
|
16
|
+
|---|---|---|---|---|---|---|---|
|
|
17
|
+
|
|
18
|
+
### Per-Spec Results
|
|
19
|
+
| so-id | Spec | Group | Status | Stage | Commit |
|
|
20
|
+
|---|---|---|---|---|---|
|
|
21
|
+
|
|
22
|
+
### Manual Follow-up TODOs
|
|
23
|
+
- (design issues, unfixed review defects, build issues, cross-group and audit findings, smoke-gate FAIL_*/SKIPPED_* outcomes)
|
|
24
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Initialization — I1–I4 (inputs, precompute, environment, one-time setup, announcement)
|
|
2
|
+
|
|
3
|
+
Apply these steps **verbatim**, in order, before the first wave. This is the run's **only** interactive
|
|
4
|
+
window. `SKILL.md` carries the checklist; this file carries the full step text. Step numbers 1–12 are
|
|
5
|
+
stable and cross-referenced by the rest of the skill (I5 continues them in `SKILL.md`).
|
|
6
|
+
|
|
7
|
+
### I1 — Resolve inputs & run the grouping precompute
|
|
8
|
+
|
|
9
|
+
1. Parse `SPECS_JSON`, `ANDROID`, `HMOS`, `DESIGN_DIR`, and the flags. If any required path is missing or does not exist → **ask now**. Confirm specs.json parses with a non-empty `specs` array.
|
|
10
|
+
2. Run the deterministic precompute (validates every spec file and produces the tables the whole run reads). **Fresh run vs resume** — the state seed `--emit-state` refuses to overwrite an existing state file:
|
|
11
|
+
|
|
12
|
+
- **Fresh run** (no `<HMOS>/.hometrans/spec_pipeline_state.json`):
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
node <skill-dir>/scripts/plan_groups.ts <SPECS_JSON> <HMOS> \
|
|
16
|
+
--max-scenarios-per-chunk <MAX_SCEN> --design-dir <DESIGN_DIR> \
|
|
17
|
+
--android <ANDROID> --engine-mode <ENGINE_MODE> --wave-width <WAVE_WIDTH> --emit-state
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Resume compares exactly `specs_json / specs_json_sha256 / android / hmos / design_dir / grouping / wave_width / max_scenarios_per_chunk / engine_mode`.
|
|
21
|
+
|
|
22
|
+
- **Resume** (state exists): run the same command **without** `--emit-state` (idempotent; exit 3 = specs.json content changed → stop); then verify the state's `config` matches the resolved inputs (diverged → stop and tell the user, never mix two runs).
|
|
23
|
+
|
|
24
|
+
It writes `<HMOS>/.hometrans/spec_group_plan.json` (groups with their group-level `deps`, per-spec rows, merged-spec paths, chunks), one `spec_group_<G>/merged_spec.md` per group, and on a fresh run the state seed (schema `spec_pipeline_state/v2`). If it reports `[ERROR]` (missing spec file, bad JSON), resolve with the user **now**. Surface its `warnings` (non-contiguous directory blocks, zero-scenario specs, oversized specs) in the plan announcement.
|
|
25
|
+
2b. Resolve the wiring surface (deterministic, single source of truth):
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
node <skill-dir>/scripts/resolve_wiring.ts <HMOS>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Three-tier derivation into `state.config.wiring_files`: Tier-1 framework patterns (all `Index.ets`, `module.json5`, `oh-package*.json5`, `main_pages.json`, `route_map.json`, `resources/**/element/*.json` across locale variants) + Tier-2 project-derived (ability sources from every `module.json5` `srcEntry`, the RDB registration file via `getRdbStore`, `*Routes.ets` route tables) + Tier-3 closed loop (announced at I4 for user correction; the per-wave actual-write audit reports misses). Every consumer — the B1 dispatch forbidden list, the audit's registry detection, the B2 wiring application — reads this one field. Lock files are listed but get NO wiring rows (the B3 build regenerates them). **On a resume where `state.config.wiring_files` already exists, skip the re-run** — it would overwrite Tier-3 user corrections made at I4.
|
|
32
|
+
3. Read back the plan; the loop reads only this table — never re-derive paths, counts, or group membership.
|
|
33
|
+
|
|
34
|
+
### I2 — Resolve environment prerequisites
|
|
35
|
+
|
|
36
|
+
4. Confirm `DEVECO_HOME` (`--deveco-home`, else env `DEVECO_HOME`/`DEVECO_SDK_HOME`) resolves (build-fixer needs it). Confirm `HMOS` is a git repository. Confirm **Node ≥ 22.18** (`node --version`; `--experimental-strip-types` is also acceptable). Missing → resolve **now** or abort. Soft note (never a stop): **git ≥ 2.38** enables the wave-end audit's resolver hand-edit layer (`merge-tree --write-tree`); older git degrades that one layer fail-soft (stderr warning).
|
|
37
|
+
5. Confirm the Homegraph engine is runnable (`homegraph status <HMOS>`; `homegraph init -i <HMOS>` also counts). If not runnable, set `ENGINE_MODE=auto` with the user **now**.
|
|
38
|
+
6. Confirm the semantic docs B0 reads: `project_design.md` (required; resolved from `<HMOS>/.hometrans/`), `database_design.md` / `preferences_design.md` (optional). If `project_design.md` is absent the I3 baseline seed **must** run.
|
|
39
|
+
7. Resolve `DOCS_MODE` (`skill` | `script` | `off`) by trial-invoking the semantic-docs path; record it run-wide.
|
|
40
|
+
8. Resolve run-wide knobs: `MVVM_MODE` (default `true`), `MAX_ROUNDS_REVIEW` (default `2`).
|
|
41
|
+
|
|
42
|
+
### I3 — Run all one-time setup
|
|
43
|
+
|
|
44
|
+
9. Create `DESIGN_DIR` if absent. Optionally set `git -C <HMOS> config gc.auto 0` (avoids auto-gc racing worktree operations in long runs).
|
|
45
|
+
9b. **Git baseline** (before step 10 — its commit must not become a docs-only root commit):
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
node <skill-dir>/scripts/git_baseline.ts <HMOS>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Gitignores `.hometrans/` + `.homegraph/`; before the first wave, commits an unborn-HEAD / dirty tree (a fresh scaffold: only `git init`, upstream output uncommitted) as `pre-campaign baseline` so W0 has a `WAVE_BASE` and a clean tree. No-op once a wave exists (mid-campaign dirt stays W0's to judge). Keep `head` / `files` for I4 and the final report. Exit 1 → abort, like an I2 miss. The committed `.homegraph/` rule is load-bearing beyond the main tree: `ensure_wt_index.ts` refuses to write a worktree index when the rule is missing there (an unignored index would dirty the tree and leak into coder commits) — do not remove it.
|
|
52
|
+
10. **Seed the semantic-docs baseline once** (via the `DOCS_MODE` path), commit as `semantic-docs baseline`. Skip if the baseline state already exists.
|
|
53
|
+
|
|
54
|
+
### I4 — Announce, then commit to autonomous execution
|
|
55
|
+
|
|
56
|
+
11. Announce the resolved plan: group table (G, group_id, spec count, scenario count, chunk count), `ANDROID`/`HMOS`/`DESIGN_DIR`, all flags, warnings, the git baseline (`git_baseline.ts` head + committed file count, or "already clean"), the wiring-surface summary (framework/abilities/database/routes counts from `resolve_wiring.ts` — the user may correct the list now, the one interactive window), and the wave-loop outline (S0 → B0 → W0 → B1..C per wave).
|
|
57
|
+
12. From here the run is autonomous: no prompts, no mid-run branching. Per-group failures are recorded (state + final report) and skipped.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# B2 — Serial merge queue: actual-write audit, landing, recovery ladder, wiring application
|
|
2
|
+
|
|
3
|
+
Apply this file **verbatim** whenever a merge is enqueued, popped, or conflicts, and when wiring is
|
|
4
|
+
applied at wave end. `SKILL.md` carries the navigation summary; this file is the authoritative B2 text
|
|
5
|
+
(step 0 actual-write audit, landing, the recovery ladder, the wave-end wiring application).
|
|
6
|
+
|
|
7
|
+
### B2 — Serial merge queue, interleaved with B1 (the only git-writer moment)
|
|
8
|
+
|
|
9
|
+
B2 is not a phase that starts after B1 — it is a **merge queue** the B1 event loop drains while coding continues. A group enters the queue at its coding-complete event; the queue is processed strictly serially (main is the single git-writer), popped from the head in coding-completion order (same-turn ties and resume use group order). A normal merge is an orchestrator shell command — same-turn. A conflict resolution is a **background** sub-agent (the ladder below) — only the merge queue is parked; the resolver's completion notification (event loop step 4) lands the merge on main (`--no-ff`) and pops the next merge. At most one merge — normal or resolver-backed — is in progress at any moment.
|
|
10
|
+
|
|
11
|
+
0. **Actual-write audit** (deterministic, observability — never a stop): runs **once per wave, when B1⇄B2 finish** — after the merge queue drains (every member `merged`/`failed`), before wiring application — `node <skill-dir>/scripts/audit_claims.ts <HMOS> --wave <K> --base <WAVE_BASE>`. Each group is audited through its recorded coder snapshot `state.groups[G].audit = { base, tip }` (base = the group's coding base, the three cases of B1 step 2 — without the release-fork case the diff range would count the dep groups' file changes as this group's, faking cross-group overlaps; tip freezes the branch before any hop-a resolver merge can mutate it): `git diff --name-only base tip` → coder files, wiring-surface edits (wiring-mode violations), empty diffs, and same-wave groups whose actual write sets intersect. For a hop-a group the audit additionally reports `resolver_edits` / `resolver_registry_edits` — hand-written post-coder work on the first-parent chain above the recorded `tip`; per merge in that chain, a file counts as hand-written only when it differs from the auto-merge of the parents **and** from both parents (a clean auto-merge and a verbatim take are not hand-written). Groups without a recorded pair fall back to `WAVE_BASE..specpipe/g<G>` — lower confidence if the branch was ladder-mutated. The recorded pairs make the audit independent of merge/resolver timing. Findings are data: registry edits, resolver registry edits, and overlap files flow into B4's merged findings (the fix list); cross-group actual overlaps are post-hoc observation of the conflicts B2's ladder already handled. Nonzero exit = malformed inputs — record and continue without audit data.
|
|
12
|
+
|
|
13
|
+
Then, for each group popped from the queue:
|
|
14
|
+
1. `PRE = git -C <HMOS> rev-parse HEAD`, then `git -C <HMOS> merge --no-ff --no-edit specpipe/g<G>` — **every landing is a main-side merge commit** (first parent = `PRE`); no landing ever fast-forwards (a fast-forward would put the branch's own commit on main with an inverted parent order, poisoning both the range rule and main's first-parent line). Non-overlapping hunks auto-merge; later groups three-way-merge against main (base = `WAVE_BASE`). Overlapping edits between same-wave groups are **expected** — the ladder below handles them. **Record the group's net-change range for B4 as `PRE..<merge-commit>`** (already-up-to-date, no commit created → record `PRE..PRE`, an empty range). Never hand B4 `WAVE_BASE..<main head after the merge>` — that tree contains all earlier groups' changes. On merge success (including a conflict-resolved merge), set the group's specs to `stage: "B"` **and `state.groups[G].status = "merged"`**.
|
|
15
|
+
2. **On conflict — the recovery ladder (per group, max 2 hops then fail-soft; hop counters are conversation-transient — a crash restart re-arms the ladder, position re-derives from state + git, never from remembered hops):**
|
|
16
|
+
a. **Conflict-resolve re-dispatch (1×, background):** `git -C <HMOS> merge --abort`; inside the group's worktree run `git merge <main HEAD>` (abort a leftover in-progress worktree merge first — a crashed resolver's); ledger-add the resolver unit (`inflight.mjs add resolver:g<G> --phase resolver --target g<G>`), then dispatch a general-purpose sub-agent **in background** with the conflicted file list (`git diff --name-only --diff-filter=U`), the marked files, **both** groups' design docs (this group's + the conflicting group's), **the worktree path as its exclusive working directory (never touch main)**, **the wiring forbidden list in the same compact form as B1's chunk dispatch** (wiring-surface files are never edited — route registrations go through the group's wiring.md rows), **the worktree HomeGraph rule — only when the dispatcher determined this worktree's index is usable (`ensure_wt_index.ts` exited 0 and `ENGINE_MODE` is not `off`); otherwise grep/read** (`homegraph explore -p <worktree>` only — the worktree's own index is read-only; never `homegraph init`/`sync`/`index`, and never `<HMOS>`'s index, which answers from another branch), the instruction "在保留另一组已合并场景的前提下,把本组场景落到当前代码上", and a required compact-JSON return (`{ "ok": true, "unitId": "resolver:g<G>", "dispatchedAt": "<echo>", "merge_commit": "<hash>" }`). The resolver works **only in the group's worktree**; main is untouched until the post-completion landing (event loop step 4). If the ledger `add resolver:g<G>` fails with "is accepted" — a retained phantom-disposal audit row — hop (a)'s budget was already consumed by that phantom and the re-code consumed hop (b): take hop (c) fail-soft; never force-remove the audit row to re-open hop (a).
|
|
17
|
+
b. **Group re-code (1×):** reset the worktree branch to current main HEAD (write `state.groups[G].audit.base = <that HEAD>` immediately — `tip` is re-recorded when the re-code completes), reset the group's chunk statuses and the group itself to `pending`, and re-run the chunks (background-dispatched through the same event loop, same design — each chunk add passes `--after <the unitId's tombstone generation>` per the tombstone re-add rule: the prior run's success removes tombstoned them). The so-id resume rule covers the re-code's own commits if it crashes midway. The branch reset moved the code out from under the worktree's index — refresh it before chunk 1: `node <skill-dir>/scripts/ensure_wt_index.ts <HMOS> WT/g<G> --sync` (skip when `ENGINE_MODE=off`; `--sync` always syncs, since committed worktree changes are invisible to the engine's `pendingChanges`). Exit 1 → record `reason`/`detail`, continue. Exit 0 with `reason: "sync_incomplete"` means the refresh failed and the coder starts from the pre-reset snapshot — record it as a degraded refresh (do not re-dispatch the group for this).
|
|
18
|
+
c. **Fail-soft:** mark the group `failed`, continue with the next group, list it in the final report (groups that depended on its code are flagged).
|
|
19
|
+
3. Every merge is followed by nothing yet — one build covers the whole wave (B3).
|
|
20
|
+
|
|
21
|
+
After every member is `merged` or `failed` and the merge queue is empty (the B2 step-0 audit has run first): **apply wiring** — idempotently: skip the whole application when a `wiring` commit already exists in `WAVE_BASE..HEAD` (`git log --oneline <WAVE_BASE>..HEAD --grep '^wiring$'`); per row, if the target file already contains the row's key (route name / string key / entity name), skip that row and note it in the wave log. For each group (in order), aggregate its chunks' `wiring.md` files (`.hometrans/spec_group_<G>/chunk_<k>/wiring.md`, chunk order) and mechanically apply the rows to the target files (change types: routes / pages / permissions / dependencies / entities / symbol exports / abilities / strings — the surface is `state.config.wiring_files`; lock files are skipped, the build regenerates them). **Same-key check**: rows from different groups targeting the same file + same key → record as a cross-group wiring conflict for the final report's manual follow-up list (do not block — the later row wins; needs human adjudication). Then one commit `wiring`. If all wiring files are empty/absent, skip the commit.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Files in this skill
|
|
2
|
+
|
|
3
|
+
- `SKILL.md` — the orchestrator's contract (this skill's main document).
|
|
4
|
+
- `package.json` — declares the skill folder an ES-module package (`"type": "module"`), so the `.ts` scripts parse as ESM wherever the folder is installed — no dependence on the host project's package type.
|
|
5
|
+
- `scripts/plan_groups.ts` — grouping (one group per spec-file parent directory; group_id = the directory's basename, widened only when two parent dirs share a basename), group-level deps, scenario counting, chunk packing, merged-spec generation, state v2 seeding (deterministic; has tests).
|
|
6
|
+
- `scripts/resolve_wiring.ts` — three-tier wiring-surface derivation into `state.config.wiring_files` (single source of truth; deterministic; has tests).
|
|
7
|
+
- `scripts/git_baseline.ts` — I3 campaign-start baseline: gitignores `.hometrans/` + `.homegraph/`, and before the first wave commits an unborn-HEAD / dirty tree as `pre-campaign baseline` so W0 has a `WAVE_BASE` and a clean tree; no-op once a wave is assigned (deterministic; has tests).
|
|
8
|
+
- `scripts/ensure_wt_index.ts` — the worktree's own HomeGraph index, built at worktree creation (W0 for `ready` members, the deps release sweep for held ones; a resumable kept worktree is refreshed with `--sync`): `init` when none is local (a worktree inherits no `.homegraph/`; the main index is never borrowed — it answers from another branch, silently for the CLI), `index` (full rebuild) when the local index is not usable — empty/partial, or a corrupt db that makes `homegraph status --json` itself fail (`homegraph init` does nothing when the directory already holds an index db, so a leftover index needs `index`), `none` when usable, `sync` unconditionally with `--sync` (the engine's `pendingChanges` only counts uncommitted edits, so a commit- or reset-driven refresh must not be gated on it). Usable = local ∧ `lastIndexed` set ∧ `fileCount > 0`. After EVERY failed attempt the index is re-read: a build that exits non-zero but leaves a complete index is accepted (and stops the retries); a failed refresh that leaves the previous usable index returns exit 0 with `reason: "sync_incomplete"` (the snapshot is stale — record it); otherwise only this worktree's own `.homegraph/` is removed - never `homegraph uninit` (which resolves upward and would delete an ancestor workspace index), never a symlink/junction (dangling included), never a plain file, and never a directory that holds tracked files (`.homegraph/.gitignore` is legitimately tracked in some repos). A timed-out first build or rebuild is a failure (exit 1; the next run rebuilds); a timed-out `--sync` may keep the previous, still-usable snapshot and returns `sync_incomplete`. `database is locked` retries up to twice (stale lock cleared with `homegraph unlock`); hard refusals for a non-linked worktree, a symlinked/junctioned `.homegraph/`, dangling included (`homegraph_linked`), an unignored `.homegraph/` (`homegraph_not_ignored` ⇒ restore the rule in `<HMOS>/.gitignore` and re-run), a `.homegraph/` with tracked files other than its own `.gitignore` (`homegraph_tracked` ⇒ `git rm --cached` them), and unreadable status with no local dir. Exit 1 = degraded (record `reason`/`detail`, continue — the coder uses grep/read) (deterministic; has tests).
|
|
9
|
+
- `scripts/plan_waves.ts` — deterministic deps-aware backfill wave slicing (bump same-wave-dep candidates when a clean candidate can backfill, else hold in-wave for runtime dispatch-hold) with a flat fallback: a pool larger than one wave whose deps forecast exceeds 2× the width-bound ideal dispatch rounds slices pure group order with `mode: "flat"` (deps stop shaping concurrency; has tests).
|
|
10
|
+
- `scripts/deps_ready.ts` — dispatch-hold verdicts for a wave's pending members: `ready`/`held` per group-level deps (cycle edges ignored + recorded) plus the `released` (no-dispatch-yet) subset; a `mode: "flat"` wave yields `ready` for every pending member; read-only over plan + state + wave plan (deterministic; has tests).
|
|
11
|
+
- `scripts/branch_landed.ts` — the resume "merged" predicate: landed ⇔ a `--no-ff` merge on main's first-parent line has the branch tip as its second parent (a zero-commit branch is never landed, unlike `merge-base --is-ancestor`); also returns the landing's B4 range `PRE..M` (read-only; has tests).
|
|
12
|
+
- `scripts/audit_claims.ts` — actual-write audit when B1⇄B2 finish (B2 step 0), on recorded per-group coder pairs: wiring-surface violations, resolver hand-edit violations, empty diffs, same-wave cross-group overlaps (deterministic; has tests).
|
|
13
|
+
- `scripts/inflight.mjs` — the background-dispatch slot ledger (`<HMOS>/.hometrans/spec_pipeline_inflight.json`, its only writer): add-before-dispatch registration, 30-minute checkpoints, two-observation `ended`, receipt-bound in-place retries (`--after` + `--from-receipt`), generation-guarded removes with tombstones, self-heal against pipeline-state completions on `show`, and the `barrierClear` boundary. Unit ids: `chunk:g<G>c<k>` (k 1-based) / `resolver:g<G>`. `stale` never declares dead (deterministic; has tests).
|
|
14
|
+
- `scripts/reconcile.mjs` — pure-read verdict engine shared by the orchestrator and the watchdog: the ladder alive → stale → orphan-due → ended (+ terminal audit rows orphaned/outcome/accepted, `failed-group-residue` for failed groups, `invalid` kept visible); never writes (has tests).
|
|
15
|
+
- `scripts/watchdog.mjs` — zero-model-turn sentinel: one long-running loop (run by the sentinel sub-agent, timeout 0) polling the ledger every `--interval` and exiting on the fixed ladder fatal(3) → max-hours(2) → interrupted(2) → checkpoint(1) → retire(0) → healthy(5); heartbeat with corpse-cleaning re-arm, per-generation dedup, `--probe`, and the durable `--stop` disarm (has tests).
|
|
16
|
+
- `scripts/lib/bgcli.mjs` — shared CLI plumbing for the guard trio: `isMainModule` (junction/case-safe main-module detection), `readJsonFile` (BOM-tolerant), `saveJsonAtomic` (temp + fsync + rename with Windows EPERM/EACCES/EBUSY retry), `loadPipelineState` (read-only state access for the guard scripts — the orchestrator stays the state's only writer).
|
|
17
|
+
- `scripts/atomic_write.ts` — crash-safe file replacement (temp + fsync + rename, optional `.bak`) shared by the scripts above.
|
|
18
|
+
- `scripts/test_plan_groups.ts`, `scripts/test_resolve_wiring.ts`, `scripts/test_git_baseline.ts`, `scripts/test_ensure_wt_index.ts`, `scripts/test_branch_landed.ts`, `scripts/test_plan_waves.ts`, `scripts/test_deps_ready.ts`, `scripts/test_audit_claims.ts`, `scripts/test_atomic_write.ts` — unit tests (run with `node --test <file>`).
|
|
19
|
+
- `scripts/test_inflight.mjs`, `scripts/test_reconcile.mjs`, `scripts/test_watchdog.mjs`, `scripts/test_bgcli.mjs` — the background-dispatch guard's unit tests, including direct coverage of `lib/bgcli.mjs`'s Windows plumbing (run with `node --test <file>`).
|
|
20
|
+
- `references/specs.example.json` — example of the specs.json input format (the format is owned by the producing skill, a2h-spec-generate 的 publish-specs).
|
|
21
|
+
- `references/initialization.md` — I1–I4 verbatim (steps 1–12): input validation, the `plan_groups.ts` + `resolve_wiring.ts` precompute, environment prerequisites, one-time setup (git baseline, docs baseline), announcement.
|
|
22
|
+
- `references/coding-loop.md` — B1 verbatim: chunk pointers, the in-flight ledger protocol, the event loop, the turn-end sequence + never-strand guard, the sentinel arming rule, watchdog wakeup disposal, and the chunk dispatch contract with the so-id resume rule.
|
|
23
|
+
- `references/merge-queue.md` — B2 verbatim: the step-0 actual-write audit, serial `--no-ff` landing and B4 range recording, the conflict recovery ladder, and the wave-end wiring application.
|
|
24
|
+
- `references/state-and-resume.md` — mid-flight detection (resume into an interrupted wave) and the state file contract (schema, sibling-file ownership, atomic writes, `.bak` restore, resume comparison).
|
|
25
|
+
- `references/execution-model.md` — the background-dispatch guard's full discipline: ledger operation order, wakeup discipline, liveness/terminal rules, spec-pipeline liveness evidence, watchdog discipline, ledger integrity.
|
|
26
|
+
- `references/final-report-template.md` — the Finalization summary report template (every section mandatory).
|
|
27
|
+
- `references/scripts.md` — this file.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"specs": [
|
|
3
|
+
{
|
|
4
|
+
"so-id": 1,
|
|
5
|
+
"path": "D:/specs/3/启动应用-启动页-自动进入引导页或主界面-SPEC.md",
|
|
6
|
+
"ui_sequence": "启动应用 - 启动页 - 自动进入引导页或主界面"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"so-id": 2,
|
|
10
|
+
"path": "D:/specs/9/主界面-底部导航栏-点击导航项切换页面-SPEC.md",
|
|
11
|
+
"ui_sequence": "主界面 - 底部导航栏 - 点击导航项切换页面"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"so-id": 3,
|
|
15
|
+
"path": "D:/specs/9/主界面-左右滑动主内容切换页面-SPEC.md",
|
|
16
|
+
"ui_sequence": "主界面 - 左右滑动主内容切换页面"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# State persistence, mid-flight resume, and the state file contract
|
|
2
|
+
|
|
3
|
+
Apply this file **verbatim** on any resume (a state file exists, or a wave was interrupted) and whenever
|
|
4
|
+
the state file must be read, restored, or compared with the resolved inputs.
|
|
5
|
+
|
|
6
|
+
## Mid-flight detection (resume into an interrupted wave)
|
|
7
|
+
|
|
8
|
+
Before starting a wave — before running S0 — if any group in state has `wave != null` and `status` not in {done, failed}, that wave is interrupted — do NOT start the wave loop fresh. Re-enter it directly. **Ledger reset on resume (first, before any re-dispatch):** stop any surviving sentinel (`node <skill-dir>/scripts/watchdog.mjs <HMOS> --stop` — idempotent), snapshot the ledger (`spec_pipeline_inflight.json` → `spec_pipeline_inflight.resumed-<ts>.json`, audit trail), then `node <skill-dir>/scripts/inflight.mjs <HMOS> clear` and `configure --concurrency <WAVE_WIDTH>` — the dead session's generations must not bind the new session's dispatches (position re-derives from state + git). **"Merged" = `branch_landed.ts`**, never `merge-base --is-ancestor` (a zero-commit branch is trivially an ancestor):
|
|
9
|
+
|
|
10
|
+
- **No `wave_<K>/wave_meta.json`** → the crash happened before W0 (mid-B0; members = the state's `wave == K` groups): re-enter at **B0** for exactly those members, then continue W0 onward.
|
|
11
|
+
- **wave_meta.json exists** → read it for WAVE_BASE/members and classify every member:
|
|
12
|
+
- **no worktree** (state `pending` ∧ `WT/g<G>` absent on disk — checked FIRST: the coding-incomplete branch reads the worktree's git log and cannot apply to a worktree-less member; this is the dispatch-hold state): route by the `deps_ready.ts` verdict — `ready` → the release procedure (the turn-end deps release sweep), `held` → wait for the release trigger;
|
|
13
|
+
- **merged** (`node <skill-dir>/scripts/branch_landed.ts <HMOS> <G>` → `landed: true`, or state status `merged`/`done`) → skip (first ensuring the group's B4 range is recorded — a crash between the landing commit and the state write leaves it unrecorded; take the script's `range`);
|
|
14
|
+
- **coding incomplete** (some chunk not `done`) → **refresh this worktree's index before dispatching** (`node <skill-dir>/scripts/ensure_wt_index.ts <HMOS> WT/g<G> --sync` — idempotent, ≈1.6 s when usable, and it also catches up with commits made since W0; skip when `ENGINE_MODE=off`). A resume has no wave log, so this run's `action`/`reason`/`detail` (recorded) is the ONLY source for the coder's HomeGraph clause — never assume the index from W0 is still usable. Then ledger-add the unit and dispatch that group's next chunk in background (position from the worktree's so-id commit log);
|
|
15
|
+
- **coding complete & unmerged** (all chunks `done`, branch unmerged) → enqueue its merge, in group order.
|
|
16
|
+
|
|
17
|
+
Then re-enter the B1⇄B2 event loop and drain it. At re-entry, if main is **mid-merge** (`<HMOS>/.git/MERGE_HEAD` exists) → `git -C <HMOS> merge --abort`, then continue. If the main tree is dirty with ONLY wiring-surface files modified (all `git status --porcelain` paths in `state.config.wiring_files`), treat it as an interrupted wiring application — verify idempotently and commit as `wiring`; any other dirt stops the run.
|
|
18
|
+
|
|
19
|
+
## State persistence & resume
|
|
20
|
+
|
|
21
|
+
`<HMOS>/.hometrans/spec_pipeline_state.json` (schema `spec_pipeline_state/v2`, gitignored) is written by `plan_groups.ts --emit-state`, updated by `plan_waves.ts` (wave assignment), and updated by the orchestrator after every stage — including the B1⇄B2 bookkeeping: chunk statuses (`pending` → `in_flight` → `done`/`failed`), group statuses (`pending` → `coded` → `merged` → `done`, or `failed`), each group's coder snapshot `audit: { base, tip }` (additive group-level field — the frozen per-spec field names stay untouched), and `coding_base` (the release-fork main HEAD; the audit base and the so-id resume anchor for held-then-released members, overwritten on re-release). The background-dispatch guard lives in sibling `.hometrans` files, each written only by its own script: `spec_pipeline_inflight.json` (the ledger — `inflight.mjs` is its only writer), `ledger-config.json` + `tombstones.json` + `liveness-events.jsonl` (also `inflight.mjs`), `watchdog.json` / `watchdog-stop.json` / `watchdog-events.jsonl` (`watchdog.mjs`), and `receipts/<sanitized unitId>/<sanitized generation>.json` (persisted arrival receipts — the retry guard's evidence and the late-receipt audit trail; each path component is sanitized to `[A-Za-z0-9_-]`, `:`/`.` → `-`, because `:` is illegal in Windows path components). The state file itself never carries dispatch timestamps — that is the ledger's job, and the resume path clears it (snapshotted first) rather than reconciling a dead session's generations. Live session bookkeeping is conversation-transient and never part of the state (crash recovery re-derives position from state + git + the ledger). Per-spec rows keep the v1 field names (`status`/`stage`/`design_file`/`commit`) — frozen, do not rename (external tooling reads this file); `stage` vocabulary is exactly `A | B | B2 | C`. **Every write replaces the file atomically** (temp file + rename — the scripts do it themselves via `atomic_write.ts`, keeping the previous version as `spec_pipeline_state.json.bak`; the orchestrator writes `.tmp` then renames) — never edit in place. On restart: if the state does not parse, restore it from `.bak` — it predates the orchestrator updates since the last script write, so run the mid-flight detection, which re-derives chunk/merge position from git — and list the restore in the final report. The same restore rule covers a watchdog `exit 3` (fatal); never delete the ledger to "fix" it — that under-counts in-flight units. If the state exists, verify `config` matches the resolved inputs (diverged → stop), skip `done`/`failed` groups, and resume the wave loop. Designs are **design-once**: B0 deletes only the current wave's members' crash leftovers before dispatching, so a design on disk belongs to its assigned group (keep).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Crash-safe file replacement shared by the pipeline scripts.
|
|
2
|
+
//
|
|
3
|
+
// The state file is the run's only resume anchor, so a crash mid-write must
|
|
4
|
+
// never leave it truncated: write a sibling temp file, fsync it, then rename it
|
|
5
|
+
// over the target (rename is atomic on the same volume). With `backup`, the
|
|
6
|
+
// previous version is first copied to `<file>.bak` — the restore point when
|
|
7
|
+
// a non-script writer (the orchestrator) ever leaves the file unparseable.
|
|
8
|
+
//
|
|
9
|
+
// Zero dependencies — Node >= 22.18 (type stripping).
|
|
10
|
+
import { closeSync, copyFileSync, existsSync, fsyncSync, openSync, renameSync, rmSync,
|
|
11
|
+
writeSync } from 'node:fs';
|
|
12
|
+
|
|
13
|
+
const RETRYABLE = new Set(['EPERM', 'EACCES', 'EBUSY']);
|
|
14
|
+
|
|
15
|
+
export function writeFileAtomic(file: string, content: string,
|
|
16
|
+
{ backup = false }: { backup?: boolean } = {}): void {
|
|
17
|
+
const tmp = `${file}.${process.pid}.tmp`;
|
|
18
|
+
const fd = openSync(tmp, 'w');
|
|
19
|
+
try {
|
|
20
|
+
writeSync(fd, content, null, 'utf8');
|
|
21
|
+
fsyncSync(fd);
|
|
22
|
+
} finally {
|
|
23
|
+
closeSync(fd);
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
if (backup && existsSync(file)) copyFileSync(file, `${file}.bak`);
|
|
27
|
+
// Windows: a scanner or indexer briefly holding the target makes the
|
|
28
|
+
// replace fail with EPERM/EBUSY — retry a few times before giving up.
|
|
29
|
+
for (let attempt = 1; ; attempt++) {
|
|
30
|
+
try {
|
|
31
|
+
renameSync(tmp, file);
|
|
32
|
+
return;
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if (attempt >= 5 || !RETRYABLE.has((e as NodeJS.ErrnoException).code ?? '')) throw e;
|
|
35
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 50 * attempt);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
} catch (e) {
|
|
39
|
+
rmSync(tmp, { force: true });
|
|
40
|
+
throw e;
|
|
41
|
+
}
|
|
42
|
+
}
|