@oddessentials/repo-standards 4.3.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -613,6 +613,54 @@
613
613
  "notes": "Use the tracing crate for structured logging with spans and events. Configure tracing-subscriber for output formatting.",
614
614
  "verification": "Confirm that tracing or log crate is configured with appropriate subscriber/logger and emits structured output."
615
615
  }
616
+ },
617
+ {
618
+ "ciHints": {
619
+ "azure-devops": {
620
+ "stage": "governance"
621
+ },
622
+ "github-actions": {
623
+ "job": "ci"
624
+ }
625
+ },
626
+ "description": "Define phase transition requirements in phase-gates.md for autonomous agent workflows with clear pre-conditions and approval gates.",
627
+ "id": "agent-phase-gates",
628
+ "label": "Agent Phase Gates",
629
+ "stack": {
630
+ "exampleConfigFiles": [
631
+ "phase-gates.md"
632
+ ],
633
+ "exampleTools": [],
634
+ "notes": "Document phase gates with Rust-specific verification (cargo test, cargo check, crates.io publishing) and sign-off requirements.",
635
+ "optionalFiles": [
636
+ "phase-gates.md"
637
+ ],
638
+ "verification": "phase-gates.md exists defining transition requirements."
639
+ }
640
+ },
641
+ {
642
+ "ciHints": {
643
+ "azure-devops": {
644
+ "stage": "governance"
645
+ },
646
+ "github-actions": {
647
+ "job": "ci"
648
+ }
649
+ },
650
+ "description": "Document milestone completion criteria in victory-gates.md defining 'done' for releases and major deliverables with evidence requirements.",
651
+ "id": "agent-victory-gates",
652
+ "label": "Agent Victory Gates",
653
+ "stack": {
654
+ "exampleConfigFiles": [
655
+ "victory-gates.md"
656
+ ],
657
+ "exampleTools": [],
658
+ "notes": "Define done criteria including Rust-specific conditions (crates.io publication, documentation hosting, security audits) with evidence requirements.",
659
+ "optionalFiles": [
660
+ "victory-gates.md"
661
+ ],
662
+ "verification": "victory-gates.md exists with milestone criteria."
663
+ }
616
664
  }
617
665
  ],
618
666
  "recommended": [
@@ -768,6 +816,32 @@
768
816
  "notes": "For Rust web frameworks (Actix, Axum, Rocket), use headless browser-based accessibility tools to audit rendered HTML.",
769
817
  "verification": "For web-facing Rust apps, run accessibility audits against key routes using axe or pa11y."
770
818
  }
819
+ },
820
+ {
821
+ "ciHints": {
822
+ "azure-devops": {
823
+ "notes": "Run invariant verification commands in a dedicated quality stage.",
824
+ "stage": "quality"
825
+ },
826
+ "github-actions": {
827
+ "job": "ci",
828
+ "notes": "Add invariant checks to existing CI job or create dedicated invariants job."
829
+ }
830
+ },
831
+ "description": "Maintain INVARIANTS.md defining repository-wide rules that must always hold true, with machine-readable verification commands for autonomous agents.",
832
+ "id": "agent-invariants",
833
+ "label": "Autonomous Agent Invariants",
834
+ "stack": {
835
+ "exampleConfigFiles": [
836
+ "INVARIANTS.md"
837
+ ],
838
+ "exampleTools": [],
839
+ "notes": "Document invariants with verification commands like 'cargo test', 'cargo clippy', 'cargo fmt --check' for deterministic validation.",
840
+ "requiredFiles": [
841
+ "INVARIANTS.md"
842
+ ],
843
+ "verification": "INVARIANTS.md exists with machine-readable verification commands."
844
+ }
771
845
  }
772
846
  ]
773
847
  },
@@ -580,6 +580,48 @@
580
580
  "notes": "Adopt structured JSON logging with correlation IDs and send logs to a centralized sink in production.",
581
581
  "verification": "Confirm that a structured logging library (such as Winston or Pino) is configured to emit JSON or key-value logs and that error handling routes important failures through this logger."
582
582
  }
583
+ },
584
+ {
585
+ "ciHints": {
586
+ "azure-devops": {
587
+ "stage": "governance"
588
+ }
589
+ },
590
+ "description": "Define phase transition requirements in phase-gates.md for autonomous agent workflows with clear pre-conditions and approval gates.",
591
+ "id": "agent-phase-gates",
592
+ "label": "Agent Phase Gates",
593
+ "stack": {
594
+ "exampleConfigFiles": [
595
+ "phase-gates.md"
596
+ ],
597
+ "exampleTools": [],
598
+ "notes": "Document phase transitions (Planning → Implementation → Verification → Release) with required pre-conditions, approval mechanisms, and evidence artifacts for each gate.",
599
+ "optionalFiles": [
600
+ "phase-gates.md"
601
+ ],
602
+ "verification": "phase-gates.md exists defining transition requirements between project phases."
603
+ }
604
+ },
605
+ {
606
+ "ciHints": {
607
+ "azure-devops": {
608
+ "stage": "governance"
609
+ }
610
+ },
611
+ "description": "Document milestone completion criteria in victory-gates.md defining 'done' for releases and major deliverables with evidence requirements.",
612
+ "id": "agent-victory-gates",
613
+ "label": "Agent Victory Gates",
614
+ "stack": {
615
+ "exampleConfigFiles": [
616
+ "victory-gates.md"
617
+ ],
618
+ "exampleTools": [],
619
+ "notes": "Define completion criteria for milestones (MVP, Beta, GA) with all required conditions, verification commands, and evidence artifacts (test reports, coverage, deployment confirmations).",
620
+ "optionalFiles": [
621
+ "victory-gates.md"
622
+ ],
623
+ "verification": "victory-gates.md exists with milestone completion criteria and evidence requirements."
624
+ }
583
625
  }
584
626
  ],
585
627
  "recommended": [
@@ -728,6 +770,28 @@
728
770
  "notes": "Run accessibility checks against key pages or components in CI; fail on critical violations while treating minor issues as warnings initially.",
729
771
  "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."
730
772
  }
773
+ },
774
+ {
775
+ "ciHints": {
776
+ "azure-devops": {
777
+ "notes": "Run invariant verification commands in a dedicated quality stage.",
778
+ "stage": "quality"
779
+ }
780
+ },
781
+ "description": "Maintain INVARIANTS.md defining repository-wide rules that must always hold true, with machine-readable verification commands for autonomous agents.",
782
+ "id": "agent-invariants",
783
+ "label": "Autonomous Agent Invariants",
784
+ "stack": {
785
+ "exampleConfigFiles": [
786
+ "INVARIANTS.md"
787
+ ],
788
+ "exampleTools": [],
789
+ "notes": "Create INVARIANTS.md with a table of rules, verification commands, and severity levels. Include commands like 'npm test', 'npm run lint', 'npm run typecheck' that agents can run to validate state.",
790
+ "requiredFiles": [
791
+ "INVARIANTS.md"
792
+ ],
793
+ "verification": "INVARIANTS.md exists with machine-readable verification commands for all critical repository rules."
794
+ }
731
795
  }
732
796
  ]
733
797
  },
@@ -580,6 +580,48 @@
580
580
  "notes": "Adopt structured JSON logging with correlation IDs and send logs to a centralized sink in production.",
581
581
  "verification": "Confirm that a structured logging library (such as Winston or Pino) is configured to emit JSON or key-value logs and that error handling routes important failures through this logger."
582
582
  }
583
+ },
584
+ {
585
+ "ciHints": {
586
+ "github-actions": {
587
+ "job": "ci"
588
+ }
589
+ },
590
+ "description": "Define phase transition requirements in phase-gates.md for autonomous agent workflows with clear pre-conditions and approval gates.",
591
+ "id": "agent-phase-gates",
592
+ "label": "Agent Phase Gates",
593
+ "stack": {
594
+ "exampleConfigFiles": [
595
+ "phase-gates.md"
596
+ ],
597
+ "exampleTools": [],
598
+ "notes": "Document phase transitions (Planning → Implementation → Verification → Release) with required pre-conditions, approval mechanisms, and evidence artifacts for each gate.",
599
+ "optionalFiles": [
600
+ "phase-gates.md"
601
+ ],
602
+ "verification": "phase-gates.md exists defining transition requirements between project phases."
603
+ }
604
+ },
605
+ {
606
+ "ciHints": {
607
+ "github-actions": {
608
+ "job": "ci"
609
+ }
610
+ },
611
+ "description": "Document milestone completion criteria in victory-gates.md defining 'done' for releases and major deliverables with evidence requirements.",
612
+ "id": "agent-victory-gates",
613
+ "label": "Agent Victory Gates",
614
+ "stack": {
615
+ "exampleConfigFiles": [
616
+ "victory-gates.md"
617
+ ],
618
+ "exampleTools": [],
619
+ "notes": "Define completion criteria for milestones (MVP, Beta, GA) with all required conditions, verification commands, and evidence artifacts (test reports, coverage, deployment confirmations).",
620
+ "optionalFiles": [
621
+ "victory-gates.md"
622
+ ],
623
+ "verification": "victory-gates.md exists with milestone completion criteria and evidence requirements."
624
+ }
583
625
  }
584
626
  ],
585
627
  "recommended": [
@@ -728,6 +770,28 @@
728
770
  "notes": "Run accessibility checks against key pages or components in CI; fail on critical violations while treating minor issues as warnings initially.",
729
771
  "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."
730
772
  }
773
+ },
774
+ {
775
+ "ciHints": {
776
+ "github-actions": {
777
+ "job": "ci",
778
+ "notes": "Add invariant checks to existing CI job or create dedicated invariants job."
779
+ }
780
+ },
781
+ "description": "Maintain INVARIANTS.md defining repository-wide rules that must always hold true, with machine-readable verification commands for autonomous agents.",
782
+ "id": "agent-invariants",
783
+ "label": "Autonomous Agent Invariants",
784
+ "stack": {
785
+ "exampleConfigFiles": [
786
+ "INVARIANTS.md"
787
+ ],
788
+ "exampleTools": [],
789
+ "notes": "Create INVARIANTS.md with a table of rules, verification commands, and severity levels. Include commands like 'npm test', 'npm run lint', 'npm run typecheck' that agents can run to validate state.",
790
+ "requiredFiles": [
791
+ "INVARIANTS.md"
792
+ ],
793
+ "verification": "INVARIANTS.md exists with machine-readable verification commands for all critical repository rules."
794
+ }
731
795
  }
732
796
  ]
733
797
  },
@@ -640,6 +640,54 @@
640
640
  "notes": "Adopt structured JSON logging with correlation IDs and send logs to a centralized sink in production.",
641
641
  "verification": "Confirm that a structured logging library (such as Winston or Pino) is configured to emit JSON or key-value logs and that error handling routes important failures through this logger."
642
642
  }
643
+ },
644
+ {
645
+ "ciHints": {
646
+ "azure-devops": {
647
+ "stage": "governance"
648
+ },
649
+ "github-actions": {
650
+ "job": "ci"
651
+ }
652
+ },
653
+ "description": "Define phase transition requirements in phase-gates.md for autonomous agent workflows with clear pre-conditions and approval gates.",
654
+ "id": "agent-phase-gates",
655
+ "label": "Agent Phase Gates",
656
+ "stack": {
657
+ "exampleConfigFiles": [
658
+ "phase-gates.md"
659
+ ],
660
+ "exampleTools": [],
661
+ "notes": "Document phase transitions (Planning → Implementation → Verification → Release) with required pre-conditions, approval mechanisms, and evidence artifacts for each gate.",
662
+ "optionalFiles": [
663
+ "phase-gates.md"
664
+ ],
665
+ "verification": "phase-gates.md exists defining transition requirements between project phases."
666
+ }
667
+ },
668
+ {
669
+ "ciHints": {
670
+ "azure-devops": {
671
+ "stage": "governance"
672
+ },
673
+ "github-actions": {
674
+ "job": "ci"
675
+ }
676
+ },
677
+ "description": "Document milestone completion criteria in victory-gates.md defining 'done' for releases and major deliverables with evidence requirements.",
678
+ "id": "agent-victory-gates",
679
+ "label": "Agent Victory Gates",
680
+ "stack": {
681
+ "exampleConfigFiles": [
682
+ "victory-gates.md"
683
+ ],
684
+ "exampleTools": [],
685
+ "notes": "Define completion criteria for milestones (MVP, Beta, GA) with all required conditions, verification commands, and evidence artifacts (test reports, coverage, deployment confirmations).",
686
+ "optionalFiles": [
687
+ "victory-gates.md"
688
+ ],
689
+ "verification": "victory-gates.md exists with milestone completion criteria and evidence requirements."
690
+ }
643
691
  }
644
692
  ],
645
693
  "recommended": [
@@ -808,6 +856,32 @@
808
856
  "notes": "Run accessibility checks against key pages or components in CI; fail on critical violations while treating minor issues as warnings initially.",
809
857
  "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."
810
858
  }
859
+ },
860
+ {
861
+ "ciHints": {
862
+ "azure-devops": {
863
+ "notes": "Run invariant verification commands in a dedicated quality stage.",
864
+ "stage": "quality"
865
+ },
866
+ "github-actions": {
867
+ "job": "ci",
868
+ "notes": "Add invariant checks to existing CI job or create dedicated invariants job."
869
+ }
870
+ },
871
+ "description": "Maintain INVARIANTS.md defining repository-wide rules that must always hold true, with machine-readable verification commands for autonomous agents.",
872
+ "id": "agent-invariants",
873
+ "label": "Autonomous Agent Invariants",
874
+ "stack": {
875
+ "exampleConfigFiles": [
876
+ "INVARIANTS.md"
877
+ ],
878
+ "exampleTools": [],
879
+ "notes": "Create INVARIANTS.md with a table of rules, verification commands, and severity levels. Include commands like 'npm test', 'npm run lint', 'npm run typecheck' that agents can run to validate state.",
880
+ "requiredFiles": [
881
+ "INVARIANTS.md"
882
+ ],
883
+ "verification": "INVARIANTS.md exists with machine-readable verification commands for all critical repository rules."
884
+ }
811
885
  }
812
886
  ]
813
887
  },
package/dist/index.cjs CHANGED
@@ -41,7 +41,7 @@ var import_node_fs = require("fs");
41
41
  var import_node_path = require("path");
42
42
 
43
43
  // src/version.ts
44
- var STANDARDS_VERSION = "4.2.0";
44
+ var STANDARDS_VERSION = "4.3.0";
45
45
  var STANDARDS_SCHEMA_VERSION = 4;
46
46
 
47
47
  // src/index.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../node_modules/tsup/assets/cjs_shims.js","../src/version.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\nimport { readFileSync } from \"node:fs\";\nimport { join, dirname } from \"node:path\";\nimport type {\n MasterJson,\n StackChecklistJson,\n StackId,\n CiSystem,\n} from \"./types.js\";\nimport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION } from \"./version.js\";\n\n// Re-export types for consumers\nexport type { MasterJson, StackChecklistJson, StackId, CiSystem };\n\n// Re-export version info (stable API contract)\nexport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION };\n\n// ESM equivalent of __dirname\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Path to config directory:\n// - When running from src/ (dev/test): use repo root config/\n// - When running from dist/ (installed): use dist/config/\nconst isDevMode = __dirname.includes(\"src\");\nconst configDir = isDevMode\n ? join(__dirname, \"..\", \"config\")\n : join(__dirname, \"config\");\n\n/** Load the master spec JSON from the packaged dist directory */\nexport function loadMasterSpec(): MasterJson {\n const filePath = join(configDir, \"standards.json\");\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** Load a stack-specific checklist (optionally filtered by CI system) */\nexport function loadBaseline(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n const suffix = ci ? `.${ci}` : \"\";\n const file = `standards.${stack}${suffix}.json`;\n const filePath = join(configDir, file);\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** List all supported stacks (derived from the master spec) */\nexport function listSupportedStacks(): readonly StackId[] {\n const spec = loadMasterSpec();\n return Object.keys(spec.stacks) as StackId[];\n}\n\n/** List all supported CI systems (derived from the master spec) */\nexport function listSupportedCiSystems(): readonly CiSystem[] {\n const spec = loadMasterSpec();\n return spec.ciSystems as CiSystem[];\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadBaseline - loads stack-specific standards checklist.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getStandards(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n return loadBaseline(stack, ci);\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadMasterSpec - loads the master standards schema.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getSchema(): MasterJson {\n return loadMasterSpec();\n}\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","/**\n * AUTO-GENERATED at build time by scripts/build.ts\n * DO NOT EDIT MANUALLY\n *\n * This module provides version information for the repo-standards package.\n * Consumers should import from here instead of package.json to avoid\n * ESM/CJS interop issues.\n */\n\nexport const STANDARDS_VERSION = '4.2.0';\nexport const STANDARDS_SCHEMA_VERSION = 4;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ADZ9D,sBAA8B;AAC9B,qBAA6B;AAC7B,uBAA8B;;;AEOvB,IAAM,oBAAoB;AAC1B,IAAM,2BAA2B;;;AFQxC,IAAMA,kBAAa,+BAAc,aAAe;AAChD,IAAM,gBAAY,0BAAQA,WAAU;AAKpC,IAAM,YAAY,UAAU,SAAS,KAAK;AAC1C,IAAM,YAAY,gBACd,uBAAK,WAAW,MAAM,QAAQ,QAC9B,uBAAK,WAAW,QAAQ;AAGrB,SAAS,iBAA6B;AAC3C,QAAM,eAAW,uBAAK,WAAW,gBAAgB;AACjD,SAAO,KAAK,UAAM,6BAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,aACd,OACA,IACoB;AACpB,QAAM,SAAS,KAAK,IAAI,EAAE,KAAK;AAC/B,QAAM,OAAO,aAAa,KAAK,GAAG,MAAM;AACxC,QAAM,eAAW,uBAAK,WAAW,IAAI;AACrC,SAAO,KAAK,UAAM,6BAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,sBAA0C;AACxD,QAAM,OAAO,eAAe;AAC5B,SAAO,OAAO,KAAK,KAAK,MAAM;AAChC;AAGO,SAAS,yBAA8C;AAC5D,QAAM,OAAO,eAAe;AAC5B,SAAO,KAAK;AACd;AAOO,SAAS,aACd,OACA,IACoB;AACpB,SAAO,aAAa,OAAO,EAAE;AAC/B;AAOO,SAAS,YAAwB;AACtC,SAAO,eAAe;AACxB;","names":["__filename"]}
1
+ {"version":3,"sources":["../src/index.ts","../node_modules/tsup/assets/cjs_shims.js","../src/version.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\nimport { readFileSync } from \"node:fs\";\nimport { join, dirname } from \"node:path\";\nimport type {\n MasterJson,\n StackChecklistJson,\n StackId,\n CiSystem,\n} from \"./types.js\";\nimport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION } from \"./version.js\";\n\n// Re-export types for consumers\nexport type { MasterJson, StackChecklistJson, StackId, CiSystem };\n\n// Re-export version info (stable API contract)\nexport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION };\n\n// ESM equivalent of __dirname\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Path to config directory:\n// - When running from src/ (dev/test): use repo root config/\n// - When running from dist/ (installed): use dist/config/\nconst isDevMode = __dirname.includes(\"src\");\nconst configDir = isDevMode\n ? join(__dirname, \"..\", \"config\")\n : join(__dirname, \"config\");\n\n/** Load the master spec JSON from the packaged dist directory */\nexport function loadMasterSpec(): MasterJson {\n const filePath = join(configDir, \"standards.json\");\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** Load a stack-specific checklist (optionally filtered by CI system) */\nexport function loadBaseline(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n const suffix = ci ? `.${ci}` : \"\";\n const file = `standards.${stack}${suffix}.json`;\n const filePath = join(configDir, file);\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** List all supported stacks (derived from the master spec) */\nexport function listSupportedStacks(): readonly StackId[] {\n const spec = loadMasterSpec();\n return Object.keys(spec.stacks) as StackId[];\n}\n\n/** List all supported CI systems (derived from the master spec) */\nexport function listSupportedCiSystems(): readonly CiSystem[] {\n const spec = loadMasterSpec();\n return spec.ciSystems as CiSystem[];\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadBaseline - loads stack-specific standards checklist.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getStandards(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n return loadBaseline(stack, ci);\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadMasterSpec - loads the master standards schema.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getSchema(): MasterJson {\n return loadMasterSpec();\n}\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","/**\n * AUTO-GENERATED at build time by scripts/build.ts\n * DO NOT EDIT MANUALLY\n *\n * This module provides version information for the repo-standards package.\n * Consumers should import from here instead of package.json to avoid\n * ESM/CJS interop issues.\n */\n\nexport const STANDARDS_VERSION = '4.3.0';\nexport const STANDARDS_SCHEMA_VERSION = 4;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ADZ9D,sBAA8B;AAC9B,qBAA6B;AAC7B,uBAA8B;;;AEOvB,IAAM,oBAAoB;AAC1B,IAAM,2BAA2B;;;AFQxC,IAAMA,kBAAa,+BAAc,aAAe;AAChD,IAAM,gBAAY,0BAAQA,WAAU;AAKpC,IAAM,YAAY,UAAU,SAAS,KAAK;AAC1C,IAAM,YAAY,gBACd,uBAAK,WAAW,MAAM,QAAQ,QAC9B,uBAAK,WAAW,QAAQ;AAGrB,SAAS,iBAA6B;AAC3C,QAAM,eAAW,uBAAK,WAAW,gBAAgB;AACjD,SAAO,KAAK,UAAM,6BAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,aACd,OACA,IACoB;AACpB,QAAM,SAAS,KAAK,IAAI,EAAE,KAAK;AAC/B,QAAM,OAAO,aAAa,KAAK,GAAG,MAAM;AACxC,QAAM,eAAW,uBAAK,WAAW,IAAI;AACrC,SAAO,KAAK,UAAM,6BAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,sBAA0C;AACxD,QAAM,OAAO,eAAe;AAC5B,SAAO,OAAO,KAAK,KAAK,MAAM;AAChC;AAGO,SAAS,yBAA8C;AAC5D,QAAM,OAAO,eAAe;AAC5B,SAAO,KAAK;AACd;AAOO,SAAS,aACd,OACA,IACoB;AACpB,SAAO,aAAa,OAAO,EAAE;AAC/B;AAOO,SAAS,YAAwB;AACtC,SAAO,eAAe;AACxB;","names":["__filename"]}
package/dist/index.d.cts CHANGED
@@ -156,7 +156,7 @@ interface StackChecklistJson {
156
156
  * Consumers should import from here instead of package.json to avoid
157
157
  * ESM/CJS interop issues.
158
158
  */
159
- declare const STANDARDS_VERSION = "4.2.0";
159
+ declare const STANDARDS_VERSION = "4.3.0";
160
160
  declare const STANDARDS_SCHEMA_VERSION = 4;
161
161
 
162
162
  /** Load the master spec JSON from the packaged dist directory */
package/dist/index.d.ts CHANGED
@@ -156,7 +156,7 @@ interface StackChecklistJson {
156
156
  * Consumers should import from here instead of package.json to avoid
157
157
  * ESM/CJS interop issues.
158
158
  */
159
- declare const STANDARDS_VERSION = "4.2.0";
159
+ declare const STANDARDS_VERSION = "4.3.0";
160
160
  declare const STANDARDS_SCHEMA_VERSION = 4;
161
161
 
162
162
  /** Load the master spec JSON from the packaged dist directory */
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { readFileSync } from "fs";
4
4
  import { join, dirname } from "path";
5
5
 
6
6
  // src/version.ts
7
- var STANDARDS_VERSION = "4.2.0";
7
+ var STANDARDS_VERSION = "4.3.0";
8
8
  var STANDARDS_SCHEMA_VERSION = 4;
9
9
 
10
10
  // src/index.ts
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/version.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\nimport { readFileSync } from \"node:fs\";\nimport { join, dirname } from \"node:path\";\nimport type {\n MasterJson,\n StackChecklistJson,\n StackId,\n CiSystem,\n} from \"./types.js\";\nimport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION } from \"./version.js\";\n\n// Re-export types for consumers\nexport type { MasterJson, StackChecklistJson, StackId, CiSystem };\n\n// Re-export version info (stable API contract)\nexport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION };\n\n// ESM equivalent of __dirname\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Path to config directory:\n// - When running from src/ (dev/test): use repo root config/\n// - When running from dist/ (installed): use dist/config/\nconst isDevMode = __dirname.includes(\"src\");\nconst configDir = isDevMode\n ? join(__dirname, \"..\", \"config\")\n : join(__dirname, \"config\");\n\n/** Load the master spec JSON from the packaged dist directory */\nexport function loadMasterSpec(): MasterJson {\n const filePath = join(configDir, \"standards.json\");\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** Load a stack-specific checklist (optionally filtered by CI system) */\nexport function loadBaseline(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n const suffix = ci ? `.${ci}` : \"\";\n const file = `standards.${stack}${suffix}.json`;\n const filePath = join(configDir, file);\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** List all supported stacks (derived from the master spec) */\nexport function listSupportedStacks(): readonly StackId[] {\n const spec = loadMasterSpec();\n return Object.keys(spec.stacks) as StackId[];\n}\n\n/** List all supported CI systems (derived from the master spec) */\nexport function listSupportedCiSystems(): readonly CiSystem[] {\n const spec = loadMasterSpec();\n return spec.ciSystems as CiSystem[];\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadBaseline - loads stack-specific standards checklist.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getStandards(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n return loadBaseline(stack, ci);\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadMasterSpec - loads the master standards schema.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getSchema(): MasterJson {\n return loadMasterSpec();\n}\n","/**\n * AUTO-GENERATED at build time by scripts/build.ts\n * DO NOT EDIT MANUALLY\n *\n * This module provides version information for the repo-standards package.\n * Consumers should import from here instead of package.json to avoid\n * ESM/CJS interop issues.\n */\n\nexport const STANDARDS_VERSION = '4.2.0';\nexport const STANDARDS_SCHEMA_VERSION = 4;\n"],"mappings":";AAAA,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,MAAM,eAAe;;;ACOvB,IAAM,oBAAoB;AAC1B,IAAM,2BAA2B;;;ADQxC,IAAMA,cAAa,cAAc,YAAY,GAAG;AAChD,IAAMC,aAAY,QAAQD,WAAU;AAKpC,IAAM,YAAYC,WAAU,SAAS,KAAK;AAC1C,IAAM,YAAY,YACd,KAAKA,YAAW,MAAM,QAAQ,IAC9B,KAAKA,YAAW,QAAQ;AAGrB,SAAS,iBAA6B;AAC3C,QAAM,WAAW,KAAK,WAAW,gBAAgB;AACjD,SAAO,KAAK,MAAM,aAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,aACd,OACA,IACoB;AACpB,QAAM,SAAS,KAAK,IAAI,EAAE,KAAK;AAC/B,QAAM,OAAO,aAAa,KAAK,GAAG,MAAM;AACxC,QAAM,WAAW,KAAK,WAAW,IAAI;AACrC,SAAO,KAAK,MAAM,aAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,sBAA0C;AACxD,QAAM,OAAO,eAAe;AAC5B,SAAO,OAAO,KAAK,KAAK,MAAM;AAChC;AAGO,SAAS,yBAA8C;AAC5D,QAAM,OAAO,eAAe;AAC5B,SAAO,KAAK;AACd;AAOO,SAAS,aACd,OACA,IACoB;AACpB,SAAO,aAAa,OAAO,EAAE;AAC/B;AAOO,SAAS,YAAwB;AACtC,SAAO,eAAe;AACxB;","names":["__filename","__dirname"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/version.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\nimport { readFileSync } from \"node:fs\";\nimport { join, dirname } from \"node:path\";\nimport type {\n MasterJson,\n StackChecklistJson,\n StackId,\n CiSystem,\n} from \"./types.js\";\nimport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION } from \"./version.js\";\n\n// Re-export types for consumers\nexport type { MasterJson, StackChecklistJson, StackId, CiSystem };\n\n// Re-export version info (stable API contract)\nexport { STANDARDS_VERSION, STANDARDS_SCHEMA_VERSION };\n\n// ESM equivalent of __dirname\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Path to config directory:\n// - When running from src/ (dev/test): use repo root config/\n// - When running from dist/ (installed): use dist/config/\nconst isDevMode = __dirname.includes(\"src\");\nconst configDir = isDevMode\n ? join(__dirname, \"..\", \"config\")\n : join(__dirname, \"config\");\n\n/** Load the master spec JSON from the packaged dist directory */\nexport function loadMasterSpec(): MasterJson {\n const filePath = join(configDir, \"standards.json\");\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** Load a stack-specific checklist (optionally filtered by CI system) */\nexport function loadBaseline(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n const suffix = ci ? `.${ci}` : \"\";\n const file = `standards.${stack}${suffix}.json`;\n const filePath = join(configDir, file);\n return JSON.parse(readFileSync(filePath, \"utf8\"));\n}\n\n/** List all supported stacks (derived from the master spec) */\nexport function listSupportedStacks(): readonly StackId[] {\n const spec = loadMasterSpec();\n return Object.keys(spec.stacks) as StackId[];\n}\n\n/** List all supported CI systems (derived from the master spec) */\nexport function listSupportedCiSystems(): readonly CiSystem[] {\n const spec = loadMasterSpec();\n return spec.ciSystems as CiSystem[];\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadBaseline - loads stack-specific standards checklist.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getStandards(\n stack: StackId,\n ci?: CiSystem,\n): StackChecklistJson {\n return loadBaseline(stack, ci);\n}\n\n/**\n * PUBLIC API CONTRACT (semver-governed)\n * Alias for loadMasterSpec - loads the master standards schema.\n * Breaking changes to this function signature require a major version bump.\n */\nexport function getSchema(): MasterJson {\n return loadMasterSpec();\n}\n","/**\n * AUTO-GENERATED at build time by scripts/build.ts\n * DO NOT EDIT MANUALLY\n *\n * This module provides version information for the repo-standards package.\n * Consumers should import from here instead of package.json to avoid\n * ESM/CJS interop issues.\n */\n\nexport const STANDARDS_VERSION = '4.3.0';\nexport const STANDARDS_SCHEMA_VERSION = 4;\n"],"mappings":";AAAA,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,MAAM,eAAe;;;ACOvB,IAAM,oBAAoB;AAC1B,IAAM,2BAA2B;;;ADQxC,IAAMA,cAAa,cAAc,YAAY,GAAG;AAChD,IAAMC,aAAY,QAAQD,WAAU;AAKpC,IAAM,YAAYC,WAAU,SAAS,KAAK;AAC1C,IAAM,YAAY,YACd,KAAKA,YAAW,MAAM,QAAQ,IAC9B,KAAKA,YAAW,QAAQ;AAGrB,SAAS,iBAA6B;AAC3C,QAAM,WAAW,KAAK,WAAW,gBAAgB;AACjD,SAAO,KAAK,MAAM,aAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,aACd,OACA,IACoB;AACpB,QAAM,SAAS,KAAK,IAAI,EAAE,KAAK;AAC/B,QAAM,OAAO,aAAa,KAAK,GAAG,MAAM;AACxC,QAAM,WAAW,KAAK,WAAW,IAAI;AACrC,SAAO,KAAK,MAAM,aAAa,UAAU,MAAM,CAAC;AAClD;AAGO,SAAS,sBAA0C;AACxD,QAAM,OAAO,eAAe;AAC5B,SAAO,OAAO,KAAK,KAAK,MAAM;AAChC;AAGO,SAAS,yBAA8C;AAC5D,QAAM,OAAO,eAAe;AAC5B,SAAO,KAAK;AACd;AAOO,SAAS,aACd,OACA,IACoB;AACpB,SAAO,aAAa,OAAO,EAAE;AAC/B;AAOO,SAAS,YAAwB;AACtC,SAAO,eAAe;AACxB;","names":["__filename","__dirname"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oddessentials/repo-standards",
3
3
  "private": false,
4
- "version": "4.3.0",
4
+ "version": "4.4.0",
5
5
  "description": "Standards and CI filtering utilities for multi-stack repository governance.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -0,0 +1,39 @@
1
+ // scripts/generate-readme-counts.ts
2
+ // Generates checklist item counts dynamically from standards.json
3
+ // Prevents count rot by computing at build time
4
+
5
+ import fs from "node:fs";
6
+ import path from "node:path";
7
+
8
+ interface MasterJson {
9
+ version: number;
10
+ checklist: {
11
+ core: unknown[];
12
+ recommended: unknown[];
13
+ optionalEnhancements: unknown[];
14
+ };
15
+ }
16
+
17
+ function main() {
18
+ const rootDir = process.cwd();
19
+ const masterPath = path.join(rootDir, "config", "standards.json");
20
+
21
+ if (!fs.existsSync(masterPath)) {
22
+ console.error(`standards.json not found at ${masterPath}`);
23
+ process.exit(1);
24
+ }
25
+
26
+ const raw = fs.readFileSync(masterPath, "utf8");
27
+ const master: MasterJson = JSON.parse(raw);
28
+
29
+ const coreCount = master.checklist.core.length;
30
+ const recommendedCount = master.checklist.recommended.length;
31
+ const optionalCount = master.checklist.optionalEnhancements.length;
32
+
33
+ // Output markdown snippet for README
34
+ console.log(
35
+ `**${coreCount} core** (required), **${recommendedCount} recommended**, **${optionalCount} optional enhancements**`,
36
+ );
37
+ }
38
+
39
+ main();