@oddessentials/repo-standards 2.0.1 → 2.1.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,497 @@
1
+ {
2
+ "$defs": {
3
+ "BazelExecutorConfig": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "advisoryNotice": {
7
+ "type": "string"
8
+ },
9
+ "ciContract": {
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "configFlag": {
13
+ "type": "string"
14
+ },
15
+ "deterministicFlags": {
16
+ "items": {
17
+ "type": "string"
18
+ },
19
+ "type": "array"
20
+ },
21
+ "remoteCache": {
22
+ "type": "string"
23
+ },
24
+ "versionPinning": {
25
+ "type": "string"
26
+ }
27
+ },
28
+ "type": "object"
29
+ },
30
+ "detectionRules": {
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "notes": {
34
+ "type": "string"
35
+ },
36
+ "optionalMarkers": {
37
+ "items": {
38
+ "type": "string"
39
+ },
40
+ "type": "array"
41
+ },
42
+ "rootMarkers": {
43
+ "description": "Files at repo root that trigger Bazel detection.",
44
+ "items": {
45
+ "type": "string"
46
+ },
47
+ "type": "array"
48
+ }
49
+ },
50
+ "type": "object"
51
+ },
52
+ "optOut": {
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "configPath": {
56
+ "type": "string"
57
+ },
58
+ "description": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "type": "object"
63
+ },
64
+ "targetConventions": {
65
+ "additionalProperties": {
66
+ "type": "string"
67
+ },
68
+ "type": "object"
69
+ }
70
+ },
71
+ "type": "object"
72
+ },
73
+ "BazelHints": {
74
+ "additionalProperties": false,
75
+ "properties": {
76
+ "commands": {
77
+ "items": {
78
+ "type": "string"
79
+ },
80
+ "type": "array"
81
+ },
82
+ "notes": {
83
+ "type": "string"
84
+ },
85
+ "recommendedTargets": {
86
+ "items": {
87
+ "type": "string"
88
+ },
89
+ "type": "array"
90
+ }
91
+ },
92
+ "type": "object"
93
+ },
94
+ "Checklist": {
95
+ "additionalProperties": false,
96
+ "properties": {
97
+ "core": {
98
+ "items": {
99
+ "$ref": "#/$defs/ChecklistItem"
100
+ },
101
+ "type": "array"
102
+ },
103
+ "optionalEnhancements": {
104
+ "items": {
105
+ "$ref": "#/$defs/ChecklistItem"
106
+ },
107
+ "type": "array"
108
+ },
109
+ "recommended": {
110
+ "items": {
111
+ "$ref": "#/$defs/ChecklistItem"
112
+ },
113
+ "type": "array"
114
+ }
115
+ },
116
+ "required": [
117
+ "core",
118
+ "recommended",
119
+ "optionalEnhancements"
120
+ ],
121
+ "type": "object"
122
+ },
123
+ "ChecklistItem": {
124
+ "additionalProperties": false,
125
+ "properties": {
126
+ "appliesTo": {
127
+ "additionalProperties": false,
128
+ "properties": {
129
+ "ciSystems": {
130
+ "items": {
131
+ "$ref": "#/$defs/CiSystem"
132
+ },
133
+ "type": "array"
134
+ },
135
+ "stacks": {
136
+ "items": {
137
+ "$ref": "#/$defs/StackId"
138
+ },
139
+ "minItems": 1,
140
+ "type": "array"
141
+ }
142
+ },
143
+ "required": [
144
+ "stacks"
145
+ ],
146
+ "type": "object"
147
+ },
148
+ "ciHints": {
149
+ "additionalProperties": false,
150
+ "properties": {
151
+ "azure-devops": {
152
+ "$ref": "#/$defs/CiHint"
153
+ },
154
+ "github-actions": {
155
+ "$ref": "#/$defs/CiHint"
156
+ }
157
+ },
158
+ "type": "object"
159
+ },
160
+ "description": {
161
+ "type": "string"
162
+ },
163
+ "enforcement": {
164
+ "$ref": "#/$defs/Enforcement",
165
+ "description": "Enforcement level. Defaults: core=required, recommended=recommended, optionalEnhancements=optional."
166
+ },
167
+ "id": {
168
+ "description": "Unique identifier for the checklist item.",
169
+ "pattern": "^[a-z][a-z0-9-]*$",
170
+ "type": "string"
171
+ },
172
+ "label": {
173
+ "type": "string"
174
+ },
175
+ "severity": {
176
+ "$ref": "#/$defs/Severity",
177
+ "description": "Violation severity. Defaults: core=error, recommended=warn, optionalEnhancements=info."
178
+ },
179
+ "stackHints": {
180
+ "additionalProperties": false,
181
+ "properties": {
182
+ "csharp-dotnet": {
183
+ "$ref": "#/$defs/StackHints"
184
+ },
185
+ "go": {
186
+ "$ref": "#/$defs/StackHints"
187
+ },
188
+ "python": {
189
+ "$ref": "#/$defs/StackHints"
190
+ },
191
+ "rust": {
192
+ "$ref": "#/$defs/StackHints"
193
+ },
194
+ "typescript-js": {
195
+ "$ref": "#/$defs/StackHints"
196
+ }
197
+ },
198
+ "type": "object"
199
+ }
200
+ },
201
+ "required": [
202
+ "id",
203
+ "label",
204
+ "description",
205
+ "appliesTo"
206
+ ],
207
+ "type": "object"
208
+ },
209
+ "CiHint": {
210
+ "additionalProperties": false,
211
+ "properties": {
212
+ "job": {
213
+ "type": "string"
214
+ },
215
+ "notes": {
216
+ "type": "string"
217
+ },
218
+ "stage": {
219
+ "type": "string"
220
+ }
221
+ },
222
+ "type": "object"
223
+ },
224
+ "CiSystem": {
225
+ "description": "Supported CI system identifier.",
226
+ "enum": [
227
+ "azure-devops",
228
+ "github-actions"
229
+ ],
230
+ "type": "string"
231
+ },
232
+ "Enforcement": {
233
+ "description": "Enforcement level for a checklist item.",
234
+ "enum": [
235
+ "required",
236
+ "recommended",
237
+ "optional"
238
+ ],
239
+ "type": "string"
240
+ },
241
+ "ExecutorHints": {
242
+ "additionalProperties": false,
243
+ "description": "Advisory execution substrate hints. Bazel is the first supported executor; future monorepo executors may follow the same pattern.",
244
+ "properties": {
245
+ "bazel": {
246
+ "$ref": "#/$defs/BazelExecutorConfig",
247
+ "description": "Bazel executor configuration (first supported instance)."
248
+ },
249
+ "description": {
250
+ "description": "Container-level description of the executor hints system.",
251
+ "type": "string"
252
+ }
253
+ },
254
+ "type": "object"
255
+ },
256
+ "Meta": {
257
+ "additionalProperties": false,
258
+ "properties": {
259
+ "complexityChecks": {
260
+ "additionalProperties": false,
261
+ "properties": {
262
+ "description": {
263
+ "type": "string"
264
+ },
265
+ "enabledByDefault": {
266
+ "type": "boolean"
267
+ }
268
+ },
269
+ "type": "object"
270
+ },
271
+ "coverageThresholdDescription": {
272
+ "description": "Human-readable explanation of coverage threshold semantics.",
273
+ "type": "string"
274
+ },
275
+ "coverageThresholdUnit": {
276
+ "const": "ratio",
277
+ "description": "Documents that coverage threshold is a ratio (0-1), not a percentage (0-100).",
278
+ "type": "string"
279
+ },
280
+ "defaultCoverageThreshold": {
281
+ "description": "Default code coverage threshold expressed as a ratio (0-1). E.g., 0.8 = 80%.",
282
+ "maximum": 1,
283
+ "minimum": 0,
284
+ "type": "number"
285
+ },
286
+ "executorHints": {
287
+ "$ref": "#/$defs/ExecutorHints"
288
+ },
289
+ "migrationGuide": {
290
+ "items": {
291
+ "$ref": "#/$defs/MigrationStep"
292
+ },
293
+ "type": "array"
294
+ },
295
+ "qualityGatePolicy": {
296
+ "additionalProperties": false,
297
+ "properties": {
298
+ "description": {
299
+ "type": "string"
300
+ },
301
+ "preferSoftFailOnLegacy": {
302
+ "type": "boolean"
303
+ }
304
+ },
305
+ "type": "object"
306
+ }
307
+ },
308
+ "type": "object"
309
+ },
310
+ "MigrationStep": {
311
+ "additionalProperties": false,
312
+ "properties": {
313
+ "description": {
314
+ "type": "string"
315
+ },
316
+ "focusIds": {
317
+ "description": "References to checklist item IDs. Validated separately for existence.",
318
+ "items": {
319
+ "type": "string"
320
+ },
321
+ "type": "array"
322
+ },
323
+ "notes": {
324
+ "type": "string"
325
+ },
326
+ "step": {
327
+ "minimum": 1,
328
+ "type": "integer"
329
+ },
330
+ "title": {
331
+ "type": "string"
332
+ }
333
+ },
334
+ "required": [
335
+ "step",
336
+ "title",
337
+ "description"
338
+ ],
339
+ "type": "object"
340
+ },
341
+ "Severity": {
342
+ "description": "Severity level for violations.",
343
+ "enum": [
344
+ "error",
345
+ "warn",
346
+ "info"
347
+ ],
348
+ "type": "string"
349
+ },
350
+ "StackHints": {
351
+ "additionalProperties": false,
352
+ "properties": {
353
+ "anyOfFiles": {
354
+ "description": "At least ONE of the listed files must exist for compliance.",
355
+ "items": {
356
+ "type": "string"
357
+ },
358
+ "type": "array"
359
+ },
360
+ "bazelHints": {
361
+ "$ref": "#/$defs/BazelHints"
362
+ },
363
+ "exampleConfigFiles": {
364
+ "items": {
365
+ "type": "string"
366
+ },
367
+ "type": "array"
368
+ },
369
+ "exampleTools": {
370
+ "items": {
371
+ "type": "string"
372
+ },
373
+ "type": "array"
374
+ },
375
+ "machineCheck": {
376
+ "additionalProperties": false,
377
+ "properties": {
378
+ "command": {
379
+ "type": "string"
380
+ },
381
+ "description": {
382
+ "type": "string"
383
+ },
384
+ "expectExitCode": {
385
+ "type": "integer"
386
+ }
387
+ },
388
+ "type": "object"
389
+ },
390
+ "notes": {
391
+ "type": "string"
392
+ },
393
+ "optionalFiles": {
394
+ "description": "Informational only; presence is not required.",
395
+ "items": {
396
+ "type": "string"
397
+ },
398
+ "type": "array"
399
+ },
400
+ "pinningNotes": {
401
+ "type": "string"
402
+ },
403
+ "requiredFiles": {
404
+ "description": "All listed files MUST exist for compliance.",
405
+ "items": {
406
+ "type": "string"
407
+ },
408
+ "type": "array"
409
+ },
410
+ "requiredScripts": {
411
+ "items": {
412
+ "type": "string"
413
+ },
414
+ "type": "array"
415
+ },
416
+ "verification": {
417
+ "type": "string"
418
+ }
419
+ },
420
+ "type": "object"
421
+ },
422
+ "StackId": {
423
+ "description": "Supported stack identifier.",
424
+ "enum": [
425
+ "typescript-js",
426
+ "csharp-dotnet",
427
+ "python",
428
+ "rust",
429
+ "go"
430
+ ],
431
+ "type": "string"
432
+ },
433
+ "StackMeta": {
434
+ "additionalProperties": false,
435
+ "properties": {
436
+ "label": {
437
+ "type": "string"
438
+ },
439
+ "languageFamily": {
440
+ "type": "string"
441
+ }
442
+ },
443
+ "required": [
444
+ "label",
445
+ "languageFamily"
446
+ ],
447
+ "type": "object"
448
+ }
449
+ },
450
+ "$id": "https://oddessentials.com/schemas/repo-standards/v3/standards.schema.json",
451
+ "$schema": "http://json-schema.org/draft-07/schema#",
452
+ "additionalProperties": false,
453
+ "description": "Schema for repo-standards master configuration (v3+). Enforces strict validation with additionalProperties: false.",
454
+ "properties": {
455
+ "checklist": {
456
+ "$ref": "#/$defs/Checklist"
457
+ },
458
+ "ciSystems": {
459
+ "description": "Supported CI systems for this configuration.",
460
+ "items": {
461
+ "$ref": "#/$defs/CiSystem"
462
+ },
463
+ "minItems": 1,
464
+ "type": "array",
465
+ "uniqueItems": true
466
+ },
467
+ "meta": {
468
+ "$ref": "#/$defs/Meta"
469
+ },
470
+ "stacks": {
471
+ "additionalProperties": false,
472
+ "description": "Stack definitions with labels and language families.",
473
+ "patternProperties": {
474
+ "^(typescript-js|csharp-dotnet|python|rust|go)$": {
475
+ "$ref": "#/$defs/StackMeta"
476
+ }
477
+ },
478
+ "propertyNames": {
479
+ "$ref": "#/$defs/StackId"
480
+ },
481
+ "type": "object"
482
+ },
483
+ "version": {
484
+ "description": "Schema version. Must be 3+ for strict validation with additionalProperties: false.",
485
+ "minimum": 3,
486
+ "type": "integer"
487
+ }
488
+ },
489
+ "required": [
490
+ "version",
491
+ "ciSystems",
492
+ "stacks",
493
+ "checklist"
494
+ ],
495
+ "title": "Repository Standards Configuration",
496
+ "type": "object"
497
+ }
@@ -594,48 +594,52 @@
594
594
  "azure-devops"
595
595
  ],
596
596
  "meta": {
597
- "bazelIntegration": {
598
- "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
599
- "ciContract": {
600
- "configFlag": "--config=ci (define in .bazelrc)",
601
- "deterministicFlags": [
602
- "--nokeep_going",
603
- "--test_output=errors"
604
- ],
605
- "remoteCache": "Optional; not required for CI",
606
- "versionPinning": "Use .bazelversion file for Bazelisk"
607
- },
608
- "description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
609
- "detectionRules": {
610
- "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
611
- "optionalMarkers": [
612
- ".bazelrc",
613
- ".bazelversion"
614
- ],
615
- "rootMarkers": [
616
- "MODULE.bazel",
617
- "WORKSPACE.bazel",
618
- "WORKSPACE"
619
- ]
620
- },
621
- "optOut": {
622
- "configPath": "meta.bazelIntegration.enabled",
623
- "description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
624
- },
625
- "targetConventions": {
626
- "build": "bazel build //...",
627
- "coverage": "bazel coverage //...",
628
- "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
629
- "format": "bazel run //tools/format:check",
630
- "lint": "//tools/lint:lint or bazel test //... with lint aspects",
631
- "test": "bazel test //..."
632
- }
633
- },
634
597
  "complexityChecks": {
635
598
  "description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
636
599
  "enabledByDefault": true
637
600
  },
601
+ "coverageThresholdDescription": "Expressed as a ratio (0-1), e.g., 0.8 = 80% coverage. Must be between 0 and 1.",
602
+ "coverageThresholdUnit": "ratio",
638
603
  "defaultCoverageThreshold": 0.8,
604
+ "executorHints": {
605
+ "bazel": {
606
+ "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
607
+ "ciContract": {
608
+ "configFlag": "--config=ci (define in .bazelrc)",
609
+ "deterministicFlags": [
610
+ "--nokeep_going",
611
+ "--test_output=errors"
612
+ ],
613
+ "remoteCache": "Optional; not required for CI",
614
+ "versionPinning": "Use .bazelversion file for Bazelisk"
615
+ },
616
+ "detectionRules": {
617
+ "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
618
+ "optionalMarkers": [
619
+ ".bazelrc",
620
+ ".bazelversion"
621
+ ],
622
+ "rootMarkers": [
623
+ "MODULE.bazel",
624
+ "WORKSPACE.bazel",
625
+ "WORKSPACE"
626
+ ]
627
+ },
628
+ "optOut": {
629
+ "configPath": "meta.executorHints.bazel.enabled",
630
+ "description": "Set meta.executorHints.bazel.enabled = false in repo config to disable Bazel hints"
631
+ },
632
+ "targetConventions": {
633
+ "build": "bazel build //...",
634
+ "coverage": "bazel coverage //...",
635
+ "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
636
+ "format": "bazel run //tools/format:check",
637
+ "lint": "//tools/lint:lint or bazel test //... with lint aspects",
638
+ "test": "bazel test //..."
639
+ }
640
+ },
641
+ "description": "Advisory execution substrate hints. Bazel is the first supported executor; future monorepo executors may follow the same pattern."
642
+ },
639
643
  "migrationGuide": [
640
644
  {
641
645
  "description": "Start by adding pre-commit hooks and core formatting/linting so developers get fast feedback without touching CI.",
@@ -695,5 +699,5 @@
695
699
  },
696
700
  "stack": "typescript-js",
697
701
  "stackLabel": "TypeScript / JavaScript",
698
- "version": 2
702
+ "version": 3
699
703
  }
@@ -594,48 +594,52 @@
594
594
  "github-actions"
595
595
  ],
596
596
  "meta": {
597
- "bazelIntegration": {
598
- "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
599
- "ciContract": {
600
- "configFlag": "--config=ci (define in .bazelrc)",
601
- "deterministicFlags": [
602
- "--nokeep_going",
603
- "--test_output=errors"
604
- ],
605
- "remoteCache": "Optional; not required for CI",
606
- "versionPinning": "Use .bazelversion file for Bazelisk"
607
- },
608
- "description": "Bazel build executor support for quality checks. All hints are ADVISORY—stack-native commands remain the default execution path.",
609
- "detectionRules": {
610
- "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
611
- "optionalMarkers": [
612
- ".bazelrc",
613
- ".bazelversion"
614
- ],
615
- "rootMarkers": [
616
- "MODULE.bazel",
617
- "WORKSPACE.bazel",
618
- "WORKSPACE"
619
- ]
620
- },
621
- "optOut": {
622
- "configPath": "meta.bazelIntegration.enabled",
623
- "description": "Set meta.bazelIntegration.enabled = false in repo config to disable Bazel hints"
624
- },
625
- "targetConventions": {
626
- "build": "bazel build //...",
627
- "coverage": "bazel coverage //...",
628
- "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
629
- "format": "bazel run //tools/format:check",
630
- "lint": "//tools/lint:lint or bazel test //... with lint aspects",
631
- "test": "bazel test //..."
632
- }
633
- },
634
597
  "complexityChecks": {
635
598
  "description": "When supported by the stack, run cyclomatic complexity or similar metrics in CI as a warning-only check initially.",
636
599
  "enabledByDefault": true
637
600
  },
601
+ "coverageThresholdDescription": "Expressed as a ratio (0-1), e.g., 0.8 = 80% coverage. Must be between 0 and 1.",
602
+ "coverageThresholdUnit": "ratio",
638
603
  "defaultCoverageThreshold": 0.8,
604
+ "executorHints": {
605
+ "bazel": {
606
+ "advisoryNotice": "bazelHints are suggestions, not required execution paths. Consumers should prefer stack-native commands unless explicitly adopting Bazel.",
607
+ "ciContract": {
608
+ "configFlag": "--config=ci (define in .bazelrc)",
609
+ "deterministicFlags": [
610
+ "--nokeep_going",
611
+ "--test_output=errors"
612
+ ],
613
+ "remoteCache": "Optional; not required for CI",
614
+ "versionPinning": "Use .bazelversion file for Bazelisk"
615
+ },
616
+ "detectionRules": {
617
+ "notes": "Detection uses repo-root markers only. Nested BUILD files do not trigger Bazel mode.",
618
+ "optionalMarkers": [
619
+ ".bazelrc",
620
+ ".bazelversion"
621
+ ],
622
+ "rootMarkers": [
623
+ "MODULE.bazel",
624
+ "WORKSPACE.bazel",
625
+ "WORKSPACE"
626
+ ]
627
+ },
628
+ "optOut": {
629
+ "configPath": "meta.executorHints.bazel.enabled",
630
+ "description": "Set meta.executorHints.bazel.enabled = false in repo config to disable Bazel hints"
631
+ },
632
+ "targetConventions": {
633
+ "build": "bazel build //...",
634
+ "coverage": "bazel coverage //...",
635
+ "description": "Recommended target naming (not assumed to exist). These are illustrative patterns; actual targets are repo-defined.",
636
+ "format": "bazel run //tools/format:check",
637
+ "lint": "//tools/lint:lint or bazel test //... with lint aspects",
638
+ "test": "bazel test //..."
639
+ }
640
+ },
641
+ "description": "Advisory execution substrate hints. Bazel is the first supported executor; future monorepo executors may follow the same pattern."
642
+ },
639
643
  "migrationGuide": [
640
644
  {
641
645
  "description": "Start by adding pre-commit hooks and core formatting/linting so developers get fast feedback without touching CI.",
@@ -695,5 +699,5 @@
695
699
  },
696
700
  "stack": "typescript-js",
697
701
  "stackLabel": "TypeScript / JavaScript",
698
- "version": 2
702
+ "version": 3
699
703
  }