@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,64 @@
|
|
|
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
|
+
},
|
|
11
|
+
"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.",
|
|
12
|
+
"id": "gitattributes-eol",
|
|
13
|
+
"label": "Git Attributes (Line Endings)",
|
|
14
|
+
"stack": {
|
|
15
|
+
"exampleConfigFiles": [
|
|
16
|
+
".gitattributes",
|
|
17
|
+
".editorconfig"
|
|
18
|
+
],
|
|
19
|
+
"exampleTools": [
|
|
20
|
+
"git"
|
|
21
|
+
],
|
|
22
|
+
"machineCheck": {
|
|
23
|
+
"command": "git ls-files --eol | grep -E 'w/crlf.*\\.(sh|bash|py)$' && exit 1 || exit 0",
|
|
24
|
+
"description": "Verify no CRLF in shell/script files",
|
|
25
|
+
"expectExitCode": 0
|
|
26
|
+
},
|
|
27
|
+
"notes": "Use .gitattributes as the authority for EOL; .editorconfig is supplementary for editor display. Mark *.sh, *.bash as eol=lf. After adding .gitattributes, run 'git add --renormalize .' to fix existing files. Windows contributors should set core.autocrlf=false.",
|
|
28
|
+
"optionalFiles": [
|
|
29
|
+
".editorconfig"
|
|
30
|
+
],
|
|
31
|
+
"requiredFiles": [
|
|
32
|
+
".gitattributes"
|
|
33
|
+
],
|
|
34
|
+
"verification": "Run 'git ls-files --eol' and verify no unexpected CRLF in LF-only files."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"ciHints": {
|
|
39
|
+
"azure-devops": {
|
|
40
|
+
"notes": "Run CRLF detection as the first quality check before linting or testing.",
|
|
41
|
+
"stage": "quality"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"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.",
|
|
45
|
+
"id": "crlf-detection",
|
|
46
|
+
"label": "CRLF Detection in CI",
|
|
47
|
+
"stack": {
|
|
48
|
+
"exampleConfigFiles": [],
|
|
49
|
+
"exampleTools": [
|
|
50
|
+
"file",
|
|
51
|
+
"grep"
|
|
52
|
+
],
|
|
53
|
+
"machineCheck": {
|
|
54
|
+
"command": "git ls-files --eol | grep -E 'w/crlf.*\\.(sh|js|ts|mjs|cjs)$' && exit 1 || exit 0",
|
|
55
|
+
"description": "Detect CRLF in script files",
|
|
56
|
+
"expectExitCode": 0
|
|
57
|
+
},
|
|
58
|
+
"notes": "Check for CRLF in .sh, .js, .ts, .json files early in CI. Use 'file' command or grep for \\r to detect issues before they cause cryptic failures.",
|
|
59
|
+
"verification": "Run 'git ls-files --eol | grep w/crlf' and verify no unexpected CRLF files."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
4
62
|
{
|
|
5
63
|
"ciHints": {
|
|
6
64
|
"azure-devops": {
|
|
@@ -168,6 +226,36 @@
|
|
|
168
226
|
"verification": "Check that the canonical version field follows SemVer, and trigger the configured release workflow (for example, a dry run of semantic-release or standard-version) to confirm it generates the expected next version, updates package.json or VERSION, and creates/updates CHANGELOG.md with commit-based entries."
|
|
169
227
|
}
|
|
170
228
|
},
|
|
229
|
+
{
|
|
230
|
+
"ciHints": {
|
|
231
|
+
"azure-devops": {
|
|
232
|
+
"notes": "Run the version guard in PR validation jobs before merge.",
|
|
233
|
+
"stage": "quality"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"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.",
|
|
237
|
+
"id": "version-guard",
|
|
238
|
+
"label": "Version Guard (Automated Releases)",
|
|
239
|
+
"stack": {
|
|
240
|
+
"exampleConfigFiles": [
|
|
241
|
+
"scripts/check-version-unchanged.sh",
|
|
242
|
+
".github/workflows/ci.yml",
|
|
243
|
+
"azure-pipelines.yml"
|
|
244
|
+
],
|
|
245
|
+
"exampleTools": [
|
|
246
|
+
"semantic-release",
|
|
247
|
+
"git"
|
|
248
|
+
],
|
|
249
|
+
"notes": "Add a CI step that runs scripts/check-version-unchanged.sh against the PR base ref. This blocks manual edits to package.json version when semantic-release owns versioning. Optionally wire the same script into a pre-push hook for fast feedback.",
|
|
250
|
+
"optionalFiles": [
|
|
251
|
+
"VERSION"
|
|
252
|
+
],
|
|
253
|
+
"requiredFiles": [
|
|
254
|
+
"package.json"
|
|
255
|
+
],
|
|
256
|
+
"verification": "Run the guard with the PR base ref (for example, origin/main) and confirm it fails when package.json version changes."
|
|
257
|
+
}
|
|
258
|
+
},
|
|
171
259
|
{
|
|
172
260
|
"ciHints": {
|
|
173
261
|
"azure-devops": {
|
|
@@ -199,6 +287,33 @@
|
|
|
199
287
|
"verification": "Trigger the release pipeline and confirm all artifacts share the same version number and tag."
|
|
200
288
|
}
|
|
201
289
|
},
|
|
290
|
+
{
|
|
291
|
+
"ciHints": {
|
|
292
|
+
"azure-devops": {
|
|
293
|
+
"notes": "Set HUSKY=0 or equivalent in release pipeline to disable hooks.",
|
|
294
|
+
"stage": "release"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"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.",
|
|
298
|
+
"id": "release-hook-bypass",
|
|
299
|
+
"label": "Release Hook Bypass",
|
|
300
|
+
"stack": {
|
|
301
|
+
"exampleConfigFiles": [
|
|
302
|
+
".github/workflows/release.yml"
|
|
303
|
+
],
|
|
304
|
+
"exampleTools": [
|
|
305
|
+
"semantic-release",
|
|
306
|
+
"husky"
|
|
307
|
+
],
|
|
308
|
+
"machineCheck": {
|
|
309
|
+
"command": "grep -r 'HUSKY=0\\|--no-verify' .github/workflows/ || echo 'WARNING: No hook bypass in release workflow'",
|
|
310
|
+
"description": "Verify release workflows disable hooks",
|
|
311
|
+
"expectExitCode": 0
|
|
312
|
+
},
|
|
313
|
+
"notes": "In release workflows, set HUSKY=0 environment variable to disable husky hooks. Release commits from semantic-release should bypass commitlint since they're generated. CI gates already validated the code.",
|
|
314
|
+
"verification": "Check release workflow for HUSKY=0 or --no-verify flags."
|
|
315
|
+
}
|
|
316
|
+
},
|
|
202
317
|
{
|
|
203
318
|
"ciHints": {
|
|
204
319
|
"azure-devops": {
|
|
@@ -313,23 +428,73 @@
|
|
|
313
428
|
{
|
|
314
429
|
"ciHints": {
|
|
315
430
|
"azure-devops": {
|
|
431
|
+
"notes": "Hooks and CI must invoke identical verification commands. Use npm run verify or equivalent.",
|
|
316
432
|
"stage": "quality"
|
|
317
433
|
}
|
|
318
434
|
},
|
|
319
|
-
"description": "Use git hooks to run linting, formatting,
|
|
435
|
+
"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).",
|
|
320
436
|
"id": "pre-commit-hooks",
|
|
321
437
|
"label": "Pre-Commit Hooks",
|
|
322
438
|
"stack": {
|
|
323
439
|
"exampleConfigFiles": [
|
|
324
440
|
".husky/",
|
|
325
|
-
"package.json"
|
|
441
|
+
"package.json",
|
|
442
|
+
"lint-staged.config.js"
|
|
326
443
|
],
|
|
327
444
|
"exampleTools": [
|
|
328
445
|
"husky",
|
|
329
446
|
"lint-staged"
|
|
330
447
|
],
|
|
331
|
-
"notes": "
|
|
332
|
-
"verification": "
|
|
448
|
+
"notes": "Use Husky as the entry hook mechanism calling lint-staged. Hooks should CHECK (--check flags) not auto-fix to keep developers aware of issues. Scope to staged files only for speed. Invoke hooks through the repo toolchain (npx) not global installs to ensure environment pinning. Never let hook enforcement drift from CI.",
|
|
449
|
+
"verification": "Run 'npm run verify' (or equivalent) and confirm the same checks run in both hooks and CI."
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"ciHints": {
|
|
454
|
+
"azure-devops": {
|
|
455
|
+
"notes": "CI should call the same verify script that hooks use locally.",
|
|
456
|
+
"stage": "quality"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"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.",
|
|
460
|
+
"id": "hook-ci-parity",
|
|
461
|
+
"label": "Hook/CI Parity",
|
|
462
|
+
"stack": {
|
|
463
|
+
"exampleConfigFiles": [
|
|
464
|
+
"package.json"
|
|
465
|
+
],
|
|
466
|
+
"exampleTools": [
|
|
467
|
+
"npm scripts"
|
|
468
|
+
],
|
|
469
|
+
"notes": "Define a 'verify' script in package.json that runs all checks (lint, format:check, typecheck). Both .husky/pre-commit and CI should call 'npm run verify'. Never add checks to CI that don't run locally.",
|
|
470
|
+
"requiredScripts": [
|
|
471
|
+
"verify"
|
|
472
|
+
],
|
|
473
|
+
"verification": "Compare hook commands with CI commands and confirm they invoke the same scripts."
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"ciHints": {
|
|
478
|
+
"azure-devops": {
|
|
479
|
+
"notes": "Also run secret scanning in CI as a safety net for commits that bypassed hooks.",
|
|
480
|
+
"stage": "quality"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"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.",
|
|
484
|
+
"id": "secret-scanning-precommit",
|
|
485
|
+
"label": "Pre-commit Secret Scanning",
|
|
486
|
+
"stack": {
|
|
487
|
+
"exampleConfigFiles": [
|
|
488
|
+
".gitleaks.toml",
|
|
489
|
+
".secrets.baseline"
|
|
490
|
+
],
|
|
491
|
+
"exampleTools": [
|
|
492
|
+
"gitleaks",
|
|
493
|
+
"detect-secrets",
|
|
494
|
+
"trufflehog"
|
|
495
|
+
],
|
|
496
|
+
"notes": "Add gitleaks or detect-secrets to pre-commit hooks. Scan only staged changes for speed. Configure allowlists for false positives in .gitleaks.toml.",
|
|
497
|
+
"verification": "Run 'gitleaks protect --staged' and verify it catches test secrets."
|
|
333
498
|
}
|
|
334
499
|
},
|
|
335
500
|
{
|
|
@@ -559,6 +724,76 @@
|
|
|
559
724
|
],
|
|
560
725
|
"verification": "LICENSE file is present in the repository root; CODE_OF_CONDUCT.md and CONTRIBUTING.md are present for contribution guidance."
|
|
561
726
|
}
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"ciHints": {
|
|
730
|
+
"azure-devops": {
|
|
731
|
+
"notes": "CI should call the canonical verify command, not duplicate check logic.",
|
|
732
|
+
"stage": "quality"
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"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.",
|
|
736
|
+
"id": "canonical-verify",
|
|
737
|
+
"label": "Canonical Verify Entrypoint",
|
|
738
|
+
"stack": {
|
|
739
|
+
"exampleConfigFiles": [
|
|
740
|
+
"package.json"
|
|
741
|
+
],
|
|
742
|
+
"exampleTools": [
|
|
743
|
+
"npm scripts"
|
|
744
|
+
],
|
|
745
|
+
"notes": "Define 'npm run verify' that runs lint, format:check, typecheck, and test. Pre-commit hooks call 'npm run verify:quick' (lint + format only). CI calls 'npm run verify' (full suite). Never duplicate verification logic across multiple scripts.",
|
|
746
|
+
"requiredScripts": [
|
|
747
|
+
"verify"
|
|
748
|
+
],
|
|
749
|
+
"verification": "package.json contains a 'verify' script that orchestrates all checks."
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"ciHints": {
|
|
754
|
+
"azure-devops": {
|
|
755
|
+
"notes": "Ensure CI reads from authoritative configs, not duplicated settings.",
|
|
756
|
+
"stage": "quality"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
"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.",
|
|
760
|
+
"id": "config-authority",
|
|
761
|
+
"label": "Config File Authority Rules",
|
|
762
|
+
"stack": {
|
|
763
|
+
"exampleConfigFiles": [
|
|
764
|
+
".gitattributes",
|
|
765
|
+
".editorconfig",
|
|
766
|
+
"eslint.config.js",
|
|
767
|
+
"tsconfig.json"
|
|
768
|
+
],
|
|
769
|
+
"exampleTools": [],
|
|
770
|
+
"notes": "Authority mapping: .gitattributes for EOL (Git layer), .editorconfig for editor display, eslint.config.js for lint rules, tsconfig.json for TS compiler options, prettier for formatting. Never duplicate rules across files.",
|
|
771
|
+
"verification": "Review configs and confirm no rule is defined in multiple places with potential for drift."
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"ciHints": {
|
|
776
|
+
"azure-devops": {
|
|
777
|
+
"notes": "CI should read skip paths from config files, not hardcode them in pipeline.",
|
|
778
|
+
"stage": "quality"
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"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.",
|
|
782
|
+
"id": "explicit-skip-paths",
|
|
783
|
+
"label": "Explicit Skip Paths",
|
|
784
|
+
"stack": {
|
|
785
|
+
"exampleConfigFiles": [
|
|
786
|
+
".eslintignore",
|
|
787
|
+
".prettierignore",
|
|
788
|
+
"eslint.config.js"
|
|
789
|
+
],
|
|
790
|
+
"exampleTools": [
|
|
791
|
+
"eslint",
|
|
792
|
+
"prettier"
|
|
793
|
+
],
|
|
794
|
+
"notes": "Define ignores in eslint.config.js (ignores array) and .prettierignore. Document why each path is excluded (generated code, vendor, etc.). Avoid ad-hoc --ignore-path flags in scripts.",
|
|
795
|
+
"verification": "Review ignore configs and confirm all exclusions are documented and intentional."
|
|
796
|
+
}
|
|
562
797
|
}
|
|
563
798
|
],
|
|
564
799
|
"optionalEnhancements": [
|
|
@@ -771,6 +1006,120 @@
|
|
|
771
1006
|
"verification": "For web-facing apps, run the configured accessibility tooling (for example, axe, pa11y, or Lighthouse accessibility audits) against key pages and confirm that critical issues are resolved."
|
|
772
1007
|
}
|
|
773
1008
|
},
|
|
1009
|
+
{
|
|
1010
|
+
"ciHints": {
|
|
1011
|
+
"azure-devops": {
|
|
1012
|
+
"notes": "Run AI drift detection in a scheduled nightly pipeline separate from main CI.",
|
|
1013
|
+
"stage": "nightly"
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
"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.",
|
|
1017
|
+
"id": "ai-drift-detection",
|
|
1018
|
+
"label": "AI Drift Detection",
|
|
1019
|
+
"stack": {
|
|
1020
|
+
"exampleConfigFiles": [
|
|
1021
|
+
"__snapshots__/",
|
|
1022
|
+
"ai-baselines/"
|
|
1023
|
+
],
|
|
1024
|
+
"exampleTools": [
|
|
1025
|
+
"jest snapshots",
|
|
1026
|
+
"custom baseline comparator"
|
|
1027
|
+
],
|
|
1028
|
+
"notes": "Pin AI outputs as baseline snapshots. Nightly runs compare current outputs against baselines. When drift detected, investigate: was it a code change, model update, or prompt change? Log model version, prompt hash, and code SHA for attribution.",
|
|
1029
|
+
"verification": "Run AI baseline tests and confirm outputs match pinned baselines or drift is intentional."
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"ciHints": {
|
|
1034
|
+
"azure-devops": {
|
|
1035
|
+
"notes": "Run schema validation tests as part of quality gates.",
|
|
1036
|
+
"stage": "quality"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
"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.",
|
|
1040
|
+
"id": "ai-schema-enforcement",
|
|
1041
|
+
"label": "AI Output Schema Enforcement",
|
|
1042
|
+
"stack": {
|
|
1043
|
+
"exampleConfigFiles": [
|
|
1044
|
+
"src/schemas/",
|
|
1045
|
+
"*.schema.json"
|
|
1046
|
+
],
|
|
1047
|
+
"exampleTools": [
|
|
1048
|
+
"zod",
|
|
1049
|
+
"ajv",
|
|
1050
|
+
"TypeScript"
|
|
1051
|
+
],
|
|
1052
|
+
"notes": "Define strict schemas for AI outputs using Zod or JSON Schema. Parse and validate AI responses at integration boundaries. Fail fast on schema violations rather than handling partial/invalid data.",
|
|
1053
|
+
"verification": "Review AI integration code and confirm all AI outputs are validated against schemas."
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"ciHints": {
|
|
1058
|
+
"azure-devops": {
|
|
1059
|
+
"notes": "Run AI golden tests as part of the test stage.",
|
|
1060
|
+
"stage": "test"
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
"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.",
|
|
1064
|
+
"id": "ai-golden-tests",
|
|
1065
|
+
"label": "AI Golden Contract Tests",
|
|
1066
|
+
"stack": {
|
|
1067
|
+
"exampleConfigFiles": [
|
|
1068
|
+
"__fixtures__/ai-outputs/",
|
|
1069
|
+
"*.golden.json"
|
|
1070
|
+
],
|
|
1071
|
+
"exampleTools": [
|
|
1072
|
+
"jest",
|
|
1073
|
+
"vitest"
|
|
1074
|
+
],
|
|
1075
|
+
"notes": "Create golden test fixtures for AI-generated patches and configs. Test that outputs match exact formats, don't touch forbidden paths (node_modules, .git), and respect file naming conventions.",
|
|
1076
|
+
"verification": "Run golden tests and confirm AI outputs match expected fixtures exactly."
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"ciHints": {
|
|
1081
|
+
"azure-devops": {
|
|
1082
|
+
"notes": "Run AI safety tests as part of security stage on main branch.",
|
|
1083
|
+
"stage": "security"
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
"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.",
|
|
1087
|
+
"id": "ai-safety-checks",
|
|
1088
|
+
"label": "AI Adversarial & Safety Testing",
|
|
1089
|
+
"stack": {
|
|
1090
|
+
"exampleConfigFiles": [
|
|
1091
|
+
"tests/ai-safety/"
|
|
1092
|
+
],
|
|
1093
|
+
"exampleTools": [
|
|
1094
|
+
"jest",
|
|
1095
|
+
"custom adversarial tests"
|
|
1096
|
+
],
|
|
1097
|
+
"notes": "Create adversarial test suite with prompt injection attempts, malicious input patterns, and exfiltration scenarios. Test that AI outputs are sanitized before use in sensitive contexts (SQL, shell, HTML).",
|
|
1098
|
+
"verification": "Run AI safety test suite and confirm all adversarial cases are handled safely."
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"ciHints": {
|
|
1103
|
+
"azure-devops": {
|
|
1104
|
+
"notes": "Verify AI provenance logging is implemented in quality checks.",
|
|
1105
|
+
"stage": "quality"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
"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.",
|
|
1109
|
+
"id": "ai-provenance-tracking",
|
|
1110
|
+
"label": "AI Provenance & Audit Logging",
|
|
1111
|
+
"stack": {
|
|
1112
|
+
"exampleConfigFiles": [
|
|
1113
|
+
"src/ai/provenance.ts"
|
|
1114
|
+
],
|
|
1115
|
+
"exampleTools": [
|
|
1116
|
+
"OpenTelemetry",
|
|
1117
|
+
"custom logging"
|
|
1118
|
+
],
|
|
1119
|
+
"notes": "Log for each AI call: provider (OpenAI, Anthropic), model ID, prompt template hash/version, temperature, timestamp, request ID. Store provenance alongside outputs for debugging 'why did AI do X?'",
|
|
1120
|
+
"verification": "Review AI integration code and confirm provenance is logged for all AI calls."
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
774
1123
|
{
|
|
775
1124
|
"ciHints": {
|
|
776
1125
|
"azure-devops": {
|
|
@@ -847,27 +1196,41 @@
|
|
|
847
1196
|
},
|
|
848
1197
|
"migrationGuide": [
|
|
849
1198
|
{
|
|
850
|
-
"description": "
|
|
1199
|
+
"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.",
|
|
1200
|
+
"focusIds": [
|
|
1201
|
+
"gitattributes-eol",
|
|
1202
|
+
"canonical-verify",
|
|
1203
|
+
"hook-ci-parity",
|
|
1204
|
+
"config-authority"
|
|
1205
|
+
],
|
|
1206
|
+
"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.",
|
|
1207
|
+
"step": 0,
|
|
1208
|
+
"title": "Foundation: Line Endings and Hook Entry Point"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"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.",
|
|
851
1212
|
"focusIds": [
|
|
852
1213
|
"pre-commit-hooks",
|
|
1214
|
+
"secret-scanning-precommit",
|
|
853
1215
|
"linting",
|
|
854
1216
|
"code-formatter"
|
|
855
1217
|
],
|
|
856
|
-
"notes": "Keep hooks fast
|
|
1218
|
+
"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.",
|
|
857
1219
|
"step": 1,
|
|
858
1220
|
"title": "Establish Local Safety Nets First"
|
|
859
1221
|
},
|
|
860
1222
|
{
|
|
861
|
-
"description": "Introduce CI quality gates that mirror local
|
|
1223
|
+
"description": "Introduce CI quality gates that mirror local hooks exactly. Add CRLF detection early in pipeline. Treat existing violations as warnings where possible.",
|
|
862
1224
|
"focusIds": [
|
|
1225
|
+
"crlf-detection",
|
|
863
1226
|
"ci-quality-gates",
|
|
864
1227
|
"linting",
|
|
865
1228
|
"code-formatter",
|
|
866
1229
|
"commit-linting"
|
|
867
1230
|
],
|
|
868
|
-
"notes": "Use diff-based tools
|
|
1231
|
+
"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.",
|
|
869
1232
|
"step": 2,
|
|
870
|
-
"title": "Mirror Local Checks in CI
|
|
1233
|
+
"title": "Mirror Local Checks in CI with CRLF Detection"
|
|
871
1234
|
},
|
|
872
1235
|
{
|
|
873
1236
|
"description": "Enable type-checking, coverage thresholds, and dependency/vulnerability scanning with gradual enforcement.",
|
|
@@ -892,9 +1255,22 @@
|
|
|
892
1255
|
"complexity-analysis",
|
|
893
1256
|
"accessibility-auditing"
|
|
894
1257
|
],
|
|
895
|
-
"notes": "Tackle recommended items in order of business value; backend-only repos can skip web-focused checks like accessibility.
|
|
1258
|
+
"notes": "Tackle recommended items in order of business value; backend-only repos can skip web-focused checks like accessibility.",
|
|
896
1259
|
"step": 4,
|
|
897
1260
|
"title": "Layer in Docs, Governance, and Recommended Checks"
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"description": "For repos using or building with generative AI, add drift detection, schema enforcement, golden contract tests, safety testing, and provenance tracking.",
|
|
1264
|
+
"focusIds": [
|
|
1265
|
+
"ai-drift-detection",
|
|
1266
|
+
"ai-schema-enforcement",
|
|
1267
|
+
"ai-golden-tests",
|
|
1268
|
+
"ai-safety-checks",
|
|
1269
|
+
"ai-provenance-tracking"
|
|
1270
|
+
],
|
|
1271
|
+
"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?'",
|
|
1272
|
+
"step": 5,
|
|
1273
|
+
"title": "AI/ML Governance (If Applicable)"
|
|
898
1274
|
}
|
|
899
1275
|
],
|
|
900
1276
|
"qualityGatePolicy": {
|
|
@@ -904,5 +1280,5 @@
|
|
|
904
1280
|
},
|
|
905
1281
|
"stack": "typescript-js",
|
|
906
1282
|
"stackLabel": "TypeScript / JavaScript",
|
|
907
|
-
"version":
|
|
1283
|
+
"version": 5
|
|
908
1284
|
}
|