archctx 0.7.2 → 0.8.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.
@@ -0,0 +1,823 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/runtime/native-context-export.schema.json",
4
+ "title": "NativeContextExportV1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "profile",
10
+ "snapshot",
11
+ "inputDigest",
12
+ "inputs",
13
+ "allowedNodeKinds",
14
+ "contextBudgetBytes",
15
+ "model",
16
+ "capabilityProfiles",
17
+ "contracts",
18
+ "documents"
19
+ ],
20
+ "properties": {
21
+ "schemaVersion": {
22
+ "const": "archcontext.native-context-export/v1"
23
+ },
24
+ "profile": {
25
+ "const": "repo-harness/v1"
26
+ },
27
+ "snapshot": {
28
+ "oneOf": [
29
+ {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": [
33
+ "source",
34
+ "commitSha",
35
+ "treeOid",
36
+ "validation"
37
+ ],
38
+ "properties": {
39
+ "source": {
40
+ "const": "ref"
41
+ },
42
+ "commitSha": {
43
+ "type": "string",
44
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
45
+ },
46
+ "treeOid": {
47
+ "type": "string",
48
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
49
+ },
50
+ "validation": {
51
+ "const": "immutable-tree"
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": [
59
+ "source",
60
+ "headSha",
61
+ "headTreeOid",
62
+ "validation"
63
+ ],
64
+ "properties": {
65
+ "source": {
66
+ "const": "worktree"
67
+ },
68
+ "headSha": {
69
+ "type": "string",
70
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
71
+ },
72
+ "headTreeOid": {
73
+ "type": "string",
74
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
75
+ },
76
+ "validation": {
77
+ "const": "stable-read"
78
+ }
79
+ }
80
+ }
81
+ ]
82
+ },
83
+ "inputDigest": {
84
+ "type": "string",
85
+ "pattern": "^sha256:[a-f0-9]{64}$"
86
+ },
87
+ "inputs": {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "#/$defs/input"
91
+ },
92
+ "minItems": 2,
93
+ "maxItems": 10000
94
+ },
95
+ "allowedNodeKinds": {
96
+ "type": "array",
97
+ "items": {
98
+ "$ref": "../repo/architecture-node.schema.json#/properties/kind"
99
+ },
100
+ "minItems": 1,
101
+ "uniqueItems": true
102
+ },
103
+ "contextBudgetBytes": {
104
+ "type": "integer",
105
+ "minimum": 1,
106
+ "maximum": 9007199254740991
107
+ },
108
+ "model": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": [
112
+ "nodes",
113
+ "relations",
114
+ "flows",
115
+ "sourcePaths"
116
+ ],
117
+ "properties": {
118
+ "nodes": {
119
+ "type": "array",
120
+ "items": {
121
+ "$ref": "../repo/architecture-node.schema.json"
122
+ },
123
+ "minItems": 1
124
+ },
125
+ "relations": {
126
+ "type": "array",
127
+ "items": {
128
+ "$ref": "../repo/architecture-relation.schema.json"
129
+ }
130
+ },
131
+ "flows": {
132
+ "type": "array",
133
+ "items": {
134
+ "$ref": "../repo/architecture-flow.schema.json"
135
+ }
136
+ },
137
+ "sourcePaths": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "nodes",
142
+ "relations",
143
+ "flows"
144
+ ],
145
+ "properties": {
146
+ "nodes": {
147
+ "type": "object",
148
+ "additionalProperties": {
149
+ "$ref": "#/$defs/path"
150
+ }
151
+ },
152
+ "relations": {
153
+ "type": "object",
154
+ "additionalProperties": {
155
+ "$ref": "#/$defs/path"
156
+ }
157
+ },
158
+ "flows": {
159
+ "type": "object",
160
+ "additionalProperties": {
161
+ "$ref": "#/$defs/path"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "capabilityProfiles": {
169
+ "type": "array",
170
+ "items": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "nodeId",
175
+ "status",
176
+ "domain",
177
+ "name",
178
+ "modulePath",
179
+ "contractFiles",
180
+ "includeAnchors",
181
+ "lspProfile",
182
+ "verification",
183
+ "directChildNodeIds",
184
+ "componentNodeIds"
185
+ ],
186
+ "properties": {
187
+ "nodeId": {
188
+ "type": "string",
189
+ "pattern": "^capability\\.[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z0-9]+(?:-[a-z0-9]+)*$"
190
+ },
191
+ "status": {
192
+ "$ref": "../repo/architecture-node.schema.json#/properties/status"
193
+ },
194
+ "domain": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "name": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "modulePath": {
203
+ "$ref": "#/$defs/path"
204
+ },
205
+ "contractFiles": {
206
+ "type": "object",
207
+ "additionalProperties": false,
208
+ "required": [
209
+ "agents",
210
+ "claude"
211
+ ],
212
+ "properties": {
213
+ "agents": {
214
+ "$ref": "#/$defs/path"
215
+ },
216
+ "claude": {
217
+ "$ref": "#/$defs/path"
218
+ }
219
+ }
220
+ },
221
+ "includeAnchors": {
222
+ "type": "array",
223
+ "items": {
224
+ "$ref": "#/$defs/path"
225
+ },
226
+ "uniqueItems": true
227
+ },
228
+ "lspProfile": {
229
+ "type": [
230
+ "string",
231
+ "null"
232
+ ],
233
+ "minLength": 1
234
+ },
235
+ "verification": {
236
+ "oneOf": [
237
+ {
238
+ "type": "null"
239
+ },
240
+ {
241
+ "type": "array",
242
+ "items": {
243
+ "type": "string"
244
+ }
245
+ }
246
+ ]
247
+ },
248
+ "directChildNodeIds": {
249
+ "type": "array",
250
+ "items": {
251
+ "$ref": "../repo/architecture-node.schema.json#/properties/id"
252
+ },
253
+ "uniqueItems": true
254
+ },
255
+ "componentNodeIds": {
256
+ "type": "array",
257
+ "items": {
258
+ "$ref": "../repo/architecture-node.schema.json#/properties/id"
259
+ },
260
+ "uniqueItems": true
261
+ }
262
+ }
263
+ }
264
+ },
265
+ "contracts": {
266
+ "type": "array",
267
+ "items": {
268
+ "$ref": "#/$defs/contract"
269
+ }
270
+ },
271
+ "documents": {
272
+ "type": "array",
273
+ "items": {
274
+ "$ref": "#/$defs/document"
275
+ }
276
+ }
277
+ },
278
+ "$defs": {
279
+ "path": {
280
+ "type": "string",
281
+ "minLength": 1,
282
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001f\\u007f-\\u009f]+$"
283
+ },
284
+ "range": {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": [
288
+ "startByte",
289
+ "endByte",
290
+ "startLine",
291
+ "endLine"
292
+ ],
293
+ "properties": {
294
+ "startByte": {
295
+ "type": "integer",
296
+ "minimum": 0,
297
+ "maximum": 9007199254740991
298
+ },
299
+ "endByte": {
300
+ "type": "integer",
301
+ "minimum": 0,
302
+ "maximum": 9007199254740991
303
+ },
304
+ "startLine": {
305
+ "type": "integer",
306
+ "minimum": 0,
307
+ "maximum": 9007199254740991
308
+ },
309
+ "endLine": {
310
+ "type": "integer",
311
+ "minimum": 0,
312
+ "maximum": 9007199254740991
313
+ }
314
+ }
315
+ },
316
+ "humanRegion": {
317
+ "type": "object",
318
+ "additionalProperties": false,
319
+ "required": [
320
+ "startByte",
321
+ "endByte",
322
+ "startLine",
323
+ "endLine",
324
+ "text"
325
+ ],
326
+ "properties": {
327
+ "startByte": {
328
+ "type": "integer",
329
+ "minimum": 0,
330
+ "maximum": 9007199254740991
331
+ },
332
+ "endByte": {
333
+ "type": "integer",
334
+ "minimum": 0,
335
+ "maximum": 9007199254740991
336
+ },
337
+ "startLine": {
338
+ "type": "integer",
339
+ "minimum": 0,
340
+ "maximum": 9007199254740991
341
+ },
342
+ "endLine": {
343
+ "type": "integer",
344
+ "minimum": 0,
345
+ "maximum": 9007199254740991
346
+ },
347
+ "text": {
348
+ "type": "string"
349
+ }
350
+ }
351
+ },
352
+ "section": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "required": [
356
+ "state",
357
+ "heading",
358
+ "bodyRanges",
359
+ "body"
360
+ ],
361
+ "properties": {
362
+ "state": {
363
+ "enum": [
364
+ "missing",
365
+ "absent",
366
+ "empty",
367
+ "present"
368
+ ]
369
+ },
370
+ "heading": {
371
+ "oneOf": [
372
+ {
373
+ "type": "null"
374
+ },
375
+ {
376
+ "type": "object",
377
+ "additionalProperties": false,
378
+ "required": [
379
+ "text",
380
+ "range"
381
+ ],
382
+ "properties": {
383
+ "text": {
384
+ "type": "string"
385
+ },
386
+ "range": {
387
+ "$ref": "#/$defs/range"
388
+ }
389
+ }
390
+ }
391
+ ]
392
+ },
393
+ "bodyRanges": {
394
+ "type": "array",
395
+ "items": {
396
+ "$ref": "#/$defs/range"
397
+ }
398
+ },
399
+ "body": {
400
+ "type": [
401
+ "string",
402
+ "null"
403
+ ]
404
+ }
405
+ },
406
+ "allOf": [
407
+ {
408
+ "if": {
409
+ "properties": {
410
+ "state": {
411
+ "enum": [
412
+ "missing",
413
+ "absent"
414
+ ]
415
+ }
416
+ }
417
+ },
418
+ "then": {
419
+ "properties": {
420
+ "heading": {
421
+ "type": "null"
422
+ },
423
+ "body": {
424
+ "type": "null"
425
+ },
426
+ "bodyRanges": {
427
+ "maxItems": 0
428
+ }
429
+ }
430
+ },
431
+ "else": {
432
+ "properties": {
433
+ "heading": {
434
+ "type": "object",
435
+ "additionalProperties": false,
436
+ "required": [
437
+ "text",
438
+ "range"
439
+ ],
440
+ "properties": {
441
+ "text": {
442
+ "type": "string"
443
+ },
444
+ "range": {
445
+ "$ref": "#/$defs/range"
446
+ }
447
+ }
448
+ },
449
+ "body": {
450
+ "type": "string"
451
+ }
452
+ }
453
+ }
454
+ }
455
+ ]
456
+ },
457
+ "input": {
458
+ "type": "object",
459
+ "additionalProperties": false,
460
+ "required": [
461
+ "path",
462
+ "role",
463
+ "requirement",
464
+ "presence",
465
+ "mode",
466
+ "byteLength",
467
+ "contentDigest"
468
+ ],
469
+ "properties": {
470
+ "path": {
471
+ "$ref": "#/$defs/path"
472
+ },
473
+ "role": {
474
+ "enum": [
475
+ "manifest",
476
+ "node",
477
+ "relation",
478
+ "flow",
479
+ "contract",
480
+ "document"
481
+ ]
482
+ },
483
+ "requirement": {
484
+ "enum": [
485
+ "required",
486
+ "declared",
487
+ "optional"
488
+ ]
489
+ },
490
+ "presence": {
491
+ "enum": [
492
+ "present",
493
+ "missing"
494
+ ]
495
+ },
496
+ "mode": {
497
+ "enum": [
498
+ "100644",
499
+ "100755",
500
+ null
501
+ ]
502
+ },
503
+ "byteLength": {
504
+ "oneOf": [
505
+ {
506
+ "type": "null"
507
+ },
508
+ {
509
+ "type": "integer",
510
+ "minimum": 0,
511
+ "maximum": 8388608
512
+ }
513
+ ]
514
+ },
515
+ "contentDigest": {
516
+ "oneOf": [
517
+ {
518
+ "type": "null"
519
+ },
520
+ {
521
+ "type": "string",
522
+ "pattern": "^sha256:[a-f0-9]{64}$"
523
+ }
524
+ ]
525
+ }
526
+ },
527
+ "allOf": [
528
+ {
529
+ "if": {
530
+ "properties": {
531
+ "presence": {
532
+ "const": "missing"
533
+ }
534
+ }
535
+ },
536
+ "then": {
537
+ "properties": {
538
+ "mode": {
539
+ "type": "null"
540
+ },
541
+ "byteLength": {
542
+ "type": "null"
543
+ },
544
+ "contentDigest": {
545
+ "type": "null"
546
+ }
547
+ }
548
+ },
549
+ "else": {
550
+ "properties": {
551
+ "mode": {
552
+ "enum": [
553
+ "100644",
554
+ "100755"
555
+ ]
556
+ },
557
+ "byteLength": {
558
+ "type": "integer",
559
+ "minimum": 0,
560
+ "maximum": 8388608
561
+ },
562
+ "contentDigest": {
563
+ "type": "string",
564
+ "pattern": "^sha256:[a-f0-9]{64}$"
565
+ }
566
+ }
567
+ }
568
+ },
569
+ {
570
+ "if": {
571
+ "properties": {
572
+ "requirement": {
573
+ "const": "required"
574
+ }
575
+ }
576
+ },
577
+ "then": {
578
+ "properties": {
579
+ "presence": {
580
+ "const": "present"
581
+ }
582
+ }
583
+ }
584
+ }
585
+ ]
586
+ },
587
+ "contract": {
588
+ "type": "object",
589
+ "additionalProperties": false,
590
+ "required": [
591
+ "path",
592
+ "roles",
593
+ "capabilityNodeIds",
594
+ "presence",
595
+ "text",
596
+ "byteLength",
597
+ "byteDigest"
598
+ ],
599
+ "properties": {
600
+ "path": {
601
+ "$ref": "#/$defs/path"
602
+ },
603
+ "roles": {
604
+ "type": "array",
605
+ "items": {
606
+ "enum": [
607
+ "agents",
608
+ "claude"
609
+ ]
610
+ },
611
+ "minItems": 1,
612
+ "maxItems": 2,
613
+ "uniqueItems": true
614
+ },
615
+ "capabilityNodeIds": {
616
+ "type": "array",
617
+ "items": {
618
+ "$ref": "../repo/architecture-node.schema.json#/properties/id"
619
+ },
620
+ "minItems": 1,
621
+ "uniqueItems": true
622
+ },
623
+ "presence": {
624
+ "enum": [
625
+ "present",
626
+ "missing"
627
+ ]
628
+ },
629
+ "text": {
630
+ "type": [
631
+ "string",
632
+ "null"
633
+ ]
634
+ },
635
+ "byteLength": {
636
+ "oneOf": [
637
+ {
638
+ "type": "null"
639
+ },
640
+ {
641
+ "type": "integer",
642
+ "minimum": 0,
643
+ "maximum": 9007199254740991
644
+ }
645
+ ]
646
+ },
647
+ "byteDigest": {
648
+ "oneOf": [
649
+ {
650
+ "type": "null"
651
+ },
652
+ {
653
+ "type": "string",
654
+ "pattern": "^sha256:[a-f0-9]{64}$"
655
+ }
656
+ ]
657
+ }
658
+ },
659
+ "allOf": [
660
+ {
661
+ "if": {
662
+ "properties": {
663
+ "presence": {
664
+ "const": "missing"
665
+ }
666
+ }
667
+ },
668
+ "then": {
669
+ "properties": {
670
+ "text": {
671
+ "type": "null"
672
+ },
673
+ "byteLength": {
674
+ "type": "null"
675
+ },
676
+ "byteDigest": {
677
+ "type": "null"
678
+ }
679
+ }
680
+ },
681
+ "else": {
682
+ "properties": {
683
+ "text": {
684
+ "type": "string"
685
+ },
686
+ "byteLength": {
687
+ "type": "integer",
688
+ "minimum": 0,
689
+ "maximum": 9007199254740991
690
+ },
691
+ "byteDigest": {
692
+ "type": "string",
693
+ "pattern": "^sha256:[a-f0-9]{64}$"
694
+ }
695
+ }
696
+ }
697
+ }
698
+ ]
699
+ },
700
+ "document": {
701
+ "type": "object",
702
+ "additionalProperties": false,
703
+ "required": [
704
+ "path",
705
+ "targetId",
706
+ "capabilityNodeIds",
707
+ "presence",
708
+ "markerState",
709
+ "humanRegions",
710
+ "section3",
711
+ "backlog"
712
+ ],
713
+ "properties": {
714
+ "path": {
715
+ "$ref": "#/$defs/path"
716
+ },
717
+ "targetId": {
718
+ "type": "string",
719
+ "minLength": 1
720
+ },
721
+ "capabilityNodeIds": {
722
+ "type": "array",
723
+ "items": {
724
+ "$ref": "../repo/architecture-node.schema.json#/properties/id"
725
+ },
726
+ "uniqueItems": true
727
+ },
728
+ "presence": {
729
+ "enum": [
730
+ "present",
731
+ "missing"
732
+ ]
733
+ },
734
+ "markerState": {
735
+ "enum": [
736
+ "present",
737
+ "absent",
738
+ "missing"
739
+ ]
740
+ },
741
+ "humanRegions": {
742
+ "type": "array",
743
+ "items": {
744
+ "$ref": "#/$defs/humanRegion"
745
+ }
746
+ },
747
+ "section3": {
748
+ "$ref": "#/$defs/section"
749
+ },
750
+ "backlog": {
751
+ "$ref": "#/$defs/section"
752
+ }
753
+ },
754
+ "allOf": [
755
+ {
756
+ "if": {
757
+ "properties": {
758
+ "presence": {
759
+ "const": "missing"
760
+ }
761
+ }
762
+ },
763
+ "then": {
764
+ "properties": {
765
+ "markerState": {
766
+ "const": "missing"
767
+ },
768
+ "humanRegions": {
769
+ "maxItems": 0
770
+ },
771
+ "section3": {
772
+ "properties": {
773
+ "state": {
774
+ "const": "missing"
775
+ }
776
+ }
777
+ },
778
+ "backlog": {
779
+ "properties": {
780
+ "state": {
781
+ "const": "missing"
782
+ }
783
+ }
784
+ }
785
+ }
786
+ },
787
+ "else": {
788
+ "properties": {
789
+ "markerState": {
790
+ "enum": [
791
+ "present",
792
+ "absent"
793
+ ]
794
+ },
795
+ "section3": {
796
+ "properties": {
797
+ "state": {
798
+ "enum": [
799
+ "absent",
800
+ "empty",
801
+ "present"
802
+ ]
803
+ }
804
+ }
805
+ },
806
+ "backlog": {
807
+ "properties": {
808
+ "state": {
809
+ "enum": [
810
+ "absent",
811
+ "empty",
812
+ "present"
813
+ ]
814
+ }
815
+ }
816
+ }
817
+ }
818
+ }
819
+ }
820
+ ]
821
+ }
822
+ }
823
+ }