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.
@@ -0,0 +1,1166 @@
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-missing",
582
+ "code-facts-truncated",
583
+ "major-change-detected",
584
+ "multi-node-scope",
585
+ "node-footprint-undeclared",
586
+ "ownership-ambiguous",
587
+ "single-node-scope",
588
+ "target-unresolved",
589
+ "unowned-paths"
590
+ ]
591
+ }
592
+ },
593
+ "unresolvedImports": {
594
+ "type": "array",
595
+ "maxItems": 20,
596
+ "items": {
597
+ "$ref": "#/$defs/evidenceUnresolvedImport"
598
+ }
599
+ },
600
+ "totalCount": {
601
+ "type": "integer",
602
+ "minimum": 0
603
+ },
604
+ "truncated": {
605
+ "type": "boolean"
606
+ }
607
+ }
608
+ }
609
+ ]
610
+ },
611
+ "targetOutcome": {
612
+ "type": "object",
613
+ "additionalProperties": false,
614
+ "required": [
615
+ "outcomeId",
616
+ "metric",
617
+ "subjectSelectorId",
618
+ "nodeId",
619
+ "operator",
620
+ "value",
621
+ "required"
622
+ ],
623
+ "properties": {
624
+ "outcomeId": {
625
+ "type": "string"
626
+ },
627
+ "metric": {
628
+ "type": "string",
629
+ "minLength": 1,
630
+ "pattern": "\\S"
631
+ },
632
+ "subjectSelectorId": {
633
+ "type": "string"
634
+ },
635
+ "nodeId": {
636
+ "type": [
637
+ "string",
638
+ "null"
639
+ ]
640
+ },
641
+ "operator": {
642
+ "enum": [
643
+ "absent",
644
+ "equals",
645
+ "greater_than",
646
+ "less_than",
647
+ "present"
648
+ ]
649
+ },
650
+ "value": {
651
+ "type": [
652
+ "number",
653
+ "null"
654
+ ]
655
+ },
656
+ "required": {
657
+ "type": "boolean"
658
+ }
659
+ },
660
+ "if": {
661
+ "properties": {
662
+ "operator": {
663
+ "enum": [
664
+ "absent",
665
+ "present"
666
+ ]
667
+ }
668
+ }
669
+ },
670
+ "then": {
671
+ "properties": {
672
+ "value": {
673
+ "type": "null"
674
+ }
675
+ }
676
+ },
677
+ "else": {
678
+ "properties": {
679
+ "value": {
680
+ "type": "number"
681
+ }
682
+ }
683
+ }
684
+ },
685
+ "killListEntry": {
686
+ "type": "object",
687
+ "additionalProperties": false,
688
+ "required": [
689
+ "kind",
690
+ "selectorId",
691
+ "required"
692
+ ],
693
+ "properties": {
694
+ "kind": {
695
+ "enum": [
696
+ "path",
697
+ "relation",
698
+ "symbol"
699
+ ]
700
+ },
701
+ "selectorId": {
702
+ "type": "string"
703
+ },
704
+ "required": {
705
+ "type": "boolean"
706
+ }
707
+ }
708
+ },
709
+ "architectureTargetDelta": {
710
+ "type": "object",
711
+ "additionalProperties": false,
712
+ "required": [
713
+ "interventionId",
714
+ "trigger",
715
+ "thesis",
716
+ "targetState",
717
+ "migrationState",
718
+ "completionCriteria",
719
+ "falsifiers",
720
+ "benefitLedger",
721
+ "unresolvedTargets"
722
+ ],
723
+ "properties": {
724
+ "interventionId": {
725
+ "type": "string"
726
+ },
727
+ "trigger": {
728
+ "type": "array",
729
+ "items": {
730
+ "type": "string"
731
+ },
732
+ "minItems": 1
733
+ },
734
+ "thesis": {
735
+ "type": "string",
736
+ "minLength": 1,
737
+ "pattern": "\\S"
738
+ },
739
+ "targetState": {
740
+ "type": "object",
741
+ "additionalProperties": false,
742
+ "required": [
743
+ "owners",
744
+ "requiredRelations",
745
+ "removedConcepts"
746
+ ],
747
+ "properties": {
748
+ "owners": {
749
+ "type": "object",
750
+ "additionalProperties": {
751
+ "type": "string"
752
+ }
753
+ },
754
+ "requiredRelations": {
755
+ "type": "array",
756
+ "items": {
757
+ "type": "string"
758
+ }
759
+ },
760
+ "removedConcepts": {
761
+ "type": "array",
762
+ "items": {
763
+ "type": "string"
764
+ }
765
+ }
766
+ }
767
+ },
768
+ "migrationState": {
769
+ "type": "object",
770
+ "additionalProperties": false,
771
+ "required": [
772
+ "active",
773
+ "compatibilityContracts",
774
+ "temporaryRelations"
775
+ ],
776
+ "properties": {
777
+ "active": {
778
+ "type": "boolean"
779
+ },
780
+ "compatibilityContracts": {
781
+ "type": "array",
782
+ "items": {
783
+ "type": "string"
784
+ }
785
+ },
786
+ "cleanupBy": {
787
+ "type": "string"
788
+ },
789
+ "temporaryRelations": {
790
+ "type": "array",
791
+ "items": {
792
+ "type": "string"
793
+ }
794
+ }
795
+ }
796
+ },
797
+ "completionCriteria": {
798
+ "type": "array",
799
+ "minItems": 1,
800
+ "items": {
801
+ "$ref": "#/$defs/targetOutcome"
802
+ }
803
+ },
804
+ "falsifiers": {
805
+ "type": "array",
806
+ "items": {
807
+ "type": "string"
808
+ },
809
+ "minItems": 1
810
+ },
811
+ "benefitLedger": {
812
+ "type": "object",
813
+ "additionalProperties": false,
814
+ "required": [
815
+ "benefits",
816
+ "costs",
817
+ "rollbackPoint"
818
+ ],
819
+ "properties": {
820
+ "benefits": {
821
+ "type": "array",
822
+ "items": {
823
+ "type": "string"
824
+ }
825
+ },
826
+ "costs": {
827
+ "type": "array",
828
+ "items": {
829
+ "type": "string"
830
+ }
831
+ },
832
+ "rollbackPoint": {
833
+ "type": "string",
834
+ "minLength": 1,
835
+ "pattern": "\\S"
836
+ }
837
+ }
838
+ },
839
+ "unresolvedTargets": {
840
+ "type": "array",
841
+ "uniqueItems": true,
842
+ "items": {
843
+ "type": "string"
844
+ }
845
+ },
846
+ "extensions": {
847
+ "type": "object",
848
+ "additionalProperties": true
849
+ }
850
+ }
851
+ },
852
+ "recommendationAuthor": {
853
+ "type": "object",
854
+ "additionalProperties": false,
855
+ "required": [
856
+ "kind",
857
+ "id",
858
+ "source"
859
+ ],
860
+ "properties": {
861
+ "kind": {
862
+ "enum": [
863
+ "developer",
864
+ "daemon",
865
+ "hook",
866
+ "cli",
867
+ "mcp",
868
+ "subagent",
869
+ "migration",
870
+ "system"
871
+ ]
872
+ },
873
+ "id": {
874
+ "type": "string",
875
+ "minLength": 1,
876
+ "pattern": "\\S"
877
+ },
878
+ "source": {
879
+ "enum": [
880
+ "cli",
881
+ "mcp",
882
+ "manual",
883
+ "daemon",
884
+ "system",
885
+ "subagent"
886
+ ]
887
+ }
888
+ }
889
+ },
890
+ "practiceRecommendationPayload": {
891
+ "type": "object",
892
+ "additionalProperties": false,
893
+ "required": [
894
+ "practiceId",
895
+ "baselineDigest"
896
+ ],
897
+ "properties": {
898
+ "practiceId": {
899
+ "type": "string"
900
+ },
901
+ "baselineDigest": {
902
+ "type": [
903
+ "string",
904
+ "null"
905
+ ]
906
+ }
907
+ }
908
+ },
909
+ "structuralObservationPayload": {
910
+ "type": "object",
911
+ "additionalProperties": false,
912
+ "required": [
913
+ "assessmentDigest",
914
+ "kind",
915
+ "affectedNodeIds",
916
+ "baselineSnapshotDigest",
917
+ "derivedOutcomes",
918
+ "metrics",
919
+ "signalIds",
920
+ "evidence"
921
+ ],
922
+ "properties": {
923
+ "assessmentDigest": {
924
+ "$ref": "#/$defs/sha256"
925
+ },
926
+ "kind": {
927
+ "enum": [
928
+ "cycle",
929
+ "direction-violation",
930
+ "evidence-gap",
931
+ "ownership-ambiguous",
932
+ "undeclared-footprint",
933
+ "unowned-paths"
934
+ ]
935
+ },
936
+ "affectedNodeIds": {
937
+ "type": "array",
938
+ "items": {
939
+ "type": "string"
940
+ }
941
+ },
942
+ "baselineSnapshotDigest": {
943
+ "$ref": "#/$defs/sha256"
944
+ },
945
+ "derivedOutcomes": {
946
+ "type": "array",
947
+ "items": {
948
+ "$ref": "#/$defs/targetOutcome"
949
+ }
950
+ },
951
+ "metrics": {
952
+ "$ref": "#/$defs/observationMetrics"
953
+ },
954
+ "signalIds": {
955
+ "type": "array",
956
+ "uniqueItems": true,
957
+ "items": {
958
+ "type": "string"
959
+ }
960
+ },
961
+ "evidence": {
962
+ "$ref": "#/$defs/observationEvidence"
963
+ }
964
+ },
965
+ "allOf": [
966
+ {
967
+ "if": {
968
+ "properties": {
969
+ "kind": {
970
+ "const": "cycle"
971
+ }
972
+ }
973
+ },
974
+ "then": {
975
+ "properties": {
976
+ "evidence": {
977
+ "properties": {
978
+ "kind": {
979
+ "const": "cycle"
980
+ }
981
+ }
982
+ }
983
+ }
984
+ }
985
+ },
986
+ {
987
+ "if": {
988
+ "properties": {
989
+ "kind": {
990
+ "const": "direction-violation"
991
+ }
992
+ }
993
+ },
994
+ "then": {
995
+ "properties": {
996
+ "evidence": {
997
+ "properties": {
998
+ "kind": {
999
+ "const": "direction-violation"
1000
+ }
1001
+ }
1002
+ }
1003
+ }
1004
+ }
1005
+ },
1006
+ {
1007
+ "if": {
1008
+ "properties": {
1009
+ "kind": {
1010
+ "const": "evidence-gap"
1011
+ }
1012
+ }
1013
+ },
1014
+ "then": {
1015
+ "properties": {
1016
+ "evidence": {
1017
+ "properties": {
1018
+ "kind": {
1019
+ "const": "evidence-gap"
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ },
1026
+ {
1027
+ "if": {
1028
+ "properties": {
1029
+ "kind": {
1030
+ "const": "ownership-ambiguous"
1031
+ }
1032
+ }
1033
+ },
1034
+ "then": {
1035
+ "properties": {
1036
+ "evidence": {
1037
+ "properties": {
1038
+ "kind": {
1039
+ "const": "ownership-ambiguous"
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ },
1046
+ {
1047
+ "if": {
1048
+ "properties": {
1049
+ "kind": {
1050
+ "const": "undeclared-footprint"
1051
+ }
1052
+ }
1053
+ },
1054
+ "then": {
1055
+ "properties": {
1056
+ "evidence": {
1057
+ "properties": {
1058
+ "kind": {
1059
+ "const": "undeclared-footprint"
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ },
1066
+ {
1067
+ "if": {
1068
+ "properties": {
1069
+ "kind": {
1070
+ "const": "unowned-paths"
1071
+ }
1072
+ }
1073
+ },
1074
+ "then": {
1075
+ "properties": {
1076
+ "evidence": {
1077
+ "properties": {
1078
+ "kind": {
1079
+ "const": "unowned-paths"
1080
+ }
1081
+ }
1082
+ }
1083
+ }
1084
+ }
1085
+ }
1086
+ ]
1087
+ },
1088
+ "refactorProposalPayload": {
1089
+ "type": "object",
1090
+ "additionalProperties": false,
1091
+ "required": [
1092
+ "assessmentDigest",
1093
+ "proposalDigest",
1094
+ "scale",
1095
+ "affectedNodeIds",
1096
+ "majorChangeReasons",
1097
+ "baselineSnapshotDigest",
1098
+ "targetOutcomes",
1099
+ "killList"
1100
+ ],
1101
+ "properties": {
1102
+ "assessmentDigest": {
1103
+ "$ref": "#/$defs/sha256"
1104
+ },
1105
+ "proposalDigest": {
1106
+ "$ref": "#/$defs/sha256"
1107
+ },
1108
+ "scale": {
1109
+ "enum": [
1110
+ "architecture",
1111
+ "cross_module",
1112
+ "insufficient_evidence",
1113
+ "model_adoption_required",
1114
+ "module"
1115
+ ]
1116
+ },
1117
+ "affectedNodeIds": {
1118
+ "type": "array",
1119
+ "uniqueItems": true,
1120
+ "items": {
1121
+ "type": "string"
1122
+ }
1123
+ },
1124
+ "majorChangeReasons": {
1125
+ "type": "array",
1126
+ "uniqueItems": true,
1127
+ "items": {
1128
+ "enum": [
1129
+ "constraint-changed",
1130
+ "entrypoint-changed",
1131
+ "interface-changed",
1132
+ "lifecycle-changed",
1133
+ "node-added",
1134
+ "node-moved",
1135
+ "node-removed",
1136
+ "node-renamed",
1137
+ "ownership-changed",
1138
+ "relation-changed",
1139
+ "responsibility-changed",
1140
+ "risk-boundary-changed",
1141
+ "verified-flow-proof-changed"
1142
+ ]
1143
+ }
1144
+ },
1145
+ "baselineSnapshotDigest": {
1146
+ "$ref": "#/$defs/sha256"
1147
+ },
1148
+ "targetDelta": {
1149
+ "$ref": "#/$defs/architectureTargetDelta"
1150
+ },
1151
+ "targetOutcomes": {
1152
+ "type": "array",
1153
+ "items": {
1154
+ "$ref": "#/$defs/targetOutcome"
1155
+ }
1156
+ },
1157
+ "killList": {
1158
+ "type": "array",
1159
+ "items": {
1160
+ "$ref": "#/$defs/killListEntry"
1161
+ }
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+ }