Decision File Templates
March 14, 2026 ยท View on GitHub
Decision Guardian ships with 5 starter templates. Use them with init or template:
decision-guardian init --template security
decision-guardian template api > my-api-decisions.md
Available Templates
basic
Simple file-pattern decisions with glob matching. Best for getting started.
Covers: file paths, glob wildcards, severity levels, status tracking.
advanced-rules
JSON-based rules with regex, content matching, boolean logic, and line ranges.
Covers: content_rules, match_mode (any/all across conditions), content_match_mode (any/all across content rules), regex with flags, line_range, json_path.
security
Security-focused decisions: hardcoded secrets detection, auth middleware enforcement with AND logic.
Covers: credential patterns, regex content scanning, test file exclusions, content_match_mode: "all" to require both a route definition AND auth middleware in the same file.
database
Database migration and schema protection.
Covers: migration file guards, schema lock files, connection pool config, ORM settings.
api
API versioning, rate limiting, and contract protection.
Covers: OpenAPI spec changes, versioned endpoint paths, rate limit config files.
Template Format
All templates follow the standard decision file format:
<!-- DECISION-CATEGORY-NNN -->
## Decision: Title
**Status**: Active
**Date**: YYYY-MM-DD
**Severity**: Critical|Warning|Info
**Files**:
- `glob/pattern/**/*.ts`
### Context
Why this decision was made and what to do before changing it.
---
See README.md for the full format reference.