@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.
- package/agents/code-reviewer.md +2 -0
- package/agents/model-render-worker.md +1 -1
- package/devecocli-plugin/common.ts +2271 -0
- package/devecocli-plugin/content-resolver.ts +363 -0
- package/devecocli-plugin/install.ts +72 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +77 -0
- package/i18n/agents/code-reviewer.md +2 -0
- package/i18n/agents/model-render-worker.md +1 -1
- package/i18n/skills/a2h-app-migrate/SKILL.md +51 -3
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +140 -32
- package/i18n/skills/a2h-app-migrate/scripts/dag_graph.mjs +297 -0
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +134 -21
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +21 -4
- package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +3 -3
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +1 -1
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +12 -5
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +7 -8
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -1
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +27 -15
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +1 -1
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +4 -0
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +36 -0
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +4 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +4 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +3 -3
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +8 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_in_linear.ts +164 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/self_drawn_sheet.ts +105 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/staggered_lanes.ts +127 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_size_constant.ts +114 -0
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +4 -1
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +35 -5
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +4 -4
- package/i18n/skills/a2h-spec-generate/SKILL.md +3 -1
- package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +15 -3
- package/i18n/skills/a2h-spec-generate/references/review-checklist.md +1 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +16 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +16 -0
- package/i18n/skills/a2h-spec-generate/references/spec-samples.md +5 -1
- package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +21 -1
- package/i18n/skills/a2h-spec-generate/references/worker-rules.md +25 -2
- package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +121 -6
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +2 -1
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +3 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +16 -2
- package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +11 -2
- package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +35 -0
- package/index.js +1643 -0
- package/package.json +8 -8
- package/plugin.jsonc +12 -0
- package/skills/a2h-app-migrate/SKILL.md +53 -5
- package/skills/a2h-app-migrate/references/workflow.yaml +140 -32
- package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +226 -0
- package/skills/a2h-app-migrate/scripts/dag_graph.mjs +297 -0
- package/skills/a2h-app-migrate/scripts/dag_process_executor.mjs +199 -0
- package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +897 -0
- package/skills/a2h-app-migrate/scripts/dag_runner.mjs +1767 -0
- package/skills/a2h-app-migrate/scripts/ledger.mjs +15 -2
- package/skills/a2h-app-migrate/scripts/lib-yaml-lite.mjs +8 -2
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -8
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +134 -21
- package/skills/a2h-app-migrate/test/test_dag_complete.mjs +222 -0
- package/skills/a2h-app-migrate/test/test_dag_production.mjs +670 -0
- package/skills/a2h-app-migrate/test/test_dag_runner.mjs +423 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +21 -4
- package/skills/a2h-app-migrate/test/test_image_probe.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +16 -1
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +1 -1
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +12 -5
- package/skills/a2h-arkts-logic-coder/SKILL.md +7 -8
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +27 -15
- package/skills/a2h-batch-ui-align/SKILL.md +1 -1
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +4 -0
- package/skills/a2h-batch-ui-align/references/checker-rules.md +36 -0
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +4 -0
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +4 -0
- package/skills/a2h-batch-ui-align/references/step5-convert.md +3 -3
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +49 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +36 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +8 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_in_linear.ts +164 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/self_drawn_sheet.ts +105 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/staggered_lanes.ts +127 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_size_constant.ts +114 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_ds1123.test.mjs +433 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_in_linear.test.mjs +288 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +46 -0
- package/skills/a2h-page-specgen/references/scenario-authoring.md +4 -1
- package/skills/a2h-page-specgen/references/spec-example.md +35 -5
- package/skills/a2h-page-specgen/references/spec-template.md +4 -4
- package/skills/a2h-spec-generate/SKILL.md +3 -1
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +15 -3
- package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
- package/skills/a2h-spec-generate/references/spec-sample-complex.md +16 -0
- package/skills/a2h-spec-generate/references/spec-sample-transfer.md +16 -0
- package/skills/a2h-spec-generate/references/spec-samples.md +5 -1
- package/skills/a2h-spec-generate/references/synthesis-rules.md +21 -1
- package/skills/a2h-spec-generate/references/worker-rules.md +25 -2
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +3 -1
- package/skills/a2h-spec-generate/scripts/check_spec.ts +262 -6
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +12 -2
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +3 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +16 -2
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +54 -3
- package/skills/a2h-spec-generate/test/check-spec.test.ts +247 -0
- package/README.md +0 -440
- package/dist/cli/config-store.js +0 -128
- package/dist/cli/config.js +0 -48
- package/dist/cli/editors.json +0 -114
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -76
- package/dist/cli/init.js +0 -2618
- package/dist/cli/uninstall.js +0 -406
- package/dist/platform/compose.js +0 -228
- package/dist/platform/frontmatter.js +0 -151
- package/dist/platform/installer.js +0 -417
- package/dist/platform/language.js +0 -77
- package/dist/platform/registry.js +0 -337
- package/dist/platform/transform.js +0 -363
- package/dist/platform/types.js +0 -9
- package/dist/platform/validate.js +0 -152
- package/dist/utils/regex.js +0 -7
- package/env-requirements.json +0 -536
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
|
@@ -6,6 +6,27 @@ version: 2
|
|
|
6
6
|
id: a2h-app-migrate
|
|
7
7
|
skill_root_var: SKILLS_ROOT
|
|
8
8
|
|
|
9
|
+
# Ready-node ordering for the deterministic Runner; adds no dependencies and does not enable parallel scheduling.
|
|
10
|
+
serial_order:
|
|
11
|
+
- bootstrap
|
|
12
|
+
- discover.android_index
|
|
13
|
+
- boot.workspace
|
|
14
|
+
- discover.arch
|
|
15
|
+
- discover.utg_static
|
|
16
|
+
- review.arch
|
|
17
|
+
- discover.utg_snapshot
|
|
18
|
+
- discover.feature_scope
|
|
19
|
+
- ui.batch
|
|
20
|
+
- review.ui_batch
|
|
21
|
+
- enrich.spec_gen
|
|
22
|
+
- review.spec_gen
|
|
23
|
+
- enrich.module_docs
|
|
24
|
+
- barrier.l2_enrich
|
|
25
|
+
- adopt.signing
|
|
26
|
+
- adopt.specs_json
|
|
27
|
+
- logic.spec_pipeline
|
|
28
|
+
- logic.finalize
|
|
29
|
+
|
|
9
30
|
policy:
|
|
10
31
|
# ui.batch is the only device:true node in the whole graph (Android device, adb), so "at most 1 device at a time" is currently guaranteed by the topology itself.
|
|
11
32
|
# The HarmonyOS-side cold-start smoke test (hdc) runs once each in discover.arch G10 / ui.batch Step 6.3 / the spec_pipeline wrap-up:
|
|
@@ -66,17 +87,18 @@ policy:
|
|
|
66
87
|
failure_semantics: |
|
|
67
88
|
hard_stop: node fails -> the whole pipeline stops, reporting the failure reason and how to resume.
|
|
68
89
|
hard_stop_unless_logic_skipped: same as hard_stop; but when SKIP_LOGIC is true (or the profile has force_skipped the logic chain) it is treated as skipped.
|
|
69
|
-
ledger: ${LEDGER} is append-only and kept across runs (profile=resume relies on it to know the original run's profile and each node's terminal state). boot.workspace records run_start;
|
|
70
|
-
**every node**
|
|
71
|
-
--status done|reused|skipped|failed [--reason <reason>]
|
|
72
|
-
Before a node **starts** running (after the skip / reuse decision, before its first action)
|
|
73
|
-
the terminal line then carries started_at / duration_s. Record a terminal state as soon as it is reached, never in a batch later
|
|
74
|
-
|
|
75
|
-
ui.batch / enrich.spec_gen / logic.spec_pipeline:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
ledger: ${LEDGER} is append-only and kept across runs (profile=resume relies on it to know the original run's profile and each node's terminal state). After boot.workspace succeeds, the Runner records run_start;
|
|
91
|
+
**every node** has its terminal line submitted by the Runner through ledger.mjs (equivalent arguments: --ledger ${LEDGER} --node <id>
|
|
92
|
+
--status done|reused|skipped|failed [--reason <reason>]; skipped because artifacts are reused -> reused; skipped via skip_if / force_skip -> skipped).
|
|
93
|
+
Before a node **starts** running (after the skip / reuse decision, before its first action), the Runner records the equivalent of `--node <id> --begin`;
|
|
94
|
+
the terminal line then carries started_at / duration_s. Record a terminal state as soon as it is reached, never in a batch later.
|
|
95
|
+
The host and production executor must not append node terminal states, run_start or run_end themselves; bootstrap's done is also submitted only by the Runner after run_start (the ledger cannot be written to disk before that), with its original start time.
|
|
96
|
+
ui.batch / enrich.spec_gen / logic.spec_pipeline: **immediately after** recording the ledger (within the same terminal-state step,
|
|
97
|
+
with the terminal state already fixed) run write_resume_summary.mjs, passing the status just written to the ledger verbatim as --status,
|
|
98
|
+
together with --ledger ${LEDGER} (writes run_at = this round's run_start.at, so the previous round is not misread):
|
|
99
|
+
ui.batch → --work ${WORK} --node ui.batch --hmos ${HMOS} --status <s> --ledger ${LEDGER}
|
|
100
|
+
enrich.spec_gen → --work ${WORK} --node enrich.spec_gen --run-dir ${RUN_DIR} --status <s> --ledger ${LEDGER}
|
|
101
|
+
logic.spec_pipeline → --work ${WORK} --node logic.spec_pipeline --hmos ${HMOS} --status <s> --ledger ${LEDGER}
|
|
80
102
|
status=skipped -> write an ok:false tombstone (do not project page counts / waves that may still be from the previous round in the leaf);
|
|
81
103
|
done|failed|reused -> project from the leaf artifacts. If writing fails, try to write a tombstone instead; if that fails too, delete the old file.
|
|
82
104
|
**Do not** hang it on after_run: success has not been judged then, so --status is not known yet; and the skip path never runs after_run.
|
|
@@ -270,7 +292,8 @@ policy:
|
|
|
270
292
|
scaffold_new (HMOS does not exist / is empty / contains only .git·.DS_Store·.hometrans; emptiness is judged like create_project, ignoring those three; .hometrans is HomeTrans's own records, moved aside for the shell creation and put back)
|
|
271
293
|
requires arch to build the shell first, otherwise boot.workspace / utg_static would dirty the directory. Handling: paths_preflight does a non-destructive probe;
|
|
272
294
|
boot.workspace needs discover.arch when ${SERIALIZE_DISCOVER}; utg_static hangs off boot.workspace.
|
|
273
|
-
So
|
|
295
|
+
So both modes run arch -> utg_static. serial_order puts boot.workspace before arch: under existing_project it runs first and
|
|
296
|
+
commits run_start, so an arch failure still has this run's ledger; under scaffold_new the conditional edge still makes it wait for arch (arch -> boot.workspace -> utg_static).
|
|
274
297
|
⚠ validate_workflow performs the race check on maximum parallelism (ignoring conditional_needs).
|
|
275
298
|
|
|
276
299
|
⚠ The two static UTG directories are always kept separate. discover.utg_static writes ${UTG_DIR} (default ${WORK}/utg_static).
|
|
@@ -442,6 +465,7 @@ vars:
|
|
|
442
465
|
# decided by run_dir.mjs before enrich.spec_gen starts (an unfinished run is resumed, otherwise a new one is created).
|
|
443
466
|
# Used as is when the user explicitly gives run_dir=. <run-id> is only a placeholder.
|
|
444
467
|
RUN_DIR: { required: false, from: run_dir, default: "${WORK}/reqgen/<run-id>", set_by: "run_dir.mjs (pointer ${WORK}/reqgen/current.json)" }
|
|
468
|
+
RUN_DIR_GIVEN: { required: false, default: false, set_true_when: "the user explicitly passes run_dir" }
|
|
445
469
|
# Private output directory of discover.utg_static. Do **not** set it to ${UI_UTG_DIR}. ui.batch only copies into it; the two nodes never write the same directory.
|
|
446
470
|
UTG_DIR: { required: false, default: "${WORK}/utg_static" }
|
|
447
471
|
# UTG directory used by a2h-batch-ui-align (copy target, or write directory when Step 3.1 reruns; Step 3.2 only reads it); not configurable.
|
|
@@ -478,6 +502,9 @@ nodes:
|
|
|
478
502
|
- id: bootstrap
|
|
479
503
|
lane: boot
|
|
480
504
|
type: local
|
|
505
|
+
runner:
|
|
506
|
+
action: production
|
|
507
|
+
kind: bootstrap
|
|
481
508
|
user_facing:
|
|
482
509
|
announce: fail_only
|
|
483
510
|
name: Startup check
|
|
@@ -499,7 +526,7 @@ nodes:
|
|
|
499
526
|
# would judge with the wrong directory and hard_stop right away. It also comes before probe: PROFILE must first be switched to the original run's profile,
|
|
500
527
|
# and the later reuse decisions / preflight all follow it.
|
|
501
528
|
- plan_resume:
|
|
502
|
-
when: "${PROFILE} == resume or ${FROM_NODE} != bootstrap"
|
|
529
|
+
when: "${PROFILE} == 'resume' or ${FROM_NODE} != 'bootstrap'"
|
|
503
530
|
script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/resume_plan.mjs"
|
|
504
531
|
runner: node
|
|
505
532
|
args: "--workflow ${SKILLS_ROOT}/a2h-app-migrate/references/workflow.yaml --ledger ${LEDGER} --from-node ${FROM_NODE} [--base-profile ${RESUME_BASE_PROFILE} only when non-empty] --engine ${SPEC_ENGINE} --engine-given ${SPEC_ENGINE_GIVEN}"
|
|
@@ -784,7 +811,7 @@ nodes:
|
|
|
784
811
|
# Env image-read probe (semantics in policy.image_read). Skip when this run will not run ui.batch (REUSE_UI_BATCH) or IMAGE_READ is already not probe.
|
|
785
812
|
# Verdict is for tip only — **never** pass it to ui.batch; the leaf Step 1 probes again.
|
|
786
813
|
- probe_image_read:
|
|
787
|
-
skip_when: "${IMAGE_READ} != probe or ${REUSE_UI_BATCH} == true"
|
|
814
|
+
skip_when: "${IMAGE_READ} != 'probe' or ${REUSE_UI_BATCH} == true"
|
|
788
815
|
steps: |
|
|
789
816
|
1) node ${SKILLS_ROOT}/a2h-batch-ui-align/scripts/image_probe.mjs prepare --dir <PROBE_DIR>
|
|
790
817
|
-> stdout is one JSON line {image, state, prompt}. (Shares the same script with a2h-batch-ui-align Step 1; do not pass --hp, the verdict goes only to the orchestrator tip.)
|
|
@@ -822,6 +849,9 @@ nodes:
|
|
|
822
849
|
- id: boot.workspace
|
|
823
850
|
lane: boot
|
|
824
851
|
type: local
|
|
852
|
+
runner:
|
|
853
|
+
action: production
|
|
854
|
+
kind: workspace
|
|
825
855
|
user_facing:
|
|
826
856
|
announce: fail_only
|
|
827
857
|
name: Working directory
|
|
@@ -850,7 +880,7 @@ nodes:
|
|
|
850
880
|
script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/write_resume_summary.mjs"
|
|
851
881
|
runner: node
|
|
852
882
|
args: "--work ${WORK} --clear-stale"
|
|
853
|
-
when: "${FROM_NODE} == null or ${FROM_NODE} == '' or ${FROM_NODE} == bootstrap"
|
|
883
|
+
when: "${FROM_NODE} == null or ${FROM_NODE} == '' or ${FROM_NODE} == 'bootstrap'"
|
|
854
884
|
exit_other: continue
|
|
855
885
|
success:
|
|
856
886
|
- all:
|
|
@@ -864,6 +894,9 @@ nodes:
|
|
|
864
894
|
- id: discover.android_index
|
|
865
895
|
lane: discover
|
|
866
896
|
type: local
|
|
897
|
+
runner:
|
|
898
|
+
action: production
|
|
899
|
+
kind: script
|
|
867
900
|
user_facing:
|
|
868
901
|
announce: fail_only
|
|
869
902
|
name: Code index
|
|
@@ -888,6 +921,10 @@ nodes:
|
|
|
888
921
|
- id: discover.utg_static
|
|
889
922
|
lane: discover
|
|
890
923
|
type: skill
|
|
924
|
+
runner:
|
|
925
|
+
action: production
|
|
926
|
+
kind: skill
|
|
927
|
+
reuse_if: "${REUSE_DISCOVER_UTG} == true"
|
|
891
928
|
# Same Node version as ui.batch Step 3.1 (so page node ids are consistent across the two chains of the same App).
|
|
892
929
|
skill: a2h-utg-static
|
|
893
930
|
user_facing:
|
|
@@ -897,14 +934,16 @@ nodes:
|
|
|
897
934
|
done: "Page relations are sorted out. {nodes} pages, {edges} navigations. Nothing missing. The feature list will use these relations later."
|
|
898
935
|
failed: "Page relations were not finished: {reason}. Without these relations the feature list cannot be written."
|
|
899
936
|
reused: "Page relations were not redone this round; the result from last time is reused."
|
|
900
|
-
skipped: "
|
|
937
|
+
skipped: "The feature list is not rewritten this round, so page relations were not sorted out."
|
|
901
938
|
dispatch: "primary_skill_inline"
|
|
902
939
|
# Hangs off boot.workspace: scaffold_new serialization propagates through it, see policy.parallel_rule.
|
|
903
940
|
needs: [boot.workspace, discover.android_index]
|
|
904
941
|
parallel_group: discover_par
|
|
905
942
|
# The only consumer is discover.utg_snapshot -> enrich.spec_gen (the UI chain uses its own ${UI_UTG_DIR}). When spec generation does not run this round
|
|
906
943
|
#(skipped / reused / ui-only) it is just a critical path in front of review.arch; do not run it.
|
|
907
|
-
|
|
944
|
+
# REUSE_SPEC_GENERATE is the consumer's reuse (not this node's), so it belongs in skip_if; keep it in sync with discover.utg_snapshot's when.
|
|
945
|
+
# validate_workflow.mjs allows it via CROSS_NODE_REUSE_IN_SKIP_IF; this node's own reuse stays only in runner.reuse_if.
|
|
946
|
+
skip_if: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == 'ui-only'"
|
|
908
947
|
reads: { android_index: "${ANDROID}/.homegraph/" }
|
|
909
948
|
writes: { workspace: "${UTG_DIR}/", utg: "${UTG_DIR}/utg.json", click_paths: "${UTG_DIR}/click_paths.json" }
|
|
910
949
|
# The driver's exit code is not trustworthy: a failed stage still exits 0; checking file existence alone is fooled by Phase B artifacts left from the previous round;
|
|
@@ -983,6 +1022,10 @@ nodes:
|
|
|
983
1022
|
- id: discover.arch
|
|
984
1023
|
lane: discover
|
|
985
1024
|
type: skill
|
|
1025
|
+
runner:
|
|
1026
|
+
action: production
|
|
1027
|
+
kind: skill
|
|
1028
|
+
reuse_if: "${REUSE_DISCOVER_ARCH} == true"
|
|
986
1029
|
skill: a2h-arch-generate
|
|
987
1030
|
user_facing:
|
|
988
1031
|
announce: always
|
|
@@ -996,7 +1039,7 @@ nodes:
|
|
|
996
1039
|
needs: [bootstrap, discover.android_index]
|
|
997
1040
|
parallel_group: discover_par
|
|
998
1041
|
dispatch: "primary_skill_inline"
|
|
999
|
-
skip_if: "${
|
|
1042
|
+
skip_if: "${SKIP_DISCOVER_ARCH}"
|
|
1000
1043
|
# Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
|
|
1001
1044
|
before_run:
|
|
1002
1045
|
- clear_gate_checkpoint:
|
|
@@ -1053,6 +1096,13 @@ nodes:
|
|
|
1053
1096
|
- id: review.arch
|
|
1054
1097
|
lane: discover
|
|
1055
1098
|
type: adopt
|
|
1099
|
+
runner:
|
|
1100
|
+
action: production
|
|
1101
|
+
kind: gate
|
|
1102
|
+
gate: arch
|
|
1103
|
+
checkpoint: "${CHECKPOINT_DIR}/arch-reviewed.ok"
|
|
1104
|
+
rewind_to: discover.arch
|
|
1105
|
+
rewind_clear_vars: [REUSE_DISCOVER_ARCH]
|
|
1056
1106
|
needs: [discover.arch, discover.utg_static]
|
|
1057
1107
|
also_needs_group: discover_par
|
|
1058
1108
|
human_gate: true
|
|
@@ -1091,6 +1141,9 @@ nodes:
|
|
|
1091
1141
|
- id: discover.utg_snapshot
|
|
1092
1142
|
lane: discover
|
|
1093
1143
|
type: local
|
|
1144
|
+
runner:
|
|
1145
|
+
action: production
|
|
1146
|
+
kind: snapshot
|
|
1094
1147
|
needs: [review.arch]
|
|
1095
1148
|
summary: freeze ${UTG_DIR} into ${UTG_SNAPSHOT}, read-only for enrich.spec_gen
|
|
1096
1149
|
user_facing:
|
|
@@ -1117,14 +1170,14 @@ nodes:
|
|
|
1117
1170
|
script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/ensure_utg_snapshot.mjs"
|
|
1118
1171
|
runner: node
|
|
1119
1172
|
args: "--from ${UTG_DIR} --to ${UTG_SNAPSHOT}"
|
|
1120
|
-
when: "not (${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == ui-only)"
|
|
1173
|
+
when: "not (${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == 'ui-only')"
|
|
1121
1174
|
exit_nonzero: hard_stop
|
|
1122
1175
|
success:
|
|
1123
1176
|
- any:
|
|
1124
1177
|
- all:
|
|
1125
1178
|
- file_exists: "${UTG_SNAPSHOT}/utg.json"
|
|
1126
1179
|
- file_exists: "${UTG_SNAPSHOT}/click_paths.json"
|
|
1127
|
-
- when: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == ui-only"
|
|
1180
|
+
- when: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE} or ${REUSE_SPEC_GENERATE} == true or ${PROFILE} == 'ui-only'"
|
|
1128
1181
|
on_fail: hard_stop
|
|
1129
1182
|
|
|
1130
1183
|
# Feature-level incremental scope (hometrans-incremental.html "feature-level increment" F-8): when the input is not a page
|
|
@@ -1133,6 +1186,7 @@ nodes:
|
|
|
1133
1186
|
- id: discover.feature_scope
|
|
1134
1187
|
lane: discover
|
|
1135
1188
|
type: local
|
|
1189
|
+
runner: { action: production, kind: host_action }
|
|
1136
1190
|
needs: [discover.utg_snapshot]
|
|
1137
1191
|
summary: resolve a feature description / requirement document / Android version diff / confirmed scope file into a feature-level scope.json (v2)
|
|
1138
1192
|
user_facing:
|
|
@@ -1152,6 +1206,10 @@ nodes:
|
|
|
1152
1206
|
- script_exit_0: { runner: node, script: "${SKILLS_ROOT}/a2h-app-migrate/scripts/scope_model.mjs", args: "check ${HMOS}/.hometrans/incremental/scope.json --existing ${HMOS}/.hometrans/incremental/existing.json --ledger ${HMOS}/.hometrans/migration_manifest.json" }
|
|
1153
1207
|
- when: "${FEATURE_SCOPE} == false"
|
|
1154
1208
|
- skipped: true
|
|
1209
|
+
actions:
|
|
1210
|
+
- host_action:
|
|
1211
|
+
action: discover_feature_scope
|
|
1212
|
+
reason: Resolve and confirm the incremental scope per invoke; the host settles it under auto and waits for F5 confirmation under interactive
|
|
1155
1213
|
invoke: |
|
|
1156
1214
|
Context budget, context window, remaining tokens, a growing session or imminent compaction are not reasons to finish (policy.context_budget).
|
|
1157
1215
|
First decide the input (in this order, stop at the first hit):
|
|
@@ -1181,6 +1239,11 @@ nodes:
|
|
|
1181
1239
|
- id: enrich.spec_gen
|
|
1182
1240
|
lane: enrich
|
|
1183
1241
|
type: skill
|
|
1242
|
+
runner:
|
|
1243
|
+
action: production
|
|
1244
|
+
kind: skill
|
|
1245
|
+
reuse_if: "${REUSE_SPEC_GENERATE} == true"
|
|
1246
|
+
after_terminal: resume_summary
|
|
1184
1247
|
skill: ${SPEC_ENGINE} → skill_by_engine
|
|
1185
1248
|
skill_by_engine: { spec-generate: a2h-spec-generate, page-specgen: a2h-page-specgen }
|
|
1186
1249
|
user_facing:
|
|
@@ -1195,7 +1258,7 @@ nodes:
|
|
|
1195
1258
|
parallel_group: post_utg
|
|
1196
1259
|
dispatch: "primary_skill_inline"
|
|
1197
1260
|
needs: [discover.utg_snapshot, discover.feature_scope]
|
|
1198
|
-
skip_if: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE}
|
|
1261
|
+
skip_if: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE}"
|
|
1199
1262
|
# Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
|
|
1200
1263
|
before_run:
|
|
1201
1264
|
- clear_gate_checkpoint:
|
|
@@ -1375,6 +1438,13 @@ nodes:
|
|
|
1375
1438
|
- id: review.spec_gen
|
|
1376
1439
|
lane: adopt
|
|
1377
1440
|
type: adopt
|
|
1441
|
+
runner:
|
|
1442
|
+
action: production
|
|
1443
|
+
kind: gate
|
|
1444
|
+
gate: spec_gen
|
|
1445
|
+
checkpoint: "${CHECKPOINT_DIR}/spec-gen-reviewed.ok"
|
|
1446
|
+
rewind_to: enrich.spec_gen
|
|
1447
|
+
rewind_clear_vars: [REUSE_SPEC_GENERATE]
|
|
1378
1448
|
needs: [enrich.spec_gen]
|
|
1379
1449
|
skip_if: "${SKIP_LOGIC} or ${SKIP_SPEC_GENERATE}"
|
|
1380
1450
|
human_gate: true
|
|
@@ -1414,6 +1484,11 @@ nodes:
|
|
|
1414
1484
|
- id: ui.batch
|
|
1415
1485
|
lane: enrich
|
|
1416
1486
|
type: skill
|
|
1487
|
+
runner:
|
|
1488
|
+
action: production
|
|
1489
|
+
kind: skill
|
|
1490
|
+
reuse_if: "${REUSE_UI_BATCH} == true"
|
|
1491
|
+
after_terminal: resume_summary
|
|
1417
1492
|
skill: a2h-batch-ui-align
|
|
1418
1493
|
user_facing:
|
|
1419
1494
|
announce: always
|
|
@@ -1426,8 +1501,8 @@ nodes:
|
|
|
1426
1501
|
dispatch: "primary_skill_inline"
|
|
1427
1502
|
needs: [discover.utg_snapshot, discover.arch, discover.feature_scope]
|
|
1428
1503
|
also_needs_group: discover_par
|
|
1429
|
-
#
|
|
1430
|
-
skip_if: "${
|
|
1504
|
+
# A feature scope with no pages leaves UI conversion nothing to do; REUSE_UI_BATCH belongs only to runner.reuse_if.
|
|
1505
|
+
skip_if: "${PROFILE} == incremental and ${FEATURE_SCOPE} == true and ${SCOPE_PAGES} == 0"
|
|
1431
1506
|
# Clear the gate checkpoint right before actually executing (lifecycle in policy.human_interaction).
|
|
1432
1507
|
before_run:
|
|
1433
1508
|
- clear_gate_checkpoint:
|
|
@@ -1469,7 +1544,7 @@ nodes:
|
|
|
1469
1544
|
# Never pass image_read= (policy.image_read): a2h-batch-ui-align Step 1 probes again and writes host_caps.json
|
|
1470
1545
|
[reuse_static_workspace=${UTG_DIR} only when discover.utg_static actually ran this round]
|
|
1471
1546
|
# if any of the following is true it did not run this round; **do not pass** this argument, and Step 3.1 runs by itself:
|
|
1472
|
-
# ${REUSE_DISCOVER_UTG} / ${SKIP_LOGIC} / ${SKIP_SPEC_GENERATE} / ${REUSE_SPEC_GENERATE} == true / ${PROFILE} == ui-only
|
|
1547
|
+
# ${REUSE_DISCOVER_UTG} / ${SKIP_LOGIC} / ${SKIP_SPEC_GENERATE} / ${REUSE_SPEC_GENERATE} == true / ${PROFILE} == 'ui-only'
|
|
1473
1548
|
[takeover_allowed=true only when this migrate has already run ui.batch once: this round's ledger records ui.batch as failed, or review.ui_batch chose "rerun"]
|
|
1474
1549
|
[Unattended contract (policy.leaf_questions)]
|
|
1475
1550
|
· The app module for Step 2 a2h-resource-convert is the app_module passed above (the same as the spec chain); do not ask the user;
|
|
@@ -1557,6 +1632,13 @@ nodes:
|
|
|
1557
1632
|
- id: review.ui_batch
|
|
1558
1633
|
lane: enrich
|
|
1559
1634
|
type: adopt
|
|
1635
|
+
runner:
|
|
1636
|
+
action: production
|
|
1637
|
+
kind: gate
|
|
1638
|
+
gate: ui_batch
|
|
1639
|
+
checkpoint: "${CHECKPOINT_DIR}/ui-batch-reviewed.ok"
|
|
1640
|
+
rewind_to: ui.batch
|
|
1641
|
+
rewind_clear_vars: [REUSE_UI_BATCH]
|
|
1560
1642
|
needs: [ui.batch]
|
|
1561
1643
|
human_gate: true
|
|
1562
1644
|
user_facing:
|
|
@@ -1629,6 +1711,10 @@ nodes:
|
|
|
1629
1711
|
- id: enrich.module_docs
|
|
1630
1712
|
lane: enrich
|
|
1631
1713
|
type: skill
|
|
1714
|
+
runner:
|
|
1715
|
+
action: production
|
|
1716
|
+
kind: skill
|
|
1717
|
+
reuse_if: "${REUSE_MODULE_DOCS} == true"
|
|
1632
1718
|
skill: a2h-module-semantic-docs
|
|
1633
1719
|
user_facing:
|
|
1634
1720
|
announce: always
|
|
@@ -1643,7 +1729,7 @@ nodes:
|
|
|
1643
1729
|
# (needs still only hangs off ui.batch; start order in policy.parallel_rule / schedule_hint).
|
|
1644
1730
|
needs: [discover.arch, ui.batch]
|
|
1645
1731
|
dispatch: "primary_skill_inline"
|
|
1646
|
-
skip_if: "${SKIP_MODULE_DOCS}
|
|
1732
|
+
skip_if: "${SKIP_MODULE_DOCS}"
|
|
1647
1733
|
# The state file is kept across runs (it is the incremental baseline for --incremental preserve and must not be deleted); checking existence alone lets the previous round pose as success.
|
|
1648
1734
|
# Record the time before starting; success requires the state file to be no older than it.
|
|
1649
1735
|
before_run:
|
|
@@ -1694,6 +1780,9 @@ nodes:
|
|
|
1694
1780
|
- id: barrier.l2_enrich
|
|
1695
1781
|
lane: enrich
|
|
1696
1782
|
type: local
|
|
1783
|
+
runner:
|
|
1784
|
+
action: production
|
|
1785
|
+
kind: barrier
|
|
1697
1786
|
# The ui side waits for review.ui_batch (which implies ui.batch; under force_skip that need is satisfied by the skipped terminal state).
|
|
1698
1787
|
# The spec side still waits for enrich.spec_gen (review.spec_gen is gated separately before adopt and can wrap up outside this barrier).
|
|
1699
1788
|
# Do not run --assert-ready again here: the gate itself exiting 1 is enough to stop the interactive path.
|
|
@@ -1716,6 +1805,10 @@ nodes:
|
|
|
1716
1805
|
- id: adopt.signing
|
|
1717
1806
|
lane: adopt
|
|
1718
1807
|
type: local
|
|
1808
|
+
runner:
|
|
1809
|
+
action: production
|
|
1810
|
+
kind: host_action
|
|
1811
|
+
reuse_if: "${REUSE_LOGIC_PIPELINE} == true"
|
|
1719
1812
|
user_facing:
|
|
1720
1813
|
announce: always
|
|
1721
1814
|
name: Signing
|
|
@@ -1724,7 +1817,7 @@ nodes:
|
|
|
1724
1817
|
failed: "Signing is not configured yet: {reason}."
|
|
1725
1818
|
skipped: "No business logic this round, so signing was not checked."
|
|
1726
1819
|
needs: [barrier.l2_enrich]
|
|
1727
|
-
skip_if: "${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE}
|
|
1820
|
+
skip_if: "${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE}"
|
|
1728
1821
|
writes: { build_profile: "${HMOS}/build-profile.json5" }
|
|
1729
1822
|
success:
|
|
1730
1823
|
- any:
|
|
@@ -1769,6 +1862,9 @@ nodes:
|
|
|
1769
1862
|
- id: adopt.specs_json
|
|
1770
1863
|
lane: adopt
|
|
1771
1864
|
type: adopt
|
|
1865
|
+
runner:
|
|
1866
|
+
action: production
|
|
1867
|
+
kind: adopt_specs
|
|
1772
1868
|
user_facing:
|
|
1773
1869
|
announce: fail_only
|
|
1774
1870
|
name: Adopt spec list
|
|
@@ -1796,6 +1892,11 @@ nodes:
|
|
|
1796
1892
|
- id: logic.spec_pipeline
|
|
1797
1893
|
lane: logic
|
|
1798
1894
|
type: skill
|
|
1895
|
+
runner:
|
|
1896
|
+
action: production
|
|
1897
|
+
kind: skill
|
|
1898
|
+
reuse_if: "${REUSE_LOGIC_PIPELINE} == true"
|
|
1899
|
+
after_terminal: resume_summary
|
|
1799
1900
|
skill: a2h-spec-design-pipeline
|
|
1800
1901
|
user_facing:
|
|
1801
1902
|
announce: always
|
|
@@ -1810,7 +1911,7 @@ nodes:
|
|
|
1810
1911
|
# There is no parallelizable node before or after this one (needs adopt.specs_json; the only successor is logic.finalize), so Task buys no parallelism.
|
|
1811
1912
|
dispatch: primary_skill_inline
|
|
1812
1913
|
needs: [adopt.specs_json, adopt.signing]
|
|
1813
|
-
skip_if: "${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE}
|
|
1914
|
+
skip_if: "${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE}"
|
|
1814
1915
|
# Before this node **actually executes**: archive only on a hard fingerprint mismatch (exit 4) or all failed (exit 3).
|
|
1815
1916
|
# exit 4: specs.json content / hard paths differ from this round -> without archiving, pipeline I1 also aborts and every later round gets stuck.
|
|
1816
1917
|
# exit 3: all groups failed -> resuming as is would only rerun smoke + Finalization; a retry must start a new round.
|
|
@@ -1883,6 +1984,9 @@ nodes:
|
|
|
1883
1984
|
- id: logic.finalize
|
|
1884
1985
|
lane: finalize
|
|
1885
1986
|
type: local
|
|
1987
|
+
runner:
|
|
1988
|
+
action: production
|
|
1989
|
+
kind: host_action
|
|
1886
1990
|
needs: [logic.spec_pipeline]
|
|
1887
1991
|
summary: summary report + final build fallback
|
|
1888
1992
|
user_facing:
|
|
@@ -1891,11 +1995,13 @@ nodes:
|
|
|
1891
1995
|
doing: "Summarizing this round's migration results. The HarmonyOS project will be built once more if needed."
|
|
1892
1996
|
done: "The report for this round's migration is written: logic-convert-report.md in the workspace. The build verdict, UI conversion and the feature list are all in this report."
|
|
1893
1997
|
failed: "The wrap-up report was not finished: {reason}."
|
|
1998
|
+
success:
|
|
1999
|
+
- file_exists: "${LOGIC_REPORT}"
|
|
1894
2000
|
invoke: |
|
|
1895
|
-
Present to the user per policy.user_facing: send user_facing.doing when starting
|
|
1896
|
-
|
|
2001
|
+
Present to the user per policy.user_facing: send user_facing.doing when starting; send user_facing.done only after the Runner commits the node terminal state and run_end, and user_facing.failed when it cannot be written.
|
|
2002
|
+
Write the report body in full per steps 1–3 below and follow the return protocol in step 4. Stage names use each user_facing.name (UI conversion, feature list, module notes, business logic, signing), not node ids.
|
|
1897
2003
|
1. Final build fallback — run only when needed, and never leave uncommitted changes in the workspace
|
|
1898
|
-
0. logic.spec_pipeline was skipped this round (${SKIP_LOGIC} / ${SKIP_LOGIC_PIPELINE} / ${REUSE_LOGIC_PIPELINE} == true / ${PROFILE} == ui-only) ->
|
|
2004
|
+
0. logic.spec_pipeline was skipped this round (${SKIP_LOGIC} / ${SKIP_LOGIC_PIPELINE} / ${REUSE_LOGIC_PIPELINE} == true / ${PROFILE} == 'ui-only') ->
|
|
1899
2005
|
**no build, no commit**: this round has no logic changes to fall back on (the UI chain's ui.batch built by itself); when reused, the build was already done in
|
|
1900
2006
|
the round that produced it. The report says "No business logic was written this round, so no extra build was done." and goes straight to step 2.
|
|
1901
2007
|
(spec-design-pipeline's W0 requires a clean trunk: **any** uncommitted change stops it directly; only on Mid-flight re-entry, when all dirty files are
|
|
@@ -1912,7 +2018,7 @@ nodes:
|
|
|
1912
2018
|
· ${HMOS} is not a git repo -> run the fixer as usual without committing, and note it in the report.
|
|
1913
2019
|
c. The report writes one line with the build verdict, using one of these plain sentences: the business logic step already built successfully / build passed / build passed after fixes (with commit hash) / build still fails / the workspace has uncommitted changes, so no build was done.
|
|
1914
2020
|
2. Add a "Business logic" section to the report, first split into three cases by how logic.spec_pipeline was handled this round:
|
|
1915
|
-
· skipped (${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE} or ${PROFILE} == ui-only) -> **do not read** spec_pipeline_state.json / design_map.md /
|
|
2021
|
+
· skipped (${SKIP_LOGIC} or ${SKIP_LOGIC_PIPELINE} or ${PROFILE} == 'ui-only') -> **do not read** spec_pipeline_state.json / design_map.md /
|
|
1916
2022
|
claim_audit.json: they were left by some earlier round and are not this round's results. The report says "No business logic was written this round.";
|
|
1917
2023
|
when the state file exists add only the sentence "There is an earlier progress record; it is not this round's result and is not included in this report".
|
|
1918
2024
|
· reused (${REUSE_LOGIC_PIPELINE} == true) -> read as usual (probe 7 already verified that it belongs to this round's inputs),
|
|
@@ -1956,7 +2062,9 @@ nodes:
|
|
|
1956
2062
|
node ${SKILLS_ROOT}/a2h-app-migrate/scripts/scope_report.mjs --hmos ${HMOS} --scope-json ${SCOPE_JSON}
|
|
1957
2063
|
--specs-json ${SPECS_JSON} --android ${ANDROID} --utg <the same page graph> --work ${WORK} --lang en
|
|
1958
2064
|
It never fails this node; a missing input only drops its part.
|
|
1959
|
-
5.
|
|
2065
|
+
5. After writing the report, return only ok|fail and the report path; do not append your own logic.finalize terminal record or run_end.
|
|
2066
|
+
The Runner verifies the report and commits the only logic.finalize done, then enforces full-DAG completion and writes the single run_end.
|
|
2067
|
+
If an assertion exits non-zero or evidence is incomplete, the Runner blocks certification; the host must not present the stage report as a completion certificate.
|
|
1960
2068
|
|
|
1961
2069
|
schedule_hint:
|
|
1962
2070
|
# discover_par conditional parallelism and the scaffold_new serial fallback are in policy.parallel_rule; not repeated here.
|