@harmonyos-arkts/d2h 0.1.20 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +40 -0
  3. package/agents/android-to-hmos-00-orchestrator.md +3 -315
  4. package/agents/d2h.md +53 -38
  5. package/contracts/workflow/artifacts.md +22 -0
  6. package/contracts/workflow/delivery.md +54 -0
  7. package/contracts/workflow/dispatch.md +26 -0
  8. package/contracts/workflow/execution.md +125 -0
  9. package/contracts/workflow/generation.md +40 -0
  10. package/contracts/workflow/orchestration.md +49 -0
  11. package/contracts/workflow/overview.md +58 -0
  12. package/contracts/workflow/plan.md +119 -0
  13. package/contracts/workflow/scope.md +151 -0
  14. package/dist/bin/install-opencode.js +34 -15
  15. package/dist/src/install-codex.js +131 -0
  16. package/dist/src/install-opencode.js +5 -5
  17. package/dist/src/workflow.js +54 -0
  18. package/docs/architecture-plan-guide.zh-CN.md +70 -0
  19. package/docs/incremental-spec-evaluation-design.md +670 -0
  20. package/docs/spec-plan-guide.md +226 -0
  21. package/docs/workflow-decoupling.md +59 -0
  22. package/opencode/interactive-tools/advance-progress-demo.mjs +21 -0
  23. package/opencode/interactive-tools/browser-host.ts +110 -0
  24. package/opencode/interactive-tools/core.ts +242 -0
  25. package/opencode/interactive-tools/demo-workflow.ts +55 -0
  26. package/opencode/interactive-tools/demo.mjs +37 -0
  27. package/opencode/interactive-tools/package-lock.json +1876 -0
  28. package/opencode/interactive-tools/package.json +23 -0
  29. package/opencode/interactive-tools/panel.ts +40 -0
  30. package/opencode/interactive-tools/prepare-demo.mjs +17 -0
  31. package/opencode/interactive-tools/prepare-progress-demo.mjs +13 -0
  32. package/opencode/interactive-tools/progress.ts +118 -0
  33. package/opencode/interactive-tools/server-legacy.mjs +2 -0
  34. package/opencode/interactive-tools/server.mjs +40 -0
  35. package/opencode/interactive-tools/tui.tsx +230 -0
  36. package/package.json +9 -1
  37. package/schemas/native-libs-analysis-report.schema.json +695 -0
  38. package/schemas/native-libs-verify-report.schema.json +566 -0
  39. package/schemas/spec-native-libs-shard.schema.json +110 -0
  40. package/skills/arkts-icon-sizing/SKILL.md +0 -10
  41. package/skills/cpp/d2h-native-library-analyse/SKILL.md +91 -0
  42. package/skills/cpp/d2h-native-library-analyse/scripts/analyse-android-so.py +630 -0
  43. package/skills/cpp/d2h-native-library-build/SKILL.md +403 -0
  44. package/skills/cpp/d2h-native-library-build/references/build-config-mapping.md +180 -0
  45. package/skills/cpp/d2h-native-library-build/references/jni-to-napi-mapping.md +74 -0
  46. package/skills/cpp/d2h-native-library-build/scripts/check-android-so.py +580 -0
  47. package/skills/cpp/d2h-native-library-verify/SKILL.md +111 -0
  48. package/skills/cpp/d2h-native-library-verify/references/demo-build-sign-run.md +67 -0
  49. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/AppScope/app.json5 +1 -0
  50. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/AppScope/resources/base/element/string.json +1 -0
  51. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/README.md +25 -0
  52. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/build-profile.json5 +24 -0
  53. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/build-profile.json5 +1 -0
  54. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/hvigorfile.ts +2 -0
  55. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/oh-package.json5 +1 -0
  56. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/ets/entryability/EntryAbility.ets +5 -0
  57. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/ets/pages/Index.ets +3 -0
  58. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/ets/pages/NativeVerifyDemo.ets +276 -0
  59. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/module.json5 +1 -0
  60. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/resources/base/element/color.json +1 -0
  61. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/resources/base/element/string.json +1 -0
  62. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/main/resources/base/profile/main_pages.json +1 -0
  63. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/ohosTest/ets/test/FFmpegVerify.test.ets +176 -0
  64. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/ohosTest/ets/test/List.test.ets +2 -0
  65. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/entry/src/ohosTest/module.json5 +1 -0
  66. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/hvigor/hvigor-config.json5 +1 -0
  67. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/hvigorfile.ts +2 -0
  68. package/skills/cpp/d2h-native-library-verify/references/demo-project-template/oh-package.json5 +9 -0
  69. package/skills/cpp/d2h-native-library-verify/references/demo-template.md +176 -0
  70. package/skills/cpp/d2h-native-library-verify/references/hypium-test-template.md +163 -0
  71. package/skills/cpp/d2h-native-library-verify/scripts/__pycache__/native_common.cpython-313.pyc +0 -0
  72. package/skills/cpp/d2h-native-library-verify/scripts/device-verify.py +304 -0
  73. package/skills/cpp/d2h-native-library-verify/scripts/native_common.py +341 -0
  74. package/skills/cpp/d2h-native-library-verify/scripts/verify-ohos-native.py +1099 -0
  75. package/skills/d2h-app-solution/SKILL.md +198 -0
  76. package/skills/d2h-app-solution/agents/openai.yaml +4 -0
  77. package/skills/d2h-app-solution/references/framework-evidence.md +117 -0
  78. package/skills/d2h-app-solution/references/hierarchy-rules.md +88 -0
  79. package/skills/d2h-app-solution/references/inventory-schema.md +305 -0
  80. package/skills/d2h-app-solution/references/technical-analysis.md +101 -0
  81. package/skills/d2h-app-solution/scripts/scan_repositories.py +350 -0
  82. package/skills/d2h-app-solution/scripts/validate_inventory.py +337 -0
  83. package/skills/d2h-architecture-plan/SKILL.md +35 -0
  84. package/skills/d2h-architecture-plan/references/directory-creation.md +43 -0
  85. package/skills/d2h-architecture-plan/references/hybrid-design.md +84 -0
  86. package/skills/d2h-architecture-plan/references/layout-reference.md +83 -0
  87. package/skills/d2h-architecture-plan/references/plan-contract.md +51 -0
  88. package/skills/d2h-architecture-plan/references/source-review.md +50 -0
  89. package/skills/d2h-cloud-knowledge/SKILL.md +28 -7
  90. package/skills/d2h-cloud-knowledge/kb_query.mjs +8 -0
  91. package/skills/d2h-dashboard/SKILL.md +56 -0
  92. package/skills/d2h-product-family-migration/SKILL.md +103 -0
  93. package/skills/d2h-product-family-migration/agents/openai.yaml +3 -0
  94. package/skills/d2h-product-family-migration/assets/incremental-plan.template.md +55 -0
  95. package/skills/d2h-product-family-migration/references/advanced/behavioral-verification.md +59 -0
  96. package/skills/d2h-product-family-migration/references/advanced/existing-skill-integration.md +30 -0
  97. package/skills/d2h-product-family-migration/references/advanced/packaging-and-verification.md +43 -0
  98. package/skills/d2h-product-family-migration/references/advanced/platform-probes.md +26 -0
  99. package/skills/d2h-product-family-migration/references/advanced/product-line-design.md +40 -0
  100. package/skills/d2h-product-family-migration/references/baseline-and-delta.md +50 -0
  101. package/skills/d2h-product-family-migration/tests/markdown-cases.md +76 -0
  102. package/skills/d2h-spec-develop/SKILL.md +41 -0
  103. package/skills/d2h-spec-develop/agents/openai.yaml +7 -0
  104. package/skills/d2h-spec-develop/references/worker-workflow.md +26 -0
  105. package/skills/{d2h-page-spec-generate → d2h-spec-generate}/SKILL.md +24 -13
  106. package/skills/d2h-spec-generate/assets/spec-template.md +109 -0
  107. package/skills/d2h-spec-generate/references/from-plan.md +19 -0
  108. package/skills/d2h-spec-generate/references/spec-content.md +34 -0
  109. package/skills/{d2h-page-spec-generate → d2h-spec-generate}/scripts/build_batch_report.py +35 -84
  110. package/skills/d2h-spec-plan/SKILL.md +38 -0
  111. package/skills/d2h-spec-plan/agents/openai.yaml +4 -0
  112. package/skills/d2h-spec-plan/references/architecture-handoff.md +9 -0
  113. package/skills/d2h-spec-plan/references/plan-contract.md +13 -0
  114. package/skills/d2h-spec-plan/references/planning-method.md +46 -0
  115. package/skills/d2h-spec-plan/references/round-scope-assessment.md +49 -0
  116. package/skills/d2h-spec-plan/references/work-packets.md +61 -0
  117. package/skills/d2h-utg-ai-generate/references/click-paths-schema.json +2 -2
  118. package/skills/d2h-utg-ai-generate/references/page-schema.json +2 -2
  119. package/skills/d2h-utg-ai-generate/references/utg-schema.json +2 -2
  120. package/skills/d2h-utg-static-generate/SKILL.md +2 -2
  121. package/skills/managing-d2h-toolchain/environment-requirements.json +1 -1
  122. package/skills/managing-d2h-toolchain/toolchain.json +1 -1
  123. package/skills/preparing-migration-workspace/SKILL.md +32 -2
  124. package/workflow/__pycache__/artifact_bindings.cpython-313.pyc +0 -0
  125. package/workflow/__pycache__/spec_runtime.cpython-313.pyc +0 -0
  126. package/workflow/artifact_bindings.py +224 -0
  127. package/workflow/assets/dashboard.html +88 -0
  128. package/workflow/build_batch_report.py +8 -0
  129. package/workflow/collect_code_metrics.py +75 -0
  130. package/workflow/dashboard_overview.py +109 -0
  131. package/workflow/delivery_view.py +82 -0
  132. package/workflow/feature_plan.py +234 -0
  133. package/workflow/page_batches.py +223 -0
  134. package/workflow/spec_generation.py +120 -0
  135. package/workflow/spec_runtime.py +890 -0
  136. package/workflow/work_packets.py +85 -0
  137. package/skills/d2h-page-develop/SKILL.md +0 -126
  138. package/skills/d2h-page-develop/agents/openai.yaml +0 -7
  139. package/skills/harmonyos-migration-playbook/SKILL.md +0 -83
  140. package/skills/harmonyos-migration-playbook/agents/openai.yaml +0 -7
  141. package/skills/harmonyos-migration-playbook/references/arkts-compile.md +0 -24
  142. package/skills/harmonyos-migration-playbook/references/harmony-runtime.md +0 -53
  143. package/skills/harmonyos-migration-playbook/references/lesson-lifecycle.md +0 -45
  144. package/skills/harmonyos-migration-playbook/references/protocol-e2e.md +0 -23
  145. package/skills/harmonyos-migration-playbook/references/ui-automation.md +0 -53
  146. package/skills/harmonyos-migration-playbook/references/windows-environment.md +0 -38
  147. package/skills/native-library-substitution/SKILL.md +0 -385
  148. package/skills/native-library-substitution/references/native-library-substitution.json +0 -56906
  149. package/skills/native-library-substitution/references/native-library-substitution.md +0 -163
  150. package/skills/porting-cmake-native-libraries/SKILL.md +0 -57
  151. package/skills/porting-cmake-native-libraries/references/platform-adaptation.md +0 -49
  152. package/skills/porting-cmake-native-libraries/references/report-and-build.md +0 -60
@@ -0,0 +1,566 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/native-libs-verify-report.schema.json",
4
+ "title": "d2h-native-library-verify Verification Report",
5
+ "description": "verify-ohos-native.py --json 的输出契约:鸿蒙版 .so/.a 静态校验(可编译/可加载)+ API 覆盖比对;functional_diffs[] 由 demo 运行验证后由 AI 按 SKILL.md §六回填(功能差异清单)。",
6
+ "type": "object",
7
+ "required": [
8
+ "tool_version",
9
+ "ohos_root",
10
+ "devices",
11
+ "libraries",
12
+ "summary"
13
+ ],
14
+ "properties": {
15
+ "tool_version": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ },
19
+ "ohos_root": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "minItems": 1
26
+ },
27
+ "android_surface": {
28
+ "oneOf": [
29
+ {
30
+ "type": "null"
31
+ },
32
+ {
33
+ "type": "object",
34
+ "required": [
35
+ "root",
36
+ "libraries",
37
+ "source_jni_methods",
38
+ "pending_mapping"
39
+ ],
40
+ "properties": {
41
+ "root": {
42
+ "type": [
43
+ "string",
44
+ "null"
45
+ ]
46
+ },
47
+ "libraries": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "required": [
52
+ "path",
53
+ "kind",
54
+ "arch",
55
+ "jni_methods",
56
+ "c_exports_count"
57
+ ],
58
+ "properties": {
59
+ "path": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "kind": {
64
+ "enum": [
65
+ "so",
66
+ "a",
67
+ "unknown"
68
+ ]
69
+ },
70
+ "arch": {
71
+ "type": "string"
72
+ },
73
+ "jni_methods": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "required": [
78
+ "symbol",
79
+ "class",
80
+ "method",
81
+ "overload"
82
+ ],
83
+ "properties": {
84
+ "symbol": {
85
+ "type": "string",
86
+ "minLength": 1
87
+ },
88
+ "class": {
89
+ "type": [
90
+ "string",
91
+ "null"
92
+ ]
93
+ },
94
+ "method": {
95
+ "type": [
96
+ "string",
97
+ "null"
98
+ ]
99
+ },
100
+ "overload": {
101
+ "type": [
102
+ "string",
103
+ "null"
104
+ ]
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ }
109
+ },
110
+ "c_exports_count": {
111
+ "type": "integer",
112
+ "minimum": 0
113
+ },
114
+ "c_exports": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ }
120
+ },
121
+ "c_exports_total": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ }
125
+ },
126
+ "additionalProperties": false
127
+ }
128
+ },
129
+ "pending_mapping": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "object",
133
+ "required": [
134
+ "android_lib",
135
+ "symbol",
136
+ "class",
137
+ "method"
138
+ ],
139
+ "properties": {
140
+ "android_lib": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ },
144
+ "symbol": {
145
+ "type": "string",
146
+ "minLength": 1
147
+ },
148
+ "class": {
149
+ "type": [
150
+ "string",
151
+ "null"
152
+ ]
153
+ },
154
+ "method": {
155
+ "type": [
156
+ "string",
157
+ "null"
158
+ ]
159
+ }
160
+ },
161
+ "additionalProperties": false
162
+ }
163
+ },
164
+ "source_jni_methods": {
165
+ "type": "array",
166
+ "description": "Java/Kotlin 源码中的 native/external fun 声明(JNI 桥为编译期产物、仓库无 .so 时的接口面)",
167
+ "items": {
168
+ "type": "object",
169
+ "required": [
170
+ "class",
171
+ "method",
172
+ "file",
173
+ "line",
174
+ "language"
175
+ ],
176
+ "properties": {
177
+ "class": {
178
+ "type": [
179
+ "string",
180
+ "null"
181
+ ]
182
+ },
183
+ "method": {
184
+ "type": "string",
185
+ "minLength": 1
186
+ },
187
+ "file": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "line": {
192
+ "type": "integer",
193
+ "minimum": 1
194
+ },
195
+ "language": {
196
+ "enum": [
197
+ "java",
198
+ "kotlin"
199
+ ]
200
+ }
201
+ },
202
+ "additionalProperties": false
203
+ }
204
+ }
205
+ },
206
+ "additionalProperties": false
207
+ }
208
+ ]
209
+ },
210
+ "api_map_path": {
211
+ "type": [
212
+ "string",
213
+ "null"
214
+ ]
215
+ },
216
+ "libraries": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "required": [
221
+ "path",
222
+ "name",
223
+ "kind",
224
+ "arch",
225
+ "bits",
226
+ "soname",
227
+ "needed",
228
+ "needed_unresolved",
229
+ "is_napi_module",
230
+ "verdict",
231
+ "issues",
232
+ "defined_total"
233
+ ],
234
+ "properties": {
235
+ "path": {
236
+ "type": "string",
237
+ "minLength": 1
238
+ },
239
+ "name": {
240
+ "type": "string",
241
+ "minLength": 1
242
+ },
243
+ "kind": {
244
+ "enum": [
245
+ "so",
246
+ "a",
247
+ "unknown"
248
+ ]
249
+ },
250
+ "arch": {
251
+ "type": "string"
252
+ },
253
+ "bits": {
254
+ "type": [
255
+ "integer",
256
+ "null"
257
+ ],
258
+ "enum": [
259
+ 32,
260
+ 64,
261
+ null
262
+ ]
263
+ },
264
+ "soname": {
265
+ "type": [
266
+ "string",
267
+ "null"
268
+ ]
269
+ },
270
+ "needed": {
271
+ "type": "array",
272
+ "items": {
273
+ "type": "string",
274
+ "minLength": 1
275
+ }
276
+ },
277
+ "needed_unresolved": {
278
+ "type": "array",
279
+ "items": {
280
+ "type": "string",
281
+ "minLength": 1
282
+ }
283
+ },
284
+ "is_napi_module": {
285
+ "type": "boolean"
286
+ },
287
+ "verdict": {
288
+ "enum": [
289
+ "napi-ready",
290
+ "bridge-required",
291
+ "incompatible"
292
+ ]
293
+ },
294
+ "issues": {
295
+ "type": "array",
296
+ "items": {
297
+ "type": "object",
298
+ "required": [
299
+ "level",
300
+ "code",
301
+ "message"
302
+ ],
303
+ "properties": {
304
+ "level": {
305
+ "enum": [
306
+ "fail",
307
+ "warn"
308
+ ]
309
+ },
310
+ "code": {
311
+ "enum": [
312
+ "versioned_symbols",
313
+ "android_needed",
314
+ "ndk1_abi",
315
+ "jni_residue",
316
+ "arch",
317
+ "needed_unresolved",
318
+ "api_missing",
319
+ "mapping_incomplete",
320
+ "napi_register_missing"
321
+ ]
322
+ },
323
+ "message": {
324
+ "type": "string",
325
+ "minLength": 1
326
+ }
327
+ },
328
+ "additionalProperties": false
329
+ }
330
+ },
331
+ "defined_total": {
332
+ "type": "integer",
333
+ "minimum": 0
334
+ },
335
+ "note": {
336
+ "type": "string"
337
+ },
338
+ "android_counterpart": {
339
+ "type": "string",
340
+ "minLength": 1
341
+ },
342
+ "api_coverage": {
343
+ "type": "object",
344
+ "required": [
345
+ "expected",
346
+ "covered",
347
+ "missing",
348
+ "unimplemented"
349
+ ],
350
+ "properties": {
351
+ "expected": {
352
+ "type": "integer",
353
+ "minimum": 0
354
+ },
355
+ "covered": {
356
+ "type": "integer",
357
+ "minimum": 0
358
+ },
359
+ "missing": {
360
+ "type": "array"
361
+ }
362
+ },
363
+ "additionalProperties": false
364
+ },
365
+ "exports": {
366
+ "type": "array",
367
+ "items": {
368
+ "type": "string",
369
+ "minLength": 1
370
+ },
371
+ "description": "OHOS 导出符号清单(过滤 __/_init/_fini 内部符号,cap 200),供 api-map 与桥接层生成使用"
372
+ },
373
+ "exports_total": {
374
+ "type": "integer",
375
+ "minimum": 0
376
+ },
377
+ "mapping_coverage": {
378
+ "type": "object",
379
+ "required": [
380
+ "android_jni_total",
381
+ "mapped",
382
+ "unmapped"
383
+ ],
384
+ "properties": {
385
+ "android_jni_total": {
386
+ "type": "integer",
387
+ "minimum": 0
388
+ },
389
+ "mapped": {
390
+ "type": "integer",
391
+ "minimum": 0
392
+ },
393
+ "unmapped": {
394
+ "type": "array",
395
+ "items": {
396
+ "type": "string",
397
+ "minLength": 1
398
+ }
399
+ }
400
+ },
401
+ "additionalProperties": false
402
+ },
403
+ "exports_demangled": {
404
+ "type": "array",
405
+ "description": "C++ 导出符号可读名(llvm-nm -C,cap 50),供 api-map 映射使用",
406
+ "items": {
407
+ "type": "object",
408
+ "required": [
409
+ "mangled",
410
+ "demangled"
411
+ ],
412
+ "properties": {
413
+ "mangled": {
414
+ "type": "string",
415
+ "minLength": 1
416
+ },
417
+ "demangled": {
418
+ "type": "string",
419
+ "minLength": 1
420
+ }
421
+ },
422
+ "additionalProperties": false
423
+ }
424
+ },
425
+ "unimplemented_apis": {
426
+ "type": "array",
427
+ "description": "api-map 中 ohos_symbol=null 的条目:鸿蒙 so 未实现(自动转 functional_diffs 的 unverifiable)",
428
+ "items": {
429
+ "type": "object"
430
+ }
431
+ }
432
+ },
433
+ "additionalProperties": false
434
+ }
435
+ },
436
+ "summary": {
437
+ "type": "object",
438
+ "required": [
439
+ "total",
440
+ "napi_ready",
441
+ "bridge_required",
442
+ "incompatible",
443
+ "api_missing",
444
+ "pending_mapping",
445
+ "unimplemented"
446
+ ],
447
+ "properties": {
448
+ "total": {
449
+ "type": "integer",
450
+ "minimum": 0
451
+ },
452
+ "napi_ready": {
453
+ "type": "integer",
454
+ "minimum": 0
455
+ },
456
+ "bridge_required": {
457
+ "type": "integer",
458
+ "minimum": 0
459
+ },
460
+ "incompatible": {
461
+ "type": "integer",
462
+ "minimum": 0
463
+ },
464
+ "api_missing": {
465
+ "type": "integer",
466
+ "minimum": 0
467
+ },
468
+ "pending_mapping": {
469
+ "type": "integer",
470
+ "minimum": 0
471
+ },
472
+ "unimplemented": {
473
+ "type": "integer",
474
+ "minimum": 0
475
+ }
476
+ },
477
+ "additionalProperties": false
478
+ },
479
+ "functional_diffs": {
480
+ "type": "array",
481
+ "description": "功能差异清单(demo 运行验证后由 AI 回填):每条一个 API 在同一输入下 Android 与 OHOS 的行为对比",
482
+ "items": {
483
+ "type": "object",
484
+ "required": [
485
+ "ohos_lib",
486
+ "api",
487
+ "android_jni",
488
+ "input",
489
+ "android_expected",
490
+ "ohos_actual",
491
+ "status",
492
+ "evidence"
493
+ ],
494
+ "properties": {
495
+ "ohos_lib": {
496
+ "type": "string",
497
+ "minLength": 1
498
+ },
499
+ "api": {
500
+ "type": "string",
501
+ "minLength": 1
502
+ },
503
+ "android_jni": {
504
+ "type": "string"
505
+ },
506
+ "input": {
507
+ "type": "string",
508
+ "minLength": 1
509
+ },
510
+ "android_expected": {
511
+ "type": "string"
512
+ },
513
+ "ohos_actual": {
514
+ "type": "string"
515
+ },
516
+ "status": {
517
+ "enum": [
518
+ "consistent",
519
+ "inconsistent",
520
+ "unverifiable"
521
+ ]
522
+ },
523
+ "evidence": {
524
+ "type": "string",
525
+ "minLength": 1,
526
+ "description": "证据路径(demo 日志/截图/hypium 输出)"
527
+ },
528
+ "note": {
529
+ "type": "string"
530
+ }
531
+ },
532
+ "additionalProperties": false
533
+ }
534
+ },
535
+ "devices": {
536
+ "type": "object",
537
+ "required": [
538
+ "harmony",
539
+ "android"
540
+ ],
541
+ "properties": {
542
+ "harmony": {
543
+ "type": "array",
544
+ "items": {
545
+ "type": "string",
546
+ "minLength": 1
547
+ }
548
+ },
549
+ "android": {
550
+ "type": "array",
551
+ "items": {
552
+ "type": "string",
553
+ "minLength": 1
554
+ }
555
+ }
556
+ },
557
+ "additionalProperties": false
558
+ },
559
+ "report_path": {
560
+ "type": "string",
561
+ "minLength": 1,
562
+ "description": "--output 落盘后的报告绝对路径"
563
+ }
564
+ },
565
+ "additionalProperties": false
566
+ }
@@ -0,0 +1,110 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/spec-native-libs-shard.schema.json",
4
+ "title": "SPEC 2.0.0 Native Library Facts Shard",
5
+ "type": "object",
6
+ "required": ["shardVersion", "kind", "nativeLibs"],
7
+ "properties": {
8
+ "shardVersion": { "const": "2.0.0" },
9
+ "kind": { "const": "native-lib-facts" },
10
+ "nativeLibs": {
11
+ "type": "object",
12
+ "required": ["present", "usageCase", "externalNativeBuild", "libraries", "loadCalls"],
13
+ "properties": {
14
+ "present": { "type": "boolean" },
15
+ "usageCase": { "enum": ["none", "source", "source-with-patches", "prebuilt", "mixed", "load-only"] },
16
+ "externalNativeBuild": {
17
+ "type": "array",
18
+ "items": { "type": "string", "minLength": 1 }
19
+ },
20
+ "libraries": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": ["name", "usage", "modules", "artifacts", "buildConfigs", "sourceDirs", "patches", "loadCalls"],
25
+ "properties": {
26
+ "name": { "type": "string", "minLength": 1 },
27
+ "usage": { "enum": ["source-built", "source-with-patch", "prebuilt"] },
28
+ "modules": { "type": "array", "items": { "type": "string", "minLength": 1 } },
29
+ "artifacts": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "required": ["path", "type", "abi", "arch", "sizeBytes"],
34
+ "properties": {
35
+ "path": { "type": "string", "minLength": 1 },
36
+ "type": { "enum": ["shared", "static"] },
37
+ "abi": { "type": ["string", "null"], "enum": ["arm64-v8a", "armeabi-v7a", "armeabi", "x86", "x86_64", null] },
38
+ "arch": { "type": ["string", "null"] },
39
+ "sizeBytes": { "type": "integer", "minimum": 0 }
40
+ },
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "buildConfigs": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object",
48
+ "required": ["path", "system"],
49
+ "properties": {
50
+ "path": { "type": "string", "minLength": 1 },
51
+ "system": { "enum": ["cmake", "ndk-build"] }
52
+ },
53
+ "additionalProperties": false
54
+ }
55
+ },
56
+ "sourceDirs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
57
+ "patches": { "type": "array", "items": { "type": "string", "minLength": 1 } },
58
+ "loadCalls": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "required": ["file", "line", "library"],
63
+ "properties": {
64
+ "file": { "type": "string", "minLength": 1 },
65
+ "line": { "type": "integer", "minimum": 1 },
66
+ "library": { "type": "string", "minLength": 1 },
67
+ "kind": { "enum": ["loadLibrary", "load"] }
68
+ },
69
+ "additionalProperties": false
70
+ }
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ }
75
+ },
76
+ "loadCalls": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "required": ["file", "line", "library"],
81
+ "properties": {
82
+ "file": { "type": "string", "minLength": 1 },
83
+ "line": { "type": "integer", "minimum": 1 },
84
+ "library": { "type": "string", "minLength": 1 },
85
+ "kind": { "enum": ["loadLibrary", "load"] }
86
+ },
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "jniMethods": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "required": ["file", "line", "name", "language"],
95
+ "properties": {
96
+ "file": { "type": "string", "minLength": 1 },
97
+ "line": { "type": "integer", "minimum": 1 },
98
+ "name": { "type": "string", "minLength": 1 },
99
+ "language": { "enum": ["kotlin", "java"] }
100
+ },
101
+ "additionalProperties": false
102
+ }
103
+ },
104
+ "jniMethodsTruncated": { "type": "boolean" }
105
+ },
106
+ "additionalProperties": false
107
+ }
108
+ },
109
+ "additionalProperties": false
110
+ }
@@ -199,13 +199,3 @@ python <skill>/scripts/icon_audit.py # 静态被标记数应为 0
199
199
  3. 将静态复审写入 `domainChecks`。
200
200
  4. 将动态源、无 raster 和密度兜底项写入 `unresolved`。
201
201
  5. 将构建和相关页面的设备视觉核对写入 `verificationRequests`。
202
-
203
- ## 可选领域协作
204
-
205
- 下列 Skill 存在时可以协作,但不改变本 Skill 的输入、流程或统一结果:
206
-
207
- - **android2hmos_resources_convert**:资源/资产侧转换(res/ → resources/、SVG 坐标/格式修复);本 skill 修的是 `.ets` 消费侧。
208
- - **arkts-mvvm-architecture**:页面组件结构和 ArkTS/ArkUI 编码约束。
209
- - **harmonyos-migration-playbook**:设备 UI 自动化、截图和页面对照方式。
210
-
211
- 本 Skill 不暂存或提交文件、不更新迁移报告、不创建 checkpoint、不调用 `complete`。调用方自行消费统一结果。