archctx 0.6.3 → 0.7.1

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,1167 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archcontext.dev/schemas/runtime/recommendation-v3.schema.json",
4
+ "title": "RecommendationV3",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "recommendationId",
10
+ "runId",
11
+ "fingerprint",
12
+ "subject",
13
+ "status",
14
+ "confidence",
15
+ "enforcement",
16
+ "risk",
17
+ "uncertainty",
18
+ "evidenceBindingIds",
19
+ "explanation",
20
+ "authoredBy",
21
+ "subjectSelectorId",
22
+ "relations",
23
+ "createdAt",
24
+ "updatedAt",
25
+ "category",
26
+ "payload"
27
+ ],
28
+ "properties": {
29
+ "schemaVersion": {
30
+ "const": "archcontext.recommendation/v3"
31
+ },
32
+ "recommendationId": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "pattern": "\\S"
36
+ },
37
+ "runId": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "pattern": "\\S"
41
+ },
42
+ "fingerprint": {
43
+ "$ref": "#/$defs/sha256"
44
+ },
45
+ "subject": {
46
+ "type": "string"
47
+ },
48
+ "practiceId": {
49
+ "type": "string"
50
+ },
51
+ "status": {
52
+ "enum": [
53
+ "open",
54
+ "acknowledged",
55
+ "accepted",
56
+ "rejected",
57
+ "deferred",
58
+ "waived",
59
+ "resolved",
60
+ "superseded",
61
+ "expired"
62
+ ]
63
+ },
64
+ "confidence": {
65
+ "enum": [
66
+ "low",
67
+ "medium",
68
+ "high"
69
+ ]
70
+ },
71
+ "enforcement": {
72
+ "enum": [
73
+ "advisory",
74
+ "checkpoint",
75
+ "complete"
76
+ ]
77
+ },
78
+ "risk": {
79
+ "enum": [
80
+ "low",
81
+ "medium",
82
+ "high"
83
+ ]
84
+ },
85
+ "uncertainty": {
86
+ "enum": [
87
+ "low",
88
+ "medium",
89
+ "high"
90
+ ]
91
+ },
92
+ "evidenceBindingIds": {
93
+ "type": "array",
94
+ "uniqueItems": true,
95
+ "items": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "explanation": {
100
+ "type": "array",
101
+ "items": {
102
+ "type": "string"
103
+ }
104
+ },
105
+ "authoredBy": {
106
+ "$ref": "#/$defs/recommendationAuthor"
107
+ },
108
+ "subjectSelectorId": {
109
+ "type": "string",
110
+ "minLength": 1,
111
+ "pattern": "\\S"
112
+ },
113
+ "relations": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": [],
117
+ "properties": {
118
+ "supersedes": {
119
+ "type": "string"
120
+ },
121
+ "regressesFrom": {
122
+ "type": "string"
123
+ }
124
+ }
125
+ },
126
+ "createdAt": {
127
+ "type": "string"
128
+ },
129
+ "updatedAt": {
130
+ "type": "string"
131
+ },
132
+ "extensions": {
133
+ "type": "object",
134
+ "additionalProperties": true
135
+ },
136
+ "category": {
137
+ "enum": [
138
+ "practice",
139
+ "refactor_proposal",
140
+ "structural_observation"
141
+ ]
142
+ },
143
+ "payload": {
144
+ "type": "object"
145
+ }
146
+ },
147
+ "allOf": [
148
+ {
149
+ "if": {
150
+ "properties": {
151
+ "category": {
152
+ "const": "practice"
153
+ }
154
+ }
155
+ },
156
+ "then": {
157
+ "required": [
158
+ "practiceId"
159
+ ],
160
+ "properties": {
161
+ "payload": {
162
+ "$ref": "#/$defs/practiceRecommendationPayload"
163
+ }
164
+ }
165
+ }
166
+ },
167
+ {
168
+ "if": {
169
+ "properties": {
170
+ "category": {
171
+ "const": "structural_observation"
172
+ }
173
+ }
174
+ },
175
+ "then": {
176
+ "properties": {
177
+ "payload": {
178
+ "$ref": "#/$defs/structuralObservationPayload"
179
+ },
180
+ "enforcement": {
181
+ "const": "advisory"
182
+ },
183
+ "authoredBy": {
184
+ "properties": {
185
+ "kind": {
186
+ "const": "daemon"
187
+ },
188
+ "source": {
189
+ "const": "daemon"
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ },
196
+ {
197
+ "if": {
198
+ "properties": {
199
+ "category": {
200
+ "const": "refactor_proposal"
201
+ }
202
+ }
203
+ },
204
+ "then": {
205
+ "properties": {
206
+ "payload": {
207
+ "$ref": "#/$defs/refactorProposalPayload"
208
+ },
209
+ "authoredBy": {
210
+ "oneOf": [
211
+ {
212
+ "properties": {
213
+ "kind": {
214
+ "const": "cli"
215
+ },
216
+ "source": {
217
+ "enum": [
218
+ "cli"
219
+ ]
220
+ }
221
+ }
222
+ },
223
+ {
224
+ "properties": {
225
+ "kind": {
226
+ "const": "developer"
227
+ },
228
+ "source": {
229
+ "enum": [
230
+ "manual"
231
+ ]
232
+ }
233
+ }
234
+ },
235
+ {
236
+ "properties": {
237
+ "kind": {
238
+ "const": "mcp"
239
+ },
240
+ "source": {
241
+ "enum": [
242
+ "mcp"
243
+ ]
244
+ }
245
+ }
246
+ },
247
+ {
248
+ "properties": {
249
+ "kind": {
250
+ "const": "subagent"
251
+ },
252
+ "source": {
253
+ "enum": [
254
+ "subagent"
255
+ ]
256
+ }
257
+ }
258
+ }
259
+ ]
260
+ }
261
+ },
262
+ "if": {
263
+ "properties": {
264
+ "payload": {
265
+ "properties": {
266
+ "scale": {
267
+ "const": "architecture"
268
+ }
269
+ }
270
+ }
271
+ }
272
+ },
273
+ "then": {
274
+ "properties": {
275
+ "enforcement": {
276
+ "const": "complete"
277
+ }
278
+ }
279
+ },
280
+ "else": {
281
+ "properties": {
282
+ "enforcement": {
283
+ "const": "checkpoint"
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
289
+ ],
290
+ "$defs": {
291
+ "sha256": {
292
+ "type": "string",
293
+ "pattern": "^sha256:[a-f0-9]{64}$"
294
+ },
295
+ "repoRelativePath": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "pattern": "^(?!/)(?!.*\\\\)(?!(?:.*/)?\\.\\.(?:/|$)).+$"
299
+ },
300
+ "evidenceLine": {
301
+ "type": [
302
+ "integer",
303
+ "null"
304
+ ],
305
+ "minimum": 1
306
+ },
307
+ "evidenceSpecifier": {
308
+ "type": "string",
309
+ "minLength": 1,
310
+ "maxLength": 512,
311
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
312
+ },
313
+ "evidenceIdList": {
314
+ "type": "array",
315
+ "maxItems": 32,
316
+ "uniqueItems": true,
317
+ "items": {
318
+ "type": "string"
319
+ }
320
+ },
321
+ "observationMetrics": {
322
+ "type": "object",
323
+ "additionalProperties": {
324
+ "type": [
325
+ "number",
326
+ "null"
327
+ ]
328
+ }
329
+ },
330
+ "evidenceImportEdge": {
331
+ "type": "object",
332
+ "additionalProperties": false,
333
+ "required": [
334
+ "fromPath",
335
+ "fromLine",
336
+ "toPath",
337
+ "specifier",
338
+ "fromNodeId",
339
+ "toNodeId"
340
+ ],
341
+ "properties": {
342
+ "fromPath": {
343
+ "$ref": "#/$defs/repoRelativePath"
344
+ },
345
+ "fromLine": {
346
+ "$ref": "#/$defs/evidenceLine"
347
+ },
348
+ "toPath": {
349
+ "$ref": "#/$defs/repoRelativePath"
350
+ },
351
+ "specifier": {
352
+ "$ref": "#/$defs/evidenceSpecifier"
353
+ },
354
+ "fromNodeId": {
355
+ "type": "string",
356
+ "minLength": 1,
357
+ "pattern": "\\S"
358
+ },
359
+ "toNodeId": {
360
+ "type": "string",
361
+ "minLength": 1,
362
+ "pattern": "\\S"
363
+ }
364
+ }
365
+ },
366
+ "evidenceDirectionViolation": {
367
+ "type": "object",
368
+ "additionalProperties": false,
369
+ "required": [
370
+ "fromPath",
371
+ "fromLine",
372
+ "toPath",
373
+ "specifier",
374
+ "fromNodeId",
375
+ "toNodeId",
376
+ "constraintId"
377
+ ],
378
+ "properties": {
379
+ "fromPath": {
380
+ "$ref": "#/$defs/repoRelativePath"
381
+ },
382
+ "fromLine": {
383
+ "$ref": "#/$defs/evidenceLine"
384
+ },
385
+ "toPath": {
386
+ "$ref": "#/$defs/repoRelativePath"
387
+ },
388
+ "specifier": {
389
+ "$ref": "#/$defs/evidenceSpecifier"
390
+ },
391
+ "fromNodeId": {
392
+ "type": "string",
393
+ "minLength": 1,
394
+ "pattern": "\\S"
395
+ },
396
+ "toNodeId": {
397
+ "type": "string",
398
+ "minLength": 1,
399
+ "pattern": "\\S"
400
+ },
401
+ "constraintId": {
402
+ "type": "string"
403
+ }
404
+ }
405
+ },
406
+ "evidencePath": {
407
+ "type": "object",
408
+ "additionalProperties": false,
409
+ "required": [
410
+ "path",
411
+ "candidateOwnerNodeIds",
412
+ "candidateOwnerCount"
413
+ ],
414
+ "properties": {
415
+ "path": {
416
+ "$ref": "#/$defs/repoRelativePath"
417
+ },
418
+ "candidateOwnerNodeIds": {
419
+ "$ref": "#/$defs/evidenceIdList"
420
+ },
421
+ "candidateOwnerCount": {
422
+ "type": "integer",
423
+ "minimum": 0
424
+ }
425
+ }
426
+ },
427
+ "evidenceUnresolvedImport": {
428
+ "type": "object",
429
+ "additionalProperties": false,
430
+ "required": [
431
+ "fromPath",
432
+ "fromLine",
433
+ "specifier"
434
+ ],
435
+ "properties": {
436
+ "fromPath": {
437
+ "$ref": "#/$defs/repoRelativePath"
438
+ },
439
+ "fromLine": {
440
+ "$ref": "#/$defs/evidenceLine"
441
+ },
442
+ "specifier": {
443
+ "$ref": "#/$defs/evidenceSpecifier"
444
+ }
445
+ }
446
+ },
447
+ "observationEvidence": {
448
+ "oneOf": [
449
+ {
450
+ "type": "object",
451
+ "additionalProperties": false,
452
+ "required": [
453
+ "kind",
454
+ "memberNodeIds",
455
+ "edges",
456
+ "totalCount",
457
+ "truncated"
458
+ ],
459
+ "properties": {
460
+ "kind": {
461
+ "const": "cycle"
462
+ },
463
+ "memberNodeIds": {
464
+ "$ref": "#/$defs/evidenceIdList"
465
+ },
466
+ "edges": {
467
+ "type": "array",
468
+ "maxItems": 20,
469
+ "items": {
470
+ "$ref": "#/$defs/evidenceImportEdge"
471
+ }
472
+ },
473
+ "totalCount": {
474
+ "type": "integer",
475
+ "minimum": 0
476
+ },
477
+ "truncated": {
478
+ "type": "boolean"
479
+ }
480
+ }
481
+ },
482
+ {
483
+ "type": "object",
484
+ "additionalProperties": false,
485
+ "required": [
486
+ "kind",
487
+ "constraintIds",
488
+ "constraintCount",
489
+ "violations",
490
+ "totalCount",
491
+ "truncated"
492
+ ],
493
+ "properties": {
494
+ "kind": {
495
+ "const": "direction-violation"
496
+ },
497
+ "constraintIds": {
498
+ "$ref": "#/$defs/evidenceIdList"
499
+ },
500
+ "constraintCount": {
501
+ "type": "integer",
502
+ "minimum": 0
503
+ },
504
+ "violations": {
505
+ "type": "array",
506
+ "maxItems": 20,
507
+ "items": {
508
+ "$ref": "#/$defs/evidenceDirectionViolation"
509
+ }
510
+ },
511
+ "totalCount": {
512
+ "type": "integer",
513
+ "minimum": 0
514
+ },
515
+ "truncated": {
516
+ "type": "boolean"
517
+ }
518
+ }
519
+ },
520
+ {
521
+ "type": "object",
522
+ "additionalProperties": false,
523
+ "required": [
524
+ "kind",
525
+ "paths",
526
+ "totalCount",
527
+ "truncated"
528
+ ],
529
+ "properties": {
530
+ "kind": {
531
+ "enum": [
532
+ "ownership-ambiguous",
533
+ "undeclared-footprint",
534
+ "unowned-paths"
535
+ ]
536
+ },
537
+ "paths": {
538
+ "type": "array",
539
+ "maxItems": 20,
540
+ "items": {
541
+ "$ref": "#/$defs/evidencePath"
542
+ }
543
+ },
544
+ "totalCount": {
545
+ "type": "integer",
546
+ "minimum": 0
547
+ },
548
+ "truncated": {
549
+ "type": "boolean"
550
+ }
551
+ }
552
+ },
553
+ {
554
+ "type": "object",
555
+ "additionalProperties": false,
556
+ "required": [
557
+ "kind",
558
+ "coverage",
559
+ "reasonCodes",
560
+ "unresolvedImports",
561
+ "totalCount",
562
+ "truncated"
563
+ ],
564
+ "properties": {
565
+ "kind": {
566
+ "const": "evidence-gap"
567
+ },
568
+ "coverage": {
569
+ "enum": [
570
+ "complete",
571
+ "partial",
572
+ "unknown"
573
+ ]
574
+ },
575
+ "reasonCodes": {
576
+ "type": "array",
577
+ "uniqueItems": true,
578
+ "items": {
579
+ "enum": [
580
+ "caller-coverage-unknown",
581
+ "code-facts-import-limit",
582
+ "code-facts-missing",
583
+ "code-facts-truncated",
584
+ "major-change-detected",
585
+ "multi-node-scope",
586
+ "node-footprint-undeclared",
587
+ "ownership-ambiguous",
588
+ "single-node-scope",
589
+ "target-unresolved",
590
+ "unowned-paths"
591
+ ]
592
+ }
593
+ },
594
+ "unresolvedImports": {
595
+ "type": "array",
596
+ "maxItems": 20,
597
+ "items": {
598
+ "$ref": "#/$defs/evidenceUnresolvedImport"
599
+ }
600
+ },
601
+ "totalCount": {
602
+ "type": "integer",
603
+ "minimum": 0
604
+ },
605
+ "truncated": {
606
+ "type": "boolean"
607
+ }
608
+ }
609
+ }
610
+ ]
611
+ },
612
+ "targetOutcome": {
613
+ "type": "object",
614
+ "additionalProperties": false,
615
+ "required": [
616
+ "outcomeId",
617
+ "metric",
618
+ "subjectSelectorId",
619
+ "nodeId",
620
+ "operator",
621
+ "value",
622
+ "required"
623
+ ],
624
+ "properties": {
625
+ "outcomeId": {
626
+ "type": "string"
627
+ },
628
+ "metric": {
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "pattern": "\\S"
632
+ },
633
+ "subjectSelectorId": {
634
+ "type": "string"
635
+ },
636
+ "nodeId": {
637
+ "type": [
638
+ "string",
639
+ "null"
640
+ ]
641
+ },
642
+ "operator": {
643
+ "enum": [
644
+ "absent",
645
+ "equals",
646
+ "greater_than",
647
+ "less_than",
648
+ "present"
649
+ ]
650
+ },
651
+ "value": {
652
+ "type": [
653
+ "number",
654
+ "null"
655
+ ]
656
+ },
657
+ "required": {
658
+ "type": "boolean"
659
+ }
660
+ },
661
+ "if": {
662
+ "properties": {
663
+ "operator": {
664
+ "enum": [
665
+ "absent",
666
+ "present"
667
+ ]
668
+ }
669
+ }
670
+ },
671
+ "then": {
672
+ "properties": {
673
+ "value": {
674
+ "type": "null"
675
+ }
676
+ }
677
+ },
678
+ "else": {
679
+ "properties": {
680
+ "value": {
681
+ "type": "number"
682
+ }
683
+ }
684
+ }
685
+ },
686
+ "killListEntry": {
687
+ "type": "object",
688
+ "additionalProperties": false,
689
+ "required": [
690
+ "kind",
691
+ "selectorId",
692
+ "required"
693
+ ],
694
+ "properties": {
695
+ "kind": {
696
+ "enum": [
697
+ "path",
698
+ "relation",
699
+ "symbol"
700
+ ]
701
+ },
702
+ "selectorId": {
703
+ "type": "string"
704
+ },
705
+ "required": {
706
+ "type": "boolean"
707
+ }
708
+ }
709
+ },
710
+ "architectureTargetDelta": {
711
+ "type": "object",
712
+ "additionalProperties": false,
713
+ "required": [
714
+ "interventionId",
715
+ "trigger",
716
+ "thesis",
717
+ "targetState",
718
+ "migrationState",
719
+ "completionCriteria",
720
+ "falsifiers",
721
+ "benefitLedger",
722
+ "unresolvedTargets"
723
+ ],
724
+ "properties": {
725
+ "interventionId": {
726
+ "type": "string"
727
+ },
728
+ "trigger": {
729
+ "type": "array",
730
+ "items": {
731
+ "type": "string"
732
+ },
733
+ "minItems": 1
734
+ },
735
+ "thesis": {
736
+ "type": "string",
737
+ "minLength": 1,
738
+ "pattern": "\\S"
739
+ },
740
+ "targetState": {
741
+ "type": "object",
742
+ "additionalProperties": false,
743
+ "required": [
744
+ "owners",
745
+ "requiredRelations",
746
+ "removedConcepts"
747
+ ],
748
+ "properties": {
749
+ "owners": {
750
+ "type": "object",
751
+ "additionalProperties": {
752
+ "type": "string"
753
+ }
754
+ },
755
+ "requiredRelations": {
756
+ "type": "array",
757
+ "items": {
758
+ "type": "string"
759
+ }
760
+ },
761
+ "removedConcepts": {
762
+ "type": "array",
763
+ "items": {
764
+ "type": "string"
765
+ }
766
+ }
767
+ }
768
+ },
769
+ "migrationState": {
770
+ "type": "object",
771
+ "additionalProperties": false,
772
+ "required": [
773
+ "active",
774
+ "compatibilityContracts",
775
+ "temporaryRelations"
776
+ ],
777
+ "properties": {
778
+ "active": {
779
+ "type": "boolean"
780
+ },
781
+ "compatibilityContracts": {
782
+ "type": "array",
783
+ "items": {
784
+ "type": "string"
785
+ }
786
+ },
787
+ "cleanupBy": {
788
+ "type": "string"
789
+ },
790
+ "temporaryRelations": {
791
+ "type": "array",
792
+ "items": {
793
+ "type": "string"
794
+ }
795
+ }
796
+ }
797
+ },
798
+ "completionCriteria": {
799
+ "type": "array",
800
+ "minItems": 1,
801
+ "items": {
802
+ "$ref": "#/$defs/targetOutcome"
803
+ }
804
+ },
805
+ "falsifiers": {
806
+ "type": "array",
807
+ "items": {
808
+ "type": "string"
809
+ },
810
+ "minItems": 1
811
+ },
812
+ "benefitLedger": {
813
+ "type": "object",
814
+ "additionalProperties": false,
815
+ "required": [
816
+ "benefits",
817
+ "costs",
818
+ "rollbackPoint"
819
+ ],
820
+ "properties": {
821
+ "benefits": {
822
+ "type": "array",
823
+ "items": {
824
+ "type": "string"
825
+ }
826
+ },
827
+ "costs": {
828
+ "type": "array",
829
+ "items": {
830
+ "type": "string"
831
+ }
832
+ },
833
+ "rollbackPoint": {
834
+ "type": "string",
835
+ "minLength": 1,
836
+ "pattern": "\\S"
837
+ }
838
+ }
839
+ },
840
+ "unresolvedTargets": {
841
+ "type": "array",
842
+ "uniqueItems": true,
843
+ "items": {
844
+ "type": "string"
845
+ }
846
+ },
847
+ "extensions": {
848
+ "type": "object",
849
+ "additionalProperties": true
850
+ }
851
+ }
852
+ },
853
+ "recommendationAuthor": {
854
+ "type": "object",
855
+ "additionalProperties": false,
856
+ "required": [
857
+ "kind",
858
+ "id",
859
+ "source"
860
+ ],
861
+ "properties": {
862
+ "kind": {
863
+ "enum": [
864
+ "developer",
865
+ "daemon",
866
+ "hook",
867
+ "cli",
868
+ "mcp",
869
+ "subagent",
870
+ "migration",
871
+ "system"
872
+ ]
873
+ },
874
+ "id": {
875
+ "type": "string",
876
+ "minLength": 1,
877
+ "pattern": "\\S"
878
+ },
879
+ "source": {
880
+ "enum": [
881
+ "cli",
882
+ "mcp",
883
+ "manual",
884
+ "daemon",
885
+ "system",
886
+ "subagent"
887
+ ]
888
+ }
889
+ }
890
+ },
891
+ "practiceRecommendationPayload": {
892
+ "type": "object",
893
+ "additionalProperties": false,
894
+ "required": [
895
+ "practiceId",
896
+ "baselineDigest"
897
+ ],
898
+ "properties": {
899
+ "practiceId": {
900
+ "type": "string"
901
+ },
902
+ "baselineDigest": {
903
+ "type": [
904
+ "string",
905
+ "null"
906
+ ]
907
+ }
908
+ }
909
+ },
910
+ "structuralObservationPayload": {
911
+ "type": "object",
912
+ "additionalProperties": false,
913
+ "required": [
914
+ "assessmentDigest",
915
+ "kind",
916
+ "affectedNodeIds",
917
+ "baselineSnapshotDigest",
918
+ "derivedOutcomes",
919
+ "metrics",
920
+ "signalIds",
921
+ "evidence"
922
+ ],
923
+ "properties": {
924
+ "assessmentDigest": {
925
+ "$ref": "#/$defs/sha256"
926
+ },
927
+ "kind": {
928
+ "enum": [
929
+ "cycle",
930
+ "direction-violation",
931
+ "evidence-gap",
932
+ "ownership-ambiguous",
933
+ "undeclared-footprint",
934
+ "unowned-paths"
935
+ ]
936
+ },
937
+ "affectedNodeIds": {
938
+ "type": "array",
939
+ "items": {
940
+ "type": "string"
941
+ }
942
+ },
943
+ "baselineSnapshotDigest": {
944
+ "$ref": "#/$defs/sha256"
945
+ },
946
+ "derivedOutcomes": {
947
+ "type": "array",
948
+ "items": {
949
+ "$ref": "#/$defs/targetOutcome"
950
+ }
951
+ },
952
+ "metrics": {
953
+ "$ref": "#/$defs/observationMetrics"
954
+ },
955
+ "signalIds": {
956
+ "type": "array",
957
+ "uniqueItems": true,
958
+ "items": {
959
+ "type": "string"
960
+ }
961
+ },
962
+ "evidence": {
963
+ "$ref": "#/$defs/observationEvidence"
964
+ }
965
+ },
966
+ "allOf": [
967
+ {
968
+ "if": {
969
+ "properties": {
970
+ "kind": {
971
+ "const": "cycle"
972
+ }
973
+ }
974
+ },
975
+ "then": {
976
+ "properties": {
977
+ "evidence": {
978
+ "properties": {
979
+ "kind": {
980
+ "const": "cycle"
981
+ }
982
+ }
983
+ }
984
+ }
985
+ }
986
+ },
987
+ {
988
+ "if": {
989
+ "properties": {
990
+ "kind": {
991
+ "const": "direction-violation"
992
+ }
993
+ }
994
+ },
995
+ "then": {
996
+ "properties": {
997
+ "evidence": {
998
+ "properties": {
999
+ "kind": {
1000
+ "const": "direction-violation"
1001
+ }
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+ },
1007
+ {
1008
+ "if": {
1009
+ "properties": {
1010
+ "kind": {
1011
+ "const": "evidence-gap"
1012
+ }
1013
+ }
1014
+ },
1015
+ "then": {
1016
+ "properties": {
1017
+ "evidence": {
1018
+ "properties": {
1019
+ "kind": {
1020
+ "const": "evidence-gap"
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ },
1027
+ {
1028
+ "if": {
1029
+ "properties": {
1030
+ "kind": {
1031
+ "const": "ownership-ambiguous"
1032
+ }
1033
+ }
1034
+ },
1035
+ "then": {
1036
+ "properties": {
1037
+ "evidence": {
1038
+ "properties": {
1039
+ "kind": {
1040
+ "const": "ownership-ambiguous"
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ }
1046
+ },
1047
+ {
1048
+ "if": {
1049
+ "properties": {
1050
+ "kind": {
1051
+ "const": "undeclared-footprint"
1052
+ }
1053
+ }
1054
+ },
1055
+ "then": {
1056
+ "properties": {
1057
+ "evidence": {
1058
+ "properties": {
1059
+ "kind": {
1060
+ "const": "undeclared-footprint"
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ },
1067
+ {
1068
+ "if": {
1069
+ "properties": {
1070
+ "kind": {
1071
+ "const": "unowned-paths"
1072
+ }
1073
+ }
1074
+ },
1075
+ "then": {
1076
+ "properties": {
1077
+ "evidence": {
1078
+ "properties": {
1079
+ "kind": {
1080
+ "const": "unowned-paths"
1081
+ }
1082
+ }
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ ]
1088
+ },
1089
+ "refactorProposalPayload": {
1090
+ "type": "object",
1091
+ "additionalProperties": false,
1092
+ "required": [
1093
+ "assessmentDigest",
1094
+ "proposalDigest",
1095
+ "scale",
1096
+ "affectedNodeIds",
1097
+ "majorChangeReasons",
1098
+ "baselineSnapshotDigest",
1099
+ "targetOutcomes",
1100
+ "killList"
1101
+ ],
1102
+ "properties": {
1103
+ "assessmentDigest": {
1104
+ "$ref": "#/$defs/sha256"
1105
+ },
1106
+ "proposalDigest": {
1107
+ "$ref": "#/$defs/sha256"
1108
+ },
1109
+ "scale": {
1110
+ "enum": [
1111
+ "architecture",
1112
+ "cross_module",
1113
+ "insufficient_evidence",
1114
+ "model_adoption_required",
1115
+ "module"
1116
+ ]
1117
+ },
1118
+ "affectedNodeIds": {
1119
+ "type": "array",
1120
+ "uniqueItems": true,
1121
+ "items": {
1122
+ "type": "string"
1123
+ }
1124
+ },
1125
+ "majorChangeReasons": {
1126
+ "type": "array",
1127
+ "uniqueItems": true,
1128
+ "items": {
1129
+ "enum": [
1130
+ "constraint-changed",
1131
+ "entrypoint-changed",
1132
+ "interface-changed",
1133
+ "lifecycle-changed",
1134
+ "node-added",
1135
+ "node-moved",
1136
+ "node-removed",
1137
+ "node-renamed",
1138
+ "ownership-changed",
1139
+ "relation-changed",
1140
+ "responsibility-changed",
1141
+ "risk-boundary-changed",
1142
+ "verified-flow-proof-changed"
1143
+ ]
1144
+ }
1145
+ },
1146
+ "baselineSnapshotDigest": {
1147
+ "$ref": "#/$defs/sha256"
1148
+ },
1149
+ "targetDelta": {
1150
+ "$ref": "#/$defs/architectureTargetDelta"
1151
+ },
1152
+ "targetOutcomes": {
1153
+ "type": "array",
1154
+ "items": {
1155
+ "$ref": "#/$defs/targetOutcome"
1156
+ }
1157
+ },
1158
+ "killList": {
1159
+ "type": "array",
1160
+ "items": {
1161
+ "$ref": "#/$defs/killListEntry"
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+ }
1167
+ }