@buaa_smat/hometrans 26.0.4 → 26.0.5-devecocli.1

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.
Files changed (134) hide show
  1. package/agents/code-reviewer.md +2 -0
  2. package/agents/model-render-worker.md +1 -1
  3. package/devecocli-plugin/common.ts +2271 -0
  4. package/devecocli-plugin/content-resolver.ts +363 -0
  5. package/devecocli-plugin/install.ts +72 -0
  6. package/devecocli-plugin/uninstall.ts +26 -0
  7. package/devecocli-plugin/update.ts +77 -0
  8. package/i18n/agents/code-reviewer.md +2 -0
  9. package/i18n/agents/model-render-worker.md +1 -1
  10. package/i18n/skills/a2h-app-migrate/SKILL.md +51 -3
  11. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +140 -32
  12. package/i18n/skills/a2h-app-migrate/scripts/dag_graph.mjs +297 -0
  13. package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +134 -21
  14. package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +21 -4
  15. package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +3 -3
  16. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  17. package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +1 -1
  18. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +12 -5
  19. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +7 -8
  20. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -1
  21. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +27 -15
  22. package/i18n/skills/a2h-batch-ui-align/SKILL.md +1 -1
  23. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +4 -0
  24. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +36 -0
  25. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +4 -0
  26. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +4 -0
  27. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +3 -3
  28. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +8 -0
  29. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_in_linear.ts +164 -0
  30. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/self_drawn_sheet.ts +105 -0
  31. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/staggered_lanes.ts +127 -0
  32. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_size_constant.ts +114 -0
  33. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +4 -1
  34. package/i18n/skills/a2h-page-specgen/references/spec-example.md +35 -5
  35. package/i18n/skills/a2h-page-specgen/references/spec-template.md +4 -4
  36. package/i18n/skills/a2h-spec-generate/SKILL.md +3 -1
  37. package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +15 -3
  38. package/i18n/skills/a2h-spec-generate/references/review-checklist.md +1 -0
  39. package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +16 -0
  40. package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +16 -0
  41. package/i18n/skills/a2h-spec-generate/references/spec-samples.md +5 -1
  42. package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +21 -1
  43. package/i18n/skills/a2h-spec-generate/references/worker-rules.md +25 -2
  44. package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +121 -6
  45. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +2 -1
  46. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +3 -0
  47. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +16 -2
  48. package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +11 -2
  49. package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +35 -0
  50. package/index.js +1643 -0
  51. package/package.json +8 -8
  52. package/plugin.jsonc +12 -0
  53. package/skills/a2h-app-migrate/SKILL.md +53 -5
  54. package/skills/a2h-app-migrate/references/workflow.yaml +140 -32
  55. package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +226 -0
  56. package/skills/a2h-app-migrate/scripts/dag_graph.mjs +297 -0
  57. package/skills/a2h-app-migrate/scripts/dag_process_executor.mjs +199 -0
  58. package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +897 -0
  59. package/skills/a2h-app-migrate/scripts/dag_runner.mjs +1767 -0
  60. package/skills/a2h-app-migrate/scripts/ledger.mjs +15 -2
  61. package/skills/a2h-app-migrate/scripts/lib-yaml-lite.mjs +8 -2
  62. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -8
  63. package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +134 -21
  64. package/skills/a2h-app-migrate/test/test_dag_complete.mjs +222 -0
  65. package/skills/a2h-app-migrate/test/test_dag_production.mjs +670 -0
  66. package/skills/a2h-app-migrate/test/test_dag_runner.mjs +423 -0
  67. package/skills/a2h-app-migrate/test/test_finalize.mjs +21 -4
  68. package/skills/a2h-app-migrate/test/test_image_probe.mjs +1 -1
  69. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +16 -1
  70. package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +1 -1
  71. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +12 -5
  72. package/skills/a2h-arkts-logic-coder/SKILL.md +7 -8
  73. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -1
  74. package/skills/a2h-arkts-logic-coder/references/code-generation.md +27 -15
  75. package/skills/a2h-batch-ui-align/SKILL.md +1 -1
  76. package/skills/a2h-batch-ui-align/references/cards/widgets.md +4 -0
  77. package/skills/a2h-batch-ui-align/references/checker-rules.md +36 -0
  78. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +4 -0
  79. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +4 -0
  80. package/skills/a2h-batch-ui-align/references/step5-convert.md +3 -3
  81. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +49 -3
  82. package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +36 -0
  83. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +8 -0
  84. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
  85. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_in_linear.ts +164 -0
  86. package/skills/a2h-batch-ui-align/scripts/static_check/rules/self_drawn_sheet.ts +105 -0
  87. package/skills/a2h-batch-ui-align/scripts/static_check/rules/staggered_lanes.ts +127 -0
  88. package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_size_constant.ts +114 -0
  89. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_ds1123.test.mjs +433 -0
  90. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_in_linear.test.mjs +288 -0
  91. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +46 -0
  92. package/skills/a2h-page-specgen/references/scenario-authoring.md +4 -1
  93. package/skills/a2h-page-specgen/references/spec-example.md +35 -5
  94. package/skills/a2h-page-specgen/references/spec-template.md +4 -4
  95. package/skills/a2h-spec-generate/SKILL.md +3 -1
  96. package/skills/a2h-spec-generate/references/fusion-task-contract.md +15 -3
  97. package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
  98. package/skills/a2h-spec-generate/references/spec-sample-complex.md +16 -0
  99. package/skills/a2h-spec-generate/references/spec-sample-transfer.md +16 -0
  100. package/skills/a2h-spec-generate/references/spec-samples.md +5 -1
  101. package/skills/a2h-spec-generate/references/synthesis-rules.md +21 -1
  102. package/skills/a2h-spec-generate/references/worker-rules.md +25 -2
  103. package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +3 -1
  104. package/skills/a2h-spec-generate/scripts/check_spec.ts +262 -6
  105. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +12 -2
  106. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +3 -0
  107. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +16 -2
  108. package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +54 -3
  109. package/skills/a2h-spec-generate/test/check-spec.test.ts +247 -0
  110. package/README.md +0 -440
  111. package/dist/cli/config-store.js +0 -128
  112. package/dist/cli/config.js +0 -48
  113. package/dist/cli/editors.json +0 -114
  114. package/dist/cli/env-vars.js +0 -127
  115. package/dist/cli/index.js +0 -76
  116. package/dist/cli/init.js +0 -2618
  117. package/dist/cli/uninstall.js +0 -406
  118. package/dist/platform/compose.js +0 -228
  119. package/dist/platform/frontmatter.js +0 -151
  120. package/dist/platform/installer.js +0 -417
  121. package/dist/platform/language.js +0 -77
  122. package/dist/platform/registry.js +0 -337
  123. package/dist/platform/transform.js +0 -363
  124. package/dist/platform/types.js +0 -9
  125. package/dist/platform/validate.js +0 -152
  126. package/dist/utils/regex.js +0 -7
  127. package/env-requirements.json +0 -536
  128. package/resource/choose_editor.png +0 -0
  129. package/resource/convert_pipeline_process.svg +0 -114
  130. package/resource/project_architecture.svg +0 -120
  131. package/resource/set_environment.png +0 -0
  132. package/resource/set_multimodel.png +0 -0
  133. package/resource/set_sdk.png +0 -0
  134. package/resource/title_dark.png +0 -0
@@ -384,6 +384,8 @@ Fix every issue the review report lists, plus the Remaining Issues rows of `carr
384
384
 
385
385
  **Permissions are allowlisted.** A missing-permission finding is fixed in `module.json5` `requestPermissions` only with a name that appears in the pipeline's `references/permission-index.json` (`a2h-spec-design-pipeline`; read it, do not guess) **and** is not `"restricted": true` there. A name absent from the index (an invented or misspelled permission) or a restricted (ACL) permission is never written: list it under Remaining Issues as `permission <name>: not in permission-index` / `restricted (ACL) — needs a manual application`, exactly as B2's wiring step and F0 skip them. Append only; never rewrite or reorder the existing entries.
386
386
 
387
+ **A fix that adds or removes a visible element checks the Android render branch first.** A spec step such as "the bottom shows the load-more footer" can come from a ViewModel assignment that the Android UI never draws in that state. When `android_project_path` is available, before adding or removing a visible element, open the Android UI code for that state (the Compose `when (state)` / `if` branch, View `visibility`, the adapter's item types) and confirm the element is drawn there. If the Android branch does not draw it, do not change the code: list the row under Remaining Issues as `spec contradicts Android render: <spec step> vs <android file:line>`, so the spec is corrected instead of the app. Observed miss: a spec said an empty order tab "shows the pull-to-load initial state at the bottom" because the Android ViewModel sets `PullToLoad` on an empty first page; Android's `Empty` branch draws only `EmptyData`, the fix added the footer anyway, and every empty tab gained a "pull up to load more" line.
388
+
387
389
  **Do not revert a legitimate deviation.** A detail recorded in `commit-info.md`'s `## Spec 偏差` (search `<harmonyos_project_path>/.hometrans/spec_group_*/chunk_*/commit-info.md`) was filled from the Android source because the spec left it uncertain: when `android_project_path` is available, check the anchor and keep that behavior; change it only when the basis no longer holds (the anchor is unrelated, the spec actually settles the detail, or the report shows the implementation is wrong), and re-record the row when you do.
388
390
 
389
391
  ## Step F2 — Build Once
@@ -29,7 +29,7 @@ Rules:
29
29
  4. Copy `taskId` and `inputFingerprint` verbatim from `task.md` / `expected.json`. Every citation must be verified by reading the file with line numbers; never estimate an anchor. When evidence is insufficient, record it honestly instead of guessing, and never fabricate a citation.
30
30
  5. **Never write identity.** No `控件:<controlRef>` line and no `controlRef` field anywhere — submit structured `identityAnchor`/`identityAnchors` only; Node derives the final stable IDs. `controlGroupKey` is a local label, not an identity.
31
31
  6. You are the page owner: one user-visible flow = one area-owned SPEC, and every area SPEC needs a `dataFlow` row (entry, data sources, transforms, displayed values, persistence) plus a `pageCoverage` ledger assigning every `controlGroup`/`discovery` to an existing `specStem` or an explicit exclusion reason (R4/R8). Multiple `owner.kind: "area"` SPECs are allowed, one per flow; a duplicate controlGroup/discovery binding fails R7. Fabricated citations and promoted `unknown`/unresolved fields fail the self-check.
32
- 7. **Display-SPEC completeness (R6) and displayed-value derivations (R6a) are required, not optional**: after reconciling, re-check from source what the Area renders/displays exactly as task.md's R6 defines — including when the Area captured no interactions at all. Every numeric/text field states its source field, window, aggregation, rounding, sign and unit conversion. Never emit a behavior without a citation (R5).
32
+ 7. **Display-SPEC completeness (R6) and displayed-value derivations (R6a) are required, not optional**: after reconciling, re-check from source what the Area renders/displays exactly as task.md's R6 defines — including when the Area captured no interactions at all. Every numeric/text field states its source field, window, aggregation, rounding, sign and unit conversion, and the rule must determine exactly one result: when a different order gives a different number (round each operand then subtract vs subtract then round), when the rounding mode changes the value (half-up, truncation, negative halves), or when the time basis changes the slot (nearest series index vs floor, which timezone), write that choice out. List the fields one by one — never summarise several fields as "every record" or "each value", and never leave a field out because it shares a sentence with a neighbour. Attach one worked example to each derived numeric field (concrete input → concrete output); an example that disagrees with the rule, or a rule you cannot exemplify, means the derivation is not understood: reread the source and rewrite it. **R6b (state space)**: a page-flow SPEC writes `## 状态清单` between `## UI序列` and the first scenario, one row per state — `- <state>: <what the user sees>`. All eight states need a row: first frame, loading, success, empty data, insufficient data, failure, non-default locale, return after leaving. A state this page cannot reach still gets a row — `- Loading: not applicable (why)` — never omitted and never blank. Write the visible result, or "keeps the last successful data"; never "otherwise nothing updates". The first frame and the non-default locale carry the real literal. Never emit a behavior without a citation (R5).
33
33
  8. Run the self-check command `task.md` inlines — the spec skill's `check-fused-spec.mjs` (`check-fused-spec.mjs --run <run> --task <id> --reqgen-root <reqgen-root>`). It first runs `check-fusion`, which validates the fused draft and writes the validated `draft.json` beside your output (L1 mints no ids; the canonical `controlRef` is resolved at global L2 from the anchors), then validates every SPEC your `specs[]` declares. Fix every reported error and re-run it. The task is complete only when that command reports the draft and all SPECs valid.
34
34
  9. Do not spawn subagents or nested tasks.
35
35
  10. Do not run Gradle, Android Lint, adb, emulators, or any build tool.