archctx-contracts 0.17.1 → 0.18.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 (112) hide show
  1. package/fixtures/valid/archctx-capabilities.json +2 -2
  2. package/fixtures/valid/product-version-manifest.json +4 -10
  3. package/package.json +4 -1
  4. package/schemas/repo/refactor-decision.schema.json +283 -37
  5. package/schemas/runtime/archctx-capabilities.schema.json +144 -20
  6. package/schemas/runtime/architecture-debt-delta.schema.json +58 -19
  7. package/schemas/runtime/architecture-debt.schema.json +42 -42
  8. package/schemas/runtime/architecture-event.schema.json +1 -1
  9. package/schemas/runtime/architecture-history.schema.json +354 -0
  10. package/schemas/runtime/capability-dependencies.schema.json +266 -59
  11. package/schemas/runtime/cli-check.schema.json +197 -0
  12. package/schemas/runtime/cli-help.schema.json +28 -0
  13. package/schemas/runtime/dependency-constraint-evaluation.schema.json +67 -68
  14. package/schemas/runtime/docs-anchors.schema.json +250 -67
  15. package/schemas/runtime/doctor-code-facts.schema.json +49 -0
  16. package/schemas/runtime/evidence-binding.schema.json +1 -1
  17. package/schemas/runtime/flow-selector-check.schema.json +179 -46
  18. package/schemas/runtime/hook-debt-checkpoint.schema.json +12 -12
  19. package/schemas/runtime/index-seed.schema.json +56 -0
  20. package/schemas/runtime/path-context.schema.json +108 -0
  21. package/schemas/runtime/product-version-manifest.schema.json +142 -54
  22. package/schemas/runtime/projection-slice.schema.json +34 -34
  23. package/schemas/runtime/recommendation-v3.schema.json +372 -1
  24. package/schemas/runtime/ref-impact-batch-request.schema.json +20 -7
  25. package/schemas/runtime/ref-impact-batch.schema.json +83 -13
  26. package/schemas/runtime/ref-impact.schema.json +68 -61
  27. package/schemas/runtime/refactor-scan-v2.schema.json +434 -0
  28. package/schemas/runtime/refactor-simulate.schema.json +505 -0
  29. package/schemas/runtime/refactor-verify-v2.schema.json +172 -0
  30. package/schemas/runtime/resolve-path.schema.json +69 -0
  31. package/schemas/runtime/runtime-recommendation-show.schema.json +531 -2
  32. package/schemas/runtime/runtime-refactor-scan.schema.json +498 -2
  33. package/schemas/runtime/runtime-verify.schema.json +274 -56
  34. package/schemas/runtime/state-machine-check.schema.json +357 -89
  35. package/schemas/runtime/structural-observation-payload.schema.json +372 -1
  36. package/schemas/runtime/sync-check.schema.json +65 -0
  37. package/src/architecture-debt.ts +125 -38
  38. package/src/architecture-history.ts +168 -42
  39. package/src/architecture.ts +100 -0
  40. package/src/cli-read.ts +228 -0
  41. package/src/docs-anchors.ts +105 -50
  42. package/src/explorer-occurrence-ports.ts +175 -0
  43. package/src/explorer-query-ports.ts +270 -0
  44. package/src/failure.ts +3 -0
  45. package/src/index-seed.ts +42 -0
  46. package/src/index.ts +5 -0
  47. package/src/ledger-records.ts +262 -0
  48. package/src/ledger.ts +27 -566
  49. package/src/ownership-dependencies.ts +115 -5
  50. package/src/ports.ts +6 -541
  51. package/src/product-version.ts +74 -55
  52. package/src/projection-apply-types.ts +216 -0
  53. package/src/projection-apply-validators.ts +355 -0
  54. package/src/projection-capabilities.ts +181 -0
  55. package/src/projection-constants.ts +317 -0
  56. package/src/projection-manifest-types.ts +298 -0
  57. package/src/projection-manifest.ts +12 -299
  58. package/src/projection-recovery-validators.ts +229 -0
  59. package/src/projection-request-validators.ts +326 -0
  60. package/src/projection-types.ts +365 -0
  61. package/src/projection-validation-helpers.ts +15 -0
  62. package/src/projection.ts +7 -1689
  63. package/src/ref-impact.ts +225 -33
  64. package/src/refactor-constants.ts +213 -0
  65. package/src/refactor-decision-validators.ts +350 -0
  66. package/src/refactor-evidence-types.ts +286 -0
  67. package/src/refactor-observation-validators.ts +359 -0
  68. package/src/refactor-resolution-validators.ts +229 -0
  69. package/src/refactor-snapshot-validators.ts +368 -0
  70. package/src/refactor-types.ts +270 -0
  71. package/src/refactor-v2.ts +389 -0
  72. package/src/refactor-validation-helpers.ts +195 -0
  73. package/src/refactor.ts +7 -1849
  74. package/src/review-guards.ts +3 -23
  75. package/src/runtime-verify.ts +87 -0
  76. package/src/schema-kit.ts +183 -0
  77. package/src/schema-registry.ts +73 -0
  78. package/src/schema.ts +0 -4
  79. package/src/state-machine-schemas.ts +192 -0
  80. package/src/state-machine-types.ts +188 -0
  81. package/src/state-machine.ts +9 -189
  82. package/fixtures/boundary/agent-job-expired.json +0 -33
  83. package/fixtures/invalid/adapter-fidelity-reverse-sync.json +0 -9
  84. package/fixtures/invalid/agent-job-direct-mutation.json +0 -32
  85. package/fixtures/invalid/cloud-egress-envelope-private-field.json +0 -12
  86. package/fixtures/invalid/investigation-report-direct-mutation.json +0 -38
  87. package/fixtures/invalid/investigation-report-missing-proposed-delta.json +0 -19
  88. package/fixtures/invalid/notification-event-code-field.json +0 -11
  89. package/fixtures/valid/adapter-fidelity.json +0 -9
  90. package/fixtures/valid/agent-job.json +0 -33
  91. package/fixtures/valid/architecture-candidate-delta-policy.json +0 -45
  92. package/fixtures/valid/architecture-candidate-delta.json +0 -188
  93. package/fixtures/valid/chatgpt-ga-tool.json +0 -9
  94. package/fixtures/valid/cloud-egress-envelope.json +0 -11
  95. package/fixtures/valid/entitlement.json +0 -12
  96. package/fixtures/valid/investigation-report.json +0 -38
  97. package/fixtures/valid/likec4-mapping.json +0 -14
  98. package/fixtures/valid/notification-event.json +0 -10
  99. package/fixtures/valid/notification-provider.json +0 -12
  100. package/fixtures/valid/structurizr-mapping.json +0 -15
  101. package/schemas/cloud/cloud-egress-envelope.schema.json +0 -19
  102. package/schemas/cloud/entitlement.schema.json +0 -24
  103. package/schemas/integrations/adapter-fidelity.schema.json +0 -21
  104. package/schemas/integrations/chatgpt-ga-tool.schema.json +0 -25
  105. package/schemas/integrations/likec4-mapping.schema.json +0 -32
  106. package/schemas/integrations/structurizr-mapping.schema.json +0 -33
  107. package/schemas/runtime/agent-job.schema.json +0 -63
  108. package/schemas/runtime/architecture-candidate-delta-policy.schema.json +0 -129
  109. package/schemas/runtime/architecture-candidate-delta.schema.json +0 -386
  110. package/schemas/runtime/investigation-report.schema.json +0 -119
  111. package/schemas/runtime/notification-event.schema.json +0 -18
  112. package/schemas/runtime/notification-provider.schema.json +0 -26
@@ -3,117 +3,324 @@
3
3
  "$id": "https://archcontext.dev/schemas/runtime/capability-dependencies.schema.json",
4
4
  "title": "CapabilityDependenciesV1",
5
5
  "description": "The data of `archctx deps`: a read-only capability x capability import matrix. Owners come from the parent-chain rule `refactor scan` uses, rolled up to the nearest capability. Each cell says whether a model relation declares it. Call counts are not available in v1. Without code facts that attest to the measured tree, deps refuses with AC_CODE_FACTS_UNAVAILABLE instead of returning this data.",
6
- "type": "object",
7
6
  "additionalProperties": false,
8
- "required": ["schemaVersion", "ownershipRule", "filter", "capabilities", "matrix", "imports", "calls", "edges", "worktree", "privacy"],
7
+ "type": "object",
8
+ "required": [
9
+ "schemaVersion",
10
+ "ownershipRule",
11
+ "filter",
12
+ "capabilities",
13
+ "matrix",
14
+ "imports",
15
+ "calls",
16
+ "edges",
17
+ "worktree",
18
+ "privacy"
19
+ ],
9
20
  "properties": {
10
- "schemaVersion": { "const": "archcontext.capability-dependencies/v1" },
11
- "ownershipRule": { "const": "parent-chain" },
21
+ "schemaVersion": {
22
+ "const": "archcontext.capability-dependencies/v1"
23
+ },
24
+ "ownershipRule": {
25
+ "const": "parent-chain"
26
+ },
12
27
  "filter": {
13
- "type": "object",
14
28
  "additionalProperties": false,
15
- "required": ["from", "into"],
29
+ "type": "object",
30
+ "required": [
31
+ "from",
32
+ "into"
33
+ ],
16
34
  "properties": {
17
- "from": { "type": ["string", "null"] },
18
- "into": { "type": ["string", "null"] }
35
+ "from": {
36
+ "type": [
37
+ "string",
38
+ "null"
39
+ ]
40
+ },
41
+ "into": {
42
+ "type": [
43
+ "string",
44
+ "null"
45
+ ]
46
+ }
47
+ }
48
+ },
49
+ "capabilities": {
50
+ "uniqueItems": true,
51
+ "type": "array",
52
+ "items": {
53
+ "minLength": 1,
54
+ "type": "string"
19
55
  }
20
56
  },
21
- "capabilities": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
22
57
  "matrix": {
23
58
  "type": "array",
24
59
  "items": {
25
- "type": "object",
26
60
  "additionalProperties": false,
27
- "required": ["from", "to", "imports", "calls", "declared", "relationIds"],
61
+ "if": {
62
+ "properties": {
63
+ "relationIds": {
64
+ "minItems": 1
65
+ }
66
+ }
67
+ },
68
+ "then": {
69
+ "properties": {
70
+ "declared": {
71
+ "const": true
72
+ }
73
+ }
74
+ },
75
+ "type": "object",
76
+ "required": [
77
+ "from",
78
+ "to",
79
+ "imports",
80
+ "calls",
81
+ "declared",
82
+ "relationIds"
83
+ ],
28
84
  "properties": {
29
- "from": { "type": "string", "minLength": 1 },
30
- "to": { "type": "string", "minLength": 1 },
31
- "imports": { "type": "integer", "minimum": 1 },
32
- "calls": { "type": "null" },
33
- "declared": { "type": "boolean", "description": "A relation of a declaring kind (every kind but deployed-on, spawns, runs-in and mounts) runs from a node that rolls up to `from` into a node that rolls up to `to`. A cell with from equal to to is always declared and lists no relation ids." },
34
- "relationIds": { "type": "array", "uniqueItems": true, "description": "The declaring relation ids, sorted. Non-empty exactly when a cross-capability cell is declared.", "items": { "type": "string", "minLength": 1 } }
35
- },
36
- "if": { "properties": { "relationIds": { "minItems": 1 } } },
37
- "then": { "properties": { "declared": { "const": true } } }
85
+ "from": {
86
+ "minLength": 1,
87
+ "type": "string"
88
+ },
89
+ "to": {
90
+ "minLength": 1,
91
+ "type": "string"
92
+ },
93
+ "imports": {
94
+ "minimum": 0,
95
+ "type": "integer"
96
+ },
97
+ "calls": {
98
+ "minimum": 0,
99
+ "type": [
100
+ "integer",
101
+ "null"
102
+ ]
103
+ },
104
+ "declared": {
105
+ "description": "A relation of a declaring kind (every kind but deployed-on, spawns, runs-in and mounts) runs from a node that rolls up to `from` into a node that rolls up to `to`. A cell with from equal to to is always declared and lists no relation ids.",
106
+ "type": "boolean"
107
+ },
108
+ "relationIds": {
109
+ "uniqueItems": true,
110
+ "description": "The declaring relation ids, sorted. Non-empty exactly when a cross-capability cell is declared.",
111
+ "type": "array",
112
+ "items": {
113
+ "minLength": 1,
114
+ "type": "string"
115
+ }
116
+ }
117
+ }
38
118
  }
39
119
  },
40
120
  "imports": {
41
- "type": "object",
42
121
  "additionalProperties": false,
43
- "required": ["coverage", "reasonCodes", "truncated", "importNodeCount", "importNodeLimit", "importNodeLimitExceeded", "edgeCount", "unresolvedCount", "unattributed"],
122
+ "type": "object",
123
+ "required": [
124
+ "coverage",
125
+ "reasonCodes",
126
+ "truncated",
127
+ "importNodeCount",
128
+ "importNodeLimit",
129
+ "importNodeLimitExceeded",
130
+ "edgeCount",
131
+ "unresolvedCount",
132
+ "unattributed"
133
+ ],
44
134
  "properties": {
45
- "coverage": { "enum": ["complete", "partial"] },
135
+ "coverage": {
136
+ "enum": [
137
+ "complete",
138
+ "partial"
139
+ ]
140
+ },
46
141
  "reasonCodes": {
47
- "type": "array",
48
142
  "uniqueItems": true,
49
- "items": { "enum": ["code-facts-import-limit", "code-facts-truncated"] }
50
- },
51
- "truncated": { "type": "boolean" },
52
- "importNodeCount": { "type": ["integer", "null"], "minimum": 0 },
53
- "importNodeLimit": { "type": "integer", "minimum": 1 },
54
- "importNodeLimitExceeded": { "type": "boolean" },
55
- "edgeCount": { "type": "integer", "minimum": 0 },
56
- "unresolvedCount": { "type": "integer", "minimum": 0 },
143
+ "type": "array",
144
+ "items": {
145
+ "enum": [
146
+ "code-facts-import-limit",
147
+ "code-facts-truncated"
148
+ ]
149
+ }
150
+ },
151
+ "truncated": {
152
+ "type": "boolean"
153
+ },
154
+ "importNodeCount": {
155
+ "minimum": 0,
156
+ "type": [
157
+ "integer",
158
+ "null"
159
+ ]
160
+ },
161
+ "importNodeLimit": {
162
+ "minimum": 1,
163
+ "type": "integer"
164
+ },
165
+ "importNodeLimitExceeded": {
166
+ "type": "boolean"
167
+ },
168
+ "edgeCount": {
169
+ "minimum": 0,
170
+ "type": "integer"
171
+ },
172
+ "unresolvedCount": {
173
+ "minimum": 0,
174
+ "type": "integer"
175
+ },
57
176
  "unattributed": {
58
- "type": "object",
59
177
  "additionalProperties": false,
60
- "required": ["unownedEndpoint", "contestedEndpoint", "noCapabilityEndpoint"],
178
+ "type": "object",
179
+ "required": [
180
+ "unownedEndpoint",
181
+ "contestedEndpoint",
182
+ "noCapabilityEndpoint"
183
+ ],
61
184
  "properties": {
62
- "unownedEndpoint": { "type": "integer", "minimum": 0 },
63
- "contestedEndpoint": { "type": "integer", "minimum": 0 },
64
- "noCapabilityEndpoint": { "type": "integer", "minimum": 0 }
185
+ "unownedEndpoint": {
186
+ "minimum": 0,
187
+ "type": "integer"
188
+ },
189
+ "contestedEndpoint": {
190
+ "minimum": 0,
191
+ "type": "integer"
192
+ },
193
+ "noCapabilityEndpoint": {
194
+ "minimum": 0,
195
+ "type": "integer"
196
+ }
65
197
  }
66
198
  }
67
199
  }
68
200
  },
69
201
  "calls": {
70
- "type": "object",
71
202
  "additionalProperties": false,
72
- "required": ["coverage", "reasonCodes"],
203
+ "type": "object",
204
+ "required": [
205
+ "coverage",
206
+ "reasonCodes"
207
+ ],
73
208
  "properties": {
74
- "coverage": { "const": "unknown" },
75
- "reasonCodes": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "const": "call-edges-not-exposed" } }
209
+ "coverage": {
210
+ "enum": [
211
+ "complete",
212
+ "partial",
213
+ "unknown"
214
+ ]
215
+ },
216
+ "reasonCodes": {
217
+ "uniqueItems": true,
218
+ "type": "array",
219
+ "items": {
220
+ "enum": [
221
+ "call-edges-not-exposed",
222
+ "code-facts-call-limit",
223
+ "code-facts-truncated",
224
+ "code-facts-unavailable"
225
+ ]
226
+ }
227
+ },
228
+ "edgeCount": {
229
+ "minimum": 0,
230
+ "type": "integer"
231
+ },
232
+ "edgeLimit": {
233
+ "minimum": 1,
234
+ "type": "integer"
235
+ },
236
+ "limitExceeded": {
237
+ "type": "boolean"
238
+ }
76
239
  }
77
240
  },
78
241
  "edges": {
79
- "type": "object",
80
242
  "additionalProperties": false,
81
- "required": ["limit", "count", "omittedCount", "items"],
243
+ "type": "object",
244
+ "required": [
245
+ "limit",
246
+ "count",
247
+ "omittedCount",
248
+ "items"
249
+ ],
82
250
  "properties": {
83
- "limit": { "type": "integer", "minimum": 0 },
84
- "count": { "type": "integer", "minimum": 0 },
85
- "omittedCount": { "type": "integer", "minimum": 0 },
251
+ "limit": {
252
+ "minimum": 0,
253
+ "type": "integer"
254
+ },
255
+ "count": {
256
+ "minimum": 0,
257
+ "type": "integer"
258
+ },
259
+ "omittedCount": {
260
+ "minimum": 0,
261
+ "type": "integer"
262
+ },
86
263
  "items": {
87
264
  "type": "array",
88
265
  "items": {
89
- "type": "object",
90
266
  "additionalProperties": false,
91
- "required": ["fromPath", "toPath", "fromCapability", "toCapability"],
267
+ "type": "object",
268
+ "required": [
269
+ "fromPath",
270
+ "toPath",
271
+ "fromCapability",
272
+ "toCapability"
273
+ ],
92
274
  "properties": {
93
- "fromPath": { "type": "string", "minLength": 1 },
94
- "toPath": { "type": "string", "minLength": 1 },
95
- "fromCapability": { "type": "string", "minLength": 1 },
96
- "toCapability": { "type": "string", "minLength": 1 }
275
+ "fromPath": {
276
+ "minLength": 1,
277
+ "type": "string"
278
+ },
279
+ "toPath": {
280
+ "minLength": 1,
281
+ "type": "string"
282
+ },
283
+ "fromCapability": {
284
+ "minLength": 1,
285
+ "type": "string"
286
+ },
287
+ "toCapability": {
288
+ "minLength": 1,
289
+ "type": "string"
290
+ }
97
291
  }
98
292
  }
99
293
  }
100
294
  }
101
295
  },
102
296
  "worktree": {
103
- "type": "object",
104
297
  "additionalProperties": false,
105
- "required": ["headSha", "worktreeDigest"],
298
+ "type": "object",
299
+ "required": [
300
+ "headSha",
301
+ "worktreeDigest"
302
+ ],
106
303
  "properties": {
107
- "headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
108
- "worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
304
+ "headSha": {
305
+ "pattern": "^[a-f0-9]{40}$",
306
+ "type": "string"
307
+ },
308
+ "worktreeDigest": {
309
+ "pattern": "^sha256:[a-f0-9]{64}$",
310
+ "type": "string"
311
+ }
109
312
  }
110
313
  },
111
314
  "privacy": {
112
- "type": "object",
113
315
  "additionalProperties": false,
114
- "required": ["writes"],
316
+ "type": "object",
317
+ "required": [
318
+ "writes"
319
+ ],
115
320
  "properties": {
116
- "writes": { "const": "none" }
321
+ "writes": {
322
+ "const": "none"
323
+ }
117
324
  }
118
325
  }
119
326
  }
@@ -0,0 +1,197 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archcontext.dev/schemas/runtime/cli-check.schema.json",
4
+ "title": "CliCheckOutputV1",
5
+ "description": "Unified read-only gate payload for `archctx check --changed` and `archctx check --base <ref> [--slice]`.",
6
+ "oneOf": [
7
+ {
8
+ "additionalProperties": false,
9
+ "type": "object",
10
+ "required": [
11
+ "schemaVersion",
12
+ "mode",
13
+ "status",
14
+ "exitCode",
15
+ "changedPaths",
16
+ "debt"
17
+ ],
18
+ "properties": {
19
+ "schemaVersion": {
20
+ "const": "archcontext.cli-check/v1"
21
+ },
22
+ "mode": {
23
+ "const": "changed"
24
+ },
25
+ "status": {
26
+ "type": "string",
27
+ "enum": [
28
+ "pass",
29
+ "findings"
30
+ ]
31
+ },
32
+ "exitCode": {
33
+ "type": "integer",
34
+ "enum": [
35
+ 0,
36
+ 2
37
+ ]
38
+ },
39
+ "changedPaths": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "not": {
45
+ "anyOf": [
46
+ {
47
+ "pattern": "^/"
48
+ },
49
+ {
50
+ "pattern": "\\\\"
51
+ },
52
+ {
53
+ "pattern": "(^|/)\\.\\.(/|$)"
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ },
59
+ "debt": {
60
+ "$ref": "https://archctx.repoharness.com/schemas/runtime/architecture-debt.schema.json"
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "additionalProperties": false,
66
+ "type": "object",
67
+ "required": [
68
+ "schemaVersion",
69
+ "mode",
70
+ "status",
71
+ "exitCode",
72
+ "base",
73
+ "baseSha",
74
+ "headSha",
75
+ "blockingChecks",
76
+ "verify"
77
+ ],
78
+ "properties": {
79
+ "schemaVersion": {
80
+ "const": "archcontext.cli-check/v1"
81
+ },
82
+ "mode": {
83
+ "const": "pr"
84
+ },
85
+ "status": {
86
+ "type": "string",
87
+ "enum": [
88
+ "pass",
89
+ "findings"
90
+ ]
91
+ },
92
+ "exitCode": {
93
+ "type": "integer",
94
+ "enum": [
95
+ 0,
96
+ 2
97
+ ]
98
+ },
99
+ "base": {
100
+ "minLength": 1,
101
+ "type": "string"
102
+ },
103
+ "baseSha": {
104
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$",
105
+ "type": "string"
106
+ },
107
+ "headSha": {
108
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$",
109
+ "type": "string"
110
+ },
111
+ "blockingChecks": {
112
+ "type": "array",
113
+ "items": {
114
+ "minLength": 1,
115
+ "type": "string"
116
+ }
117
+ },
118
+ "verify": {
119
+ "$ref": "https://archcontext.dev/schemas/runtime/runtime-verify.schema.json"
120
+ },
121
+ "slice": {
122
+ "oneOf": [
123
+ {
124
+ "additionalProperties": false,
125
+ "type": "object",
126
+ "required": [
127
+ "ok",
128
+ "data"
129
+ ],
130
+ "properties": {
131
+ "ok": {
132
+ "const": true
133
+ },
134
+ "data": {
135
+ "$ref": "https://archcontext.dev/schemas/runtime/projection-slice.schema.json"
136
+ }
137
+ }
138
+ },
139
+ {
140
+ "additionalProperties": false,
141
+ "type": "object",
142
+ "required": [
143
+ "ok",
144
+ "error"
145
+ ],
146
+ "properties": {
147
+ "ok": {
148
+ "const": false
149
+ },
150
+ "error": {
151
+ "additionalProperties": false,
152
+ "type": "object",
153
+ "required": [
154
+ "code",
155
+ "message",
156
+ "severity",
157
+ "retryable",
158
+ "action"
159
+ ],
160
+ "properties": {
161
+ "code": {
162
+ "pattern": "^AC_[A-Z_]+$",
163
+ "type": "string"
164
+ },
165
+ "message": {
166
+ "type": "string"
167
+ },
168
+ "severity": {
169
+ "enum": [
170
+ "notice",
171
+ "warning",
172
+ "error",
173
+ "critical"
174
+ ]
175
+ },
176
+ "retryable": {
177
+ "type": "boolean"
178
+ },
179
+ "action": {
180
+ "type": "string"
181
+ },
182
+ "reasonCode": {
183
+ "type": "string"
184
+ },
185
+ "details": {
186
+ "type": "object"
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ ]
193
+ }
194
+ }
195
+ }
196
+ ]
197
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archcontext.dev/schemas/runtime/cli-help.schema.json",
4
+ "title": "CliHelpOutputV1",
5
+ "description": "Structured `archctx help --json` payload listing supported commands and usage examples.",
6
+ "additionalProperties": false,
7
+ "type": "object",
8
+ "required": [
9
+ "commands"
10
+ ],
11
+ "properties": {
12
+ "commands": {
13
+ "uniqueItems": true,
14
+ "type": "array",
15
+ "items": {
16
+ "minLength": 1,
17
+ "type": "string"
18
+ }
19
+ },
20
+ "examples": {
21
+ "type": "array",
22
+ "items": {
23
+ "minLength": 1,
24
+ "type": "string"
25
+ }
26
+ }
27
+ }
28
+ }