@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,323 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: a2h-batch-ui-align
|
|
3
|
+
description: "Batch-convert every page of the static UTG to HarmonyOS ArkUI (ArkTS), including pages the explorer could not screenshot — those convert from Android layout XML + source and are labelled source-only. Also handles incremental, page-scoped UI migration against an existing HarmonyOS project. Reads the Lottie section of resource_mapping.md (from a2h-resource-convert), binds each Lottie JSON to its host Activity/Fragment, and implements it with @ohos/lottie (rawfile/lottie/) mirroring the Android hosting logic. Triggers: \"full migration per UTG\", \"migrate the un-screenshotted pages too\", \"migrate Android pages to HarmonyOS\", \"Android UI to HarmonyOS\", \"batch-convert to ArkTS\", \"incremental UI migration\", \"migrate the short-video player page\", \"migrate a given page to HarmonyOS\", \"incremental UI migration\", \"migrate this screen to HarmonyOS\", \"a2h-batch-ui-align\", or any request supplying an Android project + Harmony project + page snapshots (page_NNNN_ActivityName) or naming a page/module to port."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# a2h-batch-ui-align — Android → HarmonyOS UI Batch Conversion
|
|
7
|
+
|
|
8
|
+
Converts Android pages into HarmonyOS ArkTS pages following MVVM. State management follows the target project: **V2 for new 0→1 conversions, V1 when the existing Harmony project already uses V1** (Step 1).
|
|
9
|
+
|
|
10
|
+
**The page set is the static UTG, not what the explorer captured.** Every static node is converted (`page`), folded into its host's unit (`attach`), or skipped with a recorded reason (`skip`) by `scripts/build_conversion_set.mjs`. A page with a capture converts against its screenshot and view tree (`EVIDENCE_TIER = captured`). A page without one converts from Android layout XML and source (`EVIDENCE_TIER = source-only`): same procedure, same Phase 5 items, with screenshot evidence replaced by source evidence per `./references/conversion-procedure.md` §"Source-only Tier".
|
|
11
|
+
|
|
12
|
+
## Mode Routing — Read This First
|
|
13
|
+
|
|
14
|
+
Two modes share one conversion engine:
|
|
15
|
+
|
|
16
|
+
1. **Full batch mode** (default) — convert every page of the app. The user supplies an Android project and a Harmony project (usually empty or scaffold-only). Follow this document top to bottom.
|
|
17
|
+
2. **Incremental mode** — the user already has a working HarmonyOS version and wants only a specific page, or the missing pages of one semantic module. Trigger on "incremental migration", "migrate the short-video player page", "fill in a module's missing pages", or any request naming a page/screen/module instead of the whole app.
|
|
18
|
+
|
|
19
|
+
**Full mode is not linear: capture and conversion overlap.** Plan the run (and the todo list) as three concurrent tracks, not as Steps 2 → 3 → 4 → 5:
|
|
20
|
+
- **resources** (Step 2) runs as a background agent from the start;
|
|
21
|
+
- **capture** (Steps 3.1–3.2) runs in the parent;
|
|
22
|
+
- **conversion** (Steps 4–5) starts at the first `run_cycle.mjs` return after Step 2 is joined (Step 3.2 item 5, "Convert while exploring"); its background sub-agents, scheduled by `group_queue.mjs`, convert while capture continues.
|
|
23
|
+
|
|
24
|
+
Following the steps linearly leaves conversion idle for the whole capture, which can take hours.
|
|
25
|
+
|
|
26
|
+
**Incremental mode** runs `./references/incremental-scope.md` **I1–I5** (scope resolution, gap analysis, mandatory user confirmation, targeted capture). I5 runs the same `a2h-utg-explorer` cycle as Step 3.2, limited to the scope (`plan.mjs --scope`), and builds the plan with `build_conversion_set.mjs --scope --existing`; it needs no crawler and no model key. I1–I5 replace Steps 3.2–3.3 and the page discovery at the top of Step 4. Step 3.1 still covers the whole app, unless `reuse_static_workspace` was copied in (Step 3.1). Steps 0–2 run in both modes with the deltas noted inline. Everything from Step 4.1 onward is **identical in both modes and must not be forked**; in particular do not skip 4.3, or the scope's animations are dropped.
|
|
27
|
+
|
|
28
|
+
## Step 0 — Environment Check (run first)
|
|
29
|
+
|
|
30
|
+
DevEco is resolved along the chain **OS environment variable → ask the user** (`echo "$VAR"` on macOS/Linux, `$env:VAR` in PowerShell); `ht init` writes these as machine environment variables, and there is no config file to fall back to:
|
|
31
|
+
|
|
32
|
+
| Variable | Needed for | Valid when |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `DEVECO_HOME` *(or `DEVECO_SDK_HOME`)* | Step 6.2 build | resolves to a valid DevEco install |
|
|
35
|
+
|
|
36
|
+
If the caller passed `DEVECO_HOME=<path>` (the migrate orchestrator does, after validating it), use it as-is — skip the lookup and pass it to every `a2h-fix-build-errors` call as `deveco_studio_path`. If no valid DevEco install is found, ask the user for the DevEco Studio path (suggest `ht init` to persist it).
|
|
37
|
+
|
|
38
|
+
Full batch mode also needs (incremental mode: the device is optional; without one every scope member converts source-only):
|
|
39
|
+
|
|
40
|
+
| Requirement | Check | If missing |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| One online device/emulator | `adb devices` lists the serial you will pass (the explorer requires an explicit serial). If the caller passed `ADB_SERIAL` (and `ADB_PATH`), use that device and that adb | ask the user which device; do not pick one |
|
|
43
|
+
| `homegraph` | `homegraph --version` | Step 3.1 cannot index the source; ask the user |
|
|
44
|
+
|
|
45
|
+
Both modes also need **background sub-agents** and **pre-approved writes**. Run `node ./scripts/host_env.mjs check` and follow its `action`: `none` means go on; `enable` / `restart` (opencode v1, DevEco) means the user must restart the host session with the flag set, so stop until they do, or continue with blocking waves if they decline. The session must be allowed to edit under `harmony_project_dir` and run `node <this skill>/scripts/*`, `node <a2h-utg-*>/scripts/*` and `adb` without asking, because sub-agents inherit the parent's permissions. Host-by-host detail (version checks, `verify`, the flags): [references/host-dispatch.md](references/host-dispatch.md).
|
|
46
|
+
|
|
47
|
+
### Step 0.1 — How sub-agents are dispatched (every step)
|
|
48
|
+
|
|
49
|
+
Every sub-agent of this skill (Step 2 resources, Step 3 reviewers, Step 5 groups, Step 5.5 wiring, Step 6 verify) is a **background sub-agent of the parent's own host**; which tool that is per host is in [references/host-dispatch.md](references/host-dispatch.md) — **read it before the first dispatch**. The rules, on every host:
|
|
50
|
+
|
|
51
|
+
1. **One call per unit, several in one message.** Record each resume handle with `group_queue.mjs bind --task <handle>`.
|
|
52
|
+
2. **Completion comes from disk, not from the host:** a report file, `answers_check.mjs` complete, or `detach.mjs` exited. `group_queue.mjs wait` blocks on these (≤ 9 min); a host notice is an early hint.
|
|
53
|
+
3. **The parent never holds the foreground for long.** Anything over ~3 min runs through `detach.mjs start … --name <job>`; pass `--job <job>` to `wait`.
|
|
54
|
+
4. **Never cancel by re-dispatching.** A stalled agent is resumed in its own session with the same handle, never replaced by a fresh one (two writers on one file). `Q requeue` enforces this; `--fresh` only after the old session's completion notice. Pass `--task <handle>` to every `Q release` that comes from a notice.
|
|
55
|
+
5. **Sub-agents cannot dispatch sub-agents**; every prompt says so.
|
|
56
|
+
5a. **`image_read=false` (Step 1)**: every prompt opens with the `NO_IMAGE` block of `scripts/group_queue.mjs` (`lease` adds it to group messages; the parent adds it to the others), and the parent never opens an image either.
|
|
57
|
+
6. **Without background sub-agents** each `lease` is dispatched as one blocking wave; say so in Step 7.
|
|
58
|
+
7. **One parent per campaign.** A new session re-runs `group_queue.mjs init`, which keeps results. Before writing anything under `.hometrans/`, check that no other parent is still driving the campaign (`Q init` refuses with `another parent session may still be driving this campaign`); if one may be, ask the user: monitor only, or `init --takeover`. A monitoring session never calls `Q wait` / `lease` / `reap` / `refresh`.
|
|
59
|
+
|
|
60
|
+
## Step 1 — Parse User Request
|
|
61
|
+
|
|
62
|
+
Extract from the user's message (natural language, no fixed format):
|
|
63
|
+
|
|
64
|
+
| Variable | Meaning | Typical Phrases |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `android_project_dir` | Android source project root | "Android project path", "Android project", "source project" |
|
|
67
|
+
| `harmony_project_dir` | HarmonyOS target project root | "target Harmony project", "HarmonyOS project", "output project" |
|
|
68
|
+
| `apk_path` | APK built from `android_project_dir`; Step 2 decodes it for the full merged resource set | "APK path", "apk file", "Android apk" |
|
|
69
|
+
| `ui_info_root` | Parent directory of all snapshot directories. Default `${harmony_project_dir}/.hometrans/ui_info` (created if needed). A directory the user names is treated as a pre-existing capture | "page screenshots and view tree", "page snapshots", "page folder" |
|
|
70
|
+
| `app_module` | Optional. The Android application module the caller already chose (Gradle path `:app` / `:apps:tv`, or relative dir `app`). Forwarded to `a2h-resource-convert` in Step 2 so a multi-application project is not re-detected or asked about mid-batch. Omit to let resource-convert detect it | "application module", "app module" |
|
|
71
|
+
| `pages` (optional) | A page subset the user listed explicitly | "1. .../page_0001_X" ... |
|
|
72
|
+
| `android_index_ready` (optional) | `true` when the caller has just built and synced `android_project_dir`'s HomeGraph index and other agents read it concurrently (a2h-app-migrate does). Step 3.1 then skips `homegraph init` / `homegraph index` | — |
|
|
73
|
+
| `reuse_static_workspace` (optional) | A finished static-UTG workspace from this run's `discover.utg_static`. When set, Step 3.1 may copy it into `.hometrans/utg_static` and skip the pipeline. Omit it whenever that discover step did not run | — |
|
|
74
|
+
| `image_read` (optional) | `true` \| `false`: whether this host's sub-agents can read image files. a2h-app-migrate may probe at bootstrap for a tip only and **must not** pass the result here — when called from migrate, **probe again** (below). Standalone callers may pass it; **when not passed, probe it** before the first dispatch; never assume `true`, and never probe by opening an image in the parent | — |
|
|
75
|
+
| `MODE` | `full` \| `incremental`, per Mode Routing | existing Harmony version + a named page/module ⇒ `incremental` |
|
|
76
|
+
| `scope_request` | **Incremental only, required.** The user's own words for the range | "short-video player page", "all missing pages of the short-video module" |
|
|
77
|
+
|
|
78
|
+
If `android_project_dir`, `harmony_project_dir` or `apk_path` is missing, **ask the user**, and do not guess. In incremental mode, also ask if no page or module was named; do not fall back to converting everything. `ui_info_root` and `pages` have defaults, so never ask for them.
|
|
79
|
+
|
|
80
|
+
Then, once in the parent, resolve these and pass them to every later step and sub-agent:
|
|
81
|
+
|
|
82
|
+
- **`host_caps.json`**: `${harmony_project_dir}/.hometrans/work/host_caps.json` must hold `image_read` before the first dispatch (Step 2). `group_queue.mjs` reads it on every lease (Step 0.1 item 5a).
|
|
83
|
+
- **Passed by the caller**: write `{"image_read": <true|false>}` as given.
|
|
84
|
+
- **Not passed → probe it with one throwaway sub-agent, before any other dispatch** (resources, reviewers and groups all wait for it, so a text-only host never loses a real unit to its first PNG; do this even if a2h-app-migrate already probed at bootstrap — that tip is not this campaign's verdict):
|
|
85
|
+
1. `node ./scripts/image_probe.mjs prepare --hp ${harmony_project_dir}` → one JSON line `{image, state, prompt}`.
|
|
86
|
+
2. Dispatch **one** fresh sub-agent with `prompt` verbatim, and wait for its reply in the foreground (it takes seconds; no `bind`, never resumed or reused). **The parent never reads the probe image itself**: on a text-only host that breaks the parent's own session.
|
|
87
|
+
3. Write its reply verbatim to a file, then `node ./scripts/image_probe.mjs verify --hp ${harmony_project_dir} --reply-file <that file> --cleanup`. Write the reply file inside the probe directory (`.hometrans/work/image_probe/`, the `image` path's directory) so `--cleanup` removes it with the directory. If the sub-agent call errored (e.g. `messages.content.type` invalid), write the error text as the reply. Never put the reply on the command line: error texts are JSON with quotes, `$` and backticks that break shell quoting. The verdict is `true` for the right 4 digits or a one-digit near match (OCR slip ≠ host dropped the image), and `verify --hp` writes it with its `probe_reason` to `host_caps.json`.
|
|
88
|
+
4. Anything unexpected (the script exits non-zero, no sub-agent tool) → write `{"image_read": false}` and note why. Never fall back to `true`.
|
|
89
|
+
4a. Always finish with `node ./scripts/image_probe.mjs cleanup --hp ${harmony_project_dir}`, whatever happened above (it does nothing when `--cleanup` already removed everything). If its `left` is not null, delete that directory with the shell; if that also fails, note the path for Step 7 and continue.
|
|
90
|
+
5. If the verdict is `false`: tip the user once and **continue immediately** (no hard stop, no waiting) — this session cannot recognise images, so conversion will use view trees / measurements without screenshot visual comparison; to enable model screenshot recognition, switch to a multimodal model (Qwen3.8-Max, Kimi-K3, Opus-5 recommended), enable vision/image input, then **open a new session** and re-enter the original command. Do not tip the user to pass `image_read=`.
|
|
91
|
+
Step 7 reports how `image_read` was decided (passed / probed + `probe_reason`).
|
|
92
|
+
- **`ALL_MODULES`**: every module under `${harmony_project_dir}` with `src/main/ets` or `src/main/resources`.
|
|
93
|
+
- **`PARADIGM = V1 | V2`**: run `node ./scripts/detect_paradigm.mjs ${harmony_project_dir}` and use its `paradigm` field as-is (rule: `./references/state-mgmt/_paradigm-selection.md`). Do not grep decorators by hand: the DevEco scaffold `pages/Index.ets` (`@Component` + `@State message`) is not evidence of an existing V1 project, and the script ignores it, so a freshly created project correctly defaults to V2. It is project-level, so sub-agents must not re-detect it.
|
|
94
|
+
- **References**: always skill-bundled, with no user override: mappings `./references/mappings/` and the state-management cheat sheet `./references/state-mgmt/_decorator-quickref.md` (one file for both paradigms). They are loaded lazily. The official V1/V2 state-management docs are **not** bundled: a sub-agent reads one with `node ./scripts/state_doc.mjs read <key> --project ${harmony_project_dir}` (keys in the cheat sheet's "Deep read" columns, `list` prints them all), and only for what the cheat sheet doesn't cover. Prompts must never tell an agent to read a whole doc directory, and never to run `devecocli docs search` itself.
|
|
95
|
+
- **`STATE_DOCS`**: run `node ./scripts/state_doc.mjs check --project ${harmony_project_dir}` once (it resolves every key through `devecocli docs` and caches the IDs in `.hometrans/work/state_docs.json`). On exit 1 (meaning of each message: [references/host-dispatch.md](references/host-dispatch.md)), **stop and ask the user before Step 5**: fix it, or explicitly accept converting without the official docs. Only on that explicit acceptance, tell every prompt `STATE_DOCS=unavailable`; agents then use the cheat sheet alone, and the Step 7 report says so.
|
|
96
|
+
|
|
97
|
+
## Step 2 — Resource Conversion
|
|
98
|
+
|
|
99
|
+
Run the `a2h-resource-convert` skill with:
|
|
100
|
+
1. `android_project_dir` = `android_project_dir`
|
|
101
|
+
2. `harmony_project_dir` = `harmony_project_dir`
|
|
102
|
+
3. `resource_mapping_path` = `${harmony_project_dir}/.hometrans/resource_mapping.md`
|
|
103
|
+
4. `apk_path` = `apk_path`
|
|
104
|
+
5. `app_module` = `app_module` — **only when the caller passed it** (Gradle path such as `:app`, or a relative directory); resource-convert then uses it instead of detecting or asking
|
|
105
|
+
|
|
106
|
+
It decodes the APK and converts strings, colors, drawables, images, Lottie and code-defined vector icons into `${harmony_project_dir}/${ui_module}/src/main/resources/`. It writes the mapping document and resolves `${app_module}` (Android application module) and `${ui_module}` (Harmony target module from `build-profile.json5`, e.g. `entry` or `products/phone`). Take both from its report for later steps.
|
|
107
|
+
|
|
108
|
+
**Full mode — run it as a background sub-agent (Step 0.1) and go on to Step 3.** Its outputs are not needed before Step 4.4, and a blocking sub-agent would hold the parent the whole time. Write the task above to `${harmony_project_dir}/.hometrans/work/prompts/resources.md` and dispatch one background sub-agent with: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/resources.report.md` and reply with one line `DONE resources`."
|
|
109
|
+
|
|
110
|
+
**Join before Step 4.4.** The join is the report file existing; an early host notice only means "check it now". While the file is missing and the agent still runs, do other work. If the agent ended without the file, resume it in its own session once (Step 0.1 item 4), and if that fails, run Step 2 blocking.
|
|
111
|
+
|
|
112
|
+
**Incremental mode — run it blocking, after I4's user confirmation.** Use that skill's incremental mode (`<a2h-resource-convert skill>/references/incremental-page-migration.md`) with the page source files from I1/I2 as `page_files`. It already handles reference closure, the already-migrated check, never auto-overwriting a same-name-different-value conflict, and merging element JSON; do not re-implement any of it here. It must finish before Step 4.3.
|
|
113
|
+
|
|
114
|
+
**Resource-fidelity gate (before Step 5, both modes).** If the report's **Vector Fidelity Issues** section has `error` rows, fix those resources first. A drawable with a dropped `clip-path`, or a stroke-only path given a solid `fill`, keeps its file name, so every page using it passes reference checks and compiles while rendering wrong. If no fresh report exists, run the checker directly (static, no device):
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
node <a2h-resource-convert-skill>/scripts/svg_fidelity_check.ts \
|
|
118
|
+
--android-res <decoded_output_path>/res \
|
|
119
|
+
--harmony-media ${harmony_project_dir}/${ui_module}/src/main/resources/base/media
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Step 3 — Page Capture
|
|
123
|
+
|
|
124
|
+
**Read [references/step3-capture.md](references/step3-capture.md) in full before starting Step 3.** It is the complete procedure: reviewer prompts and waves, every `config.json` field, the fixture server, the recovery classes, "Convert while exploring", plan refresh and backfill, the export layout and the `pages.json` fallback. The checklist below does not replace it.
|
|
125
|
+
|
|
126
|
+
### Step 3.1 — Static UTG Skeleton (both modes, whole app)
|
|
127
|
+
|
|
128
|
+
The skeleton always ends up in `${harmony_project_dir}/.hometrans/utg_static`; Step 3.2 reads that path and no other. A resume with `stages.capture.done` skips Step 3 entirely.
|
|
129
|
+
|
|
130
|
+
- **`reuse_static_workspace` passed:** `node <a2h-app-migrate>/scripts/reuse_static_utg.mjs --from <reuse_static_workspace> --to ${harmony_project_dir}/.hometrans/utg_static --lang <device locale>`. Exit 0 → continue at Step 3.2. Any other exit → run the pipeline below. Never write into `reuse_static_workspace`.
|
|
131
|
+
- **Otherwise** run the pipeline from the `a2h-utg-static` skill's `scripts/` directory (Node ≥ 22.18):
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Skip this index step when the caller passed android_index_ready=true: a rebuild races the caller's readers.
|
|
135
|
+
homegraph init <android_project_dir> # already initialized: homegraph index <android_project_dir>
|
|
136
|
+
node run_pipeline.mjs <android_project_dir> --package <app package> \
|
|
137
|
+
--workspace ${harmony_project_dir}/.hometrans/utg_static --lang <device locale>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`--lang` is `adb shell getprop persist.sys.locale`. **Never `--skip-llm` in full mode.**
|
|
141
|
+
- Dispatch one background reviewer per worklist part, all at once (reference: "Reviewer waves"). Then `node worklist_parts.mjs merge ${harmony_project_dir}/.hometrans/utg_static` and re-run `run_pipeline.mjs … --resume`.
|
|
142
|
+
- **Gate:** `audit.mjs` prints no `SANITY:` line; the workspace contains `utg.json`, `click_paths.json`, `ui_elements.json` and `utg.html`.
|
|
143
|
+
|
|
144
|
+
### Step 3.2 — Dynamic Page Capture (full mode: `a2h-utg-explorer`)
|
|
145
|
+
|
|
146
|
+
The parent drives `a2h-utg-explorer`'s `run_cycle.mjs` from its `scripts/` directory. `S` is the Step 3.1 workspace; `C=${harmony_project_dir}/.hometrans/utg_explore`.
|
|
147
|
+
|
|
148
|
+
1. **Install and identify.** `<adb> -s <serial> install -r <apk_path>`, where `<adb>` is `ADB_PATH` when the caller passed it and `adb` otherwise. Take package and launcher from `aapt dump badging <apk_path>` (look under `<sdk>/build-tools/<newest version>/`), or, after the install, from `<adb> -s <serial> shell cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.LAUNCHER <package>`.
|
|
149
|
+
2. **Plan and compile.** `node plan.mjs $S/utg.json $C`, review `C/plan.md`, then `node compile_tasks.mjs $S/utg.json $C --project <android_project_dir> --locale <device locale>`.
|
|
150
|
+
3. **Write `$C/config.json`** — `serial`, `package`, `launch_component`, `"adb": "<ADB_PATH>"` when the caller passed `ADB_PATH`, empty fixtures for phases whose `requires` is empty, `snapshot_dir` / `fixture_server_dir` — then **start the fixture server** with `detach.mjs start … --name fixture_server --service`. `d_prereqs.mjs check` must exit 0 before the first cycle.
|
|
151
|
+
4. **Run the cycle.** Always in the background: `node <this skill>/scripts/detach.mjs start ${harmony_project_dir} --name run_cycle -- node run_cycle.mjs $C --config $C/config.json --static $S/utg.json --project <android_project_dir> --package <app package>`. While `finished` is false, dispatch a reviewer for every `waiting` part not yet dispatched (at most `--max-agents`, `blocked_on` first) and start the cycle again once every `blocked_on` worklist is complete. Never ask the user between calls. Recovery A–D and direct launch run inside the cycle without confirmation; pass `--skip D` only when the user forbids app-data changes.
|
|
152
|
+
5. **Export and build the conversion set** after **every** `run_cycle.mjs` return:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
node <this skill>/scripts/export_ui_info.mjs $C --static-ws $S --out <ui_info_root>
|
|
156
|
+
node <this skill>/scripts/build_conversion_set.mjs $S --ui-info <ui_info_root> # --exploring until finished
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Convert while exploring.** Once Step 2's report exists: the first time run Step 4.4's `shell_contract.mjs`, Step 4.3 and `group_queue.mjs init`; every time, build packs and prompts for new groups and run one pass of the Step 5.4 loop before the next reviewer wave. When `finished` is true, run both commands once more without `--exploring`.
|
|
160
|
+
6. **Stop the fixture server** once `finished: true`, or when Step 3.2 is abandoned: `detach.mjs stop ${harmony_project_dir} --name fixture_server`, then `d_prereqs.mjs release --config $C/config.json`.
|
|
161
|
+
|
|
162
|
+
Record for Step 7: coverage from `report.md`, phase states and `skipped` stages, `export_manifest.json` counts, `deferred_human.json`, and `conversion_set.json`'s `summary`.
|
|
163
|
+
|
|
164
|
+
### Step 3.2-I — Scoped capture (incremental mode's I5)
|
|
165
|
+
|
|
166
|
+
The Step 3.2 explorer cycle with three deltas, all in `./references/incremental-scope.md` I5: the campaign is planned with `plan.mjs --scope <scope.json>` (tasks, review worklists and `capture_pending.json` then cover only the scope), `run_cycle.mjs` gets `--skip D` unless the user allows app-data changes, and the builder runs with `--scope` / `--existing`. No crawler, no model key.
|
|
167
|
+
|
|
168
|
+
Install the APK first (`adb [-s <ADB_SERIAL>] install -r -t <apk_path>`); the explorer never installs it, and an install failure stops I5. Without a device, or when the user declines capture, skip the cycle and run only `build_conversion_set.mjs`: every member converts source-only.
|
|
169
|
+
|
|
170
|
+
### Step 3.3 — Confirm pages.json and coverage
|
|
171
|
+
|
|
172
|
+
`pages.json` is already written by `export_ui_info.mjs` (full mode) and rewritten by `build_conversion_set.mjs` (both modes). **Check it exists; do not regenerate it.** Only when it is missing (a capture made by another tool) use the `generate_pages_json.mjs` fallback in the reference.
|
|
173
|
+
|
|
174
|
+
**Coverage gate.** `pages_captured == 0`: stop and report (incremental mode without a device proceeds source-only and says so in Step 7). Otherwise report `captured / source-only / attached / skipped` before Step 5, and review the `skip` rows once; only the user re-includes a skipped page. Report `pages_tree_only` too: these are captured pages whose every screenshot was FLAG_SECURE-blocked, so only their view trees exist (step4-prepare.md item 6).
|
|
175
|
+
|
|
176
|
+
## Step 4 — Prepare the Conversion Set
|
|
177
|
+
|
|
178
|
+
**Read [references/step4-prepare.md](references/step4-prepare.md) in full before starting Step 4.** It holds the page-set priority, exact-path validation, the plan field table, manual grouping, the Lottie index format, and the Step 4.4 pack commands with how to read and pass each pack.
|
|
179
|
+
|
|
180
|
+
- **4.1** Page set: incremental → I5's `pages.json`; else the user's list; else `pages.json` in file order (full mode always); Glob only without `pages.json`. Read each declared screenshot / view tree by its exact path, **all** frames of `screenshots` / `view_xmls`; a failed read marks the page `failed` with that path. Source-only pages check `source_hints` under `android_project_dir` instead.
|
|
181
|
+
- **4.2** Groups come from `conversion_set.json` → `plan`; do not regroup by hand. Review once and report to the user: `entry_node`, `warning` groups, spurious `after` chains. Persist `plan.groups` into `batch_progress.json` on the first run.
|
|
182
|
+
- **4.3** Grep (never Read) `resource_mapping.md` for "Lottie Animation Resources". No match → never mention Lottie. `Unknown` and multi-host rows go to Step 7.
|
|
183
|
+
- **4.4** Resolve shared facts once, as `Project Fact (<name>)` headings with citations (facts, not answers): `shell_contract.mjs` once before any prompt, `measure_pack.ts` per captured directory of each group (member pages and captured attached states: `<GID>.evidence.json`), `group_pack.mjs build` once per batch.
|
|
184
|
+
|
|
185
|
+
### Resume from progress (checkpoint)
|
|
186
|
+
|
|
187
|
+
Progress persists in `${harmony_project_dir}/.hometrans/batch_progress.json`:
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"harmony_project_dir": "<abs path>",
|
|
192
|
+
"mode": "full | incremental",
|
|
193
|
+
"scope_id": "<incremental only: stable digest of the confirmed SCOPE member list>",
|
|
194
|
+
"updated_at": "<ISO timestamp>",
|
|
195
|
+
"stages": {
|
|
196
|
+
"resources": { "done": true, "at": "<ISO>" },
|
|
197
|
+
"capture": { "done": true, "mode": "explorer", "at": "<ISO>" }
|
|
198
|
+
},
|
|
199
|
+
"pages": {
|
|
200
|
+
"page_0001_<A>Activity": { "status": "done", "output": "pages/<A>Page.ets", "summary": "..." },
|
|
201
|
+
"page_0002_<B>Activity": { "status": "failed", "error": "..." },
|
|
202
|
+
"page_0003_<C>Activity": { "status": "pending" },
|
|
203
|
+
"page_0055_<D>Fragment": { "status": "done", "tier": "source-only", "output": "pages/<D>Page.ets", "summary": "..." }
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- `status` is `pending` | `done` | `failed`; `tier` is `captured` | `source-only`.
|
|
209
|
+
- **Resume identity** is `harmony_project_dir` + `mode` + `scope_id`.
|
|
210
|
+
- All three match: merge the file into the discovered set. `done` pages are skipped in Step 5, and `pending`/`failed` pages are (re)processed.
|
|
211
|
+
- Any one differs: this is a different run. Archive the old file as `batch_progress.<scope_id>.json` and start fresh with every page `pending`.
|
|
212
|
+
- Before skipping a `done` page, check that its `output` still exists, otherwise treat it as `pending`.
|
|
213
|
+
- A page recorded `source-only` whose node is now `captured` resets to `pending`. It is re-converted against the capture, using the existing `.ets` as the starting point.
|
|
214
|
+
- **Stage markers: a resume does not redo finished stages.** The parent sets `stages.resources` after Step 2 succeeds, and `stages.capture` only once capture has ended: full mode when `run_cycle.mjs` returned `finished: true` and Step 3.3 confirmed `pages.json`; incremental mode when I5's capture wrote `pages.json`. A `pages.json` written mid-exploration does not count. On a matching resume:
|
|
215
|
+
- `stages.resources.done` and `resource_mapping.md` exists: **skip Step 2**. Re-running it rewrites `resources/**/element/*.json`, wiping the entries page conversions and Scheduling rule 7 merged in, and media the Phase 5 fixes replaced.
|
|
216
|
+
- `stages.capture.done` and `${ui_info_root}/pages.json` exists: **skip Step 3 (3.1–3.3)**. A fresh capture renumbers `page_NNNN_*` / re-promotes captures, so the `pages` keys recorded as `done` would point at different snapshots. Without the marker, full mode resumes the campaign (`run_cycle.mjs` continues from `cycle_state.json`) instead of starting over.
|
|
217
|
+
- Re-run either stage only on an explicit user request ("re-convert resources" / "re-capture"). Doing so invalidates the resume: archive `batch_progress.json` and start fresh.
|
|
218
|
+
|
|
219
|
+
If a task-tracking tool is available, create one task per page, with already-`done` pages marked completed. Report the split to the user (e.g. "Resuming: 7 done, 12 remaining").
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## Step 5 — Per-Group Conversion
|
|
223
|
+
|
|
224
|
+
**Read [references/step5-convert.md](references/step5-convert.md) in full before writing the first prompt.** It holds the per-group prompt inputs (5.1), the sub-agent contract every prompt carries (5.2), the scheduling rules (5.3), the work-queue loop, what `release` decides and the verification tables (5.4), and the wiring sub-agent (5.5).
|
|
225
|
+
|
|
226
|
+
- **5.1–5.2** One prompt file per group, `<prompts_dir>/<GID>.md`: Step 5.1's inputs, Step 5.2's contract, `SOURCE_PACK` = `group_packs/<GID>.md`. `REFERENCE_SCREENSHOTS` / `REFERENCE_VIEW_TREES` list every frame of every state from `group_packs/<GID>.evidence.json`, grouped by state. Substitute every placeholder, keep each prompt under 48 KB, and forbid `git` and sub-agent dispatch.
|
|
227
|
+
- **5.3** host-chain groups run serially, self-contained groups concurrently; `group_queue.mjs` applies the rules from `plan`. When in doubt, serialize. Rule 7 binds every concurrent prompt:
|
|
228
|
+
|
|
229
|
+
7. **The shared registry surface is parent-owned while any other group is in flight.** Every concurrently dispatched group's prompt states: do not edit `main_pages.json`, `resources/**/element/*.json`, `oh-package*.json5`, `module.json5` or the ability's `loadContent()`. Instead, list the additions in the report under `registry_requests`. The parent applies each group's requests when that group is released, one group at a time. Merge, never overwrite: an existing name with a different value is a conflict, so keep the existing value and record it in the report.
|
|
230
|
+
- **5.4** Never dispatch blocking waves. `Q init` once, then one pass per parent turn: release (`Q reap` → `Q release`), lease and dispatch (`Q lease`, pass `message` verbatim, `Q bind`), verify every `returned_unverified` group (`phase5_check.mjs --group`, `Q verified`, `group_commit.mjs`), then `Q wait` with a shell timeout above 9 min. Go on only when `summary.idle` is true, nothing is unverified and `summary.stuck` is empty.
|
|
231
|
+
- **5.5** One background sub-agent (Step 0.1) does the wiring: confirm every `registry_requests` was applied, wire self-contained components and shell hosts, and wire navigation from `navigates_to`. No group is in flight any more, so this agent may edit the registry surface of Rule 7. The parent writes `${harmony_project_dir}/.hometrans/work/prompts/wiring.md` (the Step 5.5 procedure of step5-convert.md plus its inputs), dispatches it the way Step 2 is dispatched, and joins on `.hometrans/work/wiring.report.md`. **Gate (parent re-checks after the join):** `orphan-component` is zero, and `phase5_check.mjs --files <every file changed since the last group commit>` has `blocking` 0, before Step 6. Take that file list from `git status --porcelain` (modified and untracked), not from the report: a file the agent edited but left out of the report would otherwise skip the gate and still be committed. The parent then commits the wiring.
|
|
232
|
+
|
|
233
|
+
## Step 6 — Static Check, Build, Smoke Gate
|
|
234
|
+
|
|
235
|
+
**Steps 6.1–6.4 run in one background sub-agent (Step 0.1), dispatched after the Step 5.5 gate passes and the wiring is committed.** The parent writes `${harmony_project_dir}/.hometrans/work/prompts/verify.md` with this whole Step 6 section, `harmony_project_dir`, `android_project_dir`, `ui_module`, `ALL_MODULES`, `DEVECO_HOME`, `ADB_SERIAL` / `ADB_PATH` and `ui_info_root`, and dispatches it the way Step 2 is dispatched: "Read `<that file>` and follow it fully. When done, write your full report to `${harmony_project_dir}/.hometrans/work/verify.report.md` and reply with one line `DONE verify`." The agent itself runs the `a2h-fix-build-errors` and `a2h-coldstart-smoke-gate` skills (neither dispatches sub-agents). It never asks the user. A login in the smoke gate comes back as its `DEPLOY_ERROR` with the instruction. Where `a2h-fix-build-errors` would ask (no DevEco path resolves, `devecocli` is not on PATH), the agent stops, writes `BLOCKED: <the human step>` at the top of the report and ends; the parent relays that step to the user and resumes the agent once it is done. The prompt forbids `git` and dispatching sub-agents. The report carries, for Step 7: the 6.1 `[GATE]` count of the last run and every `[CANDIDATES]` item reviewed but deliberately not fixed, with the reason; the 6.2 outcome; the 6.3 verdict with evidence path; the 6.4 screenshot paths, the fixes made and what is left; and every file edited.
|
|
236
|
+
|
|
237
|
+
**Join** on the report file, as in Step 2. Then the parent re-runs the 6.1 command once (it takes under a second); a non-zero `[GATE]` means the agent's report is wrong, so resume the agent in its own session with that output. The parent also runs `phase5_check.mjs --files` on every file `git status --porcelain` shows since the wiring commit (`blocking` 0), for the same reason as in 5.5. The parent commits the agent's fixes and writes Step 7 from the report.
|
|
238
|
+
|
|
239
|
+
### Step 6.1 — Static check (no device, no build, under a second)
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
node ./scripts/arkts_static_check.ts \
|
|
243
|
+
--ets "<harmony_project_dir>/entry/src/main/ets" \
|
|
244
|
+
--ets "<harmony_project_dir>/features/*/src/main/ets" \
|
|
245
|
+
--ets "<harmony_project_dir>/common/*/src/main/ets" \
|
|
246
|
+
--ets "<harmony_project_dir>/products/*/src/main/ets" \
|
|
247
|
+
--resources "<harmony_project_dir>/entry/src/main/resources" \
|
|
248
|
+
--resources "<harmony_project_dir>/features/*/src/main/resources" \
|
|
249
|
+
--resources "<harmony_project_dir>/common/*/src/main/resources" \
|
|
250
|
+
--resources "<harmony_project_dir>/products/*/src/main/resources" \
|
|
251
|
+
--android <android_project_dir> \
|
|
252
|
+
--sdk "<DevEco SDK dir, e.g. E:/DevEco Studio/sdk>"
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
- **`--sdk`** (or `DEVECO_SDK_HOME`) enables `request-permission-schema`: every `module.json5` `requestPermissions` entry must name a permission in the SDK's own `PermissionDefinitions.json`, and a `user_grant` one must carry `reason` and `usedScene`. A miss fails PreBuild with `00303218 Configuration Error`, which does not name the permission. Grant modes come from the SDK, never from memory; without an SDK the rule is skipped.
|
|
256
|
+
- **Re-run 6.1 after every Step 6.2 fix round that edits `.ets` or `module.json5`.** Build fixes reintroduce GATE defects the compiler accepts (orphaned components, shadowed attributes); the build passing is not the static check passing.
|
|
257
|
+
- **Wildcards.** `--ets` / `--resources` are repeatable and accept a `*` segment. The checker expands wildcards itself and skips paths that do not exist, so passing all four layouts is correct even in a single-module project.
|
|
258
|
+
- **Quote every pattern containing `*`.** PowerShell does not glob for native commands. An unquoted pattern scans one module and still prints `[GATE] 0 entries`. Read the first output line (`scanned N .ets files (4 modules: …)`); it is the only sign of a wildcard that matched nothing.
|
|
259
|
+
- **Never capture output with PowerShell `>`.** Windows PowerShell 5.1 writes it as UTF-16LE: the file reads `[ G A T E ]`, and a grep for `[GATE]` finds 0 . Use `cmd /c "<command> > <log> 2>&1"`, and take the result from the exit code. The same applies to build logs; see `a2h-fix-build-errors` §1.3.
|
|
260
|
+
- **Pages.** A file is a page only if it declares `@Entry`; `shell-content` components may live under `pages/`.
|
|
261
|
+
- **Union of roots.** Cross-module facts are resolved over the union of the roots passed: `orphan-component`'s import surface, `entry-route-not-converted`'s `loadContent` target, and resource lookups. Pass every participating module.
|
|
262
|
+
- **`--android`** enables the immersive cross-check. It greps for `enableEdgeToEdge` / `setDecorFitsSystemWindows` and, when no Harmony component extends into the bars (`ignoresLayoutSafeAreaEdges` / `expandSafeArea`), lists the call sites under `[CANDIDATES]`. This defect is invisible on the Harmony side alone, because an edge-to-edge page looks the same shape as a bar-avoiding one. It also enables the GATE `framework-picker-appearance`: an Android `TimePicker` / `DatePicker` (or their dialogs) in its default clock / calendar mode, converted to the ArkUI wheel of the same name (conversion-procedure.md Phase 4.3 "Appearance Substitution"). Omitted, both checks are skipped silently. Independent of `--android`, `window-fullscreen-layout` and `system-bar-height-read` are GATEs: a window-level full-screen layout, or any read of a bar height, breaks the `system_bars` policy.
|
|
263
|
+
- **`--resources`** enables three GATE rules that read the *content* of referenced SVGs, because a resource that exists can still render as a black, white or grey box (icon tiering: conversion-procedure.md Phase 4.3). Omitted, they are skipped silently.
|
|
264
|
+
|
|
265
|
+
Output has two sections, and the exit code is `1` only when the first is non-empty:
|
|
266
|
+
|
|
267
|
+
- **`[GATE]`** — zero-ambiguity defects. **Fix every one before building.** Two of them:
|
|
268
|
+
- `entry-route-not-converted`: `loadContent()` in the `UIAbility` does not point at a converted page, so the app launches the scaffold's Hello World. It fires only once converted pages exist.
|
|
269
|
+
- `orphan-component`: see Step 5.5.
|
|
270
|
+
- Every other rule (layout placement, shell rules, resource content, SDK, a11y …): what it detects, how to fix it and its downgrade marker are in [references/checker-rules.md](references/checker-rules.md), one `### <rule-id>` section per rule. Look up only the ids that fired (`grep -n "### <id>"`). Shell rules are active only when the plan has `presentation: shell-content` groups (the checker reads `<harmony_project_dir>/.hometrans`; pass `--hometrans <dir>` when the layout differs).
|
|
271
|
+
- **`[CANDIDATES]`** — not defects, but a narrowed worklist whose correctness depends on Android-side intent. Feed each into the matching Phase 5 item (Position Anchor Evidence / Interaction Reachability Evidence / Window Mode Evidence) with its source. Do not "fix" a candidate just because it is listed; a full-size container is usually legitimate.
|
|
272
|
+
|
|
273
|
+
### Step 6.2 — Build
|
|
274
|
+
|
|
275
|
+
Once Step 6.1 has zero `[GATE]`, call the `a2h-fix-build-errors` skill with `harmony_project_dir` to make the whole project compile.
|
|
276
|
+
|
|
277
|
+
### Step 6.3 — Cold-Start Smoke Gate
|
|
278
|
+
|
|
279
|
+
Run the `a2h-coldstart-smoke-gate` skill with `harmony_project_dir`, then record:
|
|
280
|
+
- the verdict, always, in Step 7's Build status;
|
|
281
|
+
- **every verdict other than `PASS`** in Manual Follow-up TODOs as well, never only in Build status:
|
|
282
|
+
- `FAIL_*`: the verdict + evidence path; a human takes over;
|
|
283
|
+
- `SKIPPED_*`: "smoke gate not run — <reason>";
|
|
284
|
+
- `DEPLOY_ERROR` (signing / install / build / device failed, or login needed): "smoke gate could not deploy — <the gate's message>", including any instruction it carries (e.g. run `devecocli auth login`, then re-run the gate).
|
|
285
|
+
|
|
286
|
+
## Step 7 — Final Report
|
|
287
|
+
|
|
288
|
+
Write the cumulative report to `${harmony_project_dir}/.hometrans/batch_report.md`:
|
|
289
|
+
|
|
290
|
+
0. **Scope of this run** (incremental only) — how `scope_request` was resolved:
|
|
291
|
+
- each seed with its hit evidence (`file:line`), and each member's `inclusion`;
|
|
292
|
+
- what the user confirmed in I4;
|
|
293
|
+
- the **adjacent but cut** list with the stop rule that excluded each;
|
|
294
|
+
- any `SCOPE` member whose UTG predecessor fell outside the scope (per I5), since these are potential wiring gaps.
|
|
295
|
+
0b. **Skipped as already existing** (incremental only) — every member graded `exists`, with the Harmony file it mapped to and the evidence for the mapping. Also list every re-migrated `placeholder` with its backup path.
|
|
296
|
+
0c. **Coverage summary** — `conversion_set.json`'s summary, then every `skip` row with its reason. Every static node appears exactly once across §0c and §1, with attached nodes under their host. A node in neither is a bug in this run.
|
|
297
|
+
1. **Per-page results** — one row per group, giving:
|
|
298
|
+
- page ids, `tier`, `status`, `output` files and the one-line `summary`;
|
|
299
|
+
- `error` for failed pages;
|
|
300
|
+
- a mark on every page whose evidence was parent-reconstructed.
|
|
301
|
+
2. **Build status** — the outcomes of Steps 6.1, 6.2 and 6.3, including `[CANDIDATES]` reviewed but deliberately not "fixed", with the reason.
|
|
302
|
+
3. **Manual Follow-up TODOs** — items that need a human, each with enough context to act on:
|
|
303
|
+
- **Unassigned Lottie animations** — `lottie_by_page["Unknown"]` plus multi-host entries. Give `source`, `target`, `load_path`, `host_android`, `host_layout`, `notes` verbatim, and what is needed (the hosting page and the start/stop trigger).
|
|
304
|
+
- **Source-only pages awaiting visual calibration** — these were converted from source. List each with its uncertain items (template-borrowed or framework-default values). Re-running Step 3.2 with a fixture, then `build_conversion_set.mjs`, flips them to `captured`, and resume resets them to `pending`.
|
|
305
|
+
- **Pages needing manual setup** — every `deferred_human.json` entry (login, content/data state, server address, default-app role), with `axes` / `affected_nodes` / `instructions` verbatim. In full mode, fold `derived: true` entries under the base phase they retry. These pages were converted source-only; the list says which fixture would let them be calibrated. Full mode picks them up by re-running Step 3.2 with the fixture; incremental mode by re-running I5.
|
|
306
|
+
- **Tree-only pages (`needs-manual-review`)** — `conversion_set.json` rows marked `pixels: "blocked"`. Their screenshots were FLAG_SECURE-blocked, so geometry came from the view tree only and nothing compared them with pixels. List each one with its `card-width-wraps` / `text_color` status, plus the colours and borders that were taken from source.
|
|
307
|
+
- **Pages captured only before their data arrived (`needs-manual-review`)** — `meta.json` `content_loading.primary: true` with empty `loaded_views` (the export warns about them). No capture shows the page's data: its texts in view.xml are layout defaults (`%1$s`), and the populated look was derived from source binding code. List each one with the placeholder texts and how the data is bound; re-running Step 3.2 with a longer `content_wait_seconds` or a data fixture recaptures it.
|
|
308
|
+
- **Uncaptured popups and menus** — attached `panel` nodes with no capture directory, such as a menu that only appears after a tap. Give each one's Harmony implementation (`bindMenu` / dialog). Any custom-drawn overlay must carry its `APPEARANCE-ESCALATED` ruling.
|
|
309
|
+
- **No visual comparison (`image_read=false`)** — say how it was decided (passed by the caller, or the Step 1 probe and its `probe_reason`). This host's sub-agents could not read images, so no page was compared with its screenshots by eye; geometry, alignment and pull/transition visuals rest on view trees and measurements only. List every captured page, and name the items a reviewer should check on screen first (indicator positions, left/right alignment of buttons, deviations the reports noted).
|
|
310
|
+
- **Captured but not converted** (full mode) — `export_manifest.json`'s `dynamic_only` count and `foreign_tree_captures`.
|
|
311
|
+
- **Degraded items (`degraded`)** — icons that could not be sourced (Phase 4.3 L3), and transitions declared but not implemented (Transition Implementation Evidence). They may ship degraded, but not unmentioned: paste the output of `node <skill>/scripts/draw_coverage.mjs degraded ${harmony_project_dir}` (every such line of every group report, verbatim) instead of choosing items by hand.
|
|
312
|
+
- **Pending fetch (`pending-fetch`)** — Phase 4.3 **L2.5-Remote** icons. Give the original web path, the absolute URL, the suggested media name, and what the page renders meanwhile. Keep this list separate from `degraded`: these need only a download, whereas an L3 needs new artwork.
|
|
313
|
+
- **Unfixed `error`-severity resource-fidelity rows** — anything the Step 2 gate flagged that was accepted rather than repaired.
|
|
314
|
+
- **Smoke-gate items** — every non-`PASS` verdict: unresolved `FAIL_*` (verdict + evidence path + fixes attempted), `SKIPPED_*` (the reason) and `DEPLOY_ERROR` (the gate's message and any instruction it carries).
|
|
315
|
+
|
|
316
|
+
## Key Constraints
|
|
317
|
+
|
|
318
|
+
- **Use the right resource.** Find it in `harmony_project_dir`; if it is missing, find it in `android_project_dir` and transfer it. Never invent one.
|
|
319
|
+
- **Never fabricate a measurement for a source-only page.** No px/vp from "typical" screens, and no colour picked by eye from a template's screenshot for a region the template does not share. Use XML dp, theme/style resolution, template-shared values or framework defaults, each labelled as such.
|
|
320
|
+
- **Work through the Common Mistranslations Cheat Sheet table** at the end of Phase 5 before declaring a page done. It is the static backstop; Step 6.4 is the runtime one.
|
|
321
|
+
- **Edit `.ets` / `.json5` / `.json` only with the file edit/write tools, or a script that reads and writes UTF-8 explicitly.** Never `Get-Content … -replace … | Set-Content` or `(Get-Content f) -replace` in Windows PowerShell 5.1: it reads UTF-8 without BOM as the ANSI code page (GBK) and writes it back mangled.
|
|
322
|
+
- **Incremental mode never overwrites a `placeholder` page without a backup.** Copy the existing `.ets` to `<same dir>/<name>.bak.<timestamp>` before the sub-agent writes, and report the path in §0b. The backup never goes under `resources/` (contract item 2).
|
|
323
|
+
- **Incremental mode may edit `loadContent()` and the app entry, and GATE `entry-route-not-converted` stays in force.** A migrated page that is routable but never reachable from the ability is invisible work. But if reconciling the route would change which screen an existing app opens on, say so and let the user decide.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Knowledge card — Alignment and horizontal inset
|
|
2
|
+
|
|
3
|
+
> Required. The criteria for Phase 5 "Text Alignment Evidence" and "Horizontal Inset Evidence".
|
|
4
|
+
> This card was split out of `conversion-procedure.md` with the rule text unchanged; Phase numbers mentioned in the card refer to the corresponding phases of `conversion-procedure.md`.
|
|
5
|
+
|
|
6
|
+
### Phase 5 "Text Alignment Evidence" — criteria
|
|
7
|
+
|
|
8
|
+
**The property for that axis has a different name in the two containers and must be chosen by container type**: in a `Column` the horizontal direction is the cross axis → `.alignItems(HorizontalAlign.*)`; in a `Row` the horizontal direction is the main axis → `.justifyContent(FlexAlign.*)`.
|
|
9
|
+
`.alignItems(VerticalAlign.*)` on a `Row` governs the **vertical axis** and **does not satisfy this item** — it is often perfectly correct in itself (matching Android's `verticalAlignment`/`gravity="center_vertical"`), which is exactly why it is so easily let through as "alignment already written": a correct vertical setting masks a missing horizontal one, and neither looks wrong on its own. The real miss looked like date separator rows and section titles centered while Android had them left-aligned. Criterion: in a full-width `Row` containing a shrink-wrapped `Text`, you must be able to point to the property that pins it to the left. **ArkUI `Column` centers by default, while Android `LinearLayout`/Compose `Column` default to start** — when Android writes no gravity, it must be explicitly translated to `.alignItems(HorizontalAlign.Start)`; "not writing it" on both sides is not the same. Not declaring it explicitly without stating a basis is a failure (when centering is really intended, a stated reason passes, e.g. an empty-state illustration or an icon inside a button). The typical sign of missing this item is section titles and list item text centered as a whole while Android left-aligns them, and the attribute-by-attribute comparison confirms it as "correctly translated".
|
|
10
|
+
**Alignment depends on the parent container, not just the container holding the Text**: as soon as a `Column` has a **shrink-wrapped** child container (a `Row`/`Column`/`Stack` with no `.width()` / `.layoutWeight()`, typically an "icon + title" row), what determines its horizontal position is the **parent** `Column`'s `alignItems`; the child `Row`'s own `justifyContent(FlexAlign.Start)` governs only the **inside** of the Row, not the Row's position in its parent. Real miss: the card title row `Row() { Image; Text }` was reported as `container-align-unset`, the answer "a Row's main axis defaults to Start" was correct in itself, so it was let through, while what actually centered it was the card `Column` with no `alignItems`. Fix: give the parent `Column` an explicit `.alignItems(HorizontalAlign.Start)`, or give the child row `.width('100%')`. Checker CAND `column-shrink-child-centered`.
|
|
11
|
+
**`Scroll`'s `.align()` determines where the content sits when it is shorter than the viewport**; the default is `Alignment.Center`. **`Alignment.Start` = left + vertically centered, not top-left**. Content in Android `ScrollView`/`NestedScrollView`/`RecyclerView` starts at the top by default, so this should usually be `Alignment.TopStart` (or `Top`/`TopEnd`). Exceptions need an Android basis: `fillViewport="true"` + child layout `gravity="center"` (login pages, centered empty-state pages) corresponds to `Alignment.Center`; `stackFromEnd`/`reverseLayout` (chat pages anchored to the bottom) correspond to `Bottom*`. Checker: `Alignment.Start` reports GATE `scroll-align-not-top` (almost certainly mistaken for top-left); other non-Top values report CAND `scroll-align-not-top`, and an unset value reports CAND `scroll-align-default-center`; with one of the bases above, just state it.
|
|
12
|
+
**Per-child alignment of Compose `Box` children (`Modifier.align(X)`)**: when a child inside `Box(contentAlignment = C)` writes `Modifier.align(X)` (X ≠ C), that child is placed by X and the rest by C. ArkUI `Stack` has no per-child alignment, and a child's `.align()` only arranges its own content, so X must be expressed separately: wrap that child in a container the same size as the Stack and arrange it by X inside that container (`BottomCenter` + `padding(bottom = 5.dp)` → `Column() { … }.width('100%').height('100%').justifyContent(FlexAlign.End).padding({ bottom: 5 })`; `CenterStart` → `Row()…justifyContent(FlexAlign.Start)`), or position it with `.position` / `.markAnchor`. **Leaving only the `padding` turned into a one-sided `margin` does not count as translating the alignment**: the Stack still centers it, and it sits on top of the centered siblings. The "Box children with their own alignment" section of the group pack lists every occurrence in this group (`file:line`); for each one, this item gives the HarmonyOS-side `file:line` and the form used. Checker: an explicit `alignContent: Alignment.Center` goes through GATE `stack-overlay-default-center` / `stack-child-align-noop` just like an unwritten one.
|
|
13
|
+
|
|
14
|
+
### Phase 5 "Horizontal Inset Evidence" — criteria
|
|
15
|
+
|
|
16
|
+
- **Matches the measurement**: the distance on the HarmonyOS side from that `Text` to its parent's left edge (the sum of every ancestor's `padding` along the way + its own `margin`) must equal Android `boundsPx.x1 − parent.x1` (converted to vp), with the basis `constraint-solved` or `xml-explicit-dp`. The parent is its actual layout parent in the view tree, not the left edge of the screen.
|
|
17
|
+
- **Same group, same indent**: the "text left edge" column of measure_summary groups texts by identical x. **Texts in the same group must land on the same left margin on the HarmonyOS side**; the differences between groups must match as well. If a `Text` lands in another group, or the texts of a group are split into different components each with different `padding`, you must give the Android basis (e.g. one row really has an icon, one row has a different `layout_marginStart`).
|
|
18
|
+
- **Right edge likewise**: the "text right edge" column lists only boxes taking at least half the width (stretched by `match_parent`/`0dp`); those boxes' right margins must match too.
|
|
19
|
+
- Criterion: lists split into several `@ComponentV2`/`@Builder`s (category rows + item rows, title rows + content rows) are the easiest to miss — each component "left-aligns" on its own, but one of them is missing the indent. Real miss: on a settings page the `PreferenceCategory` titles and `Preference` items were both at x=189px=72vp (androidx Preference defaults to `iconSpaceReserved=true`); the item rows had `padding({ left: 72 })` while the category rows had only top/bottom padding, so "Language"/"Units" were flush with the edge, and "Text Alignment Evidence" judged it a pass.
|
|
20
|
+
- Format: `// EVIDENCE(Horizontal Inset Evidence): 72vp group = category row padding.left 72 + item row padding.left 72 —— basis: constraint-solved view.xml:207/217 (x=189px/2.625)`.
|
|
21
|
+
|
|
22
|
+
## Common Mistranslations (undetectable at compile time)
|
|
23
|
+
|
|
24
|
+
| Mistranslation | Why it happens | Consequence | How to self-check |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| **Pinning to the bottom inside `Stack()` with the child's `.align(Alignment.Bottom)`** | Treating `.align` as "this node's alignment within its parent" | `.align` only arranges the child's own content; `Stack` defaults to `alignContent: Center`, so the bottom navigation floats in the middle of the screen | Pinning to the bottom/edge is decided by `Stack({ alignContent })`; cross-page shared chrome uses a host container component (step5-convert.md contract item 7). GATE `stack-child-align-noop` |
|
|
27
|
+
| **Copying a chrome call from another page but missing the parent `Stack`'s `alignContent`** | Copying only `Bar(...).margin({ bottom })` and writing the root container as `Stack()` | Under the default Center, `margin.bottom` only moves it up a few vp and the navigation bar stays in the middle of the screen; every page that copied the same call is like this | Copy `Stack({ alignContent })` together with it; when the host Activity draws only one chrome, build a shell (step5-convert.md Step 5.5). GATE `stack-overlay-default-center` / `shared-chrome-placement-drift` |
|
|
28
|
+
| **Container alignment defaults are opposite on the two sides** | ArkUI `Column`/`Row` center by default, Android defaults to start; when neither side writes it, they read the same | Shrink-wrapped `Text` and titles are centered as a whole while Android left-aligns them | → Phase 5 "Text Alignment Evidence" (including the parent-container paragraph); CAND `container-align-unset` / `column-shrink-child-centered` |
|
|
29
|
+
| **Compose `Box` translated as a bare `Stack()`** | The component mapping table says "Box → Stack", and when neither side writes alignment they read the same | Compose `Box` defaults to top-left, `Stack` to center: top-bar icons and badges end up in the middle of the screen/card | `Box()` → `Stack({ alignContent: Alignment.TopStart })`, `Box(contentAlignment = X)` → X; GATE `stack-bar-default-center` |
|
|
30
|
+
| **`Modifier.align(X)` of a `Box` child dropped** | After mapping to `Stack({ alignContent: C })`, only `.padding(…)` is left on the child, and it gets casually translated as a one-sided `margin` | Labels/badges stay in the middle of the Stack, overlapping the centered numbers and icons ("UV" on top of the number) | Wrap the child in a `Column`/`Row` the same size as the Stack and arranged by X, or use `.position`/`.markAnchor`; check one by one against the group pack's "Box children with their own alignment"; GATE `stack-overlay-default-center` |
|
|
31
|
+
| **`Alignment.Start` taken as "top-left"** | In ArkUI's nine-grid, `Start` = left + vertically centered; top-left is `TopStart` | `Scroll` content shorter than the viewport floats in the middle of the screen | → the `Scroll` paragraph of Phase 5 "Text Alignment Evidence"; GATE `scroll-align-not-top` |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Knowledge card — SDK and platform defaults
|
|
2
|
+
|
|
3
|
+
> Required. How to look up APIs and default values.
|
|
4
|
+
> This card was split out of `conversion-procedure.md` with the rule text unchanged; Phase numbers mentioned in the card refer to the corresponding phases of `conversion-procedure.md`.
|
|
5
|
+
|
|
6
|
+
- **API fails to compile ≠ the semantics are inverted** (not limited to Canvas): when the compiler says a property/method/enum does not exist, it only says **this spelling** does not exist; it says nothing about the capability's semantics being the opposite of what you assumed. Before changing code, open that class's declaration in the SDK `.d.ts` and check **the constructor parameters and `@default` / `Default value`**, cite the `.d.ts` file and line number in the Phase 5 report, and only then decide on the unit or semantics. The Canvas incident above came from skipping exactly this step: only the description of `font` was checked, not the constructor's `unit` parameter.
|
|
7
|
+
|
|
8
|
+
## Common Mistranslations (undetectable at compile time)
|
|
9
|
+
|
|
10
|
+
| Mistranslation | Why it happens | Consequence | How to self-check |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| **Checking whether an API exists in a different SDK copy** | The machine has several SDKs and the first one found is not the one used for the build | Wrongly concluding an interface does not exist and switching to a downgraded form | Check only `component_dts_dir` in the shell contract's `SDK` section; when that section is empty, go by the SDK path in the build log |
|
|
13
|
+
| Platform default differences | The same-named attribute behaves differently by default on the two sides (e.g. sheet keyboard avoidance: ArkUI defaults to `TRANSLATE_AND_SCROLL`, Android defaults to `adjustResize`, which compresses) | The reference screenshot and the implementation's output differ, with no error at all | For every attribute relying on "default behavior", check the default in the SDK `.d.ts`; if it differs from Android, **set it explicitly** instead of inheriting the default |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Knowledge card — Custom-drawn Views (Canvas / Path)
|
|
2
|
+
|
|
3
|
+
> Conditional card: required when this group has `onDraw` / `Canvas` / `Path` / Compose `drawBehind`.
|
|
4
|
+
> This card was split out of `conversion-procedure.md` with the rule text unchanged; Phase numbers mentioned in the card refer to the corresponding phases of `conversion-procedure.md`.
|
|
5
|
+
|
|
6
|
+
- **Draw branches of custom-drawn Views**: when porting `onDraw` / `Canvas`, follow `onDraw`'s call graph and list every `drawXxx(...)` **with its guard condition** (e.g. `CalendarTimelineView.kt:450` `if (compact && days.size == 1 && showCourseSlots) drawCompactCourseSlotLabels(canvas)`). Porting "only the few draws used on the first screen" is the most common way to miss this rule: in a real run the day view's "Period N 08:00-08:45" capsules were dropped entirely, the week view (captured) screenshot matched exactly, the day view (uncaptured) differed from the source app, and the report still said "missing list items: none" — because the list registered only "transitions", not "branches".
|
|
7
|
+
- **Font-size units of custom-drawn text**: `Paint.textSize` is in px; source code usually converts with `sp(N)` / `dp(N)` / `applyDimension(...)`. The font size unit of ArkUI `CanvasRenderingContext2D.font` can only be `px` or `vp` and must be written explicitly (SDK `canvas.d.ts`), where `px` means **physical pixels**. So `sp(N)` must become `` `${N}vp` ``; to follow system font scaling, write `` `${this.getUIContext().fp2px(N)}px` ``. You **must not** attach the sp number directly to `px`. Coordinates in the same Canvas are vp by default, so with the wrong unit the layout positions are still right and only the text is noticeably smaller (about 38% of the original at density 2.625), and the geometry self-checks all pass. Custom-drawn text has no node in the view tree and no measurement; the group pack's "Canvas-drawn text" section lists every `drawText` and the source of its font size — compare them one by one. Mechanical backstop: GATE `canvas-font-px-literal`.
|
|
8
|
+
- **Coordinate units of custom-drawn geometry**: the unit of `CanvasRenderingContext2D` is determined only by its constructor: `new CanvasRenderingContext2D(settings, unit?)`; `unit` defaults to `LengthMetricsUnit.DEFAULT`, **which is vp** (SDK `canvas.d.ts` constructor; `Graphics.d.ts` `DEFAULT = 0 // Length in vp`). Coordinates, `lineWidth`, `setLineDash` and the return value of `measureText()` are all in vp. Write Android's `dp(N)` as plain `N`; **do not** additionally multiply by `vp2px(1)` / `densityPixels`, and do not divide `measureText().width` by the density either. When you really need physical pixels, construct it as `new CanvasRenderingContext2D(settings, LengthMetricsUnit.PX)` (`import { LengthMetricsUnit } from '@kit.ArkUI'`) instead of multiplying by the density by hand. There is **no** `ctx.units` property and **no** `CanvasUnit` enum. When coordinates are multiplied by the density once too often, boxes and lines are enlarged by the density factor, content outside a fixed-width Canvas is clipped, and `vp` font sizes do not scale along; compilation, smoke and geometry self-checks all pass. Mechanical backstop: GATE `canvas-coord-density-scaled`; `ctx.units =` / `CanvasUnit` hits GATE `sdk-api-nonexistent`.
|
|
9
|
+
- **`Path` / clip-path commands are in px**: the SVG path strings of `Path({ commands })`, `.commands()`, `new Path({ commands })` used as a `.clip()` / `.clipShape()` argument, and `PathShape({ commands })` are all in **physical pixels** (SDK `path.d.ts`: "The unit is px"), whereas `Path`'s `width`/`height` and `Area.width/height` from `onAreaChange` are vp. Building commands from vp numbers shrinks the clip region to 1/density. In Compose, `clip(GenericShape { … })` and `drawBehind { path… }` work in px (`size` itself is px); when porting, convert the same geometry with `vp2px()` before building the commands. Mechanical backstop: GATE `path-commands-vp`.
|
|
10
|
+
|
|
11
|
+
## Common Mistranslations (undetectable at compile time)
|
|
12
|
+
|
|
13
|
+
| Mistranslation | Why it happens | Consequence | How to self-check |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| **Canvas font size copies the sp number and appends `px`** | Reading `Paint.textSize = sp(9f)` as "size 9 text" | `px` in Canvas is physical pixels, so the text is only 1/density of the original | `` `${N}vp` `` or `fp2px(N)` + `px`. GATE `canvas-font-px-literal` |
|
|
16
|
+
| **Canvas coordinates multiplied by the density again** | `ctx.units = CanvasUnit.VP` failed to compile, inferred "no units → coordinates are physical px" | The default is already vp, so boxes, lines and capsules are enlarged by density, and content outside a fixed-width Canvas is clipped | → "Coordinate units of custom-drawn geometry"; GATE `canvas-coord-density-scaled` |
|
|
17
|
+
| **`Path` commands using vp numbers** | `Path`'s width/height are vp, so writing commands in vp feels most natural | commands are px: the clip region shrinks to 1/density and card content is clipped | Convert with `vp2px()` before building them; GATE `path-commands-vp` |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Knowledge card — Dynamics: variants, transitions, state branches
|
|
2
|
+
|
|
3
|
+
> Required. The three kinds of dynamics registration in Phase 4.2; the basis for Phase 5 "Transition Implementation Evidence" (Tier A).
|
|
4
|
+
> This card was split out of `conversion-procedure.md` with the rule text unchanged; Phase numbers mentioned in the card refer to the corresponding phases of `conversion-procedure.md`.
|
|
5
|
+
|
|
6
|
+
**Data-driven visible variants — trace them to the call site**: when a visible element (icon/text/color) is **selected** from several candidates by a runtime value, besides the mapping table and the enum definition you **must** locate in `android_project_dir` where that value is **produced and passed in**, and record its **scope and granularity**: computed once per item, one constant per screen, or once per request. If the scope is wrong, the mapping table and resource references can all be correct and the rendered variant will still be systematically wrong. Criterion: if the source hoists a value out of the loop as a reused constant, the translation must not compute it per item; and vice versa.
|
|
7
|
+
|
|
8
|
+
**Declared state transitions — register each one**: the structural understanding describes the UI only **at one moment**, while Android often declares "how the UI changes with interaction" in files outside the layout. You must scan `android_project_dir` and register, one by one:
|
|
9
|
+
|
|
10
|
+
- `MotionLayout` scenes (the xml that `app:layoutDescription` points to, containing `<ConstraintSet>` + `<Transition>`)
|
|
11
|
+
- Stateful entries in `<animated-selector>` / `<animated-vector>` / `<selector>`
|
|
12
|
+
- `StateListAnimator`, `res/animator/`, `res/anim/`
|
|
13
|
+
- Animations of visible properties in code (`ObjectAnimator`, `animate()`, `TransitionManager`, `setDuration`, etc.)
|
|
14
|
+
|
|
15
|
+
Register each as "trigger condition → changed property → start/end values".
|
|
16
|
+
|
|
17
|
+
**Criterion (cross-check with snapshots, not by gut feel)**: if the bounds or size of the same `resource-id` change between `view_scroll_n.xml` snapshots and the change **cannot be explained by scroll displacement** (e.g. the whole block gets shorter rather than moving up as a whole), that is transition evidence — and a matching entry must exist in this list. Conversely, every entry in the list must have its implementation status stated in Phase 5.
|
|
18
|
+
|
|
19
|
+
**End-point substitution (mandatory for interpolated transitions)**: when a transition is written as "start/end constants + progress interpolation", the start constant is seen only on the first frame and the end constant shows only after a scroll/tap. For every interpolated position/size, compute the actual rectangle at progress = 0 and = 1 from the HarmonyOS-side coordinate origin (`cards/geometry.md` "Hard requirement (coordinate system)"), and compare it one by one with the bounds of the same `resource-id` in the start and end snapshots (converted to safe-area vp); list it as an "element → end point → computed interval → snapshot interval" table in "Transition Implementation Evidence". If an end point cannot be computed or does not match, that transition must not be labeled `implemented`.
|
|
20
|
+
|
|
21
|
+
Typical consequence of skipping this section: the static first screen is completely correct, but as soon as you scroll/tap/switch it behaves differently from the source app, while every static check passes with full marks.
|
|
22
|
+
|
|
23
|
+
**State-branch list — compare captured states against screenshots, and compare branch by branch against source only for uncaptured ones**: reference snapshots cover only some states (mode tabs, expanded/collapsed, empty/with data…). Every `ui-state` in `ATTACHED_NODES`, and every branch in this page's source that renders differently by state, must be registered as one row "state → condition (`file:line`) → build/draw calls in that branch → evidence". Fill the evidence column from `REFERENCE_SCREENSHOTS`: when the state has its own `###` group, write its frame paths and **convert and verify against those frames** (treated the same as the main state, including all Phase 5 measurements); write `not-captured` for a state without a group. Uncaptured states have no screenshot to compare against and **can only be checked branch by branch against the source**, so the calls in each branch must be listed completely:
|
|
24
|
+
|
|
25
|
+
- Layout branches: `if (mode == DAY) addView(...)`, `when (selectedMode)`, etc. — list the Views added/hidden in each branch;
|
|
26
|
+
|
|
27
|
+
For each row, give the HarmonyOS-side `file:line` in Phase 5 "Transition Implementation Evidence", or `n/a` + the reason.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Knowledge card — Geometry: size, position, coordinate system
|
|
2
|
+
|
|
3
|
+
> Required. The coordinate rules and ConstraintLayout rewrite of Phase 4.2; the basis for Phase 5 "Main Region Evidence", "Position Anchor Evidence" and "Interaction Reachability Evidence".
|
|
4
|
+
> This card was split out of `conversion-procedure.md` with the rule text unchanged; Phase numbers mentioned in the card refer to the corresponding phases of `conversion-procedure.md`.
|
|
5
|
+
|
|
6
|
+
**Coordinate and window-mode rules (static analysis)**:
|
|
7
|
+
|
|
8
|
+
- `bounds` are physical coordinates on the capture device, not vp that can be written directly into ArkUI.
|
|
9
|
+
- First take the app content bounds as the origin and convert the main regions into relative ratios: `xRatio=(x-appLeft)/appWidth`, `yRatio=(y-appTop)/appHeight`, `wRatio=width/appWidth`, `hRatio=height/appHeight`.
|
|
10
|
+
- Compare the screenshot with the view tree to tell whether Android draws edge-to-edge (immersive) or avoids the system bars; the ArkUI top-level structure must use the same strategy. This only produces static implementation constraints; no runtime acceptance on the target is done here.
|
|
11
|
+
- Express the top-level page, toolbar, main content and list area preferably with `Column`/`Row`/`Flex`, percentages, `layoutWeight` and parent-child constraints. Writing raw px differences directly into `.position()`, `.height()` or `.margin()` is forbidden.
|
|
12
|
+
- Only intrinsic dp/sp sizes explicitly defined in Android XML may be used via `dp→vp`, `sp→fp`; large fixed positions/heights without a source count as a verification failure.
|
|
13
|
+
|
|
14
|
+
#### ConstraintLayout → equivalent ArkUI rewrite
|
|
15
|
+
|
|
16
|
+
`0dp` + constraints is ConstraintLayout's standard way of saying "the size is solved from the constraints"; it is **not** "size 0",
|
|
17
|
+
and it is **not the same as** "fill the parent". ArkUI has no constraint solver, so it must be translated into explicit parent-child layout relations.
|
|
18
|
+
Every row of the table below gives the wrong translation and its consequence — these mistakes all **compile**, and only show up on a real device:
|
|
19
|
+
|
|
20
|
+
| Android | Correct translation | Wrong translation → consequence |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `layout_width="0dp"` + start/end constraints + left/right `margin` | The parent does the inset: parent `.padding({left,right})` + child `.width('100%')`; or the child uses `.layoutWeight(1)` | The child writes both `.width('100%')` and `.margin({left,right})` → ArkUI's `100%` is relative to the parent's content area and **does not subtract its own margin**, so actual width = parent width + left/right margin, **overflowing on the right** (rounded corners/strokes clipped) |
|
|
23
|
+
| `layout_height="0dp"` + top/bottom constraints | `.layoutWeight(1)` (take the remaining space); or an explicit height from the ratio measured in the reference view tree | `.height('100%')` → takes the parent's full height. The constraint-solved result is **usually smaller** than the parent's height, so the region ends up too tall and squeezes the content after it |
|
|
24
|
+
| Negative margin (e.g. `layout_marginTop="-30dp"`) | Keep it negative: `.margin({top:-30})` or `.offset({y:-30})`, and explain its purpose in the report | Dropped → this block and everything after it shift down, common in "top region moved up to hug the status bar" scenarios |
|
|
25
|
+
| The element's own `margin` | Stays on **that element** | Promoted to the parent's `padding` → affects every sibling, pushing them all together |
|
|
26
|
+
| `layout_constraintStart_toEndOf="parent"` (pushed out of the visible area) | Not rendered in that state, or `.visibility()` as needed | Translated as an ordinary constraint → the element wrongly stays on screen |
|
|
27
|
+
| Two-dimensional constraints: an element shares a vertical interval with only **some** of its siblings (e.g. the bottom-right "arrow + difference" chain hugs only the `parent` bottom and is `start_toEndOf` the second text line; the right side of the first-line title is unconstrained) | Keep the two-dimensional relation: `RelativeContainer` + `.alignRules()`; or a `Stack`, placing the corner element separately with `Alignment.BottomEnd` etc. and letting the main `Row/Column` fill | Split into a one-dimensional `Row [icon][Column(title, value).layoutWeight(1)][corner element]` → the corner element takes a column over the **whole height**, the title's available width shrinks, the single-line `wrap_content` title wraps onto two lines and the card gets taller; every copied attribute is right, and compilation and checks all pass |
|
|
28
|
+
| **Fixed dp size** + `layout_constraintEnd_toEndOf="parent"` + `layout_marginEnd` (right-anchored; `Bottom_toBottomOf` likewise means bottom-anchored) | Express it as an **alignment relation**, not coordinates: `RelativeContainer` + `.alignRules()` (see `ConstraintLayout → RelativeContainer` in the layout mapping table); or a parent `Stack` with `Alignment.TopEnd` + child `.margin({right})`; or derive `x = parentWidth - marginEnd - childWidth` from the parent's measured width | An absolute offset computed at the reference resolution written as `.position({x: <constant>})` → the constant **only holds at the reference device's width**; on a narrower screen the element's right side **moves out of the visible area and is clipped**. The size dimension is unambiguous (the dp is explicit), so this is the easiest to miss; or the anchoring is carried by a container that fills the parent (`width('100%')` + `height('100%')` + edge alignment) → visually correct, but it becomes the **topmost** of its siblings and swallows hit testing for every clickable element beneath it (`hitTestBehavior` at its default responds to hits), so all clicks in that area stop working |
|
|
29
|
+
|
|
30
|
+
**Hard requirement (size)**: every width/height of the top-level regions and main regions must be traceable to one of these two —
|
|
31
|
+
(a) the **constraint-solved measured result** in the reference view tree, (b) an **explicit dp declaration** in Android XML.
|
|
32
|
+
Using the parent's size as the child's constrained size counts as a verification failure.
|
|
33
|
+
Criterion: if a region's measured size in the reference view tree differs from its parent's, it **must not** be expressed with `'100%'` / `.height('100%')`.
|
|
34
|
+
|
|
35
|
+
**Hard requirement (position)**: **every position anchor** must likewise be traceable, and must additionally be labeled with its category —
|
|
36
|
+
(a) **`fixed-offset`**: on Android it is itself a fixed `margin`/`padding` relative to the parent's start edge (start/top);
|
|
37
|
+
(b) **`parent-derived`**: on Android it is right/bottom/center anchored (`constraintEnd_toEndOf`, `Bottom_toBottomOf`,
|
|
38
|
+
`layout_gravity="end|center"`, `constraintHorizontal_bias`, etc.), and its position changes with the parent's size.
|
|
39
|
+
|
|
40
|
+
Criterion: **category (b) anchors must not be written as constant coordinates**. The absolute value measured from the reference view tree is only "the solution on that reference device",
|
|
41
|
+
not the layout intent; it must be restored to an alignment relation (`RelativeContainer` + `.alignRules()`, `Stack` + `Alignment`,
|
|
42
|
+
parent `padding`) or an expression derived from the live parent size.
|
|
43
|
+
Self-check: for every coordinate of every `.position()` / `.offset()`, ask "**if the screen width shrinks by 10%, is this value still right?**" —
|
|
44
|
+
if the answer is no and it is still a constant, it fails. Such defects are numerically perfect at the reference resolution and cannot be found by static checks or compilation.
|
|
45
|
+
Ask the same question of **constant widths close to the screen width** (≥ 300vp, listed by CAND `wide-constant-width`). For dialog panels, go by
|
|
46
|
+
measure_summary's `dialog panel` line (not the window line with its background inset) and, using the ratios it gives, write an outer
|
|
47
|
+
`width('<window share of screen width>%')` + left/right `padding(<inset>)` and an inner `width('100%')`. A constant width converted from the reference device leaves almost no margin on either side
|
|
48
|
+
on a narrower screen, and looks like it fills the screen.
|
|
49
|
+
|
|
50
|
+
**Hard requirement (coordinate system)**: the reference view tree's bounds are **screen coordinates**, and on an immersive page (root starting at y=0) they include the status bar;
|
|
51
|
+
HarmonyOS content stays inside the safe area (shell contract system_bars). So vertical offsets and marginTop always use the
|
|
52
|
+
`safeTopVp` given by measure_pack (= (screen y − status bar) / density; the summary's "coord frame" line gives the status-bar height and its source); never use the screen y directly.
|
|
53
|
+
Take each widget's position from **its own** bounds; never borrow a neighboring widget's margin: applying one widget's screen-coordinate marginTop to another row moves the whole row down further inside the safe area,
|
|
54
|
+
overlapping the content below.
|
|
55
|
+
**The origin of an offset is the ArkUI parent container that actually lays it out**: in a `Column`/`Row`, margin counts from the edge of the previous sibling; in a `Stack`/`RelativeContainer` (without alignRules)
|
|
56
|
+
it counts from the container's own edge. An offset that Android's sibling-relative constraints (`Top_toBottomOf="@id/sibling"`, chains) compute "relative to a sibling" must have
|
|
57
|
+
that sibling's top + height added back when placed in a `Stack` as a sibling; the more robust approach is to keep the ordering relation — put both in the same `Column`, or use `RelativeContainer` + `.alignRules({ top: { anchor: '<sibling id>', align: VerticalAlign.Bottom } })`.
|
|
58
|
+
For every `margin.top`/`offset.y` written on a `Stack` child, write one line in the report "origin = which edge of which container"; for a state-driven (interpolated) offset, compute the vertical interval `[top, top+height]` at both the start and end points from this origin,
|
|
59
|
+
and compare it with the intervals of the other siblings in the same `Stack` and with the bounds of the corresponding snapshots (`view.xml` / `view_scroll_N.xml`) — if the snapshot shows no overlap but the computation does, it fails.
|
|
60
|
+
|
|
61
|
+
## Common Mistranslations (undetectable at compile time)
|
|
62
|
+
|
|
63
|
+
| Mistranslation | Why it happens | Consequence | How to self-check |
|
|
64
|
+
|---|---|---|---|
|
|
65
|
+
| `.width('100%')` combined with `.margin({left,right})` | Intuition says `100%` automatically subtracts the margin | Actual width = parent width + left/right margin, **overflowing on the right**, rounded corners clipped | Search for `width('100%')` and left/right `margin` on the same element; switch to parent `padding` or `layoutWeight(1)` |
|
|
66
|
+
| **`0dp` + `layout_weight` translated as several siblings all `width('100%')`** | In evenly split tabs each one "fills its own cell", and each looks right on its own | The first sibling takes the whole row and the rest are pushed off screen | Weights always use `.layoutWeight(n)`, `@Builder` root nodes too. GATE `main-axis-pct-siblings` |
|
|
67
|
+
| **Cards in a vertical `LinearLayout` given no width** | Android child Views are full width even without LayoutParams, so no `MATCH_PARENT` is visible in the source | Children of an ArkUI `Column` shrink to content by default: each card has a different width with ragged right edges, and the whole page looks "messily laid out" | Cards get `.width('100%')`; for tree-only pages check against the group pack's geometry table (`full` rows). GATE `card-width-wraps` |
|
|
68
|
+
| **WRAP parent + MATCH child translated as a `constraintSize({ minHeight })` parent + `'100%'` child** | Android's two-pass measurement makes a MATCH_PARENT child inside a WRAP_CONTENT parent fall back to the content height, so the attribute-by-attribute translation looks equivalent | ArkUI resolves percentages against the upper constraint, roughly the viewport inside a Scroll, so the component is stretched very long; a mistake in a shared component breaks several places at once | Remove the child's `'100%'` and use `alignItems` + `min…`. GATE `pct-in-auto-size-parent` |
|
|
69
|
+
| Using the parent's size as the child's constrained size | Android `0dp` + constraints taken as "fill the parent" | The region is too big/tall and squeezes the content after it | Compare the measured size in the reference view tree with the parent; if they differ, `'100%'` must not be used |
|
|
70
|
+
| Negative margins dropped | A negative value looks like a typo | The whole block of content moves down (common for tops hugging the status bar) | Grep `margin.*="-` in the Android layouts and confirm each one has been translated |
|
|
71
|
+
| Using `Blank()` in a `Row` of undetermined width to push a button to the right end | Assuming `Blank` always fills the remaining space | `Blank` stretches only when the parent's main axis has a definite width (Blank API doc); the `Row` shrink-wraps and is then centered by the parent `Column` by default — title and button are squeezed into the middle together | Every `Row` containing `Blank()` must be able to point to the source of its main-axis width (`.width('100%')` / `layoutWeight`); when EVIDENCE says "Blank pushes it to the right end", substitute back and check |
|
|
72
|
+
| Right/bottom-anchored elements written as constant `.position()` coordinates | The reference view tree only gives the absolute solution on that device | On narrower screens the element moves out of the visible area and **is clipped** | → Phase 4.2 "Hard requirement (position)", Phase 5 "Position Anchor Evidence": "if the screen width shrinks by 10%, is this value still right?" |
|
|
73
|
+
| **`.height('100%')` in a container of undetermined height inside scroll content** | Literal translation of Android `match_parent` badges/decoration layers | Cards and list rows are stretched to the viewport height | GATE `percent-height-in-scroll`; badges become `.position({ right, bottom })` |
|
|
74
|
+
| **Dialogs/cards written as constant widths converted from the reference device** | The vp number from measure looks like the answer | On narrow screens it touches the edges and looks full-width | → last paragraph of Phase 4.2 "Hard requirement (position)"; CAND `wide-constant-width`; use the ratios of the `dialog panel` line |
|
|
75
|
+
| **Screen y on an immersive page used directly as an offset inside the safe area** | View tree bounds include the status bar, while HarmonyOS content is inside the safe area | The header elements all move down by one status-bar height and overlap the content below | → Phase 4.2 "Hard requirement (coordinate system)"; use `safeTopVp` |
|
|
76
|
+
| **A "sibling-relative" offset written onto a `Stack` child** | "N from the sibling's bottom edge" is computed from `Top_toBottomOf=@sibling`, but the structure is changed into `Stack` siblings (to make it easy to layer a background/collapse) | In a `Stack`, margin counts from the container's top, so the element moves up as a whole by one sibling height; when interpolated to the other end point (often negative) it fully overlaps the sibling (two text lines stacked on top of each other after collapsing), which is often invisible on the first frame | → the origin paragraph of Phase 4.2 "Hard requirement (coordinate system)": state the origin of each one, and substitute the start and end points back into the vertical interval |
|
|
77
|
+
| **Two-dimensional constraints split into three columns of a one-dimensional `Row`** | ConstraintLayout writes it all in one container, and the handiest translation is "left icon / middle text / right badge" | An element that occupies only one corner eats width over the whole height, the single-line title wraps and the card gets taller | → the "two-dimensional constraints" row of the ConstraintLayout rewrite table; `RelativeContainer` or `Stack` + corner alignment |
|
|
78
|
+
| A fill container carrying a bottom/right anchor swallows the clicks beneath it | It both satisfies "no hard-coded coordinates" and is visually correct | Clickable elements beneath it **do not respond to taps**, with no console output either | → Phase 5 "Interaction Reachability Evidence": confirm each fill container is interactive or has `hitTestBehavior(HitTestMode.None)` set |
|
|
79
|
+
| **Inverted `padding` semantics**: Android's "N dp icon + P dp padding" translated literally as `.width(N).padding(P)` | Android's `padding` is **outside** the declared size (total footprint N+2P), ArkUI's is **inside**. In an attribute-by-attribute translation the two sides read exactly the same, which looks most "faithful" | The content area is squeezed to `N-2P` (**0** when P≥N/2) — the element **takes up space as usual but is completely invisible**. Neighboring elements are positioned correctly; only it disappears; compilation, `[GATE]` and resource reference checks all pass | List every element that has both `.width()/.height()` and `.padding()` and check whether the declared value **already includes** the padding (Android `src` N dp + `padding` P dp ⇒ ArkUI should write `N+2P`). Styles like `Image` + round icon button ("icon + inner padding") are hot spots. A literal size whose padding is ≥ the size is caught by GATE `padding-consumes-fixed-size`; non-literal sizes and partial shrinking still need a manual check |
|
|
80
|
+
| **`layout_weight` translated onto a custom component's build() root node** | Android's `layout_weight` is written on the View itself, so an attribute-by-attribute translation lands it on the component's inner root node; and it actually works when the call site chains no attributes | As soon as the call site chains an attribute (`.margin()`, `.onClick()` both count), the component is wrapped in a `__Common__` node and the parent `Row`/`Column` can no longer read the weight: the component shrinks to its content, **leaving blank space at the end of the row** | Write the weight at the **call site** `Cell({ … }).layoutWeight(1)`, **and** make the inner root node fill along the parent's main axis (parent Row → `.width('100%')`); moving only the weight without filling leaves the background shrunk to the content. `@Builder` is inlined and unaffected. GATE `layout-weight-on-component-root` |
|