> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fullotto.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Review depth

> Run deeper reviews on critical paths and lighter reviews everywhere else.

Every review runs at one depth:

| Depth | Use it for |
| - | - |
| `standard` | Focused reviews for everyday changes. |
| `deep` | Thorough reviews that trace changes across the codebase. |
| `max` | The most thorough review, for critical code paths. |

Deeper reviews take longer and cost more. `otto.yml` lets you spend depth where it matters: `max` on payments and auth, `standard` on docs, and your workspace default everywhere else.

## Set a depth

For the whole repository:

```yaml otto.yml theme={null}
version: 1
reviews:
  depth: standard
```

For specific paths:

```yaml otto.yml theme={null}
version: 1
reviews:
  depth: deep
  paths:
    - match: ['src/payments/**', 'src/auth/**']
      depth: max
    - match: ['docs/**', '**/*.md']
      depth: standard
```

## How Otto picks the depth

A pull request is reviewed at **one** depth, chosen from the files it changes:

<Steps>
  <Step title="Each changed file gets a depth">
    * The highest `depth` among the `paths` rules that match the file.
    * If no rule with a `depth` matches, `reviews.depth`.
    * If `reviews.depth` isn't set, your workspace's depth.
  </Step>

  <Step title="The review runs at the highest of those">
    `standard` \< `deep` \< `max`. [Ignored files](/configuration/ignoring-files) don't count.
  </Step>
</Steps>

So a path rule can **raise** or **lower** the depth, but the deepest file in a PR always wins.

### Examples

With the config above (`reviews.depth: deep`, payments and auth at `max`, docs at `standard`):

| The PR changes | Depth | Why |
| - | - | - |
| `docs/setup.md` | `standard` | Only file matches the docs rule. |
| `docs/setup.md`, `src/api/users.ts` | `deep` | `users.ts` matches no rule, so it gets `reviews.depth`. |
| `docs/setup.md`, `src/payments/refund.ts` | `max` | `refund.ts` matches the payments rule. |
| `src/payments/README.md` | `max` | It matches both rules; a file takes the highest matching depth. |
| `pnpm-lock.yaml` | `deep` | The lockfile is ignored by default, so only `reviews.depth` applies. |

<Note>
  When every changed file is ignored, only `reviews.depth` can apply. If it
  isn't set, the review runs at your workspace depth.
</Note>

## Lowering the depth for low-risk paths

A `standard` rule only lowers the depth when **every** reviewable file in the PR is covered by rules at `standard`. Any other file raises the review back to `reviews.depth` or your workspace depth.

To review a repository at `standard` by default and go deeper only where it matters, set `reviews.depth: standard` and raise specific paths:

```yaml otto.yml theme={null}
version: 1
reviews:
  depth: standard
  paths:
    - match: ['src/core/**']
      depth: deep
    - match: ['src/billing/**', 'migrations/**']
      depth: max
```

## Rules combine

Every matching rule contributes, so overlapping rules are fine:

* A file's depth is the **highest** depth among all rules that match it, not the first match.
* A rule without a `depth` (for example, one that only adds `instructions`) doesn't affect the depth.
* Rule order doesn't matter for depth.

## Precedence

| Source | Priority |
| - | - |
| A model pinned for your workspace by Otto support | Wins over everything |
| `otto.yml` path rules and `reviews.depth` | Wins over the workspace depth |
| Workspace depth in **Settings → Reviews** | Applies when `otto.yml` doesn't decide |

The depth applies to `/otto review` and `/otto re-review` as well as automatic reviews.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.