archctx 0.1.2 → 0.1.4-beta.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.
- package/NOTICE.md +23 -0
- package/assets/README.md +15 -0
- package/assets/catalog.yaml +393 -0
- package/assets/practices/api.contract-before-implementation.yaml +70 -0
- package/assets/practices/compatibility.expiry-contract.yaml +71 -0
- package/assets/practices/compatibility.single-owner.yaml +78 -0
- package/assets/practices/data.single-authoritative-model.yaml +67 -0
- package/assets/practices/decision.record-significant-change.yaml +69 -0
- package/assets/practices/migration.target-and-removal-state.yaml +82 -0
- package/assets/practices/modularity.no-new-cycle.yaml +71 -0
- package/assets/practices/modularity.respect-dependency-direction.yaml +74 -0
- package/assets/practices/observability.boundary-telemetry.yaml +65 -0
- package/assets/practices/ownership.explicit-lifecycle-owner.yaml +74 -0
- package/assets/practices/s6-expanded.yaml +1278 -0
- package/assets/practices/security.least-privilege.yaml +70 -0
- package/assets/practices/supply-chain.pinned-dependencies.yaml +65 -0
- package/assets/profiles/s6.yaml +194 -0
- package/assets/sources/core.yaml +211 -0
- package/assets/sources/s6.yaml +122 -0
- package/bin/archctx.mjs +18231 -2410
- package/bin/codegraph.mjs +6 -0
- package/package.json +8 -3
- package/schemas/cloud/attestation-v2.schema.json +85 -0
- package/schemas/cloud/attestation.schema.json +49 -0
- package/schemas/cloud/check-delivery.schema.json +25 -0
- package/schemas/cloud/cloud-egress-envelope.schema.json +19 -0
- package/schemas/cloud/device-identity.schema.json +18 -0
- package/schemas/cloud/entitlement.schema.json +24 -0
- package/schemas/cloud/governance-key-status.schema.json +19 -0
- package/schemas/cloud/org-runner-identity.schema.json +21 -0
- package/schemas/cloud/review-challenge-v2.schema.json +23 -0
- package/schemas/cloud/runner-identity.schema.json +42 -0
- package/schemas/integrations/adapter-fidelity.schema.json +21 -0
- package/schemas/integrations/chatgpt-ga-tool.schema.json +25 -0
- package/schemas/integrations/likec4-mapping.schema.json +32 -0
- package/schemas/integrations/structurizr-mapping.schema.json +33 -0
- package/schemas/repo/architecture-intervention.schema.json +41 -0
- package/schemas/repo/architecture-node.schema.json +50 -0
- package/schemas/repo/architecture-relation.schema.json +26 -0
- package/schemas/repo/compatibility-contract.schema.json +49 -0
- package/schemas/repo/constraint.schema.json +56 -0
- package/schemas/repo/cross-repo-relation.schema.json +47 -0
- package/schemas/repo/landscape.schema.json +50 -0
- package/schemas/repo/practices/practice-policy.schema.json +72 -0
- package/schemas/repo/practices/practice-profile.schema.json +30 -0
- package/schemas/repo/practices/practice-source.schema.json +34 -0
- package/schemas/repo/practices/practice-waiver.schema.json +27 -0
- package/schemas/repo/practices/practice.schema.json +88 -0
- package/schemas/runtime/agent-job.schema.json +63 -0
- package/schemas/runtime/architecture-candidate-delta-policy.schema.json +129 -0
- package/schemas/runtime/architecture-candidate-delta.schema.json +386 -0
- package/schemas/runtime/architecture-event.schema.json +76 -0
- package/schemas/runtime/architecture-snapshot.schema.json +61 -0
- package/schemas/runtime/architecture-subject-selector.schema.json +31 -0
- package/schemas/runtime/changeset.schema.json +65 -0
- package/schemas/runtime/evidence-binding.schema.json +37 -0
- package/schemas/runtime/evidence-item.schema.json +58 -0
- package/schemas/runtime/explorer-projection.schema.json +92 -0
- package/schemas/runtime/explorer-service.schema.json +19 -0
- package/schemas/runtime/external-document-resource.schema.json +55 -0
- package/schemas/runtime/investigation-report.schema.json +119 -0
- package/schemas/runtime/notification-event.schema.json +18 -0
- package/schemas/runtime/notification-provider.schema.json +26 -0
- package/schemas/runtime/practice-catalog-manifest.schema.json +22 -0
- package/schemas/runtime/practice-check-result.schema.json +45 -0
- package/schemas/runtime/practice-checkpoint.schema.json +127 -0
- package/schemas/runtime/practice-guidance.schema.json +44 -0
- package/schemas/runtime/practice-match.schema.json +41 -0
- package/schemas/runtime/product-version-manifest.schema.json +115 -0
- package/schemas/runtime/projection-target.schema.json +52 -0
- package/schemas/runtime/recommendation-feedback.schema.json +53 -0
- package/schemas/runtime/recommendation-run.schema.json +62 -0
- package/schemas/runtime/recommendation.schema.json +26 -0
- package/schemas/runtime/retrieval-config.schema.json +44 -0
- package/schemas/runtime/retrieval-decision.schema.json +49 -0
- package/schemas/runtime/retrieval-eval.schema.json +29 -0
- package/schemas/runtime/review-result.schema.json +48 -0
- package/schemas/runtime/task-context.schema.json +53 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/architecture-candidate-delta.schema.json",
|
|
4
|
+
"title": "ArchitectureCandidateDelta",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"deltaId",
|
|
10
|
+
"repository",
|
|
11
|
+
"worktree",
|
|
12
|
+
"changeCursor",
|
|
13
|
+
"subjectSelectors",
|
|
14
|
+
"changedSubjects",
|
|
15
|
+
"rawFacts",
|
|
16
|
+
"interpretations",
|
|
17
|
+
"declaredSubjectMappings",
|
|
18
|
+
"mappingAmbiguities",
|
|
19
|
+
"candidateChanges",
|
|
20
|
+
"evidenceItems",
|
|
21
|
+
"evidenceBindings",
|
|
22
|
+
"summary",
|
|
23
|
+
"deltaDigest"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schemaVersion": { "const": "archcontext.architecture-candidate-delta/v1" },
|
|
27
|
+
"deltaId": { "type": "string", "pattern": "^delta\\.[a-zA-Z0-9_.-]+$" },
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"repositoryId": { "type": "string" },
|
|
34
|
+
"storageRepositoryId": { "type": "string" }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"worktree": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"workspaceId": { "type": "string" },
|
|
43
|
+
"storageWorkspaceId": { "type": "string" },
|
|
44
|
+
"branch": { "type": "string" },
|
|
45
|
+
"headSha": { "type": "string" },
|
|
46
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"changeCursor": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["source", "changeSource", "headSha", "pathCount", "metadataDigest", "codeFactsDigest"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"source": { "const": "git" },
|
|
55
|
+
"changeSource": { "enum": ["commit", "staged", "worktree"] },
|
|
56
|
+
"baseSha": { "type": "string" },
|
|
57
|
+
"headSha": { "type": "string" },
|
|
58
|
+
"pathCount": { "type": "integer", "minimum": 0 },
|
|
59
|
+
"metadataDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
60
|
+
"codeFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"subjectSelectors": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "$ref": "architecture-subject-selector.schema.json" }
|
|
66
|
+
},
|
|
67
|
+
"changedSubjects": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["subjectSelectorId", "changeKind", "rawFactIds", "evidenceIds", "digest"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"subjectSelectorId": { "type": "string" },
|
|
75
|
+
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
76
|
+
"previousSelectorId": { "type": "string" },
|
|
77
|
+
"rawFactIds": { "type": "array", "items": { "type": "string" } },
|
|
78
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
79
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"rawFacts": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": ["factId", "kind", "subjectSelectorId", "source", "summary", "evidenceIds", "digest"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"factId": { "type": "string", "pattern": "^fact\\.[a-zA-Z0-9_.-]+$" },
|
|
91
|
+
"kind": { "enum": ["git-path-change", "codegraph-symbol", "codegraph-relation"] },
|
|
92
|
+
"subjectSelectorId": { "type": "string" },
|
|
93
|
+
"source": { "enum": ["git", "codegraph"] },
|
|
94
|
+
"summary": { "type": "string" },
|
|
95
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
96
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
97
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"interpretations": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": ["interpretationId", "kind", "subjectSelectorId", "evidenceIds", "confidence", "coverage", "heuristic", "summary", "digest"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"interpretationId": { "type": "string", "pattern": "^interpretation\\.[a-zA-Z0-9_.-]+$" },
|
|
109
|
+
"kind": { "enum": ["code-subject-added", "code-subject-removed", "code-subject-moved", "code-subject-renamed", "code-subject-materially-changed"] },
|
|
110
|
+
"subjectSelectorId": { "type": "string" },
|
|
111
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
112
|
+
"confidence": { "enum": ["low", "medium", "high"] },
|
|
113
|
+
"coverage": { "enum": ["complete", "partial", "unknown"] },
|
|
114
|
+
"heuristic": { "const": true },
|
|
115
|
+
"summary": { "type": "string" },
|
|
116
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
117
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"declaredSubjectMappings": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["mappingId", "subjectSelectorId", "target", "matchReason", "confidence", "evidenceIds", "digest"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"mappingId": { "type": "string", "pattern": "^mapping\\.[a-zA-Z0-9_.-]+$" },
|
|
129
|
+
"subjectSelectorId": { "type": "string" },
|
|
130
|
+
"target": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": ["kind", "id"],
|
|
134
|
+
"properties": {
|
|
135
|
+
"kind": { "enum": ["entity", "relation", "constraint"] },
|
|
136
|
+
"id": { "type": "string" }
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"matchReason": {
|
|
140
|
+
"enum": [
|
|
141
|
+
"declared-path-exact",
|
|
142
|
+
"declared-path-prefix",
|
|
143
|
+
"declared-name-match",
|
|
144
|
+
"declared-relation-endpoints",
|
|
145
|
+
"declared-constraint-subject"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"confidence": { "enum": ["low", "medium", "high"] },
|
|
149
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
150
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
151
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"mappingAmbiguities": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["ambiguityId", "subjectSelectorId", "reasonCode", "candidateTargets", "evidenceIds", "summary", "digest"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"ambiguityId": { "type": "string", "pattern": "^ambiguity\\.[a-zA-Z0-9_.-]+$" },
|
|
163
|
+
"subjectSelectorId": { "type": "string" },
|
|
164
|
+
"reasonCode": {
|
|
165
|
+
"enum": [
|
|
166
|
+
"declared-graph-unavailable",
|
|
167
|
+
"no-declared-target",
|
|
168
|
+
"multiple-declared-targets",
|
|
169
|
+
"relation-endpoint-unmapped"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"candidateTargets": {
|
|
173
|
+
"type": "array",
|
|
174
|
+
"items": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": ["target", "matchReason", "confidence"],
|
|
178
|
+
"properties": {
|
|
179
|
+
"target": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"required": ["kind", "id"],
|
|
183
|
+
"properties": {
|
|
184
|
+
"kind": { "enum": ["entity", "relation", "constraint"] },
|
|
185
|
+
"id": { "type": "string" }
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"matchReason": {
|
|
189
|
+
"enum": [
|
|
190
|
+
"declared-path-exact",
|
|
191
|
+
"declared-path-prefix",
|
|
192
|
+
"declared-name-match",
|
|
193
|
+
"declared-relation-endpoints",
|
|
194
|
+
"declared-constraint-subject"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"confidence": { "enum": ["low", "medium", "high"] }
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
202
|
+
"summary": { "type": "string" },
|
|
203
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
204
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"candidateChanges": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": [
|
|
214
|
+
"candidateChangeId",
|
|
215
|
+
"kind",
|
|
216
|
+
"target",
|
|
217
|
+
"stateDimension",
|
|
218
|
+
"changeKind",
|
|
219
|
+
"subjectSelectorIds",
|
|
220
|
+
"mappingIds",
|
|
221
|
+
"ambiguityIds",
|
|
222
|
+
"evidenceIds",
|
|
223
|
+
"confidence",
|
|
224
|
+
"heuristic",
|
|
225
|
+
"summary",
|
|
226
|
+
"digest"
|
|
227
|
+
],
|
|
228
|
+
"properties": {
|
|
229
|
+
"candidateChangeId": { "type": "string", "pattern": "^candidate_change\\.[a-zA-Z0-9_.-]+$" },
|
|
230
|
+
"kind": {
|
|
231
|
+
"enum": [
|
|
232
|
+
"node-added",
|
|
233
|
+
"node-removed",
|
|
234
|
+
"node-moved",
|
|
235
|
+
"node-renamed",
|
|
236
|
+
"node-materially-changed",
|
|
237
|
+
"relation-added",
|
|
238
|
+
"relation-removed",
|
|
239
|
+
"relation-moved",
|
|
240
|
+
"relation-renamed",
|
|
241
|
+
"relation-materially-changed",
|
|
242
|
+
"constraint-added",
|
|
243
|
+
"constraint-removed",
|
|
244
|
+
"constraint-moved",
|
|
245
|
+
"constraint-renamed",
|
|
246
|
+
"constraint-materially-changed",
|
|
247
|
+
"owner-added",
|
|
248
|
+
"owner-removed",
|
|
249
|
+
"owner-moved",
|
|
250
|
+
"owner-renamed",
|
|
251
|
+
"owner-materially-changed",
|
|
252
|
+
"lifecycle-added",
|
|
253
|
+
"lifecycle-removed",
|
|
254
|
+
"lifecycle-moved",
|
|
255
|
+
"lifecycle-renamed",
|
|
256
|
+
"lifecycle-materially-changed",
|
|
257
|
+
"migration-state-added",
|
|
258
|
+
"migration-state-removed",
|
|
259
|
+
"migration-state-moved",
|
|
260
|
+
"migration-state-renamed",
|
|
261
|
+
"migration-state-materially-changed"
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
"target": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"additionalProperties": false,
|
|
267
|
+
"required": ["kind", "id"],
|
|
268
|
+
"properties": {
|
|
269
|
+
"kind": { "enum": ["node", "relation", "constraint", "owner", "lifecycle", "migration-state"] },
|
|
270
|
+
"id": { "type": "string" },
|
|
271
|
+
"parentId": { "type": "string" }
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"stateDimension": { "enum": ["target-state", "migration-state"] },
|
|
275
|
+
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
276
|
+
"subjectSelectorIds": { "type": "array", "items": { "type": "string" } },
|
|
277
|
+
"mappingIds": { "type": "array", "items": { "type": "string" } },
|
|
278
|
+
"ambiguityIds": { "type": "array", "items": { "type": "string" } },
|
|
279
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
280
|
+
"confidence": { "enum": ["low", "medium", "high"] },
|
|
281
|
+
"heuristic": { "const": true },
|
|
282
|
+
"summary": { "type": "string" },
|
|
283
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
284
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"evidenceItems": {
|
|
289
|
+
"type": "array",
|
|
290
|
+
"items": { "$ref": "evidence-item.schema.json" }
|
|
291
|
+
},
|
|
292
|
+
"evidenceBindings": {
|
|
293
|
+
"type": "array",
|
|
294
|
+
"items": { "$ref": "evidence-binding.schema.json" }
|
|
295
|
+
},
|
|
296
|
+
"summary": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"additionalProperties": false,
|
|
299
|
+
"required": [
|
|
300
|
+
"added",
|
|
301
|
+
"removed",
|
|
302
|
+
"moved",
|
|
303
|
+
"renamed",
|
|
304
|
+
"materiallyChanged",
|
|
305
|
+
"unresolved",
|
|
306
|
+
"mapped",
|
|
307
|
+
"ambiguous",
|
|
308
|
+
"candidateChanges",
|
|
309
|
+
"targetStateChanges",
|
|
310
|
+
"migrationStateProgress",
|
|
311
|
+
"mappingCoverage",
|
|
312
|
+
"unresolvedSubjects",
|
|
313
|
+
"evidenceStrengthDistribution"
|
|
314
|
+
],
|
|
315
|
+
"properties": {
|
|
316
|
+
"added": { "type": "integer", "minimum": 0 },
|
|
317
|
+
"removed": { "type": "integer", "minimum": 0 },
|
|
318
|
+
"moved": { "type": "integer", "minimum": 0 },
|
|
319
|
+
"renamed": { "type": "integer", "minimum": 0 },
|
|
320
|
+
"materiallyChanged": { "type": "integer", "minimum": 0 },
|
|
321
|
+
"unresolved": { "type": "integer", "minimum": 0 },
|
|
322
|
+
"mapped": { "type": "integer", "minimum": 0 },
|
|
323
|
+
"ambiguous": { "type": "integer", "minimum": 0 },
|
|
324
|
+
"candidateChanges": { "type": "integer", "minimum": 0 },
|
|
325
|
+
"targetStateChanges": { "type": "integer", "minimum": 0 },
|
|
326
|
+
"migrationStateProgress": { "type": "integer", "minimum": 0 },
|
|
327
|
+
"mappingCoverage": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"additionalProperties": false,
|
|
330
|
+
"required": [
|
|
331
|
+
"totalChangedSubjects",
|
|
332
|
+
"mappedSubjects",
|
|
333
|
+
"unresolvedSubjects",
|
|
334
|
+
"ambiguousSubjects",
|
|
335
|
+
"coveragePercent"
|
|
336
|
+
],
|
|
337
|
+
"properties": {
|
|
338
|
+
"totalChangedSubjects": { "type": "integer", "minimum": 0 },
|
|
339
|
+
"mappedSubjects": { "type": "integer", "minimum": 0 },
|
|
340
|
+
"unresolvedSubjects": { "type": "integer", "minimum": 0 },
|
|
341
|
+
"ambiguousSubjects": { "type": "integer", "minimum": 0 },
|
|
342
|
+
"coveragePercent": { "type": "number", "minimum": 0, "maximum": 100 }
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"unresolvedSubjects": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"additionalProperties": false,
|
|
348
|
+
"required": ["total", "byReason", "subjectSelectorIds"],
|
|
349
|
+
"properties": {
|
|
350
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
351
|
+
"byReason": {
|
|
352
|
+
"type": "object",
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"required": [
|
|
355
|
+
"declared-graph-unavailable",
|
|
356
|
+
"no-declared-target",
|
|
357
|
+
"multiple-declared-targets",
|
|
358
|
+
"relation-endpoint-unmapped"
|
|
359
|
+
],
|
|
360
|
+
"properties": {
|
|
361
|
+
"declared-graph-unavailable": { "type": "integer", "minimum": 0 },
|
|
362
|
+
"no-declared-target": { "type": "integer", "minimum": 0 },
|
|
363
|
+
"multiple-declared-targets": { "type": "integer", "minimum": 0 },
|
|
364
|
+
"relation-endpoint-unmapped": { "type": "integer", "minimum": 0 }
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"subjectSelectorIds": { "type": "array", "items": { "type": "string" } }
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"evidenceStrengthDistribution": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"additionalProperties": false,
|
|
373
|
+
"required": ["heuristic", "declared", "observed", "verified"],
|
|
374
|
+
"properties": {
|
|
375
|
+
"heuristic": { "type": "integer", "minimum": 0 },
|
|
376
|
+
"declared": { "type": "integer", "minimum": 0 },
|
|
377
|
+
"observed": { "type": "integer", "minimum": 0 },
|
|
378
|
+
"verified": { "type": "integer", "minimum": 0 }
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"deltaDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
384
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
385
|
+
}
|
|
386
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/architecture-event.schema.json",
|
|
4
|
+
"title": "ArchitectureEvent",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "eventId", "eventType", "payloadVersion", "repository", "worktree", "baseDigest", "resultingDigest", "headSha", "actor", "source", "timestamp", "idempotencyKey", "provenance", "payload"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.architecture-event/v1" },
|
|
10
|
+
"eventId": { "type": "string", "pattern": "^arch_event\\.[a-zA-Z0-9_-]+$" },
|
|
11
|
+
"eventType": { "type": "string" },
|
|
12
|
+
"payloadVersion": { "type": "string", "pattern": "^v[0-9]+$" },
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"repositoryId": { "type": "string" },
|
|
19
|
+
"storageRepositoryId": { "type": "string" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"worktree": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"workspaceId": { "type": "string" },
|
|
28
|
+
"storageWorkspaceId": { "type": "string" },
|
|
29
|
+
"branch": { "type": "string" },
|
|
30
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
31
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"baseDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
35
|
+
"resultingDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
36
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
37
|
+
"actor": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["kind", "id"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"kind": { "enum": ["developer", "daemon", "hook", "cli", "mcp", "subagent", "migration", "system"] },
|
|
43
|
+
"id": { "type": "string" }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"source": { "enum": ["prepare_task", "checkpoint", "plan_update", "apply_update", "complete_task", "git_hook", "yaml_import", "projection_reconcile", "migration", "manual"] },
|
|
47
|
+
"timestamp": { "type": "string" },
|
|
48
|
+
"idempotencyKey": { "type": "string" },
|
|
49
|
+
"provenance": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["producer", "command", "inputDigest"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"producer": { "type": "string" },
|
|
55
|
+
"command": { "type": "string" },
|
|
56
|
+
"inputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
57
|
+
"traceDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"payload": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["kind", "subjectIds", "summary", "changesDigest"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"kind": { "type": "string" },
|
|
66
|
+
"subjectIds": { "type": "array", "items": { "type": "string" } },
|
|
67
|
+
"summary": { "type": "string" },
|
|
68
|
+
"changesDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
69
|
+
"metadata": { "type": "object", "additionalProperties": true }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"previousEventHash": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
73
|
+
"eventHash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
74
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/architecture-snapshot.schema.json",
|
|
4
|
+
"title": "ArchitectureSnapshot",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "snapshotId", "repository", "worktree", "sourceMode", "eventCursor", "graphDigest", "projectionDigest", "entityCount", "relationCount", "constraintCount", "inputDigests", "createdAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.architecture-snapshot/v1" },
|
|
10
|
+
"snapshotId": { "type": "string", "pattern": "^arch_snapshot\\.[a-zA-Z0-9_-]+$" },
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"repositoryId": { "type": "string" },
|
|
17
|
+
"storageRepositoryId": { "type": "string" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"worktree": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"workspaceId": { "type": "string" },
|
|
26
|
+
"storageWorkspaceId": { "type": "string" },
|
|
27
|
+
"branch": { "type": "string" },
|
|
28
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
29
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"sourceMode": { "enum": ["yaml", "dual", "ledger-shadow", "ledger-authoritative"] },
|
|
33
|
+
"eventCursor": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["lastEventId", "lastEventHash"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"lastEventId": { "type": "string", "pattern": "^arch_event\\.[a-zA-Z0-9_-]+$" },
|
|
39
|
+
"lastEventHash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"graphDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
43
|
+
"projectionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
44
|
+
"entityCount": { "type": "integer", "minimum": 0 },
|
|
45
|
+
"relationCount": { "type": "integer", "minimum": 0 },
|
|
46
|
+
"constraintCount": { "type": "integer", "minimum": 0 },
|
|
47
|
+
"inputDigests": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["modelDigest"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"modelDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
53
|
+
"codeFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
54
|
+
"policyDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
55
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"createdAt": { "type": "string" },
|
|
59
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/architecture-subject-selector.schema.json",
|
|
4
|
+
"title": "ArchitectureSubjectSelector",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "selectorId", "kind", "repositoryId", "stableKey", "digest"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.architecture-subject-selector/v1" },
|
|
10
|
+
"selectorId": { "type": "string", "pattern": "^subject\\.[a-zA-Z0-9_.-]+$" },
|
|
11
|
+
"kind": { "enum": ["repository", "path", "symbol", "node", "relation", "api", "datastore", "external-contract"] },
|
|
12
|
+
"repositoryId": { "type": "string" },
|
|
13
|
+
"stableKey": { "type": "string" },
|
|
14
|
+
"path": { "type": "string" },
|
|
15
|
+
"symbolId": { "type": "string" },
|
|
16
|
+
"name": { "type": "string" },
|
|
17
|
+
"relation": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["source", "target", "kind"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"source": { "type": "string" },
|
|
23
|
+
"target": { "type": "string" },
|
|
24
|
+
"kind": { "type": "string" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"externalId": { "type": "string" },
|
|
28
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
29
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/changeset.schema.json",
|
|
4
|
+
"title": "ChangeSet",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "id", "status", "base", "reason", "operations", "preconditions", "postconditions", "requiresConfirmation", "idempotencyKey"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.changeset/v1" },
|
|
10
|
+
"id": { "type": "string", "pattern": "^changeset\\.[a-zA-Z0-9_-]+$" },
|
|
11
|
+
"status": { "type": "string", "enum": ["proposed", "approved", "applied", "rolled-back", "rejected"] },
|
|
12
|
+
"base": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["headSha", "worktreeDigest", "modelDigest"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"headSha": { "type": "string" },
|
|
18
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
19
|
+
"modelDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"reason": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["taskSessionId"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"taskSessionId": { "type": "string" },
|
|
28
|
+
"interventionId": { "type": "string" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"operations": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"minItems": 1,
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": true,
|
|
37
|
+
"required": ["op", "expectedHash"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"op": { "type": "string", "enum": ["create_entity", "update_entity_fields", "delete_entity", "write_policy", "write_waiver", "render_projection"] },
|
|
40
|
+
"entityId": { "type": "string" },
|
|
41
|
+
"path": { "type": "string" },
|
|
42
|
+
"expectedHash": { "type": "string" },
|
|
43
|
+
"projectionFiles": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["path", "expectedHash", "body"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"path": { "type": "string" },
|
|
51
|
+
"expectedHash": { "type": "string" },
|
|
52
|
+
"body": { "type": "string" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"preconditions": { "type": "array", "items": { "type": "string" } },
|
|
60
|
+
"postconditions": { "type": "array", "items": { "type": "string" } },
|
|
61
|
+
"requiresConfirmation": { "type": "boolean" },
|
|
62
|
+
"idempotencyKey": { "type": "string" },
|
|
63
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
64
|
+
}
|
|
65
|
+
}
|