Configuration
Customize how CodePeel reviews your code directly from the CodePeel Web Dashboard. You can control review aggressiveness, ignore generated files, add custom instructions and team expert rules, and toggle automation features like auto-fix.
Configuration is entirely optional — CodePeel works with sensible, balanced defaults out of the box.
There is no config file in your repository. CodePeel does not read a .codepeel.yml (or any file) from your repo — all settings live in the dashboard and apply to every review surface.
Which config applies, and when
CodePeel loads settings fresh at the start of every review. There is no caching between reviews, so a saved change applies to the next PR push, the next VS Code review, and the next MCP review — nothing else is required.
The two levels and the exact switch:
| Priority | Level | Stored in |
|---|---|---|
| 1 (Highest) | Repository config | Saved from the Repository Config modal (Form or YAML tab) for a specific owner/repo |
| 2 | Global account settings | /app/settings — defaults for every repository in your account |
| Default | CodePeel defaults | Balanced profile, formatting ignored |
The switch: if a repository config has been saved (it has not been reverted), that config is used for every review of that repository. If the repository has no saved config, or its YAML cannot be parsed, the review falls back to your global account settings. Nothing is posted to GitHub about which level was used — the Repository Config modal always shows the exact YAML currently in effect.
Per-key fallback: a repository config does not need to define every key. Any top-level key you leave out falls back to your global setting for that key (and object-style keys like auto_review merge key-by-key over your globals). So a repo config with only custom_instructions still inherits your global ignored paths.
VS Code extension & MCP: reviews run through the same backend and resolve the same dashboard config (repo config first, then global settings). From these they apply:
ignore_paths,custom_instructions,strictMode,securityOnly, and customrules(Pro, Team, and Max plans). PR reviews additionally applyignoreFormatting,expert_rules,auto_review.profile,auto_review.tone_instructions,auto_review.ignore_title_keywords,security.custom_patterns,auto_description, andauto_fix— those keys are PR-review-only.
Configuring via the Web Dashboard
1. Repository-Specific Configuration
Each connected repository can have its own tailored configuration:
- In the CodePeel sidebar, click Repositories (
/app/repositories) - Select your repository
- Click the Repository Config button in the header
- Edit your settings using either the Visual Form tab or the YAML Editor tab
- Click Save Configuration
The YAML is validated for syntax before saving; a syntax error is rejected with a message and nothing is saved. If you want a repository to go back to your global settings, click Revert to Global Defaults in the modal footer — this deletes the repository override.
Visual Form Tab
The Form tab provides straightforward controls for everyday settings:
- Review Profile: Choose between
chill,balanced(default), orassertive - Strict Mode: Toggle stricter analysis criteria to catch subtle nitpicks and style suggestions
- Security-Only Mode: Limit reviews strictly to vulnerabilities, secrets, and security flaws
- Ignore Formatting: Suppress purely aesthetic, naming, or whitespace findings (enabled by default)
- Auto-Description: Automatically generate PR descriptions, with an option to post them to GitHub
- Auto-Fix (Pro, Team, Max): Automatically generate fix pull requests for addressable findings
- Custom Instructions: Describe your framework, architecture patterns, and conventions (appended to every AI review prompt)
- Ignored Paths: Minimatch glob patterns (one per line) for files to exclude from reviews (e.g.
tests/**,dist/**,*.lock) - Expert Rules: High-priority team standards (one per line) interpreted contextually by the AI
YAML Editor Tab
The YAML tab provides a full code editor for power users:
- Edit the entire configuration as YAML with syntax highlighting
- Changes in the YAML tab automatically synchronize with the Form tab in real-time
- Built-in syntax validator detects errors before saving
- Direct access to advanced keys like
rules(custom compliance regex) andsecurity.custom_patterns
2. Global Account Settings
Located at /app/settings in the web dashboard sidebar. Global settings establish default review rules and automation toggles across all connected repositories in your account.
When a repository has its own repository-specific configuration saved, that repository's settings take precedence over your global account defaults.
Configuration Reference
The full set of keys the review engine reads, as YAML in the Repository Config editor:
# Repository Configuration — full reference
ignore_paths:
- "node_modules/**"
- "*.lock"
- "dist/**"
- "vendor/**"
custom_instructions: |
This is a TypeScript monorepo using pnpm workspaces.
We prefer functional patterns over class-based OOP.
expert_rules:
- "Never use console.log in production code"
- "All async functions must have error handling"
rules:
- id: no-console-log
pattern: "console\\.log\\("
message: "Remove console.log before merging"
severity: medium
paths: ["src/**"]
exclude_paths: ["**/*.test.*"]
category: quality
strictMode: false
securityOnly: false
ignoreFormatting: true
auto_review:
ignore_title_keywords: ["WIP", "DO NOT REVIEW"]
profile: balanced
tone_instructions: ""
security:
custom_patterns:
- "MY_API_KEY_[A-Za-z0-9]{16,}"
- "sk_(live|test)_[A-Za-z0-9]{24}"
auto_description:
enabled: true
postToGithub: false
auto_fix:
enabled: false
Top-Level Keys
ignore_paths
An array of glob patterns specifying files to exclude from review. Uses minimatch syntax with the dot: true option, meaning dotfiles are matched. Patterns are tested against the file path relative to the repository root.
ignore_paths:
- "node_modules/**"
- "dist/**"
- "*.lock"
- "generated/**"
- "*.min.js"
- "vendor/**"
- "**/*.snap"
Ignored paths apply to all review surfaces: GitHub PR reviews, the VS Code extension, and the MCP server. Matching files are dropped from the diff before any analysis runs, so they produce no findings and consume no review capacity.
| Pattern | Matches |
|---|---|
"*.lock" | Lock files in root only |
"dist/**" | Everything in dist/ recursively |
"**/*.test.ts" | All TypeScript test files in any directory |
"generated/**" | All generated code |
"docs/**/*.md" | Markdown files in docs/ |
"**/*.snap" | Jest snapshot files anywhere |
custom_instructions
Free-text instructions appended to the AI prompt for every review. Use this to describe your project, technology stack, or review preferences.
custom_instructions: |
This is a TypeScript monorepo using pnpm workspaces.
We prefer functional patterns over class-based OOP.
All API routes must validate input with Zod schemas.
Instructions are capped at 2,000 characters and sanitized against prompt-injection phrases ("ignore all findings" and similar are stripped). Keep instructions concise and specific. Vague instructions like "be thorough" have little effect. Specific instructions like "All database queries must use the repository pattern" produce targeted findings.
strictMode
When set to true, the AI is instructed to flag more issues, including nitpicks and minor style suggestions that would normally be suppressed. Default is false.
strictMode: true
securityOnly
When set to true, only security vulnerabilities are reported. Bug, performance, and architecture findings are suppressed, and the architecture review layer is skipped entirely, reducing review time. Default is false.
securityOnly: true
ignoreFormatting
When set to true (the default), style, naming, and formatting issues are suppressed. Set to false if you want the AI to flag formatting inconsistencies. Applies to GitHub PR reviews.
ignoreFormatting: false
Expert Rules
Expert rules are injected directly into the AI prompt as team preferences. They are the most powerful way to enforce conventions that require judgment — the AI interprets them contextually rather than matching patterns literally.
expert_rules:
- "Use Zod for all runtime type validation"
- "React components must use named exports, not default exports"
- "API routes must validate request body with a schema"
Each rule is a plain string. Up to the first 20 rules are included in the PR review prompt under "EXPERT RULES (must always be enforced)". Because the AI uses judgment, expert rules can express nuanced preferences that regex patterns cannot capture. Expert rules apply to GitHub PR reviews.
Tips for effective rules
- Be specific. "Use parameterized queries" is better than "Be careful with databases."
- Keep rules short. One clear instruction per line.
- Do not exceed approximately 10 rules (20 is the hard cap in the prompt). Too many dilutes the AI's attention and increases the chance of false positives.
- Focus on conventions that are hard to enforce with linters. If ESLint can catch it, use ESLint instead.
Custom Compliance Rules
Unlike expert_rules (which are AI-interpreted suggestions), rules are pattern-based matchers that flag exact violations. They run during a dedicated enforcement pass and produce deterministic results — if the pattern exists in added lines, it is flagged. Every time. Custom rules require a Pro, Team, or Max plan; on lower tiers they are silently skipped.
How rules work
Rules are evaluated against every added line in the diff (lines starting with +). The pattern field is a regular expression tested against each line individually. When a match is found, the rule's message is posted as an inline comment on that line.
Regex safety: invalid patterns are skipped silently (the rule simply never fires). There is no catastrophic-backtracking guard, so avoid nested quantifiers like (a+)+ and overlapping alternations like (a|b+)+ — they can still hang the enforcement pass. Keep patterns simple and test at regex101.com before saving.
Rules include context-aware logic to reduce false positives: a match is suppressed when the line is a transaction/batch call (e.g. transaction.update(...)) or sits inside a transaction block.
Rule fields
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
id | string | Yes | 50 chars | Unique identifier shown in findings. Use kebab-case. |
pattern | string | No | 200 chars | Regex pattern to match against added lines. |
message | string | Yes | 500 chars | What to tell the developer when violated. |
severity | string | No | -- | critical, high, medium, or low. Default: medium. |
paths | string[] | No | 20 entries | Only check files matching these globs. |
exclude_paths | string[] | No | 20 entries | Skip files matching these globs. |
category | string | No | 30 chars | Group label for the finding. |
Limits
- Maximum 50 rules per repository (extras are dropped at review time)
- Pattern length capped at 200 characters
- Message length capped at 500 characters; injection phrases ("ignore all findings", "disregard any", "always approve") are stripped
- Path arrays capped at 20 entries each
- Invalid regex patterns are skipped at review time
Writing regex patterns
The pattern field uses standard JavaScript regular expressions with the gi flags (global, case-insensitive). If you have never written regex before, here is a quick reference:
| Regex | Meaning | Matches |
|---|---|---|
console\\.log | Literal "console.log" | console.log("hello") |
TODO | Literal "TODO" | // TODO: fix this |
\\bany\\b | Word "any" (not "many") | : any but not company |
password\\s*= | "password" then optional spaces then "=" | password = "abc" |
[A-Z]{20,} | 20+ uppercase letters | Likely a hardcoded key |
Key symbols:
\\.— literal dot (without\\, dot means "any character")\\s*— zero or more spaces/tabs\\b— word boundary.*— any characters (zero or more)[A-Za-z0-9]— any letter or number{8,}— 8 or more of the previous thing(a|b)— "a" or "b"
Test your patterns at regex101.com before adding them.
Example rules
rules:
# Flag console.log in production code
- id: no-console-log
pattern: "console\\.log\\("
message: "Remove console.log before merging — use a proper logger"
severity: medium
paths: ["src/**"]
exclude_paths: ["**/*.test.*", "**/*.spec.*"]
# Flag hardcoded secrets
- id: no-hardcoded-secrets
pattern: "(password|secret|apiKey|api_key)\\s*[:=]\\s*['\"][^'\"]{8,}"
message: "Possible hardcoded secret — use environment variables instead"
severity: critical
# Flag HTTP URLs (should use HTTPS)
- id: no-http
pattern: "http://(?!localhost|127\\.0\\.0\\.1)"
message: "Use HTTPS instead of HTTP for external URLs"
severity: high
exclude_paths: ["**/*.test.*", "**/*.md"]
# Flag direct database calls outside repository layer
- id: no-direct-db
pattern: "db\\.(query|execute|raw)\\("
message: "Use the repository layer — no direct DB calls in controllers"
severity: high
paths: ["src/controllers/**", "src/routes/**", "src/api/**"]
Expert rules vs custom rules
expert_rules | rules | |
|---|---|---|
| How it works | AI reads the rule and uses judgment | Regex pattern match — deterministic |
| False positives | Possible (AI might misinterpret) | Only if your regex is too broad |
| Speed | Part of AI analysis (10-30s) | Instant (runs before AI) |
| Best for | Conventions, preferences, "prefer X over Y" | Hard rules, banned patterns, compliance |
| Example | "Prefer functional components" | "class .* extends Component" |
| Max count | ~10 recommended (20 hard cap) | Up to 50 |
| Plan required | All plans | Pro, Team, Max |
| Surfaces | PR reviews | PR, VS Code, and MCP reviews |
Auto Review Settings
Controls what is included in automatic PR reviews.
auto_review:
ignore_title_keywords: ["WIP", "DO NOT REVIEW"]
profile: balanced
tone_instructions: ""
| Key | Type | Default | Description |
|---|---|---|---|
ignore_title_keywords | string[] | ["WIP", "DO NOT REVIEW"] | Skip the review entirely if the PR title contains any keyword (case-insensitive). No comment is posted and no review quota is consumed. |
profile | string | "balanced" | Steers review aggressiveness via the AI prompt: chill, balanced, or assertive |
tone_instructions | string | "" | Custom tone guidance for review comments, passed to the AI prompt |
Review profiles
Profiles are prompt-level guidance to the AI, not hard filters:
| Profile | Behavior |
|---|---|
chill | Instructs the AI to report only critical issues. Minimal noise. |
balanced | Moderate findings. Good for most teams. Default. |
assertive | Instructs the AI to review thoroughly and flag more, including architecture issues. |
Skipping WIP pull requests
If the PR title contains any of the ignore_title_keywords (case-insensitive match), the review is skipped entirely. No comment is posted and no review quota is consumed.
auto_review:
ignore_title_keywords:
- WIP
- "DO NOT REVIEW"
- "[draft]"
Security Settings
Configure custom secret patterns that are checked during the instant secret scanning pass. These patterns run before AI analysis and produce results within seconds.
security:
custom_patterns:
- "MYAPP_KEY_[A-Za-z0-9]{16,}"
- "Bearer [A-Za-z0-9\\-._~+/]+=*"
- "AKIA[A-Z0-9]{16}"
Patterns are regular expressions tested against every added line in the diff, on top of the built-in secret patterns. They are validated for ReDoS safety before use — a pattern that looks like it could backtrack catastrophically is rejected (logged, never run), and syntactically invalid patterns are skipped. Use narrowly scoped patterns and test them against representative code. Read the security review guide for how to investigate resulting findings.
Auto Description Settings
Controls automatic PR description generation.
auto_description:
enabled: true
postToGithub: false
| Key | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Generate a plain-English PR description summary |
postToGithub | boolean | false | Post the description as a PR comment (vs. only in dashboard) |
When postToGithub is true, the generated description is posted as a comment on the PR. When false, it is only visible in the CodePeel dashboard.
Auto Fix
This feature generates a separate pull request with addressable fixes applied. Requires a Pro, Team, or Max plan.
auto_fix:
enabled: true
| Key | Type | Default | Plan required | Description |
|---|---|---|---|---|
auto_fix.enabled | boolean | false | Pro / Team / Max | Generate a fix PR with all auto-fixable findings applied |
When enabled, auto-fix runs after the main review completes. The generated PR targets the same branch as the original PR and includes only the fixes, making them easy to review and merge.
Common Recipes
Security-focused review
Only report security issues. Skips bugs, performance, and architecture findings:
securityOnly: true
Quiet mode (fewer findings)
Reduce noise for teams that prefer minimal feedback:
auto_review:
profile: chill
ignoreFormatting: true
Strict mode (more findings)
Catch everything including nitpicks:
strictMode: true
ignoreFormatting: false
auto_review:
profile: assertive
Skip generated files
Exclude auto-generated code, build output, and dependencies:
ignore_paths:
- "node_modules/**"
- "dist/**"
- "*.lock"
- "generated/**"
- "*.min.js"
- "vendor/**"
- "**/*.g.dart"
- "coverage/**"
Monorepo with multiple packages
Use custom instructions to describe your project structure:
custom_instructions: |
This is a pnpm monorepo with packages in packages/.
Each package has its own tsconfig.json.
ignore_paths:
- "packages/*/dist/**"
- "packages/*/node_modules/**"
One repo, different rules from the rest of your account
Save a repository config with just the keys that differ — everything you leave out inherits from /app/settings:
custom_instructions: |
This repo is the legacy service; require repository-layer DB access.
Configuration Options Comparison
| Feature / Setting | Global Settings (/app/settings) | Repo Config Modal (Form Tab) | Repo Config Modal (YAML Tab) |
|---|---|---|---|
| Review Profile | Yes | Yes | Yes |
| Strict Mode | Yes | Yes | Yes |
| Security Only | Yes | Yes | Yes |
| Ignore Formatting | Yes | Yes | Yes |
| Ignored Paths | Yes | Yes | Yes |
| Custom Instructions | Yes | Yes | Yes |
| Expert Rules | Yes | Yes | Yes |
| Auto-Fix | Yes | Yes | Yes |
| Auto-Description | Yes | Yes | Yes |
Custom Compliance Rules (rules) | No | No | Yes (Pro, Team, Max) |
| Custom Secret Patterns | No | No | Yes |
| Title Filters | No | No | Yes |
Troubleshooting
Changes in Web Dashboard not appearing on PR
- Configuration changes saved in the Web Dashboard apply to new reviews. Config is reloaded at the start of every review, so push a new commit (or open a new PR) to review with the updated settings.
- Verify you clicked Save Configuration and saw the green confirmation indicator in the modal.
YAML syntax errors
A syntax error in the YAML tab is caught before saving — the modal shows the error and nothing is saved. In the unlikely event an unparseable config reaches the review engine (e.g. saved outside the dashboard), the review silently falls back to your global account settings. Nothing is posted to GitHub about the failure.
- Incorrect indentation (YAML uses spaces, not tabs)
- Using
yes/noinstead oftrue/falsefor booleans - Missing quotes around strings with special characters or glob patterns
Rules not firing
If your custom rules are not producing findings:
- Verify you are on a Pro, Team, or Max plan (custom rules are silently skipped on lower tiers)
- Check that the
patternis valid regex — an invalid pattern is skipped silently (test at regex101.com) - Verify the
pathsglobs match the files you expect - Remember that rules only match added lines (lines starting with
+in the diff) - Check if the match is being suppressed by the transaction-safety check
Expert rules being ignored
Expert rules must be a list of strings. In the Web Dashboard Form tab, simply enter one rule per line. In YAML:
# Correct
expert_rules:
- "Never use any type"
- "Always handle errors"
Only the first 20 rules are included in the PR review prompt.
Frequently Asked Questions
Does configuration affect VS Code extension and MCP reviews?
Yes — for ignore_paths, custom_instructions, strictMode, securityOnly, and custom rules. Reviews from the VS Code extension or MCP server resolve the same dashboard config (repo config first, then global settings) on the backend. PR-only keys such as ignoreFormatting, expert_rules, review profile, and the automation toggles have no effect on IDE/MCP reviews.
Can I revert a repository back to global defaults?
Yes. Open the Repository Config modal for that repository and click Revert to Global Defaults in the footer. This deletes the repository override so the repository inherits from /app/settings.
Are custom rules checked on IDE reviews?
Yes. Custom rules (the rules field) are enforced on IDE reviews from the VS Code extension and MCP server, as well as GitHub PR reviews, on Pro, Team, and Max plans.
Can I disable reviews for specific PRs without changing the config?
Yes. Add any of the ignore_title_keywords to your PR title (default: "WIP" or "DO NOT REVIEW").
How do I see what config CodePeel is using for a review?
Open the Repository Config modal for that repository in the dashboard — it shows the exact YAML in effect for that repo (or the global defaults it is inheriting).