@buaa_smat/hometrans 26.0.2 → 26.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/agents/code-reviewer.md +25 -138
- package/dist/cli/index.js +4 -1
- package/dist/cli/init.js +131 -26
- package/dist/cli/uninstall.js +5 -5
- package/dist/platform/language.js +77 -0
- package/env-requirements.json +30 -5
- package/i18n/FILE-NAMES.md +9 -0
- package/i18n/agents/code-reviewer.md +364 -0
- package/i18n/agents/model-render-worker.md +38 -0
- package/i18n/agents/specgen-worker.md +18 -0
- package/i18n/commands/hometrans.md +17 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +198 -0
- package/i18n/skills/a2h-app-migrate/references/config.example.json +28 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +50 -0
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +1760 -0
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +114 -0
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1588 -0
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +657 -0
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +541 -0
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +131 -0
- package/i18n/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
- package/i18n/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/i18n/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -0
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +89 -0
- package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/i18n/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/i18n/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/i18n/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +171 -0
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/i18n/skills/a2h-arch-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/i18n/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/i18n/skills/a2h-arch-generate/references/arkts-mvvm-v2.md +1407 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/i18n/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/i18n/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/i18n/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +360 -0
- package/i18n/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +798 -0
- package/i18n/skills/a2h-arch-generate/scripts/lib/contract_terms.mjs +40 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/generate.mjs +639 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1261 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +851 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +982 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +9 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +192 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +303 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/move_spec_technical_reference.mjs +162 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +298 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +587 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/test_check_units.ts +149 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +323 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +31 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/build.md +13 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +17 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +27 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +80 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +22 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +87 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state-v1.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state.md +14 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +57 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +705 -0
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +417 -0
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +139 -0
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2549 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +560 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +148 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +220 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +28 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +216 -0
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +203 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +210 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +2005 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +1748 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/detect_paradigm.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1787 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/gen_rule_docs.mjs +100 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1836 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/image_probe.mjs +405 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1406 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1226 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +1220 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +412 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/cli.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +18 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +173 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +629 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +125 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/block_comment_break.ts +64 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_call_sites.ts +242 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +136 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/canvas.ts +255 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/column_shrink.ts +154 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +39 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/container_align.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_root_builtin.ts +69 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_route.ts +114 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/fixed_size_safe_area.ts +103 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/format_string.ts +157 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +551 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +374 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/offset_in_scroll.ts +163 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/orphan_component.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/page_reachability.ts +94 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/path_commands_vp.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +80 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +137 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/r_template_string.ts +37 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/request_permission.ts +98 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/resource_as_string.ts +68 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +97 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/safe_area_clipping.ts +168 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sdk_api.ts +195 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shared_chrome.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_blur.ts +95 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shell_content.ts +198 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/stack_occluding.ts +118 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_decorators.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_name_shadows.ts +93 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/string_quote_leak.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/surface_stroke.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/track_getter.ts +132 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +560 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +325 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/text_color_diff.mjs +470 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +59 -0
- package/i18n/skills/a2h-dashboard-render/SKILL.md +73 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-contract.jsonc +117 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard-guide.md +91 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/i18n/skills/a2h-dashboard-render/scripts/dashboard.mjs +3245 -0
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +2048 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/i18n/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +154 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
- package/i18n/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/i18n/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
- package/i18n/skills/a2h-fix-build-errors/SKILL.md +304 -0
- package/i18n/skills/a2h-fix-build-errors/references/arkts-strict-patterns.md +219 -0
- package/i18n/skills/a2h-fix-build-errors/references/rdb-entity-pattern.md +131 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +227 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/i18n/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/i18n/skills/a2h-page-specgen/SKILL.md +136 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +177 -0
- package/i18n/skills/a2h-page-specgen/references/gates.md +262 -0
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +173 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +207 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +576 -0
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +138 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +262 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +176 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +248 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +506 -0
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +299 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +616 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1166 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +7 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +271 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +83 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +77 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +419 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +511 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
- package/i18n/skills/a2h-resource-convert/SKILL.md +367 -0
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +335 -0
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +251 -0
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +219 -0
- package/i18n/skills/a2h-resource-convert/references/resource-mapping-rules.md +493 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +249 -0
- package/i18n/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +2532 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +278 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +260 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +163 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +44 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +589 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +506 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-spec-generate/references/batch-mode.md +215 -0
- package/i18n/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +184 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/i18n/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/i18n/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/i18n/skills/a2h-spec-generate/references/recall-guide.md +84 -0
- package/i18n/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/i18n/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/i18n/skills/a2h-spec-generate/references/review-checklist.md +22 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/i18n/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/i18n/skills/a2h-spec-generate/references/specs.schema.json +85 -0
- package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +145 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/worker-rules.md +129 -0
- package/i18n/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +702 -0
- package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/collect-specs.mjs +727 -0
- package/i18n/skills/a2h-spec-generate/scripts/feature-stem.mjs +151 -0
- package/i18n/skills/a2h-spec-generate/scripts/parse_requirements.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/prepare-facts.mjs +313 -0
- package/i18n/skills/a2h-spec-generate/scripts/publish-specs.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +669 -0
- package/i18n/skills/a2h-spec-generate/scripts/render-tasks.mjs +385 -0
- package/i18n/skills/a2h-spec-generate/scripts/report.mjs +136 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1265 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1057 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +565 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +544 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +317 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +707 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +436 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +650 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +178 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +912 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +279 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +163 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +256 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +340 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1857 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +262 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +722 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.txt +22 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
- package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +847 -0
- package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +415 -0
- package/i18n/skills/a2h-spec-generate/test/collect-specs.test.mjs +808 -0
- package/i18n/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/i18n/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/i18n/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
- package/i18n/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/i18n/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/i18n/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/SKILL.md +120 -0
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +279 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +918 -0
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +446 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_check.mjs +147 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_source.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_b.mjs +550 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +380 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1412 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +2037 -0
- package/i18n/skills/a2h-utg-static/SKILL.md +368 -0
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/i18n/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +2120 -0
- package/i18n/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +609 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +250 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +374 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/i18n/skills/a2h-utg-static/scripts/fragment_nav.mjs +1137 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +660 -0
- package/i18n/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +913 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +517 -0
- package/i18n/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/i18n/skills/a2h-utg-static/scripts/static_prior.mjs +956 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +108 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +289 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_fresh_branch_guard.mjs +49 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +136 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +368 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_off_path.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +61 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_data_table.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_relative_url.mjs +125 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1351 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/package.json +13 -160
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +1 -1
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +1 -1
- package/skills/a2h-app-migrate/SKILL.md +17 -6
- package/skills/a2h-app-migrate/references/config.example.json +1 -0
- package/skills/a2h-app-migrate/references/stage-map.md +3 -1
- package/skills/a2h-app-migrate/references/workflow.yaml +138 -47
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +1 -2
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +105 -39
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +7 -8
- package/skills/a2h-app-migrate/scripts/ledger.mjs +17 -5
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +43 -7
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +127 -41
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +2 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +38 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +131 -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 +98 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_devecocli_docs_preflight.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +102 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +698 -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_i18n_engine_mirror.mjs +51 -0
- package/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -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 +111 -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 +93 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +219 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +196 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +100 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +488 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_acceptance.mjs +94 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +146 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +161 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +344 -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_uniapp_preflight.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +41 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +178 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/skills/a2h-arch-generate/SKILL.md +1 -1
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +15 -6
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +2 -2
- package/skills/a2h-arch-generate/references/source-baseline.md +2 -2
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +35 -46
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +33 -40
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +2 -3
- 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 +1260 -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_module_templates.mjs +70 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +138 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +2 -5
- package/skills/a2h-arkts-logic-coder/SKILL.md +21 -2
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -0
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +62 -0
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +4 -0
- package/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +22 -25
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +583 -0
- package/skills/a2h-arkts-logic-coder/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/skills/a2h-arkts-logic-coder/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +352 -0
- package/skills/a2h-batch-ui-align/SKILL.md +6 -4
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +1 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +4 -0
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +22 -3
- package/skills/a2h-batch-ui-align/references/checker-rules.md +66 -3
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +45 -8
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +7 -5
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +2 -2
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +4 -2
- package/skills/a2h-batch-ui-align/references/step5-convert.md +7 -5
- package/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +6 -7
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +84 -7
- package/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +229 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1 -2
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +4 -5
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +88 -26
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +305 -12
- package/skills/a2h-batch-ui-align/scripts/image_probe.mjs +231 -54
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +8 -9
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +18 -5
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +103 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +1 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +14 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +3 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +84 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +11 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +5 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +66 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +119 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +81 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +123 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +2 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +6 -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_a11y.test.mjs +598 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_canvas_pct.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +427 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +235 -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_scroll_padding_raster.test.mjs +262 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_safearea.test.mjs +742 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +91 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +567 -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/detect_paradigm.test.mjs +260 -0
- package/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +420 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_scroll_states.test.mjs +31 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -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 +363 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1628 -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/image_probe.test.mjs +243 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +324 -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 +325 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +297 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +48 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +387 -0
- package/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +12 -14
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +29 -30
- 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 +168 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +203 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -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 +411 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -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-page-specgen/SKILL.md +136 -0
- package/skills/a2h-page-specgen/references/body-language.md +177 -0
- package/skills/a2h-page-specgen/references/evidence.md +70 -0
- package/skills/a2h-page-specgen/references/execution-model.md +255 -0
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +250 -0
- package/skills/a2h-page-specgen/references/gates.md +255 -0
- package/skills/a2h-page-specgen/references/page-inventory.md +173 -0
- package/skills/a2h-page-specgen/references/spec-template.md +207 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +209 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +1504 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +422 -0
- package/skills/a2h-page-specgen/scripts/footprint.mjs +1528 -0
- package/skills/a2h-page-specgen/scripts/gate.mjs +558 -0
- package/skills/a2h-page-specgen/scripts/interactions.mjs +137 -0
- package/skills/a2h-page-specgen/scripts/inventory.mjs +269 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +255 -0
- package/skills/a2h-page-specgen/scripts/lib/deps-source.mjs +399 -0
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +137 -0
- package/skills/a2h-page-specgen/scripts/lib/footprint-roles.mjs +278 -0
- package/skills/a2h-page-specgen/scripts/lib/fsx.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +175 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +234 -0
- package/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +391 -0
- package/skills/a2h-page-specgen/scripts/lib/symbols.mjs +125 -0
- package/skills/a2h-page-specgen/scripts/lib/utg-io.mjs +110 -0
- package/skills/a2h-page-specgen/scripts/lib/waker-event-store.mjs +658 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +492 -0
- package/skills/a2h-page-specgen/scripts/render.mjs +317 -0
- package/skills/a2h-page-specgen/scripts/report.mjs +7 -0
- package/skills/a2h-page-specgen/scripts/submission.mjs +532 -0
- package/skills/a2h-page-specgen/scripts/submit.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/README.md +77 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +590 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/cases.example.json +57 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +207 -0
- package/skills/a2h-page-specgen/scripts/test/dispatch.test.mjs +258 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1164 -0
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +74 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Api.kt +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/BothAnnotations.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Cache.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Comments.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Mmkv.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Models.kt +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Pair.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Prefs.kt +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Room.kt +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Sample.kt +43 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Templates.kt +34 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Timeouts.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/androidTest/Helper.kt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/build.gradle.kts +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/en.js.txt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/libs.versions.toml +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/package.json +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-land/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-night/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-v21/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/test/Legacy.kt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/weather.proto +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/AppPreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/SettingsViewModel.kt +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-dao/src/UserDao.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/base/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/fil/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/arrays.xml +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/xml/prefs.xml +27 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Api.java +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Datastore.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Settings.java +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/forecast.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/store.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/BasePreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/Screen.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/UiPreferences.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-retrofit/src/AuthAPI.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/AndroidManifest.xml +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/feature/auth/navigation/ScreenRoute.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/pages.json +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/components/Widget.vue +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/detail/detail.vue +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/index/index.vue +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/store/userStore.js +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/uni_modules/uview-ui/components/u-thing.js +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp.mkdb.mjs +144 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +94 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/MainFragment.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyListeners.java +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/PlainActivity.java +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/fold-chain/utg.json +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/utg.json +34 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-roles.test.mjs +172 -0
- package/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +54 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +222 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +54 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +171 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +301 -0
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +45 -0
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +139 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +774 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +464 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1011 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +120 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +68 -0
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +390 -0
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +167 -0
- package/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +323 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +546 -0
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +503 -0
- package/skills/a2h-page-specgen/scripts/test/source-text.test.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +701 -0
- package/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/skills/a2h-page-specgen/scripts/test/waker-event-store.test.mjs +1365 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1765 -0
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +1979 -0
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +313 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +1234 -0
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +298 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +49 -51
- 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-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +79 -78
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +51 -12
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +24 -6
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +3 -2
- package/skills/a2h-spec-design-pipeline/references/initialization.md +15 -4
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +82 -41
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +61 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +19 -10
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +267 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +61 -8
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +62 -13
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +8 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +8 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-cn.md +55 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/http-extra-data-empty-string-en.md +60 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/HttpExtraDataEmptyStringCheck.js +488 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +11 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +17 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +12 -38
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +40 -5
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +18 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +74 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +1 -1
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/worktree.mjs +2 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +128 -5
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +98 -35
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +218 -37
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_classes.ts +113 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_docs.ts +202 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/wiring.ts +58 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +6 -7
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +3 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +348 -0
- package/skills/a2h-spec-design-pipeline/scripts/scan_shared.ts +642 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +15 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +7 -2
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +104 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +24 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +394 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +24 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +163 -5
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +15 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +350 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_scan_shared.ts +996 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_classes.ts +80 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_docs.ts +205 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +121 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_e2e.ts +85 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_validate_shared_manifest.ts +720 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_wiring.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/validate_shared_manifest.ts +566 -0
- package/skills/a2h-spec-generate/SKILL.md +87 -21
- package/skills/a2h-spec-generate/references/batch-mode.md +78 -17
- package/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +7 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
- package/skills/a2h-spec-generate/references/synthesis-rules.md +4 -2
- package/skills/a2h-spec-generate/references/worker-rules.md +6 -3
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +4 -5
- package/skills/a2h-spec-generate/scripts/check_spec.ts +145 -14
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +261 -19
- package/skills/a2h-spec-generate/scripts/dispatch-watch.mjs +1168 -0
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +25 -46
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +26 -27
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +3 -6
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +31 -32
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +2 -3
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +15 -26
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +102 -81
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +39 -19
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +12 -13
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +35 -196
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +3 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +22 -96
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +3 -4
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +1 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +74 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +51 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +42 -111
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +1 -20
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1 -2
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +3 -4
- 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/fixtures/fusion-run.ts +243 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/zip.ts +63 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +650 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-seed.test.ts +195 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +347 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1948 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-library-evidence.test.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +277 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +844 -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 +1253 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -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 +411 -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 +300 -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/test/zip.test.ts +61 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +879 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +430 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +811 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/dispatch-watch.test.mjs +606 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +230 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -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/prepare-facts.test.mjs +41 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +182 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/skills/a2h-utg-explorer/references/architecture.md +4 -0
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +64 -80
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +1 -2
- package/skills/a2h-utg-explorer/scripts/recover.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +5 -3
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/tests/content_wait.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 +231 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +160 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_identity.test.mjs +77 -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 +137 -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/fresh_state_plan.test.mjs +78 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/skills/a2h-utg-explorer/scripts/tests/holds_without_data_parity.test.mjs +26 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +492 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +199 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_failure.test.mjs +40 -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 +327 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -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 +280 -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 +454 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +336 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +142 -0
- package/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/skills/a2h-utg-explorer/scripts/tests/string_tables_twin_ties.test.mjs +83 -0
- package/skills/a2h-utg-explorer/scripts/tests/tar_fixture.mjs +12 -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/adapters.mjs +13 -3
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +107 -65
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +155 -0
- package/skills/a2h-utg-static/scripts/assemble.mjs +28 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +19 -20
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +102 -2
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +2 -3
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +2 -3
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +1 -2
- package/skills/a2h-utg-static/scripts/route_interceptor.mjs +21 -7
- package/skills/a2h-utg-static/scripts/static_prior.mjs +26 -29
- package/skills/a2h-utg-static/scripts/tests/test_activity_gates.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +29 -1
- package/skills/a2h-app-migrate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-app-migrate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arch-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-arch-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.d.mts +0 -5
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.mjs +0 -54
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +0 -38
- package/skills/a2h-batch-ui-align/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-batch-ui-align/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-dashboard-render/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-dashboard-render/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-resource-convert/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-resource-convert/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/test_i18n_term.ts +0 -70
- package/skills/a2h-spec-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.mjs +0 -54
- package/skills/a2h-utg-explorer/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-explorer/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-static/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/tests/test_i18n_term.mjs +0 -155
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Language Rules for SPEC Body Text
|
|
2
|
+
|
|
3
|
+
This document defines the language rules for the behavioral narrative in a SPEC: what may be written, what must be rewritten, and how to convert framework terminology into natural language. The narrower exceptions for `## 实现契约` are defined in `spec-template.md` and `gates.md`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Allowed and Forbidden Content
|
|
8
|
+
|
|
9
|
+
The behavioral narrative (everything before `## 实现契约`, or before `## 代码追溯` when there is no contract section) describes only user-perceivable behavior. The rules below apply to this narrative, not to the explicitly exempt values in `## 实现契约`.
|
|
10
|
+
|
|
11
|
+
### 1.1 Allowed Content
|
|
12
|
+
|
|
13
|
+
| Category | Description | Example |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Page text | Text displayed in the user interface | "天气"、"设置"、"确定" |
|
|
16
|
+
| Chinese names for controls | Natural-language descriptions of controls | "搜索按钮"、"下拉刷新区域"、"温度文本" |
|
|
17
|
+
| Format descriptions | How data is displayed | "温度显示为 `数字°` 格式"、"时间格式为 HH:mm" |
|
|
18
|
+
| Network endpoints and parameters | API addresses and query parameters | "GET https://api.weather.com/v1/current?city=Beijing" |
|
|
19
|
+
| Enumerated values (joined by `、`) | Lists such as weather-code mappings; do not use tables | "状态包括:晴、多云、阴、雨、雪" |
|
|
20
|
+
| State names | Page or data states | "加载中"、"为空"、"失败"、"已完成" |
|
|
21
|
+
|
|
22
|
+
### 1.2 Forbidden Content
|
|
23
|
+
|
|
24
|
+
| Category | Description | Why it is forbidden |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `file:line` | File paths and line numbers | These are code traceability references and belong in `## 代码追溯` |
|
|
27
|
+
| Class, method, and field names | Source-code symbols | These are implementation details, not user-perceivable behavior |
|
|
28
|
+
| Framework type names | `Fragment`, `ViewModel`, `SwipeRefreshLayout` | Rewrite them in natural language (see the conversion tables below) |
|
|
29
|
+
| Measurement units | `dp`, `sp`, `px` | Users do not care about specific pixel values |
|
|
30
|
+
| Concrete color values | `#FF5733`, `0xFFFFFF` | Use descriptions such as "主题色" or "强调色" instead |
|
|
31
|
+
| Assignment statements | `isLoading = true` | Rewrite as "标记为加载中状态" |
|
|
32
|
+
| Comparison expressions | `if (count > 0)` | Rewrite as "当数量大于 0 时" |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 2. Framework Terminology Conversion Tables
|
|
37
|
+
|
|
38
|
+
The framework type names below are frozen in `scripts/lib/prose.mjs` (`FRAMEWORK_PATTERNS`).
|
|
39
|
+
|
|
40
|
+
### 2.1 Android Framework Terminology
|
|
41
|
+
|
|
42
|
+
| Framework term | Rewrite as | Usage example |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `SwipeRefreshLayout` | 下拉刷新 | "用户下拉页面触发刷新" |
|
|
45
|
+
| `RecyclerView` | 列表 | "列表展示所有商品项" |
|
|
46
|
+
| `ViewPager` | 左右滑动切换 / 页面切换 | "左右滑动切换不同标签页" |
|
|
47
|
+
| `Fragment` | 页面 / 界面 | "进入设置页面" |
|
|
48
|
+
| `Activity` | 页面 / 应用 | "启动应用" |
|
|
49
|
+
| `ViewModel` | 数据管理 / 状态管理 | (Normally absent from the body) |
|
|
50
|
+
| `LiveData` | 数据更新 / 自动刷新 | "数据更新后界面自动刷新" |
|
|
51
|
+
| `SharedPreferences` | 本地持久化保存 / 本地存储 | "偏好设置保存到本地存储" |
|
|
52
|
+
| `Room` | 本地数据库 | "数据保存到本地数据库" |
|
|
53
|
+
| `Retrofit` | 网络请求 | "发起网络请求获取数据" |
|
|
54
|
+
| `Dialog` | 弹窗 / 对话框 | "显示确认对话框" |
|
|
55
|
+
| `Toast` | 提示 / 短提示 | "显示操作成功提示" |
|
|
56
|
+
| `Snackbar` | 提示条 / 操作提示 | "底部显示可撤销的操作提示" |
|
|
57
|
+
| `AlertDialog` | 确认弹窗 / 警告弹窗 | "显示删除确认弹窗" |
|
|
58
|
+
| `BottomSheet` | 底部弹出页 / 底部抽屉 | "从底部弹出选择页" |
|
|
59
|
+
| `Toolbar` | 顶部工具栏 / 标题栏 | "点击标题栏返回按钮" |
|
|
60
|
+
| `FloatingActionButton` | 悬浮按钮 | "点击右下角悬浮按钮" |
|
|
61
|
+
| `NavigationView` | 侧边导航栏 / 抽屉菜单 | "从左侧滑出导航菜单" |
|
|
62
|
+
| `TextView` | 文本 / 文字 | "温度文本显示当前温度值" |
|
|
63
|
+
| `EditText` | 输入框 | "在搜索输入框中输入关键词" |
|
|
64
|
+
| `Button` | 按钮 | "点击确定按钮" |
|
|
65
|
+
| `ImageView` | 图片 / 图标 | "天气图标根据状态变化" |
|
|
66
|
+
| `CheckBox` | 复选框 | "勾选同意协议复选框" |
|
|
67
|
+
| `RadioButton` | 单选按钮 | "选择单选按钮" |
|
|
68
|
+
| `Switch` | 开关 | "打开通知开关" |
|
|
69
|
+
|
|
70
|
+
### 2.2 Navigation and Lifecycle
|
|
71
|
+
|
|
72
|
+
| Framework term | Rewrite as | Usage example |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `popBackStack` | 返回上一页 / 返回 | "点击返回按钮返回上一页" |
|
|
75
|
+
| `navigate` | 跳转到 / 进入 | "跳转到详情页" |
|
|
76
|
+
| `startActivity` | 启动 / 打开 | "启动相机应用" |
|
|
77
|
+
| `finish` | 关闭页面 / 退出 | "操作完成后关闭当前页面" |
|
|
78
|
+
| `onCreate` | 进入页面时 / 初始化时 | "进入页面时加载数据" |
|
|
79
|
+
| `onResume` | 页面显示时 / 回到页面时 | "回到页面时刷新状态" |
|
|
80
|
+
| `onPause` | 离开页面时 | "离开页面时保存草稿" |
|
|
81
|
+
|
|
82
|
+
### 2.3 Event Listeners
|
|
83
|
+
|
|
84
|
+
| Framework term | Rewrite as | Usage example |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| `setOnClickListener` | 点击 | "用户点击搜索按钮" |
|
|
87
|
+
| `setOnRefreshListener` | 下拉刷新 | "用户下拉页面触发刷新" |
|
|
88
|
+
| `setOnScrollListener` | 滚动 | "列表滚动到底部时" |
|
|
89
|
+
| `setOnLongClickListener` | 长按 | "长按列表项显示操作菜单" |
|
|
90
|
+
| `addTextChangedListener` | 输入变化 / 文本变化 | "搜索框输入变化时实时搜索" |
|
|
91
|
+
|
|
92
|
+
### 2.4 UniApp Framework Terminology
|
|
93
|
+
|
|
94
|
+
| Framework term | Rewrite as | Usage example |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| `onLoad` | 进入页面时 / 页面加载时 | "进入页面时获取数据" |
|
|
97
|
+
| `onShow` | 页面显示时 | "页面显示时刷新状态" |
|
|
98
|
+
| `onPullDownRefresh` | 下拉刷新 | "用户下拉页面触发刷新" |
|
|
99
|
+
| `onReachBottom` | 滚动到底部 / 上拉加载 | "滚动到底部时加载更多数据" |
|
|
100
|
+
| `uni.navigateTo` | 跳转到 / 打开 | "跳转到详情页" |
|
|
101
|
+
| `uni.navigateBack` | 返回上一页 / 返回 | "返回上一页" |
|
|
102
|
+
| `uni.showToast` | 显示提示 | "显示操作成功提示" |
|
|
103
|
+
| `uni.showLoading` | 显示加载动画 | "显示加载动画" |
|
|
104
|
+
| `uni.request` | 发起网络请求 | "发起网络请求获取数据" |
|
|
105
|
+
| `uni.setStorageSync` | 保存到本地存储 | "用户信息保存到本地存储" |
|
|
106
|
+
| `uni.getStorageSync` | 从本地存储读取 | "从本地存储读取用户信息" |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 3. Rewriting Examples
|
|
111
|
+
|
|
112
|
+
### Example 1: Pull-to-Refresh
|
|
113
|
+
**Incorrect**: 用户触发 `SwipeRefreshLayout` 的 `onRefresh` 回调后,`ViewModel` 调用 `Repository.fetchWeather()`
|
|
114
|
+
|
|
115
|
+
**Correct**: 用户下拉页面触发刷新时,发起网络请求获取最新天气数据
|
|
116
|
+
|
|
117
|
+
### Example 2: List Display
|
|
118
|
+
**Incorrect**: `RecyclerView` 绑定 `adapter`,展示 `weatherList` 的每个 `WeatherItem`
|
|
119
|
+
|
|
120
|
+
**Correct**: 列表展示所有天气记录,每条记录包含日期、温度和天气状况
|
|
121
|
+
|
|
122
|
+
### Example 3: Page Navigation
|
|
123
|
+
**Incorrect**: 点击搜索按钮后 `findNavController().navigate(R.id.searchFragment)`
|
|
124
|
+
|
|
125
|
+
**Correct**: 点击搜索按钮后跳转到城市搜索页面
|
|
126
|
+
|
|
127
|
+
### Example 4: Saving Data
|
|
128
|
+
**Incorrect**: 将 `selectedCity` 写入 `SharedPreferences`
|
|
129
|
+
|
|
130
|
+
**Correct**: 选中的城市保存到本地存储,下次启动时自动加载
|
|
131
|
+
|
|
132
|
+
### Example 5: Loading State
|
|
133
|
+
**Incorrect**: 设置 `isLoading = true` 并显示 `ProgressBar`
|
|
134
|
+
|
|
135
|
+
**Correct**: 标记为加载中状态,显示加载动画
|
|
136
|
+
|
|
137
|
+
### Example 6: Conditional Logic
|
|
138
|
+
**Incorrect**: 当 `weatherList.size > 0` 时展示列表,否则展示空状态视图
|
|
139
|
+
|
|
140
|
+
**Correct**: 当天气记录不为空时展示列表,为空时显示"暂无数据"提示
|
|
141
|
+
|
|
142
|
+
### Example 7: Error Handling
|
|
143
|
+
**Incorrect**: `catch (IOException e)` 时调用 `showToast("网络错误")`
|
|
144
|
+
|
|
145
|
+
**Correct**: 网络请求失败时显示"网络错误"提示
|
|
146
|
+
|
|
147
|
+
### Example 8: Confirmation Dialog
|
|
148
|
+
**Incorrect**: 点击删除按钮后弹出 `AlertDialog` 要求用户确认
|
|
149
|
+
|
|
150
|
+
**Correct**: 点击删除按钮后弹出确认对话框,用户确认后执行删除操作
|
|
151
|
+
|
|
152
|
+
### Example 9: Permission Request
|
|
153
|
+
**Incorrect**: 调用 `requestPermissions(Manifest.permission.ACCESS_FINE_LOCATION)`
|
|
154
|
+
|
|
155
|
+
**Correct**: 请求位置权限,用户授权后获取当前位置
|
|
156
|
+
|
|
157
|
+
### Example 10: Bottom Sheet
|
|
158
|
+
**Incorrect**: 点击分享按钮后显示 `BottomSheetDialog`
|
|
159
|
+
|
|
160
|
+
**Correct**: 点击分享按钮后从底部弹出分享选项页,包含微信、朋友圈等选项
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 4. Checklist
|
|
165
|
+
|
|
166
|
+
When drafting the behavioral narrative, check all of the following:
|
|
167
|
+
|
|
168
|
+
- [ ] The body contains no `file:line` code traceability references (they belong in `## 代码追溯`).
|
|
169
|
+
- [ ] There are no class, method, or field names (such as `MainActivity`, `fetchData()`, or `weatherList`).
|
|
170
|
+
- [ ] There are no framework type names (such as `Fragment`, `ViewModel`, or `SwipeRefreshLayout`).
|
|
171
|
+
- [ ] There are no measurement units (such as `16dp`, `14sp`, or `800px`).
|
|
172
|
+
- [ ] There are no concrete color values (such as `#FF5733` or `0xFFFFFF`).
|
|
173
|
+
- [ ] There are no assignment statements (such as `isLoading = true`).
|
|
174
|
+
- [ ] There are no comparison expressions (such as `count > 0` or `status == SUCCESS`).
|
|
175
|
+
- [ ] Every control is described in natural language ("搜索按钮", not `searchButton`).
|
|
176
|
+
- [ ] Every interaction is described in natural language ("下拉刷新", not `onRefresh`).
|
|
177
|
+
- [ ] Every state is described in natural language ("加载中", not `Loading`).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Evidence Sources and HomeGraph Operations
|
|
2
|
+
|
|
3
|
+
This document defines evidence priorities, the HomeGraph command sequence, status handling, and failure handling.
|
|
4
|
+
|
|
5
|
+
## Evidence Priority
|
|
6
|
+
|
|
7
|
+
### Required Evidence (stop if unavailable)
|
|
8
|
+
|
|
9
|
+
- `<source-project>/.homegraph/` — symbol graph (`nodes` / `edges`). If unavailable, use `homegraph init` / `index` / `sync` to build or update it. If a usable index cannot be produced, `prepare.mjs` exits with status 1.
|
|
10
|
+
|
|
11
|
+
### Optional Evidence (if missing, only that evidence's completeness is affected; grouping is not)
|
|
12
|
+
|
|
13
|
+
- Gradle `*-sources.jar` local cache — evidence of third-party library behavior. If missing, annotate the related scenarios with "dependency source not read"; still write the SPEC body from the project's own evidence.
|
|
14
|
+
- `node_modules/` / `uni_modules/` — evidence of UniApp third-party components; handle the same way as above.
|
|
15
|
+
|
|
16
|
+
### Path Resolution Base
|
|
17
|
+
|
|
18
|
+
**Resolve all paths relative to `<source-project>`, not `utg-workspace`.** The `declared_at` paths in `utg.json` are relative to the source project root, while the UTG workspace may be a different directory. Every file-existence check must resolve the path under `<source-project>`.
|
|
19
|
+
|
|
20
|
+
## HomeGraph Command Sequence
|
|
21
|
+
|
|
22
|
+
### Index Prerequisite (build if absent; no fallback allowed)
|
|
23
|
+
|
|
24
|
+
Footprint calculation at every level depends on the symbol graph. **If no usable index exists, falling back to naming heuristics is prohibited.** `prepare.mjs` ensures the index is available first; if it cannot be built, stop immediately.
|
|
25
|
+
|
|
26
|
+
`homegraph status --json` is the sole source of truth. When no index exists, it returns `{"initialized":false, ..., "lastIndexed":null}` with exit code 0:
|
|
27
|
+
|
|
28
|
+
| Status output | Action | Command |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `initialized === false` | Initialize and build the index | `homegraph init "<source-project>"` |
|
|
31
|
+
| `initialized === true` AND (`lastIndexed` is null, `fileCount === 0`, `index.state !== "complete"`, **`index.reindexRecommended === true`**, **`index.builtWithVersion !== version`**, or status itself fails/the DB is corrupted) | Full rebuild | `homegraph index "<source-project>"` |
|
|
32
|
+
| Available AND any `pendingChanges` item is non-zero | Incremental sync | `homegraph sync "<source-project>"` |
|
|
33
|
+
| Available AND no changes | No action | — |
|
|
34
|
+
|
|
35
|
+
**The last two rebuild conditions must not be omitted.** An index with `index.state === "complete"` must not be treated as available if `reindexRecommended: true` or if it was built by another HomeGraph version.
|
|
36
|
+
|
|
37
|
+
**`pendingChanges` does not indicate whether the code is new.** It only counts uncommitted working-tree changes; committed files added after the last index build do not appear here. Therefore, all-zero `pendingChanges` **cannot** establish that the footprint is fresh. As a backstop, compare `lastIndexed` with build-artifact timestamps: `prepare.mjs` records `lastIndexed`; if it is earlier than the mtime of `<hmos>/.hometrans/utg_static/utg.json`, force `index`.
|
|
38
|
+
|
|
39
|
+
### Command Details
|
|
40
|
+
|
|
41
|
+
1. **`homegraph init` builds the index by default.** Do not pass the deprecated `-i` / `--index` compatibility flag.
|
|
42
|
+
2. **`init` does nothing when `.homegraph/` already contains an index database.** Overwrite a partial index with `homegraph index` (full rebuild).
|
|
43
|
+
3. **Single writer.** `prepare.mjs` is the only component that modifies the index; all other scripts and page agents are read-only.
|
|
44
|
+
4. **Lock-conflict retry.** On `database is locked`, first run `homegraph unlock "<source-project>"` and then retry, **up to 3 times**. After each failure, **reread status once**, because a worker can report an error after the data is already complete.
|
|
45
|
+
5. **Never call `homegraph uninit`.** If `<source-project>` itself has no `.homegraph/`, `uninit` walks up the directory tree and deletes the nearest ancestor's index.
|
|
46
|
+
6. **Do not delete the `.homegraph/` directory.** Cleanup is allowed only if this run created the directory and then failed to produce a usable index.
|
|
47
|
+
7. **Worktree scenario.** A non-empty `worktreeMismatch` means the resolved index belongs to another tree. Build the index locally in `<source-project>`; do not borrow an ancestor index.
|
|
48
|
+
8. **Timeout means failure.** The first full build has a 600-second limit. Treat a timeout as a failure: do not clean up, and rebuild in the next round.
|
|
49
|
+
9. **If the index cannot be built, stop.** Every failure makes `prepare.mjs` exit with status 1 and report the raw output and command sequence. **Do not fall back to heuristics or guess.**
|
|
50
|
+
10. Write the final state to `plan.json.index` using fields from the actual `homegraph status --json` response: `{initialized, lastIndexed, fileCount, nodeCount, edgeCount, version, builtWithVersion, reindexRecommended, action, retries}`.
|
|
51
|
+
|
|
52
|
+
Example response structure:
|
|
53
|
+
```json
|
|
54
|
+
{"initialized":true,"version":"1.6.1","lastIndexed":"...","fileCount":82,
|
|
55
|
+
"nodeCount":6173,"edgeCount":28128,
|
|
56
|
+
"index":{"state":"complete","builtWithVersion":"1.6.1","reindexRecommended":false}}
|
|
57
|
+
```
|
|
58
|
+
Compare `index.builtWithVersion` with the top-level `version`; `index.reindexRecommended` is also nested under `index`.
|
|
59
|
+
|
|
60
|
+
## Failure Handling
|
|
61
|
+
|
|
62
|
+
When HomeGraph commands fail:
|
|
63
|
+
|
|
64
|
+
- **Lock errors**: Retry with `homegraph unlock` up to 3 times, rereading status after each failure.
|
|
65
|
+
- **Timeout**: The first full index build has a 600-second limit; treat a timeout as a failure.
|
|
66
|
+
- **Build failure**: `prepare.mjs` exits with status 1 and includes the error output and command sequence.
|
|
67
|
+
- **No fallback**: Do not use naming heuristics or partial evidence as a substitute.
|
|
68
|
+
- **Database corruption**: Trigger a full rebuild with `homegraph index`.
|
|
69
|
+
- **Stale version**: Compare `index.builtWithVersion` with the current `version`; rebuild if they differ.
|
|
70
|
+
- **Reindex recommended**: Check `index.reindexRecommended`; rebuild if it is true.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Execution Model
|
|
2
|
+
|
|
3
|
+
This document defines the execution protocol for `scripts/`. Scheduling facts come only from the strict v2 ledger, drafts for the current attempt, and the waker's persistent files.
|
|
4
|
+
|
|
5
|
+
## 1. Commands and Responsibilities
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Plan or recover; existing output must retain the same plan_version
|
|
9
|
+
node scripts/prepare.mjs <source-project> <utg-workspace> <hmos-project> \
|
|
10
|
+
[--chunk-budget 32] [--concurrency 8] [--out <dir>]
|
|
11
|
+
|
|
12
|
+
# Orchestrator dispatch; the child agent runs start/beat
|
|
13
|
+
node scripts/dispatch.mjs <output> claim <group-id>
|
|
14
|
+
node scripts/dispatch.mjs <output> confirm <group-id> --token <t> --agent-id <id>
|
|
15
|
+
node scripts/dispatch.mjs <output> start <group-id> --token <t>
|
|
16
|
+
node scripts/dispatch.mjs <output> beat <group-id> --token <t>
|
|
17
|
+
node scripts/dispatch.mjs <output> retry <group-id> [--force]
|
|
18
|
+
|
|
19
|
+
# Explicit submission; one call may include multiple drafts
|
|
20
|
+
node scripts/submit.mjs <output> <group-id> --token <t> --draft <file> [--draft <file> ...]
|
|
21
|
+
|
|
22
|
+
# Per-round recovery and ledger folding
|
|
23
|
+
node scripts/watchdog.mjs <output> --reconcile --json
|
|
24
|
+
|
|
25
|
+
# Waker lifecycle and manual control
|
|
26
|
+
node scripts/waker.mjs <output> waker [--interval 30] [--poll 5]
|
|
27
|
+
node scripts/waker.mjs <output> probe
|
|
28
|
+
node scripts/waker.mjs <output> stop
|
|
29
|
+
node scripts/waker.mjs <output> rearm
|
|
30
|
+
|
|
31
|
+
# Run only after complete; the final gates may still reject delivery
|
|
32
|
+
node scripts/finalize.mjs <output>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `dispatch.mjs`, `submission.mjs`/`submit.mjs`, and `watchdog.mjs` are the write paths for group state. The orchestrator must never reconstruct or fill in state from memory.
|
|
36
|
+
- Before writing output for the first time, `prepare.mjs` performs preflight. After planning finishes, but before writing any facts/plan/prompt/waker files, it checks identity again. Nonempty output must contain a foldable strict v2 ledger. `plan.json` must also exist, parse successfully, and have the same `plan_version` as the ledger. If `plan_version` changes, use new output; never append a second plan.
|
|
37
|
+
- After the second identity check, `prepare` writes `waker.stop`, preventing old producers from interleaving with preparation. When preparation is complete, the operator must explicitly run `rearm` to clear this handoff stop. That command removes only the stop; it does not consume events or repair an abnormal lock.
|
|
38
|
+
- `finalize` reaching complete means only that scheduling has reached a terminal state: every group is submitted, or failed with its retry budget exhausted. It does not mean that the gates passed. Rendering and the full gates still determine whether delivery succeeds.
|
|
39
|
+
|
|
40
|
+
## 2. Strict Ledger v2
|
|
41
|
+
|
|
42
|
+
`ledger.jsonl` is an append-only event stream. File order is event order; `t` is used only for timestamps and auditing. The first line, and only the first line, is a plan carrying `ledger_version: 2`. Strict v2 accepts **exactly one leading plan (one plan and one plan_version)**. Legacy v1, a second plan, unknown events, invalid fields, blank lines, and torn JSON at any position all fail fast. A corrupt line must never be skipped so folding can continue.
|
|
43
|
+
|
|
44
|
+
```jsonc
|
|
45
|
+
{"t":"2026-11-10T00:00:00.000Z","ev":"plan","ledger_version":2,"plan_version":"p-8f2a","groups":[{"group_id":"g03-settings","kind":"page","pages":["fragment:MainSettingsFragment"],"spec_ids":["fragment:MainSettingsFragment"]}]}
|
|
46
|
+
{"t":"2026-11-10T00:00:01.000Z","ev":"claim","group":"g03-settings","attempt":1,"token":"c7f1aa"}
|
|
47
|
+
{"t":"2026-11-10T00:00:02.000Z","ev":"confirm","group":"g03-settings","attempt":1,"token":"c7f1aa","agent_id":"a1b2"}
|
|
48
|
+
{"t":"2026-11-10T00:00:03.000Z","ev":"start","group":"g03-settings","attempt":1,"token":"c7f1aa"}
|
|
49
|
+
{"t":"2026-11-10T00:00:04.000Z","ev":"beat","group":"g03-settings","attempt":1,"token":"c7f1aa"}
|
|
50
|
+
{"t":"2026-11-10T00:00:05.000Z","ev":"submit","group":"g03-settings","attempt":1,"token":"c7f1aa","spec_id":"fragment:MainSettingsFragment","page":"fragment:MainSettingsFragment"}
|
|
51
|
+
{"t":"2026-11-10T00:00:06.000Z","ev":"orphan","group":"g05-x","attempt":1,"reason":"lease-expired"}
|
|
52
|
+
{"t":"2026-11-10T00:00:07.000Z","ev":"abandon","group":"g05-x","attempt":1,"reason":"orphan-expired"}
|
|
53
|
+
{"t":"2026-11-10T00:00:08.000Z","ev":"retry","group":"g05-x","attempt":1,"force":false}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Field and identity constraints:
|
|
57
|
+
|
|
58
|
+
- Every event has an ISO 8601 timestamp `t` containing a full date, time, and time zone, such as `2026-11-10T00:00:00.000Z`. In addition to requiring the complete format and a finite `Date.parse` result, the timestamp must represent a real calendar date. The month/day, hour/minute/second, and numeric time-zone hour/minute values must all be within their valid ranges. `2026/11/09`, a date alone, a time without a time zone, `2026-02-30T00:00:00Z`, and `2026-04-31T00:00:00Z` are corrupt even if `Date.parse` normalizes them. For attempt events, `attempt` is a positive integer. Tokens on `claim/start/confirm/beat/submit` are six lowercase hexadecimal digits.
|
|
59
|
+
- `confirm` must have a nonempty `agent_id`. `submit` must have nonempty `spec_id/page`, and the SPEC must belong to the group. `orphan` accepts only `lease-expired`. `retry.force` must be a boolean.
|
|
60
|
+
- `abandon.reason` accepts only `phantom/precheck-failed/orphan-expired/dispatch-error`. `precheck-failed` must include `failure_reason`. Every abandon is permitted only from claimed/live/orphaned. No reason may move submitted back to an earlier state.
|
|
61
|
+
- The plan's group_id and spec_id values are globally unique. A page group must have pages/spec_ids. A shared group may have empty pages but must have spec_ids. An empty groups array is valid.
|
|
62
|
+
- `claim` is permitted only from pending. It increments attempt by exactly one and generates a new token. Attempt increases monotonically. A new claim clears the previous attempt's published, orphan, and timing evidence.
|
|
63
|
+
- `confirm/start/beat/submit` must match the current `(group, attempt, token)`. A late proof with the current identity is a fold no-op with no event semantics when the group is submitted/failed. Before writing an event, the submission coordinator rejects a stale token as conflict/token-mismatch.
|
|
64
|
+
- For the current attempt, `confirm/start/beat` moves claimed/live/orphaned back to live and updates `lastProofAt`. `submit` records publication at SPEC level. The group becomes submitted only when its complete in-group `expectedSpecIds` set has arrived; a partial submission for a split page remains live.
|
|
65
|
+
|
|
66
|
+
Every append occurs while holding the `<output>/.ledger.lock` `open(wx)` lock and is followed by `fsync`. The watchdog/recovery initial, latest, and final folds also use `withLockRetry` to obtain short locked snapshots. Scanning, rendering, and gates remain outside the lock. `state.json` is written atomically using a temporary file plus rename. It is only a fold cache and may be deleted and rebuilt.
|
|
67
|
+
|
|
68
|
+
## 3. State Machine, Orphans, and Automatic Retry
|
|
69
|
+
|
|
70
|
+
| fold state | Meaning | Exits |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| `pending` | Waiting for claim | `claim` → claimed; when the budget is exhausted, appears in the watchdog's abandoned list |
|
|
73
|
+
| `claimed` | An attempt/token exists, but there is no proof of life yet | confirm/start → live; `claimTtlMs` expiry → abandon/phantom → failed |
|
|
74
|
+
| `live` | At least one proof of life, or a partial submission | Submit the complete SPEC set → submitted; no new proof within `leaseMs` → orphan/lease-expired → orphaned |
|
|
75
|
+
| `orphaned` | The lease has expired, but a recovery window remains for a late agent | Current proof/submit → live; `orphanGraceMs` expiry → abandon/orphan-expired → failed |
|
|
76
|
+
| `submitted` | The complete in-group SPEC set for the current attempt passed the submission gates | Terminal; only finalize is permitted, and every abandon is invalid |
|
|
77
|
+
| `failed` | Phantom, orphan timeout, precheck failure, or dispatch failure | Within budget, watchdog automatically retries → pending; with budget exhausted, remains failed and is listed in abandoned |
|
|
78
|
+
|
|
79
|
+
The budget formula is `attempt - retryBudgetBase < maxAttempts`, with default `maxAttempts = 3`. Within the same lock, watchdog **automatically retries** every failed group that still has budget, returning it to pending. Consequently, failed does not appear directly in `to_dispatch`; attempt increases only on the next valid claim. After the budget is exhausted, only a manual `dispatch retry --force` is permitted. It sets `retryBudgetBase` to the current attempt and opens a new budget window, but never resets attempt.
|
|
80
|
+
|
|
81
|
+
`retryBudgetBase`, token, expected/published SPEC sets, orphanReason/orphanAt, lastProofAt, and claimedAt are all serialized into `state.json`. The watchdog's `abandoned` value is a report of groups whose budgets are exhausted, not a seventh fold state.
|
|
82
|
+
|
|
83
|
+
### Time and Snapshots
|
|
84
|
+
|
|
85
|
+
| Parameter | Default | Purpose |
|
|
86
|
+
|---|---:|---|
|
|
87
|
+
| `claimTtlMs` | 15 min | Deadline for a phantom that still has no confirm/start after claim |
|
|
88
|
+
| `leaseMs` | 25 min | Orphan deadline between adjacent ledger proofs while live |
|
|
89
|
+
| `orphanGraceMs` | 25 min | Recovery window in which orphaned waits for late proof/submit |
|
|
90
|
+
| `concurrency` | 8 | Upper bound for the slots calculation |
|
|
91
|
+
| `maxAttempts` | 3 | Maximum attempts within each force budget window |
|
|
92
|
+
|
|
93
|
+
Proof of life is confirm or start. Proof of progress is a confirm, start, beat, or submit event. Draft scanning is a recovery mechanism; it does not invent a heartbeat by rewriting `lastProofAt`. `overdue` is reported once live reaches 80% of the lease measured from `lastProofAt`. `nextDeadline` is the earliest future deadline for the current attempt among claim, 80% lease, lease, and orphan grace.
|
|
94
|
+
|
|
95
|
+
Slots are calculated only as `max(0, concurrency - live.length - claimed.length)`. Orphaned groups consume no new slots, but their current attempt can still be revived by proof/submit. `to_dispatch` contains only pending groups with remaining budget.
|
|
96
|
+
|
|
97
|
+
## 4. Draft Recovery and Two-Phase Gates
|
|
98
|
+
|
|
99
|
+
### 4.1 Scan for Recovery Before Timeout Decisions
|
|
100
|
+
|
|
101
|
+
Every `watchdog --reconcile` first checks the ledger and plan.json under a short lock. The ledger must contain a nonempty `plan_version`; plan.json must exist, parse successfully, and have the same version. A missing/empty/old ledger or a plan failure immediately aborts the round. An empty fold must not be mistaken for complete. Only a valid v2 `groups: []` is a valid empty plan, and it is immediately complete.
|
|
102
|
+
|
|
103
|
+
Next, scans are grouped by attempt number. For each claimed/live/orphaned group's **current** attempt, scan `drafts/attempt-<n>/` once. Even when several groups share the same attempt number, do not scan it repeatedly. Old attempts are neither recovered nor reported. After recovery finishes through the normal submission coordinator, fold again under a final short lock. Only then evaluate phantom/lease/orphan timeouts.
|
|
104
|
+
|
|
105
|
+
As a result, a valid current-attempt draft that is on disk but has no ledger submit yet can be accepted first. This prevents abandoning the group and only afterward discovering that it had completed. Runtime failures such as busy, ledger corruption, or plan reads must propagate and abort the round. They must not be converted into `stale_drafts: rejected` and then followed by phantom/orphan/retry processing. The snapshot's `stale_drafts` reports what this scan actually found and did. Every entry is exactly `{group,attempt,spec_id,path,status,reason}`. `path` is an output-relative POSIX path. Entries cover recovered, rejected, and invalid drafts with their reasons, and do not expose internal `file/specId`. This field is not an empty placeholder telling the caller to perform another file scan.
|
|
106
|
+
|
|
107
|
+
### 4.2 Scanning and Choosing Among Multiple Candidates
|
|
108
|
+
|
|
109
|
+
The scan reads sorted `.json` files as exact bytes and computes their SHA-256 hashes. It routes each draft using the plan's global SPEC owner:
|
|
110
|
+
|
|
111
|
+
- The canonical path is `drafts/attempt-<n>/<stemOf(spec_id)>.json`. A parseable canonical draft with correct identity takes priority, and every alias is marked duplicate-ignored.
|
|
112
|
+
- If canonical exists but is corrupt or has a mismatched spec_id, it still prevents an alias from replacing it. An alias must never silently override a bad canonical draft.
|
|
113
|
+
- If canonical does not exist and multiple aliases for the same SPEC have different hashes, mark all of them conflict. Select and submit none. If all hashes are identical, deterministically select the first by POSIX path and mark the others duplicate-ignored.
|
|
114
|
+
- An unparseable draft, missing spec_id, unknown spec_id, or canonical identity mismatch produces an issue. Such drafts do not participate in hash voting.
|
|
115
|
+
- After selecting a single alias, write its original bytes in full to a unique temporary file on the same volume and fsync it. Then atomically install canonical with a hard link. `EEXIST` is a competing-writer conflict: clean up the temporary file and never overwrite a canonical created after the scan by a normal submission or another recovery worker. Hidden alias temporary files left by a crash do not participate in later scans.
|
|
116
|
+
|
|
117
|
+
### 4.3 Two-Phase Gates
|
|
118
|
+
|
|
119
|
+
Both explicit submit and recovery merge the current input with every in-group canonical draft, then call the same `validateSubmission`:
|
|
120
|
+
|
|
121
|
+
1. If the group does not yet have all its SPECs, call `runPartialGroupGates` to validate every existing draft. Perform the page coverage-union completeness check only when all sibling SPECs for that page are present. A missing sibling alone must not incorrectly trigger G1 missing.
|
|
122
|
+
2. If the group has its complete SPEC set, call `runGroupGates` to run the full group gates, including missing-draft and coverage completeness checks.
|
|
123
|
+
|
|
124
|
+
When a gate fails, write `abandon/precheck-failed` with `failure_reason`, return `accepted: []`, and do not publish the staged canonical drafts from this call. The submit CLI prints the failure reason first and exits nonzero; it must not print Submitted success text. Watchdog then retries automatically within budget. Only after the gates pass are SPECs published one by one and submit events appended. A byte-identical duplicate submission of an already published SPEC may return alreadySubmitted without writing a duplicate event. Different content must not rewrite a submitted/failed group or a SPEC already published in the same attempt, and must not append to the ledger.
|
|
125
|
+
|
|
126
|
+
### 4.4 Rechecking Identity, Hash, and State
|
|
127
|
+
|
|
128
|
+
Recovery treats scan results as immutable evidence, not permanent authorization. Before creating canonical, reread every candidate and verify its hash, and reread the attempt's file list. If a candidate changed, a new conflicting alias appeared, or canonical has a competing writer, return a retryable conflict and wait for the next full scan.
|
|
129
|
+
|
|
130
|
+
Both explicit and recovered submission snapshots check plan.json against the ledger's `plan_version`. Normal explicit input is read outside the lock and validated as staged bytes. Rendering and gates use only that staged content; canonical must not be written early.
|
|
131
|
+
|
|
132
|
+
Inside the short commit lock, fold again and reread plan.json. Check token, attempt, `plan_version`, state writability, and the `publishedSpecIds` set. Use `Buffer.equals` to recheck the input source bytes, existing canonical bytes, and published set. Also record the set of canonical files confirmed missing by this fence.
|
|
133
|
+
|
|
134
|
+
Publication has two strictly separated phases:
|
|
135
|
+
|
|
136
|
+
1. For every SPEC whose canonical was missing at the fence and is awaiting publication, install it exclusively using a same-volume temporary file, fsync, and a hard link. Any `EEXIST` or other publication failure immediately ends the operation as conflict. At this point no submit has been appended.
|
|
137
|
+
2. Only after every required installation succeeds, append all submit events for the batch together.
|
|
138
|
+
|
|
139
|
+
Never alternate installation and append in the same loop. Otherwise, a later SPEC's competing write could fail after an earlier SPEC's partial submit had already been recorded. A canonical that already existed at the fence and whose bytes are unchanged may proceed directly to phase two so its submit can be recorded.
|
|
140
|
+
|
|
141
|
+
If identity, published state, plan_version, or bytes change, likewise publish nothing and append nothing. The coordinator rereads and revalidates at most three rounds; if conflict remains, it reports conflict. After a conflict, a new snapshot rerenders and regates an existing but unpublished canonical using its actual canonical bytes, rather than continuing to validate the staged bytes that lost the race. A different explicit input for an already published SPEC is still conflict and must not be disguised as alreadySubmitted. Thus, the bytes that pass the gates are exactly the bytes accepted by canonical and by the unique ledger submit.
|
|
142
|
+
|
|
143
|
+
## 5. The Only Valid Orchestration Loop
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
loop:
|
|
147
|
+
1. inspect legacy/invalid/error evidence
|
|
148
|
+
→ recover error consuming → error claiming → pending error even while stopped
|
|
149
|
+
→ isolate stale errors only in waker.stale; do not write stop
|
|
150
|
+
→ for every valid fatal, stop, archive waker.errors, hard-block, and continue draining
|
|
151
|
+
→ process ordinary events only when there is no error/invalid and no stop; otherwise freeze ordinary events until manual rearm
|
|
152
|
+
2. watchdog --reconcile --json
|
|
153
|
+
3. complete → check every location before and after stop → finalize-ready
|
|
154
|
+
→ immediately force-drain error/invalid → recheck the exact complete-stop → finalize
|
|
155
|
+
4. slots=max(0, concurrency-live-claimed), dispatch according to to_dispatch
|
|
156
|
+
5. hard-block → stop → report; do not automatically arm
|
|
157
|
+
6. probe/arm waker only on a normal path with no stop
|
|
158
|
+
7. wait for work notification or waker background completion notification, then return to 1
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Each group awaiting dispatch still follows `dispatch claim` → start a background Agent (replacing the prompt token) → obtain an agent-id → `dispatch confirm`. A claim/dispatch failure must not be represented as confirm. If `to_dispatch` is nonempty but no group was dispatched this round and there are no live/claimed groups, that is a hard-block. Do not simply finish the round and forget the groups.
|
|
162
|
+
|
|
163
|
+
Recovery order cannot be changed: process events first, including leftover consuming; then run watchdog; then decide whether to complete, dispatch, or arm. Complete, error, lock/event abnormalities, and every other hard-block all stop first. An error path or any stop path never automatically rearms/arms. After context compaction, likewise begin again at step 1 rather than reconstructing the group list from memory.
|
|
164
|
+
|
|
165
|
+
## 6. Waker Event Protocol
|
|
166
|
+
|
|
167
|
+
### 6.1 One Pending Queue; Exit After Writing an Event
|
|
168
|
+
|
|
169
|
+
The background command `node scripts/waker.mjs <output> waker` runs a single-owner lifecycle. It reconciles first, then observes size/mtime fingerprints for `ledger.jsonl` and, recursively, drafts JSON files. Its wait is bounded simultaneously by interval, `nextDeadline`, and the healthy-relay upper bound:
|
|
170
|
+
|
|
171
|
+
- `relayAfter = max(60, 2 * interval)` seconds. A healthy empty round produces an event only at relay time.
|
|
172
|
+
- `lockTtl = max(90, 3 * interval, 6 * poll)` seconds.
|
|
173
|
+
- Complete, ledger/drafts changes, deadline, relay, stop, and error are all published to independent `waker.events/pending/<event_id>.json` files. **The waker exits after writing an event**; it is not a permanent loop. Normal exit leaves the immutable lock in place. At startup, produce drafts/ledger immediately only if drafts were actually `recovered` or real state progress occurred. The same invalid/conflict does not repeatedly trigger an immediate wake; it still waits for a file change, deadline, or relay.
|
|
174
|
+
- An event contains `event_id/plan_version/kind/at/source/nonce/detail`. Before every reconcile, heartbeat, and event write, check the owner nonce. A mismatch returns lock-lost; do not reconcile or write error on behalf of the new owner. An owner waker has `source` set to `waker`.
|
|
175
|
+
- Publication first uses `wx` to write a unique hidden temporary file on the same volume. Write it completely, fsync it, and close it; then install pending without overwrite using a hard link. `EEXIST` for the same ID does not overwrite the existing evidence. Hidden temporary files do not participate in enumeration, fences, or claims, and are not automatically cleaned by TTL after a crash. Ordinary events and multiple errors are each retained; they never overwrite one another.
|
|
176
|
+
|
|
177
|
+
The `wait` subcommand is a low-level bounded observer. Exit code 0 means it wrote a change/deadline event, 5 means stop or the bounded wait ended, and 2 means an observation/input error. The first wait establishes only a baseline and does not invent a change. Hidden alias temporary JSON files do not participate in fingerprints. If stat encounters ENOENT after enumeration, skip that file instead of hard-blocking; the next round can still observe a real replacement. An event produced by an independent wait explicitly carries `source: "wait"`. It neither acquires the owner lock nor impersonates the owner.
|
|
178
|
+
|
|
179
|
+
### 6.2 Dynamic Fatal Priority and Two-Phase Atomic Claim
|
|
180
|
+
|
|
181
|
+
Every `claimWakerEvent` rechecks all locations and selects only one candidate using the following dynamic priority. Every consumed event is handled only through `handleWakerEvent`:
|
|
182
|
+
|
|
183
|
+
1. A structurally valid error always has priority: **error consuming → error claiming → pending error**. Ordinary consuming/claiming entries remain in place but are paused; they cannot suppress a fatal.
|
|
184
|
+
2. Only when no error candidate exists and stop is absent are ordinary events processed as **ordinary consuming → ordinary claiming → pending non-error**.
|
|
185
|
+
3. Within a category, sort by `at` ascending and then by `event_id` lexicographically. Corrupt events and quarantining go first to `quarantineInvalidEvent`; legacy explicitly hard-blocks.
|
|
186
|
+
|
|
187
|
+
To claim a normal pending event, first install the fixed `waker.claiming.<event_id>.json` without overwrite using a hard link. Once installed, claiming fixes the winner's bytes. **Do not then perform a pending→claiming rename, and do not directly unlink pending.** Promotion from claiming to the fixed `waker.consuming.<event_id>.json` is likewise decided by a no-overwrite hard link; after successful installation, do not directly unlink claiming either. In both phases, selected sources all enter the atomic duplicate archiving and bytes recheck described below. POSIX therefore no longer depends on a same-inode no-op rename, and Windows has no pending→claiming `EEXIST/EPERM` overwrite branch. Three bounded rescans preserve transient recovery.
|
|
188
|
+
|
|
189
|
+
Every `claimEvent` call creates fresh `ownedIds/lostIds`. A consuming entry that already existed on the initial scan may be returned as recovery. However, when competing to move the same claiming entry to consuming, only the winner of the no-overwrite installation into the fixed claiming/consuming entries owns this handling attempt. A loser immediately adds that event_id to `lostIds`. Later scans in the same call skip all pending/claiming/consuming entries for that ID and must not return the winner's same consuming entry. Even if the target disappears while being checked, this loss is not revoked. A later independent call resets `lostIds`, so it can still recover consuming. `ownedIds` records this call's own consuming installations and is used only to recognize itself during transient rescans. Another consumer's EEXIST cannot be treated as this caller's victory. If two child processes enter event handling simultaneously, only the winner reconciles/archives; the loser returns null/lock-held.
|
|
190
|
+
|
|
191
|
+
A crash after linking can leave byte-identical pending/claiming/consuming copies. Recovery first establishes or checks stable consuming, prechecks every duplicate copy, and only then cleans up. It never unlinks an active duplicate pending/claiming source. Instead, it atomically renames the source to a unique, **unverified** root-level `waker.duplicates/<eventId>.<nonce>.json`. Every claim, arm, and finalize check first classifies these staged copies. Only a byte-for-byte match with stable consuming is atomically moved into `waker.duplicates/verified/` and permanently ignored. If the target is missing or the bytes differ, atomically move the current bytes to a unique `waker.conflict.<eventId>.<nonce>.json` and return `consuming-conflict` hardBlock. Conflict files participate in inspect invalid and event fences, and all conflicting bytes are retained. Thus, a crash after archived rename but before read, or after conflict determination but before conflict rename, cannot hide evidence. After normal consuming handling, archive verified as well, so old duplicates are not mistaken for valid merely because their target disappeared normally. The event protocol creates no auxiliary mutex, reclamation, or takeover files.
|
|
192
|
+
|
|
193
|
+
Before returning, `finishClaim` must reread consuming and compare it byte-for-byte with the scanned bytes. If the sole consuming copy A is replaced by B, it must not return handling rights for A. Atomically move B into conflict and hard-block. A consumed event carries the bytes that were claimed.
|
|
194
|
+
|
|
195
|
+
Normal success, complete, fatal, and stale dispositions all follow the same order: check consuming first; install `waker.stale`, `waker.errors`, or the verified target with a no-overwrite hard link; finally atomically move consuming into `waker.duplicates/verified/`. If current bytes fail any comparison, atomically move them into a persistently fenced conflict. Never verify→unlink, and never let A's unlink/archive operation handle B. Ordinary consuming completes this disposition only after reconcile succeeds. A failure may remain for at least one retry, but a later fatal still preempts it immediately.
|
|
196
|
+
|
|
197
|
+
Compare plan_version with the current plan both before and after handling. For owner waker events, also compare the event nonce with the current lock nonce. Only explicit `source: "wait"` skips the owner nonce fence; it must still pass the plan_version check. The sole side effect of a mismatched stale error or ordinary event is isolation in `waker.stale/<event_id>.json`, returning ignore/stale. It **does not write stop, hard-block, reconcile, finalize, or arm**.
|
|
198
|
+
|
|
199
|
+
For a currently valid fatal, first make a best-effort reconcile and fence again. Then persist stop with `reason: "error"` and the corresponding `event_id`, archive the event in `waker.errors/<event_id>.json`, and hard-block. After the first fatal is returned, the orchestrator must continue draining every valid fatal and isolate every stale error. **Even while stopped, recovery of error consuming/claiming, claiming pending errors, fencing, archiving, and draining remain permitted.** Ordinary pending/claiming/consuming entries are all frozen and resume only after explicit manual `rearmWaker` clears stop. No automatic path may rearm.
|
|
200
|
+
|
|
201
|
+
### 6.3 Complete Double Check, Exact Recovery, and the finalize-ready Gate
|
|
202
|
+
|
|
203
|
+
Before persisting stop for ordinary complete, check pending/claiming/consuming/quarantining/unverified duplicates/conflict for every error/invalid/legacy candidate. If any candidate exists, retain consuming and drain first. Only when no candidate exists, publish complete-stop without overwrite. Then, after stop is persisted but before consuming is moved to verified, perform a second check of every location and recheck stop. Only if both checks pass, complete the byte-checked disposition and return **finalize-ready**; do not finalize directly.
|
|
204
|
+
|
|
205
|
+
complete-stop must contain **exactly four fields**: `plan_version`, `at`, `reason: "complete"`, and `event_id`. Its event_id must exactly match consuming. A fatal/invalid stop uses its own reason and event_id/evidence_id, which immediately invalidates the complete recovery exception. If the process exits after complete-stop but before consuming moves to verified, only that exact complete consuming entry may resume from the second check without repeating reconcile. The exception is forbidden for every other ordinary event, an event_id mismatch, extra fields, and an old stop with no reason. Before the final atomic move, resumed recovery still rechecks error/invalid and the exact stop. An error stop left after fatal drain must block finalize-ready.
|
|
206
|
+
|
|
207
|
+
After receiving finalize-ready, the orchestrator must **immediately force another drain of error/invalid evidence** until no claimable candidate remains. It must then recheck the same exact complete-stop before actual finalize is allowed. If error/invalid is found, cancel this finalize and prioritize draining. The last observation with no error/corrupt event is the linearization point of actual finalize. Errors arriving after that point are left for the next normal orchestration loop. Finalize neither clears the queues nor treats ordinary notification files as disposable garbage.
|
|
208
|
+
|
|
209
|
+
### 6.4 Persistent Stop for Invalid Events and Quarantining Recovery
|
|
210
|
+
|
|
211
|
+
At every location, before constructing a path or moving a file, validate the event object, strict ISO `at`, kind/source, plan/nonce shape, the 16-digit lowercase hexadecimal `event_id`, and agreement between the pending/consuming filename and the content ID. Process corrupt events in this order:
|
|
212
|
+
|
|
213
|
+
1. Read-only, compute the deterministic `evidence_id = SHA-256(location_kind + "\0" + original_name + "\0" + bytes)`. First persist stop containing `reason: "invalid-event"` and that evidence_id. Record the plan version if plan can be read; otherwise record null. If stop fails, do not move the source file.
|
|
214
|
+
2. Atomically rename the original file to `waker.quarantining.<evidence_id>.<nonce>.json`, reread the holding file, and confirm its bytes match exactly. If reading fails, retain stop and holding and do not publish evidence. If holding differs from what is expected, atomically move its current bytes into a unique persistently fenced conflict; do not delete or overwrite them.
|
|
215
|
+
3. From stable holding, publish `waker.errors/invalid-<evidence_id>.json` without overwrite. If the target already exists, compare byte-for-byte and resume idempotently only if it matches. If target/holding do not match, retain the existing target, atomically move holding's current bytes into conflict, and hard-block. Never unlink to roll back evidence or holding. If holding changes are detected after linking, never delete a valid target. If holding disappears while target still matches the expected bytes, treat the operation as an idempotent success.
|
|
216
|
+
4. After a final consistency check, even successfully cleaned holding is moved into `waker.duplicates/verified/`. This archive move is atomic, not unlink. Check bytes again before and after the move; replacement of holding likewise enters conflict. A crash can leave the source file, holding, or evidence plus holding. Deterministic IDs and byte-for-byte comparisons prevent duplicate creation and evidence overwrite. Active pending/claiming/consuming paths are never cleaned by unlink.
|
|
217
|
+
|
|
218
|
+
### 6.5 Event Fence and the Legacy Singleton
|
|
219
|
+
|
|
220
|
+
`hasPendingWakerEvent` checks **pending, claiming, consuming, quarantining, root-level unverified duplicates, and conflict**. The presence of any category forbids waker ownership changes and automatic arm. `waker.duplicates/verified/` is the only duplicate-evidence location that may be permanently ignored. Legacy `waker.event.json` serves only as a legacy hard-block: do not read and merge it, rewrite it, or delete it; manual inspection and cleanup are required. No command may produce or consume that singleton.
|
|
221
|
+
|
|
222
|
+
## 7. Final Safety Decision for the Waker Lock
|
|
223
|
+
|
|
224
|
+
`waker.lock` is created exclusively with `open(wx)` and records `{pid,host,nonce,startedAt,plan_version}`. **The lock is immutable**: normal operation, heartbeat, relay, and normal exit do not rewrite it, and normal exit does not delete it. Heartbeat writes `waker.heartbeat.<nonce>.json` by nonce, and its content carries the same nonce. Only the owner that still holds the lock for that nonce may renew it; an old owner's heartbeat cannot revive a replacement.
|
|
225
|
+
|
|
226
|
+
`probe`/`acquire` must use the following final decision procedure, in this exact order:
|
|
227
|
+
|
|
228
|
+
1. If `waker.events/pending/`, any `waker.claiming.*`, `waker.consuming.*`, `waker.quarantining.*`, root-level unverified `waker.duplicates/*`, `waker.conflict.*`, or legacy `waker.event.json` exists, return event-pending and **forbid ownership change**, even if stop also exists or the old PID is dead. Finish event handling first. Only `waker.duplicates/verified/` may be ignored.
|
|
229
|
+
2. If stop exists, do not acquire or arm. Only after manually resolving the other barriers may the operator run `rearm`.
|
|
230
|
+
3. Only a missing lock permits direct competition to create it with `wx`. An empty lock, partial JSON, array, missing fields, or invalid identity is a **structurally invalid lock and hard-blocks**. The roughly two-second initialization grace only explains initializing; it never grants automatic takeover. After the grace period, stale still hard-blocks.
|
|
231
|
+
4. A plan_version mismatch hard-blocks. A missing heartbeat, corrupt heartbeat, nonce mismatch, or invalid renewedAt also hard-blocks.
|
|
232
|
+
5. If the local PID is still live, heartbeat exceeding TTL means only **live stale; do not automatically take over**. If a remote PID cannot be proven dead, TTL likewise cannot justify an ownership change. These states require manual inspection.
|
|
233
|
+
6. **Only a structurally valid lock with matching plan, valid nonce heartbeat, and a dead PID confirmed on the same host may be taken over.** Only when all conditions hold is the reason dead-pid.
|
|
234
|
+
|
|
235
|
+
For a valid dead-PID takeover, first rename the old lock to `waker.lock.stale.<oldnonce>`, then create the new lock with `wx`. The stale target also acts as the exclusive takeover guard. Before and after the guard, and before rename, reread nonce and check the event fence again to prevent an old reader from moving a replacement. Arming immediately after a healthy relay may wait within a bounded handoff for the old process to actually close. Live stale does not enter this automatic takeover retry.
|
|
236
|
+
|
|
237
|
+
Manual recovery order: first preserve/handle every pending, claiming, consuming, quarantining, unverified duplicate, conflict, and legacy event. Next handle stop or the abnormal lock according to the rules above; rearm cannot repair a structurally invalid lock. After confirming there is no live owner, manually clean the abnormal lock if necessary, then run `waker rearm` and probe again. No automatic error-handling path may perform these manual cleanup actions.
|
|
238
|
+
|
|
239
|
+
## 8. Child-Agent Busy and Failure Boundaries
|
|
240
|
+
|
|
241
|
+
When `start/beat/submit` encounters `ledger busy`, it makes at most three attempts including the first, with bounded 50 ms and 100 ms backoff. Brief lock contention is not task failure. If all three attempts are busy, stop retrying and report to the orchestrator. Do not write the group as precheck-failed or abandon it yourself.
|
|
242
|
+
|
|
243
|
+
Handle typical failures according to the protocol:
|
|
244
|
+
|
|
245
|
+
| Failure | Current defense |
|
|
246
|
+
|---|---|
|
|
247
|
+
| phantom dispatch | Separate claim/confirm; abandon/phantom after claim TTL, then automatically retry within budget |
|
|
248
|
+
| Lost completion notification | Scan current-attempt drafts and use normal gates/submit; the ledger, not the notification, proves completion |
|
|
249
|
+
| Duplicate/late agent | Attempt directories, token identity, and pre-submission state/hash rechecks isolate old writes |
|
|
250
|
+
| Stuck agent | live lease → orphaned → grace → abandon; current proof/submit can revive it during this sequence |
|
|
251
|
+
| Orchestrator memory loss | Recover consuming/event first, then run watchdog; never fill in state from memory |
|
|
252
|
+
| precheck failure | failure_reason + failed; automatic retry within budget, and only manual force opens a new budget |
|
|
253
|
+
| Corrupt or busy ledger | Corruption fails fast; busy uses bounded lock waits and at most three child-agent attempts, without skipping events |
|
|
254
|
+
| Abnormal waker process | error event → best-effort reconcile → stop + errors archive + manual rearm |
|
|
255
|
+
| live stale / invalid lock / unconsumed event | hard-block/event-pending; do not automatically change owners based on TTL or a guessed dead PID |
|