archctx 0.6.1 → 0.7.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.
@@ -38,11 +38,10 @@
38
38
  "generatedFrom": {
39
39
  "type": "object",
40
40
  "additionalProperties": false,
41
- "required": ["codeGraphPackage", "codeGraphVersion", "codeGraphBinaryDigest", "codeGraphStatus"],
41
+ "required": ["codeGraphPackage", "codeGraphVersion", "codeGraphStatus"],
42
42
  "properties": {
43
43
  "codeGraphPackage": { "const": "@colbymchenry/codegraph" },
44
44
  "codeGraphVersion": { "const": "1.6.1" },
45
- "codeGraphBinaryDigest": { "$ref": "#/$defs/digest" },
46
45
  "codeGraphStatus": { "enum": ["ready", "unavailable"] }
47
46
  }
48
47
  },
@@ -63,6 +62,27 @@
63
62
  "projectionDigest": { "$ref": "#/$defs/digest" }
64
63
  }
65
64
  },
65
+ "capabilityChange": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": ["capabilityId", "reasonCodes", "changedFacets", "proofStatusBefore", "proofStatusAfter"],
69
+ "properties": {
70
+ "capabilityId": { "type": "string", "minLength": 1 },
71
+ "reasonCodes": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
72
+ "changedFacets": { "type": "array", "uniqueItems": true, "items": { "enum": ["constraints", "entrypoints", "interfaces", "lifecycle", "names", "ownership", "placement", "relations", "responsibilities", "riskBoundaries"] } },
73
+ "proofStatusBefore": { "anyOf": [{ "type": "null" }, { "$ref": "#/$defs/proofStatus" }] },
74
+ "proofStatusAfter": { "anyOf": [{ "type": "null" }, { "$ref": "#/$defs/proofStatus" }] }
75
+ }
76
+ },
77
+ "proofStatus": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["p1", "p2"],
81
+ "properties": {
82
+ "p1": { "enum": ["proven", "unprovable"] },
83
+ "p2": { "enum": ["not-applicable", "proven", "unprovable"] }
84
+ }
85
+ },
66
86
  "reasonCode": {
67
87
  "enum": ["constraint-changed", "entrypoint-changed", "interface-changed", "lifecycle-changed", "node-added", "node-moved", "node-removed", "node-renamed", "ownership-changed", "relation-changed", "responsibility-changed", "risk-boundary-changed", "verified-flow-proof-changed"]
68
88
  },
@@ -112,7 +132,7 @@
112
132
  "codeGraphDigest": { "$ref": "#/$defs/digest" },
113
133
  "indexedWorktreeDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
114
134
  "projectionInputDigest": { "$ref": "#/$defs/digest" },
115
- "rendererVersion": { "const": "archcontext.docs-renderer/v4" },
135
+ "rendererVersion": { "const": "archcontext.docs-renderer/v5" },
116
136
  "layoutVersion": { "const": "archcontext.docs-layout/v1" },
117
137
  "generatedFrom": { "$ref": "#/$defs/readyGeneratedFrom" }
118
138
  }
@@ -168,6 +188,7 @@
168
188
  "acceptedChange": { "$ref": "#/$defs/acceptedChange" },
169
189
  "reasonCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
170
190
  "affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
191
+ "capabilities": { "type": "array", "minItems": 1, "description": "The observed per-capability breakdown of this signal, sorted by capabilityId (enforced by architectureRefreshSignalInvariantIssues). Part of the signal identity; signals committed before it existed lack it.", "items": { "$ref": "#/$defs/capabilityChange" } },
171
192
  "refreshTargets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["architecture-contract-context", "architecture-readiness", "architecture-request-index", "capability-context", "capability-index"] } },
172
193
  "baseDigests": { "$ref": "#/$defs/digestSet" },
173
194
  "resultingDigests": { "$ref": "#/$defs/digestSet" },
@@ -0,0 +1,491 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archcontext.dev/schemas/runtime/projection-manifest.schema.json",
4
+ "title": "ArchitectureDocsProjectionManifestV2",
5
+ "description": "The committed docs/architecture/.projection-manifest.json the architecture documentation projection writes (#264). Version v2 (archctx 0.7.0) has content-stamp targets and provenance v3; a v1 manifest is not valid against this schema. Sorted/unique orders, targetCount/fileCount and the 1-2-5 bucket ladder are enforced by architectureDocsProjectionManifestIssues.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "rendererVersion",
11
+ "profile",
12
+ "sourceDigest",
13
+ "provenance",
14
+ "projectionDigest",
15
+ "semanticBaseline",
16
+ "receiptDigest",
17
+ "targetCount",
18
+ "fileCount",
19
+ "targets"
20
+ ],
21
+ "properties": {
22
+ "schemaVersion": {
23
+ "const": "archcontext.architecture-docs-projection-manifest/v2"
24
+ },
25
+ "rendererVersion": {
26
+ "const": "archcontext.docs-renderer/v5"
27
+ },
28
+ "profile": {
29
+ "enum": [
30
+ "default",
31
+ "repo-harness/v1"
32
+ ]
33
+ },
34
+ "sourceDigest": {
35
+ "$ref": "#/$defs/digest"
36
+ },
37
+ "provenance": {
38
+ "$ref": "#/$defs/provenance"
39
+ },
40
+ "projectionDigest": {
41
+ "$ref": "#/$defs/digest"
42
+ },
43
+ "semanticBaseline": {
44
+ "$ref": "#/$defs/semanticBaseline"
45
+ },
46
+ "receiptDigest": {
47
+ "$ref": "#/$defs/digest"
48
+ },
49
+ "targetCount": {
50
+ "type": "integer",
51
+ "minimum": 0
52
+ },
53
+ "fileCount": {
54
+ "type": "integer",
55
+ "minimum": 0
56
+ },
57
+ "targets": {
58
+ "type": "array",
59
+ "items": {
60
+ "$ref": "#/$defs/target"
61
+ }
62
+ }
63
+ },
64
+ "$defs": {
65
+ "digest": {
66
+ "type": "string",
67
+ "pattern": "^sha256:[a-f0-9]{64}$"
68
+ },
69
+ "provenance": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "schemaVersion",
74
+ "sourceTreeDigest",
75
+ "modelDigest",
76
+ "projectionInputDigest",
77
+ "rendererVersion",
78
+ "layoutVersion",
79
+ "generatedFrom"
80
+ ],
81
+ "properties": {
82
+ "schemaVersion": {
83
+ "const": "archcontext.architecture-docs-projection-provenance/v3"
84
+ },
85
+ "sourceTreeDigest": {
86
+ "$ref": "#/$defs/digest"
87
+ },
88
+ "modelDigest": {
89
+ "$ref": "#/$defs/digest"
90
+ },
91
+ "projectionInputDigest": {
92
+ "$ref": "#/$defs/digest"
93
+ },
94
+ "rendererVersion": {
95
+ "const": "archcontext.docs-renderer/v5"
96
+ },
97
+ "layoutVersion": {
98
+ "const": "archcontext.docs-layout/v1"
99
+ },
100
+ "generatedFrom": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "codeGraphPackage",
105
+ "codeGraphVersion"
106
+ ],
107
+ "description": "Reproducible CodeGraph identity only: package name and version. The binary digest, index status and evidence digests are machine-specific runtime facts and never enter the committed manifest (#266, #277).",
108
+ "properties": {
109
+ "codeGraphPackage": {
110
+ "type": "string",
111
+ "minLength": 1
112
+ },
113
+ "codeGraphVersion": {
114
+ "type": "string",
115
+ "minLength": 1
116
+ }
117
+ }
118
+ }
119
+ }
120
+ },
121
+ "semanticBaseline": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": [
125
+ "semanticState",
126
+ "digests"
127
+ ],
128
+ "properties": {
129
+ "semanticState": {
130
+ "$ref": "#/$defs/semanticState"
131
+ },
132
+ "digests": {
133
+ "$ref": "#/$defs/digestSet"
134
+ },
135
+ "evidence": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "sourceTreeDigest",
140
+ "selectorEvidenceDigest",
141
+ "rendererVersion"
142
+ ],
143
+ "description": "The non-model proof inputs this baseline was rendered from. Absent in manifests written before it existed.",
144
+ "properties": {
145
+ "sourceTreeDigest": {
146
+ "$ref": "#/$defs/digest"
147
+ },
148
+ "selectorEvidenceDigest": {
149
+ "$ref": "#/$defs/digest"
150
+ },
151
+ "rendererVersion": {
152
+ "type": "string",
153
+ "minLength": 1
154
+ }
155
+ }
156
+ }
157
+ }
158
+ },
159
+ "digestSet": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": [
163
+ "modelDigest",
164
+ "sourceTreeDigest",
165
+ "flowProofDigest",
166
+ "projectionDigest"
167
+ ],
168
+ "properties": {
169
+ "modelDigest": {
170
+ "$ref": "#/$defs/digest"
171
+ },
172
+ "sourceTreeDigest": {
173
+ "$ref": "#/$defs/digest"
174
+ },
175
+ "flowProofDigest": {
176
+ "$ref": "#/$defs/digest"
177
+ },
178
+ "projectionDigest": {
179
+ "$ref": "#/$defs/digest"
180
+ }
181
+ }
182
+ },
183
+ "semanticState": {
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "required": [
187
+ "schemaVersion",
188
+ "capabilities",
189
+ "semanticFingerprint",
190
+ "flowProofFingerprint"
191
+ ],
192
+ "properties": {
193
+ "schemaVersion": {
194
+ "const": "archcontext.architecture-semantic-state/v1"
195
+ },
196
+ "capabilities": {
197
+ "type": "array",
198
+ "description": "Sorted and unique by capabilityId.",
199
+ "items": {
200
+ "$ref": "#/$defs/capabilityState"
201
+ }
202
+ },
203
+ "semanticFingerprint": {
204
+ "$ref": "#/$defs/digest"
205
+ },
206
+ "flowProofFingerprint": {
207
+ "$ref": "#/$defs/digest"
208
+ }
209
+ }
210
+ },
211
+ "capabilityState": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": [
215
+ "capabilityId",
216
+ "memberNodeIds",
217
+ "semanticFingerprint",
218
+ "flowProofFingerprint",
219
+ "proofStatus",
220
+ "facets"
221
+ ],
222
+ "properties": {
223
+ "capabilityId": {
224
+ "type": "string",
225
+ "minLength": 1
226
+ },
227
+ "memberNodeIds": {
228
+ "type": "array",
229
+ "uniqueItems": true,
230
+ "items": {
231
+ "type": "string",
232
+ "minLength": 1
233
+ }
234
+ },
235
+ "semanticFingerprint": {
236
+ "$ref": "#/$defs/digest"
237
+ },
238
+ "flowProofFingerprint": {
239
+ "$ref": "#/$defs/digest"
240
+ },
241
+ "proofStatus": {
242
+ "$ref": "#/$defs/proofStatus"
243
+ },
244
+ "facets": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "required": [
248
+ "constraints",
249
+ "entrypoints",
250
+ "interfaces",
251
+ "lifecycle",
252
+ "names",
253
+ "ownership",
254
+ "placement",
255
+ "relations",
256
+ "responsibilities",
257
+ "riskBoundaries"
258
+ ],
259
+ "properties": {
260
+ "constraints": {
261
+ "$ref": "#/$defs/digest"
262
+ },
263
+ "entrypoints": {
264
+ "$ref": "#/$defs/digest"
265
+ },
266
+ "interfaces": {
267
+ "$ref": "#/$defs/digest"
268
+ },
269
+ "lifecycle": {
270
+ "$ref": "#/$defs/digest"
271
+ },
272
+ "names": {
273
+ "$ref": "#/$defs/digest"
274
+ },
275
+ "ownership": {
276
+ "$ref": "#/$defs/digest"
277
+ },
278
+ "placement": {
279
+ "$ref": "#/$defs/digest"
280
+ },
281
+ "relations": {
282
+ "$ref": "#/$defs/digest"
283
+ },
284
+ "responsibilities": {
285
+ "$ref": "#/$defs/digest"
286
+ },
287
+ "riskBoundaries": {
288
+ "$ref": "#/$defs/digest"
289
+ }
290
+ }
291
+ }
292
+ }
293
+ },
294
+ "proofStatus": {
295
+ "type": "object",
296
+ "additionalProperties": false,
297
+ "required": [
298
+ "p1",
299
+ "p2"
300
+ ],
301
+ "properties": {
302
+ "p1": {
303
+ "enum": [
304
+ "proven",
305
+ "unprovable"
306
+ ]
307
+ },
308
+ "p2": {
309
+ "enum": [
310
+ "not-applicable",
311
+ "proven",
312
+ "unprovable"
313
+ ]
314
+ }
315
+ }
316
+ },
317
+ "scaleBucket": {
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "required": [
321
+ "lower",
322
+ "upper"
323
+ ],
324
+ "description": "The half-open 1-2-5 magnitude range [lower, upper) that contains a measured count; {lower: 0, upper: 1} holds only zero.",
325
+ "properties": {
326
+ "lower": {
327
+ "type": "integer",
328
+ "minimum": 0
329
+ },
330
+ "upper": {
331
+ "type": "integer",
332
+ "minimum": 1
333
+ }
334
+ }
335
+ },
336
+ "scale": {
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "required": [
340
+ "fileCountBucket",
341
+ "lineCountBucket"
342
+ ],
343
+ "properties": {
344
+ "fileCountBucket": {
345
+ "$ref": "#/$defs/scaleBucket"
346
+ },
347
+ "lineCountBucket": {
348
+ "$ref": "#/$defs/scaleBucket"
349
+ }
350
+ }
351
+ },
352
+ "target": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "required": [
356
+ "targetId",
357
+ "type",
358
+ "scope",
359
+ "path",
360
+ "ownership",
361
+ "rendererVersion",
362
+ "format",
363
+ "sourceDigest",
364
+ "outputDigest"
365
+ ],
366
+ "properties": {
367
+ "targetId": {
368
+ "type": "string",
369
+ "minLength": 1
370
+ },
371
+ "type": {
372
+ "enum": [
373
+ "architecture-index",
374
+ "entity-summary",
375
+ "relation-summary",
376
+ "decision-index",
377
+ "architecture-changelog",
378
+ "diagram-mermaid",
379
+ "diagram-structurizr",
380
+ "diagram-likec4",
381
+ "agent-context"
382
+ ]
383
+ },
384
+ "scope": {
385
+ "type": "object",
386
+ "additionalProperties": false,
387
+ "required": [
388
+ "kind"
389
+ ],
390
+ "properties": {
391
+ "kind": {
392
+ "enum": [
393
+ "repository",
394
+ "entity",
395
+ "relation",
396
+ "decision",
397
+ "diagram",
398
+ "changelog"
399
+ ]
400
+ },
401
+ "id": {
402
+ "type": "string"
403
+ },
404
+ "entityKind": {
405
+ "type": "string"
406
+ }
407
+ }
408
+ },
409
+ "path": {
410
+ "type": "string",
411
+ "minLength": 1,
412
+ "not": {
413
+ "anyOf": [
414
+ {
415
+ "pattern": "^/"
416
+ },
417
+ {
418
+ "pattern": "\\\\"
419
+ },
420
+ {
421
+ "pattern": "(^|/)\\.\\.(/|$)"
422
+ }
423
+ ]
424
+ }
425
+ },
426
+ "ownership": {
427
+ "enum": [
428
+ "generated",
429
+ "mixed"
430
+ ]
431
+ },
432
+ "rendererVersion": {
433
+ "const": "archcontext.docs-renderer/v5"
434
+ },
435
+ "format": {
436
+ "enum": [
437
+ "markdown",
438
+ "mermaid",
439
+ "structurizr-json",
440
+ "likec4"
441
+ ]
442
+ },
443
+ "sourceDigest": {
444
+ "$ref": "#/$defs/digest"
445
+ },
446
+ "outputDigest": {
447
+ "$ref": "#/$defs/digest"
448
+ },
449
+ "sourceFootprintDigest": {
450
+ "$ref": "#/$defs/digest",
451
+ "description": "Content digest of the node's declared source footprint the document was verified against. entity-summary targets of nodes that declare source.include only; present exactly when scale is."
452
+ },
453
+ "scale": {
454
+ "$ref": "#/$defs/scale",
455
+ "description": "The scale buckets the module document prints. Present exactly when sourceFootprintDigest is."
456
+ }
457
+ },
458
+ "allOf": [
459
+ {
460
+ "if": {
461
+ "required": [
462
+ "sourceFootprintDigest"
463
+ ]
464
+ },
465
+ "then": {
466
+ "required": [
467
+ "scale"
468
+ ],
469
+ "properties": {
470
+ "type": {
471
+ "const": "entity-summary"
472
+ }
473
+ }
474
+ }
475
+ },
476
+ {
477
+ "if": {
478
+ "required": [
479
+ "scale"
480
+ ]
481
+ },
482
+ "then": {
483
+ "required": [
484
+ "sourceFootprintDigest"
485
+ ]
486
+ }
487
+ }
488
+ ]
489
+ }
490
+ }
491
+ }
@@ -25,14 +25,23 @@
25
25
  },
26
26
  "expected": { "$ref": "#/$defs/expectedSnapshot" },
27
27
  "adoptionPlanId": { "type": "string", "pattern": "^adoption_plan\\.[a-zA-Z0-9_.-]+$" },
28
- "acceptedChange": { "$ref": "#/$defs/acceptedChange" }
28
+ "acceptedChange": { "$ref": "#/$defs/acceptedChange" },
29
+ "acceptObservedMajorChange": {
30
+ "const": true,
31
+ "description": "apply and adopt only, never with acceptedChange: accept the major change observed at expected in the same run."
32
+ }
29
33
  },
30
34
  "allOf": [
31
35
  {
32
36
  "if": { "properties": { "mode": { "const": "adopt" } }, "required": ["mode"] },
33
37
  "then": { "required": ["adoptionPlanId"] },
34
38
  "else": { "not": { "required": ["adoptionPlanId"] } }
35
- }
39
+ },
40
+ {
41
+ "if": { "properties": { "mode": { "enum": ["apply", "adopt"] } }, "required": ["mode"] },
42
+ "else": { "not": { "required": ["acceptObservedMajorChange"] } }
43
+ },
44
+ { "not": { "required": ["acceptedChange", "acceptObservedMajorChange"] } }
36
45
  ],
37
46
  "$defs": {
38
47
  "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },