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

# Ultrareview

> A deep, multi-pass review for the pull requests where a missed bug hurts the most.

Ultrareview is cubic's deepest review. It runs a longer, multi-pass analysis using cubic's most capable review models, and typically takes around 30 minutes. The standard review is built for every PR; ultrareview is built for the ones where the blast radius of a missed bug is severe — migrations, auth, payments, concurrency, large refactors.

Ultrareview is available on paid and trial plans and uses your team's reviewed-lines allowance at 3× the standard rate, reflecting the extra compute of its multi-pass analysis.

## Availability modes

The **Ultrareview** card at the top of [AI review → Ultrareview](https://www.cubic.dev/ai-review?tab=ultrareview) (or `reviews.ultrareview` in [cubic.yaml](/configure/cubic-yaml)) controls whether ultrareviews can run at all:

* **Disabled** — no ultrareviews. Comment commands get a reply explaining that ultrareview is turned off, dashboard triggers show an error, and automatic triggers never fire.
* **Manual** (default) — ultrareviews run only when someone triggers them, via `@cubic-dev-ai ultrareview` or the PR page in the cubic app.
* **Automatic** — the file rules and risk policy below are active. Manual triggers stay available — Automatic includes everything Manual allows.

## Run one manually

Tag cubic on any pull request:

* `@cubic-dev-ai ultrareview`
* `@cubic-dev-ai ultrareview: focus on auth edge cases`

Anything you write after the command is forwarded to the reviewer as one-off guidance for that run. You can also start an ultrareview from the PR page in the cubic app.

cubic posts a comment when the ultrareview starts and posts its findings when it completes. Pushing new commits does not restart it.

## Auto-trigger ultrareviews

You can have cubic start an ultrareview automatically when a PR is opened or marked ready for review. Set the ultrareview mode to **Automatic**, then configure the triggers per repository in [AI review → Ultrareview](https://www.cubic.dev/ai-review?tab=ultrareview).

There are two independent mechanisms, and they compose:

1. **File rules** — glob patterns checked against the PR's changed files. If any file matches, the ultrareview starts. Deterministic, free to evaluate, and active whenever the mode is **Automatic** and the list is non-empty — remove all patterns to turn them off.
2. **A risk policy** — cubic reads the PR's diffs and decides whether it warrants an ultrareview.

### Risk policies

* **Off** (default): cubic never decides on its own to run an ultrareview. File rules still apply — they are a separate trigger.
* **High-risk PRs** (recommended): cubic triggers only when a missed bug would be severe — schema changes, auth, payments, concurrency, public API contracts, cross-cutting refactors. Most PRs stay on the standard review.
* **Custom prompt**: describe the criteria in your own words, for example "PRs touching auth, payments, or database migrations." cubic evaluates each PR against your description.

File rules are checked first — a glob match never costs an AI evaluation.

### What to expect

* Auto-triggers fire only when a PR is opened or marked ready for review. Pushes to an open PR get standard reviews; the ultrareview is not re-triggered per push.
* Auto-triggered ultrareviews post a PR comment explaining why they started, so the decision is never a mystery.
* The trigger is conservative: when cubic is unsure, the PR gets the standard review. If the evaluation fails for any reason, the standard review runs as usual.

<Tip>
  Start with file rules for the paths you already know are sensitive (for example
  `**/migrations/**`), then add the **High-risk PRs** policy to catch risky changes outside those
  paths.
</Tip>

## Configure via cubic.yaml

All of this is also configurable in [cubic.yaml](/configure/cubic-yaml), which overrides the UI settings per field:

```yaml theme={null}
version: 1
reviews:
  # disabled | manual | automatic — the triggers below only fire in automatic
  # mode. Configuring them without this key implies automatic.
  ultrareview: automatic
  # disabled | high_risk_only | custom
  auto_ultrareview: high_risk_only
  auto_ultrareview_custom_prompt: |
    Run an ultrareview when auth or payment flows change.
  # In automatic mode, file rules trigger independently of auto_ultrareview —
  # remove the list entirely to turn them off.
  auto_ultrareview_file_patterns:
    - '**/migrations/**'
    - 'infra/**'
```

`auto_ultrareview_custom_prompt` is only used when `auto_ultrareview` is `custom`.

## Billing

Every ultrareview — manual or auto-triggered — uses your team's reviewed-lines allowance at 3× the standard rate. Track usage on the [usage page](https://www.cubic.dev/settings?tab=usage).
