@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,335 @@
|
|
|
1
|
+
# Android to HarmonyOS Code-Defined Vector Icon Rules
|
|
2
|
+
|
|
3
|
+
This document defines how to migrate vector icons that an Android project draws from **code** rather than from `res/`. Read this before converting any project that uses Jetpack Compose. Every code-defined icon observed during conversion must produce an inventory row and a mapping row per the rules in `references/resource-mapping-rules.md`.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
1. [Scope: Why `res/` Scanning Misses These Icons](#scope-why-res-scanning-misses-these-icons)
|
|
7
|
+
2. [Detection: When to Run This Analysis](#detection-when-to-run-this-analysis)
|
|
8
|
+
3. [Three Sources of Truth](#three-sources-of-truth)
|
|
9
|
+
4. [Extracting the Icon Inventory from `classes*.dex`](#extracting-the-icon-inventory-from-classesdex)
|
|
10
|
+
5. [Extracting Screen Attribution from Android Source](#extracting-screen-attribution-from-android-source)
|
|
11
|
+
6. [Resolving an Icon Name to Upstream Artwork](#resolving-an-icon-name-to-upstream-artwork)
|
|
12
|
+
7. [HarmonyOS Target Path and Filename](#harmonyos-target-path-and-filename)
|
|
13
|
+
8. [SVG Post-Processing](#svg-post-processing)
|
|
14
|
+
9. [AutoMirrored and Right-to-Left](#automirrored-and-right-to-left)
|
|
15
|
+
10. [Report and Mapping Requirements](#report-and-mapping-requirements)
|
|
16
|
+
11. [Fallbacks and Out-of-Scope Cases](#fallbacks-and-out-of-scope-cases)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Scope: Why `res/` Scanning Misses These Icons
|
|
21
|
+
|
|
22
|
+
Jetpack Compose applications take most of their iconography from `androidx.compose.material:material-icons-core` and `androidx.compose.material:material-icons-extended`. Those icons are **Kotlin-generated `ImageVector` objects** built with a path DSL. They are compiled into `classes*.dex` and never appear in:
|
|
23
|
+
|
|
24
|
+
- the project's `res/drawable*/`,
|
|
25
|
+
- the APK's `resources.arsc`,
|
|
26
|
+
- therefore also not in `<decoded_output_path>/res/` after Step 3.
|
|
27
|
+
|
|
28
|
+
Every other step of this skill reads a `res/` tree. That makes these icons **structurally invisible** to the rest of the pipeline, and the failure is silent in a particularly bad way:
|
|
29
|
+
|
|
30
|
+
- Step 5.3 scans `layout*/` and `menu/` for `@type/name` references. A Compose app has no layout XML, so the scan finds nothing missing.
|
|
31
|
+
- Step 6.8 cross-checks `$r('app.media.xxx')` references that already exist in `.ets` files. A HarmonyOS shell project that has not been written yet contains no such references, so the check finds nothing missing.
|
|
32
|
+
|
|
33
|
+
Both gates report "all dependencies satisfied" while the migrated page renders no icons at all.
|
|
34
|
+
|
|
35
|
+
**Observed case.** On a real Compose application (Mihon), the More screen displays 10 icons. Exactly **one** of them (`R.drawable.ic_glasses_24dp`) is an Android resource. The other nine — including the icons in front of *Download queue* and *Categories* — come from `Icons.Outlined.*` / `Icons.AutoMirrored.Outlined.*`. Resource conversion converted the one resource correctly and produced nothing for the other nine, with no warning anywhere in the report.
|
|
36
|
+
|
|
37
|
+
## Detection: When to Run This Analysis
|
|
38
|
+
|
|
39
|
+
Run this analysis when **any** of the following is true:
|
|
40
|
+
|
|
41
|
+
1. `build.gradle`, `build.gradle.kts`, or `gradle/libs.versions.toml` declares `androidx.compose.material:material-icons-core` or `androidx.compose.material:material-icons-extended`.
|
|
42
|
+
2. Any `.kt` file in the project imports a path under `androidx.compose.material.icons.`.
|
|
43
|
+
3. `classes*.dex` in the decoded APK contains at least one string matching the icon-name pattern in the next section.
|
|
44
|
+
|
|
45
|
+
Condition 3 alone is sufficient — a project can pull the icon library in transitively through another dependency without declaring it.
|
|
46
|
+
|
|
47
|
+
If none hold, write `Code-defined vector icons: none detected` in the report's summary and skip the rest of this document.
|
|
48
|
+
|
|
49
|
+
## Three Sources of Truth
|
|
50
|
+
|
|
51
|
+
Three separate questions need three separate sources. Do not try to answer all three from one place.
|
|
52
|
+
|
|
53
|
+
| Question | Source | Needs `android_project_dir`? |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| **Which** icons does this app use? | `classes*.dex` string pool | No |
|
|
56
|
+
| **What** does each icon look like? | Upstream Material Icons snapshot | No |
|
|
57
|
+
| **Where** is each icon used (screen attribution)? | Android source `.kt` files | **Yes** |
|
|
58
|
+
|
|
59
|
+
### Why the dex is authoritative for scope
|
|
60
|
+
|
|
61
|
+
The dex reflects what was actually packaged: it covers icons used by **library** code as well as application code, and it **excludes** icons eliminated as dead code by R8. Grepping the Kotlin source alone both over-reports (references that were shrunk away) and under-reports (library-internal usage, and references reached through import aliases or indirection).
|
|
62
|
+
|
|
63
|
+
### Why the dex cannot give attribution
|
|
64
|
+
|
|
65
|
+
R8 obfuscates the icon library. In a release APK the package path `androidx/compose/material/icons` is absent from every dex, and the surviving icon identifiers are the plain name strings passed to the `materialIcon(name = "...")` builder, sitting in a flat, sorted string pool:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
... Outlined.Public Outlined.PushPin Outlined.QueryStats Outlined.RadioButt ...
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The string tells you `QueryStats` is used. It does not tell you the *Statistics* row uses it. Recovering that link from the dex would require disassembly plus call-graph analysis to connect an obfuscated getter to both its name string and its call sites. Application class names typically **do** survive (e.g. `Leu/kanade/presentation/more/MoreScreenKt`), so the analysis is tractable — but reading the one line of Kotlin source is exact and costs nothing:
|
|
72
|
+
|
|
73
|
+
```kotlin
|
|
74
|
+
TextPreferenceWidget(
|
|
75
|
+
title = stringResource(MR.strings.label_download_queue),
|
|
76
|
+
icon = Icons.Outlined.GetApp, // <- attribution, directly readable
|
|
77
|
+
onPreferenceClick = onClickDownloadQueue,
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`android_project_dir` is already a required input of this skill (Step 2 resolves the application module from it; Step 5 correlates library dependencies from it), so attribution adds no new input requirement.
|
|
82
|
+
|
|
83
|
+
## Extracting the Icon Inventory from `classes*.dex`
|
|
84
|
+
|
|
85
|
+
Read each `classes*.dex` at `<decoded_output_path>/` as raw bytes and match this pattern against the byte stream (the strings are plain ASCII inside the DEX string pool):
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
(AutoMirrored\.)?(Filled|Outlined|Rounded|Sharp|TwoTone)\.[A-Z_][A-Za-z0-9_]*
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Deduplicate across all dex files. Each unique match is one **icon reference**.
|
|
92
|
+
|
|
93
|
+
Notes:
|
|
94
|
+
|
|
95
|
+
- **The name must start with an uppercase letter or `_`.** Compose icon names are PascalCase, and digit-leading names carry a `_` prefix. Without this constraint the pattern also captures Kotlin source filenames that the compiler embeds as debug strings — `Outlined.kt`, `Filled.kt`, `Rounded.kt` fit the shape exactly. Such false positives do occur in real builds.
|
|
96
|
+
- `Icons.Default` is an alias of `Icons.Filled`, and `Icons.AutoMirrored.Default` of `Icons.AutoMirrored.Filled`. The string recorded in the dex is always the `Filled` form; no normalization is needed on the dex side (it *is* needed on the source side — see below).
|
|
97
|
+
- Names that begin with a digit are prefixed with `_` in Compose (`Icons.Filled._360`). Strip the leading `_` before name resolution.
|
|
98
|
+
- Do not silently drop a captured string that fails to resolve. Report it. A capture that resolves to nothing is either a false positive worth knowing about or a genuine gap in the snapshot.
|
|
99
|
+
|
|
100
|
+
When the decoded APK is unavailable (the Step 3 decode fell back to source `res/`), fall back to source-only extraction using the patterns in the next section, and record in the report that the inventory is source-derived and therefore may miss library-internal icon usage.
|
|
101
|
+
|
|
102
|
+
### When the icon library was not shrunk
|
|
103
|
+
|
|
104
|
+
The dex is authoritative for scope **only when R8 actually shrank the icon library**. When it did not, the entire `material-icons-extended` set is packaged and the dex inventory stops meaning "icons this app uses".
|
|
105
|
+
|
|
106
|
+
The signal is a large reference count that is almost entirely unattributed. An unshrunk build can carry thousands of dex references against a few dozen source-attributed ones — the overwhelming majority dex-only. Synthesizing artwork for all of them would write thousands of unused SVGs into `base/media/`.
|
|
107
|
+
|
|
108
|
+
When the reference count is at or above 300 **and** at least 80% of references have no source attribution, treat the library as unshrunk:
|
|
109
|
+
|
|
110
|
+
- synthesize artwork only for source-attributed references (`--attributed-only`),
|
|
111
|
+
- still emit an inventory and mapping row for every other reference, with `mapping_kind = unmappable` and reason `packaged by an unshrunk icon library; not referenced by application code`,
|
|
112
|
+
- state the situation in the report.
|
|
113
|
+
|
|
114
|
+
This is a deliberate trade-off, not a failure: the rows are all still there, so nothing is silently omitted, and the output stays proportionate to what the application actually renders.
|
|
115
|
+
|
|
116
|
+
## Extracting Screen Attribution from Android Source
|
|
117
|
+
|
|
118
|
+
Grep `.kt` files under `android_project_dir` for:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Icons\.(AutoMirrored\.)?(Filled|Outlined|Rounded|Sharp|TwoTone|Default)\.[A-Z_][A-Za-z0-9_]*
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Normalize `Default` → `Filled` so source matches join cleanly against dex matches.
|
|
125
|
+
|
|
126
|
+
Attribute each match to a screen using this evidence priority — the same best-effort discipline as `references/resource-mapping-rules.md` §6:
|
|
127
|
+
|
|
128
|
+
1. **Enclosing composable.** The nearest preceding `fun <Name>(` declaration in the file. If that name ends in `Screen`, `Page`, `Tab`, or `Dialog`, use it directly.
|
|
129
|
+
2. **File name.** `MoreScreen.kt` → `MoreScreen`.
|
|
130
|
+
3. **Shared widget.** If the enclosing composable is a reusable widget referenced from several screens, record the known screens, or `Common` when the list is too broad to be useful.
|
|
131
|
+
4. **No evidence.** `Unknown`.
|
|
132
|
+
|
|
133
|
+
Then propose a HarmonyOS page name the same way `references/lottie-conversion-rules.md` does: strip the `Screen` / `Activity` / `Fragment` / `Tab` suffix and append `Page` (`MoreScreen` → `MorePage`). Record it in `notes` as `page=<PageName>` and mark it as a suggestion to verify against the actual ArkUI pages.
|
|
134
|
+
|
|
135
|
+
An icon that appears in the dex but has **no** source match is still a required row. Record `Screen(s) = Unknown` and note `dex-only; no source reference found (likely used by a library)`.
|
|
136
|
+
|
|
137
|
+
## Resolving an Icon Name to Upstream Artwork
|
|
138
|
+
|
|
139
|
+
The Compose icon set is generated from the classic Material Icons in `google/material-design-icons`. The mapping is a pure string transform plus one index lookup.
|
|
140
|
+
|
|
141
|
+
### Step 1 — name transform
|
|
142
|
+
|
|
143
|
+
Strip any leading `_`, then split on **case boundaries only** and lowercase:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
(?<=[a-z0-9])(?=[A-Z]) -> _ aB -> a_B
|
|
147
|
+
(?<=[A-Z])(?=[A-Z][a-z]) -> _ ABc -> A_Bc
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Do not split on digit boundaries.** Upstream has no consistent rule there, and any fixed rule gets a batch of names wrong:
|
|
151
|
+
|
|
152
|
+
| Compose name | Material name | A digit rule would produce |
|
|
153
|
+
|---|---|---|
|
|
154
|
+
| `Filter1` | `filter_1` | — (needs the split) |
|
|
155
|
+
| `Co2` | `co2` | `co_2` ✗ |
|
|
156
|
+
| `Rotate90DegreesCcw` | `rotate_90_degrees_ccw` | — (needs the split) |
|
|
157
|
+
| `StarPurple500` | `star_purple500` | `star_purple_500` ✗ |
|
|
158
|
+
| `Grid3x3` | `grid_3x3` | `grid_3_x_3` ✗ |
|
|
159
|
+
| `Crop169` | `crop_16_9` | `crop_169` ✗ |
|
|
160
|
+
| `_3dRotation` | `3d_rotation` | `3_d_rotation` ✗ |
|
|
161
|
+
|
|
162
|
+
### Step 2 — three-stage lookup
|
|
163
|
+
|
|
164
|
+
Resolve the transformed name against the index in this order. Every stage is deterministic.
|
|
165
|
+
|
|
166
|
+
1. **Exact match.** `GetApp` → `get_app`, present in the index. Covers the large majority.
|
|
167
|
+
2. **Underscore-insensitive match.** Compare after deleting every `_` on both sides. This absorbs the entire digit-boundary problem in one rule: `crop169` matches `crop_16_9`, `grid3x3` matches `grid_3x3`, `filter1` matches `filter_1`, `starpurple500` matches `star_purple500`, `3drotation` matches `3d_rotation`. Measured across the upstream index, 2208 of 2209 names remain unique after deleting underscores; the single collision (`add_chart` / `addchart`, a legacy upstream duplicate) is already settled by stage 1, and otherwise breaks ties lexicographically.
|
|
168
|
+
3. **Alias table.** A few icons were renamed upstream while Compose kept the old name. Only entries verified against the index belong here — never guess:
|
|
169
|
+
|
|
170
|
+
| Compose name | Upstream name |
|
|
171
|
+
|---|---|
|
|
172
|
+
| `Motorcycle` | `two_wheeler` |
|
|
173
|
+
| `LeaveBagsAtHome` | `no_luggage` |
|
|
174
|
+
|
|
175
|
+
Anything still unresolved after stage 3 becomes an `unmappable` row. Do not invent artwork.
|
|
176
|
+
|
|
177
|
+
In practice stage 1 resolves the vast majority of icon references, stage 2 nearly all of the rest, and the alias table the occasional remainder.
|
|
178
|
+
|
|
179
|
+
### Step 3 — category lookup
|
|
180
|
+
|
|
181
|
+
The upstream repository stores icons at `src/<category>/<name>/<style_dir>/24px.svg`, and the category is not derivable from the name. Build a `name → category` index once from `update/current_versions.json`, whose keys have the form `<category>::<name>`.
|
|
182
|
+
|
|
183
|
+
**Exclude the `symbols` category.** That key namespace is the parallel *Material Symbols* set, which lives at `symbols/web/<name>/...` with a different on-disk layout. It duplicates nearly every classic icon name, so leaving it in makes every single lookup ambiguous and can produce paths that do not exist in `src/`.
|
|
184
|
+
|
|
185
|
+
After excluding `symbols`, a name that still maps to more than one category is a genuine ambiguity: pick the first in lexicographic order for determinism and record the alternatives in `notes`.
|
|
186
|
+
|
|
187
|
+
### Step 4 — style directory
|
|
188
|
+
|
|
189
|
+
| Compose style | Upstream directory | Filename suffix |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| `Filled` (and `Default`) | `materialicons` | `filled` |
|
|
192
|
+
| `Outlined` | `materialiconsoutlined` | `outlined` |
|
|
193
|
+
| `Rounded` | `materialiconsround` | `round` |
|
|
194
|
+
| `Sharp` | `materialiconssharp` | `sharp` |
|
|
195
|
+
| `TwoTone` | `materialiconstwotone` | `twotone` |
|
|
196
|
+
|
|
197
|
+
`AutoMirrored` is **not** a style. `AutoMirrored.Outlined.Label` and a hypothetical `Outlined.Label` resolve to the same upstream file.
|
|
198
|
+
|
|
199
|
+
### Step 5 — assemble
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
src/<category>/<material_name>/<style_dir>/24px.svg
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Worked examples from the Mihon More screen:
|
|
206
|
+
|
|
207
|
+
| Compose reference | Upstream path |
|
|
208
|
+
|---|---|
|
|
209
|
+
| `Outlined.GetApp` | `src/action/get_app/materialiconsoutlined/24px.svg` |
|
|
210
|
+
| `AutoMirrored.Outlined.Label` | `src/action/label/materialiconsoutlined/24px.svg` |
|
|
211
|
+
| `Outlined.QueryStats` | `src/editor/query_stats/materialiconsoutlined/24px.svg` |
|
|
212
|
+
| `Outlined.Storage` | `src/device/storage/materialiconsoutlined/24px.svg` |
|
|
213
|
+
| `Outlined.CloudOff` | `src/file/cloud_off/materialiconsoutlined/24px.svg` |
|
|
214
|
+
| `Filled.VolunteerActivism` | `src/maps/volunteer_activism/materialicons/24px.svg` |
|
|
215
|
+
|
|
216
|
+
### Snapshot pinning
|
|
217
|
+
|
|
218
|
+
The artwork source MUST be a pinned snapshot, not a moving branch. Reproducibility is the whole point of Step 2 resource patches: two runs of the same commit must produce byte-identical output. Record the pinned ref in the report and in the mapping document metadata.
|
|
219
|
+
|
|
220
|
+
**The default is `--fetch`: artwork is downloaded from a pinned upstream commit at run time.** The pin is what makes the run reproducible — never point the tool at a moving branch.
|
|
221
|
+
|
|
222
|
+
This carries one operational requirement worth recording in the run environment: **the machine needs network access to `raw.githubusercontent.com`**. A network-isolated runner (a hardened container, an offline test bench) will fail this step. Two consequences follow, and both should be handled by reporting rather than by silently degrading:
|
|
223
|
+
|
|
224
|
+
- the step exits non-zero and the icons are recorded as `unmappable` with reason `icon snapshot unavailable`;
|
|
225
|
+
- the `res/` conversion is unaffected and still valuable, so the run continues.
|
|
226
|
+
|
|
227
|
+
For such environments, `--snapshot <dir>` reads a local copy instead. It does not need the whole upstream repository — the clone is dominated by PNG exports, the Android XML tree, and the Material Symbols tree, none of which this skill reads. Only these are required (measured at commit `50f0603`: 10,751 files, 5.4 MB):
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
<material_icon_snapshot_dir>/
|
|
231
|
+
update/current_versions.json # the name -> category index
|
|
232
|
+
src/<category>/<name>/<style_dir>/24px.svg
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Record which upstream commit the copy was taken from.
|
|
236
|
+
|
|
237
|
+
## HarmonyOS Target Path and Filename
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
<ui_module>/src/main/resources/base/media/ic_<material_name>_<style_suffix>.svg
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**The style suffix is mandatory.** In the classic Material Icons set, `Outlined.X` is sometimes different artwork from `Filled.X` and sometimes byte-identical:
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
bookmark filled d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"
|
|
247
|
+
bookmark outlined d="M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z" <- differs
|
|
248
|
+
favorite filled / outlined <- identical
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Naming by bare `ic_<name>.svg` therefore silently drops one of the two whenever they differ. Always include the style. Keeping the byte-identical duplicates costs a few hundred bytes each and keeps the naming rule free of special cases.
|
|
252
|
+
|
|
253
|
+
`AutoMirrored` is **not** part of the filename — it is a property of the *reference*, handled at the component level (next section). So `AutoMirrored.Filled.KeyboardArrowLeft` and `Filled.KeyboardArrowLeft` correctly share one file.
|
|
254
|
+
|
|
255
|
+
**Collision with a `res/`-derived media file.** If the target filename already exists in the HarmonyOS output because a real Android drawable produced it, append `_material` (`ic_settings_outlined_material.svg`) and record both the collision and the rename in `notes`. Never overwrite a `res/`-derived asset.
|
|
256
|
+
|
|
257
|
+
## SVG Post-Processing
|
|
258
|
+
|
|
259
|
+
The upstream files are already 24×24 SVG with `viewBox="0 0 24 24"`, so no geometry transform is required. Apply exactly two transforms:
|
|
260
|
+
|
|
261
|
+
1. **Remove the no-op guard path.** Upstream files open with a transparent bounding rectangle that carries no visual information:
|
|
262
|
+
|
|
263
|
+
```xml
|
|
264
|
+
<path d="M0 0h24v24H0V0z" fill="none"/>
|
|
265
|
+
<path d="M0 0h24v24H0z" fill="none"/> <!-- variant -->
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Both variants are removed.
|
|
269
|
+
|
|
270
|
+
2. **Do not inject `fill`.** The remaining path deliberately carries no `fill` attribute. That matches Compose semantics, where the icon is tinted at the use site by `LocalContentColor`; on HarmonyOS the equivalent is `Image($r('app.media.…')).fillColor('#666666')`. Injecting a hard-coded `fill` here is the same defect that `references/xml-drawable-to-svg-rules.md` calls `FILL_INJECTED`, reached from a different source.
|
|
271
|
+
|
|
272
|
+
Keep `viewBox`, `width`, and `height` as upstream emits them.
|
|
273
|
+
|
|
274
|
+
## AutoMirrored and Right-to-Left
|
|
275
|
+
|
|
276
|
+
HarmonyOS qualifier directories have no left-to-right / right-to-left dimension — the qualifier order is `MCC_MNC-language_script_country/region-orientation-device-colormode-density`. Mirroring therefore **cannot** be expressed as a resource variant the way Android's `-ldrtl` does.
|
|
277
|
+
|
|
278
|
+
Handle it at the component level in ArkUI and record the requirement so the developer does not lose it:
|
|
279
|
+
|
|
280
|
+
- set `auto_mirrored = true` on the mapping record,
|
|
281
|
+
- write `AutoMirrored: mirror horizontally under right-to-left locales` into `notes`.
|
|
282
|
+
|
|
283
|
+
Do not emit a second, pre-mirrored SVG file. A pre-mirrored asset would have to be selected by code anyway, and it doubles the assets for no gain.
|
|
284
|
+
|
|
285
|
+
## Report and Mapping Requirements
|
|
286
|
+
|
|
287
|
+
### Conversion report
|
|
288
|
+
|
|
289
|
+
Add a dedicated section (see SKILL.md Step 7 for its position):
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
### Code-Defined Vector Icons
|
|
293
|
+
|
|
294
|
+
| Compose Reference | Material Name | Style | HarmonyOS Target | Host Screen(s) | Suggested Page | Notes |
|
|
295
|
+
|---|---|---|---|---|---|---|
|
|
296
|
+
| Icons.Outlined.GetApp | get_app | Outlined | base/media/ic_get_app_outlined.svg | MoreScreen | MorePage | |
|
|
297
|
+
| Icons.AutoMirrored.Outlined.Label | label | Outlined | base/media/ic_label_outlined.svg | MoreScreen | MorePage | AutoMirrored: mirror under RTL |
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
and these summary counters:
|
|
301
|
+
|
|
302
|
+
- Code-defined icon references found (dex)
|
|
303
|
+
- Resolved to upstream artwork
|
|
304
|
+
- Unresolved (recorded as unmappable)
|
|
305
|
+
- Distinct media files written
|
|
306
|
+
- AutoMirrored references
|
|
307
|
+
- Screen-attributed / `Unknown`
|
|
308
|
+
|
|
309
|
+
### Mapping document
|
|
310
|
+
|
|
311
|
+
Every icon reference gets one inventory row and one mapping row.
|
|
312
|
+
|
|
313
|
+
- **`android_resource_path`** — use `<source file>#Icons.<Style>.<Name>` when a source reference was found (e.g. `app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt#Icons.Outlined.GetApp`); otherwise `classes.dex#Icons.<Style>.<Name>`.
|
|
314
|
+
- **`android_resource_name`** — the material snake_case name (`get_app`).
|
|
315
|
+
- **`function`** — describe the role from the host row's label when known (`Download queue row icon`), otherwise a conservative fallback (`Material icon used in code`).
|
|
316
|
+
- **`screens`** — per the attribution rules above; `Unknown` when dex-only.
|
|
317
|
+
- **`source_category`** — `third-party-library`, with `notes` naming `androidx.compose.material:material-icons-extended`. These icons are library-provided; they are not application `res/` assets.
|
|
318
|
+
- **`type_category`** — `drawable`. Do not invent a new top-level type category.
|
|
319
|
+
- **`mapping_kind`** — `code-vector synthesized`, or `unmappable` when unresolved.
|
|
320
|
+
- **`notes`** — MUST record the upstream path and the pinned snapshot ref, so a reviewer can verify the artwork.
|
|
321
|
+
|
|
322
|
+
**Hard requirement:** never silently omit a code-defined icon reference. This is the same rule as §13 of `references/resource-mapping-rules.md`, and it is the rule whose absence caused the whole class of defects this document exists to fix.
|
|
323
|
+
|
|
324
|
+
## Fallbacks and Out-of-Scope Cases
|
|
325
|
+
|
|
326
|
+
| Situation | Handling |
|
|
327
|
+
|---|---|
|
|
328
|
+
| Name captured from dex does not resolve in the index | Emit the row with `harmony_target = N/A`, `mapping_kind = unmappable`, reason `not found in Material Icons index`. **Never invent artwork.** |
|
|
329
|
+
| Snapshot unavailable (no vendored copy, no network) | Emit every icon row as `unmappable` with reason `icon snapshot unavailable`, and state it prominently in the report. Do **not** fail the whole conversion — the `res/` conversion is still valuable. |
|
|
330
|
+
| `android_project_dir` unavailable or unreadable | Inventory still comes from the dex; set every `screens` to `Unknown` and note the limitation. |
|
|
331
|
+
| Decode failed, only source `res/` available | Extract from source `.kt` only; note that library-internal icon usage may be missing. |
|
|
332
|
+
| App-defined `ImageVector` built by hand in application code | **Out of scope.** Detect via `ImageVector.Builder` in application source, record as `unmappable` with reason `app-defined ImageVector, no upstream artwork`, and list it in the report so the developer redraws it manually. |
|
|
333
|
+
| Non-Material code icon libraries (e.g. a third-party Compose icon pack) | Out of scope for artwork. Record the references as `unmappable` with the library name in `notes` so the gap is visible. |
|
|
334
|
+
|
|
335
|
+
The last three rows matter: this document narrows a known blind spot, it does not close it completely. Anything it cannot resolve must become a visible row, never a silent omission.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# Incremental Page Migration
|
|
2
|
+
|
|
3
|
+
Incrementally migrate resources for a **specific Android page/screen** to a HarmonyOS project: only migrate the resources that page actually uses; skip resources already present in the HarmonyOS project; leave resources that can't be reliably judged unmigrated and output them to the migration report for manual review.
|
|
4
|
+
|
|
5
|
+
The process has five major phases:
|
|
6
|
+
|
|
7
|
+
1. **Input** — page source code (layout XML / Compose source, or a fuzzy screen description) + optional APK.
|
|
8
|
+
2. **Candidate list generation** — Module A recursively resolves page references (`extract_page_resources.ts`); Module B unpacks the APK (`a2h-resource`) to fill in third-party library resources.
|
|
9
|
+
3. **Filtering** — compare against the HarmonyOS project to exclude already-migrated resources, producing a final migration list; mark uncertain items as excluded.
|
|
10
|
+
4. **Migration execution** — `a2h_resource_incremental.ts` reuses the full converter `a2h_resource_convert.ts` (the canonical converter of this skill).
|
|
11
|
+
5. **Output report** — generated by toolchain step 4's `--docs-only`, same format as the full-mode report.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
| Variable | Required | Description | Common aliases |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| `android_project_dir` | Yes | Android project root (contains `build.gradle(.kts)`); source res path and page file source | "Android project" |
|
|
18
|
+
| `page_files` | No* | Source files for the page: `layout/*.xml` or Compose `.kt` (can pass `page_dir`). The user may also give only a fuzzy screen description (e.g., "home page" / "settings screen"), in which case you read the source to locate it | "page layout", "HomeActivity", "home screen", "settings page" |
|
|
19
|
+
| `harmony_project_dir` | Yes | Target HarmonyOS project (already initialized). Migration results go to `<ui-module>/src/main/resources/` | "HarmonyOS project", "target project" |
|
|
20
|
+
| `apk_path` | No | APK corresponding to the page. When provided, use `a2h-resource` to decode and obtain the full res (including third-party AAR library resources) | "APK path", "apk" |
|
|
21
|
+
|
|
22
|
+
**Rule for missing parameters: always ask the user — never guess.** `android_project_dir` and `harmony_project_dir` are mandatory — if the user hasn't provided them, ask directly. Do not scan the disk, guess common directories, or infer paths from context. The only exception: `page_files` may be given as a fuzzy screen description (or not given at all), in which case follow the "page location" process below to read the source, determine the files, and confirm with the user.
|
|
23
|
+
|
|
24
|
+
`ui_module` is parsed from the HarmonyOS project's `build-profile.json5`; default is `entry`. For layered projects like `products/phone`, do not hardcode `entry`.
|
|
25
|
+
|
|
26
|
+
> **Multi-module projects**: `res_dir` is not a single directory. In Android projects with multiple local modules (e.g., `app` + `common` + `ui` + `i18n`...), resources are merged at build time. Resources referenced by the `app` page may be defined in **any module's** `src/main/res`. Pass **all** local module res directories via `--res`. **Priority for same-named resources is order-independent**: `extract_page_resources.ts` automatically detects the module applying `com.android.application` (the app module) and forces it to the front; other modules keep their argument order — matching Android's build-time merge semantics where the app module's resources take precedence over library modules. The app-side definition of same-named strings/colors/drawables always wins.
|
|
27
|
+
|
|
28
|
+
## Toolchain (mandatory)
|
|
29
|
+
|
|
30
|
+
**Do not write conversion scripts yourself.** The incremental page mode reuses the skill's canonical converter `scripts/a2h_resource_convert.ts` (same as full mode). This mode is only responsible for "discovery + filtering + attribution."
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Step 1. Module A: recursively resolve page resource references → candidate list
|
|
34
|
+
# --res can be specified multiple times: pass all local module res dirs (app module auto-detected and prioritized, order-independent)
|
|
35
|
+
# --candidates-jetpack-icon: if the page uses Jetpack Compose inline vector icons (Icons.Outlined.xxx etc.),
|
|
36
|
+
# this parameter is required to output icon candidates. Without it, icons will be silently skipped.
|
|
37
|
+
node <skill_dir>/scripts/extract_page_resources.ts \
|
|
38
|
+
--res <app_module_res_dir> --res <other_module_res_dir> ... \
|
|
39
|
+
--layout <page_layout.xml> ... # can be multiple; or --page-dir <dir> to scan a directory
|
|
40
|
+
--source <page_compose.kt> ... # can be multiple
|
|
41
|
+
--candidates-jetpack-icon <work>/candidates_jetpack_icon.json \
|
|
42
|
+
--out <work>/candidates.json
|
|
43
|
+
|
|
44
|
+
# Step 2. Modules C+D+E: filter (already-migrated check) → migrate → produce scratch artifacts
|
|
45
|
+
# The candidate list carries its own source directories; --res can be omitted (only for legacy format display)
|
|
46
|
+
# If Jetpack icon candidates exist, add --candidates-jetpack-icon and --icon-fetch (or --icon-snapshot)
|
|
47
|
+
node <skill_dir>/scripts/a2h_resource_incremental.ts \
|
|
48
|
+
--candidates <work>/candidates.json \
|
|
49
|
+
--harmony <harmony_project_dir> \
|
|
50
|
+
--ui-module <ui_module> \
|
|
51
|
+
--work <work>
|
|
52
|
+
# --candidates-jetpack-icon <work>/candidates_jetpack_icon.json # if Jetpack icons exist
|
|
53
|
+
# --icon-fetch # fetch icon graphics from upstream
|
|
54
|
+
# --icon-snapshot <dir> # or use a local snapshot
|
|
55
|
+
# --converter <path/to/a2h_resource_convert.ts> # defaults to this skill's scripts/
|
|
56
|
+
# --records <work>/records.json # optional, machine-readable audit JSON
|
|
57
|
+
# --fidelity-converter <path/to/svg_fidelity_check.ts> # defaults to this skill's scripts/
|
|
58
|
+
# --app-module <module> # Android application module name (default: app)
|
|
59
|
+
|
|
60
|
+
# Step 3. Vector graphic fidelity check (optional; stops the entire flow on error)
|
|
61
|
+
# Performs SVG semantic fidelity check on scratch conversion artifacts to ensure
|
|
62
|
+
# <vector>/<shape>/<layer-list> → SVG output matches the original.
|
|
63
|
+
node <skill_dir>/scripts/svg_fidelity_check.ts \
|
|
64
|
+
--android-res <work>/staged \
|
|
65
|
+
--harmony-media <work>/scratch/<ui_module>/src/main/resources/base/media \
|
|
66
|
+
--json <work>/fidelity.json
|
|
67
|
+
|
|
68
|
+
# Step 4. Generate documentation (reconstructed from step 2 records + step 3 fidelity, same as full mode)
|
|
69
|
+
# Outputs two reports: an English conversion report + an English per-resource mapping document.
|
|
70
|
+
# Uses the same command as full-mode `a2h_resource_convert.ts --docs-only`, same output format.
|
|
71
|
+
node <skill_dir>/scripts/a2h_resource_convert.ts --docs-only \
|
|
72
|
+
--records <work>/scratch_records.json \
|
|
73
|
+
--fidelity-json <work>/fidelity.json \
|
|
74
|
+
--apk <apk_path> \
|
|
75
|
+
--report <work>/converter_report.md \
|
|
76
|
+
--mapping <work>/converter_mapping.md \
|
|
77
|
+
--harmony <harmony_project_dir> \
|
|
78
|
+
--app-module app
|
|
79
|
+
# --icons-json <work>/icon_records.json # if Jetpack icon candidates exist, append this
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Script responsibility boundaries:**
|
|
83
|
+
|
|
84
|
+
- `extract_page_resources.ts` handles **reference discovery**: layout attributes, `<include>`/`<ViewStub>`, DataBinding `@{...}`, `@style` and parent chains, drawable/layout internal nested references, Compose `R.type.name`; continues until the reference closure is reached. `@android:` system resources and `?attr/` theme attributes are registered separately and not migrated.
|
|
85
|
+
- `a2h_resource_incremental.ts` handles **filtering + migration**: stages candidates into a filtered res tree → runs the canonical converter in scratch → compares each artifact against the HarmonyOS project (already-migrated check) → only writes back items pending migration. **Does not generate reports** — reports are produced uniformly by step 4's `--docs-only`.
|
|
86
|
+
- **You (the agent)** are responsible for: parsing inputs, **reading source to locate the page** (when the user gives only a fuzzy screen description), determining `<res_dir>` and `ui_module`, reading script outputs and handling exceptions, and writing a Chinese summary for the caller.
|
|
87
|
+
|
|
88
|
+
## Workflow
|
|
89
|
+
|
|
90
|
+
### Step 1: Parse Inputs
|
|
91
|
+
|
|
92
|
+
1. **Validate both project paths**: `android_project_dir` and `harmony_project_dir`. **If the user hasn't provided them, ask directly — don't scan the disk, guess common directories, or infer paths from context.** Other missing parameters should also be asked directly.
|
|
93
|
+
2. Once `harmony_project_dir` is obtained, parse `ui_module` from `build-profile.json5` (default: `entry`).
|
|
94
|
+
3. **Page location**: determine `page_files` (which page's resources to migrate). Three scenarios:
|
|
95
|
+
- The user gave explicit page files/directories → use them directly.
|
|
96
|
+
- The user gave a **fuzzy screen description** (e.g., "migrate the resources for the settings screen") → follow the "read source to locate the page" process below.
|
|
97
|
+
- The user gave nothing → first survey the project's pages via the "read source to locate the page" process, present candidates to the user for confirmation. If truly unable to locate, ask the user for the page file path.
|
|
98
|
+
|
|
99
|
+
#### Page Location: Read Source, Understand Functionality — Don't Just Match Filenames
|
|
100
|
+
|
|
101
|
+
The user likely won't provide layout filenames — they'll describe functionality (e.g., "main screen", "game settings", "my profile page"). Your task is to map the functional description to actual pages — **prefer using HomeGraph to analyze the project** (symbol indexing can accurately map descriptions to classes, then trace the call chain to find all related files). **Reading code manually is only a fallback when HomeGraph is unavailable.** Both paths produce the same output: a mapping from "page name → layout/Compose files + business files + related pages."
|
|
102
|
+
|
|
103
|
+
##### Primary Flow: HomeGraph Analysis (preferred, always try first)
|
|
104
|
+
|
|
105
|
+
**Don't skip HomeGraph because you "want to read the code more directly"** — even if the project doesn't have an index, build one first and use it, rather than jumping straight to manual code reading.
|
|
106
|
+
|
|
107
|
+
1. **Ensure the index is available**:
|
|
108
|
+
```bash
|
|
109
|
+
homegraph status <android_project_dir> # already indexed → proceed
|
|
110
|
+
homegraph init <android_project_dir> # not initialized/expired → build index
|
|
111
|
+
# or homegraph sync <android_project_dir> # incremental update
|
|
112
|
+
```
|
|
113
|
+
2. **Chinese description → resource key (grep for deterministic translation)**: HomeGraph matches **English symbol names, file paths, and comments** — not Chinese. Chinese UI text lives in `res/values*/strings.xml`. Grep for description keywords to find the resource key:
|
|
114
|
+
```
|
|
115
|
+
rg "Main screen|Settings|Me" <android_project_dir>/**/res/values*/strings.xml
|
|
116
|
+
# → <string name="settings_title">Settings</string> → key: settings_title
|
|
117
|
+
```
|
|
118
|
+
If grep finds nothing: use the description's Chinese pinyin / English fragments with `homegraph query`, or list candidates for common naming patterns (`Home`, `Main`, `Index`, `Setting`...).
|
|
119
|
+
3. **key → page class (HomeGraph reverse lookup)**:
|
|
120
|
+
```
|
|
121
|
+
homegraph query -p <android_project_dir> "settings_title" # find symbol locations
|
|
122
|
+
homegraph explore -p <android_project_dir> "settings_title" # reverse-lookup callers + source
|
|
123
|
+
```
|
|
124
|
+
Classes referencing `R.string.settings_title` (or the literal) are page candidates.
|
|
125
|
+
4. **Read candidate class source + trace dependencies** (source returned by HomeGraph is already read — no need to re-read the same file):
|
|
126
|
+
```bash
|
|
127
|
+
homegraph node -p <android_project_dir> -f <relative file path> # read full source by file
|
|
128
|
+
homegraph node -p <android_project_dir> SettingsActivity # look up by symbol name
|
|
129
|
+
homegraph callees -p <android_project_dir> "SettingsActivity.onCreate" # cross-file dependency chain
|
|
130
|
+
homegraph explore -p <android_project_dir> "SettingsActivity SettingsViewModel SettingsDialog" # pull entire call chain source at once
|
|
131
|
+
homegraph files -p <android_project_dir> --path <module directory> # module structure (multi-module location)
|
|
132
|
+
```
|
|
133
|
+
5. **When multiple candidates exist, don't choose yourself**: present the candidates to the user for confirmation before proceeding.
|
|
134
|
+
|
|
135
|
+
**If HomeGraph analysis is blocked** (index build fails, project structure not understood by HomeGraph, etc.), fall through to the backup flow below. Don't abandon HomeGraph just because one symbol lookup fails — try adjusting the query terms or file path first.
|
|
136
|
+
|
|
137
|
+
##### Backup Flow: Read Code Manually (only when HomeGraph is unavailable)
|
|
138
|
+
|
|
139
|
+
1. **Start with `AndroidManifest.xml`**: list registered Activities. The `android:label` attribute is often a clue to the screen's purpose (but don't trust it blindly — labels may be placeholders).
|
|
140
|
+
2. **Read the entry UI class** (`*Activity`, `*Fragment`, `@Composable` functions): examine the class body for UI structure, `setContentView(R.layout.…)`, `onCreateView`/`inflate` layouts, `@Composable` top-level functions, `setContent { … }`. Understand what this screen **actually displays and what function it serves** (navigation container, specific settings items, list detail, etc.).
|
|
141
|
+
3. **Match by function**: compare the user's description (e.g., "settings screen") with the screen's actual functionality, rather than looking for files with "setting" in the name — a class called `MineFragment` might actually be the settings entry point, while an `OptionsActivity` might just be a dialog. When necessary, trace `startActivity`/navigation calls (Navigation component, route table) to confirm the "description → page" path.
|
|
142
|
+
|
|
143
|
+
##### Shared by Both Flows: Categorize, Expand, Confirm
|
|
144
|
+
|
|
145
|
+
4. **Categorize by evidence** (common to both paths):
|
|
146
|
+
|
|
147
|
+
| Source Evidence | Category |
|
|
148
|
+
|---|---|
|
|
149
|
+
| `setContentView(R.layout.activity_x)`, `onCreateView`/`inflate(R.layout.x)`, ViewBinding/DataBinding class names | **Layout files** → `res/layout/xxx.xml` |
|
|
150
|
+
| Compose: top-level `@Composable` function + `setContent { … }`, `androidx.compose.material.icons` import | **Layout files** → the `.kt` file itself (Compose has no separate XML) |
|
|
151
|
+
| Activity/Fragment/ViewModel/Adapter/Presenter/Custom View classes | **Business files** → `.kt`/`.java` |
|
|
152
|
+
| `startActivity`, `findNavController().navigate`, route table navigation, `inflate` of other ViewStubs, instantiated Dialogs/Fragments, `<include>`/custom View tags in XML | **Related pages/components** → recursively expand to their own layout + business files |
|
|
153
|
+
|
|
154
|
+
5. **A single screen may span multiple files**: the Activity's layout + its embedded Fragment's layout + `<include>` child layouts + the Compose page's `.kt`. Collect all page files involved in that screen into `page_files` (the extractor's recursive resolution will fill in child layout dependencies via include/ViewStub).
|
|
155
|
+
6. **Expand related pages as needed**: for related pages/components identified in step 4, expand up to 5 levels by default (page → direct dependencies → their dependencies → ...). Stop at level 5; just list the names.
|
|
156
|
+
7. **Confirm with the user after locating the page** (especially when the description is vague or there are multiple candidates) before proceeding. Confirmation info: page name, corresponding layout/compose file paths, and module.
|
|
157
|
+
|
|
158
|
+
`page_files` will look like: `app/src/main/res/layout/activity_game.xml` (one or more), `ui/src/main/java/…/GameScreen.kt` (Compose page). Pass them to the extractor using `--layout` / `--source` (or `--page-dir`).
|
|
159
|
+
|
|
160
|
+
### Step 2: Determine Resource Source (Module B)
|
|
161
|
+
|
|
162
|
+
- If `apk_path` is provided: install `a2h-resource` once (`npm install -g a2h-resource`, pure Node, requires Node ≥ 20), run `a2h-resource <apk> -o <decoded>`; use `<decoded>/res/` as the sole `res_dir`, `resource_source = decoded_apk`.
|
|
163
|
+
- If not provided / decoding fails: enumerate **all local modules** under `<android_project_dir>` for `src/main/res/` (app module first, then the rest; also consider flavor source sets, e.g., `src/debug/res`). `resource_source = source_res`.
|
|
164
|
+
|
|
165
|
+
The value of decoding the APK is filling in third-party AAR library resources — resources referenced from source res but not found there will be marked "unresolved" in the candidate list and logged as risk items in the report. This is the "don't auto-migrate what can't be reliably judged" principle.
|
|
166
|
+
|
|
167
|
+
### Step 3: Generate Resource Candidate List (Module A)
|
|
168
|
+
|
|
169
|
+
Your responsibility in this step is to run `extract_page_resources.ts`. The script internally:
|
|
170
|
+
|
|
171
|
+
**3.1 Static Regular Resources**
|
|
172
|
+
|
|
173
|
+
Run `extract_page_resources.ts` (see toolchain) to get `candidates.json`. Each candidate includes `type/name/ref/origin/kind/resolved/sources`. Entries with `resolved=false` are resources that source res couldn't resolve (library resources, code-defined resources, etc.) — they **don't enter the migration flow** and go directly to the report.
|
|
174
|
+
|
|
175
|
+
**Important: If the page source uses Jetpack Compose inline vector icons (`Icons.Outlined.xxx` etc.), you must specify `--candidates-jetpack-icon <path>`. Otherwise, icon candidates won't be persisted to a separate file, and Step 4's icon migration will silently skip, leaving page icons missing.** Even if you don't plan to migrate icons right now, add this parameter — without it, icon candidates are only counted but not persisted, and Step 4 won't be able to obtain the icon manifest.
|
|
176
|
+
|
|
177
|
+
**Recursive resolution coverage** (implemented by the script; conversion rules reuse this skill's full-mode `references/`, do not rewrite):
|
|
178
|
+
|
|
179
|
+
- Layout XML: all `@type/name` attributes; `<include layout="@layout/x">`, `<ViewStub android:layout="@layout/x">` — recursively trace referenced layouts; DataBinding expressions `@{...}` with resource references.
|
|
180
|
+
- Compose source: `R.string.xxx`, `R.drawable.xxx` and other `R.type.name` string matches.
|
|
181
|
+
- Drawable / style / mipmap XML internal nested dependencies: `<vector fillColor="@color/x">`, `<style>` `<item>` references, style parent chains — until reference closure is reached (use a visited set to prevent cycles).
|
|
182
|
+
- Value entries whose value is `@type/name` (e.g., `<color name="a">@color/b</color>`): recursively include the referenced entry.
|
|
183
|
+
|
|
184
|
+
##### 3.2 Code-Defined Vector Icons (Jetpack Compose) Resources
|
|
185
|
+
|
|
186
|
+
If the project source is Jetpack Compose and the page uses `Icons.Outlined.xxx` / `Icons.Rounded.xxx` etc. — inline vector icons defined in code — you **must** add `--candidates-jetpack-icon <path>` to the `extract_page_resources.ts` command. Only then will the script output a separate `candidates_jetpack_icon.json` for Step 4. **Without this parameter, icon candidates are only counted but not persisted, and Step 4's icon migration will silently skip, resulting in blank icons on the page.**
|
|
187
|
+
|
|
188
|
+
Jetpack Compose icons come primarily from `androidx.compose.material:material-icons-core / -extended`, compiled as `ImageVector` objects into `classes*.dex` — they are **not in res/drawable or resources.arsc**. All res-based checks will succeed, but page icons will be blank — a silent defect.
|
|
189
|
+
|
|
190
|
+
The trigger condition: the gradle configuration includes `material-icons-core` / `material-icons-extended`, and the page's `.kt` source has `androidx.compose.material.icons` imports.
|
|
191
|
+
|
|
192
|
+
### Step 4: Filter + Execute Migration
|
|
193
|
+
|
|
194
|
+
Run `a2h_resource_incremental.ts` (see toolchain). The script internally:
|
|
195
|
+
|
|
196
|
+
**4.1 Stage**:
|
|
197
|
+
|
|
198
|
+
Build resolved candidates into a filtered res tree (value entries rebuilt per-entry as `<resources>`, files copied as-is, relative directory structure preserved). Same-name resources / same-name entries use source priority first-wins (app module first).
|
|
199
|
+
|
|
200
|
+
**4.2 Convert**:
|
|
201
|
+
|
|
202
|
+
**4.2.1 Static Regular Resources**
|
|
203
|
+
|
|
204
|
+
Run the canonical converter once on the staged tree in the scratch directory to produce the page's resource conversion artifacts (reuses all conversion rules: qualifier mapping, XML drawable → SVG, adaptive-icon → layered-image, values → element JSON, reference resolution).
|
|
205
|
+
|
|
206
|
+
**4.2.2 Code-Defined Vector Icons (Jetpack Compose) Resources**
|
|
207
|
+
|
|
208
|
+
If such resources exist, read `candidates_jetpack_icon.json` and invoke the script:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
node ./scripts/code_vector_icons.ts --dex <decoded_output_path> \
|
|
212
|
+
--android-src <android_project_dir> \
|
|
213
|
+
--out <harmony_project_dir>/<ui_module>/src/main/resources/base/media \
|
|
214
|
+
--snapshot <material_icon_snapshot_dir> \
|
|
215
|
+
--json <harmony_project_dir>/code_vector_icons.json
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`--android-src` is required. Debug APKs without R8/proguard stripping contain the full icon library in the dex — you must add `--attributed-only`, otherwise the script will refuse to batch-fetch tens of thousands of icons. `--fetch` is normal mode (network access to GitHub); use `--snapshot` for air-gapped networks. Exit code 1 means some references couldn't be resolved — these must be marked as unmappable, not dropped.
|
|
219
|
+
|
|
220
|
+
**4.3 Already-Migrated Check** (compare against the HarmonyOS project's existing `resources/`):
|
|
221
|
+
|
|
222
|
+
- File resources (png/json/svg…): target file exists and `hash + resource name` match → already migrated, skip.
|
|
223
|
+
- Value resources (string/float/color…): `value + resource name` match → already migrated, skip.
|
|
224
|
+
- Same name but different content/value → **conflict**, don't auto-overwrite, log to report.
|
|
225
|
+
- Resources with uncertainty, can't be reliably judged → remove from the migration list, **don't migrate**, flag for the report.
|
|
226
|
+
|
|
227
|
+
**4.4 Write Back**: only write artifacts determined as "pending migration" to the HarmonyOS project — for element JSON, **merge** entries into existing files (don't lose existing entries), for files, copy directly.
|
|
228
|
+
|
|
229
|
+
### Step 5: Output Migration Report
|
|
230
|
+
|
|
231
|
+
The report is generated uniformly by toolchain step 4's `--docs-only`, with the same output format as full mode. It includes two documents:
|
|
232
|
+
|
|
233
|
+
- **`converter_report.md`** (English, via `--report`) — aggregate report: summary statistics, qualifier mapping, reference resolution table, unmappable attribution, fidelity check results, code-defined icons, converter warnings, etc. See main SKILL.md Step 7.
|
|
234
|
+
- **`converter_mapping.md`** (English, via `--mapping`) — per-resource mapping document: each Android resource → HarmonyOS target, including source, owning page, mapping type, status, etc. See main SKILL.md Step 8.
|
|
235
|
+
|
|
236
|
+
Both documents are reconstructed from step 2's `scratch_records.json` and step 3's `fidelity.json`, and include fidelity check results, consistent with the full-mode report.
|
|
237
|
+
|
|
238
|
+
Your responsibility is to read `converter_report.md` and handle its findings (unresolved references, fidelity errors, target collisions, etc.) — **not to re-describe the report content or write your own report.**
|
|
239
|
+
|
|
240
|
+
## Relationship with Full Mode
|
|
241
|
+
|
|
242
|
+
- This mode is a **page-level incremental wrapper** around the full conversion: conversion capability reuses the same canonical converter, no duplicate implementation; the filtering rules (hash+name / value+name) are this mode's unique incremental semantics.
|
|
243
|
+
- Requests for "full APK res conversion" → use the full mode in the main SKILL.md.
|
|
244
|
+
- Full mode's `references/` (conversion rules, qualifier mapping, system resource table, SVG rules, etc.) also apply when reviewing this mode's migration artifacts. You can reference them for edge cases, but don't claim things the converter didn't do.
|
|
245
|
+
|
|
246
|
+
## Important Notes
|
|
247
|
+
|
|
248
|
+
- **Don't rewrite conversion rules.** All "Android resource → HarmonyOS resource" format conversion only happens in the canonical converter. This mode's scripts only do staging, comparison, merging, and copying.
|
|
249
|
+
- **Be strict with the already-migrated check**: same name but different value/content = conflict. It's better to skip than to overwrite — the HarmonyOS side may have been manually adjusted.
|
|
250
|
+
- **Value entry merging**: when writing back element JSON, preserve existing HarmonyOS entries and only append missing ones. Don't write conflicting same-name entries.
|
|
251
|
+
- Scripts use native strip-types to run TS; requires Node ≥ 22.18.
|