@harmonyos-arkts/d2h 0.0.0-stage → 0.1.0

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 (74) hide show
  1. package/.claude-plugin/marketplace.json +13 -0
  2. package/.claude-plugin/plugin.json +7 -0
  3. package/README.md +168 -2
  4. package/agents/android-to-hmos-00-orchestrator.md +312 -0
  5. package/agents/d2h.md +168 -0
  6. package/bin/install-opencode.mjs +51 -0
  7. package/install-opencode.sh +160 -0
  8. package/opencode/agents.json +16 -0
  9. package/package.json +16 -4
  10. package/schemas/android-source-manifest.schema.json +25 -0
  11. package/schemas/checkpoint-provenance.schema.json +67 -0
  12. package/schemas/final-acceptance.schema.json +29 -0
  13. package/schemas/managed-evidence-index.schema.json +15 -0
  14. package/schemas/managed-evidence.schema.json +114 -0
  15. package/schemas/migration-config.schema.json +51 -0
  16. package/schemas/migration-report-index.schema.json +39 -0
  17. package/schemas/migration-report-item.schema.json +51 -0
  18. package/schemas/migration-report-summary.schema.json +25 -0
  19. package/schemas/migration-status.schema.json +202 -0
  20. package/schemas/preflight.schema.json +60 -0
  21. package/schemas/source-order-audit.schema.json +16 -0
  22. package/schemas/source-provenance-event.schema.json +19 -0
  23. package/schemas/spec-app-shard.schema.json +45 -0
  24. package/schemas/spec-fact-corrections-shard.schema.json +13 -0
  25. package/schemas/spec-features-shard.schema.json +43 -0
  26. package/schemas/spec-index.schema.json +26 -0
  27. package/schemas/spec-interactions-shard.schema.json +40 -0
  28. package/schemas/spec-page.schema.json +98 -0
  29. package/schemas/spec-pages-index.schema.json +1 -0
  30. package/schemas/spec-unresolved-shard.schema.json +1 -0
  31. package/schemas/task-envelope.schema.json +55 -0
  32. package/schemas/task-plan.schema.json +123 -0
  33. package/skills/android2hmos_resources_convert/SKILL.md +162 -0
  34. package/skills/android2hmos_resources_convert/references/image-conversion-rules.md +230 -0
  35. package/skills/android2hmos_resources_convert/references/svg-fix-patterns.md +175 -0
  36. package/skills/android2hmos_resources_convert/references/xml-drawable-to-svg-rules.md +513 -0
  37. package/skills/appgraph-rule-audit/SKILL.md +58 -0
  38. package/skills/appgraph-rule-audit/references/audit-contract.md +47 -0
  39. package/skills/appgraph-rule-audit/references/recommendation-schema.md +41 -0
  40. package/skills/appgraph-rule-audit/schemas/rule-opportunities.schema.json +125 -0
  41. package/skills/arkts-app-identity/SKILL.md +238 -0
  42. package/skills/arkts-i18n/SKILL.md +496 -0
  43. package/skills/arkts-i18n/evals/evals.json +84 -0
  44. package/skills/arkts-i18n/references/code-examples.md +302 -0
  45. package/skills/arkts-i18n/references/common-pitfalls.md +391 -0
  46. package/skills/arkts-i18n/references/dynamic-language-switch.md +604 -0
  47. package/skills/arkts-i18n/references/hardcoded-string-scanner.md +348 -0
  48. package/skills/arkts-i18n/references/language-codes.md +104 -0
  49. package/skills/arkts-i18n/references/resource-file-structure.md +775 -0
  50. package/skills/arkts-i18n/references/static-vs-dynamic.md +242 -0
  51. package/skills/arkts-i18n/references/v1-compat.md +244 -0
  52. package/skills/arkts-i18n/scripts/audit_i18n_completeness.sh +174 -0
  53. package/skills/arkts-icon-sizing/SKILL.md +211 -0
  54. package/skills/arkts-icon-sizing/scripts/icon_audit.py +131 -0
  55. package/skills/arkts-icon-sizing/scripts/icon_autofix.py +88 -0
  56. package/skills/arkts-icon-sizing/scripts/icon_dims.py +179 -0
  57. package/skills/arkts-icon-sizing/scripts/icon_fix.py +119 -0
  58. package/skills/arkts-mvvm-architecture/SKILL.md +613 -0
  59. package/skills/harmonyos-migration-playbook/SKILL.md +56 -0
  60. package/skills/harmonyos-migration-playbook/agents/openai.yaml +7 -0
  61. package/skills/harmonyos-migration-playbook/references/arkts-compile.md +24 -0
  62. package/skills/harmonyos-migration-playbook/references/harmony-runtime.md +53 -0
  63. package/skills/harmonyos-migration-playbook/references/lesson-lifecycle.md +45 -0
  64. package/skills/harmonyos-migration-playbook/references/protocol-e2e.md +23 -0
  65. package/skills/harmonyos-migration-playbook/references/ui-automation.md +52 -0
  66. package/skills/harmonyos-migration-playbook/references/windows-environment.md +38 -0
  67. package/skills/maintaining-migration-report/SKILL.md +155 -0
  68. package/skills/native-library-substitution/SKILL.md +385 -0
  69. package/skills/native-library-substitution/references/native-library-substitution.json +56906 -0
  70. package/skills/native-library-substitution/references/native-library-substitution.md +163 -0
  71. package/skills/preparing-migration-workspace/SKILL.md +124 -0
  72. package/skills/preparing-migration-workspace/toolchain.json +43 -0
  73. package/skills/reviewing-migration-process/SKILL.md +62 -0
  74. package/src/install-opencode.mjs +108 -0
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/managed-evidence.schema.json",
4
+ "title": "droid2hmos Managed Evidence Receipt",
5
+ "type": "object",
6
+ "allOf": [
7
+ {
8
+ "if": {
9
+ "properties": { "kind": { "const": "harmony-test" }, "status": { "const": "passed" } },
10
+ "required": ["kind", "status"]
11
+ },
12
+ "then": {
13
+ "properties": {
14
+ "scope": {
15
+ "type": "object",
16
+ "required": ["target", "coveredRefs", "fullRun"],
17
+ "properties": {
18
+ "target": { "type": "string", "minLength": 1 },
19
+ "coveredRefs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
20
+ "fullRun": { "type": "boolean" }
21
+ }
22
+ },
23
+ "result": {
24
+ "type": "object",
25
+ "required": ["target", "tests"],
26
+ "properties": {
27
+ "target": { "type": "string", "minLength": 1 },
28
+ "tests": { "$ref": "#/$defs/hypiumResult" }
29
+ }
30
+ },
31
+ "artifacts": { "minItems": 1 }
32
+ }
33
+ }
34
+ }
35
+ ],
36
+ "required": ["evidenceVersion", "id", "producer", "kind", "action", "scope", "status", "recordedAt", "idempotencyKey", "source", "guard", "retry", "resultDigest", "result", "artifacts"],
37
+ "properties": {
38
+ "evidenceVersion": { "const": "1.1.0" },
39
+ "id": { "type": "string", "minLength": 1 },
40
+ "producer": { "const": "droid2hmos" },
41
+ "kind": { "enum": ["command", "build", "harmony-test"] },
42
+ "action": { "type": "string", "minLength": 1 },
43
+ "scope": { "type": ["object", "null"] },
44
+ "status": { "type": "string", "minLength": 1 },
45
+ "recordedAt": { "type": "string", "format": "date-time" },
46
+ "idempotencyKey": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
47
+ "source": {
48
+ "type": "object",
49
+ "required": ["gitHead", "factsSha256", "androidFingerprint", "harmonyFingerprint"],
50
+ "properties": {
51
+ "gitHead": { "type": ["string", "null"] },
52
+ "factsSha256": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
53
+ "androidFingerprint": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
54
+ "harmonyFingerprint": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
55
+ },
56
+ "additionalProperties": false
57
+ },
58
+ "guard": {
59
+ "type": ["object", "null"],
60
+ "required": ["mode", "decision", "policyDecision"],
61
+ "properties": {
62
+ "mode": { "enum": ["enforce", "shadow"] },
63
+ "decision": { "enum": ["allow", "deny"] },
64
+ "policyDecision": { "enum": ["allow", "deny"] }
65
+ },
66
+ "additionalProperties": false
67
+ },
68
+ "retry": {
69
+ "type": "object",
70
+ "required": ["kind", "retry", "maxAutomaticAttempts"],
71
+ "properties": {
72
+ "kind": { "enum": ["none", "policy", "transient", "external", "deterministic", "unknown"] },
73
+ "retry": { "enum": ["not-needed", "after-input-change", "bounded", "after-environment-change", "after-diagnosis", "agent-decision"] },
74
+ "maxAutomaticAttempts": { "type": "integer", "minimum": 0, "maximum": 1 }
75
+ },
76
+ "additionalProperties": false
77
+ },
78
+ "resultDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
79
+ "result": { "type": ["object", "null"] },
80
+ "artifacts": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "object",
84
+ "required": ["path", "source", "sha256", "size"],
85
+ "properties": {
86
+ "path": { "type": "string", "pattern": "^\\.migration/evidence/blobs/[a-f0-9]{64}/.+$" },
87
+ "source": { "type": "string", "minLength": 1 },
88
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
89
+ "size": { "type": "integer", "minimum": 0 }
90
+ },
91
+ "additionalProperties": false
92
+ }
93
+ }
94
+ },
95
+ "$defs": {
96
+ "hypiumResult": {
97
+ "type": "object",
98
+ "required": ["valid", "total", "passed", "failed", "errors", "ignored", "resultCode", "executedCases", "summary"],
99
+ "properties": {
100
+ "valid": { "const": true },
101
+ "total": { "type": "integer", "minimum": 1 },
102
+ "passed": { "type": "integer", "minimum": 1 },
103
+ "failed": { "const": 0 },
104
+ "errors": { "const": 0 },
105
+ "ignored": { "const": 0 },
106
+ "resultCode": { "type": ["integer", "null"] },
107
+ "executedCases": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
108
+ "summary": { "type": "string", "minLength": 1 }
109
+ },
110
+ "additionalProperties": false
111
+ }
112
+ },
113
+ "additionalProperties": false
114
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/migration-config.schema.json",
4
+ "title": "Migration Run Configuration",
5
+ "type": "object",
6
+ "required": ["configVersion", "androidProject", "harmonyProject", "git", "commands", "maxAttempts", "humanGates"],
7
+ "properties": {
8
+ "configVersion": { "type": "string", "minLength": 1 },
9
+ "androidProject": { "type": "string", "minLength": 1 },
10
+ "harmonyProject": { "type": "string", "minLength": 1 },
11
+ "harmonySdk": {
12
+ "type": ["object", "null"],
13
+ "required": ["path", "source"],
14
+ "properties": {
15
+ "path": { "type": "string", "minLength": 1 },
16
+ "source": { "enum": ["explicit", "existing-config", "local-properties", "environment"] }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "git": {
21
+ "type": "object",
22
+ "required": ["baseBranch", "taskCommit"],
23
+ "properties": {
24
+ "baseBranch": { "type": "string", "minLength": 1 },
25
+ "taskCommit": { "const": true }
26
+ },
27
+ "additionalProperties": false
28
+ },
29
+ "commands": {
30
+ "type": "object",
31
+ "required": ["androidTest", "androidBuild", "harmonyStatic"],
32
+ "properties": {
33
+ "androidTest": { "type": ["string", "null"] },
34
+ "androidBuild": { "type": ["string", "null"] },
35
+ "harmonyStatic": { "type": ["string", "null"] }
36
+ },
37
+ "additionalProperties": false
38
+ },
39
+ "maxAttempts": { "type": "integer", "minimum": 1 },
40
+ "humanGates": {
41
+ "type": "object",
42
+ "required": ["specApproval", "planApproval"],
43
+ "properties": {
44
+ "specApproval": { "const": true },
45
+ "planApproval": { "const": true }
46
+ },
47
+ "additionalProperties": false
48
+ }
49
+ },
50
+ "additionalProperties": false
51
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/migration-report-index.schema.json",
4
+ "title": "Migration report JSON shard index",
5
+ "type": "object",
6
+ "required": ["reportVersion", "baseline", "app", "status", "pages", "unassignedEntriesFile", "interactionsFile", "unresolvedFile", "discoveriesFile", "summaryFile", "finalAcceptanceFile", "coverage"],
7
+ "properties": {
8
+ "reportVersion": { "const": "1.2.0" },
9
+ "baseline": {
10
+ "type": "object", "required": ["specIndex", "specVersion", "factsSha256"],
11
+ "properties": {
12
+ "specIndex": { "const": ".migration/spec/index.json" },
13
+ "specVersion": { "type": "string", "minLength": 1 },
14
+ "factsSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
15
+ }, "additionalProperties": false
16
+ },
17
+ "app": { "type": "object" },
18
+ "status": { "enum": ["in-progress", "complete"] },
19
+ "pages": { "type": "array", "items": { "$ref": "#/$defs/pageShard" } },
20
+ "unassignedEntriesFile": { "anyOf": [{ "$ref": "#/$defs/jsonPath" }, { "type": "null" }] },
21
+ "interactionsFile": { "$ref": "#/$defs/jsonPath" },
22
+ "unresolvedFile": { "$ref": "#/$defs/jsonPath" },
23
+ "discoveriesFile": { "$ref": "#/$defs/jsonPath" },
24
+ "summaryFile": { "$ref": "#/$defs/jsonPath" },
25
+ "finalAcceptanceFile": { "$ref": "#/$defs/jsonPath" },
26
+ "coverage": {
27
+ "type": "object", "required": ["page", "control", "entry", "interaction", "overall"],
28
+ "properties": {
29
+ "page": { "$ref": "#/$defs/coverage" }, "control": { "$ref": "#/$defs/coverage" }, "entry": { "$ref": "#/$defs/coverage" }, "interaction": { "$ref": "#/$defs/coverage" }, "overall": { "$ref": "#/$defs/coverage" }
30
+ }, "additionalProperties": false
31
+ }
32
+ },
33
+ "$defs": {
34
+ "jsonPath": { "type": "string", "pattern": "^(?![/\\\\])(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$)).+\\.json$" },
35
+ "pageShard": { "type": "object", "required": ["surfaceRef", "file"], "properties": { "surfaceRef": { "type": "string", "minLength": 1 }, "file": { "$ref": "#/$defs/jsonPath" } }, "additionalProperties": false },
36
+ "coverage": { "type": "object", "required": ["required", "pending", "implemented", "verified", "blocked"], "properties": { "required": { "type": "integer", "minimum": 0 }, "pending": { "type": "integer", "minimum": 0 }, "implemented": { "type": "integer", "minimum": 0 }, "verified": { "type": "integer", "minimum": 0 }, "blocked": { "type": "integer", "minimum": 0 } }, "additionalProperties": false }
37
+ },
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/migration-report-item.schema.json",
4
+ "title": "Lightweight migration report item",
5
+ "description": "Minimal AI-maintained result linked to one immutable deterministic SPEC fact.",
6
+ "type": "object",
7
+ "required": ["ref", "kind", "factLabel", "status", "harmonyosFiles", "sourceProvenance", "testEvidence", "difference"],
8
+ "properties": {
9
+ "ref": { "type": "string", "minLength": 1 },
10
+ "kind": { "enum": ["page", "control", "entry", "interaction", "feature"] },
11
+ "factLabel": { "type": "string", "minLength": 1 },
12
+ "controlRef": { "type": ["string", "null"], "minLength": 1 },
13
+ "status": { "enum": ["pending", "implemented", "verified", "blocked"] },
14
+ "harmonyosFiles": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
15
+ "sourceProvenance": {
16
+ "type": "array",
17
+ "items": { "$ref": "#/$defs/sourceProvenance" }
18
+ },
19
+ "testEvidence": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
20
+ "difference": { "type": ["string", "null"], "minLength": 1 }
21
+ },
22
+ "allOf": [
23
+ { "if": { "properties": { "kind": { "const": "entry" } }, "required": ["kind"] }, "then": { "required": ["controlRef"] } },
24
+ { "if": { "properties": { "status": { "const": "implemented" } }, "required": ["status"] }, "then": { "properties": { "harmonyosFiles": { "minItems": 1 }, "sourceProvenance": { "minItems": 1 } } } },
25
+ { "if": { "properties": { "status": { "const": "verified" } }, "required": ["status"] }, "then": { "properties": { "harmonyosFiles": { "minItems": 1 }, "sourceProvenance": { "minItems": 1 }, "testEvidence": { "minItems": 1 } } } },
26
+ { "if": { "properties": { "status": { "const": "blocked" } }, "required": ["status"] }, "then": { "properties": { "difference": { "type": "string", "minLength": 1 } } } }
27
+ ],
28
+ "$defs": {
29
+ "sourceRange": {
30
+ "type": "object",
31
+ "required": ["symbol", "startLine", "endLine"],
32
+ "properties": {
33
+ "symbol": { "type": "string", "minLength": 1 },
34
+ "startLine": { "type": "integer", "minimum": 1 },
35
+ "endLine": { "type": "integer", "minimum": 1 }
36
+ },
37
+ "additionalProperties": false
38
+ },
39
+ "sourceProvenance": {
40
+ "type": "object",
41
+ "required": ["androidFile", "fileSha256"],
42
+ "properties": {
43
+ "androidFile": { "type": "string", "pattern": "^(?![/\\\\])(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$)).+" },
44
+ "fileSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
45
+ "ranges": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/sourceRange" } }
46
+ },
47
+ "additionalProperties": false
48
+ }
49
+ },
50
+ "additionalProperties": false
51
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/migration-report-summary.schema.json",
4
+ "title": "User-facing migration summary",
5
+ "type": "object",
6
+ "required": ["summary", "incomplete", "nextSteps"],
7
+ "properties": {
8
+ "summary": { "type": "string" },
9
+ "incomplete": { "type": "array", "items": { "type": "string", "minLength": 1 } },
10
+ "nextSteps": { "type": "array", "items": { "type": "string", "minLength": 1 } },
11
+ "additionalSections": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "required": ["title", "content"],
16
+ "properties": {
17
+ "title": { "type": "string", "minLength": 1 },
18
+ "content": { "type": "string", "minLength": 1 }
19
+ },
20
+ "additionalProperties": false
21
+ }
22
+ }
23
+ },
24
+ "additionalProperties": false
25
+ }
@@ -0,0 +1,202 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/migration-status.schema.json",
4
+ "title": "Derived Migration Kernel Snapshot",
5
+ "type": "object",
6
+ "required": ["kernelVersion", "policyVersion", "projectRoot", "phase", "workspace", "preflight", "source", "report", "planning", "evidence", "completion", "allowedActions"],
7
+ "properties": {
8
+ "kernelVersion": { "const": "1.2.0" },
9
+ "policyVersion": { "const": "1.2.0" },
10
+ "projectRoot": { "type": "string", "minLength": 1 },
11
+ "phase": { "enum": ["workspace-preparation", "preflight", "analysis", "report-initialization", "task-planning", "implementation", "verification", "ready-to-complete"] },
12
+ "workspace": {
13
+ "type": "object",
14
+ "required": ["projectPresent", "androidProject", "projectCandidates", "configPresent", "harmonyProject", "harmonyProjectPresent", "gitHead"],
15
+ "properties": {
16
+ "projectPresent": { "type": "boolean" },
17
+ "androidProject": { "type": "string", "minLength": 1 },
18
+ "projectCandidates": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
19
+ "configPresent": { "type": "boolean" },
20
+ "harmonyProject": { "type": "string" },
21
+ "harmonyProjectPresent": { "type": "boolean" },
22
+ "gitHead": { "type": ["string", "null"] }
23
+ },
24
+ "additionalProperties": false
25
+ },
26
+ "preflight": {
27
+ "type": "object",
28
+ "required": ["present", "result", "harmonyDevice"],
29
+ "properties": {
30
+ "present": { "type": "boolean" },
31
+ "result": { "type": "string" },
32
+ "harmonyDevice": { "type": "string" }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "source": {
37
+ "type": "object",
38
+ "required": ["factsSha256", "androidFingerprint", "harmonyFingerprint"],
39
+ "properties": {
40
+ "factsSha256": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
41
+ "androidFingerprint": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
42
+ "harmonyFingerprint": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
43
+ },
44
+ "additionalProperties": false
45
+ },
46
+ "report": {
47
+ "type": "object",
48
+ "required": ["present", "version", "valid", "complete", "errors", "completionErrors", "warnings", "evidenceLevel", "sourceManifest", "orderAudit", "closureAudit", "literalAudit"],
49
+ "properties": {
50
+ "present": { "type": "boolean" },
51
+ "version": { "type": ["string", "null"] },
52
+ "valid": { "type": "boolean" },
53
+ "complete": { "type": "boolean" },
54
+ "errors": { "type": "array", "items": { "type": "string" } },
55
+ "completionErrors": { "type": "array", "items": { "type": "string" } },
56
+ "warnings": { "type": "array", "items": { "type": "string" } },
57
+ "evidenceLevel": { "type": ["string", "null"], "enum": ["declared-hash-validated", "observed-order-audited", null] },
58
+ "sourceManifest": { "anyOf": [{ "$ref": "#/$defs/sourceManifestSummary" }, { "type": "null" }] },
59
+ "orderAudit": { "anyOf": [{ "$ref": "#/$defs/orderAudit" }, { "type": "null" }] },
60
+ "closureAudit": { "anyOf": [{ "$ref": "#/$defs/closureAudit" }, { "type": "null" }] },
61
+ "literalAudit": { "anyOf": [{ "$ref": "#/$defs/literalAudit" }, { "type": "null" }] }
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ "planning": {
66
+ "type": "object",
67
+ "required": ["present", "valid", "fresh", "taskPlanSha256", "totalTasks", "readyTasks", "blockedTasks", "completedTasks", "recommendedTaskId", "alternatives", "reasons", "ownershipCoverage", "closureCoverage", "orphanFactRefs", "errors", "warnings", "tasks"],
68
+ "properties": {
69
+ "present": { "type": "boolean" },
70
+ "valid": { "type": "boolean" },
71
+ "fresh": { "type": "boolean" },
72
+ "taskPlanSha256": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
73
+ "totalTasks": { "type": "integer", "minimum": 0 },
74
+ "readyTasks": { "type": "integer", "minimum": 0 },
75
+ "blockedTasks": { "type": "integer", "minimum": 0 },
76
+ "completedTasks": { "type": "integer", "minimum": 0 },
77
+ "recommendedTaskId": { "type": ["string", "null"], "pattern": "^task:[a-f0-9]{16}$" },
78
+ "alternatives": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^task:[a-f0-9]{16}$" } },
79
+ "reasons": {
80
+ "type": "object",
81
+ "additionalProperties": { "type": "array", "items": { "type": "string", "minLength": 1 } }
82
+ },
83
+ "ownershipCoverage": { "type": "number", "minimum": 0, "maximum": 1 },
84
+ "closureCoverage": { "type": "number", "minimum": 0, "maximum": 1 },
85
+ "orphanFactRefs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
86
+ "errors": { "type": "array", "items": { "type": "string", "minLength": 1 } },
87
+ "warnings": { "type": "array", "items": { "type": "string", "minLength": 1 } },
88
+ "tasks": { "type": "array", "items": { "$ref": "#/$defs/taskRuntime" } }
89
+ },
90
+ "additionalProperties": false
91
+ },
92
+ "evidence": {
93
+ "type": "object",
94
+ "required": ["androidAnalysis", "fullRegression", "claimCoverage"],
95
+ "properties": {
96
+ "androidAnalysis": { "$ref": "#/$defs/evidenceState" },
97
+ "fullRegression": { "$ref": "#/$defs/evidenceState" },
98
+ "claimCoverage": {
99
+ "type": "object",
100
+ "required": ["valid", "missing"],
101
+ "properties": {
102
+ "valid": { "type": "boolean" },
103
+ "missing": { "type": "array", "items": { "$ref": "#/$defs/missingClaim" } }
104
+ },
105
+ "additionalProperties": false
106
+ }
107
+ },
108
+ "additionalProperties": false
109
+ },
110
+ "completion": {
111
+ "type": "object",
112
+ "required": ["eligible", "unmet"],
113
+ "properties": {
114
+ "eligible": { "type": "boolean" },
115
+ "unmet": { "type": "array", "items": { "$ref": "#/$defs/unmet" } }
116
+ },
117
+ "additionalProperties": false
118
+ },
119
+ "allowedActions": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
120
+ },
121
+ "$defs": {
122
+ "evidenceState": {
123
+ "type": "object",
124
+ "required": ["reference", "present", "passed", "fresh"],
125
+ "properties": {
126
+ "reference": { "type": ["string", "null"] },
127
+ "present": { "type": "boolean" },
128
+ "passed": { "type": "boolean" },
129
+ "fresh": { "type": "boolean" }
130
+ },
131
+ "additionalProperties": false
132
+ },
133
+ "unmet": {
134
+ "type": "object",
135
+ "required": ["code", "message"],
136
+ "properties": { "code": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } },
137
+ "additionalProperties": false
138
+ },
139
+ "missingClaim": {
140
+ "type": "object",
141
+ "required": ["ref", "reason"],
142
+ "properties": { "ref": { "type": "string", "minLength": 1 }, "reason": { "type": "string", "minLength": 1 } },
143
+ "additionalProperties": false
144
+ },
145
+ "taskRuntime": {
146
+ "type": "object",
147
+ "required": ["taskId", "state", "reasons"],
148
+ "properties": {
149
+ "taskId": { "type": "string", "pattern": "^task:[a-f0-9]{16}$" },
150
+ "state": { "enum": ["pending", "ready", "blocked", "implemented", "locally-verified", "stale", "globally-verified"] },
151
+ "reasons": { "type": "array", "items": { "type": "string", "minLength": 1 } }
152
+ },
153
+ "additionalProperties": false
154
+ },
155
+ "orderAudit": {
156
+ "type": "object",
157
+ "required": ["auditVersion", "status", "eventSource", "auditedRefs", "findings"],
158
+ "properties": {
159
+ "auditVersion": { "const": "1.0.0" },
160
+ "status": { "enum": ["passed", "red-flag", "unavailable"] },
161
+ "eventSource": { "type": "string", "minLength": 1 },
162
+ "auditedRefs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
163
+ "findings": { "type": "array", "items": { "type": "string", "minLength": 1 } }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "sourceManifestSummary": {
168
+ "type": "object",
169
+ "required": ["path", "manifestSha256", "memberCount"],
170
+ "properties": {
171
+ "path": { "const": ".migration/audit/android-source-manifest.json" },
172
+ "manifestSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
173
+ "memberCount": { "type": "integer", "minimum": 0 }
174
+ },
175
+ "additionalProperties": false
176
+ },
177
+ "closureAudit": {
178
+ "type": "object",
179
+ "required": ["auditVersion", "status", "auditedRefs", "findings"],
180
+ "properties": {
181
+ "auditVersion": { "const": "1.0.0" },
182
+ "status": { "enum": ["passed", "red-flag", "unavailable"] },
183
+ "auditedRefs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
184
+ "findings": { "type": "array", "items": { "type": "string", "minLength": 1 } }
185
+ },
186
+ "additionalProperties": false
187
+ },
188
+ "literalAudit": {
189
+ "type": "object",
190
+ "required": ["auditVersion", "status", "sampleSeed", "sampledRefs", "warnings"],
191
+ "properties": {
192
+ "auditVersion": { "const": "1.0.0" },
193
+ "status": { "enum": ["passed", "warning", "not-applicable"] },
194
+ "sampleSeed": { "type": "string" },
195
+ "sampledRefs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
196
+ "warnings": { "type": "array", "items": { "type": "string", "minLength": 1 } }
197
+ },
198
+ "additionalProperties": false
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://chuanqi.dev/schemas/preflight.schema.json",
4
+ "title": "Migration Preflight Report",
5
+ "type": "object",
6
+ "required": ["createdAt", "configRef", "projectRoot", "harmonyProject", "gitHead", "result", "checks"],
7
+ "properties": {
8
+ "createdAt": { "type": "string" },
9
+ "configRef": { "const": ".migration/config.json" },
10
+ "projectRoot": { "type": "string" },
11
+ "harmonyProject": { "type": "string" },
12
+ "gitHead": { "type": "string", "minLength": 1 },
13
+ "result": { "enum": ["passed", "failed", "blocked_external"] },
14
+ "checks": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "required": ["id", "status", "summary"],
19
+ "properties": {
20
+ "id": { "type": "string", "minLength": 1 },
21
+ "status": { "enum": ["passed", "failed", "not_applicable", "blocked_external"] },
22
+ "summary": { "type": "string" },
23
+ "evidence": { "type": "array", "items": { "type": "string" } }
24
+ },
25
+ "additionalProperties": false
26
+ }
27
+ }
28
+ },
29
+ "allOf": [
30
+ {
31
+ "properties": {
32
+ "checks": {
33
+ "contains": {
34
+ "type": "object",
35
+ "properties": {
36
+ "id": { "const": "harmony-device" },
37
+ "status": { "const": "passed" }
38
+ },
39
+ "required": ["id", "status"]
40
+ }
41
+ }
42
+ }
43
+ },
44
+ {
45
+ "properties": {
46
+ "checks": {
47
+ "contains": {
48
+ "type": "object",
49
+ "properties": {
50
+ "id": { "const": "android-emulator" },
51
+ "status": { "enum": ["passed", "not_applicable"] }
52
+ },
53
+ "required": ["id", "status"]
54
+ }
55
+ }
56
+ }
57
+ }
58
+ ],
59
+ "additionalProperties": false
60
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/source-order-audit.schema.json",
4
+ "title": "Source read/write order audit result",
5
+ "description": "passed is valid only for authenticated runner events grouped within the same sessionId and epochId. Project-authored event files must remain unavailable.",
6
+ "type": "object",
7
+ "required": ["auditVersion", "status", "eventSource", "auditedRefs", "findings"],
8
+ "properties": {
9
+ "auditVersion": { "const": "1.0.0" },
10
+ "status": { "enum": ["passed", "red-flag", "unavailable"] },
11
+ "eventSource": { "const": ".migration/audit/source-events.jsonl" },
12
+ "auditedRefs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
13
+ "findings": { "type": "array", "items": { "type": "string", "minLength": 1 } }
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/source-provenance-event.schema.json",
4
+ "title": "Trusted ordered source provenance event",
5
+ "description": "Optional host/runner event input. A project-local file is not trusted by itself: only an authenticated runner integration may enable consumption. Its absence must produce an unavailable order audit, never a synthetic pass.",
6
+ "type": "object",
7
+ "required": ["sourceEventVersion", "sessionId", "epochId", "sequence", "action", "file", "reportRefs", "parallelGroup"],
8
+ "properties": {
9
+ "sourceEventVersion": { "const": "1.0.0" },
10
+ "sessionId": { "type": "string", "minLength": 1 },
11
+ "epochId": { "type": "string", "minLength": 1 },
12
+ "sequence": { "type": "integer", "minimum": 0 },
13
+ "action": { "enum": ["read", "write"] },
14
+ "file": { "type": "string", "pattern": "^(?![/\\\\])(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$)).+" },
15
+ "reportRefs": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
16
+ "parallelGroup": { "type": ["string", "null"], "minLength": 1 }
17
+ },
18
+ "additionalProperties": false
19
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://harmonyos-ai.dev/schemas/spec-app-shard.schema.json",
4
+ "title": "SPEC 2.0.0 App Facts Shard",
5
+ "type": "object",
6
+ "required": ["shardVersion", "generation", "app", "coverage", "warnings", "uiGraph"],
7
+ "properties": {
8
+ "shardVersion": { "const": "2.0.0" },
9
+ "generation": { "type": "object" },
10
+ "app": {
11
+ "type": "object",
12
+ "required": ["name", "packageName", "platform", "appGraphHash"],
13
+ "properties": {
14
+ "name": { "type": "string" },
15
+ "packageName": { "type": "string" },
16
+ "platform": { "const": "android" },
17
+ "appGraphHash": { "type": "string", "minLength": 1 },
18
+ "entryResolution": { "$ref": "#/$defs/entryResolution" }
19
+ },
20
+ "additionalProperties": false
21
+ },
22
+ "entryResolution": { "$ref": "#/$defs/entryResolution" },
23
+ "coverage": { "type": "object" },
24
+ "warnings": { "type": "array", "items": { "type": "string" } },
25
+ "uiGraph": {
26
+ "type": "object",
27
+ "required": ["roots"],
28
+ "properties": { "roots": { "$ref": "#/$defs/refs" } },
29
+ "additionalProperties": false
30
+ }
31
+ },
32
+ "$defs": {
33
+ "refs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
34
+ "entryResolution": {
35
+ "type": "object",
36
+ "required": ["launcherSurfaceRefs", "launcherEntryRefs"],
37
+ "properties": {
38
+ "launcherSurfaceRefs": { "$ref": "#/$defs/refs" },
39
+ "launcherEntryRefs": { "$ref": "#/$defs/refs" }
40
+ },
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "additionalProperties": false
45
+ }