Hamburger Cross Icon
Dr Plan Exists
+
Compliance Documentation Collector

Dr Plan Exists + Compliance Documentation Collector

✓ Guardrail ↓ Collector Stable Operational Readiness

Enforce Dr Plan Exists using data collected by Compliance Documentation Collector. Automatically check operational readiness standards on every PR.

Guardrail: Verifies that a disaster recovery plan exists in the repository. Every production service should have documented recovery procedures to ensure teams can respond effectively during outages.
Data Source: Collect compliance evidence records kept in the repository, such as dated penetration-test records that point to the confidential report, so policies can check the evidence is current.

How Compliance Documentation Collector Powers This Guardrail

The Compliance Documentation Collector gathers metadata from your documentation, security systems. This data flows into Lunar's Component JSON, where the Dr Plan Exists 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.

1
↓ Compliance Documentation Collector Gathers Data Collector
Extracts metadata from code, configs, and tool outputs
2
{ } Component JSON
Data centralized in structured format for evaluation
3
✓ Dr Plan Exists Checks Guardrail
Pass/fail result with actionable feedback in PRs

Quick Start Configuration

Add both the collector and policy to your lunar-config.yml to enable this guardrail.

📄 lunar-config.yml
# Step 1: Enable the Compliance Documentation Collector
collectors:
  - uses: github://earthly/lunar-lib/collectors/compliance-docs@v1.0.5
    # with: ...

# Step 2: Enable the Compliance Documentation Guardrails
policies:
  - uses: github://earthly/lunar-lib/policies/compliance-docs@v1.0.5
    include: [dr-plan-exists]
    # with: ...

What Compliance Documentation Collector Collects

This collector gathers the following data that the Dr Plan Exists guardrail evaluates.

Collector code

pentest

Collects penetration-test records from a directory (default: docs/pentests/). Each record is a Markdown file named for the report date (e.g. 2026-03-14.md or 2026-03-14-external.md), with optional YAML frontmatter for the provider, scope and a link to the report. Writes an empty list when there are no records.

Example Data Flow

Here's an example of the data that Compliance Documentation Collector writes to the Component JSON, which Dr Plan Exists then evaluates.

{
  "compliance": {
    "penetration_testing": {
      "reports": [
        {
          "date": "2026-03-14",
          "path": "docs/pentests/2026-03-14.md",
          "provider": "Example Security Ltd",
          "scope": "Public API, customer web app",
          "report_url": "https://grc.example.com/reports/pentest-2026-03-14"
        },
        {
          "date": "2025-03-02",
          "path": "docs/pentests/2025-03-02-external.md",
          "provider": "Example Security Ltd",
          "scope": "External network"
        }
      ]
    }
  }
}

Configuration Options

Compliance Documentation Collector Inputs

Input Required Default Description
pentest_dir_paths Optional docs/pentests Comma-separated list of candidate directories for pen-test 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)
max_days_since_pentest Optional 365 Maximum number of days allowed since the latest penetration-test report

Ready to Automate Your Standards?

See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 300+ built-in guardrails.

Works with any process
check AI agent rules & prompt files
check Post-mortem action items
check Security & compliance policies
check Testing & quality requirements
Auto-ID My Guardrails
Paste your AGENTS.md or manual process doc and get guardrails in minutes
Book a Demo