archctx-contracts 0.17.1 → 0.18.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.
Files changed (112) hide show
  1. package/fixtures/valid/archctx-capabilities.json +2 -2
  2. package/fixtures/valid/product-version-manifest.json +4 -10
  3. package/package.json +4 -1
  4. package/schemas/repo/refactor-decision.schema.json +283 -37
  5. package/schemas/runtime/archctx-capabilities.schema.json +144 -20
  6. package/schemas/runtime/architecture-debt-delta.schema.json +58 -19
  7. package/schemas/runtime/architecture-debt.schema.json +42 -42
  8. package/schemas/runtime/architecture-event.schema.json +1 -1
  9. package/schemas/runtime/architecture-history.schema.json +354 -0
  10. package/schemas/runtime/capability-dependencies.schema.json +266 -59
  11. package/schemas/runtime/cli-check.schema.json +197 -0
  12. package/schemas/runtime/cli-help.schema.json +28 -0
  13. package/schemas/runtime/dependency-constraint-evaluation.schema.json +67 -68
  14. package/schemas/runtime/docs-anchors.schema.json +250 -67
  15. package/schemas/runtime/doctor-code-facts.schema.json +49 -0
  16. package/schemas/runtime/evidence-binding.schema.json +1 -1
  17. package/schemas/runtime/flow-selector-check.schema.json +179 -46
  18. package/schemas/runtime/hook-debt-checkpoint.schema.json +12 -12
  19. package/schemas/runtime/index-seed.schema.json +56 -0
  20. package/schemas/runtime/path-context.schema.json +108 -0
  21. package/schemas/runtime/product-version-manifest.schema.json +142 -54
  22. package/schemas/runtime/projection-slice.schema.json +34 -34
  23. package/schemas/runtime/recommendation-v3.schema.json +372 -1
  24. package/schemas/runtime/ref-impact-batch-request.schema.json +20 -7
  25. package/schemas/runtime/ref-impact-batch.schema.json +83 -13
  26. package/schemas/runtime/ref-impact.schema.json +68 -61
  27. package/schemas/runtime/refactor-scan-v2.schema.json +434 -0
  28. package/schemas/runtime/refactor-simulate.schema.json +505 -0
  29. package/schemas/runtime/refactor-verify-v2.schema.json +172 -0
  30. package/schemas/runtime/resolve-path.schema.json +69 -0
  31. package/schemas/runtime/runtime-recommendation-show.schema.json +531 -2
  32. package/schemas/runtime/runtime-refactor-scan.schema.json +498 -2
  33. package/schemas/runtime/runtime-verify.schema.json +274 -56
  34. package/schemas/runtime/state-machine-check.schema.json +357 -89
  35. package/schemas/runtime/structural-observation-payload.schema.json +372 -1
  36. package/schemas/runtime/sync-check.schema.json +65 -0
  37. package/src/architecture-debt.ts +125 -38
  38. package/src/architecture-history.ts +168 -42
  39. package/src/architecture.ts +100 -0
  40. package/src/cli-read.ts +228 -0
  41. package/src/docs-anchors.ts +105 -50
  42. package/src/explorer-occurrence-ports.ts +175 -0
  43. package/src/explorer-query-ports.ts +270 -0
  44. package/src/failure.ts +3 -0
  45. package/src/index-seed.ts +42 -0
  46. package/src/index.ts +5 -0
  47. package/src/ledger-records.ts +262 -0
  48. package/src/ledger.ts +27 -566
  49. package/src/ownership-dependencies.ts +115 -5
  50. package/src/ports.ts +6 -541
  51. package/src/product-version.ts +74 -55
  52. package/src/projection-apply-types.ts +216 -0
  53. package/src/projection-apply-validators.ts +355 -0
  54. package/src/projection-capabilities.ts +181 -0
  55. package/src/projection-constants.ts +317 -0
  56. package/src/projection-manifest-types.ts +298 -0
  57. package/src/projection-manifest.ts +12 -299
  58. package/src/projection-recovery-validators.ts +229 -0
  59. package/src/projection-request-validators.ts +326 -0
  60. package/src/projection-types.ts +365 -0
  61. package/src/projection-validation-helpers.ts +15 -0
  62. package/src/projection.ts +7 -1689
  63. package/src/ref-impact.ts +225 -33
  64. package/src/refactor-constants.ts +213 -0
  65. package/src/refactor-decision-validators.ts +350 -0
  66. package/src/refactor-evidence-types.ts +286 -0
  67. package/src/refactor-observation-validators.ts +359 -0
  68. package/src/refactor-resolution-validators.ts +229 -0
  69. package/src/refactor-snapshot-validators.ts +368 -0
  70. package/src/refactor-types.ts +270 -0
  71. package/src/refactor-v2.ts +389 -0
  72. package/src/refactor-validation-helpers.ts +195 -0
  73. package/src/refactor.ts +7 -1849
  74. package/src/review-guards.ts +3 -23
  75. package/src/runtime-verify.ts +87 -0
  76. package/src/schema-kit.ts +183 -0
  77. package/src/schema-registry.ts +73 -0
  78. package/src/schema.ts +0 -4
  79. package/src/state-machine-schemas.ts +192 -0
  80. package/src/state-machine-types.ts +188 -0
  81. package/src/state-machine.ts +9 -189
  82. package/fixtures/boundary/agent-job-expired.json +0 -33
  83. package/fixtures/invalid/adapter-fidelity-reverse-sync.json +0 -9
  84. package/fixtures/invalid/agent-job-direct-mutation.json +0 -32
  85. package/fixtures/invalid/cloud-egress-envelope-private-field.json +0 -12
  86. package/fixtures/invalid/investigation-report-direct-mutation.json +0 -38
  87. package/fixtures/invalid/investigation-report-missing-proposed-delta.json +0 -19
  88. package/fixtures/invalid/notification-event-code-field.json +0 -11
  89. package/fixtures/valid/adapter-fidelity.json +0 -9
  90. package/fixtures/valid/agent-job.json +0 -33
  91. package/fixtures/valid/architecture-candidate-delta-policy.json +0 -45
  92. package/fixtures/valid/architecture-candidate-delta.json +0 -188
  93. package/fixtures/valid/chatgpt-ga-tool.json +0 -9
  94. package/fixtures/valid/cloud-egress-envelope.json +0 -11
  95. package/fixtures/valid/entitlement.json +0 -12
  96. package/fixtures/valid/investigation-report.json +0 -38
  97. package/fixtures/valid/likec4-mapping.json +0 -14
  98. package/fixtures/valid/notification-event.json +0 -10
  99. package/fixtures/valid/notification-provider.json +0 -12
  100. package/fixtures/valid/structurizr-mapping.json +0 -15
  101. package/schemas/cloud/cloud-egress-envelope.schema.json +0 -19
  102. package/schemas/cloud/entitlement.schema.json +0 -24
  103. package/schemas/integrations/adapter-fidelity.schema.json +0 -21
  104. package/schemas/integrations/chatgpt-ga-tool.schema.json +0 -25
  105. package/schemas/integrations/likec4-mapping.schema.json +0 -32
  106. package/schemas/integrations/structurizr-mapping.schema.json +0 -33
  107. package/schemas/runtime/agent-job.schema.json +0 -63
  108. package/schemas/runtime/architecture-candidate-delta-policy.schema.json +0 -129
  109. package/schemas/runtime/architecture-candidate-delta.schema.json +0 -386
  110. package/schemas/runtime/investigation-report.schema.json +0 -119
  111. package/schemas/runtime/notification-event.schema.json +0 -18
  112. package/schemas/runtime/notification-provider.schema.json +0 -26
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archcontext.dev/schemas/runtime/resolve-path.schema.json",
4
+ "title": "ResolvePathsBatchResultV1",
5
+ "description": "Batch ownership resolution output for `archctx resolve --paths-from`.",
6
+ "additionalProperties": false,
7
+ "type": "object",
8
+ "required": [
9
+ "results"
10
+ ],
11
+ "properties": {
12
+ "results": {
13
+ "type": "array",
14
+ "items": {
15
+ "additionalProperties": false,
16
+ "type": "object",
17
+ "required": [
18
+ "path",
19
+ "matched",
20
+ "ambiguous",
21
+ "owningCapabilityId"
22
+ ],
23
+ "properties": {
24
+ "path": {
25
+ "minLength": 1,
26
+ "type": "string"
27
+ },
28
+ "matched": {
29
+ "type": "boolean"
30
+ },
31
+ "ambiguous": {
32
+ "type": "boolean"
33
+ },
34
+ "owningCapabilityId": {
35
+ "minLength": 1,
36
+ "type": [
37
+ "string",
38
+ "null"
39
+ ]
40
+ },
41
+ "stableId": {
42
+ "minLength": 1,
43
+ "type": "string"
44
+ },
45
+ "kind": {
46
+ "minLength": 1,
47
+ "type": "string"
48
+ },
49
+ "name": {
50
+ "type": "string"
51
+ },
52
+ "source": {
53
+ "type": "object"
54
+ },
55
+ "extensions": {
56
+ "type": "object"
57
+ },
58
+ "candidates": {
59
+ "type": "array",
60
+ "items": {
61
+ "minLength": 1,
62
+ "type": "string"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
@@ -176,6 +176,39 @@
176
176
  }
177
177
  ]
178
178
  },
179
+ "recording": {
180
+ "type": "object",
181
+ "additionalProperties": false,
182
+ "required": [
183
+ "recorded",
184
+ "recordable",
185
+ "reasonCode",
186
+ "measuredBytes",
187
+ "limitBytes"
188
+ ],
189
+ "properties": {
190
+ "recorded": {
191
+ "type": "boolean"
192
+ },
193
+ "recordable": {
194
+ "type": "boolean"
195
+ },
196
+ "reasonCode": {
197
+ "type": [
198
+ "string",
199
+ "null"
200
+ ]
201
+ },
202
+ "measuredBytes": {
203
+ "type": "integer",
204
+ "minimum": 0
205
+ },
206
+ "limitBytes": {
207
+ "type": "integer",
208
+ "minimum": 1
209
+ }
210
+ }
211
+ },
179
212
  "privacy": {
180
213
  "$ref": "#/$defs/privacy"
181
214
  }
@@ -595,6 +628,164 @@
595
628
  "type": "boolean"
596
629
  }
597
630
  }
631
+ },
632
+ {
633
+ "type": "object",
634
+ "additionalProperties": false,
635
+ "required": [
636
+ "kind",
637
+ "files",
638
+ "totalCount",
639
+ "truncated"
640
+ ],
641
+ "properties": {
642
+ "kind": {
643
+ "const": "low-cohesion-god-file"
644
+ },
645
+ "files": {
646
+ "type": "array",
647
+ "maxItems": 20,
648
+ "items": {
649
+ "$ref": "#/$defs/evidenceLowCohesionFile"
650
+ }
651
+ },
652
+ "totalCount": {
653
+ "type": "integer",
654
+ "minimum": 0
655
+ },
656
+ "truncated": {
657
+ "type": "boolean"
658
+ }
659
+ }
660
+ },
661
+ {
662
+ "type": "object",
663
+ "additionalProperties": false,
664
+ "required": [
665
+ "kind",
666
+ "declaredEntrypointPaths",
667
+ "edges",
668
+ "totalCount",
669
+ "truncated"
670
+ ],
671
+ "properties": {
672
+ "kind": {
673
+ "const": "entrypoint-bypass"
674
+ },
675
+ "declaredEntrypointPaths": {
676
+ "type": "array",
677
+ "uniqueItems": true,
678
+ "items": {
679
+ "$ref": "#/$defs/repoRelativePath"
680
+ }
681
+ },
682
+ "edges": {
683
+ "type": "array",
684
+ "maxItems": 20,
685
+ "items": {
686
+ "$ref": "#/$defs/evidenceImportEdge"
687
+ }
688
+ },
689
+ "totalCount": {
690
+ "type": "integer",
691
+ "minimum": 0
692
+ },
693
+ "truncated": {
694
+ "type": "boolean"
695
+ }
696
+ }
697
+ },
698
+ {
699
+ "type": "object",
700
+ "additionalProperties": false,
701
+ "required": [
702
+ "kind",
703
+ "sourceFanIn",
704
+ "sourceInstability",
705
+ "targets",
706
+ "totalCount",
707
+ "truncated"
708
+ ],
709
+ "properties": {
710
+ "kind": {
711
+ "const": "unstable-dependency"
712
+ },
713
+ "sourceFanIn": {
714
+ "type": "integer",
715
+ "minimum": 0
716
+ },
717
+ "sourceInstability": {
718
+ "type": "number",
719
+ "minimum": 0,
720
+ "maximum": 1
721
+ },
722
+ "targets": {
723
+ "type": "array",
724
+ "maxItems": 20,
725
+ "items": {
726
+ "$ref": "#/$defs/evidenceUnstableTarget"
727
+ }
728
+ },
729
+ "totalCount": {
730
+ "type": "integer",
731
+ "minimum": 0
732
+ },
733
+ "truncated": {
734
+ "type": "boolean"
735
+ }
736
+ }
737
+ },
738
+ {
739
+ "type": "object",
740
+ "additionalProperties": false,
741
+ "required": [
742
+ "kind",
743
+ "memberNodeIds",
744
+ "coverageStatus",
745
+ "windowLimit",
746
+ "observedCommitCount",
747
+ "pairs",
748
+ "totalCount",
749
+ "truncated"
750
+ ],
751
+ "properties": {
752
+ "kind": {
753
+ "const": "co-change-coupling"
754
+ },
755
+ "memberNodeIds": {
756
+ "$ref": "#/$defs/evidenceIdList"
757
+ },
758
+ "coverageStatus": {
759
+ "enum": [
760
+ "complete",
761
+ "shallow",
762
+ "insufficient-history",
763
+ "unavailable"
764
+ ]
765
+ },
766
+ "windowLimit": {
767
+ "type": "integer",
768
+ "minimum": 1
769
+ },
770
+ "observedCommitCount": {
771
+ "type": "integer",
772
+ "minimum": 0
773
+ },
774
+ "pairs": {
775
+ "type": "array",
776
+ "maxItems": 20,
777
+ "items": {
778
+ "$ref": "#/$defs/evidenceCoChangePair"
779
+ }
780
+ },
781
+ "totalCount": {
782
+ "type": "integer",
783
+ "minimum": 0
784
+ },
785
+ "truncated": {
786
+ "type": "boolean"
787
+ }
788
+ }
598
789
  }
599
790
  ]
600
791
  },
@@ -925,13 +1116,17 @@
925
1116
  },
926
1117
  "kind": {
927
1118
  "enum": [
1119
+ "co-change-coupling",
928
1120
  "cycle",
929
1121
  "direction-violation",
1122
+ "entrypoint-bypass",
930
1123
  "evidence-gap",
1124
+ "low-cohesion-god-file",
931
1125
  "ownership-ambiguous",
932
1126
  "residual-cycle",
933
1127
  "undeclared-footprint",
934
- "unowned-paths"
1128
+ "unowned-paths",
1129
+ "unstable-dependency"
935
1130
  ]
936
1131
  },
937
1132
  "affectedNodeIds": {
@@ -964,6 +1159,26 @@
964
1159
  }
965
1160
  },
966
1161
  "allOf": [
1162
+ {
1163
+ "if": {
1164
+ "properties": {
1165
+ "kind": {
1166
+ "const": "co-change-coupling"
1167
+ }
1168
+ }
1169
+ },
1170
+ "then": {
1171
+ "properties": {
1172
+ "evidence": {
1173
+ "properties": {
1174
+ "kind": {
1175
+ "const": "co-change-coupling"
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ }
1181
+ },
967
1182
  {
968
1183
  "if": {
969
1184
  "properties": {
@@ -1004,6 +1219,26 @@
1004
1219
  }
1005
1220
  }
1006
1221
  },
1222
+ {
1223
+ "if": {
1224
+ "properties": {
1225
+ "kind": {
1226
+ "const": "entrypoint-bypass"
1227
+ }
1228
+ }
1229
+ },
1230
+ "then": {
1231
+ "properties": {
1232
+ "evidence": {
1233
+ "properties": {
1234
+ "kind": {
1235
+ "const": "entrypoint-bypass"
1236
+ }
1237
+ }
1238
+ }
1239
+ }
1240
+ }
1241
+ },
1007
1242
  {
1008
1243
  "if": {
1009
1244
  "properties": {
@@ -1024,6 +1259,26 @@
1024
1259
  }
1025
1260
  }
1026
1261
  },
1262
+ {
1263
+ "if": {
1264
+ "properties": {
1265
+ "kind": {
1266
+ "const": "low-cohesion-god-file"
1267
+ }
1268
+ }
1269
+ },
1270
+ "then": {
1271
+ "properties": {
1272
+ "evidence": {
1273
+ "properties": {
1274
+ "kind": {
1275
+ "const": "low-cohesion-god-file"
1276
+ }
1277
+ }
1278
+ }
1279
+ }
1280
+ }
1281
+ },
1027
1282
  {
1028
1283
  "if": {
1029
1284
  "properties": {
@@ -1084,6 +1339,26 @@
1084
1339
  }
1085
1340
  }
1086
1341
  },
1342
+ {
1343
+ "if": {
1344
+ "properties": {
1345
+ "kind": {
1346
+ "const": "unstable-dependency"
1347
+ }
1348
+ }
1349
+ },
1350
+ "then": {
1351
+ "properties": {
1352
+ "evidence": {
1353
+ "properties": {
1354
+ "kind": {
1355
+ "const": "unstable-dependency"
1356
+ }
1357
+ }
1358
+ }
1359
+ }
1360
+ }
1361
+ },
1087
1362
  {
1088
1363
  "if": {
1089
1364
  "properties": {
@@ -1623,6 +1898,10 @@
1623
1898
  "items": {
1624
1899
  "type": "string"
1625
1900
  }
1901
+ },
1902
+ "entrypointBypassCount": {
1903
+ "type": "integer",
1904
+ "minimum": 0
1626
1905
  }
1627
1906
  }
1628
1907
  },
@@ -1690,6 +1969,10 @@
1690
1969
  "null"
1691
1970
  ],
1692
1971
  "minimum": 0
1972
+ },
1973
+ "unstableDependencyCount": {
1974
+ "type": "integer",
1975
+ "minimum": 0
1693
1976
  }
1694
1977
  }
1695
1978
  }
@@ -1768,6 +2051,24 @@
1768
2051
  "extensions": {
1769
2052
  "type": "object",
1770
2053
  "additionalProperties": true
2054
+ },
2055
+ "cohesion": {
2056
+ "type": "object",
2057
+ "additionalProperties": false,
2058
+ "required": [
2059
+ "lowCohesionFileCount",
2060
+ "measuredFileCount"
2061
+ ],
2062
+ "properties": {
2063
+ "lowCohesionFileCount": {
2064
+ "type": "integer",
2065
+ "minimum": 0
2066
+ },
2067
+ "measuredFileCount": {
2068
+ "type": "integer",
2069
+ "minimum": 0
2070
+ }
2071
+ }
1771
2072
  }
1772
2073
  },
1773
2074
  "if": {
@@ -1813,7 +2114,13 @@
1813
2114
  },
1814
2115
  "scope": {
1815
2116
  "$ref": "#/$defs/refactorScope",
1816
- "not": { "properties": { "kind": { "const": "repository" } } },
2117
+ "not": {
2118
+ "properties": {
2119
+ "kind": {
2120
+ "const": "repository"
2121
+ }
2122
+ }
2123
+ },
1817
2124
  "description": "Present for statistics measured over the requested files and their direct import neighbors."
1818
2125
  },
1819
2126
  "repository": {
@@ -2003,6 +2310,99 @@
2003
2310
  "extensions": {
2004
2311
  "type": "object",
2005
2312
  "additionalProperties": true
2313
+ },
2314
+ "coChangeDependencies": {
2315
+ "type": "array",
2316
+ "items": {
2317
+ "type": "object",
2318
+ "additionalProperties": false,
2319
+ "required": [
2320
+ "fromNodeId",
2321
+ "toNodeId",
2322
+ "pairCount",
2323
+ "maxCoChangeCount",
2324
+ "maxJaccard"
2325
+ ],
2326
+ "properties": {
2327
+ "fromNodeId": {
2328
+ "type": "string",
2329
+ "minLength": 1
2330
+ },
2331
+ "toNodeId": {
2332
+ "type": "string",
2333
+ "minLength": 1
2334
+ },
2335
+ "pairCount": {
2336
+ "type": "integer",
2337
+ "minimum": 1
2338
+ },
2339
+ "maxCoChangeCount": {
2340
+ "type": "integer",
2341
+ "minimum": 1
2342
+ },
2343
+ "maxJaccard": {
2344
+ "type": "number",
2345
+ "minimum": 0,
2346
+ "maximum": 1
2347
+ }
2348
+ }
2349
+ }
2350
+ },
2351
+ "gitHistory": {
2352
+ "type": "object",
2353
+ "additionalProperties": false,
2354
+ "required": [
2355
+ "anchorHeadSha",
2356
+ "windowLimit",
2357
+ "observedCommitCount",
2358
+ "eligibleCommitCount",
2359
+ "maxFilesPerCommit",
2360
+ "isShallow",
2361
+ "reachedHistoryRoot",
2362
+ "coverageStatus",
2363
+ "reasonCodes"
2364
+ ],
2365
+ "properties": {
2366
+ "anchorHeadSha": {
2367
+ "type": "string"
2368
+ },
2369
+ "windowLimit": {
2370
+ "type": "integer",
2371
+ "minimum": 1
2372
+ },
2373
+ "observedCommitCount": {
2374
+ "type": "integer",
2375
+ "minimum": 0
2376
+ },
2377
+ "eligibleCommitCount": {
2378
+ "type": "integer",
2379
+ "minimum": 0
2380
+ },
2381
+ "maxFilesPerCommit": {
2382
+ "type": "integer",
2383
+ "minimum": 1
2384
+ },
2385
+ "isShallow": {
2386
+ "type": "boolean"
2387
+ },
2388
+ "reachedHistoryRoot": {
2389
+ "type": "boolean"
2390
+ },
2391
+ "coverageStatus": {
2392
+ "enum": [
2393
+ "complete",
2394
+ "shallow",
2395
+ "insufficient-history",
2396
+ "unavailable"
2397
+ ]
2398
+ },
2399
+ "reasonCodes": {
2400
+ "type": "array",
2401
+ "items": {
2402
+ "type": "string"
2403
+ }
2404
+ }
2405
+ }
2006
2406
  }
2007
2407
  }
2008
2408
  },
@@ -2650,6 +3050,135 @@
2650
3050
  "const": false
2651
3051
  }
2652
3052
  }
3053
+ },
3054
+ "evidenceLowCohesionCluster": {
3055
+ "type": "object",
3056
+ "additionalProperties": false,
3057
+ "required": [
3058
+ "symbols",
3059
+ "startLine",
3060
+ "endLine",
3061
+ "intraClusterEdges",
3062
+ "crossClusterEdges"
3063
+ ],
3064
+ "properties": {
3065
+ "symbols": {
3066
+ "type": "array",
3067
+ "uniqueItems": true,
3068
+ "items": {
3069
+ "type": "string",
3070
+ "minLength": 1
3071
+ }
3072
+ },
3073
+ "startLine": {
3074
+ "type": "integer",
3075
+ "minimum": 1
3076
+ },
3077
+ "endLine": {
3078
+ "type": "integer",
3079
+ "minimum": 1
3080
+ },
3081
+ "intraClusterEdges": {
3082
+ "type": "integer",
3083
+ "minimum": 0
3084
+ },
3085
+ "crossClusterEdges": {
3086
+ "type": "integer",
3087
+ "minimum": 0
3088
+ }
3089
+ }
3090
+ },
3091
+ "evidenceLowCohesionFile": {
3092
+ "type": "object",
3093
+ "additionalProperties": false,
3094
+ "required": [
3095
+ "path",
3096
+ "lineCount",
3097
+ "topLevelSymbolCount",
3098
+ "clusterCount",
3099
+ "clusters"
3100
+ ],
3101
+ "properties": {
3102
+ "path": {
3103
+ "$ref": "#/$defs/repoRelativePath"
3104
+ },
3105
+ "lineCount": {
3106
+ "type": "integer",
3107
+ "minimum": 0
3108
+ },
3109
+ "topLevelSymbolCount": {
3110
+ "type": "integer",
3111
+ "minimum": 0
3112
+ },
3113
+ "clusterCount": {
3114
+ "type": "integer",
3115
+ "minimum": 0
3116
+ },
3117
+ "clusters": {
3118
+ "type": "array",
3119
+ "items": {
3120
+ "$ref": "#/$defs/evidenceLowCohesionCluster"
3121
+ }
3122
+ }
3123
+ }
3124
+ },
3125
+ "evidenceUnstableTarget": {
3126
+ "type": "object",
3127
+ "additionalProperties": false,
3128
+ "required": [
3129
+ "targetNodeId",
3130
+ "targetInstability",
3131
+ "delta",
3132
+ "edgeCount"
3133
+ ],
3134
+ "properties": {
3135
+ "targetNodeId": {
3136
+ "type": "string",
3137
+ "minLength": 1,
3138
+ "pattern": "\\S"
3139
+ },
3140
+ "targetInstability": {
3141
+ "type": "number",
3142
+ "minimum": 0,
3143
+ "maximum": 1
3144
+ },
3145
+ "delta": {
3146
+ "type": "number",
3147
+ "minimum": -1,
3148
+ "maximum": 1
3149
+ },
3150
+ "edgeCount": {
3151
+ "type": "integer",
3152
+ "minimum": 1
3153
+ }
3154
+ }
3155
+ },
3156
+ "evidenceCoChangePair": {
3157
+ "type": "object",
3158
+ "additionalProperties": false,
3159
+ "required": [
3160
+ "pathA",
3161
+ "pathB",
3162
+ "coChangeCount",
3163
+ "jaccard"
3164
+ ],
3165
+ "properties": {
3166
+ "pathA": {
3167
+ "$ref": "#/$defs/repoRelativePath"
3168
+ },
3169
+ "pathB": {
3170
+ "$ref": "#/$defs/repoRelativePath"
3171
+ },
3172
+ "coChangeCount": {
3173
+ "type": "integer",
3174
+ "minimum": 1
3175
+ },
3176
+ "jaccard": {
3177
+ "type": "number",
3178
+ "minimum": 0,
3179
+ "maximum": 1
3180
+ }
3181
+ }
2653
3182
  }
2654
3183
  },
2655
3184
  "allOf": [