Hamburger Cross Icon
CodeRabbit Guardrails - Lunar Policy for Devex Build And Ci

CodeRabbit Guardrails

Policy Experimental Devex Build And Ci

Enforces CodeRabbit configuration standards. Validates that a CodeRabbit configuration file exists for customizing review behavior.

Add coderabbit to your lunar-config.yml:
uses: github://earthly/lunar-lib/policies/coderabbit@v1.0.5

Included Guardrails

This policy includes 1 guardrail that enforce standards for your devex build and ci.

Guardrail

config-exists

Ensures a CodeRabbit configuration file (.coderabbit.yaml or .coderabbit.yml) exists at the repository root. A config file allows teams to customize review behavior, set path filters, and configure review instructions.

coderabbit config yaml configuration
View Guardrail

How Guardrails Fit into Lunar

Lunar guardrails define your engineering standards as code. They evaluate data collected by integrations and produce pass/fail checks with actionable feedback.

Policies support gradual enforcement—from silent scoring to blocking PRs or deployments—letting you roll out standards at your own pace without disrupting existing workflows.

Learn How Lunar Works
1
Integrations Gather Data
Collectors extract metadata from code, CI pipelines, tool outputs, and scans
2
{ } Centralized as JSON
All data merged into each component's unified metadata document
3
Guardrails Enforce Standards This Policy
Real-time feedback in PRs and AI workflows

Example Evaluated Data

This policy evaluates structured metadata from the Component JSON. Here's an example of the data it checks:

{ } component.json Example Input
{
  "ai": {
    "native": {
      "coderabbit": {
        "config_file": ".coderabbit.yaml",
        "config_exists": true
      }
    }
  }
}

Required Integrations

This policy evaluates data gathered by one or more of the following integration(s). Make sure to enable them in your lunar-config.yml.

Documentation

View on GitHub

CodeRabbit Guardrails

CodeRabbit configuration and best-practices guardrails.

Overview

This policy enforces CodeRabbit configuration standards. It validates that a CodeRabbit configuration file exists for customizing review behavior, path filters, and review instructions.

Policies

Policy Severity Description
config-exists warning A .coderabbit.yaml config file should exist at the repo root

Required Data

Path Provided By Description
.ai.native.coderabbit.config_exists coderabbit collector Whether a CodeRabbit config file was detected

Installation

collectors:
  - uses: github://earthly/lunar-lib/collectors/coderabbit@main
    on: ["domain:your-domain"]
    secrets:
      GH_TOKEN: "${{ secrets.GH_TOKEN }}"

policies:
  - uses: github://earthly/lunar-lib/policies/coderabbit@main
    enforcement: report-pr

Examples

Passing

CodeRabbit config file exists:

{
  "ai": {
    "native": {
      "coderabbit": {
        "config_file": ".coderabbit.yaml",
        "config_exists": true
      }
    }
  }
}

Failing

No CodeRabbit config file found:

{
  "ai": {
    "native": {
      "coderabbit": {
        "config_exists": false
      }
    }
  }
}

Remediation

  • config-exists: Create a .coderabbit.yaml file at the repository root. See CodeRabbit docs for configuration options.

Open Source

This policy is open source and available on GitHub. Contribute improvements, report issues, or fork it for your own use.

View Repository

Common Use Cases

Explore how individual guardrails work with specific integrations.

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 100+ 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
Automate Now
Paste your AGENTS.md or manual process doc and get guardrails in minutes
Book a Demo