Implement CodeRabbit reference architecture with best-practice project layout.
Use when designing new CodeRabbit integrations, reviewing project structure,
or establishing architecture standards for CodeRabbit applications.
Trigger with phrases like "coderabbit architecture", "coderabbit best practices",
"coderabbit project structure", "how to organize coderabbit", "coderabbit layout".
Complete reference architecture for CodeRabbit AI code review in a production team. Covers the full configuration file, path-specific review instructions per project type, tool integrations, CI pipeline integration, and the review lifecycle. Use this as a starting template and customize for your team.
# .github/workflows/pr-checks.yml
name: PR Checks
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
# Your existing CI checks
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test
# CodeRabbit review gate (optional)
coderabbit-gate:
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: CodeRabbit review expected
uses: actions/github-script@v7
with:
script: |
core.info('CodeRabbit will review this PR automatically.');
core.info('Reviews typically post within 2-5 minutes.');
Step 4: Team Onboarding Document
# CodeRabbit Quick Reference for Developers
## What happens when you open a PR:
1. CodeRabbit reviews automatically (2-5 min)
2. Posts a walkthrough summary comment
3. Adds line-level suggestions
4. Sets review state (Approved / Changes Requested)
## Commands (post in any PR comment):
@coderabbitai full review - Re-review all files
@coderabbitai summary - Regenerate walkthrough
@coderabbitai resolve - Mark all comments resolved
@coderabbitai generate-docstrings - Auto-generate docstrings
@coderabbitai configuration - Show active config
@coderabbitai help - List all commands
## Tips:
- Reply to comments to teach CodeRabbit your preferences
- Add "WIP" to PR title to skip review
- Keep PRs under 500 lines for best review quality
- Use @coderabbitai run <recipe> for finishing touches
Output
Complete reference .coderabbit.yaml with all configuration sections
Project-specific path instruction templates
CI pipeline integration for review gating
Team onboarding quick reference document
Error Handling
Issue
Cause
Solution
Config not applied
YAML syntax error
Validate with python3 -c "import yaml; yaml.safe_load(open('.coderabbit.yaml'))"