Documentation

Repository config

Set review policy, file limits, and ignore patterns in .crocode.yml.

On this page

The .crocode.yml file

Place .crocode.yml on the default branch. CroCode reads it from the pull request base commit. An absent or blank file uses the defaults. Invalid YAML, unknown fields, or invalid ignore patterns fail the review without a retry.

enabled: true
agent: claude
model: null
review_drafts: false
min_severity: low
max_comments: 20
max_files: 100
max_changed_lines: 3000
ignore:
  - "docs/**"
instructions: |
  Focus on authentication and data loss.

Fields and defaults

FieldDefaultBehavior
enabledtrueFalse records a skipped review.
agentnullclaude, codex, or opencode. Must be enabled on the server.
modelnullModel name. See the selection rules below.
review_draftsfalseInclude draft pull requests.
min_severitylowinfo, low, medium, high, or critical.
max_comments20Inline finding limit. Values above 50 become 50. Other findings stay in the summary.
max_files100Changed file limit before ignore filtering. Includes removed files and files without patches.
max_changed_lines3000Added plus deleted lines after filtering.
ignore[]Extra globs added to the built-in ignores.
sasttrueRun OpenGrep before the agent. Works only when CROCODE_SAST is on.
instructionsnullMaintainer guidance. CroCode keeps the first 4,000 characters.

Agent and model selection

  1. The repository agent overrides the installation agent and server default.
  2. An explicit repository agent resets the installation model.
  3. Without a repository agent, a repository model overrides the installation model.
  4. An absent model uses the selected agent’s default.

Model names must contain 1 to 100 ASCII characters. Letters, digits, and ._:/@#-[] are allowed. A model name cannot start with -.

Ignored files

These patterns always apply:

**/*.lock
**/package-lock.json
**/pnpm-lock.yaml
**/*.min.js
**/*.map
**/*.snap
**/vendor/**
**/node_modules/**

Ignore patterns exclude findings for a file. They do not remove it from the checkout sent to the model. Removed files and files without GitHub patches are not reviewed.

GitHub returns at most 3,000 files through its file endpoint. Keep max_files below that limit.