@buaa_smat/hometrans 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -136
- package/agents/build-fixer.md +38 -48
- package/agents/code-reviewer.md +20 -20
- package/agents/logic-coder.md +8 -8
- package/agents/logic-context-builder.md +5 -5
- package/agents/review-fixer.md +16 -16
- package/agents/self-test-fixer.md +15 -15
- package/agents/self-tester.md +56 -55
- package/agents/spec-generator.md +16 -16
- package/dist/cli/config-store.js +120 -9
- package/dist/cli/config.js +4 -4
- package/dist/cli/env-vars.js +129 -0
- package/dist/cli/init.js +315 -276
- package/dist/cli/uninstall.js +152 -17
- package/dist/context/index.js +10 -197
- package/env-requirements.json +181 -181
- package/package.json +1 -1
- package/resource/choose_editor.png +0 -0
- package/resource/common_config.png +0 -0
- package/resource/integration_test_config.png +0 -0
- package/resource/migration_process.svg +94 -0
- package/resource/migration_process_transparent.svg +93 -0
- package/resource/set_env.png +0 -0
- package/resource/ui_align_config.png +0 -0
- package/skills/hmos-batch-ui-align/SKILL.md +10 -0
- package/skills/hmos-batch-ui-align/references/conversion-procedure.md +180 -180
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-batch-ui-align/references/mvvm/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -648
- package/skills/hmos-batch-ui-align/references/mvvm/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2088 -2088
- package/skills/hmos-batch-ui-align/references/mvvm/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -1033
- package/skills/hmos-batch-ui-align/references/mvvm/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -1183
- package/skills/hmos-batch-ui-align/references/mvvm/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -576
- package/skills/hmos-batch-ui-align/references/mvvm/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -297
- package/skills/hmos-batch-ui-align/references/mvvm/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -395
- package/skills/hmos-batch-ui-align/references/mvvm/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +902 -902
- package/skills/hmos-batch-ui-align/references/mvvm/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-batch-ui-align/references/mvvm/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -1178
- package/skills/hmos-batch-ui-align/references/mvvm/MVVM/346/250/241/345/274/217/357/274/210V1/357/274/211.md +911 -911
- package/skills/hmos-batch-ui-align/references/mvvm/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +354 -354
- package/skills/hmos-batch-ui-align/references/mvvm//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -11
- package/skills/hmos-convert-pipeline/SKILL.md +63 -49
- package/skills/hmos-fix-build-errors/SKILL.md +5 -6
- package/skills/hmos-fix-build-errors/references/arkts-strict-patterns.md +219 -219
- package/skills/hmos-fix-build-errors/references/known-patterns.md +157 -157
- package/skills/hmos-fix-build-errors/references/rdb-entity-pattern.md +131 -131
- package/skills/hmos-incremental-ui-align/{readme.md → README.md} +28 -21
- package/skills/hmos-incremental-ui-align/SKILL.md +46 -27
- package/skills/hmos-incremental-ui-align/diff_analysis.md +52 -52
- package/skills/hmos-incremental-ui-align/page_align.md +62 -62
- package/skills/hmos-incremental-ui-align/references/Comparison_Template.md +2 -2
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Link/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/217/214/345/220/221/345/220/214/346/255/245.md +648 -648
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Observed/350/243/205/351/245/260/345/231/250/345/222/214@ObjectLink/350/243/205/351/245/260/345/231/250/357/274/232/345/265/214/345/245/227/347/261/273/345/257/271/350/261/241/345/261/236/346/200/247/345/217/230/345/214/226.md +2088 -2088
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Prop/350/243/205/351/245/260/345/231/250/357/274/232/347/210/266/345/255/220/345/215/225/345/220/221/345/220/214/346/255/245.md +1033 -1033
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Provide/350/243/205/351/245/260/345/231/250/345/222/214@Consume/350/243/205/351/245/260/345/231/250/357/274/232/344/270/216/345/220/216/344/273/243/347/273/204/344/273/266/345/217/214/345/220/221/345/220/214/346/255/245.md +1183 -1183
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@State/350/243/205/351/245/260/345/231/250/357/274/232/347/273/204/344/273/266/345/206/205/347/212/266/346/200/201.md +576 -576
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Track/350/243/205/351/245/260/345/231/250/357/274/232class/345/257/271/350/261/241/345/261/236/346/200/247/347/272/247/346/233/264/346/226/260.md +297 -297
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/@Watch/350/243/205/351/245/260/345/231/250/357/274/232/347/212/266/346/200/201/345/217/230/351/207/217/346/233/264/346/224/271/351/200/232/347/237/245.md +395 -395
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/AppStorage/357/274/232/345/272/224/347/224/250/345/205/250/345/261/200/347/232/204UI/347/212/266/346/200/201/345/255/230/345/202/250.md +902 -902
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/Environment/357/274/232/350/256/276/345/244/207/347/216/257/345/242/203/346/237/245/350/257/242.md +106 -106
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/LocalStorage/357/274/232/351/241/265/351/235/242/347/272/247UI/347/212/266/346/200/201/345/255/230/345/202/250.md +1178 -1178
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/MVVM/346/250/241/345/274/217V1.md +911 -911
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243/PersistentStorage/357/274/232/346/214/201/344/271/205/345/214/226/345/255/230/345/202/250UI/347/212/266/346/200/201.md +354 -354
- package/skills/hmos-incremental-ui-align/references/MVVM/345/274/200/345/217/221/346/226/207/346/241/243//347/256/241/347/220/206/345/272/224/347/224/250/346/213/245/346/234/211/347/232/204/347/212/266/346/200/201/346/246/202/350/277/260.md +11 -11
- package/skills/hmos-incremental-ui-align/references/UI_Analysis_Template.md +3 -3
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2533 -2533
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-interaction-mapping-reference.md +555 -555
- package/skills/hmos-incremental-ui-align/references/android-to-harmonyOS-ui-layout-mapping-reference.md +117 -117
- package/skills/hmos-incremental-ui-align/scripts/navigation-capure.md +37 -37
- package/skills/hmos-integration-test/{readme.md → README.md} +38 -38
- package/skills/hmos-integration-test/SKILL.md +63 -52
- package/skills/hmos-resources-convert/SKILL.md +5 -5
- package/skills/hmos-resources-convert/references/conversion-rules.md +663 -663
- package/skills/hmos-resources-convert/references/dependency-analysis-rules.md +388 -388
- package/skills/hmos-resources-convert/references/resource-mapping-rules.md +457 -457
- package/skills/hmos-resources-convert/references/xml-drawable-to-svg-rules.md +513 -513
- package/skills/hmos-spec-generate/SKILL.md +19 -19
- package/skills/hmos-spec-generate/references/android-platform-tokens.md +105 -105
- package/skills/hmos-spec-generate/references/spec-sample-1.md +78 -78
- package/skills/hmos-spec-generate/references/spec-sample-2.md +58 -58
- package/skills/hmos-spec-generate/references/spec-sample-3.md +116 -116
- package/skills/hmos-spec-generate/references/step4-report-template.md +33 -33
- package/tools/test-tools/autotest/README.md +33 -17
- package/tools/test-tools/autotest/self_test_runner.py +109 -15
- package/resource/hometrans_config.png +0 -0
- package/skills/hmos-incremental-ui-align/config-example.json +0 -11
- package/tools/test-tools/autotest/config.yaml.example +0 -58
package/env-requirements.json
CHANGED
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": [
|
|
3
|
-
"Declarative environment requirements for `ht init`.",
|
|
4
|
-
"`ht init` reads this file to (1) detect external tools and (2) report which",
|
|
5
|
-
"skills/agents are BLOCKED / LIMITED / OK by anything missing.",
|
|
6
|
-
"",
|
|
7
|
-
"tools[<id>]:",
|
|
8
|
-
" source 'path' -> locate a runnable command (where/which) trying each alias;",
|
|
9
|
-
" 'env-dir' -> a directory existence check (envVar resolved from ht config).",
|
|
10
|
-
" aliases command names to try in order (e.g. python, python3, py). First hit wins.",
|
|
11
|
-
" verify argv passed to the resolved command to print its version (existence proof too).",
|
|
12
|
-
" Use a flag that prints-and-exits. NEVER use `python -v` (verbose REPL -> hangs);",
|
|
13
|
-
" use `python --version`.",
|
|
14
|
-
" versionStream 'stdout' (default) or 'stderr' (java -version prints to stderr).",
|
|
15
|
-
" versionRegex capture group(s) for the numeric version in the verify output.",
|
|
16
|
-
" version default required range for this tool, {min, max} as [min, max) — min",
|
|
17
|
-
" inclusive, max exclusive; either may be null/omitted = unbounded. A",
|
|
18
|
-
" requirement dependency may override this.",
|
|
19
|
-
" fallback when not on PATH, probe <base>/<segments>/<exe>. base is a config env key",
|
|
20
|
-
" (DEVECO_SDK_HOME /
|
|
21
|
-
" hint shown when the tool is missing.",
|
|
22
|
-
"",
|
|
23
|
-
"requirements[]: name + kind (skill|agent) + dependencies[] of",
|
|
24
|
-
" { tool, level: 'required'|'optional', version?: {min,max} }.",
|
|
25
|
-
" A missing 'required' tool -> BLOCKED; only 'optional' missing -> LIMITED; else OK."
|
|
26
|
-
],
|
|
27
|
-
|
|
28
|
-
"tools": {
|
|
29
|
-
"deveco": {
|
|
30
|
-
"source": "env-dir",
|
|
31
|
-
"envVar": "DEVECO_SDK_HOME",
|
|
32
|
-
"hint": "set DEVECO_SDK_HOME via `ht init` (DevEco Studio install)"
|
|
33
|
-
},
|
|
34
|
-
"adb": {
|
|
35
|
-
"source": "path",
|
|
36
|
-
"aliases": ["adb"],
|
|
37
|
-
"verify": ["version"],
|
|
38
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
39
|
-
"hint": "Android SDK platform-tools (needed for Android-device capture)"
|
|
40
|
-
},
|
|
41
|
-
"hdc": {
|
|
42
|
-
"source": "path",
|
|
43
|
-
"aliases": ["hdc"],
|
|
44
|
-
"verify": ["-v"],
|
|
45
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
46
|
-
"fallback": { "base": "DEVECO_SDK_HOME", "segments": ["default", "openharmony", "toolchains"], "exe": "hdc" },
|
|
47
|
-
"hint": "ships with DevEco: <sdk>/default/openharmony/toolchains"
|
|
48
|
-
},
|
|
49
|
-
"python": {
|
|
50
|
-
"source": "path",
|
|
51
|
-
"aliases": ["python", "python3", "py"],
|
|
52
|
-
"verify": ["--version"],
|
|
53
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
54
|
-
"version": { "min": "3.10.0", "max": null },
|
|
55
|
-
"hint": "install Python >= 3.10 and add to PATH (UI-align capture/parse scripts)"
|
|
56
|
-
},
|
|
57
|
-
"uv": {
|
|
58
|
-
"source": "path",
|
|
59
|
-
"aliases": ["uv"],
|
|
60
|
-
"verify": ["--version"],
|
|
61
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
62
|
-
"hint": "https://docs.astral.sh/uv (AutoTest runs under uv)"
|
|
63
|
-
},
|
|
64
|
-
"java": {
|
|
65
|
-
"source": "path",
|
|
66
|
-
"aliases": ["java"],
|
|
67
|
-
"verify": ["-version"],
|
|
68
|
-
"versionStream": "stderr",
|
|
69
|
-
"versionRegex": "(\\d+(?:\\.\\d+){1,2})",
|
|
70
|
-
"fallback": { "base": "
|
|
71
|
-
"hint": "any JDK 17+, or reuse DevEco jbr: <deveco>/jbr/bin"
|
|
72
|
-
},
|
|
73
|
-
"gitnexus": {
|
|
74
|
-
"source": "path",
|
|
75
|
-
"aliases": ["gitnexus"],
|
|
76
|
-
"verify": ["--version"],
|
|
77
|
-
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
78
|
-
"hint": "npm i -g gitnexus && gitnexus setup"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
"requirements": [
|
|
83
|
-
{
|
|
84
|
-
"name": "hmos-spec-generate",
|
|
85
|
-
"kind": "skill",
|
|
86
|
-
"dependencies": [{ "tool": "gitnexus", "level": "required" }]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "hmos-resources-convert",
|
|
90
|
-
"kind": "skill",
|
|
91
|
-
"dependencies": [{ "tool": "java", "level": "optional" }],
|
|
92
|
-
"note": "no java -> falls back to source res/"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "hmos-batch-ui-align",
|
|
96
|
-
"kind": "skill",
|
|
97
|
-
"dependencies": [
|
|
98
|
-
{ "tool": "python", "level": "required", "version": { "min": "3.10.0", "max": null } },
|
|
99
|
-
{ "tool": "adb", "level": "optional" }
|
|
100
|
-
],
|
|
101
|
-
"note": "adb only for page exploration"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"name": "hmos-incremental-ui-align",
|
|
105
|
-
"kind": "skill",
|
|
106
|
-
"dependencies": [
|
|
107
|
-
{ "tool": "deveco", "level": "required" },
|
|
108
|
-
{ "tool": "python", "level": "required", "version": { "min": "3.10.0", "max": null } },
|
|
109
|
-
{ "tool": "hdc", "level": "required" },
|
|
110
|
-
{ "tool": "adb", "level": "required" }
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"name": "hmos-integration-test",
|
|
115
|
-
"kind": "skill",
|
|
116
|
-
"dependencies": [
|
|
117
|
-
{ "tool": "deveco", "level": "required" },
|
|
118
|
-
{ "tool": "uv", "level": "required" },
|
|
119
|
-
{ "tool": "hdc", "level": "required" }
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"name": "hmos-fix-build-errors",
|
|
124
|
-
"kind": "skill",
|
|
125
|
-
"dependencies": [{ "tool": "deveco", "level": "required" }]
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"name": "hmos-convert-pipeline",
|
|
129
|
-
"kind": "skill",
|
|
130
|
-
"dependencies": [
|
|
131
|
-
{ "tool": "deveco", "level": "required" },
|
|
132
|
-
{ "tool": "uv", "level": "optional" },
|
|
133
|
-
{ "tool": "hdc", "level": "optional" }
|
|
134
|
-
],
|
|
135
|
-
"note": "test stage skippable via
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "logic-context-builder",
|
|
139
|
-
"kind": "agent",
|
|
140
|
-
"dependencies": [{ "tool": "python", "level": "optional" }]
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"name": "logic-coder",
|
|
144
|
-
"kind": "agent",
|
|
145
|
-
"dependencies": [{ "tool": "python", "level": "optional" }]
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "spec-generator",
|
|
149
|
-
"kind": "agent",
|
|
150
|
-
"dependencies": [{ "tool": "gitnexus", "level": "required" }]
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"name": "build-fixer",
|
|
154
|
-
"kind": "agent",
|
|
155
|
-
"dependencies": [{ "tool": "deveco", "level": "required" }]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"name": "code-reviewer",
|
|
159
|
-
"kind": "agent",
|
|
160
|
-
"dependencies": [{ "tool": "deveco", "level": "optional" }]
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"name": "review-fixer",
|
|
164
|
-
"kind": "agent",
|
|
165
|
-
"dependencies": []
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"name": "self-tester",
|
|
169
|
-
"kind": "agent",
|
|
170
|
-
"dependencies": [
|
|
171
|
-
{ "tool": "uv", "level": "required" },
|
|
172
|
-
{ "tool": "hdc", "level": "required" }
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"name": "self-test-fixer",
|
|
177
|
-
"kind": "agent",
|
|
178
|
-
"dependencies": []
|
|
179
|
-
}
|
|
180
|
-
]
|
|
181
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": [
|
|
3
|
+
"Declarative environment requirements for `ht init`.",
|
|
4
|
+
"`ht init` reads this file to (1) detect external tools and (2) report which",
|
|
5
|
+
"skills/agents are BLOCKED / LIMITED / OK by anything missing.",
|
|
6
|
+
"",
|
|
7
|
+
"tools[<id>]:",
|
|
8
|
+
" source 'path' -> locate a runnable command (where/which) trying each alias;",
|
|
9
|
+
" 'env-dir' -> a directory existence check (envVar resolved from ht config).",
|
|
10
|
+
" aliases command names to try in order (e.g. python, python3, py). First hit wins.",
|
|
11
|
+
" verify argv passed to the resolved command to print its version (existence proof too).",
|
|
12
|
+
" Use a flag that prints-and-exits. NEVER use `python -v` (verbose REPL -> hangs);",
|
|
13
|
+
" use `python --version`.",
|
|
14
|
+
" versionStream 'stdout' (default) or 'stderr' (java -version prints to stderr).",
|
|
15
|
+
" versionRegex capture group(s) for the numeric version in the verify output.",
|
|
16
|
+
" version default required range for this tool, {min, max} as [min, max) — min",
|
|
17
|
+
" inclusive, max exclusive; either may be null/omitted = unbounded. A",
|
|
18
|
+
" requirement dependency may override this.",
|
|
19
|
+
" fallback when not on PATH, probe <base>/<segments>/<exe>. base is a config env key",
|
|
20
|
+
" (DEVECO_SDK_HOME / DEVECO_HOME). Mirrors how the skills resolve hdc/java.",
|
|
21
|
+
" hint shown when the tool is missing.",
|
|
22
|
+
"",
|
|
23
|
+
"requirements[]: name + kind (skill|agent) + dependencies[] of",
|
|
24
|
+
" { tool, level: 'required'|'optional', version?: {min,max} }.",
|
|
25
|
+
" A missing 'required' tool -> BLOCKED; only 'optional' missing -> LIMITED; else OK."
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
"tools": {
|
|
29
|
+
"deveco": {
|
|
30
|
+
"source": "env-dir",
|
|
31
|
+
"envVar": "DEVECO_SDK_HOME",
|
|
32
|
+
"hint": "set DEVECO_SDK_HOME via `ht init` (DevEco Studio install)"
|
|
33
|
+
},
|
|
34
|
+
"adb": {
|
|
35
|
+
"source": "path",
|
|
36
|
+
"aliases": ["adb"],
|
|
37
|
+
"verify": ["version"],
|
|
38
|
+
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
39
|
+
"hint": "Android SDK platform-tools (needed for Android-device capture)"
|
|
40
|
+
},
|
|
41
|
+
"hdc": {
|
|
42
|
+
"source": "path",
|
|
43
|
+
"aliases": ["hdc"],
|
|
44
|
+
"verify": ["-v"],
|
|
45
|
+
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
46
|
+
"fallback": { "base": "DEVECO_SDK_HOME", "segments": ["default", "openharmony", "toolchains"], "exe": "hdc" },
|
|
47
|
+
"hint": "ships with DevEco: <sdk>/default/openharmony/toolchains"
|
|
48
|
+
},
|
|
49
|
+
"python": {
|
|
50
|
+
"source": "path",
|
|
51
|
+
"aliases": ["python", "python3", "py"],
|
|
52
|
+
"verify": ["--version"],
|
|
53
|
+
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
54
|
+
"version": { "min": "3.10.0", "max": null },
|
|
55
|
+
"hint": "install Python >= 3.10 and add to PATH (UI-align capture/parse scripts)"
|
|
56
|
+
},
|
|
57
|
+
"uv": {
|
|
58
|
+
"source": "path",
|
|
59
|
+
"aliases": ["uv"],
|
|
60
|
+
"verify": ["--version"],
|
|
61
|
+
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
62
|
+
"hint": "https://docs.astral.sh/uv (AutoTest runs under uv)"
|
|
63
|
+
},
|
|
64
|
+
"java": {
|
|
65
|
+
"source": "path",
|
|
66
|
+
"aliases": ["java"],
|
|
67
|
+
"verify": ["-version"],
|
|
68
|
+
"versionStream": "stderr",
|
|
69
|
+
"versionRegex": "(\\d+(?:\\.\\d+){1,2})",
|
|
70
|
+
"fallback": { "base": "DEVECO_HOME", "segments": ["jbr", "bin"], "exe": "java" },
|
|
71
|
+
"hint": "any JDK 17+, or reuse DevEco jbr: <deveco>/jbr/bin"
|
|
72
|
+
},
|
|
73
|
+
"gitnexus": {
|
|
74
|
+
"source": "path",
|
|
75
|
+
"aliases": ["gitnexus"],
|
|
76
|
+
"verify": ["--version"],
|
|
77
|
+
"versionRegex": "(\\d+\\.\\d+(?:\\.\\d+)?)",
|
|
78
|
+
"hint": "npm i -g gitnexus && gitnexus setup"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
"requirements": [
|
|
83
|
+
{
|
|
84
|
+
"name": "hmos-spec-generate",
|
|
85
|
+
"kind": "skill",
|
|
86
|
+
"dependencies": [{ "tool": "gitnexus", "level": "required" }]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "hmos-resources-convert",
|
|
90
|
+
"kind": "skill",
|
|
91
|
+
"dependencies": [{ "tool": "java", "level": "optional" }],
|
|
92
|
+
"note": "no java -> falls back to source res/"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "hmos-batch-ui-align",
|
|
96
|
+
"kind": "skill",
|
|
97
|
+
"dependencies": [
|
|
98
|
+
{ "tool": "python", "level": "required", "version": { "min": "3.10.0", "max": null } },
|
|
99
|
+
{ "tool": "adb", "level": "optional" }
|
|
100
|
+
],
|
|
101
|
+
"note": "adb only for page exploration"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "hmos-incremental-ui-align",
|
|
105
|
+
"kind": "skill",
|
|
106
|
+
"dependencies": [
|
|
107
|
+
{ "tool": "deveco", "level": "required" },
|
|
108
|
+
{ "tool": "python", "level": "required", "version": { "min": "3.10.0", "max": null } },
|
|
109
|
+
{ "tool": "hdc", "level": "required" },
|
|
110
|
+
{ "tool": "adb", "level": "required" }
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "hmos-integration-test",
|
|
115
|
+
"kind": "skill",
|
|
116
|
+
"dependencies": [
|
|
117
|
+
{ "tool": "deveco", "level": "required" },
|
|
118
|
+
{ "tool": "uv", "level": "required" },
|
|
119
|
+
{ "tool": "hdc", "level": "required" }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "hmos-fix-build-errors",
|
|
124
|
+
"kind": "skill",
|
|
125
|
+
"dependencies": [{ "tool": "deveco", "level": "required" }]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "hmos-convert-pipeline",
|
|
129
|
+
"kind": "skill",
|
|
130
|
+
"dependencies": [
|
|
131
|
+
{ "tool": "deveco", "level": "required" },
|
|
132
|
+
{ "tool": "uv", "level": "optional" },
|
|
133
|
+
{ "tool": "hdc", "level": "optional" }
|
|
134
|
+
],
|
|
135
|
+
"note": "test stage skippable via skip_test"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "logic-context-builder",
|
|
139
|
+
"kind": "agent",
|
|
140
|
+
"dependencies": [{ "tool": "python", "level": "optional" }]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "logic-coder",
|
|
144
|
+
"kind": "agent",
|
|
145
|
+
"dependencies": [{ "tool": "python", "level": "optional" }]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "spec-generator",
|
|
149
|
+
"kind": "agent",
|
|
150
|
+
"dependencies": [{ "tool": "gitnexus", "level": "required" }]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "build-fixer",
|
|
154
|
+
"kind": "agent",
|
|
155
|
+
"dependencies": [{ "tool": "deveco", "level": "required" }]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "code-reviewer",
|
|
159
|
+
"kind": "agent",
|
|
160
|
+
"dependencies": [{ "tool": "deveco", "level": "optional" }]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "review-fixer",
|
|
164
|
+
"kind": "agent",
|
|
165
|
+
"dependencies": []
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "self-tester",
|
|
169
|
+
"kind": "agent",
|
|
170
|
+
"dependencies": [
|
|
171
|
+
{ "tool": "uv", "level": "required" },
|
|
172
|
+
{ "tool": "hdc", "level": "required" }
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "self-test-fixer",
|
|
177
|
+
"kind": "agent",
|
|
178
|
+
"dependencies": []
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buaa_smat/hometrans",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "HomeTrans (Android-to-HarmonyOS) skill + agent installer. Run `ht init` to distribute conversion skills and subagents into AI editors.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1120 1080" width="1120" height="1080">
|
|
2
|
+
<style>
|
|
3
|
+
text { font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif; }
|
|
4
|
+
.title { font-size: 20px; font-weight: 600; fill: #111827; }
|
|
5
|
+
.sub { font-size: 12px; fill: #6b7280; }
|
|
6
|
+
.banner{ font-size: 12px; fill: #047857; font-weight: 600; }
|
|
7
|
+
.nt { font-size: 14px; font-weight: 600; fill: #111827; }
|
|
8
|
+
.ns { font-size: 11px; fill: #6b7280; }
|
|
9
|
+
.pin { font-size: 11px; fill: #1d4ed8; }
|
|
10
|
+
.pout { font-size: 11px; fill: #047857; }
|
|
11
|
+
.dlab { font-size: 11px; font-weight: 600; fill: #047857; }
|
|
12
|
+
.lg { font-size: 12px; fill: #374151; }
|
|
13
|
+
</style>
|
|
14
|
+
<defs>
|
|
15
|
+
<marker id="arrow" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
16
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#2563eb"/>
|
|
17
|
+
</marker>
|
|
18
|
+
<marker id="arrowg" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
19
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#059669"/>
|
|
20
|
+
</marker>
|
|
21
|
+
</defs>
|
|
22
|
+
<rect width="1120" height="1080" fill="#ffffff"/>
|
|
23
|
+
<text x="40" y="40" class="title">Android → HarmonyOS 迁移流程 · 含参数传递</text>
|
|
24
|
+
<text x="40" y="62" class="sub">蓝箭头=执行顺序;绿色=参数/产物传递;橙色框=人工介入</text>
|
|
25
|
+
<rect x="280" y="70" width="560" height="44" rx="8" fill="#ecfdf5" stroke="#10b981" stroke-width="1.4" stroke-dasharray="6,4"/>
|
|
26
|
+
<text x="560" y="90" text-anchor="middle" class="banner">公共入参(所有步骤共享):android_project_dir · harmony_project_dir</text>
|
|
27
|
+
<text x="560" y="106" text-anchor="middle" class="banner">步骤2 产物写入 harmony_project_dir,步骤4 据此构建</text>
|
|
28
|
+
<rect x="340" y="140" width="440" height="50" rx="25.0" fill="#f0fdf4" stroke="#16a34a" stroke-width="1.6"/>
|
|
29
|
+
<text x="560" y="170" text-anchor="middle" class="nt">开始:准备 Android 源项目 + 鸿蒙目标项目</text>
|
|
30
|
+
<rect x="100" y="292" width="440" height="96" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
31
|
+
<text x="320" y="310" text-anchor="middle" class="nt">步骤1.1 UI 迁移</text>
|
|
32
|
+
<text x="320" y="328" text-anchor="middle" class="ns">skill:hmos-batch-ui-align</text>
|
|
33
|
+
<text x="320" y="348" text-anchor="middle" class="pin">入参: 公共入参 + [ui_info_root, pages]</text>
|
|
34
|
+
<text x="320" y="367" text-anchor="middle" class="pout">出参: ArkTS页面 + 资源(含资源转换) + 批量报告</text>
|
|
35
|
+
<rect x="580" y="292" width="440" height="96" rx="9" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.6" stroke-dasharray="6,4"/>
|
|
36
|
+
<text x="800" y="310" text-anchor="middle" class="nt">步骤1.2 UI 对齐</text>
|
|
37
|
+
<text x="800" y="328" text-anchor="middle" class="ns">skill:hmos-incremental-ui-align</text>
|
|
38
|
+
<text x="800" y="348" text-anchor="middle" class="pin">入参: 公共入参 + [capture_output_dir]</text>
|
|
39
|
+
<text x="800" y="367" text-anchor="middle" class="pout">出参: 修改后ArkTS页面 + 双端截图/视图树 + 对齐报告</text>
|
|
40
|
+
<rect x="330" y="448" width="460" height="64" rx="9" fill="#fff7ed" stroke="#ea580c" stroke-width="1.6"/>
|
|
41
|
+
<circle cx="354.0" cy="473" r="4.5" fill="#ea580c"/>
|
|
42
|
+
<path d="M 347.0,488 Q 354.0,479 361.0,488" fill="none" stroke="#ea580c" stroke-width="2.2" stroke-linecap="round"/>
|
|
43
|
+
<text x="574" y="472" text-anchor="middle" class="nt">编写 REQ.txt(需求描述)</text>
|
|
44
|
+
<text x="574" y="492" text-anchor="middle" class="ns">使用自然语言描述原始需求,用空行分隔多个需求</text>
|
|
45
|
+
<text x="574" y="509" text-anchor="middle" class="pout">产出: REQ.txt</text>
|
|
46
|
+
<rect x="310" y="562" width="500" height="96" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
47
|
+
<text x="560" y="580" text-anchor="middle" class="nt">步骤2 生成需求规格</text>
|
|
48
|
+
<text x="560" y="598" text-anchor="middle" class="ns">skill:hmos-spec-generate</text>
|
|
49
|
+
<text x="560" y="618" text-anchor="middle" class="pin">入参: 公共入参 + requirement_description_file(=REQ.txt) + spec_output_dir</text>
|
|
50
|
+
<text x="560" y="637" text-anchor="middle" class="pout">出参: 〈feature〉-SPEC.md + .trace/〈feature〉.md</text>
|
|
51
|
+
<rect x="310" y="710" width="500" height="80" rx="9" fill="#fff7ed" stroke="#ea580c" stroke-width="1.6"/>
|
|
52
|
+
<circle cx="334.0" cy="743" r="4.5" fill="#ea580c"/>
|
|
53
|
+
<path d="M 327.0,758 Q 334.0,749 341.0,758" fill="none" stroke="#ea580c" stroke-width="2.2" stroke-linecap="round"/>
|
|
54
|
+
<text x="574" y="734" text-anchor="middle" class="nt">编写测试用例 + 连鸿蒙真机 / 配置签名</text>
|
|
55
|
+
<text x="574" y="754" text-anchor="middle" class="ns">如果不执行步骤4中的集成测试(skip_test=true)可跳过此步骤</text>
|
|
56
|
+
<text x="574" y="771" text-anchor="middle" class="pout">产出: test_case.md / pre_test_case.md</text>
|
|
57
|
+
<rect x="300" y="842" width="520" height="96" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
58
|
+
<text x="560" y="860" text-anchor="middle" class="nt">步骤3 逻辑代码转换流水线</text>
|
|
59
|
+
<text x="560" y="878" text-anchor="middle" class="ns">skill:hmos-convert-pipeline</text>
|
|
60
|
+
<text x="560" y="898" text-anchor="middle" class="pin">入参: 公共入参 + spec_file_path(=SPEC.md) + [test_case_path, pre_test_case_path, skip_test …]</text>
|
|
61
|
+
<text x="560" y="917" text-anchor="middle" class="pout">出参: 已签名HAP + pipeline-manifest.md + 各阶段报告</text>
|
|
62
|
+
<rect x="400" y="983" width="320" height="54" rx="9" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.6"/>
|
|
63
|
+
<text x="560" y="1015" text-anchor="middle" class="nt">产物:已签名 HAP</text>
|
|
64
|
+
<path d="M560,190 V250 H320 V292" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
65
|
+
<path d="M560,190 V250 H800 V292" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
66
|
+
<path d="M320,388 V418 H558 V448" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
67
|
+
<path d="M800,388 V418 H562 V448" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
68
|
+
<path d="M560,512 V562" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
69
|
+
<path d="M560,658 V710" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
70
|
+
<path d="M560,790 V842" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
71
|
+
<path d="M560,938 V983" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
72
|
+
<path d="M810,610 H865 V890 H822" fill="none" stroke="#059669" stroke-width="1.6" stroke-dasharray="6,4" marker-end="url(#arrowg)"/>
|
|
73
|
+
<rect x="415" y="528" width="290" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
74
|
+
<text x="560" y="540" text-anchor="middle" class="dlab">REQ.txt ⇒ requirement_description_file</text>
|
|
75
|
+
<rect x="445" y="797" width="230" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
76
|
+
<text x="560" y="809" text-anchor="middle" class="dlab">test_case.md ⇒ test_case_path</text>
|
|
77
|
+
<rect x="415" y="815" width="290" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
78
|
+
<text x="560" y="827" text-anchor="middle" class="dlab">pre_test_case.md ⇒ pre_test_case_path</text>
|
|
79
|
+
<rect x="440" y="949" width="240" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
80
|
+
<text x="560" y="961" text-anchor="middle" class="dlab">已签名HAP · pipeline-manifest.md</text>
|
|
81
|
+
<text x="872" y="745" class="dlab">〈feature〉-SPEC.md ⇒ spec_file_path</text>
|
|
82
|
+
<g transform="translate(40,920)">
|
|
83
|
+
<line x1="0" y1="6" x2="26" y2="6" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
84
|
+
<text x="34" y="10" class="lg">执行顺序</text>
|
|
85
|
+
<line x1="0" y1="26" x2="26" y2="26" stroke="#059669" stroke-width="1.6" stroke-dasharray="6,4" marker-end="url(#arrowg)"/>
|
|
86
|
+
<text x="34" y="30" class="lg">参数 / 产物传递</text>
|
|
87
|
+
<rect x="0" y="42" width="20" height="14" rx="3" fill="#eff6ff" stroke="#2563eb" stroke-width="1.4"/>
|
|
88
|
+
<text x="34" y="53" class="lg">自动化步骤(skill)</text>
|
|
89
|
+
<rect x="0" y="64" width="20" height="14" rx="3" fill="#fff7ed" stroke="#ea580c" stroke-width="1.4"/>
|
|
90
|
+
<text x="34" y="75" class="lg">人工介入</text>
|
|
91
|
+
<rect x="0" y="86" width="20" height="14" rx="3" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.4" stroke-dasharray="6,4"/>
|
|
92
|
+
<text x="34" y="97" class="lg">可选 / 按需</text>
|
|
93
|
+
</g>
|
|
94
|
+
</svg>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1120 1080" width="1120" height="1080">
|
|
2
|
+
<style>
|
|
3
|
+
text { font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif; }
|
|
4
|
+
.title { font-size: 20px; font-weight: 600; fill: #111827; }
|
|
5
|
+
.sub { font-size: 12px; fill: #6b7280; }
|
|
6
|
+
.banner{ font-size: 12px; fill: #047857; font-weight: 600; }
|
|
7
|
+
.nt { font-size: 14px; font-weight: 600; fill: #111827; }
|
|
8
|
+
.ns { font-size: 11px; fill: #6b7280; }
|
|
9
|
+
.pin { font-size: 11px; fill: #1d4ed8; }
|
|
10
|
+
.pout { font-size: 11px; fill: #047857; }
|
|
11
|
+
.dlab { font-size: 11px; font-weight: 600; fill: #047857; }
|
|
12
|
+
.lg { font-size: 12px; fill: #374151; }
|
|
13
|
+
</style>
|
|
14
|
+
<defs>
|
|
15
|
+
<marker id="arrow" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
16
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#2563eb"/>
|
|
17
|
+
</marker>
|
|
18
|
+
<marker id="arrowg" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
19
|
+
<polygon points="0 0, 10 3.5, 0 7" fill="#059669"/>
|
|
20
|
+
</marker>
|
|
21
|
+
</defs>
|
|
22
|
+
<text x="40" y="40" class="title">Android → HarmonyOS 迁移流程 · 含参数传递</text>
|
|
23
|
+
<text x="40" y="62" class="sub">蓝箭头=执行顺序;绿色=参数/产物传递;橙色框=人工介入</text>
|
|
24
|
+
<rect x="280" y="70" width="560" height="44" rx="8" fill="#ecfdf5" stroke="#10b981" stroke-width="1.4" stroke-dasharray="6,4"/>
|
|
25
|
+
<text x="560" y="90" text-anchor="middle" class="banner">公共入参(所有步骤共享):android_project_dir · harmony_project_dir</text>
|
|
26
|
+
<text x="560" y="106" text-anchor="middle" class="banner">步骤2 产物写入 harmony_project_dir,步骤4 据此构建</text>
|
|
27
|
+
<rect x="340" y="140" width="440" height="50" rx="25.0" fill="#f0fdf4" stroke="#16a34a" stroke-width="1.6"/>
|
|
28
|
+
<text x="560" y="170" text-anchor="middle" class="nt">开始:准备 Android 源项目 + 鸿蒙目标项目</text>
|
|
29
|
+
<rect x="100" y="292" width="440" height="96" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
30
|
+
<text x="320" y="310" text-anchor="middle" class="nt">步骤1.1 UI 迁移</text>
|
|
31
|
+
<text x="320" y="328" text-anchor="middle" class="ns">skill:hmos-batch-ui-align</text>
|
|
32
|
+
<text x="320" y="348" text-anchor="middle" class="pin">入参: 公共入参 + [ui_info_root, pages]</text>
|
|
33
|
+
<text x="320" y="367" text-anchor="middle" class="pout">出参: ArkTS页面 + 资源(含资源转换) + 批量报告</text>
|
|
34
|
+
<rect x="580" y="292" width="440" height="96" rx="9" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.6" stroke-dasharray="6,4"/>
|
|
35
|
+
<text x="800" y="310" text-anchor="middle" class="nt">步骤1.2 UI 对齐</text>
|
|
36
|
+
<text x="800" y="328" text-anchor="middle" class="ns">skill:hmos-incremental-ui-align</text>
|
|
37
|
+
<text x="800" y="348" text-anchor="middle" class="pin">入参: 公共入参 + [capture_output_dir]</text>
|
|
38
|
+
<text x="800" y="367" text-anchor="middle" class="pout">出参: 修改后ArkTS页面 + 双端截图/视图树 + 对齐报告</text>
|
|
39
|
+
<rect x="330" y="448" width="460" height="64" rx="9" fill="#fff7ed" stroke="#ea580c" stroke-width="1.6"/>
|
|
40
|
+
<circle cx="354.0" cy="473" r="4.5" fill="#ea580c"/>
|
|
41
|
+
<path d="M 347.0,488 Q 354.0,479 361.0,488" fill="none" stroke="#ea580c" stroke-width="2.2" stroke-linecap="round"/>
|
|
42
|
+
<text x="574" y="472" text-anchor="middle" class="nt">编写 REQ.txt(需求描述)</text>
|
|
43
|
+
<text x="574" y="492" text-anchor="middle" class="ns">使用自然语言描述原始需求,用空行分隔多个需求</text>
|
|
44
|
+
<text x="574" y="509" text-anchor="middle" class="pout">产出: REQ.txt</text>
|
|
45
|
+
<rect x="310" y="562" width="500" height="96" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
46
|
+
<text x="560" y="580" text-anchor="middle" class="nt">步骤2 生成需求规格</text>
|
|
47
|
+
<text x="560" y="598" text-anchor="middle" class="ns">skill:hmos-spec-generate</text>
|
|
48
|
+
<text x="560" y="618" text-anchor="middle" class="pin">入参: 公共入参 + requirement_description_file(=REQ.txt) + spec_output_dir</text>
|
|
49
|
+
<text x="560" y="637" text-anchor="middle" class="pout">出参: 〈feature〉-SPEC.md + .trace/〈feature〉.md</text>
|
|
50
|
+
<rect x="310" y="710" width="500" height="80" rx="9" fill="#fff7ed" stroke="#ea580c" stroke-width="1.6"/>
|
|
51
|
+
<circle cx="334.0" cy="743" r="4.5" fill="#ea580c"/>
|
|
52
|
+
<path d="M 327.0,758 Q 334.0,749 341.0,758" fill="none" stroke="#ea580c" stroke-width="2.2" stroke-linecap="round"/>
|
|
53
|
+
<text x="574" y="734" text-anchor="middle" class="nt">编写测试用例 + 连鸿蒙真机 / 配置签名</text>
|
|
54
|
+
<text x="574" y="754" text-anchor="middle" class="ns">如果不执行步骤4中的集成测试(skip_test=true)可跳过此步骤</text>
|
|
55
|
+
<text x="574" y="771" text-anchor="middle" class="pout">产出: test_case.md / pre_test_case.md</text>
|
|
56
|
+
<rect x="300" y="842" width="520" height="96" rx="9" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
|
57
|
+
<text x="560" y="860" text-anchor="middle" class="nt">步骤3 逻辑代码转换流水线</text>
|
|
58
|
+
<text x="560" y="878" text-anchor="middle" class="ns">skill:hmos-convert-pipeline</text>
|
|
59
|
+
<text x="560" y="898" text-anchor="middle" class="pin">入参: 公共入参 + spec_file_path(=SPEC.md) + [test_case_path, pre_test_case_path, skip_test …]</text>
|
|
60
|
+
<text x="560" y="917" text-anchor="middle" class="pout">出参: 已签名HAP + pipeline-manifest.md + 各阶段报告</text>
|
|
61
|
+
<rect x="400" y="983" width="320" height="54" rx="9" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.6"/>
|
|
62
|
+
<text x="560" y="1015" text-anchor="middle" class="nt">产物:已签名 HAP</text>
|
|
63
|
+
<path d="M560,190 V250 H320 V292" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
64
|
+
<path d="M560,190 V250 H800 V292" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
65
|
+
<path d="M320,388 V418 H558 V448" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
66
|
+
<path d="M800,388 V418 H562 V448" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
67
|
+
<path d="M560,512 V562" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
68
|
+
<path d="M560,658 V710" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
69
|
+
<path d="M560,790 V842" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
70
|
+
<path d="M560,938 V983" fill="none" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
71
|
+
<path d="M810,610 H865 V890 H822" fill="none" stroke="#059669" stroke-width="1.6" stroke-dasharray="6,4" marker-end="url(#arrowg)"/>
|
|
72
|
+
<rect x="415" y="528" width="290" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
73
|
+
<text x="560" y="540" text-anchor="middle" class="dlab">REQ.txt ⇒ requirement_description_file</text>
|
|
74
|
+
<rect x="445" y="797" width="230" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
75
|
+
<text x="560" y="809" text-anchor="middle" class="dlab">test_case.md ⇒ test_case_path</text>
|
|
76
|
+
<rect x="415" y="815" width="290" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
77
|
+
<text x="560" y="827" text-anchor="middle" class="dlab">pre_test_case.md ⇒ pre_test_case_path</text>
|
|
78
|
+
<rect x="440" y="949" width="240" height="16" rx="3" fill="#ffffff" opacity="0.92"/>
|
|
79
|
+
<text x="560" y="961" text-anchor="middle" class="dlab">已签名HAP · pipeline-manifest.md</text>
|
|
80
|
+
<text x="872" y="745" class="dlab">〈feature〉-SPEC.md ⇒ spec_file_path</text>
|
|
81
|
+
<g transform="translate(40,920)">
|
|
82
|
+
<line x1="0" y1="6" x2="26" y2="6" stroke="#2563eb" stroke-width="1.6" marker-end="url(#arrow)"/>
|
|
83
|
+
<text x="34" y="10" class="lg">执行顺序</text>
|
|
84
|
+
<line x1="0" y1="26" x2="26" y2="26" stroke="#059669" stroke-width="1.6" stroke-dasharray="6,4" marker-end="url(#arrowg)"/>
|
|
85
|
+
<text x="34" y="30" class="lg">参数 / 产物传递</text>
|
|
86
|
+
<rect x="0" y="42" width="20" height="14" rx="3" fill="#eff6ff" stroke="#2563eb" stroke-width="1.4"/>
|
|
87
|
+
<text x="34" y="53" class="lg">自动化步骤(skill)</text>
|
|
88
|
+
<rect x="0" y="64" width="20" height="14" rx="3" fill="#fff7ed" stroke="#ea580c" stroke-width="1.4"/>
|
|
89
|
+
<text x="34" y="75" class="lg">人工介入</text>
|
|
90
|
+
<rect x="0" y="86" width="20" height="14" rx="3" fill="#f5f9ff" stroke="#2563eb" stroke-width="1.4" stroke-dasharray="6,4"/>
|
|
91
|
+
<text x="34" y="97" class="lg">可选 / 按需</text>
|
|
92
|
+
</g>
|
|
93
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -7,6 +7,16 @@ description: Batch-convert multiple Android Activity UI snapshots to HarmonyOS A
|
|
|
7
7
|
|
|
8
8
|
Batch-convert a set of Android page snapshots (each snapshot is a `page_NNNN_ActivityName/` directory containing `meta.json` + `view.xml` + optional `screenshot.png`) into HarmonyOS ArkTS pages following MVVM architecture.
|
|
9
9
|
|
|
10
|
+
## Step 0 — Environment Variables Check (run first)
|
|
11
|
+
|
|
12
|
+
The final build (Step 6, via `hmos_fix_build_errors`) reads the DevEco location **directly from the OS environment variables** (`echo "$VAR"` on macOS/Linux; `$env:VAR` in PowerShell on Windows):
|
|
13
|
+
|
|
14
|
+
| Variable | Needed for | Valid when |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `DEVECO_HOME` *(or `DEVECO_SDK_HOME`)* | Step 6 unified build | resolves to a valid DevEco install |
|
|
17
|
+
|
|
18
|
+
If neither `DEVECO_HOME` nor `DEVECO_SDK_HOME` is set, **ask the user** for the DevEco Studio install path before proceeding (suggest running `ht init` to persist it as a machine environment variable).
|
|
19
|
+
|
|
10
20
|
## Step 1 — Parse User Request
|
|
11
21
|
|
|
12
22
|
Extract 4 paths from the user's message (natural language, no fixed format):
|