Dr Exercise Required Sections + DR Documentation Collector
Enforce Dr Exercise Required Sections using data collected by DR Documentation Collector. Automatically check operational readiness standards on every PR.
How DR Documentation Collector Powers This Guardrail
The DR Documentation Collector gathers metadata from your documentation systems. This data flows into Lunar's Component JSON, where the Dr Exercise Required Sections guardrail evaluates it against your standards.
When enabled, this check runs automatically on every PR and in AI coding workflows, providing real-time enforcement with actionable feedback.
Quick Start Configuration
Add both the collector and policy to your lunar-config.yml to enable this guardrail.
# Step 1: Enable the DR Documentation Collector
collectors:
- uses: github://earthly/lunar-lib/collectors/dr-docs@v1.0.0
# with: ...
# Step 2: Enable the Compliance Documentation Guardrails
policies:
- uses: github://earthly/lunar-lib/policies/compliance-docs@v1.0.0
include: [dr-exercise-required-sections]
# with: ...
What DR Documentation Collector Collects
This collector gathers the following data that the Dr Exercise Required Sections guardrail evaluates.
dr-plan
Collects the disaster recovery plan document (default: docs/dr-plan.md).
Expects YAML frontmatter with recovery objectives (rto_minutes, rpo_minutes),
review metadata (last_reviewed, approver), and a Markdown body with sections
covering recovery procedures.
dr-exercise
Collects DR exercise records from a directory (default: docs/dr-exercises/).
Each exercise is a date-prefixed Markdown file (e.g., 2025-11-15.md or
2025-11-15-database-failover.md) with optional YAML frontmatter for
exercise type and body sections documenting the scenario and outcomes.
Provides full exercise history and summary metrics.
Example Data Flow
Here's an example of the data that DR Documentation Collector writes to the Component JSON, which Dr Exercise Required Sections then evaluates.
{
"oncall": {
"disaster_recovery": {
"plan": {
"exists": true,
"path": "docs/dr-plan.md",
"rto_defined": true,
"rto_minutes": 60,
"rpo_defined": true,
"rpo_minutes": 15,
"last_reviewed": "2025-12-01",
"approver": "jane.doe@company.com",
"sections": [
"Overview",
"Recovery Steps",
"Contact List",
"Dependencies"
]
},
"exercises": [
{
"date": "2025-11-15",
"path": "docs/dr-exercises/2025-11-15.md",
"exercise_type": "tabletop",
"sections": [
"Scenario",
"Recovery Steps Tested",
"Participants",
"Action Items",
"Lessons Learned"
]
},
{
"date": "2025-05-20",
"path": "docs/dr-exercises/2025-05-20.md",
"exercise_type": "failover",
"sections": [
"Scenario",
"Recovery Steps Tested",
"Participants"
]
}
],
"latest_exercise_date": "2025-11-15",
"exercise_count": 2
}
}
}
Configuration Options
DR Documentation Collector Inputs
| Input | Required | Default | Description |
|---|---|---|---|
plan_paths |
Optional |
docs/dr-plan.md
|
Comma-separated list of candidate paths to the DR plan document (first match wins) |
exercise_dir_paths |
Optional |
docs/dr-exercises
|
Comma-separated list of candidate directories for DR exercise records (first match wins) |
Compliance Documentation Guardrails Inputs
| Input | Required | Default | Description |
|---|---|---|---|
max_days_since_exercise |
Optional |
365
|
Maximum number of days allowed since the last DR exercise |
plan_required_sections |
Optional |
Overview,Recovery Steps,Contact List
|
Comma-separated list of required sections in the DR plan |
exercise_required_sections |
Optional |
Scenario,Recovery Steps Tested,Participants
|
Comma-separated list of required sections in the DR exercise record |
exercises_check_all |
Optional |
false
|
Check required sections on all exercises (true) or only the latest (false) |
Ready to Automate Your Standards?
See how Lunar can turn your engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 100+ built-in guardrails.