@buaa_smat/hometrans 26.0.1 → 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 +14 -7
- 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,267 @@
|
|
|
1
|
+
# F0 — shared-layer pre-seeding
|
|
2
|
+
|
|
3
|
+
## Orchestrator contract
|
|
4
|
+
|
|
5
|
+
Render this file with the following fields and dispatch **one foreground `general`
|
|
6
|
+
sub-agent** (not background, not in the dispatch ledger; same protocol as B3).
|
|
7
|
+
|
|
8
|
+
| field | value |
|
|
9
|
+
|---|---|
|
|
10
|
+
| `harmonyos_project_dir` | `<HMOS>` |
|
|
11
|
+
| `source_project_dir` | the pipeline's `ANDROID` input (source root; never assume Kotlin/Android) |
|
|
12
|
+
| `source_kind` | `android` \| `uniapp` (from `state.config.source_kind`, default `android`) |
|
|
13
|
+
| `wave` / `members` | current wave |
|
|
14
|
+
| `candidates_path` | `.hometrans/wave_<K>/shared_candidates.json` |
|
|
15
|
+
| `manifest_path` | `.hometrans/wave_<K>/shared_manifest.json` |
|
|
16
|
+
| `semantic_docs` | resolved paths + `doc_source` |
|
|
17
|
+
| `shared_classes` | effective class config |
|
|
18
|
+
| `design_dir` | `DESIGN_DIR` (read-only) |
|
|
19
|
+
| `wiring_files` | filtered exact paths under the candidate module roots + `wiring_compact` |
|
|
20
|
+
| `barrel_allowed` | `true` |
|
|
21
|
+
| `pre_f0` | `PRE_F0` |
|
|
22
|
+
| `engine_mode` | `ENGINE_MODE` |
|
|
23
|
+
|
|
24
|
+
## Agent rules
|
|
25
|
+
|
|
26
|
+
1. Read `candidates_path`; only implement the listed `id`s. `source_kind=uniapp`
|
|
27
|
+
means Vue/JS/TS + `pages.json` evidence; never assume Kotlin or `AndroidManifest`.
|
|
28
|
+
2. Allowed implementations (primitives only):
|
|
29
|
+
- `network.transport`: request primitive, response envelope, `describeError`, token read.
|
|
30
|
+
- `database`: open DB, full documented schema, per-table DAO CRUD; if
|
|
31
|
+
`mode:"complete"`, append missing tables/DAOs to the existing `AppDatabase`,
|
|
32
|
+
never a second `getRdbStore`.
|
|
33
|
+
- `preferences`: get/set/delete + key constants.
|
|
34
|
+
No pages/VM/components/business aggregation/route-table content.
|
|
35
|
+
3. Placement: only under `module_roots`/`ets_roots` from the candidate. Create
|
|
36
|
+
`ets_root` and subdirs if absent. Do not create HAR/HSP, do not edit
|
|
37
|
+
`build-profile.json5`/`hvigorfile.ts`, no other module's `oh-package.json5`.
|
|
38
|
+
4. Barrel: if `oh-package.json5 main` is non-empty and the file exists, append
|
|
39
|
+
explicit named exports; do not migrate/replace the existing entry. If
|
|
40
|
+
`main` is empty/missing/missing target, create `<ets_root>/Index.ets` and set
|
|
41
|
+
this module's `main` to it; **when you edit `oh-package.json5` or an existing
|
|
42
|
+
barrel, list each edited file in `wiring[]`** (the validator's diff
|
|
43
|
+
allowlist is `files[] ∪ wiring[] ∪ {barrel}`, and `files[]` may only contain
|
|
44
|
+
paths under `path`). Never use `export *` for the exports you add.
|
|
45
|
+
5. Commit exactly once: `infra(wave <K>): shared layer`; parent must be
|
|
46
|
+
`pre_f0`; no merge, no amend, no second commit. Leave the tree clean.
|
|
47
|
+
6. Write `manifest_path` with `schema:"spec_shared_manifest/v1"`, `campaign_id`,
|
|
48
|
+
`wave`, `status:"done"`, `commit`, `base:pre_f0`, `docs_refreshed:false`,
|
|
49
|
+
`docs_commit:null`, and one entry per module: `id`, `module_root`,
|
|
50
|
+
`module_name`, `mode` (`create|complete`), `path`, `barrel`, `files`,
|
|
51
|
+
`api[]` (`{name,file}`), `consumers`, `wiring[]`, `evidence[]` (source-side).
|
|
52
|
+
`commit` and `base` must be **full 40-character SHAs** (`git rev-parse HEAD`
|
|
53
|
+
output), not abbreviations.
|
|
54
|
+
7. If you cannot implement any candidate, write `status:"skipped"` with
|
|
55
|
+
`reason:"declined:<code>"`; never write `done` + empty `modules`. A
|
|
56
|
+
`skipped` manifest is only valid when you made **no commit at all** —
|
|
57
|
+
`HEAD` must still equal `pre_f0`. Once you have committed anything you
|
|
58
|
+
must never write `skipped`/`declined`: finish the `done` manifest that
|
|
59
|
+
records that commit instead. A moved `HEAD` behind a skipped manifest is
|
|
60
|
+
an unrecorded-commit anomaly: the orchestrator records it and stops for
|
|
61
|
+
**manual recovery**; it never resets or deletes those commits.
|
|
62
|
+
8. Reply with a single compact JSON object (same shape as B3). No prose, no
|
|
63
|
+
questions. If you need more evidence, read files; do not stop to ask.
|
|
64
|
+
9. A `requires_user_input` state from the semantic-docs step is not yours: the
|
|
65
|
+
orchestrator records it and continues.
|
|
66
|
+
|
|
67
|
+
## Manifest example
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"schema": "spec_shared_manifest/v1",
|
|
72
|
+
"campaign_id": "<uuid>",
|
|
73
|
+
"wave": 1,
|
|
74
|
+
"status": "done",
|
|
75
|
+
"commit": "<sha>",
|
|
76
|
+
"base": "<PRE_F0>",
|
|
77
|
+
"docs_refreshed": false,
|
|
78
|
+
"docs_commit": null,
|
|
79
|
+
"modules": [
|
|
80
|
+
{
|
|
81
|
+
"id": "network.transport",
|
|
82
|
+
"module_root": "common/network",
|
|
83
|
+
"module_name": "network",
|
|
84
|
+
"mode": "create",
|
|
85
|
+
"path": "common/network/src/main/ets/http",
|
|
86
|
+
"barrel": "common/network/Index.ets",
|
|
87
|
+
"files": ["common/network/src/main/ets/http/HttpClient.ets"],
|
|
88
|
+
"api": [
|
|
89
|
+
{"name": "request", "file": "common/network/src/main/ets/http/HttpClient.ets"},
|
|
90
|
+
{"name": "describeError", "file": "common/network/src/main/ets/http/HttpClient.ets"}
|
|
91
|
+
],
|
|
92
|
+
"consumers": ["G1", "G2"],
|
|
93
|
+
"wiring": ["common/network/Index.ets"],
|
|
94
|
+
"evidence": ["app/src/main/java/.../NetworkModule.kt:32-120"]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"notes": ""
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Skipped manifest (appendix-B shape)
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"schema": "spec_shared_manifest/v1",
|
|
106
|
+
"campaign_id": "<uuid>",
|
|
107
|
+
"wave": 1,
|
|
108
|
+
"status": "skipped",
|
|
109
|
+
"reason": "all-satisfied",
|
|
110
|
+
"commit": null,
|
|
111
|
+
"base": "<HEAD>",
|
|
112
|
+
"modules": [],
|
|
113
|
+
"candidates": ["network.transport"],
|
|
114
|
+
"notes": ""
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`reason` is one of `members<2 | all-satisfied | no-candidates |
|
|
119
|
+
insufficient_evidence | disabled | declined:<code> | failed:<code>`.
|
|
120
|
+
`members<2` is by design: a one-group wave cannot create cross-group merge
|
|
121
|
+
conflicts, so F0 never dispatches and its group uses whatever earlier waves
|
|
122
|
+
already built. `SHARED_LAYER=off` writes `disabled` without scanning or
|
|
123
|
+
dispatching. A
|
|
124
|
+
scanner exit `2` (missing/unparseable input) writes `failed:2` — there is no
|
|
125
|
+
`PRE_F0` yet, so nothing is reset. After the agent returns, the orchestrator
|
|
126
|
+
branches on the on-disk manifest `status`: `done` → run the validator;
|
|
127
|
+
`skipped` (including any `declined:*`) → valid **only when the agent made no
|
|
128
|
+
commit**: require `git rev-parse HEAD` == `PRE_F0`, then record the reason and
|
|
129
|
+
continue to W0 **without** running the done validator. A skipped manifest
|
|
130
|
+
whose `HEAD` has moved is an **unrecorded-commit anomaly** — it would smuggle
|
|
131
|
+
an unvalidated commit into `WAVE_BASE`, and a skipped manifest records no
|
|
132
|
+
commit, so ownership of the moved `HEAD` can never be proved. There is **no
|
|
133
|
+
rollback case** for it: restore the wiring snapshot, record
|
|
134
|
+
`reason: failed:post_agent_commit` (plus the `<PRE_F0>..HEAD` list in `notes`),
|
|
135
|
+
**stop and surface the anomaly for manual recovery**, and **never delete
|
|
136
|
+
those commits**. Every post-agent failure
|
|
137
|
+
also restores `state.config.wiring_files` and
|
|
138
|
+
`state.config.wiring_compact` from the `shared_inflight.json` snapshot before
|
|
139
|
+
continuing.
|
|
140
|
+
|
|
141
|
+
## Reply recovery (B3-style)
|
|
142
|
+
|
|
143
|
+
The F0 agent must reply with a single compact JSON object. A foreground
|
|
144
|
+
sub-agent call returns at the agent's first idle — a prose/status-line reply
|
|
145
|
+
(e.g. "后台任务完成后我会恢复") means it went idle mid-run and may still be
|
|
146
|
+
editing the main tree:
|
|
147
|
+
|
|
148
|
+
1. Resume **the same session** in the foreground (`sessionID` from the reply),
|
|
149
|
+
prompt: `继续在 main 树完成 F0;只回复最终 JSON。` Re-validate each reply.
|
|
150
|
+
Resume at most **2×**; never dispatch a second F0 agent beside it.
|
|
151
|
+
2. Still no parseable JSON → disk fallback: read
|
|
152
|
+
`wave_<K>/shared_manifest.json`; a `done` manifest with a resolvable
|
|
153
|
+
`commit` is accepted and goes through the normal validation; otherwise F0
|
|
154
|
+
is judged failed.
|
|
155
|
+
3. Run the reset helper only **after the last sub-agent call has returned**
|
|
156
|
+
(the session is idle/terminated) — never race a running agent for the main
|
|
157
|
+
tree.
|
|
158
|
+
|
|
159
|
+
## Resume / rollback
|
|
160
|
+
|
|
161
|
+
- `shared_inflight.json` holds `campaign_id`, `pre`, `wiring_files`,
|
|
162
|
+
`wiring_compact`, and is written before dispatch.
|
|
163
|
+
- On resume, validate a done manifest with **its own `base`** and
|
|
164
|
+
`validate_shared_manifest.ts --resume`; never trust self-report. `--resume`
|
|
165
|
+
tolerates a `HEAD` that has advanced past `docs_commit ?? commit` (a
|
|
166
|
+
descendant is accepted with a warning; a non-descendant still fails, and any
|
|
167
|
+
UNRECORDED commit in `<commit>..HEAD` carrying an F0 subject fails as
|
|
168
|
+
`unrecorded F0 commit: <sha>`). The post-agent call from the wave loop stays
|
|
169
|
+
**non-resume**: `HEAD` must equal `docs_commit ?? commit` exactly.
|
|
170
|
+
- **Docs catch-up on a resumed done manifest (before W0)**: after the
|
|
171
|
+
revalidation passes, run the Docs refresh / visibility procedure below **only
|
|
172
|
+
when `HEAD == manifest.commit`** (and the recorded `docs_commit` is
|
|
173
|
+
null/absent), `docs_refreshed !== true` and `wave_<K>/wave_meta.json` is
|
|
174
|
+
absent. Persist `docs_refreshed`/`docs_commit` into the manifest, then
|
|
175
|
+
`WAVE_BASE = docs_commit ?? the infra commit`.
|
|
176
|
+
If `HEAD` is **advanced** — beyond the recorded `commit` (or `docs_commit`) —
|
|
177
|
+
do **not** create a docs commit and run nothing that dirties the tree: leave
|
|
178
|
+
`docs_refreshed:false`, record a **manual follow-up** note in the manifest
|
|
179
|
+
(`notes`: docs refresh deferred because HEAD advanced past the F0 commit), and
|
|
180
|
+
continue with W0 (`WAVE_BASE = HEAD`). Requiring `HEAD` to equal the recorded
|
|
181
|
+
commit is what makes a rollback ownable; advancing it and then cancelling the
|
|
182
|
+
docs commit would leave `<commit>..HEAD` holding a later ordinary commit that
|
|
183
|
+
the one-commit docs rule cannot validate.
|
|
184
|
+
- **Ownership-guarded rollback — the only path that may reset the main
|
|
185
|
+
tree.** Before ANY `git reset --hard <pre>` + `git clean -fd`, both must
|
|
186
|
+
hold:
|
|
187
|
+
(a) `HEAD` is **exactly** `manifest.commit`, or exactly `manifest.docs_commit`
|
|
188
|
+
whose parent is `manifest.commit`. Those are the **only two recorded cases**
|
|
189
|
+
that allow a reset — rollback exists to undo the commits the manifest
|
|
190
|
+
records. For any other `HEAD`, **never reset**: stop under the W0
|
|
191
|
+
dirty-tree rule when the tree is dirty, or continue without rollback when it
|
|
192
|
+
is clean; never delete later commits. In particular a **skipped** manifest
|
|
193
|
+
records no commit at all, so a post-agent `HEAD` that moved past `PRE_F0`
|
|
194
|
+
proves nothing about ownership: record the `failed:post_agent_commit`
|
|
195
|
+
anomaly, **surface it for manual recovery**, and **never reset or delete
|
|
196
|
+
those commits**;
|
|
197
|
+
(b) every path in `git status --porcelain -uall` is in the recorded
|
|
198
|
+
manifest's `files[] ∪ wiring[] ∪ {barrel}`. A skipped manifest owns no
|
|
199
|
+
paths, so only its no-commit case applies: `HEAD == PRE_F0` with a clean
|
|
200
|
+
tree means there is nothing to roll back.
|
|
201
|
+
If either fails, **STOP under the W0 dirty-tree rule; never reset** — the
|
|
202
|
+
orchestrator cannot prove the commits/edits are F0's own and must never
|
|
203
|
+
delete unrelated user edits. When `HEAD` already equals `<pre>` and the tree
|
|
204
|
+
is clean there is nothing to roll back: skip the reset, delete the inflight
|
|
205
|
+
file, and re-scan.
|
|
206
|
+
- A reset the guard allows runs `git reset --hard <pre>` + `git clean -fd`
|
|
207
|
+
(no `-x`, keeping gitignored `.hometrans/`), restores both `wiring_files`
|
|
208
|
+
and `wiring_compact` from the inflight snapshot, and moves the stale
|
|
209
|
+
manifest to `shared_manifest.failed.json`. Every post-agent failure restores
|
|
210
|
+
the wiring snapshot even when no reset runs.
|
|
211
|
+
- A matching `shared_inflight.json` on resume means F0 was interrupted
|
|
212
|
+
mid-flight: the reset helper is subject to the same ownership guard — guard
|
|
213
|
+
fails → stop under the dirty-tree rule, never blind-reset an interrupted
|
|
214
|
+
run.
|
|
215
|
+
|
|
216
|
+
## Docs refresh / visibility (before W0)
|
|
217
|
+
|
|
218
|
+
**Pre-W0 anchor (resumed done manifest only).** This procedure is part of the
|
|
219
|
+
pre-W0 catch-up only when `HEAD == manifest.commit` and `docs_commit` is
|
|
220
|
+
null/absent. If `HEAD` is **advanced** beyond the recorded commits, skip the
|
|
221
|
+
refresh/commit entirely (nothing may dirty the tree), leave `docs_refreshed`
|
|
222
|
+
false, and record the manual follow-up note instead.
|
|
223
|
+
|
|
224
|
+
1. If `database_design` / `preferences_design` resolved to a root-only file
|
|
225
|
+
and `.hometrans/<name>.md` is missing, copy it verbatim into `.hometrans/`
|
|
226
|
+
(independent of `DOCS_MODE`).
|
|
227
|
+
2. If `DOCS_MODE != off`, run
|
|
228
|
+
`/a2h-module-semantic-docs <HMOS> --engine-mode <ENGINE_MODE>
|
|
229
|
+
--incremental preserve --scope project-source` **via a sub-agent** (sub-skill
|
|
230
|
+
text never enters the orchestrator's context), or the script fallback. This
|
|
231
|
+
is an incremental visibility catch-up for the code F0 just added; B5 remains
|
|
232
|
+
the wave's single semantic-docs refresh.
|
|
233
|
+
3. If `git status --porcelain -- .hometrans` is non-empty, add one
|
|
234
|
+
`docs(wave <K>): refresh semantic docs after shared layer` commit:
|
|
235
|
+
`git add -u .hometrans`; add a copied root-only file only when
|
|
236
|
+
`git ls-files --error-unmatch .hometrans/<name>.md` succeeds; never `-f`.
|
|
237
|
+
4. Set `docs_refreshed=true` and `docs_commit`; `WAVE_BASE = docs_commit ??
|
|
238
|
+
infra commit`. On refresh failure, reset tracked docs to the infra commit
|
|
239
|
+
and continue W0.
|
|
240
|
+
|
|
241
|
+
## Placement details
|
|
242
|
+
|
|
243
|
+
- `database`: root with `getRdbStore` (`mode:"complete"`) or the row naming
|
|
244
|
+
the tables (`mode:"create"`).
|
|
245
|
+
- `network.transport`: root of the strong-keyword declaration row.
|
|
246
|
+
- `preferences`: row whose function has 偏好/键值 **and**
|
|
247
|
+
存储/持久化/读写/state; tie-break by an existing `getPreferencesSync` root.
|
|
248
|
+
- `module_name` must equal the module `oh-package.json5 name`; otherwise skip.
|
|
249
|
+
- Record `placement_fallback:false`; new barrel/wiring is appended to
|
|
250
|
+
`state.config.wiring_files` after validation.
|
|
251
|
+
|
|
252
|
+
## Fail-soft
|
|
253
|
+
|
|
254
|
+
A post-agent failure with a recorded F0 commit — validation failure, or an
|
|
255
|
+
unparseable reply with a usable on-disk `done` manifest — restores the
|
|
256
|
+
`wiring_files`/`wiring_compact` snapshot, runs the ownership-guarded rollback
|
|
257
|
+
to `PRE_F0` (guard fails → stop under the dirty-tree rule, never reset), writes
|
|
258
|
+
a skipped manifest, and continues W0.
|
|
259
|
+
|
|
260
|
+
The one exception is the **skipped-manifest anomaly**: when the agent's
|
|
261
|
+
manifest is `skipped` but `HEAD` moved past `PRE_F0`, no commit is recorded, so
|
|
262
|
+
there is no rollback case at all. Restore the wiring snapshot, record
|
|
263
|
+
`failed:post_agent_commit`, **surface it for manual recovery, never reset, and
|
|
264
|
+
never delete those commits**; stop rather than destroy an unowned commit. F0
|
|
265
|
+
never blocks a wave on its own — but it also never deletes history it cannot
|
|
266
|
+
prove it owns. The orchestrator writes `wave_<K>/shared_inflight.json` before
|
|
267
|
+
dispatch and deletes it on success.
|
|
@@ -32,8 +32,10 @@ ancestor). Check the group's current generation: `node <skill-dir>/scripts/branc
|
|
|
32
32
|
--wt-gen <wtGen>`; `landed:true` also returns the landing's `pre..range` for a crash that left B4's range
|
|
33
33
|
unrecorded.
|
|
34
34
|
|
|
35
|
-
- **No `wave_<K>/wave_meta.json`** → the crash happened before W0: re-enter
|
|
36
|
-
|
|
35
|
+
- **No `wave_<K>/wave_meta.json`** → the crash happened before W0: re-enter F0
|
|
36
|
+
idempotently (`shared_manifest.json` / `shared_inflight.json` /
|
|
37
|
+
`campaign_id`), then W0 for the groups whose `state.wave == K`
|
|
38
|
+
(their worktrees are created/classified by W0).
|
|
37
39
|
- **wave_meta.json exists** → read it for WAVE_BASE/members and classify every member:
|
|
38
40
|
- **Any group with a done chunk whose `specs[].design_file` is empty (run this FIRST, before the
|
|
39
41
|
branches below)** → look up `<DESIGN_DIR>/SPEC_DESIGN_G<G>_c<k>.md`; if it exists, backfill
|
|
@@ -45,7 +47,14 @@ unrecorded.
|
|
|
45
47
|
`held` → wait for the release trigger;
|
|
46
48
|
- **merged** (`branch_landed.ts --wt-gen <n>` → `landed: true`, or state status `merged`/`done`) → skip
|
|
47
49
|
(first ensuring the group's B4 range is recorded — a crash between the landing commit and the state
|
|
48
|
-
write leaves it unrecorded; take the script's `range` and write `group-merge
|
|
50
|
+
write leaves it unrecorded; take the script's `merge_commit`/`range` and write `group-merge <G>
|
|
51
|
+
--landed <merge_commit>` if the ledger has not). `group-merge` is idempotent: an already-recorded
|
|
52
|
+
landing returns `{duplicate:true,verified:true}`, and a legacy `merged` row with no landing returns
|
|
53
|
+
`{duplicate:true,verified:false,legacy:true}` — both append nothing. A legacy answer carrying
|
|
54
|
+
`unlanded:true` is **not** a skip: the row claims `merged` but the generation branch still holds
|
|
55
|
+
commits that never landed (the 04:28 shape). Fail it soft (`group-fail <G>`) and list it in the
|
|
56
|
+
final report; never continue as if its code were on main. A `MERGE_HEAD` left by the crashed landing
|
|
57
|
+
is aborted first (see below); `group-merge` refuses while it exists.
|
|
49
58
|
- **coding incomplete** (some chunk not `done`) → before refreshing the index or dispatching, run
|
|
50
59
|
`node <skill-dir>/scripts/stage_design_inputs.ts <HMOS> WT/g<G>r<n>` (idempotent) and re-upsert this
|
|
51
60
|
wave's `design_map.md` row if it is absent (a crash between W0 step 3 and step 4 leaves the
|
|
@@ -58,6 +67,47 @@ unrecorded.
|
|
|
58
67
|
- **coding complete & unmerged** (all chunks `done`, branch unlanded) → `queue-merge <G>` (or leave it
|
|
59
68
|
queued) in group order.
|
|
60
69
|
|
|
70
|
+
**F0 anchors (the no-`wave_meta` re-entry).** F0's idempotency is file-based: a
|
|
71
|
+
`wave_<K>/shared_manifest.json` with `status: "done"` and a matching `campaign_id` is re-validated with
|
|
72
|
+
`validate_shared_manifest.ts --resume` using **its own `base`** (never trust self-report; a recorded `docs_commit`
|
|
73
|
+
is checked against HEAD and both commits must carry the canonical F0 subjects; `--resume` tolerates a descendant
|
|
74
|
+
HEAD with a warning, a non-descendant fails, and any unrecorded F0-subject commit in `<commit>..HEAD` fails as
|
|
75
|
+
`unrecorded F0 commit: <sha>`). **Docs catch-up (before W0):** after a done manifest passes revalidation, run the
|
|
76
|
+
docs refresh/visibility procedure (`references/shared-layer.md` → Docs refresh / visibility) **only when
|
|
77
|
+
`HEAD == manifest.commit`** (no recorded `docs_commit`), `docs_refreshed !== true`, and
|
|
78
|
+
`wave_<K>/wave_meta.json` is absent; persist `docs_refreshed`/`docs_commit` into the manifest. If `HEAD` is
|
|
79
|
+
**advanced** beyond the recorded `commit`/`docs_commit`, do not create a docs commit and run nothing that dirties
|
|
80
|
+
the tree — leave `docs_refreshed:false`, record a manual follow-up note, and continue with `WAVE_BASE = HEAD`.
|
|
81
|
+
A `skipped` manifest with a matching `campaign_id` continues to W0 — with one
|
|
82
|
+
exception: the **`failed:post_agent_commit`** reason records a post-agent `HEAD`
|
|
83
|
+
that moved with no recorded commit (the unowned-history anomaly), so resume must
|
|
84
|
+
**stop for manual recovery**, must **never reset or delete** those commits, and
|
|
85
|
+
must never continue to W0. Every other reason (`members<2`, `all-satisfied`,
|
|
86
|
+
`no-candidates`, `insufficient_evidence`, `disabled`, `declined:*`,
|
|
87
|
+
`failed:<other>`) continues to W0 as documented. **A stale `done`
|
|
88
|
+
manifest whose `campaign_id` does not match is ignored — never resumed and never counted as
|
|
89
|
+
inventory**: delete it and re-run the F0 scan. A stale
|
|
90
|
+
`skipped` manifest or `shared_inflight.json` whose `campaign_id` does not match `state.config.campaign_id`
|
|
91
|
+
is an earlier campaign's residue — **first assert the main tree is clean** (`git status --porcelain -uall`
|
|
92
|
+
empty; dirty → stop under the W0 rule, never auto-reset user edits), then delete it and re-run the F0 scan;
|
|
93
|
+
a matching `shared_inflight.json` means F0 was interrupted mid-flight — run the F0 reset helper
|
|
94
|
+
(`references/shared-layer.md` → Resume / rollback) **under its ownership guard**: `git reset --hard <pre>` +
|
|
95
|
+
`git clean -fd` may run only in the **only two recorded cases** — `HEAD` is **exactly** the recorded F0
|
|
96
|
+
`commit`, or exactly its recorded `docs_commit` whose parent is `commit` — and only when every path in
|
|
97
|
+
`git status --porcelain -uall` is in the manifest's `files[] ∪ wiring[] ∪ {barrel}`. An **advanced** `HEAD`
|
|
98
|
+
beyond the recorded commits is **never reset** (stop under the W0 dirty-tree rule when dirty, otherwise
|
|
99
|
+
continue without rollback). A **skipped** manifest records no commit, so a post-agent `HEAD` that moved past
|
|
100
|
+
`PRE_F0` is an **unrecorded-commit anomaly**, not a rollback case: record `failed:post_agent_commit`, surface
|
|
101
|
+
it for **manual recovery**, and **never reset or delete those commits**. If either guard fails, **stop under
|
|
102
|
+
the dirty-tree rule — never reset**. When the guard holds, the helper resets and cleans and F0 re-scans;
|
|
103
|
+
a done manifest whose HEAD merely advanced continues **without** rollback (never delete later commits).
|
|
104
|
+
`docs_commit` (null when the refresh produced no commit) is the wave's docs-refresh commit; for a **validated
|
|
105
|
+
done** manifest, `WAVE_BASE = docs_commit ?? the F0 infra commit` — or `HEAD` when the docs catch-up was skipped
|
|
106
|
+
because HEAD advanced; a matching `skipped` manifest produced no commit — continue
|
|
107
|
+
directly to W0 and take `WAVE_BASE = HEAD` there (the existing W0 rule), **unless**
|
|
108
|
+
its `reason` is `failed:post_agent_commit` (the unowned-history anomaly above):
|
|
109
|
+
then stop for manual recovery instead of entering W0.
|
|
110
|
+
|
|
61
111
|
Then re-enter the B1⇄B2 event loop and drain it. At re-entry, if main is **mid-merge**
|
|
62
112
|
(`<HMOS>/.git/MERGE_HEAD` exists) → `git -C <HMOS> merge --abort`, then continue. If the main tree is
|
|
63
113
|
dirty with ONLY wiring-surface files modified (all `git status --porcelain` paths in
|
|
@@ -92,8 +142,9 @@ conversation-transient and never part of the state (crash recovery re-derives po
|
|
|
92
142
|
git + state). The post-loop Homecheck check writes only `<HMOS>/.hometrans/homecheck/**`: the scan script
|
|
93
143
|
writes `findings.json`, the dispatched gate sub-agent writes `summary.json`; the group/spec state schema
|
|
94
144
|
is unchanged. Its outcome is mirrored in the additive top-level `post_homecheck` field (`status`,
|
|
95
|
-
`errorsBefore`, `errorsAfter`, `rounds`, `build`, `at` — a `skipped`
|
|
96
|
-
counts and happens at I2, without a dispatch and without touching
|
|
145
|
+
`errorsBefore`, `errorsAfter`, `warningsBefore`, `warningsAfter`, `rounds`, `build`, `at` — a `skipped`
|
|
146
|
+
write carries `note` instead of the counts and happens at I2, without a dispatch and without touching
|
|
147
|
+
`.hometrans/homecheck/`). The mirror —
|
|
97
148
|
not `summary.json` — is the completion authority for resume. Per-spec rows keep the v1 field names
|
|
98
149
|
(`status`/`stage`/`design_file`/`commit`) — frozen,
|
|
99
150
|
do not rename (external tooling reads this file); `design_file` on a spec is the chunk design that governs
|
|
@@ -115,9 +166,11 @@ both markers correctly count as unsatisfied for dependency release.
|
|
|
115
166
|
detection, which re-derives chunk/merge position from git/ledger — and list the restore in the final
|
|
116
167
|
report. Never delete the ledger to "fix" a parse error — that under-counts active units; restore the
|
|
117
168
|
state from `.bak` and re-derive instead. If the state exists, verify `config` matches the resolved inputs
|
|
118
|
-
— including `config.design_granularity === "chunk"` — (diverged → stop), skip `done`/`failed` groups, and
|
|
119
|
-
resume the wave loop.
|
|
120
|
-
|
|
169
|
+
— including `config.design_granularity === "chunk"` — (diverged → stop; the I2 probe result `state_docs_mode` is excluded), skip `done`/`failed` groups, and
|
|
170
|
+
resume the wave loop. A legacy state seeded before F0 carries no `shared_layer`/`source_kind` — resolve
|
|
171
|
+
the defaults (`auto`/`android`) and continue, never a divergence stop; once the fields exist they are
|
|
172
|
+
input-divergence items compared like the others. Designs are per-chunk and design-once: a chunk's
|
|
173
|
+
design is generated before its code, and a retry re-uses it unless an issue file exists.
|
|
121
174
|
|
|
122
175
|
**Worktree paths are generation-aware.** A group's worktree is `WT/g<G>r<wtGen>` and its branch
|
|
123
176
|
`specpipe/g<G>r<wtGen>` (generation 0 = `g<G>r0`; the bare `g<G>` name is never used). The ledger group
|
|
@@ -10,8 +10,12 @@ the group/spec state machine.
|
|
|
10
10
|
|
|
11
11
|
- `<HMOS>` is the merged project; the main tree is clean (`git status --porcelain` empty). Dirty → record
|
|
12
12
|
`infra_error` and end the gate (the orchestrator still continues to the smoke gate).
|
|
13
|
-
- The installed `homecheck` package is
|
|
14
|
-
|
|
13
|
+
- The installed `homecheck` package is 2.0.0-next.0 or newer (published under the npm `next` tag; `latest`
|
|
14
|
+
is still 1.0.5) and its `config/ruleSet.json` contains the three fixed domains:
|
|
15
|
+
`@arkui-semantic-correctness`, `@correctness`, `@compatibility`. Do not substitute another domain.
|
|
16
|
+
- The skill's own rule package `<skill-dir>/rules/migration-rules` ships with the skill and is scanned as
|
|
17
|
+
the fourth set. Never delete, relocate, or hand-edit it to make a scan pass: it holds the migration
|
|
18
|
+
defects the fixed sets do not cover (today: `extraData` empty string → NetStack 401).
|
|
15
19
|
- The check always runs in gate mode, with at most 2 scan-and-fix rounds.
|
|
16
20
|
- Both ETS SDK paths must resolve before scanning: explicit `--ohos-sdk-path` / `--hms-sdk-path` win;
|
|
17
21
|
otherwise each auto-discovers under `DEVECO_SDK_HOME` / `DEVECO_HOME` / `DEVECO_CLI_STUDIO_PATH`
|
|
@@ -47,9 +51,13 @@ The script generates `projectConfig.json` / `ruleConfig.json` and runs the legac
|
|
|
47
51
|
|
|
48
52
|
```json
|
|
49
53
|
"ruleSet": [
|
|
50
|
-
"plugin:@arkui-
|
|
54
|
+
"plugin:@arkui-semantic-correctness/all",
|
|
51
55
|
"plugin:@correctness/all",
|
|
52
|
-
"plugin:@compatibility/all"
|
|
56
|
+
"plugin:@compatibility/all",
|
|
57
|
+
"plugin:@hometrans/all"
|
|
58
|
+
],
|
|
59
|
+
"extRuleSet": [
|
|
60
|
+
{ "ruleSetName": "@hometrans/migration-rules", "packagePath": "<skill-dir>/rules/migration-rules", "rules": {} }
|
|
53
61
|
]
|
|
54
62
|
```
|
|
55
63
|
|
|
@@ -60,24 +68,53 @@ Rules:
|
|
|
60
68
|
- `@compatibility/signature-scan-check` stays disabled unless a concrete target version or signature set is supplied.
|
|
61
69
|
- Never downgrade an `error` to `warn`/`off` to pass the check. Global rules cannot be suppressed with
|
|
62
70
|
`homecheck-disable` comments.
|
|
71
|
+
- The migration set is enabled as a whole set (`plugin:@hometrans/all`), never rule by rule: a rule added
|
|
72
|
+
to the package later must be picked up without editing the scan. Homecheck installs it through npm into
|
|
73
|
+
an OS-temp sandbox (`extSandboxDir`), never into `<HMOS>` — a failure there is the scan's, not the
|
|
74
|
+
project's.
|
|
75
|
+
- The scan is only trusted when `HomeCheck.log` proves the set and every rule in it loaded. A set that
|
|
76
|
+
Homecheck skipped, a rule module that failed to load, or aborted checker callbacks ("results for those
|
|
77
|
+
files are INCOMPLETE") all become `scan_error`; none of them may read as a clean pass.
|
|
78
|
+
|
|
79
|
+
`findings.json` carries two finding lists:
|
|
80
|
+
|
|
81
|
+
- `errors[]` — every `error` finding, from any set. The gate cannot pass while it is non-empty.
|
|
82
|
+
- `warnings[]` — warnings of the migration set only (`@hometrans/`). Warnings of the three fixed sets stay
|
|
83
|
+
out of scope and are not listed (they remain counted in `totals.warn`).
|
|
63
84
|
|
|
64
85
|
Exit codes: `0` clean, `3` errors found, `1` preflight/scan failure (including timeout and
|
|
65
|
-
`nothing-to-check`), `2` usage error.
|
|
86
|
+
`nothing-to-check`), `2` usage error. A non-empty `warnings[]` does not change the exit code. The script
|
|
87
|
+
writes `findings.json` in the round directory. Exit
|
|
66
88
|
`0` is valid only with a written `findings.json` whose `scan.outcome` is `success` — a `0` without it
|
|
67
89
|
(e.g. a broken junctioned invocation) is recorded as `scan_error`, never as a clean pass.
|
|
68
90
|
|
|
69
91
|
## Repair
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
Two finding lists are repaired, in this order:
|
|
94
|
+
|
|
95
|
+
1. every `errors[]` entry (any set) — required for `status: pass`;
|
|
96
|
+
2. every `warnings[]` entry (the migration set, `@hometrans/`) — mandatory repairs too, but their
|
|
97
|
+
remaining count does not block the pass.
|
|
98
|
+
|
|
99
|
+
Warnings of the three fixed sets are not in `findings.json` and must not be hunted for separately.
|
|
100
|
+
|
|
101
|
+
For each finding:
|
|
72
102
|
|
|
73
103
|
1. Read the rule documentation (`docPath`, or `document/checker/<domain>/<rule>-cn.md` in the Homecheck
|
|
74
|
-
install).
|
|
104
|
+
install; the migration set's docs live in `<skill-dir>/rules/migration-rules/document/checker/hometrans/`).
|
|
75
105
|
2. Apply the minimal behavior-preserving fix; do not refactor or reformat unrelated code.
|
|
76
106
|
3. Treat Homecheck's `fix` range as a hint, not an unconditional replacement.
|
|
77
107
|
4. If the finding is a confirmed false positive, suppress it with
|
|
78
108
|
`// homecheck-disable-next-line <ruleId>` and record ruleId, file, line, reason, and evidence in the
|
|
79
109
|
round's `homecheck-fix-report.md`.
|
|
80
|
-
5. Commit the repaired batch as `fix(homecheck): <n> errors
|
|
110
|
+
5. Commit the repaired batch as `fix(homecheck): <n> errors and <m> warnings in <k> files` (omit a zero
|
|
111
|
+
half).
|
|
112
|
+
|
|
113
|
+
A migration-set repair fixes the code, not the rule: never weaken `rules/migration-rules`, and never pass
|
|
114
|
+
an empty value through a different field. For `@hometrans/http-extra-data-empty-string` the minimal fix is
|
|
115
|
+
to assign `extraData` only when the payload is non-empty (the reference fix is
|
|
116
|
+
`common/network/.../HttpTransport.ets`: build the options without `extraData`, then
|
|
117
|
+
`if (body.length > 0) options.extraData = body;`).
|
|
81
118
|
|
|
82
119
|
No new agent type is used: the fixes are performed by the gate sub-agent executing this file (the
|
|
83
120
|
orchestrator only dispatches the gate and validates its reply). Batch by file or rule so a large
|
|
@@ -133,14 +170,22 @@ No code changed → skip the build (the tree is exactly the last built state) an
|
|
|
133
170
|
"schema": "homecheck_postloop/v1",
|
|
134
171
|
"mode": "gate",
|
|
135
172
|
"runId": "<state.config.campaign_id>",
|
|
136
|
-
"homecheckVersion": "
|
|
137
|
-
"ruleSets": [
|
|
173
|
+
"homecheckVersion": "2.0.0-next.0",
|
|
174
|
+
"ruleSets": [
|
|
175
|
+
"plugin:@arkui-semantic-correctness/all",
|
|
176
|
+
"plugin:@correctness/all",
|
|
177
|
+
"plugin:@compatibility/all",
|
|
178
|
+
"plugin:@hometrans/all"
|
|
179
|
+
],
|
|
138
180
|
"rounds": 2,
|
|
139
181
|
"errorsBefore": 5,
|
|
140
182
|
"errorsAfter": 0,
|
|
183
|
+
"warningsBefore": 3,
|
|
184
|
+
"warningsAfter": 0,
|
|
141
185
|
"fixed": 5,
|
|
142
186
|
"suppressed": 0,
|
|
143
187
|
"remaining": 0,
|
|
188
|
+
"remainingWarnings": 0,
|
|
144
189
|
"build": "SUCCESS",
|
|
145
190
|
"status": "pass",
|
|
146
191
|
"signatureScan": { "enabled": false, "reason": "no target version set" }
|
|
@@ -150,13 +195,17 @@ No code changed → skip the build (the tree is exactly the last built state) an
|
|
|
150
195
|
Status values: `pass`, `fail`, `build_failed`, `skipped`, `preflight_failed`, `scan_timeout`,
|
|
151
196
|
`scan_error`, `infra_error`. Field semantics: `errorsBefore` — error count of the round-1 scan;
|
|
152
197
|
`errorsAfter` — error count of the closing verification scan (`remaining` equals it);
|
|
153
|
-
`
|
|
154
|
-
|
|
198
|
+
`warningsBefore` / `warningsAfter` — the same two scans measured on the migration set's `warnings[]`
|
|
199
|
+
(`remainingWarnings` equals `warningsAfter`); `rounds` — repair rounds performed, 0-2 (the closing scan is
|
|
200
|
+
not a round); `fixed` / `suppressed` — as recorded in the rounds' `homecheck-fix-report.md`, covering both
|
|
201
|
+
errors and warnings. `status: pass` requires `errorsAfter = 0`; leftover warnings are reported in
|
|
202
|
+
`warningsAfter` and in the reply's `note`, never as a pass-with-hidden-defects, and never as a `fail`.
|
|
155
203
|
The gate sub-agent never writes the state file: the orchestrator mirrors
|
|
156
204
|
the result in the additive `state.post_homecheck` field — that mirror, never `summary.json` alone, is
|
|
157
205
|
the completion authority on resume. The gate sub-agent's final message is **only**
|
|
158
206
|
the compact JSON object `{ ok, status, rounds, errorsBefore, errorsAfter, fixed, suppressed, remaining,
|
|
159
|
-
build, note }` — `ok` is true whenever the gate completed and wrote its summary, whatever the `status
|
|
207
|
+
build, note }` — `ok` is true whenever the gate completed and wrote its summary, whatever the `status`;
|
|
208
|
+
the two warning counts go into `note` (e.g. `warnings 3→0`), not into new reply fields.
|
|
160
209
|
|
|
161
210
|
## Failure handling and the smoke gate
|
|
162
211
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# extraData 不能传入空字符串(@hometrans/http-extra-data-empty-string)
|
|
2
|
+
|
|
3
|
+
## 现象
|
|
4
|
+
|
|
5
|
+
请求发不出去,日志只有 `NETSTACK error 401 Parameter error`——像鉴权失败,实际是
|
|
6
|
+
`http.HttpRequestOptions.extraData` 传了 `""`,NetStack 在参数校验阶段就拒绝,请求没到服务端。
|
|
7
|
+
|
|
8
|
+
SDK 只在 `@ohos.net.http.d.ts` 的字段注释里写了 `Do not pass the parameter as ""`,类型是
|
|
9
|
+
`string | Object | ArrayBuffer`,`""` 完全合法,编译器和既有 CodeLinter 规则都不报,于是
|
|
10
|
+
"空请求体"这类常见分支(无筛选、无关键字、空反馈)会稳定踩中。
|
|
11
|
+
|
|
12
|
+
## 判定
|
|
13
|
+
|
|
14
|
+
两种写法在 ArkAnalyzer IR 里同形——`ArkAssignStmt`,左值是名为 `extraData` 的
|
|
15
|
+
`ArkInstanceFieldRef`:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const options = { method: POST, extraData: body }; // options.<...extraData> = body
|
|
19
|
+
options.extraData = body; // options.<...extraData> = body
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
逐个赋值点判断取值能否为空串:
|
|
23
|
+
|
|
24
|
+
| 取值来源 | 结论 |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| 字面量 `""` | **可证为空 → error** |
|
|
27
|
+
| 非空字面量 / `JSON.stringify(...)` | 通过 |
|
|
28
|
+
| 方法内局部变量 | 回溯同方法内的赋值(有界),取并集 |
|
|
29
|
+
| 方法参数 | 跨文件查调用点:有调用点传 `""` → **error**;无法证明非空 → **warn** |
|
|
30
|
+
| 非 string 类型(Object / ArrayBuffer) | 不是本缺陷,跳过 |
|
|
31
|
+
|
|
32
|
+
赋值被空值判断包住即安全(`if (body.length > 0) options.extraData = body;`)。只认空值判断;
|
|
33
|
+
`if (method === RequestMethod.POST)`、`if (token)` 这类无关分支不算——它只能让调用点证明降级为 warn。
|
|
34
|
+
|
|
35
|
+
## 严重度
|
|
36
|
+
|
|
37
|
+
- `error`:可证到达 `extraData` 的是空串(字面量,或参数在某个调用点被传 `""`)。
|
|
38
|
+
- `warn`:可能为空且无空值保护,但无法证明。
|
|
39
|
+
|
|
40
|
+
`@hometrans` 的 warn 也在修复范围;三个固定规则集的 warn 不在。
|
|
41
|
+
|
|
42
|
+
## 修复
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
// 反例
|
|
46
|
+
const options: http.HttpRequestOptions = { method: POST, extraData: body };
|
|
47
|
+
|
|
48
|
+
// 正例:非空才赋值
|
|
49
|
+
const options: http.HttpRequestOptions = { method: POST, header: { 'Content-Type': 'application/json' } };
|
|
50
|
+
if (body.length > 0) {
|
|
51
|
+
options.extraData = body;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
优先修调用点(别构造空串请求体);确实要发空请求体就省略 `extraData`。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# extraData must not be an empty string (@hometrans/http-extra-data-empty-string)
|
|
2
|
+
|
|
3
|
+
## Symptom
|
|
4
|
+
|
|
5
|
+
The request never leaves the device and the log only shows `NETSTACK error 401 Parameter error` —
|
|
6
|
+
which reads like an auth failure but is `http.HttpRequestOptions.extraData` set to `""`: NetStack
|
|
7
|
+
rejects it during parameter validation, before it reaches the server.
|
|
8
|
+
|
|
9
|
+
The SDK documents this only as a field note in `@ohos.net.http.d.ts` (`Do not pass the parameter as
|
|
10
|
+
""`), and the declared type is `string | Object | ArrayBuffer`, so `""` type-checks and neither the
|
|
11
|
+
compiler nor any existing CodeLinter rule reports it. The empty-body branch (no filter, no search
|
|
12
|
+
keyword, empty feedback) therefore fails consistently.
|
|
13
|
+
|
|
14
|
+
## Detection
|
|
15
|
+
|
|
16
|
+
Both spellings become the same shape in the ArkAnalyzer IR — an `ArkAssignStmt` whose left operand is
|
|
17
|
+
an `ArkInstanceFieldRef` named `extraData`:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
const options = { method: POST, extraData: body }; // options.<...extraData> = body
|
|
21
|
+
options.extraData = body; // options.<...extraData> = body
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For every such assignment the rule decides whether the value can be the empty string:
|
|
25
|
+
|
|
26
|
+
| Value source | Verdict |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| literal `""` | **provably empty → error** |
|
|
29
|
+
| non-empty literal / `JSON.stringify(...)` | clean |
|
|
30
|
+
| local variable | resolved through its assignments in the same method (bounded), union of outcomes |
|
|
31
|
+
| method parameter | cross-file call-site scan: a `""` argument → **error**; cannot prove non-empty → **warn** |
|
|
32
|
+
| non-string type (Object / ArrayBuffer) | not this defect, skipped |
|
|
33
|
+
|
|
34
|
+
An assignment inside an emptiness guard is clean (`if (body.length > 0) options.extraData = body;`).
|
|
35
|
+
Only emptiness guards count; branches such as `if (method === RequestMethod.POST)` or `if (token)` do
|
|
36
|
+
not — they only downgrade a call-site proof to a warning.
|
|
37
|
+
|
|
38
|
+
## Severity
|
|
39
|
+
|
|
40
|
+
- `error`: the value reaching `extraData` is provably `""` (a literal, or a parameter that some call
|
|
41
|
+
site passes `""` to).
|
|
42
|
+
- `warn`: the value may be empty and has no emptiness guard, but emptiness cannot be proven.
|
|
43
|
+
|
|
44
|
+
Warnings from `@hometrans` are in repair scope; warnings from the three fixed sets are not.
|
|
45
|
+
|
|
46
|
+
## Fix
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
// bad
|
|
50
|
+
const options: http.HttpRequestOptions = { method: POST, extraData: body };
|
|
51
|
+
|
|
52
|
+
// good: assign only when non-empty
|
|
53
|
+
const options: http.HttpRequestOptions = { method: POST, header: { 'Content-Type': 'application/json' } };
|
|
54
|
+
if (body.length > 0) {
|
|
55
|
+
options.extraData = body;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Prefer fixing the call site (do not build an empty request body); if an empty body really must be
|
|
60
|
+
sent, omit the `extraData` field.
|