- Glob Patterns: Match files using wildcards (
*.ts, **/*.js, src/api/**/*.ts)
- Exclusion Patterns: Exclude specific files (
!**/*.test.ts)
- Brace Expansion: Match multiple extensions (
*.{ts,js,tsx})
- Pattern Trie: O(1) candidate lookup for performance
- Markdown Format: Human-readable decision documentation
- Single File Mode: All decisions in one
.decispher/decisions.md
- Directory Mode: Auto-discover all
.md files in .decispher/
- Nested Directories: Support for team-based organization
- External Rule Files: Reference JSON rules from separate files
| Level | Badge | Behavior |
|---|
| Critical | ๐ด | Can block PR merge |
| Warning | ๐ก | Highlighted but non-blocking |
| Info | โน๏ธ | Informational only |
| Status | Active? | Description |
|---|
active | โ
| Enforced on all checks |
deprecated | โ | Visible but not enforced |
superseded | โ | Replaced by another decision |
archived | โ | Historical record only |
| Mode | Description | Use Case |
|---|
string | Match exact strings in diff | Detect forbidden keywords |
regex | Match regular expressions | Complex pattern detection |
line_range | Match changes in line range | Protect file headers |
full_file | Match any change | Critical config files |
json_path | Match JSON key changes | Config value protection |
- OR Logic (
match_mode: "any"): Trigger if any condition matches
- AND Logic (
match_mode: "all"): Trigger only if all conditions match
- Nested Conditions: Combine AND/OR up to 10 levels deep
- File pattern with glob syntax
- Exclude patterns for exceptions
- Content rules for diff analysis
- Auto-post decision context on matching PRs
- Idempotent updates (no duplicate comments)
- Grouped by severity (Critical > Warning > Info)
- Decision count summary
- Pass/fail based on matched decisions
fail_on_critical option
fail_on_error for parse issues
- Detailed error reporting
- Pagination for 100+ files
- Streaming mode for 1000+ files
- Memory-efficient processing
- 3000+ file support
| Feature | Description |
|---|
| Pattern Trie | O(1) file candidate lookup |
| Regex Caching | Compiled patterns reused |
| Parallel Processing | Multi-rule evaluation |
| Streaming Mode | Batch processing for large PRs |
| Early Exit | Stop on first match when possible |
| Feature | Description |
|---|
| Path Traversal Protection | Blocks .. in paths |
| ReDoS Prevention | Safe-regex validation + timeout |
| Input Validation | Zod schema enforcement |
| Sandboxed Regex | 5-second timeout |
| No Credential Logging | Sensitive data protected |
- Comprehensive error messages
- Line-number error reporting
- Parse warnings for common issues
- Structured logging
- Performance metrics output
npx decision-guardian โ run checks locally without GitHub Actions:
check <path> โ scan a decision file against local git changes (--staged, --branch, --all)
checkall โ auto-discover all .decispher/ files
init [--template <name>] โ scaffold .decispher/ directory
template <name> [-o <path>] โ print or save starter templates
--help / --version โ global flags
Pre-built, production-ready templates:
basic โ Simple glob patterns and exclusions
advanced-rules โ Regex, JSON path, line-range, boolean logic
security โ Hardcoded credentials detection, auth enforcement
database โ Migration protection, schema locks, connection pool safety
api โ API versioning, endpoint protection, rate limiting
Privacy-first, anonymous usage analytics:
- Enabled by default (opt-out via
DG_TELEMETRY=0)
- Zero PII โ no source code, paths, names, or identifiers
- Runtime blocklist enforced before every send
- Fire-and-forget (5-second timeout, never blocks the tool)
Platform-agnostic core enabling multi-CI support:
ILogger and ISCMProvider interfaces for dependency inversion
src/adapters/github/ and src/adapters/local/ for platform isolation
- Zero
@actions/* imports in src/core/
- Extensible: adding GitLab/Bitbucket only requires implementing
ISCMProvider
Share decision rules across multiple repositories via:
- GitHub Action input references
- NPM package rules
- URL-based rule imports
**Labels**: security, database, breaking-change
Categorize decisions for filtering and organization.
Configure PR comment format:
- Markdown templates
- Variable substitution
- Conditional sections
- In-editor decision viewing
- Decision authoring assistance
- Pattern testing
- Decision management UI
- Repository insights
- Team collaboration
- Rule builder
| Feature | CODEOWNERS | Decision Guardian |
|---|
| File matching | โ
Glob patterns | โ
Glob + Content rules |
| Assign reviewers | โ
| โ |
| Context/reasoning | โ | โ
Rich markdown |
| Severity levels | โ | โ
Critical/Warning/Info |
| Content matching | โ | โ
Regex, string, etc. |
| Block PRs | โ | โ
Optional |
| Feature | Traditional ADR | Decision Guardian |
|---|
| Documentation | โ
| โ
|
| Automatic surfacing | โ | โ
|
| File association | โ | โ
|
| PR integration | โ | โ
|
| Enforcement | โ | โ
|
| Feature | Danger.js | Decision Guardian |
|---|
| Custom rules | โ
Full code | โ
Declarative |
| Setup complexity | High | Low |
| Learning curve | Steep | Minimal |
| Maintenance | Code changes | Markdown updates |
| Type safety | โ
| โ
|
- Initial release
- Core pattern matching
- Advanced rules system
- GitHub Action integration
- Performance optimizations
- Security features
- CLI Package:
npx decision-guardian โ run checks locally without GitHub Actions
check / checkall โ scan decisions against local git changes
init โ scaffold .decispher/ directory
template โ print or save starter templates
- 5 Decision Templates: basic, advanced-rules, security, database, api
- Opt-in Telemetry: privacy-first usage analytics with blocklist enforcement
- SOLID Architecture: Core engine decoupled from GitHub โ supports any SCM provider
- Platform-agnostic core: Zero
@actions/* imports in src/core/
Have a feature idea? We'd love to hear it!
| Feature | Votes | Status |
|---|
| VS Code extension | ๐ผ 0 | Under review |
| Custom comment format | ๐ผ 0 | Under review |
| Decision templates | ๐ผ 0 | โ
Shipped (v1.1) |
| GitLab support | ๐ผ 0 | Architecture ready (ISCMProvider) |
| Bitbucket support | ๐ผ 0 | Architecture ready (ISCMProvider) |
- Discuss First: Open an issue or discussion
- Design Review: For major features, create an RFC
- Implementation: Submit PR with tests
- Documentation: Update relevant docs
| Priority | Criteria |
|---|
| P0 (Critical) | Security issues, data loss bugs |
| P1 (High) | Core feature broken, many users affected |
| P2 (Medium) | Feature gaps, quality improvements |
| P3 (Low) | Nice-to-have, minor enhancements |
- Features deprecated with 2 minor versions notice
- Deprecated features work but show warnings
- Removed in next major version
- Migration guides provided