pruneguard 0.3.0 → 0.4.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,350 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "SuggestRulesReport",
4
+ "description": "Suggested governance rules report.",
5
+ "type": "object",
6
+ "required": [
7
+ "suggestedRules"
8
+ ],
9
+ "properties": {
10
+ "governanceActions": {
11
+ "description": "Recommended governance actions ordered by priority.",
12
+ "type": "array",
13
+ "items": {
14
+ "$ref": "#/definitions/GovernanceAction"
15
+ }
16
+ },
17
+ "hotspots": {
18
+ "description": "Hotspot files with high edge traffic.",
19
+ "type": "array",
20
+ "items": {
21
+ "$ref": "#/definitions/Hotspot"
22
+ }
23
+ },
24
+ "ownershipHints": {
25
+ "description": "Ownership hints from cross-boundary analysis.",
26
+ "type": "array",
27
+ "items": {
28
+ "$ref": "#/definitions/OwnershipHint"
29
+ }
30
+ },
31
+ "rationale": {
32
+ "description": "Rationale explaining the suggestions.",
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "suggestedRules": {
39
+ "description": "Suggested rules inferred from graph analysis.",
40
+ "type": "array",
41
+ "items": {
42
+ "$ref": "#/definitions/SuggestedRule"
43
+ }
44
+ },
45
+ "tags": {
46
+ "description": "Suggested tags for directory grouping.",
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/definitions/SuggestedTag"
50
+ }
51
+ }
52
+ },
53
+ "definitions": {
54
+ "EffortLevel": {
55
+ "description": "Estimated effort level.",
56
+ "type": "string",
57
+ "enum": [
58
+ "low",
59
+ "medium",
60
+ "high"
61
+ ]
62
+ },
63
+ "FindingConfidence": {
64
+ "type": "string",
65
+ "enum": [
66
+ "high",
67
+ "medium",
68
+ "low"
69
+ ]
70
+ },
71
+ "GovernanceAction": {
72
+ "description": "A recommended governance action with priority ordering.",
73
+ "type": "object",
74
+ "required": [
75
+ "description",
76
+ "effort",
77
+ "impact",
78
+ "kind",
79
+ "priority"
80
+ ],
81
+ "properties": {
82
+ "configFragment": {
83
+ "description": "Concrete configuration fragment or steps."
84
+ },
85
+ "description": {
86
+ "description": "Human-readable description of what to do.",
87
+ "type": "string"
88
+ },
89
+ "effort": {
90
+ "description": "Estimated effort level.",
91
+ "allOf": [
92
+ {
93
+ "$ref": "#/definitions/EffortLevel"
94
+ }
95
+ ]
96
+ },
97
+ "impact": {
98
+ "description": "Expected impact on governance coverage.",
99
+ "allOf": [
100
+ {
101
+ "$ref": "#/definitions/ImpactLevel"
102
+ }
103
+ ]
104
+ },
105
+ "kind": {
106
+ "description": "Kind of governance action.",
107
+ "allOf": [
108
+ {
109
+ "$ref": "#/definitions/GovernanceActionKind"
110
+ }
111
+ ]
112
+ },
113
+ "priority": {
114
+ "description": "Priority rank (1 = most impactful).",
115
+ "type": "integer",
116
+ "format": "uint",
117
+ "minimum": 0.0
118
+ }
119
+ }
120
+ },
121
+ "GovernanceActionKind": {
122
+ "description": "Kind of governance action.",
123
+ "type": "string",
124
+ "enum": [
125
+ "add-boundary-rule",
126
+ "assign-ownership",
127
+ "introduce-tags",
128
+ "split-hotspot",
129
+ "add-reachability-fence",
130
+ "enforce-layering"
131
+ ]
132
+ },
133
+ "Hotspot": {
134
+ "description": "A hotspot file with high edge traffic.",
135
+ "type": "object",
136
+ "required": [
137
+ "crossOwnerImports",
138
+ "crossPackageImports",
139
+ "file",
140
+ "incomingEdges",
141
+ "outgoingEdges",
142
+ "rank",
143
+ "suggestion"
144
+ ],
145
+ "properties": {
146
+ "crossOwnerImports": {
147
+ "description": "Cross-owner import count.",
148
+ "type": "integer",
149
+ "format": "uint",
150
+ "minimum": 0.0
151
+ },
152
+ "crossPackageImports": {
153
+ "description": "Cross-package import count.",
154
+ "type": "integer",
155
+ "format": "uint",
156
+ "minimum": 0.0
157
+ },
158
+ "file": {
159
+ "description": "File path.",
160
+ "type": "string"
161
+ },
162
+ "incomingEdges": {
163
+ "description": "Incoming edge count.",
164
+ "type": "integer",
165
+ "format": "uint",
166
+ "minimum": 0.0
167
+ },
168
+ "outgoingEdges": {
169
+ "description": "Outgoing edge count.",
170
+ "type": "integer",
171
+ "format": "uint",
172
+ "minimum": 0.0
173
+ },
174
+ "package": {
175
+ "description": "Package containing this file, if any.",
176
+ "type": [
177
+ "string",
178
+ "null"
179
+ ]
180
+ },
181
+ "rank": {
182
+ "description": "Hotspot rank (1 = highest traffic).",
183
+ "type": "integer",
184
+ "format": "uint",
185
+ "minimum": 0.0
186
+ },
187
+ "suggestion": {
188
+ "description": "Suggestion for addressing this hotspot.",
189
+ "type": "string"
190
+ },
191
+ "teamsInvolved": {
192
+ "description": "Distinct teams that touch this file via imports (source or target).",
193
+ "type": "array",
194
+ "items": {
195
+ "type": "string"
196
+ }
197
+ },
198
+ "workspace": {
199
+ "description": "Workspace containing this file, if any.",
200
+ "type": [
201
+ "string",
202
+ "null"
203
+ ]
204
+ }
205
+ }
206
+ },
207
+ "ImpactLevel": {
208
+ "description": "Expected impact level.",
209
+ "type": "string",
210
+ "enum": [
211
+ "low",
212
+ "medium",
213
+ "high"
214
+ ]
215
+ },
216
+ "OwnershipHint": {
217
+ "description": "Ownership assignment hint.",
218
+ "type": "object",
219
+ "required": [
220
+ "crossTeamEdges",
221
+ "pathGlob",
222
+ "rationale",
223
+ "suggestedOwner"
224
+ ],
225
+ "properties": {
226
+ "crossTeamEdges": {
227
+ "description": "Number of cross-team edges.",
228
+ "type": "integer",
229
+ "format": "uint",
230
+ "minimum": 0.0
231
+ },
232
+ "pathGlob": {
233
+ "description": "Path glob to match.",
234
+ "type": "string"
235
+ },
236
+ "rationale": {
237
+ "description": "Rationale for the suggestion.",
238
+ "type": "string"
239
+ },
240
+ "suggestedOwner": {
241
+ "description": "Suggested owner identifier.",
242
+ "type": "string"
243
+ },
244
+ "touchedPackages": {
245
+ "description": "Packages touched by cross-team edges from this area.",
246
+ "type": "array",
247
+ "items": {
248
+ "type": "string"
249
+ }
250
+ }
251
+ }
252
+ },
253
+ "SuggestedRule": {
254
+ "description": "A single suggested rule.",
255
+ "type": "object",
256
+ "required": [
257
+ "confidence",
258
+ "configFragment",
259
+ "description",
260
+ "kind",
261
+ "name"
262
+ ],
263
+ "properties": {
264
+ "confidence": {
265
+ "description": "Confidence in the suggestion.",
266
+ "allOf": [
267
+ {
268
+ "$ref": "#/definitions/FindingConfidence"
269
+ }
270
+ ]
271
+ },
272
+ "configFragment": {
273
+ "description": "Configuration fragment that implements this rule."
274
+ },
275
+ "description": {
276
+ "description": "Human-readable description.",
277
+ "type": "string"
278
+ },
279
+ "evidence": {
280
+ "description": "Evidence supporting the suggestion.",
281
+ "type": "array",
282
+ "items": {
283
+ "type": "string"
284
+ }
285
+ },
286
+ "kind": {
287
+ "description": "Kind of rule suggestion.",
288
+ "allOf": [
289
+ {
290
+ "$ref": "#/definitions/SuggestedRuleKind"
291
+ }
292
+ ]
293
+ },
294
+ "name": {
295
+ "description": "Rule name.",
296
+ "type": "string"
297
+ },
298
+ "rationale": {
299
+ "description": "Rationale explaining why this specific rule was suggested.",
300
+ "type": [
301
+ "string",
302
+ "null"
303
+ ]
304
+ }
305
+ }
306
+ },
307
+ "SuggestedRuleKind": {
308
+ "description": "Kind of suggested rule.",
309
+ "type": "string",
310
+ "enum": [
311
+ "forbidden",
312
+ "required",
313
+ "tag-assignment",
314
+ "ownership-boundary",
315
+ "reachability-fence",
316
+ "layer-enforcement"
317
+ ]
318
+ },
319
+ "SuggestedTag": {
320
+ "description": "A suggested tag for directory grouping.",
321
+ "type": "object",
322
+ "required": [
323
+ "glob",
324
+ "name",
325
+ "rationale"
326
+ ],
327
+ "properties": {
328
+ "glob": {
329
+ "description": "Glob pattern for the tag.",
330
+ "type": "string"
331
+ },
332
+ "name": {
333
+ "description": "Tag name.",
334
+ "type": "string"
335
+ },
336
+ "rationale": {
337
+ "description": "Why this tag is suggested.",
338
+ "type": "string"
339
+ },
340
+ "source": {
341
+ "description": "Source of the tag inference (e.g. \"directory-cluster\", \"workspace\", \"package\", \"ownership\").",
342
+ "type": [
343
+ "string",
344
+ "null"
345
+ ]
346
+ }
347
+ }
348
+ }
349
+ }
350
+ }