@harmonyos-arkts/d2h 0.1.11 → 0.1.13
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/.claude-plugin/marketplace.json +15 -13
- package/.claude-plugin/plugin.json +13 -7
- package/AGENTS.md +5 -5
- package/README.md +212 -212
- package/agents/android-to-hmos-00-orchestrator.md +318 -318
- package/agents/d2h.md +157 -157
- package/dist/bin/install-opencode.js +30 -30
- package/docs/environment-check.md +86 -86
- package/install-opencode.sh +160 -160
- package/opencode/agents.json +16 -16
- package/opencode/vscode-d2h-package.json +7 -7
- package/opencode/vscode-d2h-plugin.mjs +29 -29
- package/package.json +54 -54
- package/schemas/android-source-manifest.schema.json +25 -25
- package/schemas/checkpoint-provenance.schema.json +67 -67
- package/schemas/final-acceptance.schema.json +29 -29
- package/schemas/managed-evidence-index.schema.json +15 -15
- package/schemas/managed-evidence.schema.json +114 -114
- package/schemas/migration-config.schema.json +51 -51
- package/schemas/migration-report-index.schema.json +39 -39
- package/schemas/migration-report-item.schema.json +51 -51
- package/schemas/migration-report-summary.schema.json +25 -25
- package/schemas/migration-status.schema.json +202 -202
- package/schemas/preflight.schema.json +60 -60
- package/schemas/source-order-audit.schema.json +16 -16
- package/schemas/source-provenance-event.schema.json +19 -19
- package/schemas/spec-app-shard.schema.json +45 -45
- package/schemas/spec-fact-corrections-shard.schema.json +13 -13
- package/schemas/spec-features-shard.schema.json +43 -43
- package/schemas/spec-index.schema.json +26 -26
- package/schemas/spec-interactions-shard.schema.json +40 -40
- package/schemas/spec-page.schema.json +98 -98
- package/schemas/spec-pages-index.schema.json +1 -1
- package/schemas/spec-unresolved-shard.schema.json +1 -1
- package/schemas/task-envelope.schema.json +109 -109
- package/schemas/task-plan.schema.json +341 -341
- package/scripts/check-environment.mjs +320 -320
- package/skills/android2hmos_resources_convert/SKILL.md +180 -180
- package/skills/android2hmos_resources_convert/references/image-conversion-rules.md +230 -230
- package/skills/android2hmos_resources_convert/references/svg-fix-patterns.md +175 -175
- package/skills/android2hmos_resources_convert/references/xml-drawable-to-svg-rules.md +513 -513
- package/skills/arkts-app-identity/SKILL.md +238 -238
- package/skills/arkts-i18n/SKILL.md +496 -496
- package/skills/arkts-i18n/evals/evals.json +84 -84
- package/skills/arkts-i18n/references/code-examples.md +302 -302
- package/skills/arkts-i18n/references/common-pitfalls.md +391 -391
- package/skills/arkts-i18n/references/dynamic-language-switch.md +604 -604
- package/skills/arkts-i18n/references/hardcoded-string-scanner.md +348 -348
- package/skills/arkts-i18n/references/language-codes.md +104 -104
- package/skills/arkts-i18n/references/resource-file-structure.md +775 -775
- package/skills/arkts-i18n/references/static-vs-dynamic.md +242 -242
- package/skills/arkts-i18n/references/v1-compat.md +244 -244
- package/skills/arkts-i18n/scripts/audit_i18n_completeness.sh +174 -174
- package/skills/arkts-icon-sizing/SKILL.md +211 -211
- package/skills/arkts-icon-sizing/scripts/icon_audit.py +131 -131
- package/skills/arkts-icon-sizing/scripts/icon_autofix.py +88 -88
- package/skills/arkts-icon-sizing/scripts/icon_dims.py +179 -179
- package/skills/arkts-icon-sizing/scripts/icon_fix.py +119 -119
- package/skills/arkts-mvvm-architecture/SKILL.md +613 -613
- package/skills/d2h-hypium-forge/SKILL.md +309 -309
- package/skills/d2h-hypium-forge/references/functional-spec-template.md +140 -140
- package/skills/d2h-hypium-forge/references/official-api.md +135 -135
- package/skills/d2h-hypium-forge/references/pitfalls.md +98 -98
- package/skills/d2h-hypium-forge/references/testability-template.md +71 -71
- package/skills/d2h-hypium-forge/scripts/_common_template.py +659 -659
- package/skills/d2h-hypium-forge/scripts/analyze_results.py +165 -165
- package/skills/d2h-hypium-forge/scripts/assert_audit.py +107 -107
- package/skills/d2h-hypium-forge/scripts/collect_runtime_pages.py +169 -169
- package/skills/d2h-hypium-forge/scripts/forge_report.py +325 -325
- package/skills/d2h-hypium-forge/scripts/inject_resource_ids.py +114 -114
- package/skills/d2h-hypium-forge/scripts/lint_asserts.py +80 -80
- package/skills/d2h-hypium-forge/scripts/lint_locate.py +60 -60
- package/skills/d2h-hypium-forge/scripts/merge_appgraph.py +249 -249
- package/skills/d2h-hypium-forge/scripts/precondition.py +140 -140
- package/skills/d2h-hypium-forge/scripts/preinject_ids.py +232 -232
- package/skills/d2h-hypium-forge/scripts/probe.py +197 -197
- package/skills/d2h-hypium-forge/scripts/run_direct.py +823 -823
- package/skills/d2h-hypium-forge/scripts/run_parallel.py +121 -121
- package/skills/d2h-hypium-forge/scripts/scan_features.py +255 -255
- package/skills/d2h-hypium-forge/scripts/upgrade_asserts.py +66 -66
- package/skills/d2h-hypium-forge/scripts/validate_scenarios.py +84 -84
- package/skills/d2h-page-develop/SKILL.md +112 -112
- package/skills/d2h-page-develop/agents/openai.yaml +7 -7
- package/skills/d2h-page-spec-generate/SKILL.md +206 -206
- package/skills/d2h-page-spec-generate/scripts/build_batch_report.py +227 -227
- package/skills/d2h-utg-ai-generate/SKILL.md +128 -128
- package/skills/d2h-utg-ai-generate/references/click-paths-schema.json +76 -76
- package/skills/d2h-utg-ai-generate/references/extraction-guide.md +34 -34
- package/skills/d2h-utg-ai-generate/references/facts-contract.md +96 -96
- package/skills/d2h-utg-ai-generate/references/page-schema.json +61 -61
- package/skills/d2h-utg-ai-generate/references/utg-schema.json +89 -89
- package/skills/d2h-utg-ai-generate/scripts/build_page_json.py +314 -314
- package/skills/d2h-utg-ai-generate/scripts/build_utg.py +123 -123
- package/skills/d2h-utg-ai-generate/scripts/capture_from_page_json.ts +280 -280
- package/skills/d2h-utg-ai-generate/scripts/utg_common.py +524 -524
- package/skills/d2h-utg-ai-generate/scripts/utg_html.py +489 -489
- package/skills/d2h-utg-ai-generate/scripts/validate_utg.py +69 -69
- package/skills/d2h-utg-ai-generate/scripts/vendor/D3-LICENSE +13 -13
- package/skills/d2h-utg-ai-generate/scripts/vendor/d3-7.9.0.min.js +2 -2
- package/skills/d2h-utg-ai-generate/tests/test_pipeline.py +369 -369
- package/skills/d2h-utg-static-generate/SKILL.md +73 -73
- package/skills/d2h-utg-static-generate/references/discoveries.md +38 -38
- package/skills/d2h-utg-static-generate/scripts/generate.py +499 -499
- package/skills/d2h-utg-static-generate/tests/test_static.py +335 -335
- package/skills/d2h-utg-static-generate/tests/verify-offline-html.py +60 -60
- package/skills/d2h-utg-static-generate/tests/verify-produced-fixture.py +131 -131
- package/skills/harmonyos-migration-playbook/SKILL.md +83 -83
- package/skills/harmonyos-migration-playbook/agents/openai.yaml +7 -7
- package/skills/harmonyos-migration-playbook/references/arkts-compile.md +24 -24
- package/skills/harmonyos-migration-playbook/references/harmony-runtime.md +53 -53
- package/skills/harmonyos-migration-playbook/references/lesson-lifecycle.md +45 -45
- package/skills/harmonyos-migration-playbook/references/protocol-e2e.md +23 -23
- package/skills/harmonyos-migration-playbook/references/ui-automation.md +53 -53
- package/skills/harmonyos-migration-playbook/references/windows-environment.md +38 -38
- package/skills/maintaining-migration-report/SKILL.md +144 -144
- package/skills/maintaining-migration-report/references/final-acceptance.md +48 -48
- package/skills/maintaining-migration-report/references/source-provenance.md +66 -66
- package/skills/managing-d2h-toolchain/SKILL.md +24 -24
- package/skills/managing-d2h-toolchain/environment-requirements.json +16 -16
- package/skills/managing-d2h-toolchain/scripts/manage-toolchain.mjs +98 -98
- package/skills/managing-d2h-toolchain/toolchain.json +16 -16
- package/skills/native-library-substitution/SKILL.md +384 -384
- package/skills/native-library-substitution/references/native-library-substitution.json +56905 -56905
- package/skills/native-library-substitution/references/native-library-substitution.md +163 -163
- package/skills/preparing-migration-workspace/SKILL.md +131 -131
- package/skills/reviewing-migration-process/SKILL.md +62 -62
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maintaining-migration-report
|
|
3
|
-
description: Maintain and validate the lightweight fact-linked Android-to-HarmonyOS migration ledger while implementation evidence is fresh. Record implementation files, Android source provenance, managed evidence, differences, discoveries, summary, and final-acceptance data without scheduling tests, regression, checkpoints, rendering, or completion.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Maintain the migration ledger
|
|
7
|
-
|
|
8
|
-
The migration report is a verifiable ledger linked to deterministic facts, Android source, HarmonyOS implementation files, and managed evidence. It is not the authority for application behavior: current Android source and observable behavior remain authoritative, and Kernel validation remains authoritative for machine gates.
|
|
9
|
-
|
|
10
|
-
All `.migration/...` paths below live in the sibling migration workspace `<android-project>-migration/.migration/` created by the CLI, never inside the Android project.
|
|
11
|
-
|
|
12
|
-
## Scope and inputs
|
|
13
|
-
|
|
14
|
-
This Skill owns only:
|
|
15
|
-
|
|
16
|
-
- `report init`, `report update`, and `report validate`;
|
|
17
|
-
- recording analyzer omissions in `discoveries.json`;
|
|
18
|
-
- maintaining `summary.json`;
|
|
19
|
-
- writing `final-acceptance.json` from test results and managed evidence supplied by the caller.
|
|
20
|
-
|
|
21
|
-
For an update, accept the Android project root, report ref, requested status, real HarmonyOS implementation files, current Android source files, managed evidence paths, and any real difference or blocker. When the caller has a current Task/epoch, also accept its identifier and source closure so provenance can be reconciled with the exact implementation unit. Never replace these inputs with a prose summary.
|
|
22
|
-
|
|
23
|
-
Read [references/source-provenance.md](references/source-provenance.md) whenever an item becomes `implemented` or `verified`. Read [references/final-acceptance.md](references/final-acceptance.md) when maintaining final acceptance.
|
|
24
|
-
|
|
25
|
-
## Invariants
|
|
26
|
-
|
|
27
|
-
- Treat `.migration/spec/facts/` and `.migration/spec/index.json` as immutable analyzer output. Never edit them to make validation pass.
|
|
28
|
-
- The JSON files under `.migration/report/` are lightweight overlays. Preserve stable refs, fact labels, and control-entry ownership generated by the CLI.
|
|
29
|
-
- Do not edit `.migration/report/index.json` or `validation.json`; host scripts own indexes, hashes, counts, and validation output.
|
|
30
|
-
- A mapping must name the concrete HarmonyOS file and symbol that performs the behavior. Imports, comments, ref strings, registries without executable wiring, generated hashes, stubs, and test-only symbols are not implementations.
|
|
31
|
-
- Compilation alone does not prove that a page, control, handler, navigation path, Dialog, or business function works.
|
|
32
|
-
- `implemented` and `verified` items require current Android `sourceProvenance`; a prose description or stale hash is insufficient.
|
|
33
|
-
- `verified` and passed final-acceptance tests require fresh Kernel-managed evidence. Never hand-write, copy, or modify receipts or archived artifacts.
|
|
34
|
-
- A receipt supports a ref only when `scope.coveredRefs` contains it, the structured result has a non-zero execution count with zero failures, errors, and ignored cases, the target matches, and archived artifacts pass integrity checks.
|
|
35
|
-
|
|
36
|
-
## Initialize and select work
|
|
37
|
-
|
|
38
|
-
Run once when no report exists:
|
|
39
|
-
|
|
40
|
-
```text
|
|
41
|
-
droid2hmos report init <android-project>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Start from `.migration/report/index.json`. Select only the shards relevant to the caller's current implementation or review. Follow each shard's `factsFile`, then read the Android source named by the fact and current source closure. Read additional Android source when facts are ambiguous or may omit behavior.
|
|
45
|
-
|
|
46
|
-
## Update one item
|
|
47
|
-
|
|
48
|
-
Update while implementation and source context are fresh. Preserve `ref`, `kind`, `factLabel`, and `controlRef`. Maintain only:
|
|
49
|
-
|
|
50
|
-
- `status`: `pending`, `implemented`, `verified`, or `blocked`;
|
|
51
|
-
- `harmonyosFiles[]`: project-relative files containing reachable implementation;
|
|
52
|
-
- `sourceProvenance[]`: current Android files and CLI-computed hashes;
|
|
53
|
-
- `testEvidence[]`: managed evidence whose `scope.coveredRefs` contains the ref;
|
|
54
|
-
- `difference`: `null` unless a real behavior difference or blocker exists.
|
|
55
|
-
|
|
56
|
-
Use the safe update interface:
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
droid2hmos report update <android-project> --ref <ref> [--status <status>] [--harmony-file <path>...] [--android-source <path>...] [--evidence <path>...] [--difference <text>|--clear-difference]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The command must resolve exactly one existing ref and validates project files and source membership before writing. Use `--android-source` for every Android file that informed the implementation. If a current Task/epoch source closure exists, reconcile it before update; a closure member that affects the behavior but is absent from `sourceProvenance` is unresolved, not silently ignored.
|
|
63
|
-
|
|
64
|
-
Use statuses strictly:
|
|
65
|
-
|
|
66
|
-
- `pending`: not implemented;
|
|
67
|
-
- `implemented`: reachable implementation and source provenance exist, but item-specific runtime verification is incomplete;
|
|
68
|
-
- `verified`: implementation, provenance, and relevant managed evidence all exist and validate;
|
|
69
|
-
- `blocked`: implementation or verification is impossible for the concrete reason in `difference`.
|
|
70
|
-
|
|
71
|
-
If evidence is missing or invalid, keep the item at `implemented` (or `blocked` when appropriate) and return a verification request. Do not run a targeted test or full regression from this Skill.
|
|
72
|
-
|
|
73
|
-
## Record analyzer omissions
|
|
74
|
-
|
|
75
|
-
When Android source proves that deterministic facts missed a page, control, entry, interaction, or business feature, append a semantic record to `.migration/report/discoveries.json`. Include a unique `discovered.*` ref, kind, concise label, Android source evidence, implementation files, status, test evidence, and optional difference. Do not inject it into immutable facts.
|
|
76
|
-
|
|
77
|
-
Validate immediately after changing discoveries. A discovery is not automatically verified merely because its file exists.
|
|
78
|
-
|
|
79
|
-
## Maintain final acceptance
|
|
80
|
-
|
|
81
|
-
Only write final-acceptance results supplied by the caller from a real managed test run. Follow [references/final-acceptance.md](references/final-acceptance.md). This Skill checks schema, stable refs, `coveredRefs`, receipt freshness and integrity, and consistency between test status and blockers.
|
|
82
|
-
|
|
83
|
-
It does not decide when application-wide regression should run, choose or expand its scope, execute the suite, or decide whether the workflow may advance.
|
|
84
|
-
|
|
85
|
-
## Maintain the user summary
|
|
86
|
-
|
|
87
|
-
`summary.json` is the only free-form user summary. Keep it concise and limited to:
|
|
88
|
-
|
|
89
|
-
- `summary`: what has been migrated and what the validated evidence supports;
|
|
90
|
-
- `incomplete`: remaining behavior, why it remains, and user impact;
|
|
91
|
-
- `nextSteps`: concrete work still required;
|
|
92
|
-
- optional `additionalSections` for meaningful platform differences, risks, or usage notes.
|
|
93
|
-
|
|
94
|
-
Before updating the summary, run `report validate` and read `.migration/report/validation.json`. The prose must agree with that machine result:
|
|
95
|
-
|
|
96
|
-
- if validation says the ledger is incomplete or final acceptance is not passed, describe it as partial/incomplete;
|
|
97
|
-
- do not relabel pending or blocked behavior as harmless without a recorded decision;
|
|
98
|
-
- do not duplicate calculated counts, mappings, test inventories, or blocker lists owned by the renderer;
|
|
99
|
-
- do not add fields outside the current summary or final-acceptance schemas.
|
|
100
|
-
|
|
101
|
-
## Validate and return
|
|
102
|
-
|
|
103
|
-
After every semantic update, run:
|
|
104
|
-
|
|
105
|
-
```text
|
|
106
|
-
droid2hmos report validate <android-project>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Return the validation result without converting failure into success. `valid: true, complete: false` is acceptable during migration and does not authorize a completion claim.
|
|
110
|
-
|
|
111
|
-
Return a structured result:
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"status": "completed | partial | failed",
|
|
116
|
-
"changedFiles": [],
|
|
117
|
-
"sourceFiles": [],
|
|
118
|
-
"evidence": [],
|
|
119
|
-
"domainChecks": [],
|
|
120
|
-
"unresolved": [],
|
|
121
|
-
"verificationRequests": [],
|
|
122
|
-
"suggestedRemediation": [],
|
|
123
|
-
"details": {
|
|
124
|
-
"updatedRefs": [],
|
|
125
|
-
"validation": {},
|
|
126
|
-
"taskId": null,
|
|
127
|
-
"epochId": null
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
`status` describes ledger maintenance only. It does not mean regression passed or migration completed. Missing provenance, invalid receipts, closure mismatches, schema failures, and report gaps belong in `unresolved`; requested test or review work belongs in `verificationRequests`.
|
|
133
|
-
|
|
134
|
-
## Boundaries
|
|
135
|
-
|
|
136
|
-
This Skill never:
|
|
137
|
-
|
|
138
|
-
- decides when targeted tests or full regression run;
|
|
139
|
-
- calls `droid2hmos test`, `checkpoint create`, `complete`, or `report render`;
|
|
140
|
-
- changes test scope or marks a failed, ignored, zero-execution, stale, or damaged result as passed;
|
|
141
|
-
- decides an outer workflow state or announces migration completion;
|
|
142
|
-
- uses report field completeness to override Android source, observable behavior, or Kernel denial.
|
|
143
|
-
|
|
144
|
-
The caller owns workflow transitions, test execution, checkpoint timing, completion gates, visual/business judgment, and final report delivery.
|
|
1
|
+
---
|
|
2
|
+
name: maintaining-migration-report
|
|
3
|
+
description: Maintain and validate the lightweight fact-linked Android-to-HarmonyOS migration ledger while implementation evidence is fresh. Record implementation files, Android source provenance, managed evidence, differences, discoveries, summary, and final-acceptance data without scheduling tests, regression, checkpoints, rendering, or completion.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Maintain the migration ledger
|
|
7
|
+
|
|
8
|
+
The migration report is a verifiable ledger linked to deterministic facts, Android source, HarmonyOS implementation files, and managed evidence. It is not the authority for application behavior: current Android source and observable behavior remain authoritative, and Kernel validation remains authoritative for machine gates.
|
|
9
|
+
|
|
10
|
+
All `.migration/...` paths below live in the sibling migration workspace `<android-project>-migration/.migration/` created by the CLI, never inside the Android project.
|
|
11
|
+
|
|
12
|
+
## Scope and inputs
|
|
13
|
+
|
|
14
|
+
This Skill owns only:
|
|
15
|
+
|
|
16
|
+
- `report init`, `report update`, and `report validate`;
|
|
17
|
+
- recording analyzer omissions in `discoveries.json`;
|
|
18
|
+
- maintaining `summary.json`;
|
|
19
|
+
- writing `final-acceptance.json` from test results and managed evidence supplied by the caller.
|
|
20
|
+
|
|
21
|
+
For an update, accept the Android project root, report ref, requested status, real HarmonyOS implementation files, current Android source files, managed evidence paths, and any real difference or blocker. When the caller has a current Task/epoch, also accept its identifier and source closure so provenance can be reconciled with the exact implementation unit. Never replace these inputs with a prose summary.
|
|
22
|
+
|
|
23
|
+
Read [references/source-provenance.md](references/source-provenance.md) whenever an item becomes `implemented` or `verified`. Read [references/final-acceptance.md](references/final-acceptance.md) when maintaining final acceptance.
|
|
24
|
+
|
|
25
|
+
## Invariants
|
|
26
|
+
|
|
27
|
+
- Treat `.migration/spec/facts/` and `.migration/spec/index.json` as immutable analyzer output. Never edit them to make validation pass.
|
|
28
|
+
- The JSON files under `.migration/report/` are lightweight overlays. Preserve stable refs, fact labels, and control-entry ownership generated by the CLI.
|
|
29
|
+
- Do not edit `.migration/report/index.json` or `validation.json`; host scripts own indexes, hashes, counts, and validation output.
|
|
30
|
+
- A mapping must name the concrete HarmonyOS file and symbol that performs the behavior. Imports, comments, ref strings, registries without executable wiring, generated hashes, stubs, and test-only symbols are not implementations.
|
|
31
|
+
- Compilation alone does not prove that a page, control, handler, navigation path, Dialog, or business function works.
|
|
32
|
+
- `implemented` and `verified` items require current Android `sourceProvenance`; a prose description or stale hash is insufficient.
|
|
33
|
+
- `verified` and passed final-acceptance tests require fresh Kernel-managed evidence. Never hand-write, copy, or modify receipts or archived artifacts.
|
|
34
|
+
- A receipt supports a ref only when `scope.coveredRefs` contains it, the structured result has a non-zero execution count with zero failures, errors, and ignored cases, the target matches, and archived artifacts pass integrity checks.
|
|
35
|
+
|
|
36
|
+
## Initialize and select work
|
|
37
|
+
|
|
38
|
+
Run once when no report exists:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
droid2hmos report init <android-project>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Start from `.migration/report/index.json`. Select only the shards relevant to the caller's current implementation or review. Follow each shard's `factsFile`, then read the Android source named by the fact and current source closure. Read additional Android source when facts are ambiguous or may omit behavior.
|
|
45
|
+
|
|
46
|
+
## Update one item
|
|
47
|
+
|
|
48
|
+
Update while implementation and source context are fresh. Preserve `ref`, `kind`, `factLabel`, and `controlRef`. Maintain only:
|
|
49
|
+
|
|
50
|
+
- `status`: `pending`, `implemented`, `verified`, or `blocked`;
|
|
51
|
+
- `harmonyosFiles[]`: project-relative files containing reachable implementation;
|
|
52
|
+
- `sourceProvenance[]`: current Android files and CLI-computed hashes;
|
|
53
|
+
- `testEvidence[]`: managed evidence whose `scope.coveredRefs` contains the ref;
|
|
54
|
+
- `difference`: `null` unless a real behavior difference or blocker exists.
|
|
55
|
+
|
|
56
|
+
Use the safe update interface:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
droid2hmos report update <android-project> --ref <ref> [--status <status>] [--harmony-file <path>...] [--android-source <path>...] [--evidence <path>...] [--difference <text>|--clear-difference]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The command must resolve exactly one existing ref and validates project files and source membership before writing. Use `--android-source` for every Android file that informed the implementation. If a current Task/epoch source closure exists, reconcile it before update; a closure member that affects the behavior but is absent from `sourceProvenance` is unresolved, not silently ignored.
|
|
63
|
+
|
|
64
|
+
Use statuses strictly:
|
|
65
|
+
|
|
66
|
+
- `pending`: not implemented;
|
|
67
|
+
- `implemented`: reachable implementation and source provenance exist, but item-specific runtime verification is incomplete;
|
|
68
|
+
- `verified`: implementation, provenance, and relevant managed evidence all exist and validate;
|
|
69
|
+
- `blocked`: implementation or verification is impossible for the concrete reason in `difference`.
|
|
70
|
+
|
|
71
|
+
If evidence is missing or invalid, keep the item at `implemented` (or `blocked` when appropriate) and return a verification request. Do not run a targeted test or full regression from this Skill.
|
|
72
|
+
|
|
73
|
+
## Record analyzer omissions
|
|
74
|
+
|
|
75
|
+
When Android source proves that deterministic facts missed a page, control, entry, interaction, or business feature, append a semantic record to `.migration/report/discoveries.json`. Include a unique `discovered.*` ref, kind, concise label, Android source evidence, implementation files, status, test evidence, and optional difference. Do not inject it into immutable facts.
|
|
76
|
+
|
|
77
|
+
Validate immediately after changing discoveries. A discovery is not automatically verified merely because its file exists.
|
|
78
|
+
|
|
79
|
+
## Maintain final acceptance
|
|
80
|
+
|
|
81
|
+
Only write final-acceptance results supplied by the caller from a real managed test run. Follow [references/final-acceptance.md](references/final-acceptance.md). This Skill checks schema, stable refs, `coveredRefs`, receipt freshness and integrity, and consistency between test status and blockers.
|
|
82
|
+
|
|
83
|
+
It does not decide when application-wide regression should run, choose or expand its scope, execute the suite, or decide whether the workflow may advance.
|
|
84
|
+
|
|
85
|
+
## Maintain the user summary
|
|
86
|
+
|
|
87
|
+
`summary.json` is the only free-form user summary. Keep it concise and limited to:
|
|
88
|
+
|
|
89
|
+
- `summary`: what has been migrated and what the validated evidence supports;
|
|
90
|
+
- `incomplete`: remaining behavior, why it remains, and user impact;
|
|
91
|
+
- `nextSteps`: concrete work still required;
|
|
92
|
+
- optional `additionalSections` for meaningful platform differences, risks, or usage notes.
|
|
93
|
+
|
|
94
|
+
Before updating the summary, run `report validate` and read `.migration/report/validation.json`. The prose must agree with that machine result:
|
|
95
|
+
|
|
96
|
+
- if validation says the ledger is incomplete or final acceptance is not passed, describe it as partial/incomplete;
|
|
97
|
+
- do not relabel pending or blocked behavior as harmless without a recorded decision;
|
|
98
|
+
- do not duplicate calculated counts, mappings, test inventories, or blocker lists owned by the renderer;
|
|
99
|
+
- do not add fields outside the current summary or final-acceptance schemas.
|
|
100
|
+
|
|
101
|
+
## Validate and return
|
|
102
|
+
|
|
103
|
+
After every semantic update, run:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
droid2hmos report validate <android-project>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Return the validation result without converting failure into success. `valid: true, complete: false` is acceptable during migration and does not authorize a completion claim.
|
|
110
|
+
|
|
111
|
+
Return a structured result:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"status": "completed | partial | failed",
|
|
116
|
+
"changedFiles": [],
|
|
117
|
+
"sourceFiles": [],
|
|
118
|
+
"evidence": [],
|
|
119
|
+
"domainChecks": [],
|
|
120
|
+
"unresolved": [],
|
|
121
|
+
"verificationRequests": [],
|
|
122
|
+
"suggestedRemediation": [],
|
|
123
|
+
"details": {
|
|
124
|
+
"updatedRefs": [],
|
|
125
|
+
"validation": {},
|
|
126
|
+
"taskId": null,
|
|
127
|
+
"epochId": null
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`status` describes ledger maintenance only. It does not mean regression passed or migration completed. Missing provenance, invalid receipts, closure mismatches, schema failures, and report gaps belong in `unresolved`; requested test or review work belongs in `verificationRequests`.
|
|
133
|
+
|
|
134
|
+
## Boundaries
|
|
135
|
+
|
|
136
|
+
This Skill never:
|
|
137
|
+
|
|
138
|
+
- decides when targeted tests or full regression run;
|
|
139
|
+
- calls `droid2hmos test`, `checkpoint create`, `complete`, or `report render`;
|
|
140
|
+
- changes test scope or marks a failed, ignored, zero-execution, stale, or damaged result as passed;
|
|
141
|
+
- decides an outer workflow state or announces migration completion;
|
|
142
|
+
- uses report field completeness to override Android source, observable behavior, or Kernel denial.
|
|
143
|
+
|
|
144
|
+
The caller owns workflow transitions, test execution, checkpoint timing, completion gates, visual/business judgment, and final report delivery.
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# Final acceptance ledger contract
|
|
2
|
-
|
|
3
|
-
`final-acceptance.json` records application-wide test results already produced by the caller. It does not schedule regression and does not decide that migration is complete.
|
|
4
|
-
|
|
5
|
-
## Required shape
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"reportShardVersion": "1.2.0",
|
|
10
|
-
"kind": "final-acceptance",
|
|
11
|
-
"status": "pending | passed | failed",
|
|
12
|
-
"tests": [
|
|
13
|
-
{
|
|
14
|
-
"ref": "acceptance.create-note-from-launcher",
|
|
15
|
-
"name": "从启动页进入首页并完成新增笔记",
|
|
16
|
-
"status": "passed | failed",
|
|
17
|
-
"evidence": [".migration/evidence/managed/test-harmony-all-<fingerprint>.json"]
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"blockers": [],
|
|
21
|
-
"notes": []
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Only these fields are allowed by `schemas/final-acceptance.schema.json`. `blockers` and `notes` are concise strings; do not add run IDs, commit hashes, nested blocker objects, or legacy aliases.
|
|
26
|
-
|
|
27
|
-
## Inputs from the caller
|
|
28
|
-
|
|
29
|
-
The caller supplies:
|
|
30
|
-
|
|
31
|
-
- the managed receipt from the application-wide suite it chose to run;
|
|
32
|
-
- the exact stable refs actually asserted by that suite;
|
|
33
|
-
- the structured execution totals and target device;
|
|
34
|
-
- any failed scenarios or external blockers;
|
|
35
|
-
- concise notes supported by observation.
|
|
36
|
-
|
|
37
|
-
Do not add every report ref to make coverage appear complete. A receipt may support only refs in its actual `scope.coveredRefs`.
|
|
38
|
-
|
|
39
|
-
## Recording rules
|
|
40
|
-
|
|
41
|
-
- Each test has a stable, unique, non-empty `ref` and a user-readable `name`.
|
|
42
|
-
- A `passed` test has at least one fresh managed receipt whose `scope.coveredRefs` contains that exact ref.
|
|
43
|
-
- The structured result must report a non-zero execution count and zero failures, errors, and ignored cases.
|
|
44
|
-
- The receipt must match current HarmonyOS source, facts and target device, and every archived artifact must pass size and SHA-256 checks.
|
|
45
|
-
- `status: passed` is invalid when tests are empty, any test failed, evidence is stale or damaged, coverage is absent, or blockers remain.
|
|
46
|
-
- When evidence is missing or invalid, record `pending` or `failed` according to observed results and return the gap; never synthesize a pass.
|
|
47
|
-
|
|
48
|
-
After writing, run `droid2hmos report validate <android-project>` and return its result unchanged. The caller, not this Skill, decides workflow state, runs any additional regression, invokes completion gates, and renders or delivers the final report.
|
|
1
|
+
# Final acceptance ledger contract
|
|
2
|
+
|
|
3
|
+
`final-acceptance.json` records application-wide test results already produced by the caller. It does not schedule regression and does not decide that migration is complete.
|
|
4
|
+
|
|
5
|
+
## Required shape
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"reportShardVersion": "1.2.0",
|
|
10
|
+
"kind": "final-acceptance",
|
|
11
|
+
"status": "pending | passed | failed",
|
|
12
|
+
"tests": [
|
|
13
|
+
{
|
|
14
|
+
"ref": "acceptance.create-note-from-launcher",
|
|
15
|
+
"name": "从启动页进入首页并完成新增笔记",
|
|
16
|
+
"status": "passed | failed",
|
|
17
|
+
"evidence": [".migration/evidence/managed/test-harmony-all-<fingerprint>.json"]
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"blockers": [],
|
|
21
|
+
"notes": []
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Only these fields are allowed by `schemas/final-acceptance.schema.json`. `blockers` and `notes` are concise strings; do not add run IDs, commit hashes, nested blocker objects, or legacy aliases.
|
|
26
|
+
|
|
27
|
+
## Inputs from the caller
|
|
28
|
+
|
|
29
|
+
The caller supplies:
|
|
30
|
+
|
|
31
|
+
- the managed receipt from the application-wide suite it chose to run;
|
|
32
|
+
- the exact stable refs actually asserted by that suite;
|
|
33
|
+
- the structured execution totals and target device;
|
|
34
|
+
- any failed scenarios or external blockers;
|
|
35
|
+
- concise notes supported by observation.
|
|
36
|
+
|
|
37
|
+
Do not add every report ref to make coverage appear complete. A receipt may support only refs in its actual `scope.coveredRefs`.
|
|
38
|
+
|
|
39
|
+
## Recording rules
|
|
40
|
+
|
|
41
|
+
- Each test has a stable, unique, non-empty `ref` and a user-readable `name`.
|
|
42
|
+
- A `passed` test has at least one fresh managed receipt whose `scope.coveredRefs` contains that exact ref.
|
|
43
|
+
- The structured result must report a non-zero execution count and zero failures, errors, and ignored cases.
|
|
44
|
+
- The receipt must match current HarmonyOS source, facts and target device, and every archived artifact must pass size and SHA-256 checks.
|
|
45
|
+
- `status: passed` is invalid when tests are empty, any test failed, evidence is stale or damaged, coverage is absent, or blockers remain.
|
|
46
|
+
- When evidence is missing or invalid, record `pending` or `failed` according to observed results and return the gap; never synthesize a pass.
|
|
47
|
+
|
|
48
|
+
After writing, run `droid2hmos report validate <android-project>` and return its result unchanged. The caller, not this Skill, decides workflow state, runs any additional regression, invokes completion gates, and renders or delivers the final report.
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
# Android source provenance
|
|
2
|
-
|
|
3
|
-
Use this contract whenever a report item becomes `implemented` or `verified`. Provenance binds a claim to current Android source; it does not prove runtime behavior and does not by itself prove that source was read before target code was written.
|
|
4
|
-
|
|
5
|
-
## Required inputs
|
|
6
|
-
|
|
7
|
-
For each report ref collect:
|
|
8
|
-
|
|
9
|
-
- the Android project root and exact report ref;
|
|
10
|
-
- every Android source file that informed the behavior, including manifests, Kotlin/Java, XML and relevant resources;
|
|
11
|
-
- the real HarmonyOS implementation files;
|
|
12
|
-
- the current Task and epoch identifiers when the caller has them;
|
|
13
|
-
- the current Task source closure, when available.
|
|
14
|
-
|
|
15
|
-
A prose summary, fact label, earlier report, or generated plan can help locate source but cannot replace current files.
|
|
16
|
-
|
|
17
|
-
## Safe update
|
|
18
|
-
|
|
19
|
-
Use the CLI so it verifies source membership and computes hashes:
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
droid2hmos report update <android-project> \
|
|
23
|
-
--ref <report-ref> \
|
|
24
|
-
--status implemented \
|
|
25
|
-
--harmony-file <harmony-file> \
|
|
26
|
-
--android-source <android-file> \
|
|
27
|
-
[--android-source <android-file>...]
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
`--android-source` records whole-file provenance. Prefer whole files when a symbol cannot be located deterministically. If the active host provides a schema-aware way to record precise ranges, every range must include `symbol`, `startLine`, and `endLine` and must satisfy `migration-report-item.schema.json`; do not bypass the safe update path with an ad hoc report edit.
|
|
31
|
-
|
|
32
|
-
## Source-closure reconciliation
|
|
33
|
-
|
|
34
|
-
When a current Task/epoch source closure exists:
|
|
35
|
-
|
|
36
|
-
1. compare its members with the Android files actually read for the behavior;
|
|
37
|
-
2. include every behavior-relevant member in `--android-source`;
|
|
38
|
-
3. treat a newly discovered relevant file as a closure/epoch issue for the caller to resolve;
|
|
39
|
-
4. do not silently add an unrelated file merely to satisfy a count;
|
|
40
|
-
5. do not mark the item `implemented` or `verified` while a relevant closure member is missing from provenance.
|
|
41
|
-
|
|
42
|
-
`report validate` generates `.migration/audit/android-source-manifest.json` and checks managed file membership and hashes. When a Task Plan is available it also reconciles report provenance with the plan's source closure.
|
|
43
|
-
|
|
44
|
-
## Evidence levels
|
|
45
|
-
|
|
46
|
-
- `declared-hash-validated`: the declared file is in the managed Android project and its SHA-256 matches the current file. This is the normal CLI guarantee.
|
|
47
|
-
- `observed-order-audited`: available only when a trusted host/runner supplies ordered Read/Write events for the same session and epoch and D1 passes.
|
|
48
|
-
- `enforced-prewrite`: not provided by the current CLI; ordinary writes are not intercepted before they occur.
|
|
49
|
-
|
|
50
|
-
Project-created `.migration/audit/source-events.jsonl` is not a trusted event source and must not upgrade the evidence level.
|
|
51
|
-
|
|
52
|
-
## D1 and D2 audits
|
|
53
|
-
|
|
54
|
-
D1 writes `.migration/audit/source-order-audit.json`:
|
|
55
|
-
|
|
56
|
-
- `passed`: trusted events show declared Android reads before the first target write in the same session/epoch;
|
|
57
|
-
- `red-flag`: reads are missing, late, concurrent in an invalid action group, malformed, or inconsistent; report validation fails;
|
|
58
|
-
- `unavailable`: no trusted event source exists; hash evidence remains usable, but read-before-write must not be claimed.
|
|
59
|
-
|
|
60
|
-
D2 writes `.migration/audit/literal-drift-audit.json`. It deterministically samples up to five implemented/verified refs and compares selected strings, colors, values and simple conditions. D2 warnings require source and behavior review; they are not automatic failures because i18n, resource renaming, unit conversion, theming, and equivalent refactors can be valid.
|
|
61
|
-
|
|
62
|
-
## Existing reports
|
|
63
|
-
|
|
64
|
-
`report init` upgrades supported older reports by adding empty `sourceProvenance` arrays without fabricating history. Existing `implemented` or `verified` claims remain invalid until current Android sources are declared and validation passes.
|
|
65
|
-
|
|
66
|
-
Return provenance or closure gaps to the caller as `unresolved`. This Skill does not create a checkpoint or invoke completion after provenance validation.
|
|
1
|
+
# Android source provenance
|
|
2
|
+
|
|
3
|
+
Use this contract whenever a report item becomes `implemented` or `verified`. Provenance binds a claim to current Android source; it does not prove runtime behavior and does not by itself prove that source was read before target code was written.
|
|
4
|
+
|
|
5
|
+
## Required inputs
|
|
6
|
+
|
|
7
|
+
For each report ref collect:
|
|
8
|
+
|
|
9
|
+
- the Android project root and exact report ref;
|
|
10
|
+
- every Android source file that informed the behavior, including manifests, Kotlin/Java, XML and relevant resources;
|
|
11
|
+
- the real HarmonyOS implementation files;
|
|
12
|
+
- the current Task and epoch identifiers when the caller has them;
|
|
13
|
+
- the current Task source closure, when available.
|
|
14
|
+
|
|
15
|
+
A prose summary, fact label, earlier report, or generated plan can help locate source but cannot replace current files.
|
|
16
|
+
|
|
17
|
+
## Safe update
|
|
18
|
+
|
|
19
|
+
Use the CLI so it verifies source membership and computes hashes:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
droid2hmos report update <android-project> \
|
|
23
|
+
--ref <report-ref> \
|
|
24
|
+
--status implemented \
|
|
25
|
+
--harmony-file <harmony-file> \
|
|
26
|
+
--android-source <android-file> \
|
|
27
|
+
[--android-source <android-file>...]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`--android-source` records whole-file provenance. Prefer whole files when a symbol cannot be located deterministically. If the active host provides a schema-aware way to record precise ranges, every range must include `symbol`, `startLine`, and `endLine` and must satisfy `migration-report-item.schema.json`; do not bypass the safe update path with an ad hoc report edit.
|
|
31
|
+
|
|
32
|
+
## Source-closure reconciliation
|
|
33
|
+
|
|
34
|
+
When a current Task/epoch source closure exists:
|
|
35
|
+
|
|
36
|
+
1. compare its members with the Android files actually read for the behavior;
|
|
37
|
+
2. include every behavior-relevant member in `--android-source`;
|
|
38
|
+
3. treat a newly discovered relevant file as a closure/epoch issue for the caller to resolve;
|
|
39
|
+
4. do not silently add an unrelated file merely to satisfy a count;
|
|
40
|
+
5. do not mark the item `implemented` or `verified` while a relevant closure member is missing from provenance.
|
|
41
|
+
|
|
42
|
+
`report validate` generates `.migration/audit/android-source-manifest.json` and checks managed file membership and hashes. When a Task Plan is available it also reconciles report provenance with the plan's source closure.
|
|
43
|
+
|
|
44
|
+
## Evidence levels
|
|
45
|
+
|
|
46
|
+
- `declared-hash-validated`: the declared file is in the managed Android project and its SHA-256 matches the current file. This is the normal CLI guarantee.
|
|
47
|
+
- `observed-order-audited`: available only when a trusted host/runner supplies ordered Read/Write events for the same session and epoch and D1 passes.
|
|
48
|
+
- `enforced-prewrite`: not provided by the current CLI; ordinary writes are not intercepted before they occur.
|
|
49
|
+
|
|
50
|
+
Project-created `.migration/audit/source-events.jsonl` is not a trusted event source and must not upgrade the evidence level.
|
|
51
|
+
|
|
52
|
+
## D1 and D2 audits
|
|
53
|
+
|
|
54
|
+
D1 writes `.migration/audit/source-order-audit.json`:
|
|
55
|
+
|
|
56
|
+
- `passed`: trusted events show declared Android reads before the first target write in the same session/epoch;
|
|
57
|
+
- `red-flag`: reads are missing, late, concurrent in an invalid action group, malformed, or inconsistent; report validation fails;
|
|
58
|
+
- `unavailable`: no trusted event source exists; hash evidence remains usable, but read-before-write must not be claimed.
|
|
59
|
+
|
|
60
|
+
D2 writes `.migration/audit/literal-drift-audit.json`. It deterministically samples up to five implemented/verified refs and compares selected strings, colors, values and simple conditions. D2 warnings require source and behavior review; they are not automatic failures because i18n, resource renaming, unit conversion, theming, and equivalent refactors can be valid.
|
|
61
|
+
|
|
62
|
+
## Existing reports
|
|
63
|
+
|
|
64
|
+
`report init` upgrades supported older reports by adding empty `sourceProvenance` arrays without fabricating history. Existing `implemented` or `verified` claims remain invalid until current Android sources are declared and validation passes.
|
|
65
|
+
|
|
66
|
+
Return provenance or closure gaps to the caller as `unresolved`. This Skill does not create a checkpoint or invoke completion after provenance validation.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: managing-d2h-toolchain
|
|
3
|
-
description: 独立检查、安装或升级迁移所需的精确版本 AppGraph 与 droid2hmos CLI。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 管理迁移工具链
|
|
7
|
-
|
|
8
|
-
本 Skill 是迁移流程检查和维护 AppGraph、droid2hmos 的入口。`toolchain.json` 声明精确 npm 坐标及必需的命令能力;`environment-requirements.json` 声明主机环境约束。其他 Agent/Skill 只使用通过检查的 CLI,不自行选择版本或安装。以下脚本随 Skill 一起复制,直接由 Node.js 执行。
|
|
9
|
-
|
|
10
|
-
## 检查与安装
|
|
11
|
-
|
|
12
|
-
在本 Skill 目录运行(Windows 可使用 `node.exe`):
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
node scripts/manage-toolchain.mjs check
|
|
16
|
-
node scripts/manage-toolchain.mjs install
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
1. 首先运行 `check`。脚本读取同目录 `toolchain.json`,分别调用 `appgraph --version`、`droid2hmos --version` 和清单中声明的命令能力探针,逐项报告指定版本、实际版本及能力。全部符合时退出码为 0;缺失或不符时退出码为 1。
|
|
20
|
-
2. `check` 失败时运行 `install`。脚本只对缺失、版本或能力不符的工具执行 `npm install --global <精确坐标>@<精确版本>`,随后重新检查。已符合要求的工具不会重装。安装失败或安装后仍不符合要求时停止迁移并报告错误;不能静默使用其他版本。
|
|
21
|
-
3. 已存在的全局 npm link 默认受保护。需要替换链接时,调用方须明确要求 `node scripts/manage-toolchain.mjs install --force`;它会重新安装清单中的全部精确版本。脚本不会修改链接指向的源码目录。
|
|
22
|
-
4. 安装完成后再运行一次 `check`,通过后才交给 `preparing-migration-workspace`。项目级 `droid2hmos preflight` 仍由准备 Skill 执行。
|
|
23
|
-
|
|
24
|
-
首次使用本 Skill 时,要求 Node.js 22.5–24.x 和 npm 可用。工具已符合清单要求时,`check` 直接通过,`install` 不重复安装。修改依赖版本时只修改本目录的 `toolchain.json`,同步更新环境约束和测试。其他 Skill 不执行 `npm install -g`、`npm update` 或浮动版本安装。
|
|
1
|
+
---
|
|
2
|
+
name: managing-d2h-toolchain
|
|
3
|
+
description: 独立检查、安装或升级迁移所需的精确版本 AppGraph 与 droid2hmos CLI。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 管理迁移工具链
|
|
7
|
+
|
|
8
|
+
本 Skill 是迁移流程检查和维护 AppGraph、droid2hmos 的入口。`toolchain.json` 声明精确 npm 坐标及必需的命令能力;`environment-requirements.json` 声明主机环境约束。其他 Agent/Skill 只使用通过检查的 CLI,不自行选择版本或安装。以下脚本随 Skill 一起复制,直接由 Node.js 执行。
|
|
9
|
+
|
|
10
|
+
## 检查与安装
|
|
11
|
+
|
|
12
|
+
在本 Skill 目录运行(Windows 可使用 `node.exe`):
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
node scripts/manage-toolchain.mjs check
|
|
16
|
+
node scripts/manage-toolchain.mjs install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
1. 首先运行 `check`。脚本读取同目录 `toolchain.json`,分别调用 `appgraph --version`、`droid2hmos --version` 和清单中声明的命令能力探针,逐项报告指定版本、实际版本及能力。全部符合时退出码为 0;缺失或不符时退出码为 1。
|
|
20
|
+
2. `check` 失败时运行 `install`。脚本只对缺失、版本或能力不符的工具执行 `npm install --global <精确坐标>@<精确版本>`,随后重新检查。已符合要求的工具不会重装。安装失败或安装后仍不符合要求时停止迁移并报告错误;不能静默使用其他版本。
|
|
21
|
+
3. 已存在的全局 npm link 默认受保护。需要替换链接时,调用方须明确要求 `node scripts/manage-toolchain.mjs install --force`;它会重新安装清单中的全部精确版本。脚本不会修改链接指向的源码目录。
|
|
22
|
+
4. 安装完成后再运行一次 `check`,通过后才交给 `preparing-migration-workspace`。项目级 `droid2hmos preflight` 仍由准备 Skill 执行。
|
|
23
|
+
|
|
24
|
+
首次使用本 Skill 时,要求 Node.js 22.5–24.x 和 npm 可用。工具已符合清单要求时,`check` 直接通过,`install` 不重复安装。修改依赖版本时只修改本目录的 `toolchain.json`,同步更新环境约束和测试。其他 Skill 不执行 `npm install -g`、`npm update` 或浮动版本安装。
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"tools": {
|
|
4
|
-
"node": { "minimum": "22.5.0", "maximumExclusive": "25.0.0" },
|
|
5
|
-
"python": { "minimum": "3.10.0" },
|
|
6
|
-
"git": null,
|
|
7
|
-
"npm": null,
|
|
8
|
-
"java": null,
|
|
9
|
-
"python-json5": null,
|
|
10
|
-
"appgraph": { "minimum": "0.0.
|
|
11
|
-
"droid2hmos": { "minimum": "0.0.
|
|
12
|
-
"hvigor": null,
|
|
13
|
-
"ohpm": null,
|
|
14
|
-
"devecocli": null
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"tools": {
|
|
4
|
+
"node": { "minimum": "22.5.0", "maximumExclusive": "25.0.0" },
|
|
5
|
+
"python": { "minimum": "3.10.0" },
|
|
6
|
+
"git": null,
|
|
7
|
+
"npm": null,
|
|
8
|
+
"java": null,
|
|
9
|
+
"python-json5": null,
|
|
10
|
+
"appgraph": { "minimum": "0.0.11", "maximumExclusive": "0.0.12" },
|
|
11
|
+
"droid2hmos": { "minimum": "0.0.12", "maximumExclusive": "0.0.13" },
|
|
12
|
+
"hvigor": null,
|
|
13
|
+
"ohpm": null,
|
|
14
|
+
"devecocli": null
|
|
15
|
+
}
|
|
16
|
+
}
|