A code review file has 5 top-level blocks: `ellipsis`, optional `pull_requests`, `reviewers`, optional `output`, and optional `budget`. Set `ellipsis.kind` to `code_review`. A repository holds one file at `.ellipsis/code-review.yaml` on its default branch; the `.ellipsis` repository holds the organization file. Unknown fields fail the sync. See [Code review](/docs/code-review) for what a review posts and what happens when a reviewer fails.

## Review one organization

```yaml title=".ellipsis/code-review.yaml"
ellipsis:
  kind: code_review
  name: code-review

pull_requests:
  repositories:
    include: [api-repo, web-repo]
    exclude: [archived-repo]
  base: [main]
  draft: false
  for:
    users: true
    bots: false

reviewers:
  - name: bugs
    claude_code:
      prompt: Find bugs in this pull request.
      model: claude-opus-5-5

budget:
  session: 3
```

Committed to the `.ellipsis` repository, this reviews each push to a non-draft pull request by a human into `main` in `api-repo` or `web-repo`. `pull_requests` takes the same filters as a pull request [trigger](/docs/agents/triggers#pull-requests) without `on`; a repository's own file wins over this one.

## Approve when clean

```yaml title=".ellipsis/code-review.yaml"
ellipsis:
  kind: code_review
  name: code-review

reviewers:
  - name: review
    claude_code:
      prompt: |
        Review the pull request against the repository's contributing guide.
        Mark a comment blocking only when the change must not merge as is.
        In the summary, give the verdict, an overall score out of 4, and a
        table with one row per area you checked.
      model: claude-opus-5-5

output:
  on_pass: approve
  on_fail: request_changes
  summary: true
```

A push with no blocking comment gets an approval that opens with the reviewer's summary; a push with one gets a request for changes carrying the comments. Without `output`, a pass posts nothing and a fail posts a comment.

## Split reviewers by path

```yaml title=".ellipsis/code-review.yaml"
ellipsis:
  kind: code_review
  name: code-review

reviewers:
  - name: migrations
    paths: ['db/migrations/**']
    codex:
      prompt: Use the migration-checks skill to review each migration for locks and backfills.
      model: gpt-6-sol
    environment: api-environment
    skills:
      - path: skills/migration-checks
        repository:
          name: api-repo
    permissions:
      github: read_only
    budget:
      session: 5
  - name: tests
    claude_code:
      prompt: Check the changed code for missing test coverage and run the tests.
      model: claude-opus-5-5
    environment:
      repositories:
        - name: api-repo

budget:
  session: 2
```

A push that changes `db/migrations/` starts both reviewers. Any other push starts only `tests`. The `migrations` reviewer runs in the `api-environment` [environment](/docs/environments) with the skill installed, reads issues as well as contents and pull requests, and may spend $5 per run. `tests` inherits the $2 cap. A reviewer takes the same `environment`, `skills`, `mcp`, and `permissions` blocks as an [agent session](/docs/agents/schema), except that `permissions.github` may only allow read actions. Every reviewer can also read code and pull requests in the reviewed repository.

## Fields

| Field | Type | Meaning |
| --- | --- | --- |
| `ellipsis` | `object`, required | Identifies the file. |
| `ellipsis.kind` | `string`, required | `code_review`. One of `code_review`. |
| `ellipsis.name` | `string` | A name for the file, unique within the account. |
| `ellipsis.description` | `string` | Description shown in the dashboard. |
| `ellipsis.enabled` | `boolean` | `false` pauses the file. Default `true`. |
| `ellipsis.metadata` | `object` | `labels` and `annotations` for your own use. |
| `ellipsis.metadata.labels` | `list of string` | Short tags. |
| `ellipsis.metadata.annotations` | `map of string` | Free text values by key. |
| `pull_requests` | `object` | Which pull requests to review. The same filters as a pull request [trigger](/docs/agents/triggers#pull-requests) without `on`. Default every pull request by a human author. |
| `pull_requests.repositories` | `list of string or object` | Repository names, or an object with `include` and `exclude` lists. Default every installed repository. |
| `pull_requests.repositories.include` | `list of string` | Repository names to match. Default every repository of the installation, including ones added later. |
| `pull_requests.repositories.exclude` | `list of string` | Repository names to skip, applied after `include`. |
| `pull_requests.base` | `list of string` | Base branches to match. Exact names, prefixes ending in `*`, and `default`. |
| `pull_requests.head` | `list of string` | Head branches to match. Exact names, prefixes ending in `*`, and `default`. |
| `pull_requests.draft` | `boolean` | `true` matches only draft pull requests, `false` only ready ones. Default both. |
| `pull_requests.labels` | `list of string` | Labels match when any listed label is present. |
| `pull_requests.paths` | `list of string` | Globs of changed files to match. `!` patterns aren't allowed. Default every change. |
| `pull_requests.for` | `object` | Which authors count. |
| `pull_requests.for.users` | `boolean, list of string, or object` | People. `true` is everyone, a list is those logins, `false` is no one, and an object sets `include` and `exclude`. Default `true`. |
| `pull_requests.for.users.include` | `boolean or list of string` | `true` is everyone, a list is those logins, `false` is no one. Default `true`. |
| `pull_requests.for.users.exclude` | `list of string` | Logins to skip, applied after `include`. |
| `pull_requests.for.bots` | `boolean, list of string, or object` | Bots. `true` is every bot, a list is those logins, `false` is none, and an object sets `include` and `exclude`. Default `false`. |
| `pull_requests.for.bots.include` | `boolean or list of string` | `true` is everyone, a list is those logins, `false` is no one. Default `true`. |
| `pull_requests.for.bots.exclude` | `list of string` | Logins to skip, applied after `include`. |
| `pull_requests.for.teams` | `list of string` | GitHub team slugs of the installed organization, such as `platform` for `@org/platform`. The author must also be on one of them. Bots never are. |
| `reviewers` | `list of object`, required | 1 to 64 reviewers. Each runs as its own session on every push with a change in its range. |
| `reviewers[].name` | `string`, required | Unique within the file. Heads the reviewer's section of the posted review. |
| `reviewers[].paths` | `list of string` | Glob patterns. The reviewer runs only when a changed file in its range matches. Default every change. |
| `reviewers[].claude_code` | `object` | Runs the session with [Claude Code](/docs/models/claude). Exactly one of `claude_code`, `codex`, or `gemini`. |
| `reviewers[].claude_code.prompt` | `string` | The task. |
| `reviewers[].claude_code.model` | `string`, required | A Claude Code model from [Models](/docs/models#current-support). |
| `reviewers[].claude_code.effort` | `string` | Reasoning effort, where the model supports it. One of `low`, `medium`, `high`, `xhigh`, `max`. |
| `reviewers[].claude_code.max_turns` | `integer` | The most turns the agent can take on each message, a whole number above 0. |
| `reviewers[].claude_code.fallback_model` | `string` | The model Claude Code switches to when `model` is overloaded. Default none. |
| `reviewers[].claude_code.settings` | `object` | A Claude Code `settings.json` in a repository, applied below the settings Ellipsis manages. Hooks stay disabled. |
| `reviewers[].claude_code.settings.path` | `string`, required | Path of the file, relative to the repository root. |
| `reviewers[].claude_code.settings.repository` | `object` | Where `path` resolves. Default the repository this file lives in. |
| `reviewers[].claude_code.settings.repository.name` | `string`, required | The repository name, without the owner. |
| `reviewers[].claude_code.settings.repository.owner` | `string` | The GitHub owner. Default your account. |
| `reviewers[].claude_code.settings.repository.ref` | `string` | Branch, tag, or commit. Default the default branch. |
| `reviewers[].codex` | `object` | Runs the session with [Codex](/docs/models/codex). Exactly one of `claude_code`, `codex`, or `gemini`. |
| `reviewers[].codex.prompt` | `string` | The task. |
| `reviewers[].codex.model` | `string`, required | `gpt-6.1-sol`, `gpt-6-astra`, `gpt-6-sol`, or `gpt-6-luna`. |
| `reviewers[].codex.effort` | `string` | Reasoning effort. GPT-6.1 Sol and GPT-6 Astra don't accept `none`. Default `medium`. One of `none`, `low`, `medium`, `high`, `xhigh`, `max`. |
| `reviewers[].gemini` | `object` | Runs the session with [Gemini CLI](/docs/models/gemini). Exactly one of `claude_code`, `codex`, or `gemini`. |
| `reviewers[].gemini.prompt` | `string` | The task. |
| `reviewers[].gemini.model` | `string`, required | `gemini-4-argon` or `gemini-3.8-flash`. |
| `reviewers[].environment` | `string or object` | A saved environment name or an inline environment; see the [Environment schema reference](/docs/environments/schema). Default the built-in basic environment. |
| `reviewers[].permissions` | `object` | Rules as in an agent session. `github` rules may only allow read actions, and every reviewer can also read code and pull requests in the reviewed repository. See [Permissions](/docs/permissions). |
| `reviewers[].permissions.github` | `string or list of object` | `all` for everything the GitHub App installation allows, `read_only` for every read in every repository, or a list. A list entry is an action name, or a rule with the fields below that limits what it allows. A request passes when any entry allows it. Default no GitHub access. |
| `reviewers[].permissions.github[].allow` | `string or list of string`, required | Actions the rule allows. `read_only` is every read action, and `contents.write`, `pull_requests.write`, `issues.write`, and `actions.write` are every action in that area, reads included. One of `read_only`, `contents.read`, `pull_requests.read`, `issues.read`, `checks.read`, `statuses.read`, `actions.read`, `contents.write`, `pull_requests.write`, `issues.write`, `actions.write`, `contents.push`, `contents.delete_branch`, `pull_requests.create`, `pull_requests.update`, `pull_requests.comment`, `pull_requests.review`, `pull_requests.merge`, `issues.create`, `issues.comment`, `issues.update`, `actions.run`. |
| `reviewers[].permissions.github[].repository` | `string or list of string` | Repository names or patterns such as `api-*`. Default every repository of the installation. |
| `reviewers[].permissions.github[].branch` | `string` | Pattern for the branch a push writes to or a pull request comes from. `{session_id}` becomes the session id. |
| `reviewers[].permissions.github[].base` | `string` | Pattern for the branch a pull request targets. |
| `reviewers[].permissions.github[].pull_request` | `integer or list of integer` | Pull request numbers. On `contents.push` it allows only pushes to those pull requests' branches. |
| `reviewers[].permissions.github[].issue` | `integer or list of integer` | Issue numbers. |
| `reviewers[].permissions.github[].limit` | `integer` | How many times one session may use the rule, from 1. A push counts once, and so does each pull request, comment, review, merge, or request. Default no limit. |
| `reviewers[].permissions.ellipsis` | `string or list of object` | `all` for every operation a session token can use, `read_only` for every read operation, or a list. A list entry is an operation name, `read_only`, or a resource with `.*`. A request passes when any entry allows it. Default no Ellipsis API access. |
| `reviewers[].permissions.ellipsis[].allow` | `string or list of string`, required | SDK operation names such as `sessions.get`, `read_only` for every read, or a resource with `.*`. |
| `reviewers[].skills` | `list of object` | Skills from a repository, for Codex; see [Add a Codex skill](/docs/agents/schema#add-a-codex-skill). Up to 10. Default none. |
| `reviewers[].skills[].path` | `string`, required | Directory holding `SKILL.md`, relative to the repository root. |
| `reviewers[].skills[].repository` | `object` | Where `path` resolves. Default the repository this file lives in. |
| `reviewers[].skills[].repository.name` | `string`, required | The repository name, without the owner. |
| `reviewers[].skills[].repository.owner` | `string` | The GitHub owner. Default your account. |
| `reviewers[].skills[].repository.ref` | `string` | Branch, tag, or commit. Default the default branch. |
| `reviewers[].mcp` | `list of string or object` | `slack`, `linear`, remote servers, or local servers; see [Add an MCP server](/docs/agents/schema#add-an-mcp-server). |
| `reviewers[].mcp[].name` | `string`, required | The server name. `slack` or `linear` attaches a connected integration. |
| `reviewers[].mcp[].url` | `string` | A remote server that speaks streamable HTTP. |
| `reviewers[].mcp[].headers` | `map of string` | Sent with every request. `${NAME}` reads the [secret](/docs/secrets) `NAME` when the session starts. |
| `reviewers[].mcp[].command` | `string` | A local server run inside the environment. Install anything it needs in `build_base`. |
| `reviewers[].mcp[].args` | `list of string` | Arguments for `command`. |
| `reviewers[].mcp[].env` | `map of string` | Environment variables for `command`. `${NAME}` reads the [secret](/docs/secrets) `NAME` when the session starts. |
| `reviewers[].budget` | `object` | Spend limit for this reviewer. |
| `reviewers[].budget.session` | `number` | The most this reviewer may spend per run, in US dollars. Default `budget.session`. |
| `reviewers[].comments` | `object` | Comment limit for this reviewer. |
| `reviewers[].comments.max` | `integer` | The most comments this reviewer returns. A reviewer that returns more fails and contributes nothing. Default `output.comments.max_per_reviewer`. |
| `output` | `object` | What the review posts. A review passes when no reviewer returned a blocking comment and fails otherwise. |
| `output.on_pass` | `string` | The GitHub review submitted on a pass. Default `silent`. One of `silent` (Nothing is posted unless a reviewer left a suggestion, which posts as a comment), `comment` (A comment review), `approve` (An approval. A review in which a reviewer stopped early posts a comment instead). |
| `output.on_fail` | `string` | The GitHub review submitted on a fail. Default `comment`. One of `comment` (A comment review), `request_changes` (A review that requests changes). |
| `output.summary` | `boolean` | Ask every reviewer for a summary and open the review body with it, above the platform details. The prompt says what it contains. Default `false`. |
| `output.comments` | `object` | Comment limits for the review. |
| `output.comments.max_per_review` | `integer` | The most comments one review posts. Comments past it are kept with the review but not posted. Default `64`. |
| `output.comments.max_per_reviewer` | `integer` | The most comments each reviewer returns, unless the reviewer sets its own `comments.max`. Default `64`. |
| `budget` | `object` | Spend limits every reviewer inherits. |
| `budget.session` | `number` | The per-run cap every reviewer inherits, in US dollars. Default the account's default session budget; any value is clamped to the account and platform ceiling. See [Budgets](/docs/budgets). |

See [Models](/docs/models), the [Environment schema reference](/docs/environments/schema), [Permissions](/docs/permissions), and [Budgets](/docs/budgets).
