@oddessentials/repo-standards 4.4.0 → 5.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.
- package/README.md +2 -1
- package/dist/config/standards.csharp-dotnet.azure-devops.json +377 -12
- package/dist/config/standards.csharp-dotnet.github-actions.json +378 -13
- package/dist/config/standards.csharp-dotnet.json +435 -13
- package/dist/config/standards.go.azure-devops.json +367 -10
- package/dist/config/standards.go.github-actions.json +368 -11
- package/dist/config/standards.go.json +425 -11
- package/dist/config/standards.json +1470 -81
- package/dist/config/standards.python.azure-devops.json +383 -10
- package/dist/config/standards.python.github-actions.json +384 -11
- package/dist/config/standards.python.json +441 -11
- package/dist/config/standards.rust.azure-devops.json +370 -10
- package/dist/config/standards.rust.github-actions.json +371 -11
- package/dist/config/standards.rust.json +428 -11
- package/dist/config/standards.schema.json +24 -2
- package/dist/config/standards.typescript-js.azure-devops.json +387 -11
- package/dist/config/standards.typescript-js.github-actions.json +388 -12
- package/dist/config/standards.typescript-js.json +445 -12
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/check-version-unchanged.sh +50 -0
- package/scripts/validate-schema.ts +46 -0
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"checklist": {
|
|
3
3
|
"core": [
|
|
4
|
+
{
|
|
5
|
+
"ciHints": {
|
|
6
|
+
"azure-devops": {
|
|
7
|
+
"notes": "Run CRLF detection early in pipeline before other checks.",
|
|
8
|
+
"stage": "quality"
|
|
9
|
+
},
|
|
10
|
+
"github-actions": {
|
|
11
|
+
"job": "ci",
|
|
12
|
+
"notes": "Add .gitattributes check as first step in CI job."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"description": "Enforce line endings at the Git layer using .gitattributes. Mark text files with appropriate EOL handling (eol=lf for shell scripts, eol=auto for most files) and binary files as binary to prevent corruption. This prevents 'works locally, fails in CI' issues caused by CRLF/LF mismatches.",
|
|
16
|
+
"id": "gitattributes-eol",
|
|
17
|
+
"label": "Git Attributes (Line Endings)",
|
|
18
|
+
"stack": {
|
|
19
|
+
"exampleConfigFiles": [
|
|
20
|
+
".gitattributes",
|
|
21
|
+
".editorconfig"
|
|
22
|
+
],
|
|
23
|
+
"exampleTools": [
|
|
24
|
+
"git"
|
|
25
|
+
],
|
|
26
|
+
"machineCheck": {
|
|
27
|
+
"command": "git ls-files --eol | grep -E 'w/crlf.*\\.sh$' && exit 1 || exit 0",
|
|
28
|
+
"description": "Verify no CRLF in shell scripts",
|
|
29
|
+
"expectExitCode": 0
|
|
30
|
+
},
|
|
31
|
+
"notes": "Go files should use LF for consistency. Mark *.go as text. Shell scripts (*.sh) must use eol=lf. Binary artifacts should be marked as binary.",
|
|
32
|
+
"optionalFiles": [
|
|
33
|
+
".editorconfig"
|
|
34
|
+
],
|
|
35
|
+
"requiredFiles": [
|
|
36
|
+
".gitattributes"
|
|
37
|
+
],
|
|
38
|
+
"verification": "Run 'git ls-files --eol' to verify EOL handling."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"ciHints": {
|
|
43
|
+
"azure-devops": {
|
|
44
|
+
"notes": "Run CRLF detection as the first quality check before linting or testing.",
|
|
45
|
+
"stage": "quality"
|
|
46
|
+
},
|
|
47
|
+
"github-actions": {
|
|
48
|
+
"job": "ci",
|
|
49
|
+
"notes": "Add CRLF detection step before main CI steps."
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"description": "Fail CI early for Linux-executed files containing CRLF line endings. Shell scripts, Python files, and other interpreted files fail silently or with cryptic errors when they contain \\r characters. Detect this before running deeper CI steps.",
|
|
53
|
+
"id": "crlf-detection",
|
|
54
|
+
"label": "CRLF Detection in CI",
|
|
55
|
+
"stack": {
|
|
56
|
+
"exampleConfigFiles": [],
|
|
57
|
+
"exampleTools": [
|
|
58
|
+
"file",
|
|
59
|
+
"grep"
|
|
60
|
+
],
|
|
61
|
+
"machineCheck": {
|
|
62
|
+
"command": "git ls-files --eol | grep -E 'w/crlf.*\\.(sh|bash)$' && exit 1 || exit 0",
|
|
63
|
+
"description": "Detect CRLF in shell scripts",
|
|
64
|
+
"expectExitCode": 0
|
|
65
|
+
},
|
|
66
|
+
"notes": "Go source files tolerate CRLF but shell scripts and Makefiles do not. Check .sh, Makefile, and go.mod for CRLF.",
|
|
67
|
+
"verification": "Run CRLF detection on shell scripts and Makefiles."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
4
70
|
{
|
|
5
71
|
"ciHints": {
|
|
6
72
|
"azure-devops": {
|
|
@@ -159,6 +225,37 @@
|
|
|
159
225
|
"verification": "Check that git tags follow vMAJOR.MINOR.PATCH format and goreleaser or similar tooling generates releases and changelogs."
|
|
160
226
|
}
|
|
161
227
|
},
|
|
228
|
+
{
|
|
229
|
+
"ciHints": {
|
|
230
|
+
"azure-devops": {
|
|
231
|
+
"notes": "Run the version guard in PR validation jobs before merge.",
|
|
232
|
+
"stage": "quality"
|
|
233
|
+
},
|
|
234
|
+
"github-actions": {
|
|
235
|
+
"job": "ci",
|
|
236
|
+
"notes": "Run the version guard in PR workflows against the base ref."
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"description": "If semantic-release or automated versioning is enabled, block manual edits to canonical version fields in pull requests. Enforce a CI guard (and optional pre-push hook) that fails when version lines change outside the release workflow.",
|
|
240
|
+
"id": "version-guard",
|
|
241
|
+
"label": "Version Guard (Automated Releases)",
|
|
242
|
+
"stack": {
|
|
243
|
+
"exampleConfigFiles": [
|
|
244
|
+
"scripts/check-version-unchanged.sh",
|
|
245
|
+
".github/workflows/ci.yml",
|
|
246
|
+
"azure-pipelines.yml"
|
|
247
|
+
],
|
|
248
|
+
"exampleTools": [
|
|
249
|
+
"goreleaser",
|
|
250
|
+
"git"
|
|
251
|
+
],
|
|
252
|
+
"notes": "Go versioning is tag-driven; only enable the guard if you keep a VERSION file or embed version constants in code. The guard should ensure those fields are not edited manually in PRs.",
|
|
253
|
+
"optionalFiles": [
|
|
254
|
+
"VERSION"
|
|
255
|
+
],
|
|
256
|
+
"verification": "Run the guard and confirm it fails when VERSION or version constants change outside release automation."
|
|
257
|
+
}
|
|
258
|
+
},
|
|
162
259
|
{
|
|
163
260
|
"ciHints": {
|
|
164
261
|
"azure-devops": {
|
|
@@ -191,6 +288,32 @@
|
|
|
191
288
|
"verification": "Trigger the release pipeline and confirm all artifacts share the same version number and tag."
|
|
192
289
|
}
|
|
193
290
|
},
|
|
291
|
+
{
|
|
292
|
+
"ciHints": {
|
|
293
|
+
"azure-devops": {
|
|
294
|
+
"notes": "Set HUSKY=0 or equivalent in release pipeline to disable hooks.",
|
|
295
|
+
"stage": "release"
|
|
296
|
+
},
|
|
297
|
+
"github-actions": {
|
|
298
|
+
"job": "release",
|
|
299
|
+
"notes": "Set HUSKY=0 or equivalent in release job to disable hooks."
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"description": "Release automation must bypass local developer hooks (HUSKY=0, --no-verify) and rely solely on CI gates for validation. This ensures idempotent, reproducible releases that don't fail due to hook environment differences.",
|
|
303
|
+
"id": "release-hook-bypass",
|
|
304
|
+
"label": "Release Hook Bypass",
|
|
305
|
+
"stack": {
|
|
306
|
+
"exampleConfigFiles": [
|
|
307
|
+
".goreleaser.yml",
|
|
308
|
+
".github/workflows/release.yml"
|
|
309
|
+
],
|
|
310
|
+
"exampleTools": [
|
|
311
|
+
"goreleaser"
|
|
312
|
+
],
|
|
313
|
+
"notes": "Goreleaser handles releases without invoking local hooks. Ensure any git operations use --no-verify.",
|
|
314
|
+
"verification": "Check release workflow for hook bypass configuration."
|
|
315
|
+
}
|
|
316
|
+
},
|
|
194
317
|
{
|
|
195
318
|
"ciHints": {
|
|
196
319
|
"azure-devops": {
|
|
@@ -316,13 +439,15 @@
|
|
|
316
439
|
{
|
|
317
440
|
"ciHints": {
|
|
318
441
|
"azure-devops": {
|
|
442
|
+
"notes": "Hooks and CI must invoke identical verification commands. Use npm run verify or equivalent.",
|
|
319
443
|
"stage": "quality"
|
|
320
444
|
},
|
|
321
445
|
"github-actions": {
|
|
322
|
-
"job": "ci"
|
|
446
|
+
"job": "ci",
|
|
447
|
+
"notes": "Hooks and CI must invoke identical verification commands. Use npm run verify or equivalent."
|
|
323
448
|
}
|
|
324
449
|
},
|
|
325
|
-
"description": "Use git hooks to run linting, formatting,
|
|
450
|
+
"description": "Use git hooks to run linting, formatting, and commit linting before changes are committed. Hooks should CHECK by default (not auto-fix), be fast, and scope to changed files only. Use a single entry hook mechanism (e.g., Husky as entry point calling pre-commit or lint-staged).",
|
|
326
451
|
"id": "pre-commit-hooks",
|
|
327
452
|
"label": "Pre-Commit Hooks",
|
|
328
453
|
"stack": {
|
|
@@ -334,8 +459,62 @@
|
|
|
334
459
|
"pre-commit",
|
|
335
460
|
"lefthook"
|
|
336
461
|
],
|
|
337
|
-
"notes": "Use pre-commit with go hooks for gofmt
|
|
338
|
-
"verification": "
|
|
462
|
+
"notes": "Use pre-commit or lefthook with go hooks for 'gofmt -d' (check mode) and golangci-lint. Pin Go version in go.mod and .go-version for determinism.",
|
|
463
|
+
"verification": "Confirm hooks run format checks (not auto-fix) and golangci-lint before commits."
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"ciHints": {
|
|
468
|
+
"azure-devops": {
|
|
469
|
+
"notes": "CI should call the same verify script that hooks use locally.",
|
|
470
|
+
"stage": "quality"
|
|
471
|
+
},
|
|
472
|
+
"github-actions": {
|
|
473
|
+
"job": "ci",
|
|
474
|
+
"notes": "CI should call the same verify script that hooks use locally."
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"description": "Local hooks and CI must invoke identical verification commands to prevent 'works locally, fails in CI' issues. Use a single canonical verify entrypoint (e.g., npm run verify) that both hooks and CI call.",
|
|
478
|
+
"id": "hook-ci-parity",
|
|
479
|
+
"label": "Hook/CI Parity",
|
|
480
|
+
"stack": {
|
|
481
|
+
"exampleConfigFiles": [
|
|
482
|
+
"Makefile",
|
|
483
|
+
"magefile.go"
|
|
484
|
+
],
|
|
485
|
+
"exampleTools": [
|
|
486
|
+
"make",
|
|
487
|
+
"mage"
|
|
488
|
+
],
|
|
489
|
+
"notes": "Define a verify target (make verify) that runs go vet, golangci-lint, and go test. Both hooks and CI should use this target.",
|
|
490
|
+
"verification": "Compare hook commands with CI commands and confirm they invoke the same make targets."
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"ciHints": {
|
|
495
|
+
"azure-devops": {
|
|
496
|
+
"notes": "Also run secret scanning in CI as a safety net for commits that bypassed hooks.",
|
|
497
|
+
"stage": "quality"
|
|
498
|
+
},
|
|
499
|
+
"github-actions": {
|
|
500
|
+
"job": "ci",
|
|
501
|
+
"notes": "Enable GitHub secret scanning and also run gitleaks in CI."
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"description": "Scan staged diffs for credentials, API keys, and secrets before they reach the remote repository. Catch secrets at commit time rather than after they're pushed.",
|
|
505
|
+
"id": "secret-scanning-precommit",
|
|
506
|
+
"label": "Pre-commit Secret Scanning",
|
|
507
|
+
"stack": {
|
|
508
|
+
"exampleConfigFiles": [
|
|
509
|
+
".gitleaks.toml",
|
|
510
|
+
".pre-commit-config.yaml"
|
|
511
|
+
],
|
|
512
|
+
"exampleTools": [
|
|
513
|
+
"gitleaks",
|
|
514
|
+
"trufflehog"
|
|
515
|
+
],
|
|
516
|
+
"notes": "Add gitleaks to pre-commit hooks. Scan staged changes only for speed.",
|
|
517
|
+
"verification": "Run 'gitleaks protect --staged' and verify it catches test secrets."
|
|
339
518
|
}
|
|
340
519
|
},
|
|
341
520
|
{
|
|
@@ -582,6 +761,83 @@
|
|
|
582
761
|
],
|
|
583
762
|
"verification": "LICENSE file is present; CODE_OF_CONDUCT.md and CONTRIBUTING.md provide contribution guidance."
|
|
584
763
|
}
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"ciHints": {
|
|
767
|
+
"azure-devops": {
|
|
768
|
+
"notes": "CI should call the canonical verify command, not duplicate check logic.",
|
|
769
|
+
"stage": "quality"
|
|
770
|
+
},
|
|
771
|
+
"github-actions": {
|
|
772
|
+
"job": "ci",
|
|
773
|
+
"notes": "CI should call the canonical verify command, not duplicate check logic."
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"description": "Provide one canonical 'verify' command per repository/stack that all stages call with appropriate flags. This prevents duplication, drift, and ensures consistency between local development and CI.",
|
|
777
|
+
"id": "canonical-verify",
|
|
778
|
+
"label": "Canonical Verify Entrypoint",
|
|
779
|
+
"stack": {
|
|
780
|
+
"exampleConfigFiles": [
|
|
781
|
+
"Makefile",
|
|
782
|
+
"magefile.go"
|
|
783
|
+
],
|
|
784
|
+
"exampleTools": [
|
|
785
|
+
"make",
|
|
786
|
+
"mage"
|
|
787
|
+
],
|
|
788
|
+
"notes": "Define 'make verify' that runs go vet, golangci-lint, and go test. All stages use this single entrypoint.",
|
|
789
|
+
"verification": "Makefile contains a 'verify' target."
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"ciHints": {
|
|
794
|
+
"azure-devops": {
|
|
795
|
+
"notes": "Ensure CI reads from authoritative configs, not duplicated settings.",
|
|
796
|
+
"stage": "quality"
|
|
797
|
+
},
|
|
798
|
+
"github-actions": {
|
|
799
|
+
"job": "ci",
|
|
800
|
+
"notes": "Ensure CI reads from authoritative configs, not duplicated settings."
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"description": "Each configuration rule must live in exactly one authoritative config file. Avoid duplication across .editorconfig, linter configs, and CI definitions. Document which file is authoritative for each concern.",
|
|
804
|
+
"id": "config-authority",
|
|
805
|
+
"label": "Config File Authority Rules",
|
|
806
|
+
"stack": {
|
|
807
|
+
"exampleConfigFiles": [
|
|
808
|
+
".gitattributes",
|
|
809
|
+
"go.mod",
|
|
810
|
+
".golangci.yml"
|
|
811
|
+
],
|
|
812
|
+
"exampleTools": [],
|
|
813
|
+
"notes": "Authority mapping: .gitattributes for EOL, go.mod for module config and Go version, .golangci.yml for all linting rules. Keep lint config consolidated in one file.",
|
|
814
|
+
"verification": "Review configs and confirm .golangci.yml is the single source for lint rules."
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"ciHints": {
|
|
819
|
+
"azure-devops": {
|
|
820
|
+
"notes": "CI should read skip paths from config files, not hardcode them in pipeline.",
|
|
821
|
+
"stage": "quality"
|
|
822
|
+
},
|
|
823
|
+
"github-actions": {
|
|
824
|
+
"job": "ci",
|
|
825
|
+
"notes": "CI should read skip paths from config files, not hardcode them in pipeline."
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
"description": "Encode path exclusions and skip rules deterministically in config files, not through ad-hoc human judgment. Make it clear which paths are excluded from checks and why.",
|
|
829
|
+
"id": "explicit-skip-paths",
|
|
830
|
+
"label": "Explicit Skip Paths",
|
|
831
|
+
"stack": {
|
|
832
|
+
"exampleConfigFiles": [
|
|
833
|
+
".golangci.yml"
|
|
834
|
+
],
|
|
835
|
+
"exampleTools": [
|
|
836
|
+
"golangci-lint"
|
|
837
|
+
],
|
|
838
|
+
"notes": "Define skip-dirs and skip-files in .golangci.yml. Use //nolint comments sparingly and always include justification (//nolint:errcheck // reason).",
|
|
839
|
+
"verification": "Review .golangci.yml and confirm skip paths are explicit and documented."
|
|
840
|
+
}
|
|
585
841
|
}
|
|
586
842
|
],
|
|
587
843
|
"optionalEnhancements": [
|
|
@@ -807,6 +1063,137 @@
|
|
|
807
1063
|
"verification": "For web-facing Go apps, run accessibility audits against key routes using axe or pa11y."
|
|
808
1064
|
}
|
|
809
1065
|
},
|
|
1066
|
+
{
|
|
1067
|
+
"ciHints": {
|
|
1068
|
+
"azure-devops": {
|
|
1069
|
+
"notes": "Run AI drift detection in a scheduled nightly pipeline separate from main CI.",
|
|
1070
|
+
"stage": "nightly"
|
|
1071
|
+
},
|
|
1072
|
+
"github-actions": {
|
|
1073
|
+
"job": "nightly",
|
|
1074
|
+
"notes": "Use scheduled workflow (cron) to run AI drift detection nightly."
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
"description": "Run nightly or scheduled checks comparing AI-generated outputs against pinned baselines to detect model drift, prompt drift, or code changes affecting AI behavior. Attribute regressions to code changes vs model updates vs prompt changes.",
|
|
1078
|
+
"id": "ai-drift-detection",
|
|
1079
|
+
"label": "AI Drift Detection",
|
|
1080
|
+
"stack": {
|
|
1081
|
+
"exampleConfigFiles": [
|
|
1082
|
+
"testdata/golden/",
|
|
1083
|
+
"ai-baselines/"
|
|
1084
|
+
],
|
|
1085
|
+
"exampleTools": [
|
|
1086
|
+
"go test",
|
|
1087
|
+
"golden files"
|
|
1088
|
+
],
|
|
1089
|
+
"notes": "Use golden file testing pattern for AI outputs. Compare current output against pinned baselines nightly.",
|
|
1090
|
+
"verification": "Run golden tests and confirm AI outputs match baselines."
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"ciHints": {
|
|
1095
|
+
"azure-devops": {
|
|
1096
|
+
"notes": "Run schema validation tests as part of quality gates.",
|
|
1097
|
+
"stage": "quality"
|
|
1098
|
+
},
|
|
1099
|
+
"github-actions": {
|
|
1100
|
+
"job": "ci",
|
|
1101
|
+
"notes": "Include AI output schema validation in CI test suite."
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
"description": "Validate all AI-generated outputs against strict JSON schemas or type definitions at system boundaries. Reject invalid outputs early rather than letting malformed data propagate through the system.",
|
|
1105
|
+
"id": "ai-schema-enforcement",
|
|
1106
|
+
"label": "AI Output Schema Enforcement",
|
|
1107
|
+
"stack": {
|
|
1108
|
+
"exampleConfigFiles": [
|
|
1109
|
+
"schemas/"
|
|
1110
|
+
],
|
|
1111
|
+
"exampleTools": [
|
|
1112
|
+
"go-playground/validator",
|
|
1113
|
+
"gojsonschema"
|
|
1114
|
+
],
|
|
1115
|
+
"notes": "Define struct tags for JSON unmarshaling and use validator for additional constraints. Reject AI outputs that don't match expected schema.",
|
|
1116
|
+
"verification": "Review AI integration code and confirm schema validation is in place."
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"ciHints": {
|
|
1121
|
+
"azure-devops": {
|
|
1122
|
+
"notes": "Run AI golden tests as part of the test stage.",
|
|
1123
|
+
"stage": "test"
|
|
1124
|
+
},
|
|
1125
|
+
"github-actions": {
|
|
1126
|
+
"job": "ci",
|
|
1127
|
+
"notes": "Include AI golden contract tests in CI test suite."
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
"description": "Validate AI tool-generated patches, configs, and code against exact expected formats. Test that AI outputs respect forbidden paths, file patterns, and format constraints through golden contract tests.",
|
|
1131
|
+
"id": "ai-golden-tests",
|
|
1132
|
+
"label": "AI Golden Contract Tests",
|
|
1133
|
+
"stack": {
|
|
1134
|
+
"exampleConfigFiles": [
|
|
1135
|
+
"testdata/"
|
|
1136
|
+
],
|
|
1137
|
+
"exampleTools": [
|
|
1138
|
+
"go test",
|
|
1139
|
+
"golden files"
|
|
1140
|
+
],
|
|
1141
|
+
"notes": "Use golden file pattern for AI output testing. Verify generated code follows Go conventions and doesn't modify vendor/ or other protected paths.",
|
|
1142
|
+
"verification": "Run golden tests and confirm AI outputs match expected files."
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"ciHints": {
|
|
1147
|
+
"azure-devops": {
|
|
1148
|
+
"notes": "Run AI safety tests as part of security stage on main branch.",
|
|
1149
|
+
"stage": "security"
|
|
1150
|
+
},
|
|
1151
|
+
"github-actions": {
|
|
1152
|
+
"job": "security",
|
|
1153
|
+
"notes": "Run AI safety checks on main branch merges."
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
"description": "Test AI integrations for prompt injection resistance, input sanitization, output filtering, and data exfiltration prevention. Include adversarial test cases that attempt to manipulate AI behavior.",
|
|
1157
|
+
"id": "ai-safety-checks",
|
|
1158
|
+
"label": "AI Adversarial & Safety Testing",
|
|
1159
|
+
"stack": {
|
|
1160
|
+
"exampleConfigFiles": [
|
|
1161
|
+
"ai_safety_test.go"
|
|
1162
|
+
],
|
|
1163
|
+
"exampleTools": [
|
|
1164
|
+
"go test",
|
|
1165
|
+
"go-fuzz"
|
|
1166
|
+
],
|
|
1167
|
+
"notes": "Create adversarial test cases for AI integrations. Use fuzzing to discover input handling edge cases.",
|
|
1168
|
+
"verification": "Run AI safety tests and fuzz tests."
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"ciHints": {
|
|
1173
|
+
"azure-devops": {
|
|
1174
|
+
"notes": "Verify AI provenance logging is implemented in quality checks.",
|
|
1175
|
+
"stage": "quality"
|
|
1176
|
+
},
|
|
1177
|
+
"github-actions": {
|
|
1178
|
+
"job": "ci",
|
|
1179
|
+
"notes": "Check AI provenance logging implementation in CI."
|
|
1180
|
+
}
|
|
1181
|
+
},
|
|
1182
|
+
"description": "Log AI provider, model version, prompt template version, parameters, and tool versions for all AI operations. Enable attribution of outputs to specific model+prompt combinations for debugging and compliance.",
|
|
1183
|
+
"id": "ai-provenance-tracking",
|
|
1184
|
+
"label": "AI Provenance & Audit Logging",
|
|
1185
|
+
"stack": {
|
|
1186
|
+
"exampleConfigFiles": [
|
|
1187
|
+
"ai/provenance.go"
|
|
1188
|
+
],
|
|
1189
|
+
"exampleTools": [
|
|
1190
|
+
"slog",
|
|
1191
|
+
"OpenTelemetry"
|
|
1192
|
+
],
|
|
1193
|
+
"notes": "Use structured logging (slog) to capture AI provenance. Include model, prompt version, and parameters in log context.",
|
|
1194
|
+
"verification": "Review AI integration and confirm provenance logging is implemented."
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
810
1197
|
{
|
|
811
1198
|
"ciHints": {
|
|
812
1199
|
"azure-devops": {
|
|
@@ -888,27 +1275,41 @@
|
|
|
888
1275
|
},
|
|
889
1276
|
"migrationGuide": [
|
|
890
1277
|
{
|
|
891
|
-
"description": "
|
|
1278
|
+
"description": "Configure .gitattributes for cross-platform line ending correctness and establish the canonical verify entrypoint before adding any checks. This prevents 'works locally, fails in CI' issues from day one.",
|
|
1279
|
+
"focusIds": [
|
|
1280
|
+
"gitattributes-eol",
|
|
1281
|
+
"canonical-verify",
|
|
1282
|
+
"hook-ci-parity",
|
|
1283
|
+
"config-authority"
|
|
1284
|
+
],
|
|
1285
|
+
"notes": "Start here to avoid debugging cryptic CRLF failures later. Use .gitattributes as the authority for EOL (not .editorconfig). Run 'git add --renormalize .' after adding .gitattributes to fix existing files.",
|
|
1286
|
+
"step": 0,
|
|
1287
|
+
"title": "Foundation: Line Endings and Hook Entry Point"
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"description": "Add pre-commit hooks with secret scanning, formatting, and linting. Hooks should CHECK (not auto-fix) and scope to changed files only for speed.",
|
|
892
1291
|
"focusIds": [
|
|
893
1292
|
"pre-commit-hooks",
|
|
1293
|
+
"secret-scanning-precommit",
|
|
894
1294
|
"linting",
|
|
895
1295
|
"code-formatter"
|
|
896
1296
|
],
|
|
897
|
-
"notes": "Keep hooks fast
|
|
1297
|
+
"notes": "Keep hooks fast by scoping to staged files. Use Husky as entry point calling lint-staged or pre-commit. Hooks should check, not fix, to keep developers aware of issues.",
|
|
898
1298
|
"step": 1,
|
|
899
1299
|
"title": "Establish Local Safety Nets First"
|
|
900
1300
|
},
|
|
901
1301
|
{
|
|
902
|
-
"description": "Introduce CI quality gates that mirror local
|
|
1302
|
+
"description": "Introduce CI quality gates that mirror local hooks exactly. Add CRLF detection early in pipeline. Treat existing violations as warnings where possible.",
|
|
903
1303
|
"focusIds": [
|
|
1304
|
+
"crlf-detection",
|
|
904
1305
|
"ci-quality-gates",
|
|
905
1306
|
"linting",
|
|
906
1307
|
"code-formatter",
|
|
907
1308
|
"commit-linting"
|
|
908
1309
|
],
|
|
909
|
-
"notes": "Use diff-based tools
|
|
1310
|
+
"notes": "CI must call the same verify scripts that hooks use. Add CRLF detection before other checks to fail fast on line ending issues. Use diff-based tools so only new violations break builds.",
|
|
910
1311
|
"step": 2,
|
|
911
|
-
"title": "Mirror Local Checks in CI
|
|
1312
|
+
"title": "Mirror Local Checks in CI with CRLF Detection"
|
|
912
1313
|
},
|
|
913
1314
|
{
|
|
914
1315
|
"description": "Enable type-checking, coverage thresholds, and dependency/vulnerability scanning with gradual enforcement.",
|
|
@@ -933,9 +1334,22 @@
|
|
|
933
1334
|
"complexity-analysis",
|
|
934
1335
|
"accessibility-auditing"
|
|
935
1336
|
],
|
|
936
|
-
"notes": "Tackle recommended items in order of business value; backend-only repos can skip web-focused checks like accessibility.
|
|
1337
|
+
"notes": "Tackle recommended items in order of business value; backend-only repos can skip web-focused checks like accessibility.",
|
|
937
1338
|
"step": 4,
|
|
938
1339
|
"title": "Layer in Docs, Governance, and Recommended Checks"
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"description": "For repos using or building with generative AI, add drift detection, schema enforcement, golden contract tests, safety testing, and provenance tracking.",
|
|
1343
|
+
"focusIds": [
|
|
1344
|
+
"ai-drift-detection",
|
|
1345
|
+
"ai-schema-enforcement",
|
|
1346
|
+
"ai-golden-tests",
|
|
1347
|
+
"ai-safety-checks",
|
|
1348
|
+
"ai-provenance-tracking"
|
|
1349
|
+
],
|
|
1350
|
+
"notes": "Skip this step if your repo has no AI/ML components. For AI-heavy repos: add nightly drift detection to catch model changes, enforce strict schemas at AI output boundaries, and log provenance for debugging 'why did AI do X?'",
|
|
1351
|
+
"step": 5,
|
|
1352
|
+
"title": "AI/ML Governance (If Applicable)"
|
|
939
1353
|
}
|
|
940
1354
|
],
|
|
941
1355
|
"qualityGatePolicy": {
|
|
@@ -945,5 +1359,5 @@
|
|
|
945
1359
|
},
|
|
946
1360
|
"stack": "go",
|
|
947
1361
|
"stackLabel": "Go",
|
|
948
|
-
"version":
|
|
1362
|
+
"version": 5
|
|
949
1363
|
}
|