@buaa_smat/hometrans 0.1.20 → 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 -64
- 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 -445
- 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 -55
- 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 -310
- package/dist/cli/config.js +0 -44
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -56
- package/dist/cli/init.js +0 -1187
- package/dist/cli/uninstall.js +0 -427
- package/dist/utils/regex.js +0 -8
- package/env-requirements.json +0 -179
- 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 -486
- 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 -341
- package/skills/hmos-integration-test/SKILL.md +0 -464
- package/skills/hmos-integration-test/scripts/report-tool.ts +0 -791
- package/skills/hmos-integration-test/scripts/resolve-metadata-tool.ts +0 -125
- package/skills/hmos-integration-test/scripts/self-test-runner.ts +0 -756
- package/skills/hmos-integration-test/scripts/testcases-tool.ts +0 -239
- 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/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,381 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Regression suite for the a2h-spec-design scripts (Node.js port of the
|
|
3
|
+
// former Python scripts). Golden files under test/golden/ lock stdout and
|
|
4
|
+
// side-effect file content (fixture paths normalized to <ROOT>/<TMP>);
|
|
5
|
+
// regenerate with: UPDATE_GOLDEN=1 node --test test/
|
|
6
|
+
|
|
7
|
+
import { test } from "node:test";
|
|
8
|
+
import assert from "node:assert/strict";
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
import os from "node:os";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { spawnSync } from "node:child_process";
|
|
13
|
+
import { fileURLToPath } from "node:url";
|
|
14
|
+
|
|
15
|
+
const SKILL_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
16
|
+
const SCRIPTS = path.join(SKILL_DIR, "scripts");
|
|
17
|
+
const GOLDEN_DIR = path.join(SKILL_DIR, "test", "golden");
|
|
18
|
+
const NODE = process.execPath;
|
|
19
|
+
|
|
20
|
+
function runScript(name, args, env = {}) {
|
|
21
|
+
return spawnSync(NODE, [path.join(SCRIPTS, `${name}.mjs`), ...args], {
|
|
22
|
+
encoding: "utf8",
|
|
23
|
+
env: { ...process.env, ...env },
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function tmpRoot() {
|
|
28
|
+
return fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "spec-design-reg-")));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function fixture(t) {
|
|
32
|
+
const root = tmpRoot();
|
|
33
|
+
const mk = (rel, content) => {
|
|
34
|
+
const target = path.join(root, rel);
|
|
35
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
36
|
+
fs.writeFileSync(target, content);
|
|
37
|
+
};
|
|
38
|
+
mk(".hometrans/project_design.md", "# project design\n");
|
|
39
|
+
mk(".hometrans/database_design.md", "# database design\n");
|
|
40
|
+
mk(".hometrans/preferences_design.md", "# preferences design\n");
|
|
41
|
+
mk(".hometrans/module_design.md", "# root module design\n");
|
|
42
|
+
mk(".hometrans/entry/module_design.md", "# entry hometrans design\n");
|
|
43
|
+
mk(".hometrans/lib/module_design.md", "# lib hometrans design\n");
|
|
44
|
+
mk("entry/module_design.md", "# entry source design\n");
|
|
45
|
+
mk("src/module_design.md", "# src source design\n");
|
|
46
|
+
mk("src/main/ets/Index.ets", "struct Index {}\n");
|
|
47
|
+
mk("utils/helper.ts", "export const helper = 1;\n");
|
|
48
|
+
mk("tools/readme.md", "readme\n");
|
|
49
|
+
mk("specs/spec-01.md", [
|
|
50
|
+
"## 场景",
|
|
51
|
+
"",
|
|
52
|
+
"用户登录。",
|
|
53
|
+
"",
|
|
54
|
+
"## 技术参考",
|
|
55
|
+
"",
|
|
56
|
+
"- /proj/src/main/ets/Index.ets",
|
|
57
|
+
"- 组件实现细节",
|
|
58
|
+
"",
|
|
59
|
+
"## 验收",
|
|
60
|
+
"",
|
|
61
|
+
"登录成功。",
|
|
62
|
+
"",
|
|
63
|
+
].join("\n"));
|
|
64
|
+
mk("designs/spec-01_design.md", [
|
|
65
|
+
"## 需求",
|
|
66
|
+
"",
|
|
67
|
+
"登录页设计。",
|
|
68
|
+
"",
|
|
69
|
+
"## 相关 UI",
|
|
70
|
+
"",
|
|
71
|
+
"| UI | 说明 |",
|
|
72
|
+
"|---|---|",
|
|
73
|
+
"| 登录按钮 | 提交表单 |",
|
|
74
|
+
"",
|
|
75
|
+
"## 验收标准",
|
|
76
|
+
"",
|
|
77
|
+
"按钮可点击。",
|
|
78
|
+
"",
|
|
79
|
+
].join("\n"));
|
|
80
|
+
t.after(() => fs.rmSync(root, { recursive: true, force: true }));
|
|
81
|
+
return root;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function checkGolden(name, actualText) {
|
|
85
|
+
const goldenPath = path.join(GOLDEN_DIR, name);
|
|
86
|
+
if (process.env.UPDATE_GOLDEN) {
|
|
87
|
+
fs.mkdirSync(GOLDEN_DIR, { recursive: true });
|
|
88
|
+
fs.writeFileSync(goldenPath, actualText);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
assert.ok(fs.existsSync(goldenPath), `missing golden ${name} — regenerate with UPDATE_GOLDEN=1`);
|
|
92
|
+
assert.equal(actualText, fs.readFileSync(goldenPath, "utf8"), `golden mismatch: ${name}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Normalize fixture paths: absolute root -> <ROOT>, tmp basename -> <TMP>
|
|
96
|
+
// (the basename leaks into project_root_name / path_display_root).
|
|
97
|
+
function normalize(root, text) {
|
|
98
|
+
return text.split(root).join("<ROOT>").split(path.basename(root)).join("<TMP>");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
// inspect_spec_design_inputs
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
test("inspect: happy path golden (defaults, db+pref present)", (t) => {
|
|
106
|
+
const root = fixture(t);
|
|
107
|
+
const r = runScript("inspect_spec_design_inputs", [root, path.join(root, "specs/spec-01.md")]);
|
|
108
|
+
assert.equal(r.status, 0, r.stderr);
|
|
109
|
+
checkGolden("inspect_happy.json", normalize(root, r.stdout));
|
|
110
|
+
assert.ok(fs.existsSync(path.join(root, ".hometrans/spec_design")), "default output dir is created");
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test("inspect: missing db/pref produce warnings", (t) => {
|
|
114
|
+
const root = fixture(t);
|
|
115
|
+
fs.rmSync(path.join(root, ".hometrans/database_design.md"));
|
|
116
|
+
fs.rmSync(path.join(root, ".hometrans/preferences_design.md"));
|
|
117
|
+
const r = runScript("inspect_spec_design_inputs", [root, path.join(root, "specs/spec-01.md")]);
|
|
118
|
+
assert.equal(r.status, 0, r.stderr);
|
|
119
|
+
const payload = JSON.parse(r.stdout);
|
|
120
|
+
assert.equal(payload.has_database_design, false);
|
|
121
|
+
assert.equal(payload.has_preferences_design, false);
|
|
122
|
+
assert.equal(payload.warnings.length, 2);
|
|
123
|
+
assert.ok(payload.warnings[0].includes("database_design.md 不存在"));
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("inspect: existing design stops generation (exit 1)", (t) => {
|
|
127
|
+
const root = fixture(t);
|
|
128
|
+
fs.mkdirSync(path.join(root, ".hometrans/spec_design"), { recursive: true });
|
|
129
|
+
fs.writeFileSync(path.join(root, ".hometrans/spec_design/spec-01_design.md"), "x");
|
|
130
|
+
const r = runScript("inspect_spec_design_inputs", [root, path.join(root, "specs/spec-01.md")]);
|
|
131
|
+
assert.equal(r.status, 1);
|
|
132
|
+
const payload = JSON.parse(r.stdout);
|
|
133
|
+
assert.equal(payload.ok, false);
|
|
134
|
+
assert.match(payload.error, /spec-01_design\.md 已存在/);
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
test("inspect: output-file branch wins and requires existing parent", (t) => {
|
|
138
|
+
const root = fixture(t);
|
|
139
|
+
const ok = runScript("inspect_spec_design_inputs", [
|
|
140
|
+
root, path.join(root, "specs/spec-01.md"),
|
|
141
|
+
"--output-file", path.join(root, "designs/custom.md"),
|
|
142
|
+
"--output-dir", path.join(root, "tools"),
|
|
143
|
+
]);
|
|
144
|
+
assert.equal(ok.status, 0, ok.stderr);
|
|
145
|
+
assert.ok(JSON.parse(ok.stdout).design_path.endsWith("designs/custom.md"));
|
|
146
|
+
|
|
147
|
+
const bad = runScript("inspect_spec_design_inputs", [
|
|
148
|
+
root, path.join(root, "specs/spec-01.md"),
|
|
149
|
+
"--output-file", path.join(root, "no-such-dir/x.md"),
|
|
150
|
+
]);
|
|
151
|
+
assert.equal(bad.status, 1);
|
|
152
|
+
assert.match(JSON.parse(bad.stdout).error, /--output-file 所在目录不存在/);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test("inspect: argparse errors exit 2 with argparse-shaped messages", (t) => {
|
|
156
|
+
const root = fixture(t);
|
|
157
|
+
const badChoice = runScript("inspect_spec_design_inputs", [
|
|
158
|
+
root, path.join(root, "specs/spec-01.md"), "--task", "bogus",
|
|
159
|
+
], { COLUMNS: "80" });
|
|
160
|
+
assert.equal(badChoice.status, 2);
|
|
161
|
+
assert.match(badChoice.stderr, /error: argument --task: invalid choice: 'bogus' \(choose from spec, ui\)$/m);
|
|
162
|
+
|
|
163
|
+
const missing = runScript("inspect_spec_design_inputs", [root], { COLUMNS: "80" });
|
|
164
|
+
assert.equal(missing.status, 2);
|
|
165
|
+
assert.match(missing.stderr, /error: the following arguments are required: input_file$/m);
|
|
166
|
+
|
|
167
|
+
const ambiguous = runScript("inspect_spec_design_inputs", [
|
|
168
|
+
root, path.join(root, "specs/spec-01.md"), "--out", "x",
|
|
169
|
+
], { COLUMNS: "80" });
|
|
170
|
+
assert.equal(ambiguous.status, 2);
|
|
171
|
+
assert.match(ambiguous.stderr, /error: ambiguous option: --out could match --output-dir, --output-file$/m);
|
|
172
|
+
|
|
173
|
+
const help = runScript("inspect_spec_design_inputs", ["-h"]);
|
|
174
|
+
assert.equal(help.status, 0);
|
|
175
|
+
assert.match(help.stdout, /^usage: /);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// ---------------------------------------------------------------------------
|
|
179
|
+
// resolve_module_design
|
|
180
|
+
// ---------------------------------------------------------------------------
|
|
181
|
+
|
|
182
|
+
test("resolve: batch layered lookup golden (hometrans wins, source fallback, miss, ..)", (t) => {
|
|
183
|
+
const root = fixture(t);
|
|
184
|
+
// note: leading "/" is stripped by normalize, so "/no-such-abs/module" is a
|
|
185
|
+
// relative miss, not an error (the absolute branch is unreachable, as in Python)
|
|
186
|
+
const r = runScript("resolve_module_design", [
|
|
187
|
+
root, "entry", "src", "ghost", `${path.basename(root)}/entry`, "lib/..", "/no-such-abs/module",
|
|
188
|
+
]);
|
|
189
|
+
assert.equal(r.status, 0, r.stderr);
|
|
190
|
+
checkGolden("resolve_cases.json", normalize(root, r.stdout));
|
|
191
|
+
const payload = JSON.parse(r.stdout);
|
|
192
|
+
assert.equal(payload.modules.length, 6);
|
|
193
|
+
assert.equal(payload.modules.filter((m) => m.module_design !== null).length, 4);
|
|
194
|
+
|
|
195
|
+
const invalid = runScript("resolve_module_design", [root, "."]);
|
|
196
|
+
assert.equal(invalid.status, 1);
|
|
197
|
+
assert.match(JSON.parse(invalid.stdout).error, /module_path 无效/);
|
|
198
|
+
|
|
199
|
+
const missing = runScript("resolve_module_design", [root]);
|
|
200
|
+
assert.equal(missing.status, 2);
|
|
201
|
+
assert.match(missing.stderr, /the following arguments are required: module_paths$/m);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// ---------------------------------------------------------------------------
|
|
205
|
+
// move_spec_technical_reference
|
|
206
|
+
// ---------------------------------------------------------------------------
|
|
207
|
+
|
|
208
|
+
test("move: happy move golden (spec loses section, design gains it before 相关 UI)", (t) => {
|
|
209
|
+
const root = fixture(t);
|
|
210
|
+
const spec = path.join(root, "specs/spec-01.md");
|
|
211
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
212
|
+
const r = runScript("move_spec_technical_reference", [spec, design]);
|
|
213
|
+
assert.equal(r.status, 0, r.stderr);
|
|
214
|
+
assert.match(r.stdout, /technical_reference=present\nmoved=true/);
|
|
215
|
+
checkGolden("move_spec.md", fs.readFileSync(spec, "utf8"));
|
|
216
|
+
checkGolden("move_design.md", fs.readFileSync(design, "utf8"));
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
test("move: CRLF files keep CRLF endings", (t) => {
|
|
220
|
+
const root = fixture(t);
|
|
221
|
+
const spec = path.join(root, "specs/spec-01.md");
|
|
222
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
223
|
+
for (const p of [spec, design]) {
|
|
224
|
+
fs.writeFileSync(p, fs.readFileSync(p, "utf8").replace(/\n/g, "\r\n"));
|
|
225
|
+
}
|
|
226
|
+
const r = runScript("move_spec_technical_reference", [spec, design]);
|
|
227
|
+
assert.equal(r.status, 0, r.stderr);
|
|
228
|
+
const designText = fs.readFileSync(design, "utf8");
|
|
229
|
+
checkGolden("move_design_crlf.md", designText);
|
|
230
|
+
assert.ok(designText.includes("\r\n"));
|
|
231
|
+
assert.ok(!/(?<!\r)\n/.test(designText));
|
|
232
|
+
const specText = fs.readFileSync(spec, "utf8");
|
|
233
|
+
assert.ok(!specText.includes("技术参考"));
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test("move: absent section leaves both files untouched", (t) => {
|
|
237
|
+
const root = fixture(t);
|
|
238
|
+
const spec = path.join(root, "specs/spec-01.md");
|
|
239
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
240
|
+
const beforeSpec = fs.readFileSync(spec, "utf8");
|
|
241
|
+
const beforeDesign = fs.readFileSync(design, "utf8");
|
|
242
|
+
fs.writeFileSync(spec, beforeSpec.replace("## 技术参考", "## 其他参考"));
|
|
243
|
+
const r = runScript("move_spec_technical_reference", [spec, design]);
|
|
244
|
+
assert.equal(r.status, 0, r.stderr);
|
|
245
|
+
assert.match(r.stdout, /technical_reference=absent\nmoved=false/);
|
|
246
|
+
assert.equal(fs.readFileSync(design, "utf8"), beforeDesign);
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
test("move: duplicate sections and conflicting design refuse with exit 1", (t) => {
|
|
250
|
+
const root = fixture(t);
|
|
251
|
+
const spec = path.join(root, "specs/spec-01.md");
|
|
252
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
253
|
+
|
|
254
|
+
fs.appendFileSync(spec, "\n## 技术参考\n\n重复段落。\n");
|
|
255
|
+
const dup = runScript("move_spec_technical_reference", [spec, design]);
|
|
256
|
+
assert.equal(dup.status, 1);
|
|
257
|
+
assert.match(dup.stderr, /expected at most one exact '## 技术参考' section, found 2/);
|
|
258
|
+
|
|
259
|
+
const root2 = fixture(t);
|
|
260
|
+
const spec2 = path.join(root2, "specs/spec-01.md");
|
|
261
|
+
const design2 = path.join(root2, "designs/spec-01_design.md");
|
|
262
|
+
fs.writeFileSync(design2, fs.readFileSync(design2, "utf8").replace("## 相关 UI", "## 技术参考\n\n## 相关 UI"));
|
|
263
|
+
const already = runScript("move_spec_technical_reference", [spec2, design2]);
|
|
264
|
+
assert.equal(already.status, 1);
|
|
265
|
+
assert.match(already.stderr, /design file already contains exact '## 技术参考'/);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
test("move: preserves file permissions of both files", { skip: process.platform === "win32" }, (t) => {
|
|
269
|
+
const root = fixture(t);
|
|
270
|
+
const spec = path.join(root, "specs/spec-01.md");
|
|
271
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
272
|
+
fs.chmodSync(spec, 0o600);
|
|
273
|
+
fs.chmodSync(design, 0o640);
|
|
274
|
+
const r = runScript("move_spec_technical_reference", [spec, design]);
|
|
275
|
+
assert.equal(r.status, 0, r.stderr);
|
|
276
|
+
assert.equal(fs.statSync(spec).mode & 0o777, 0o600);
|
|
277
|
+
assert.equal(fs.statSync(design).mode & 0o777, 0o640);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
// ---------------------------------------------------------------------------
|
|
281
|
+
// validate_spec_design_output
|
|
282
|
+
// ---------------------------------------------------------------------------
|
|
283
|
+
|
|
284
|
+
test("validate: issue collection golden (all issue types) and issue file", (t) => {
|
|
285
|
+
const root = fixture(t);
|
|
286
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
287
|
+
const displayRoot = `/${path.basename(root)}`;
|
|
288
|
+
// Table rows put the file path in the LAST column: the validator checks
|
|
289
|
+
// cells[-1] as the path (faithful to the original Python).
|
|
290
|
+
fs.writeFileSync(design, [
|
|
291
|
+
"## 需求",
|
|
292
|
+
"",
|
|
293
|
+
"问题设计。",
|
|
294
|
+
"",
|
|
295
|
+
"### 相关 UI 及文件路径",
|
|
296
|
+
"",
|
|
297
|
+
"| UI | 语义 | 文件路径 |",
|
|
298
|
+
"|---|---|---|",
|
|
299
|
+
"| 按钮A | None | 入口 |",
|
|
300
|
+
"| 按钮B | 入口 | bad/path.ets |",
|
|
301
|
+
`| 按钮C | 入口 | ${displayRoot}/no/such.ets |`,
|
|
302
|
+
`| 按钮D | 入口 | ${displayRoot}/tools |`,
|
|
303
|
+
`| 按钮E | 正常 | ${displayRoot}/utils/helper.ts |`,
|
|
304
|
+
"",
|
|
305
|
+
"### 数据库表",
|
|
306
|
+
"",
|
|
307
|
+
"关联数据实体:None",
|
|
308
|
+
"",
|
|
309
|
+
"表依赖关系:None",
|
|
310
|
+
"",
|
|
311
|
+
"### Preferences 相关键",
|
|
312
|
+
"",
|
|
313
|
+
"None",
|
|
314
|
+
"",
|
|
315
|
+
"## 相关 UI",
|
|
316
|
+
"",
|
|
317
|
+
"| UI | 说明 |",
|
|
318
|
+
"|---|---|",
|
|
319
|
+
"| 登录按钮 | 提交表单 |",
|
|
320
|
+
"",
|
|
321
|
+
].join("\n"));
|
|
322
|
+
|
|
323
|
+
const r = runScript("validate_spec_design_output", [root, design]);
|
|
324
|
+
assert.equal(r.status, 0, r.stderr);
|
|
325
|
+
const payload = JSON.parse(r.stdout);
|
|
326
|
+
assert.equal(payload.issue_count, 8);
|
|
327
|
+
checkGolden("validate_issues.json", normalize(root, r.stdout));
|
|
328
|
+
const issueFile = path.join(root, "designs/spec-01_design_issue.md");
|
|
329
|
+
checkGolden("validate_issue_file.md", normalize(root, fs.readFileSync(issueFile, "utf8")));
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
test("validate: clean design removes a stale issue file", (t) => {
|
|
333
|
+
const root = fixture(t);
|
|
334
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
335
|
+
const displayRoot = `/${path.basename(root)}`;
|
|
336
|
+
fs.writeFileSync(design, [
|
|
337
|
+
"## 需求",
|
|
338
|
+
"",
|
|
339
|
+
"### 相关 UI 及文件路径",
|
|
340
|
+
"",
|
|
341
|
+
"| UI | 语义 | 文件路径 |",
|
|
342
|
+
"|---|---|---|",
|
|
343
|
+
`| 登录按钮 | 入口页面 | ${displayRoot}/src/main/ets/Index.ets |`,
|
|
344
|
+
"",
|
|
345
|
+
"### 数据库表",
|
|
346
|
+
"",
|
|
347
|
+
"不涉及",
|
|
348
|
+
"",
|
|
349
|
+
"## 相关 UI",
|
|
350
|
+
"",
|
|
351
|
+
].join("\n"));
|
|
352
|
+
const issueFile = path.join(root, "designs/spec-01_design_issue.md");
|
|
353
|
+
fs.writeFileSync(issueFile, "stale\n");
|
|
354
|
+
|
|
355
|
+
const r = runScript("validate_spec_design_output", [root, design]);
|
|
356
|
+
assert.equal(r.status, 0, r.stderr);
|
|
357
|
+
const payload = JSON.parse(r.stdout);
|
|
358
|
+
assert.equal(payload.has_issues, false);
|
|
359
|
+
assert.ok(!fs.existsSync(issueFile), "stale issue file must be removed");
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
test("validate: CRLF design behaves identically (universal newlines)", (t) => {
|
|
363
|
+
const root = fixture(t);
|
|
364
|
+
const design = path.join(root, "designs/spec-01_design.md");
|
|
365
|
+
const displayRoot = `/${path.basename(root)}`;
|
|
366
|
+
fs.writeFileSync(design, [
|
|
367
|
+
"### 相关 UI 及文件路径",
|
|
368
|
+
"",
|
|
369
|
+
"| UI | 语义 | 文件路径 |",
|
|
370
|
+
"|---|---|---|",
|
|
371
|
+
`| 按钮 | 入口 | ${displayRoot}/no/such.ets |`,
|
|
372
|
+
"",
|
|
373
|
+
].join("\r\n"));
|
|
374
|
+
|
|
375
|
+
const r = runScript("validate_spec_design_output", [root, design]);
|
|
376
|
+
assert.equal(r.status, 0, r.stderr);
|
|
377
|
+
const payload = JSON.parse(r.stdout);
|
|
378
|
+
assert.equal(payload.issue_count, 1);
|
|
379
|
+
assert.equal(payload.issues[0].line, 5);
|
|
380
|
+
assert.equal(payload.issues[0].problem, "文件路径不存在。");
|
|
381
|
+
});
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: a2h-spec-design-pipeline
|
|
3
|
+
description: "Grouped Android→HarmonyOS migration orchestrator driven by a specs.json list. Groups specs by page directory (one page/feature unit per group) and runs one wave loop: deterministic deps-aware membership slicing, per-wave design (every group designed exactly once), then execution — parallel coding in isolated git worktrees with a serial completion-ordered merge queue and bounded conflict recovery, one build per wave, per-group parallel review plus bounded review-fix rounds, one semantic-docs refresh, per-group marker commits. Use when the user supplies specs.json, an Android source dir, a target HarmonyOS dir, and a design output dir, and wants design→convert→docs→commit for every spec. For UI-page migration use a2h-ui-spec-pipeline. Triggers: \"specs.json 迁移\", \"spec pipeline\", \"a2h-spec-design-pipeline\", \"a2h-spec-pipeline\", \"批量生成设计并转换\"."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# a2h-spec-design-pipeline — 分组并行「设计 → 转换」流水线
|
|
7
|
+
|
|
8
|
+
This skill is a thin **orchestrator**. It owns no conversion logic of its own; it groups a `specs.json` list into page-level **groups** (one group per spec-file parent directory) and runs a single **wave loop** until no groups remain. Each wave runs S0 → B0 → W0 → B1⇄B2 → B3 → B4 → B5 → C:
|
|
9
|
+
|
|
10
|
+
1. **S0 — slice this wave.** `scripts/plan_waves.ts` (incremental: each call assigns the next wave) slices the wave with a **deps-aware backfill** scan in group order (full algorithm at S0); when the deps forecast for the remaining pool implies more than 2× the width-bound ideal dispatch rounds (coder concurrency collapse), it slices **flat** instead — pure group order, `mode: "flat"` on the wave entry, and `deps_ready.ts` releases every member (deps stop shaping concurrency; conflicts surface as B2 merge work). Wave numbers are not monotone in group order.
|
|
11
|
+
2. **B0 — design this wave's groups.** One `a2h-spec-design` sub-agent per member, dispatched as one batch; **every group is designed exactly once for the whole campaign**, at the B0 of its own wave (details at B0).
|
|
12
|
+
3. **W0 → B1⇄B2 → … → C — execute the wave.** Background parallel coding (one isolated git worktree per group; chunks chain serially per group; deps-unsatisfied members held and released as their deps merge — dispatch-hold, `deps_ready.ts`) interleaved with a **serial merge queue** (a group merges the moment its coding completes; every landing a main-side `--no-ff` merge commit; bounded conflict-recovery ladder) → actual-write audit → wiring application → **one** build → per-group parallel reviews + bounded fix rounds → **one** semantic-docs refresh → per-group marker commits.
|
|
13
|
+
|
|
14
|
+
Deterministic precomputation lives in the scripts (inventory: `references/scripts.md`); the orchestrator runs them and reads their JSON — it never re-derives paths or counts by hand.
|
|
15
|
+
|
|
16
|
+
**Reference files — read the one that owns the stage before running it; each file is authoritative and the inline summaries below are navigation only.**
|
|
17
|
+
|
|
18
|
+
| File | Owns | Read |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `references/initialization.md` | I1–I4: input validation, the `plan_groups.ts` + `resolve_wiring.ts` precompute, environment prerequisites, one-time setup, announcement | at run start |
|
|
21
|
+
| `references/coding-loop.md` | B1: chunk pointers, the in-flight ledger protocol, the event loop, the turn-end sequence + guard, watchdog wakeup disposal, the chunk dispatch contract | before entering the wave loop |
|
|
22
|
+
| `references/merge-queue.md` | B2: the actual-write audit, serial landing, the conflict recovery ladder, the wave-end wiring application | whenever a merge is enqueued, popped, or conflicts |
|
|
23
|
+
| `references/state-and-resume.md` | mid-flight detection, the state schema / atomic-write / `.bak` restore rules, the resume comparison | on any resume or state restore |
|
|
24
|
+
| `references/execution-model.md` | ledger operation order, wakeup discipline, liveness/terminal rules, watchdog discipline | on every wakeup |
|
|
25
|
+
| `references/scripts.md` | script + test inventory | as needed |
|
|
26
|
+
| `references/final-report-template.md` | the Finalization summary report template | at Finalization |
|
|
27
|
+
|
|
28
|
+
**Execution model — every stage runs in an isolated sub-agent** (details at I5): the orchestrator parses compact JSON results, runs the scripts and git/worktree bookkeeping itself, and dispatches the next stage. B1's chunk agents, B2's conflict resolvers, and the zero-model-turn **watchdog sentinel** are the only **background mode** dispatches; all user interaction is confined to **Initialization** — once the wave loop starts the run is autonomous (per-group failures logged, never paused). Background completion notifications are the run's only wakeup source, and one that never arrives strands the whole wave — so every background dispatch is registered in the on-disk **in-flight ledger** (`inflight.mjs`) before it leaves, and the watchdog sentinel keeps a wakeup alive even when no notification ever arrives (full discipline: `references/execution-model.md`).
|
|
29
|
+
|
|
30
|
+
**Scope — spec logic, not UI rendering.** This pipeline migrates **behavioral specs** (ViewModels, services, repositories, data entities, DB/Preferences access, navigation wiring); it does not synthesize ArkUI page layouts (use `a2h-ui-spec-pipeline` / `a2h-batch-ui-align` for that). Each group's `ui_sequence`s serve as navigation/ownership context only.
|
|
31
|
+
|
|
32
|
+
> **Note on commits.** Coder sub-agents commit in their own worktree branches; the wave-end merge preserves those commits. The orchestrator adds: one `wiring` commit per wave, per-wave fix commits (build-fixer; the fix-mode code-reviewer commits its own `fix(review)` commits), and one marker commit per group — `group <G> (specs so-a..so-b)` — carrying that group's design file, design-map row, and residual changes.
|
|
33
|
+
|
|
34
|
+
## Inputs
|
|
35
|
+
|
|
36
|
+
Parse the arguments from the user's message (natural language is fine — no fixed order). Three required paths plus the design-output directory and optional flags.
|
|
37
|
+
|
|
38
|
+
| Variable | Meaning | Default |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `SPECS_JSON` | Path to the specs.json list (required) | — |
|
|
41
|
+
| `ANDROID` | Android source project root (required) | — |
|
|
42
|
+
| `HMOS` | Target HarmonyOS project root (required; must be a git repo) | — |
|
|
43
|
+
| `DESIGN_DIR` | Output dir for `SPEC_DESIGN_G<G>.md` design files | `<HMOS>/.hometrans/spec_design/` |
|
|
44
|
+
| `ENGINE_MODE` | Homegraph evidence strictness (`auto`/`off`/`required`) | `auto` |
|
|
45
|
+
| `WAVE_WIDTH` | Groups per wave (parallel coders; exact except the tail wave) | `10` |
|
|
46
|
+
| `MAX_SCEN` | Max scenarios per coding chunk (spec atomic) | `32` |
|
|
47
|
+
| `DEVECO_HOME` | `--deveco-home`: DevEco root for every build | env |
|
|
48
|
+
|
|
49
|
+
### specs.json format
|
|
50
|
+
|
|
51
|
+
The format is owned by the producing skill (`a2h-spec-generate` 的 `publish-specs`); an annotated example ships at `references/specs.example.json`. Per-spec fields: `path` (**required**, absolute or relative to the specs.json directory), `ui_sequence` (optional), `so-id` (optional; defaults to the 1-based position — positivity/uniqueness are enforced by `plan_groups.ts`, and they matter because commit-message so-id prefixes drive chunk resume). `ANDROID`/`HMOS` are skill arguments applying to every spec — **not** carried in specs.json. specs.json order is the dual scan-order + dependency carrier — see **Ordering & safety rules**.
|
|
52
|
+
|
|
53
|
+
## Initialization (all checks & decisions happen HERE — the run never pauses for input)
|
|
54
|
+
|
|
55
|
+
Apply **`references/initialization.md` verbatim** (its steps I1–I4 = the numbered steps 1–12). This is the run's **only** interactive window; everything after I4 is autonomous. The stages:
|
|
56
|
+
|
|
57
|
+
- **I1 — inputs, grouping precompute, wiring surface.** `plan_groups.ts` (`--emit-state` on a fresh run; without it on a resume, where exit 3 = specs.json changed → stop) writes `spec_group_plan.json`, one `spec_group_<G>/merged_spec.md` per group, and — on a fresh run — the state seed; `resolve_wiring.ts` fills `state.config.wiring_files` (three tiers; skipped on a resume when the field already exists, so user corrections survive). Every later stage reads their JSON — never re-derive paths, counts, or membership by hand.
|
|
58
|
+
- **I2 — environment prerequisites.** `DEVECO_HOME` resolving, `<HMOS>` a git repo, Node ≥ 22.18, the Homegraph engine runnable, the semantic docs (`project_design.md` required, `database_design.md` / `preferences_design.md` optional), then `DOCS_MODE`, `MVVM_MODE`, `MAX_ROUNDS_REVIEW`.
|
|
59
|
+
- **I3 — one-time setup.** Create `DESIGN_DIR`; `git_baseline.ts` (gitignores `.hometrans/` + `.homegraph/` and commits a fresh scaffold as `pre-campaign baseline` so W0 has a `WAVE_BASE` and a clean tree); seed the semantic-docs baseline once.
|
|
60
|
+
- **I4 — announce, then commit to autonomous execution.** Announce the plan table, flags, warnings, the git baseline and the wiring-surface summary — the one window for user corrections — then no prompts and no mid-run branching (per-group failures are recorded and skipped).
|
|
61
|
+
|
|
62
|
+
### I5 — Execution model
|
|
63
|
+
|
|
64
|
+
- Every sub-skill run happens in a **fresh sub-agent** via the `Agent` tool. The prompt must (1) name the sub-skill/agent and its exact inputs, (2) forbid asking back — on ambiguity take the documented safe default or return `{ "ok": false, "note": ... }`, (3) require the final message to be **only** a compact JSON object.
|
|
65
|
+
- Sub-skill SKILL.md text never enters this orchestrator's context during the wave loop (the one exception: the post-loop smoke gate, run by the orchestrator itself).
|
|
66
|
+
- The orchestrator itself runs: the deterministic scripts (`plan_groups.ts`, `resolve_wiring.ts`, `git_baseline.ts`, `ensure_wt_index.ts`, `plan_waves.ts`, `deps_ready.ts`, `branch_landed.ts`, `audit_claims.ts`, `inflight.mjs` — the ledger's only writer, `watchdog.mjs --probe/--stop` — the sentinel sub-agent owns the watchdog loop itself), git/worktree/merge/wiring/commit bookkeeping, the B4 single-writer homegraph index sync of `<HMOS>` (the only `<HMOS>`-index write moment — each worktree's own index is built at creation by `ensure_wt_index.ts` and refreshed only on resume (W0 or mid-wave) and at hop (b); reviewers are read-only), state-file updates, dispatch discipline, and the post-loop runtime smoke gate. Nothing else.
|
|
67
|
+
- A returned sub-agent result — success or failure — is never a stop: parse it, persist it, dispatch the next.
|
|
68
|
+
|
|
69
|
+
## The wave loop
|
|
70
|
+
|
|
71
|
+
**Mid-flight detection (resume into an interrupted wave).** Apply **`references/state-and-resume.md` → Mid-flight detection verbatim** before running S0. In short: a state group with `wave != null` and a status outside {done, failed} means the wave loop must be **re-entered**, not restarted — reset the ledger first (stop any surviving sentinel, snapshot `spec_pipeline_inflight.json`, `inflight.mjs clear`, `configure --concurrency <WAVE_WIDTH>`), then branch on `wave_<K>/wave_meta.json`: absent → the crash happened before W0 (mid-B0) — re-enter at **B0** for exactly those members, then continue W0 onward; present → classify every recorded member (no worktree → route by the `deps_ready.ts` verdict; merged → skip; coding incomplete → re-dispatch that group's next chunk; coding complete and unmerged → enqueue its merge) and drain the B1⇄B2 event loop. **"Merged" is always `branch_landed.ts`**, never `merge-base --is-ancestor`.
|
|
72
|
+
|
|
73
|
+
Iterate waves until `plan_waves.ts` reports `{"wave": null, "done": true}` (no pending groups). **Skip any group already `done` or `failed`**. Each wave runs S0 → B0 → W0 → B1⇄B2 → B3 → B4 → B5 → C (B1 and B2 interleave: coding-completion events drive per-group chunk chaining and the serial merge queue).
|
|
74
|
+
|
|
75
|
+
### S0 — Slice this wave (deterministic script, incremental)
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
node <skill-dir>/scripts/plan_waves.ts <HMOS> --wave-width <WAVE_WIDTH>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Each call assigns the **next** wave: it reads `spec_group_plan.json` + the state (skipping assigned/failed groups) and scans the unassigned non-failed groups in group order with **deps-aware backfill**.
|
|
82
|
+
|
|
83
|
+
Per candidate, each dep target classifies as:
|
|
84
|
+
- failed / assigned to an earlier wave → satisfied;
|
|
85
|
+
- in the wave under construction → **same-wave constraint**;
|
|
86
|
+
- unassigned earlier-order → candidate ineligible this wave (its dep would land in a later wave);
|
|
87
|
+
- unassigned later-order → **cycle edge**, ignored with a stderr warning;
|
|
88
|
+
- anything unclassifiable (not in the plan group set, assigned to the current or a later wave, self-reference) → abort with exit 2.
|
|
89
|
+
|
|
90
|
+
Decision order: ineligible → skip; no same-wave deps → join; same-wave deps → **bumped to a later wave only when a later clean candidate (all non-cycle deps satisfied in earlier waves) can backfill the slot**, else join as the **hold fallback** (dispatch-hold staggers it at runtime). Deps satisfied in earlier waves never block.
|
|
91
|
+
|
|
92
|
+
**Flat fallback:** before slicing, the remaining pool is dry-run through the same scan to forecast the total dispatch rounds (wave barriers + within-wave dep-chain depths — the runtime half, since dispatch-hold staggers same-wave dep pairs behind each other's merges). When the pool is larger than one wave and the forecast exceeds 2× the width-bound ideal `ceil(N/W)` (mean coder concurrency below half the width — e.g. a near-total dep order), the wave is sliced **flat** instead: pure group order, no dep qualification, the wave entry carries `mode: "flat"`, and `deps_ready.ts` releases every member (deps stop shaping concurrency; conflicts surface as B2 merge work — the pre-deps risk model). The forecast re-runs every call, so a pool that healthens resumes deps-aware slicing.
|
|
93
|
+
|
|
94
|
+
It appends the wave to `<HMOS>/.hometrans/spec_wave_plan.json` (schema `spec_wave_plan/v2` — waves only) and sets `state.groups[G].wave = k` for members. Announce this wave's members (G, group_id, per-group scenario totals) before W0. **Same-wave file overlaps are expected, not prevented** — they surface as merge work at B2 and as audit findings after the merge queue drains.
|
|
95
|
+
|
|
96
|
+
### B0 — Design this wave's groups (parallel)
|
|
97
|
+
|
|
98
|
+
The wave's members are the groups S0 just sliced (or, on a mid-wave resume, the wave's recorded members). Dispatch one `a2h-spec-design` sub-agent per member **as ONE foreground batch — every design call of the wave in a single assistant message, never one-per-message** (**batch discipline**: if a message carried only part of the wave, the very next message dispatches ALL remaining designs as one batch; never end a turn with the wave half-dispatched. Each design agent writes only its own `SPEC_DESIGN_G<G>.md` — no shared state, so overlap is always safe):
|
|
99
|
+
|
|
100
|
+
- Contract: `/a2h-spec-design <HMOS> <merged_spec abs path> "<group_ui_sequence>" --task spec --engine-mode <ENGINE_MODE> --mvvm <MVVM_MODE> --output-file <DESIGN_DIR>/SPEC_DESIGN_G<G>.md --index-ready` — sync the index once first (B4 step 0's single-writer rule) (add `--database-design`/`--preferences-design` only when I2 step 6 found them at non-default locations).
|
|
101
|
+
- The merged spec is an absolute path under `<HMOS>/.hometrans/` — pass it verbatim; sub-agents must use only the passed path.
|
|
102
|
+
- **Design-once invariant**: every group is designed exactly once for the whole campaign, at the B0 of its own wave, against semantic docs refreshed by the previous wave's B5. A design must be generated against the current state of the code (the create-vs-reuse decision lives in the design).
|
|
103
|
+
- **At B0 start, delete the design file and any `SPEC_DESIGN_G<G>_issue.md` of this wave's members** (mid-B0 crash leftovers).
|
|
104
|
+
- Return JSON: `{ "ok": true, "design_file": "SPEC_DESIGN_G<G>.md", "issue_file": false, "note": null }`. A design agent that fails with its target file **already on disk** → mid-B0 crash leftover — accept the existing file and move on; any other failure (issue file, or no file on disk) marks the group `failed` (status `failed` in `state.groups[G]`, its specs `status: failed`) — the wave runs with fewer members (no top-up: wave membership is fixed by slicing). Failed groups are excluded from all later waves and listed in the final report. **Harness-error retry (1×):** a design call that errors at the harness level (dispatch failure — not an issue-file, not a semantic `ok:false` return) → re-dispatch once, batched with every other same-wave harness failure; a second failure → the normal `failed` path.
|
|
105
|
+
- As the batch's design results land (all together — process them per group), keep `DESIGN_DIR/design_map.md` at **exactly one row per G** (columns: `G | Group (dir) | Specs | Scenarios | Design File | UI Sequence | Start | End` — `End` stays `进行中` until C) and set each of its specs' `state.specs[].design_file` to the design basename and `stage: "A"`.
|
|
106
|
+
- After the members complete: commit all design changes (`git -C <HMOS> add -A <DESIGN_DIR> && git -C <HMOS> commit -m "group designs (wave K)"`) — W0 requires a clean main tree. (On a mid-B0 resume where every design already exists, nothing to commit — skip.)
|
|
107
|
+
|
|
108
|
+
### W0 — Preconditions & worktrees
|
|
109
|
+
|
|
110
|
+
1. Verify the main tree is clean (`git -C <HMOS> status --porcelain` empty). Dirty → **stop the run and report** (never auto-commit user changes; never ask mid-run).
|
|
111
|
+
2. `WAVE_BASE = git -C <HMOS> rev-parse HEAD`. ("main" here = the branch checked out in `<HMOS>`, whatever its name — never a literal `main`.)
|
|
112
|
+
2b. Write `<HMOS>/.hometrans/wave_<K>/wave_meta.json` = `{ "wave": K, "wave_base": "<WAVE_BASE>", "groups": [<wave members>] }` (K = the wave number plan_waves just assigned) — the resume anchor for mid-wave crash recovery.
|
|
113
|
+
2c. Run `node <skill-dir>/scripts/deps_ready.ts <HMOS> --wave <K>` — the wave's **dispatch-hold** verdicts (read-only): `verdicts` covers every still-`pending` member (`ready` = deps empty or all satisfied; `held` = waiting on unsatisfied deps, `behind` lists them all), `released` = ready members with no chunk dispatched yet. At W0 this is the **initial release set**. A member whose plan row carries no `deps` is always `ready` (plans predating the field behave exactly as before). Cycle edges (a dep pointing at a *later* group) are ignored and reported as `cycleEdgesIgnored` — record them in the wave log.
|
|
114
|
+
3. The wave's worktrees live under `WT = <HMOS>/../wt/<basename(HMOS)>` (per-project namespace; paths deliberately short — Windows MAX_PATH). Traverse **every** wave member (serially) — classification and cleanup are NOT limited to ready members — but **create** a worktree only for a `ready` member: `git -C <HMOS> worktree add WT/g<G> -b specpipe/g<G> <WAVE_BASE>` (delete a stale branch first: `git branch -D specpipe/g<G>` if it exists). A `held` member gets **no worktree at W0** — its worktree is created at release time from the then-current main HEAD (its coder starts from its deps' merged code). An existing worktree classifies with `git -C <worktree> log --oneline <WAVE_BASE>..HEAD`; removal is always `git -C <HMOS> worktree remove --force WT/g<G>` (on failure `worktree prune` + retry once) + `git branch -D specpipe/g<G>`:
|
|
115
|
+
- **Held member** → **stale regardless of content** (a held member cannot hold a legal worktree of this campaign): remove, do not recreate.
|
|
116
|
+
- **Empty output** → crashed-run leftover: remove, then recreate (ready members only).
|
|
117
|
+
- **Non-empty, NOT merged into main** (`branch_landed.ts` → `landed: false`) → **resumable** (ready members only): keep worktree and branch, resume this group's B1 chunks (the so-id-log chunk-resume rule). Its index is refreshed below (`--sync`) — the branch moved on since creation.
|
|
118
|
+
- **Non-empty, already merged** → post-B2 leftover: remove and recreate (ready members only).
|
|
119
|
+
|
|
120
|
+
After the classification: every surviving worktree gets its own index — `node <skill-dir>/scripts/ensure_wt_index.ts <HMOS> WT/g<G>` for one created or recreated now, and `… --sync` for a kept (resumable) one, whose branch already moved on (skip both when `ENGINE_MODE=off`). A hung build costs one 600 s attempt (≈12 min including the status read); three `database is locked` retries can reach ~38 min, so pass a smaller `--timeout-ms` for a small project — it bounds the build only (the status read stays at 120 s). Normal cost is **serial W0 setup time** (≈1.5 s when the index already exists, ~10 s per new index on a mid-size project), not a hang. A worktree never inherits `<HMOS>`'s `.homegraph/` — it is gitignored — so without this the coder has no graph at all. **Exit 1 is degraded, not a failure:** record its `action`/`reason`/`detail` in the wave log and continue; the coder falls back to grep/read (the coder clause is only passed when the index is usable, so an unusable leftover is never advertised). Exit 0 with `reason: "sync_incomplete"` means the refresh failed but the previous snapshot is still usable — record it as a degraded refresh. Never hand a coder `<HMOS>`'s index instead: it answers from another branch (other groups' merged code, none of this worktree's commits) and the CLI prints no mismatch warning. A symlinked/junctioned `.homegraph/` — dangling included — is refused (`homegraph_linked`) — it would present another tree's index as this worktree's.
|
|
121
|
+
|
|
122
|
+
### B1 — Parallel coding (chunked, per-group serial, background-dispatched)
|
|
123
|
+
|
|
124
|
+
Apply **`references/coding-loop.md` verbatim** — read it before entering the wave loop, and re-read the section that applies on every wakeup. It owns:
|
|
125
|
+
|
|
126
|
+
- **chunk pointer discipline**: `state.groups[G].chunks[k].status` (`pending` → `in_flight` → `done`/`failed`), at most one chunk in flight per group, up to `WAVE_WIDTH` chunk agents, at most one merge;
|
|
127
|
+
- **the in-flight ledger protocol**: `inflight.mjs add` before every background dispatch (the printed `dispatchedAt` is the generation stamp), the `unitId`/`dispatchedAt` echo in the returned JSON, the receipt persisted to `receipts/<sanitized unitId>/<sanitized dispatchedAt>.json`, remove-first on success, and the receipt-bound in-place retry (never remove→add);
|
|
128
|
+
- **the event loop** on each completion notification: stale generations ignored, `ok` chains the group's next chunk or marks `coded` + records `audit: { base, tip }` + enqueues the merge, a second chunk failure fails the group, and a resolver completion lands the merge with `--no-ff`;
|
|
129
|
+
- **the turn-end sequence** (every turn, in order): reconcile in-flight → drain the merge queue → deps release sweep → the never-strand guard with the sentinel arming rule;
|
|
130
|
+
- **the watchdog wakeup disposal**: demux the sentinel's exit code, probe each flagged unit with the liveness evidence recipe, then drain the turn-end sequence;
|
|
131
|
+
- **the chunk dispatch contract** (`a2h-arkts-logic-coder` fields: the worktree as `harmonyos-project-path`, the merged spec, the design file, `output-path`, `wiring-mode: true`, the compact wiring list, the so-id prompt extra with the code-first, no-build and worktree-index rules and the required `unitId`/`dispatchedAt` echo), the so-id resume parse, and the coding-complete → audit → B3 handoff.
|
|
132
|
+
|
|
133
|
+
Hot-path invariants (the reference file is authoritative): every background dispatch is ledger-registered **before** it leaves, a success removes the completed unit **before** the successor is added, a retry is the in-place `add --after <current> --from-receipt <failure>` (never remove→add), a receipt whose `dispatchedAt` echo does not match the current generation is stale and ignored, and no turn may end while something in flight cannot wake the session.
|
|
134
|
+
|
|
135
|
+
### B2 — Serial merge queue, interleaved with B1 (the only git-writer moment)
|
|
136
|
+
|
|
137
|
+
Apply **`references/merge-queue.md` verbatim.** B2 is a queue the B1 event loop drains while coding continues — not a phase after B1: a group enters at its coding-complete event, the queue is processed strictly serially (main is the single git-writer), popped in coding-completion order, and at most one merge — normal or resolver-backed — is in progress at any moment. It owns:
|
|
138
|
+
|
|
139
|
+
- **step 0, the actual-write audit** (`audit_claims.ts <HMOS> --wave <K> --base <WAVE_BASE>`, once per wave after the queue drains and before wiring, on the recorded `state.groups[G].audit = { base, tip }` pairs; findings are data for B4, never a stop);
|
|
140
|
+
- **landing**: `PRE = git rev-parse HEAD` → `git merge --no-ff --no-edit specpipe/g<G>` (every landing a main-side merge commit; never a fast-forward) → the group's B4 net-change range `PRE..<merge-commit>`, specs to `stage: "B"`, status `merged`;
|
|
141
|
+
- **the recovery ladder** on conflict (hop (a) background conflict-resolve re-dispatch 1× in the group's own worktree with both groups' designs and the wiring forbidden list → hop (b) group re-code 1× → hop (c) fail-soft `failed`), with hop counters conversation-transient;
|
|
142
|
+
- **the wiring application** after the queue drains (idempotent, per group in chunk order, mechanically applied from the chunks' `wiring.md` rows onto `state.config.wiring_files`; lock files skipped; same-key cross-group conflicts recorded for manual follow-up) and its single `wiring` commit (skipped when all wiring files are empty/absent).
|
|
143
|
+
|
|
144
|
+
### B3 — One build per wave
|
|
145
|
+
|
|
146
|
+
Dispatch one `build-fixer` sub-agent (`harmony_project_dir: <HMOS>`, `deveco_home: <DEVECO_HOME>`, `output_path: <HMOS>/.hometrans/wave_<wave>/build` — the agent's field names) in the foreground. It fixes cross-group compile errors and replies with one JSON object `{ ok, build, commit, fixes, report, note }`. (Build failure after fix attempts → record; the wave still proceeds to review — the review report will carry the build status.)
|
|
147
|
+
|
|
148
|
+
**Validate the reply before moving on — never end the turn to wait for B3.** A foreground sub-agent call returns at the sub-agent's first idle. Nothing it does after that reaches you: no notification follows, and no ledger row or sentinel covers B3. An orchestrator that ends its turn here hangs forever.
|
|
149
|
+
|
|
150
|
+
1. The reply parses as that JSON and `build` is `SUCCESS` or `FAILED` → record `build` and `commit` (`null` = no fix commit). If `commit` is non-null, check it with `git -C <HMOS> cat-file -e <commit>`. A missing commit counts as an invalid reply (step 2).
|
|
151
|
+
2. Any other reply (a status line such as "后台任务完成后我会自动恢复" / "will resume when the background task finishes", prose, a truncated object) means the sub-agent went idle **mid-run**, typically behind its own background build, and may still be editing `<HMOS>`. **Never dispatch a second build-fixer beside it.** Resume **the same session** in the foreground instead: the `subagent` call with `sessionID: <the sessionID from the reply>`, same agent, prompt `Continue the build-fix loop in the foreground until it ends; reply only with the final JSON.`. Re-validate the new reply by step 1. Resume at most 2×.
|
|
152
|
+
3. Still no valid reply → take the result from disk: `<output_path>/build-fix-report.md` (Build Status) and `<output_path>/build-fix-commit-info.md` (`commit_id`). If either is missing, run one build yourself, in the foreground with a 600000 ms timeout (`cmd /c "devecocli build > "<output_path>\b3_orchestrator.log" 2>&1"` from `<HMOS>`), and record its outcome as the B3 build status. Note the invalid reply in the final report either way.
|
|
153
|
+
|
|
154
|
+
### B4 — Unified review (parallel per group, serial fix)
|
|
155
|
+
|
|
156
|
+
Loop up to `MAX_ROUNDS_REVIEW`:
|
|
157
|
+
|
|
158
|
+
0. **Single-writer index sync (main tree)** — the orchestrator is the only writer of `<HMOS>`'s index during review; each worktree's own index was built once at creation (W0 / the deps release sweep) and is **not** touched here. Before dispatching this round's reviewers, bring the main index current: `homegraph status <HMOS>` → stale → `homegraph sync --quiet <HMOS>`, unindexed → `homegraph init -i <HMOS>` (600000 ms timeout). Failure or timeout → record and continue: the reviewers' concurrency rule degrades them automatically — but a recorded step-0 failure is **not** index state: never leak it into the reviewer dispatch prompts. Re-sync every round — fix-mode commits land between rounds.
|
|
159
|
+
1. **Dispatch the round's reviewers as ONE foreground batch — every reviewer call of the round in a single assistant message, never one-per-message** (same batch discipline as B0; reviewers are read-only — overlap is always safe). For each group in the wave, include in that one message a `code-reviewer` sub-agent call with `harmonyos_project_path: <HMOS>`, `commit_range: <the group's net-change range recorded at B2 — PRE..<merge-commit>>`, `test_case_path: <merged_spec abs path>`, `output_path: <HMOS>/.hometrans/spec_group_<G>/review-round_<r>`. **Failure handling — retry once, never a stop:** a reviewer call that errors → re-dispatch once (same contract, batched with every other same-round failure); a second failure → record and continue — that group's report is missing from the step-2 merge, flagged in the final report, and counts as **not-PASS** for the step-3 exit check (the round bound alone ends it; when missing reports are the only non-PASS cause, skip the fix dispatch and iterate the round directly). Reports are per-spec sectioned. (The reviewer's input contract takes exactly these four fields — do not add others; wiring registrations live in the `wiring` commit, outside every group's range.)
|
|
160
|
+
2. Merge the reports; extract per-spec verdicts into `state.specs[]` (stage stays `B`). The wave audit's findings (registry edits, resolver registry edits / wiring-mode violations and cross-group actual overlaps, from `.hometrans/wave_<K>/claim_audit.json`) join the fix list via the merged findings file.
|
|
161
|
+
3. If all scenarios PASS → exit the loop. Else dispatch one `code-reviewer` sub-agent in fix mode (`mode: fix`, `review_report_path`: the merged findings file the orchestrator writes to `<HMOS>/.hometrans/wave_<wave>/review_round_<r>/merged-findings.md` — the merged review reports **plus the wave audit's findings** so the fixer handles them alongside review defects, `harmonyos_project_path: <HMOS>`, `android_project_path: <ANDROID>`, `output_path`: same dir). **Skip check — do not rebuild what the fix run already built**: the fix run ends with its own single build; read `review-fix-report.md` (same dir) — Overview `Build: SUCCESS` → skip the rebuild; `FAILED`, missing, or unreadable → one `build-fixer` rebuild (B3's fields, `output_path` = this round's dir; validate its reply exactly as in B3). Loop.
|
|
162
|
+
|
|
163
|
+
### B5 — One semantic-docs refresh per wave
|
|
164
|
+
|
|
165
|
+
Run the `DOCS_MODE` path (`/a2h-module-semantic-docs <HMOS> --engine-mode <ENGINE_MODE> --incremental preserve --scope project-source` via sub-agent, or the direct-script fallback). Sets every non-failed spec of the wave to `stage: "B2"`.
|
|
166
|
+
|
|
167
|
+
### C — Per-group finalize
|
|
168
|
+
|
|
169
|
+
For each group in the wave (group order):
|
|
170
|
+
|
|
171
|
+
1. Update its `design_map.md` row's **End** with the finish timestamp.
|
|
172
|
+
2. Commit residual changes as `group <G> (specs so-a..so-b)` (`git add -A`; skip on empty diff, recording the merge head instead).
|
|
173
|
+
3. Merge `status: "done"`, `commit: <hash>` into `state.groups[G]` (keep its other fields — `G`, `wave`, `chunks`, `audit`, `coding_base`) and each of its specs `{ status: "done", stage: "C", commit: <hash>, end_ts }`.
|
|
174
|
+
4. Clean up: `git -C <HMOS> worktree remove WT/g<G>` (retry once, then `--force`, then just `git worktree prune`), `git branch -D specpipe/g<G>`.
|
|
175
|
+
|
|
176
|
+
## State persistence & resume
|
|
177
|
+
|
|
178
|
+
Full schema, sibling-file ownership, the atomic-write rule, the `.bak` restore path and the resume comparison are in **`references/state-and-resume.md` → State persistence & resume — apply verbatim.** Hot-path essentials: `<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`, and updated by the orchestrator after every stage — chunk/group statuses, each group's `audit: { base, tip }` coder snapshot, and `coding_base`. Every write replaces the file atomically (temp + rename); per-spec v1 field names are frozen and `stage` is exactly `A | B | B2 | C`; the dispatch guard lives in sibling `.hometrans` files, each written only by its own script (the ledger by `inflight.mjs`); an unparseable state is restored from `.bak` (never delete the ledger); designs are **design-once**.
|
|
179
|
+
|
|
180
|
+
## Fail-soft rules (never pause)
|
|
181
|
+
|
|
182
|
+
- **Every** group marked `failed` (any cause, incl. a failed release) also gets each of its specs `status: "failed"` in the same state write — the completion check counts specs.
|
|
183
|
+
- B0 design failure → group `failed`, excluded from slicing, reported.
|
|
184
|
+
- Chunk failure (after one retry) → group `failed`; its branch is discarded, any queued merge dropped; wave continues.
|
|
185
|
+
- Watchdog-confirmed agent death with incomplete so-ids (`outcome ended-incomplete`) → group `failed` (branch discarded); **recovery beats re-dispatch** — a confirmed-ended chunk with complete so-ids + `commit-info.md` continues the chain instead (no budget burned). A late receipt for an **accepted**/**outcome** or removed unit is reported and ignored (audit-only/absent generation — a zombie never mutates a newer generation); for a still-`orphaned` row it is processed (the ownership the orphan retains).
|
|
186
|
+
- A wave drained with a member still **coding** whose ledger row is `orphaned` → group `failed` (guard item 4's disposal) — the row was never re-dispatchable and no wakeup source remained; an `agentMayStillRun` zombie's eventual receipt arrives after accept and is ignored per the rule above.
|
|
187
|
+
- A parked merge whose resolver row went terminal — `orphaned` (phantom/zombie dispatch) or `outcome` — → the ladder advances **without hop (a)**: hop (b) group re-code if unconsumed, else hop (c) fail-soft (group `failed`, merge dropped) — same turn (guard item 4).
|
|
188
|
+
- Merge ladder exhausted → group `failed`, continue (report flags dependents).
|
|
189
|
+
- B3/B4/B5 failures → record and continue (carried in the final report).
|
|
190
|
+
- The only legitimate stops: the wave loop + Finalization complete, or an environment prerequisite Initialization was supposed to guarantee is unrecoverable (e.g. dirty main tree at W0).
|
|
191
|
+
|
|
192
|
+
## Runtime smoke gate (after the last wave, before Finalization)
|
|
193
|
+
|
|
194
|
+
When the wave loop ends (`plan_waves.ts` → `{"wave": null, "done": true}`), run the `a2h-coldstart-smoke-gate` skill yourself — no sub-agent dispatch — with `harmony_project_dir = <HMOS>`, then record the outcome:
|
|
195
|
+
|
|
196
|
+
- any verdict → the Finalization summary build line: `Smoke: <verdict>`.
|
|
197
|
+
- `FAIL_*` → verdict + evidence + fix commits also in the final report's Manual Follow-up list.
|
|
198
|
+
- `SKIPPED_*` / `DEPLOY_ERROR` → the reason also in the final report's Manual Follow-up list.
|
|
199
|
+
|
|
200
|
+
All outcomes proceed to Finalization.
|
|
201
|
+
|
|
202
|
+
## Finalization (after all waves)
|
|
203
|
+
|
|
204
|
+
1. Final build sanity check: run `a2h-fix-build-errors` once against `HMOS` with `DEVECO_HOME` as `deveco_studio_path` (fast no-op when green); commit any changes as `build fix`.
|
|
205
|
+
2. Design issue sweep: list `DESIGN_DIR/SPEC_DESIGN_G*_issue.md` files for manual follow-up.
|
|
206
|
+
3. Verify `design_map.md`: one row per designed group; every completed row has Start and End; any `进行中` End marks an incomplete group.
|
|
207
|
+
3b. **Ledger finalization**: if `<HMOS>/.hometrans/spec_pipeline_inflight.json` exists, snapshot it to `spec_pipeline_inflight.final-<ts>.json` (the summary report lists its unresolved/accepted rows), then `node <skill-dir>/scripts/inflight.mjs <HMOS> clear` and `node <skill-dir>/scripts/watchdog.mjs <HMOS> --stop` (idempotent belt-and-braces — the sentinel was already stopped at the last wave's barrier; never leave a background watchdog alive after the run ends).
|
|
208
|
+
4. Print the summary report per `references/final-report-template.md` (every section mandatory; all outcomes — including failures — carried, never silently dropped).
|
|
209
|
+
5. Write `state.finalization = { done: true, final_build, smoke, at }` (atomic) — the completion marker callers check; absent = Finalization never ran.
|
|
210
|
+
|
|
211
|
+
## Ordering & safety rules
|
|
212
|
+
|
|
213
|
+
- **The wave loop is sequential across waves**: S0 slices the wave before B0 designs its members (never pre-generate later waves); inside a wave, merges serialize on main in coding-completion order (group order breaks same-turn ties and governs resume).
|
|
214
|
+
- **Specs run sequentially inside a group** (chunks serial in one worktree; intra-page `page-order` always respected); **groups run in parallel only within a wave**, in isolated worktrees — same-wave write overlaps are expected and handled by B2's serial merge + the recovery ladder.
|
|
215
|
+
- **specs.json order is dual — scan order and dependency carrier**: it is the producer's linearization (`a2h-spec-generate` 的 `publish-specs`). As scan order: groups are ordered by first occurrence; chunks, merges, and the wave-slicing scan follow it (backfill may admit a later-order clean group into an earlier wave — wave numbers are not monotone in group order). As dependency carrier: each spec's `deps` (lifted by `plan_groups.ts` into group-level `deps`; same-page sister groups split by the scenario cap re-link through them) point at earlier so-ids, and dispatch-hold (`deps_ready.ts`) staggers within-wave dispatch on them: same-wave groups still code in parallel, only dispatch starts are staggered, and a released member's coder starts from its deps' merged code; deps pointing at later so-ids are cycle edges — ignored and recorded. Groups without deps data (older specs.json) keep the pure parallel behavior. The flat fallback bounds this contract: when the deps forecast for the remaining pool implies more than 2× the width-bound ideal dispatch rounds, `plan_waves.ts` slices flat and dispatch-hold stops holding (a `mode: "flat"` wave releases everything) — throughput wins over dep ordering, and same-wave conflicts surface as B2 merge work.
|
|
216
|
+
- **Worktrees are the parallel-isolation mechanism** — never run two coders in one working tree, and coders never build or install dependencies inside them (compilation is B3's, on the main tree — coder-side build runs orphan worktree cleanup on Windows). The wiring surface (resolved once at Initialization into `state.config.wiring_files`) never gets direct coder edits (`wiring-mode`); the orchestrator applies wiring serially after merges.
|
|
217
|
+
- **Every stage is a sub-agent**; results are JSON only; no result is a stop.
|
|
218
|
+
- **`plan_groups.ts` / `plan_waves.ts` are the single source of grouping/wave-slicing truth** — never recompute by hand, never reorder groups.
|
|
219
|
+
- **State is durable** — every stage transition is written to `spec_pipeline_state.json` (atomically: temp file + rename) before dispatching the next stage.
|
|
220
|
+
|
|
221
|
+
## Files in this skill
|
|
222
|
+
|
|
223
|
+
See `references/scripts.md` for the full inventory (scripts with their responsibilities, tests, reference files).
|
|
224
|
+
|
|
225
|
+
## When NOT to use
|
|
226
|
+
|
|
227
|
+
- Generating only design docs — use `a2h-spec-design` directly.
|
|
228
|
+
- Migrating from captured UI page snapshots — use `a2h-ui-spec-pipeline` / `a2h-batch-ui-align`.
|