@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.*\\.py$' && exit 1 || exit 0",
|
|
28
|
+
"description": "Verify no CRLF in Python files",
|
|
29
|
+
"expectExitCode": 0
|
|
30
|
+
},
|
|
31
|
+
"notes": "Python files should use LF endings for cross-platform compatibility. Mark *.py as eol=lf in .gitattributes. Shebang scripts fail with CRLF.",
|
|
32
|
+
"optionalFiles": [
|
|
33
|
+
".editorconfig"
|
|
34
|
+
],
|
|
35
|
+
"requiredFiles": [
|
|
36
|
+
".gitattributes"
|
|
37
|
+
],
|
|
38
|
+
"verification": "Run 'git ls-files --eol' and verify Python files use LF."
|
|
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.*\\.(py|sh)$' && exit 1 || exit 0",
|
|
63
|
+
"description": "Detect CRLF in Python/shell files",
|
|
64
|
+
"expectExitCode": 0
|
|
65
|
+
},
|
|
66
|
+
"notes": "Python shebang scripts fail with CRLF. Check all .py and .sh files for CRLF before running pytest or other Python tools.",
|
|
67
|
+
"verification": "Run CRLF detection on Python and shell files."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
4
70
|
{
|
|
5
71
|
"ciHints": {
|
|
6
72
|
"azure-devops": {
|
|
@@ -168,6 +234,42 @@
|
|
|
168
234
|
"verification": "Check that the canonical version in pyproject.toml or VERSION follows SemVer and verify that the configured tool (for example, setuptools_scm or bumpversion) computes or bumps the version and generates changelog entries from commit history or fragments."
|
|
169
235
|
}
|
|
170
236
|
},
|
|
237
|
+
{
|
|
238
|
+
"ciHints": {
|
|
239
|
+
"azure-devops": {
|
|
240
|
+
"notes": "Run the version guard in PR validation jobs before merge.",
|
|
241
|
+
"stage": "quality"
|
|
242
|
+
},
|
|
243
|
+
"github-actions": {
|
|
244
|
+
"job": "ci",
|
|
245
|
+
"notes": "Run the version guard in PR workflows against the base ref."
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"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.",
|
|
249
|
+
"id": "version-guard",
|
|
250
|
+
"label": "Version Guard (Automated Releases)",
|
|
251
|
+
"stack": {
|
|
252
|
+
"exampleConfigFiles": [
|
|
253
|
+
"scripts/check-version-unchanged.sh",
|
|
254
|
+
".github/workflows/ci.yml",
|
|
255
|
+
"azure-pipelines.yml"
|
|
256
|
+
],
|
|
257
|
+
"exampleTools": [
|
|
258
|
+
"semantic-release",
|
|
259
|
+
"git"
|
|
260
|
+
],
|
|
261
|
+
"notes": "Block manual edits to version fields in pyproject.toml or setup.cfg when automated release tooling computes versions from commit history.",
|
|
262
|
+
"optionalFiles": [
|
|
263
|
+
"setup.cfg",
|
|
264
|
+
"setup.py",
|
|
265
|
+
"VERSION"
|
|
266
|
+
],
|
|
267
|
+
"requiredFiles": [
|
|
268
|
+
"pyproject.toml"
|
|
269
|
+
],
|
|
270
|
+
"verification": "Run the guard and confirm it fails when version lines change in pyproject.toml or setup.cfg."
|
|
271
|
+
}
|
|
272
|
+
},
|
|
171
273
|
{
|
|
172
274
|
"ciHints": {
|
|
173
275
|
"azure-devops": {
|
|
@@ -202,6 +304,32 @@
|
|
|
202
304
|
"verification": "Trigger the release pipeline and confirm all artifacts share the same version number and tag."
|
|
203
305
|
}
|
|
204
306
|
},
|
|
307
|
+
{
|
|
308
|
+
"ciHints": {
|
|
309
|
+
"azure-devops": {
|
|
310
|
+
"notes": "Set HUSKY=0 or equivalent in release pipeline to disable hooks.",
|
|
311
|
+
"stage": "release"
|
|
312
|
+
},
|
|
313
|
+
"github-actions": {
|
|
314
|
+
"job": "release",
|
|
315
|
+
"notes": "Set HUSKY=0 or equivalent in release job to disable hooks."
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"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.",
|
|
319
|
+
"id": "release-hook-bypass",
|
|
320
|
+
"label": "Release Hook Bypass",
|
|
321
|
+
"stack": {
|
|
322
|
+
"exampleConfigFiles": [
|
|
323
|
+
".github/workflows/release.yml"
|
|
324
|
+
],
|
|
325
|
+
"exampleTools": [
|
|
326
|
+
"semantic-release",
|
|
327
|
+
"bumpversion"
|
|
328
|
+
],
|
|
329
|
+
"notes": "Set PRE_COMMIT_ALLOW_NO_CONFIG=1 or SKIP=all to bypass pre-commit hooks in release automation. CI gates already validated.",
|
|
330
|
+
"verification": "Check release workflow for pre-commit bypass."
|
|
331
|
+
}
|
|
332
|
+
},
|
|
205
333
|
{
|
|
206
334
|
"ciHints": {
|
|
207
335
|
"azure-devops": {
|
|
@@ -329,13 +457,15 @@
|
|
|
329
457
|
{
|
|
330
458
|
"ciHints": {
|
|
331
459
|
"azure-devops": {
|
|
460
|
+
"notes": "Hooks and CI must invoke identical verification commands. Use npm run verify or equivalent.",
|
|
332
461
|
"stage": "quality"
|
|
333
462
|
},
|
|
334
463
|
"github-actions": {
|
|
335
|
-
"job": "ci"
|
|
464
|
+
"job": "ci",
|
|
465
|
+
"notes": "Hooks and CI must invoke identical verification commands. Use npm run verify or equivalent."
|
|
336
466
|
}
|
|
337
467
|
},
|
|
338
|
-
"description": "Use git hooks to run linting, formatting,
|
|
468
|
+
"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).",
|
|
339
469
|
"id": "pre-commit-hooks",
|
|
340
470
|
"label": "Pre-Commit Hooks",
|
|
341
471
|
"stack": {
|
|
@@ -345,8 +475,64 @@
|
|
|
345
475
|
"exampleTools": [
|
|
346
476
|
"pre-commit"
|
|
347
477
|
],
|
|
348
|
-
"notes": "Use pre-commit
|
|
349
|
-
"verification": "Inspect .pre-commit-config.yaml and confirm
|
|
478
|
+
"notes": "Use pre-commit framework as both entry and executor. Pin hook versions in .pre-commit-config.yaml for determinism. Hooks should run checks (ruff check, black --check) not auto-fix. Run pre-commit install to set up hooks.",
|
|
479
|
+
"verification": "Inspect .pre-commit-config.yaml and confirm hooks use check/verify flags, not auto-fix."
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"ciHints": {
|
|
484
|
+
"azure-devops": {
|
|
485
|
+
"notes": "CI should call the same verify script that hooks use locally.",
|
|
486
|
+
"stage": "quality"
|
|
487
|
+
},
|
|
488
|
+
"github-actions": {
|
|
489
|
+
"job": "ci",
|
|
490
|
+
"notes": "CI should call the same verify script that hooks use locally."
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"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.",
|
|
494
|
+
"id": "hook-ci-parity",
|
|
495
|
+
"label": "Hook/CI Parity",
|
|
496
|
+
"stack": {
|
|
497
|
+
"exampleConfigFiles": [
|
|
498
|
+
"Makefile",
|
|
499
|
+
"tox.ini",
|
|
500
|
+
"noxfile.py"
|
|
501
|
+
],
|
|
502
|
+
"exampleTools": [
|
|
503
|
+
"make",
|
|
504
|
+
"tox",
|
|
505
|
+
"nox"
|
|
506
|
+
],
|
|
507
|
+
"notes": "Define a verify target (make verify, tox -e lint, or nox -s lint) that both pre-commit and CI invoke. Pin tool versions in pyproject.toml.",
|
|
508
|
+
"verification": "Compare hook commands with CI commands and confirm they invoke the same targets."
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"ciHints": {
|
|
513
|
+
"azure-devops": {
|
|
514
|
+
"notes": "Also run secret scanning in CI as a safety net for commits that bypassed hooks.",
|
|
515
|
+
"stage": "quality"
|
|
516
|
+
},
|
|
517
|
+
"github-actions": {
|
|
518
|
+
"job": "ci",
|
|
519
|
+
"notes": "Enable GitHub secret scanning and also run gitleaks in CI."
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"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.",
|
|
523
|
+
"id": "secret-scanning-precommit",
|
|
524
|
+
"label": "Pre-commit Secret Scanning",
|
|
525
|
+
"stack": {
|
|
526
|
+
"exampleConfigFiles": [
|
|
527
|
+
".pre-commit-config.yaml",
|
|
528
|
+
".secrets.baseline"
|
|
529
|
+
],
|
|
530
|
+
"exampleTools": [
|
|
531
|
+
"detect-secrets",
|
|
532
|
+
"gitleaks"
|
|
533
|
+
],
|
|
534
|
+
"notes": "Add detect-secrets or gitleaks to .pre-commit-config.yaml. Use detect-secrets audit to manage baselines.",
|
|
535
|
+
"verification": "Run 'detect-secrets scan' or 'gitleaks protect' and verify scanning works."
|
|
350
536
|
}
|
|
351
537
|
},
|
|
352
538
|
{
|
|
@@ -610,6 +796,87 @@
|
|
|
610
796
|
],
|
|
611
797
|
"verification": "LICENSE file is present in the repository root; CODE_OF_CONDUCT.md and CONTRIBUTING.md are present for contribution guidance."
|
|
612
798
|
}
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"ciHints": {
|
|
802
|
+
"azure-devops": {
|
|
803
|
+
"notes": "CI should call the canonical verify command, not duplicate check logic.",
|
|
804
|
+
"stage": "quality"
|
|
805
|
+
},
|
|
806
|
+
"github-actions": {
|
|
807
|
+
"job": "ci",
|
|
808
|
+
"notes": "CI should call the canonical verify command, not duplicate check logic."
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"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.",
|
|
812
|
+
"id": "canonical-verify",
|
|
813
|
+
"label": "Canonical Verify Entrypoint",
|
|
814
|
+
"stack": {
|
|
815
|
+
"exampleConfigFiles": [
|
|
816
|
+
"Makefile",
|
|
817
|
+
"tox.ini",
|
|
818
|
+
"noxfile.py"
|
|
819
|
+
],
|
|
820
|
+
"exampleTools": [
|
|
821
|
+
"make",
|
|
822
|
+
"tox",
|
|
823
|
+
"nox"
|
|
824
|
+
],
|
|
825
|
+
"notes": "Define 'make verify' or 'tox -e verify' that runs ruff, black --check, mypy, and pytest. All stages use this entrypoint.",
|
|
826
|
+
"verification": "Makefile or tox.ini contains a 'verify' target/environment."
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"ciHints": {
|
|
831
|
+
"azure-devops": {
|
|
832
|
+
"notes": "Ensure CI reads from authoritative configs, not duplicated settings.",
|
|
833
|
+
"stage": "quality"
|
|
834
|
+
},
|
|
835
|
+
"github-actions": {
|
|
836
|
+
"job": "ci",
|
|
837
|
+
"notes": "Ensure CI reads from authoritative configs, not duplicated settings."
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
"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.",
|
|
841
|
+
"id": "config-authority",
|
|
842
|
+
"label": "Config File Authority Rules",
|
|
843
|
+
"stack": {
|
|
844
|
+
"exampleConfigFiles": [
|
|
845
|
+
".gitattributes",
|
|
846
|
+
"pyproject.toml",
|
|
847
|
+
".editorconfig"
|
|
848
|
+
],
|
|
849
|
+
"exampleTools": [],
|
|
850
|
+
"notes": "Authority mapping: .gitattributes for EOL, pyproject.toml for all tool configs (ruff, black, mypy, pytest). Avoid separate tool configs (.flake8, setup.cfg) when pyproject.toml can hold them.",
|
|
851
|
+
"verification": "Review configs and confirm pyproject.toml is the single source for tool settings."
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"ciHints": {
|
|
856
|
+
"azure-devops": {
|
|
857
|
+
"notes": "CI should read skip paths from config files, not hardcode them in pipeline.",
|
|
858
|
+
"stage": "quality"
|
|
859
|
+
},
|
|
860
|
+
"github-actions": {
|
|
861
|
+
"job": "ci",
|
|
862
|
+
"notes": "CI should read skip paths from config files, not hardcode them in pipeline."
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
"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.",
|
|
866
|
+
"id": "explicit-skip-paths",
|
|
867
|
+
"label": "Explicit Skip Paths",
|
|
868
|
+
"stack": {
|
|
869
|
+
"exampleConfigFiles": [
|
|
870
|
+
"pyproject.toml"
|
|
871
|
+
],
|
|
872
|
+
"exampleTools": [
|
|
873
|
+
"ruff",
|
|
874
|
+
"black",
|
|
875
|
+
"mypy"
|
|
876
|
+
],
|
|
877
|
+
"notes": "Define exclude patterns in pyproject.toml [tool.ruff], [tool.black], [tool.mypy] sections. Document why each path is excluded. Avoid runtime --exclude flags.",
|
|
878
|
+
"verification": "Review pyproject.toml and confirm all exclusions are defined there, not in scripts."
|
|
879
|
+
}
|
|
613
880
|
}
|
|
614
881
|
],
|
|
615
882
|
"optionalEnhancements": [
|
|
@@ -844,6 +1111,142 @@
|
|
|
844
1111
|
"verification": "For Python-backed web UIs, run the configured accessibility tooling (for example, pa11y or axe via a headless browser) against key routes and verify that critical issues are fixed or tracked."
|
|
845
1112
|
}
|
|
846
1113
|
},
|
|
1114
|
+
{
|
|
1115
|
+
"ciHints": {
|
|
1116
|
+
"azure-devops": {
|
|
1117
|
+
"notes": "Run AI drift detection in a scheduled nightly pipeline separate from main CI.",
|
|
1118
|
+
"stage": "nightly"
|
|
1119
|
+
},
|
|
1120
|
+
"github-actions": {
|
|
1121
|
+
"job": "nightly",
|
|
1122
|
+
"notes": "Use scheduled workflow (cron) to run AI drift detection nightly."
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"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.",
|
|
1126
|
+
"id": "ai-drift-detection",
|
|
1127
|
+
"label": "AI Drift Detection",
|
|
1128
|
+
"stack": {
|
|
1129
|
+
"exampleConfigFiles": [
|
|
1130
|
+
"tests/ai_baselines/",
|
|
1131
|
+
"pytest.ini"
|
|
1132
|
+
],
|
|
1133
|
+
"exampleTools": [
|
|
1134
|
+
"pytest",
|
|
1135
|
+
"deepdiff",
|
|
1136
|
+
"great_expectations"
|
|
1137
|
+
],
|
|
1138
|
+
"notes": "Create golden output tests for AI-generated content. Use deepdiff for structured comparison. For ML models, also track metrics drift (accuracy, latency) not just output drift.",
|
|
1139
|
+
"verification": "Run AI baseline tests nightly and confirm outputs match or drift is documented."
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"ciHints": {
|
|
1144
|
+
"azure-devops": {
|
|
1145
|
+
"notes": "Run schema validation tests as part of quality gates.",
|
|
1146
|
+
"stage": "quality"
|
|
1147
|
+
},
|
|
1148
|
+
"github-actions": {
|
|
1149
|
+
"job": "ci",
|
|
1150
|
+
"notes": "Include AI output schema validation in CI test suite."
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
"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.",
|
|
1154
|
+
"id": "ai-schema-enforcement",
|
|
1155
|
+
"label": "AI Output Schema Enforcement",
|
|
1156
|
+
"stack": {
|
|
1157
|
+
"exampleConfigFiles": [
|
|
1158
|
+
"schemas/",
|
|
1159
|
+
"models.py"
|
|
1160
|
+
],
|
|
1161
|
+
"exampleTools": [
|
|
1162
|
+
"pydantic",
|
|
1163
|
+
"jsonschema",
|
|
1164
|
+
"marshmallow"
|
|
1165
|
+
],
|
|
1166
|
+
"notes": "Use Pydantic models for AI output validation. Enable strict mode to reject extra fields. Define clear schemas at system boundaries where AI outputs enter the codebase.",
|
|
1167
|
+
"verification": "Review AI integration code and confirm Pydantic or equivalent validation is in place."
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"ciHints": {
|
|
1172
|
+
"azure-devops": {
|
|
1173
|
+
"notes": "Run AI golden tests as part of the test stage.",
|
|
1174
|
+
"stage": "test"
|
|
1175
|
+
},
|
|
1176
|
+
"github-actions": {
|
|
1177
|
+
"job": "ci",
|
|
1178
|
+
"notes": "Include AI golden contract tests in CI test suite."
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
"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.",
|
|
1182
|
+
"id": "ai-golden-tests",
|
|
1183
|
+
"label": "AI Golden Contract Tests",
|
|
1184
|
+
"stack": {
|
|
1185
|
+
"exampleConfigFiles": [
|
|
1186
|
+
"tests/fixtures/",
|
|
1187
|
+
"__snapshots__/"
|
|
1188
|
+
],
|
|
1189
|
+
"exampleTools": [
|
|
1190
|
+
"pytest",
|
|
1191
|
+
"syrupy"
|
|
1192
|
+
],
|
|
1193
|
+
"notes": "Use pytest with syrupy for snapshot testing AI outputs. Test that generated code follows project conventions and respects forbidden paths.",
|
|
1194
|
+
"verification": "Run snapshot tests and confirm AI outputs match golden fixtures."
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"ciHints": {
|
|
1199
|
+
"azure-devops": {
|
|
1200
|
+
"notes": "Run AI safety tests as part of security stage on main branch.",
|
|
1201
|
+
"stage": "security"
|
|
1202
|
+
},
|
|
1203
|
+
"github-actions": {
|
|
1204
|
+
"job": "security",
|
|
1205
|
+
"notes": "Run AI safety checks on main branch merges."
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
"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.",
|
|
1209
|
+
"id": "ai-safety-checks",
|
|
1210
|
+
"label": "AI Adversarial & Safety Testing",
|
|
1211
|
+
"stack": {
|
|
1212
|
+
"exampleConfigFiles": [
|
|
1213
|
+
"tests/ai_safety/"
|
|
1214
|
+
],
|
|
1215
|
+
"exampleTools": [
|
|
1216
|
+
"pytest",
|
|
1217
|
+
"hypothesis"
|
|
1218
|
+
],
|
|
1219
|
+
"notes": "Use hypothesis for property-based testing of AI input handling. Test prompt injection, output sanitization, and data boundary enforcement.",
|
|
1220
|
+
"verification": "Run AI safety tests including adversarial cases."
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"ciHints": {
|
|
1225
|
+
"azure-devops": {
|
|
1226
|
+
"notes": "Verify AI provenance logging is implemented in quality checks.",
|
|
1227
|
+
"stage": "quality"
|
|
1228
|
+
},
|
|
1229
|
+
"github-actions": {
|
|
1230
|
+
"job": "ci",
|
|
1231
|
+
"notes": "Check AI provenance logging implementation in CI."
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
"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.",
|
|
1235
|
+
"id": "ai-provenance-tracking",
|
|
1236
|
+
"label": "AI Provenance & Audit Logging",
|
|
1237
|
+
"stack": {
|
|
1238
|
+
"exampleConfigFiles": [
|
|
1239
|
+
"ai/provenance.py"
|
|
1240
|
+
],
|
|
1241
|
+
"exampleTools": [
|
|
1242
|
+
"structlog",
|
|
1243
|
+
"OpenTelemetry",
|
|
1244
|
+
"MLflow"
|
|
1245
|
+
],
|
|
1246
|
+
"notes": "Log AI provenance using structlog or MLflow tracking. For ML models, also track training data version and model artifact hash.",
|
|
1247
|
+
"verification": "Review AI integration and confirm provenance is tracked."
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
847
1250
|
{
|
|
848
1251
|
"ciHints": {
|
|
849
1252
|
"azure-devops": {
|
|
@@ -925,27 +1328,41 @@
|
|
|
925
1328
|
},
|
|
926
1329
|
"migrationGuide": [
|
|
927
1330
|
{
|
|
928
|
-
"description": "
|
|
1331
|
+
"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.",
|
|
1332
|
+
"focusIds": [
|
|
1333
|
+
"gitattributes-eol",
|
|
1334
|
+
"canonical-verify",
|
|
1335
|
+
"hook-ci-parity",
|
|
1336
|
+
"config-authority"
|
|
1337
|
+
],
|
|
1338
|
+
"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.",
|
|
1339
|
+
"step": 0,
|
|
1340
|
+
"title": "Foundation: Line Endings and Hook Entry Point"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"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.",
|
|
929
1344
|
"focusIds": [
|
|
930
1345
|
"pre-commit-hooks",
|
|
1346
|
+
"secret-scanning-precommit",
|
|
931
1347
|
"linting",
|
|
932
1348
|
"code-formatter"
|
|
933
1349
|
],
|
|
934
|
-
"notes": "Keep hooks fast
|
|
1350
|
+
"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.",
|
|
935
1351
|
"step": 1,
|
|
936
1352
|
"title": "Establish Local Safety Nets First"
|
|
937
1353
|
},
|
|
938
1354
|
{
|
|
939
|
-
"description": "Introduce CI quality gates that mirror local
|
|
1355
|
+
"description": "Introduce CI quality gates that mirror local hooks exactly. Add CRLF detection early in pipeline. Treat existing violations as warnings where possible.",
|
|
940
1356
|
"focusIds": [
|
|
1357
|
+
"crlf-detection",
|
|
941
1358
|
"ci-quality-gates",
|
|
942
1359
|
"linting",
|
|
943
1360
|
"code-formatter",
|
|
944
1361
|
"commit-linting"
|
|
945
1362
|
],
|
|
946
|
-
"notes": "Use diff-based tools
|
|
1363
|
+
"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.",
|
|
947
1364
|
"step": 2,
|
|
948
|
-
"title": "Mirror Local Checks in CI
|
|
1365
|
+
"title": "Mirror Local Checks in CI with CRLF Detection"
|
|
949
1366
|
},
|
|
950
1367
|
{
|
|
951
1368
|
"description": "Enable type-checking, coverage thresholds, and dependency/vulnerability scanning with gradual enforcement.",
|
|
@@ -970,9 +1387,22 @@
|
|
|
970
1387
|
"complexity-analysis",
|
|
971
1388
|
"accessibility-auditing"
|
|
972
1389
|
],
|
|
973
|
-
"notes": "Tackle recommended items in order of business value; backend-only repos can skip web-focused checks like accessibility.
|
|
1390
|
+
"notes": "Tackle recommended items in order of business value; backend-only repos can skip web-focused checks like accessibility.",
|
|
974
1391
|
"step": 4,
|
|
975
1392
|
"title": "Layer in Docs, Governance, and Recommended Checks"
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"description": "For repos using or building with generative AI, add drift detection, schema enforcement, golden contract tests, safety testing, and provenance tracking.",
|
|
1396
|
+
"focusIds": [
|
|
1397
|
+
"ai-drift-detection",
|
|
1398
|
+
"ai-schema-enforcement",
|
|
1399
|
+
"ai-golden-tests",
|
|
1400
|
+
"ai-safety-checks",
|
|
1401
|
+
"ai-provenance-tracking"
|
|
1402
|
+
],
|
|
1403
|
+
"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?'",
|
|
1404
|
+
"step": 5,
|
|
1405
|
+
"title": "AI/ML Governance (If Applicable)"
|
|
976
1406
|
}
|
|
977
1407
|
],
|
|
978
1408
|
"qualityGatePolicy": {
|
|
@@ -982,5 +1412,5 @@
|
|
|
982
1412
|
},
|
|
983
1413
|
"stack": "python",
|
|
984
1414
|
"stackLabel": "Python",
|
|
985
|
-
"version":
|
|
1415
|
+
"version": 5
|
|
986
1416
|
}
|