Changelog
March 14, 2026 ยท View on GitHub
All notable changes to Decision Guardian will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.2.0] - 2026-03-15
๐ Bug Fixes
- BUG-001: Fixed all shipped templates using wrong JSON schema (
{files, content}โ{type, pattern, content_rules}) โ templates now produce matches correctly - BUG-002:
stringmode now accepts singularpatternas alias forpatternsarray instead of silently degrading to glob-only match - BUG-003:
json_pathmode now correctly detects nested key changes made in-place using context lines alongside diff lines - BUG-004:
--fail-on-errornow correctly exits 1 on rule parse failures (errors were previously pushed towarnings[]instead oferrors[]) - BUG-006:
content_rulesarray now supports AND logic viacontent_match_mode: "all"(previously always OR'd) - BUG-007: Documented that content matchers only scan added lines โ deleted lines are intentionally not matched
- BUG-008: Duplicate decision IDs now warned and deduplicated โ first occurrence wins, subsequent duplicates are skipped
- BUG-009: Decisions with only exclusion patterns (
!) inFilesnow emit a warning instead of silently never matching - BUG-010: Decisions with invalid
line_range(start > end) now throw a parse error instead of degrading to glob-only match - BUG-011: Decisions referencing a missing external rules file now throw a parse error instead of degrading to glob-only match
- BUG-012: Verified telemetry endpoint is reachable and correct
- BUG-013: Empty or whitespace-only decision files now emit a warning instead of silently succeeding
โจ New Features
- BUG-005: Added
content_match_mode: "any" | "all"toFileRuleโ enables AND logic acrosscontent_ruleswithin a single file rule (default:"any", no breaking change)
[1.1.0] - 2026-02-19
๐ Major Features
NPX CLI Package
Decision Guardian can now run locally without GitHub Actions!
npx decision-guardian- Run checks on your local machine- Multi-platform support - Works with any CI/CD system (GitLab CI, Jenkins, CircleCI, etc.)
- Three check modes:
--staged- Check only staged changes (default)--branch <base>- Compare against a specific branch--all- Check all uncommitted changes
- Commands:
check <path>- Check a specific decision filecheckall- Auto-discover and check all.decispher/filesinit [--template <name>]- Scaffold a new.decispher/directorytemplate <name> [-o <path>]- Print or save decision file templates--help- Show usage information--version- Show version number
- Colored output - Rich ANSI-formatted tables and summaries for better readability
- Compact bundle - Single file (~430KB) with zero external dependencies at runtime
Decision File Templates
Five production-ready templates to kickstart your decision documentation:
basic.md- Simple glob patterns and exclusionsadvanced-rules.md- Showcases regex, JSON path, line-range matching, and nested boolean logicsecurity.md- Hardcoded credentials detection, auth middleware enforcementdatabase.md- Migration protection, schema locks, connection pool safetyapi.md- API versioning, endpoint protection, rate limiting
Access templates via:
npx decision-guardian template security
npx decision-guardian init --template database
Opt-in Telemetry System
Privacy-first, anonymous usage analytics to improve Decision Guardian:
- Enabled by default - Must explicitly opt-out via
DG_TELEMETRY=0environment variable - Zero PII collection:
- โ No source code, file contents, or decision text
- โ No repo names, org names, usernames, emails, commit messages, branch names, file names, or file paths
- โ Only aggregated metrics: file count, decision count, match count, duration, node version, OS, CI flag
- Runtime blocklist - Privacy module validates every payload and throws an error if any blocked field is detected
- Fire-and-forget - Never blocks or slows down the tool (5-second timeout)
- 90-day retention - Data aggregated per-day on Cloudflare KV with automatic expiration
- Self-hostable - Configure custom endpoint via
DG_TELEMETRY_URL - Backend included - Cloudflare Worker source code provided in
workers/telemetry/
SOLID Architecture Refactor
Complete internal rewrite to support multiple platforms and extensibility:
- Platform-agnostic core -
src/core/has zero@actions/*imports - Dependency Inversion Principle:
ILoggerinterface - Abstracts logging (implementations for GitHub Actions and CLI)ISCMProviderinterface - Abstracts source control (implementations for GitHub and local git)
- Adapter Pattern:
src/adapters/github/- GitHub Actions-specific code (@actions/core, @actions/github)src/adapters/local/- Local CLI code (ANSI console, git diff execution)
- Extensibility - Adding GitLab or Bitbucket support only requires implementing
ISCMProvider - Separation of concerns:
- Core engine handles decision parsing, pattern matching, rule evaluation
- Adapters handle platform-specific I/O (logging, comments, file retrieval)
- Entry points (
main.ts,cli/index.ts) orchestrate components
Note: This is an internal architectural refactor. Existing GitHub Action workflows require zero changes.
โจ Enhancements
GitHub Action Improvements
- "All Clear" status - Existing PR comments now update to show "All Clear โ " when no violations are detected in subsequent commits
- Comment lifecycle - Comments automatically revert to violation status if new changes trigger rules
- Idempotent updates - Comments only update when decision matches change (content hash-based)
- Self-healing - Automatically cleans up duplicate comments if conflicts occur
Core Engine Improvements
- Decoupled metrics -
MetricsCollectornow providesgetSnapshot()instead of directly calling@actions/core - Platform-agnostic logging -
logStructured()now accepts anILoggerparameter - Split health checks:
src/core/health.ts-checkDecisionFileExists()(platform-agnostic)src/adapters/github/health.ts-validateToken()(GitHub-specific)
- Injected dependencies -
FileMatcher,RuleEvaluator, andContentMatchersnow acceptILoggervia constructor injection
Performance
- Unchanged GitHub Action behavior - Zero regression for existing workflows (verified via regression tests)
- Optimized CLI build - Uses
@vercel/nccfor single-file distribution - Minimal overhead - Abstraction layers add negligible runtime cost (<1%)
๐ Documentation
New Documentation Files
docs/cli/CLI.md- Complete CLI reference with all commands, flags, and examplesdocs/common/ARCHITECTURE.md- SOLID design principles, module map, data flow diagrams, extensibility guidedocs/common/TELEMETRY.md- Privacy policy, opt-in instructions, payload schema, architecturedocs/common/TEMPLATES.md- Template catalog and customization guideworkers/telemetry/README.md- Cloudflare Worker setup and deployment instructions
Updated Documentation
-
README.md:- Added CLI quickstart section
- Added trust & safety section with explicit security guarantees
- Added demo GIF visualization
- Enhanced feature list with CLI and telemetry
- Updated architecture diagram for v1.1 structure
- Added links to new docs
-
Contributing.md:- Updated project structure to reflect new architecture
- Added commit scopes for new modules (cli, telemetry, adapters)
- Documented SOLID principles for contributors
- Added guidelines for creating new SCM provider adapters
-
SECURITY.md:- Added opt-in telemetry privacy section
- Clarified "no external network calls by default" guarantee
- Documented blocklist enforcement for telemetry payloads
-
FEATURES_ROADMAP.md:- Moved CLI package from "Planned" to "v1.1.0" (Shipped)
- Moved Decision Templates from "Planned" to "v1.1.0" (Shipped)
- Updated GitLab/Bitbucket support status to "Architecture ready (ISCMProvider)"
- Added v1.1 feature summary with CLI, templates, and telemetry details
-
APP_WORKING.md:- Updated component architecture diagram to show
src/core/,src/adapters/,src/cli/,src/telemetry/ - Documented ILogger and ISCMProvider interfaces
- Added CLI data flow diagram
- Updated module responsibilities for SOLID architecture
- Updated component architecture diagram to show
๐ง Technical Changes
Project Structure
decision-guardian/
โโโ src/
โ โโโ core/ # NEW: Platform-agnostic engine
โ โ โโโ interfaces/ # NEW: ILogger, ISCMProvider
โ โ โโโ parser.ts # MOVED from src/
โ โ โโโ matcher.ts # MOVED + MODIFIED (ILogger injection)
โ โ โโโ rule-evaluator.ts # MOVED + MODIFIED (ILogger injection)
โ โ โโโ content-matchers.ts # MOVED + MODIFIED (ILogger injection)
โ โ โโโ trie.ts # MOVED from src/
โ โ โโโ rule-parser.ts # MOVED from src/
โ โ โโโ metrics.ts # MODIFIED (removed @actions/core, added getSnapshot())
โ โ โโโ logger.ts # MOVED + MODIFIED (ILogger-based logStructured)
โ โ โโโ health.ts # SPLIT (only checkDecisionFileExists)
โ โ โโโ types.ts # MOVED from src/
โ โ โโโ rule-types.ts # MOVED from src/
โ โ
โ โโโ adapters/ # NEW: Platform-specific implementations
โ โ โโโ github/
โ โ โ โโโ actions-logger.ts # NEW: ILogger โ @actions/core
โ โ โ โโโ github-provider.ts # NEW: ISCMProvider for GitHub
โ โ โ โโโ comment.ts # MOVED from src/
โ โ โ โโโ health.ts # NEW: validateToken() (GitHub-specific)
โ โ โโโ local/
โ โ โโโ console-logger.ts # NEW: ILogger โ ANSI colors
โ โ โโโ local-git-provider.ts # NEW: ISCMProvider โ git diff
โ โ
โ โโโ cli/ # NEW: CLI entry point and commands
โ โ โโโ index.ts # NEW: #!/usr/bin/env node
โ โ โโโ commands/
โ โ โ โโโ check.ts # NEW: check / checkall
โ โ โ โโโ init.ts # NEW: scaffold .decispher/
โ โ โ โโโ template.ts # NEW: template output
โ โ โโโ formatter.ts # NEW: ANSI-colored tables
โ โ โโโ paths.ts # NEW: Template directory resolution
โ โ
โ โโโ telemetry/ # NEW: Opt-in analytics
โ โ โโโ sender.ts # NEW: Fire-and-forget HTTP sender
โ โ โโโ payload.ts # NEW: Type-safe payload builder
โ โ โโโ privacy.ts # NEW: Blocklist validation
โ โ
โ โโโ main.ts # MODIFIED: Uses adapters, metrics.getSnapshot()
โ
โโโ templates/ # NEW: Decision file templates
โ โโโ basic.md
โ โโโ advanced-rules.md
โ โโโ security.md
โ โโโ database.md
โ โโโ api.md
โ
โโโ workers/telemetry/ # NEW: Cloudflare Worker backend
โ โโโ worker.ts # NEW: POST /collect + GET /stats
โ โโโ wrangler.toml # NEW: Deployment config
โ โโโ README.md # NEW: Setup guide
โ
โโโ docs/ # NEW: CLI, architecture, telemetry docs
โ โโโ cli/CLI.md
โ โโโ common/ARCHITECTURE.md
โ โโโ common/TELEMETRY.md
โ โโโ common/TEMPLATES.md
โ โโโ common/guide_indepth.md
โ โโโ github/APP_WORKING.md
โ
โโโ tests/ # REORGANIZED and EXPANDED
โ โโโ core/ # Tests for src/core/ modules
โ โโโ cli/ # NEW: CLI command tests
โ โโโ adapters/ # NEW: Adapter tests
โ โโโ telemetry/ # NEW: Telemetry tests
โ โโโ fixtures/ # Test fixtures
โ
โโโ package.json # MODIFIED: Added bin, build:cli script, files array
Removed Files
All backward-compatibility shims have been removed:
src/parser.ts,src/matcher.ts,src/rule-evaluator.ts, etc. (moved tosrc/core/)src/github-utils.ts(split intoadapters/github/github-provider.tsandadapters/github/health.ts)src/comment.ts(moved toadapters/github/comment.ts)
Build System
- New script:
npm run build:cli- Bundles CLI todist/cli/index.js(~430KB) - Updated
package.json:- Added
binentry fordecision-guardianCLI - Added
filesarray for npm publishing (includesdist/,templates/,README.md,LICENSE) - Updated build targets for both Action and CLI
- Added
๐งช Testing
New Test Suites
tests/cli/check.test.ts- CLI check/checkall commandstests/cli/init.test.ts- Directory scaffoldingtests/cli/template.test.ts- Template output (validates all 5 templates)tests/adapters/actions-logger.test.ts- ILogger contract compliancetests/adapters/local-git-provider.test.ts- Git diff parsing, staged/branch/all modestests/telemetry/sender.test.ts- Timeout, error handlingtests/telemetry/payload.test.ts- Payload constructiontests/telemetry/privacy.test.ts- Blocklist enforcement (validates all blocked fields throw errors)
Updated Test Suites
- ALL tests updated to import from
src/core/andsrc/adapters/instead of rootsrc/ - ALL tests now use
ILoggermocks instead of mocking@actions/coredirectly - Regression suite added to verify
src/core/has zero@actions/*imports
Test Coverage
- Total tests: 109+ (up from 86 in v1.0)
- Core coverage: 85%+ (parser, matcher, rule-evaluator, content-matchers, trie)
- Adapter coverage: 80%+ (GitHub and local adapters)
- CLI coverage: 75%+ (all commands)
- Telemetry coverage: 90%+ (privacy blocklist is critical)
๐ Security
Enhanced Privacy
- Runtime blocklist enforcement - Privacy module validates payloads before sending
- No PII in telemetry - Comprehensive list of blocked fields enforced at module boundary
- Fire-and-forget - Telemetry never affects tool behavior or exposes errors
Existing Security Features (unchanged)
- โ Path traversal protection
- โ ReDoS prevention (safe-regex + VM sandbox with 5s timeout)
- โ Input validation (Zod schemas)
- โ Read-only access (except PR comments)
๐ Bug Fixes
- Fixed: Comment manager now correctly handles "All Clear" status transitions
- Fixed: Duplicate comment cleanup is more robust (idempotent)
- Fixed: Metrics now platform-agnostic (no accidental
core.setOutput()calls in core modules)
๐ Migration Guide
For GitHub Action Users
No changes required! v1.1 is 100% backward compatible with v1.0 workflows.
# This continues to work exactly as before
- uses: DecispherHQ/decision-guardian@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
decision_file: '.decispher/decisions.md'
fail_on_critical: true
Optional: Disable telemetry (telemetry is enabled by default)
- uses: DecispherHQ/decision-guardian@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
DG_TELEMETRY: '0' # โ Disable anonymous usage analytics
For Local Development (NEW)
Before v1.1: Had to run GitHub Action in fork to test decision files
v1.1: Run checks locally
# Install globally
npm install -g decision-guardian
# Or use directly via npx
npx decision-guardian check .decispher/decisions.md --staged
npx decision-guardian checkall --fail-on-critical
CI/CD Integration (Non-GitHub)
# GitLab CI example
check-decisions:
image: node:20
script:
- npx decision-guardian check .decispher/decisions.md --branch $CI_MERGE_REQUEST_TARGET_BRANCH_NAME --fail-on-critical
๐ฏ Verification Gates
All changes passed comprehensive verification:
โ Zero GitHub Action regression
npm run bundleโdist/index.jsbehavior unchanged- All existing workflows continue to work
- Existing tests pass without modification
โ
Zero @actions imports in src/core/
grep -r "@actions" src/core/ # โ No results
โ All tests pass
npm test # โ 109 tests, 23 suites, all pass
โ CLI bundle size under target
ls -lh dist/cli/index.js # โ ~430KB (target: <500KB)
โ CLI works without GitHub environment
unset GITHUB_TOKEN GITHUB_ACTIONS
npx decision-guardian check .decispher/decisions.md --all # โ Works
โ Manual smoke tests
- โ
decision-guardian --help- Shows usage - โ
decision-guardian --version- Shows version - โ
decision-guardian init- Creates.decispher/decisions.md - โ
decision-guardian template security- Prints template - โ
decision-guardian check .decispher/decisions.md --staged- Runs check - โ
decision-guardian checkall- Auto-discovers files
๐ฆ Dependencies
No New Runtime Dependencies
All new features use built-in Node.js APIs:
- CLI argument parsing:
util.parseArgs(Node.js 18+) - ANSI colors: Manual escape codes (no chalk dependency)
- Git diff:
child_process.execSync(Node.js built-in) - HTTP telemetry:
fetch(Node.js 18+)
Development Dependencies (unchanged)
@vercel/ncc- Already used for bundlingjest,typescript,eslint,prettier- No changes
๐ Performance
Benchmarks (MacBook Pro M1, 16GB RAM)
| Scenario | Files | Decisions | Time (v1.0) | Time (v1.1) | Change |
|---|---|---|---|---|---|
| Small PR | 10 | 50 | 1.2s | 1.2s | ยฑ0% |
| Medium PR | 100 | 200 | 2.8s | 2.9s | +3% |
| Large PR | 500 | 500 | 8.4s | 8.6s | +2% |
| Huge PR | 3000 | 1000 | 34s | 35s | +3% |
Conclusion: Abstraction overhead is negligible (<5%). Performance remains excellent.
๐ Acknowledgments
This release represents a major architectural evolution of Decision Guardian:
- SOLID principles applied throughout for extensibility
- Privacy-first telemetry designed with input from security engineers
- CLI usability tested with developers unfamiliar with the tool
- Template quality validated against real-world architectural decisions
Special thanks to early testers who provided feedback on the CLI UX and template content.
๐ฎ What's Next
Planned for v1.2
- GitLab CI Support -
GitLabProviderimplementingISCMProvider - Bitbucket Pipelines Support -
BitbucketProviderimplementingISCMProvider - Enhanced Templates - More domain-specific templates (frontend, mobile, ML/AI)
Under Consideration
- VS Code Extension - View decisions in-editor, pattern testing, authoring assistance
- Web Dashboard - Visualize decision metrics, file hotspots, team insights
- Decision Inheritance -
Extends: DECISION-BASE-001for composable rules - Cross-Repository Rules - Share decisions across multiple repos
See FEATURES_ROADMAP.md for full roadmap.
[1.0.0] - 2024-02-09
๐ Initial Release
Decision Guardian launched as a GitHub Action to surface architectural decisions on Pull Requests.
Core Features
- โ
Markdown-based decision file format (
.decispher/decisions.md) - โ Glob pattern matching with Trie optimization (O(log n))
- โ Advanced JSON rule system (regex, content matching, boolean logic)
- โ Automatic PR comment posting with severity grouping (Critical, Warning, Info)
- โ Idempotent comment updates (hash-based change detection)
- โ Large PR support (handles 3000+ files via streaming)
- โ Progressive comment truncation (6-layer fallback)
- โ Security hardening (path traversal protection, ReDoS prevention)
- โ Performance optimizations (regex caching, parallel evaluation)
Documentation
README.md- Quick start, examples, configuration referenceContributing.md- Development setup, coding standardsSECURITY.md- Trust guarantees, vulnerability reportingAPP_WORKING.md- Technical deep-diveDECISIONS_FORMAT.md- Decision file specificationFEATURES_ROADMAP.md- Feature roadmapdecision_guardian-guide_indepth.md- Comprehensive guidedecision_guardian_guide_overview.md- High-level overview
Technology Stack
- TypeScript 5.3.x
- Node.js 20.x
- GitHub Actions API
- Jest (86 tests)
For full changelog history, see GitHub Releases
Version Naming Convention
- Major (X.0.0): Breaking changes, significant architecture changes
- Minor (1.X.0): New features, backward compatible
- Patch (1.0.X): Bug fixes, documentation updates
Links
- GitHub Repository: https://github.com/DecispherHQ/decision-guardian
- GitHub Marketplace: https://github.com/marketplace/actions/decision-guardian
- Website: https://decision-guardian.decispher.com
- Issues: https://github.com/DecispherHQ/decision-guardian/issues
- Discussions: https://github.com/DecispherHQ/decision-guardian/discussions