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

# Custom reviewers

> Use one of your own DinoAI agents as a Code Review reviewer: what it receives, the findings format Paradime posts, and how to change the DinoAI reviewer's instructions.

A **Custom reviewer** reviews with one of your own agents. Use it when you want your team's rules in the review, for example naming conventions, required tests, or a check of the change against its Linear or Jira ticket.

## Pick an agent

1. In [the reviewer form](https://docs.paradime.io/products/dino-ai/code-review/add-a-reviewer.md), under **Reviewer agent**, select **Custom reviewer**.
2. In **Agent**, select one of your agents. Select **Edit** to open it in the agent builder.
3. Or select **Create custom reviewer**. The agent builder opens with the `dbt-model-reviewer` template: a senior analytics engineer who checks the lineage of every changed model and calls out any change to a metric that no test proves was intended. Change it, deploy it, and you return to the reviewer form.

The agent can be built in the app or defined in `.dinoai/agents/` on the default branch. Paradime reads the agent from the default branch, not from the pull request, so a pull request can't change the reviewer that reviews it. An agent that you deploy with **Open a pull request** is not in the list until that pull request merges.

> [!NOTE]
>
> Built-in agents that act as a Paradime user, such as the dbt Cloud™ migration agent, can't be reviewers.

## Write the instructions

Write the agent's `role`, `goal`, and `backstory` about what to look for. Don't write how to post the review. Paradime sends the agent one message with the pull request and the output format, and it posts the findings itself.

The agent can use its tools as in any session: read files, run `dbt compile`, query the warehouse, and look up lineage. To check the change against a ticket, give the agent the Linear or Jira tools. To hand work to a specialist, add it to `agents_squad`. See [YAML configuration](https://docs.paradime.io/products/dino-ai/programmable-agents/yaml-configuration.md).

## What the agent receives

The agent starts checked out at the pull request's head commit, detached. Its first message has:

| Section | Content |
| - | - |
| `<pull_request>` | Repository, number, URL, author, base branch and commit, head branch and commit, title. |
| `<pr_description>` | The pull request description. |
| `<diffstat>` | The changed files with their line counts. Not the full diff: the agent runs `git diff` itself. |
| `<pr_comments>` | Recent comments on the pull request. |
| `<changes_since_last_review>` | On a re-review, the commits and files changed since the last reviewed commit. |
| `<already_reported>` | Findings from earlier reviews, each with an id, so the agent can mark the fixed ones. |
| `<task>` | Review the pull request for correctness, data quality, and downstream impact. |
| `<output_format>` | The findings block described below. |

Paradime marks the pull request text as information written by other people, not as instructions, so a pull request description can't redirect the reviewer.

## How the review is posted

![A GitHub pull request where the paradime-eu bot posted a DinoAI review from a custom reviewer named bugbot: a summary with 1 finding, and a high-severity inline comment on dim\_f1\_\_constructor.sql explaining why the new cutoff makes a CASE branch unreachable](https://mintcdn.com/paradime-docs/8Ap_apA6iXxCRLlY/images/dinoai-code-review-github-pull-request.jpg?fit=max\&auto=format\&n=8Ap_apA6iXxCRLlY\&q=85\&s=2cf32bc931d0d65b9d8c3c8a2663ac55)

The agent's final message must end with one fenced block labelled `dinoai-findings`:

````markdown theme={"system"}
```dinoai-findings
{"reviewed_head": "3f9c2a1e7b4d",
 "summary": "Two problems in the orders mart.",
 "findings": [{"path": "models/marts/fct_orders.sql", "line": 42, "severity": "high",
               "title": "Join fans out on order_id",
               "body": "`stg_payments` has many rows per order, so the join duplicates orders.",
               "suggestion": "left join payments_agg using (order_id)"}],
 "fixed": ["<id of an already reported finding that is fixed>"]}
```
````

* `reviewed_head` is the output of `git rev-parse HEAD`. If it doesn't match the pull request's head commit, Paradime withholds the findings and asks you to run the review again.
* `severity` is `critical`, `high`, `medium`, `low`, or `info`.
* `line` must be a line in the diff. A finding on another line goes in the review body under **Further findings** instead of inline.
* `suggestion` is optional, and must be a full replacement for that one line.
* `fixed` lists the ids of earlier findings that are now fixed. Every earlier finding not listed stays open.

If the final message has no findings block, Paradime posts the message as the review summary, and the check is neutral with `The review reported no structured findings`.

The agent must not post to the pull request itself, approve it, or run `gh pr review`, `gh pr comment`, or a write through `gh api` (or the `glab` equivalents). Paradime posts the review.

## The DinoAI reviewer

The **DinoAI reviewer** option runs `pr-reviewer`, a reviewer agent that Paradime manages. It is tuned for dbt™ changes: it checks the lineage of every changed model and calls out changes that break downstream models or alter a metric without a test. There is nothing to set up, and Paradime keeps it up to date.

To review with your own instructions, build your own agent and pick it as a **Custom reviewer**. Select **Create custom reviewer** to start from the `dbt-model-reviewer` template. Give your agent its own name, not `pr-reviewer`, so it stays separate from the managed reviewer.

## Guides

> [card] [End-to-end PR reviewer](https://docs.paradime.io/guides/programmable-agents/end-to-end-pr-reviewer.md)
>
> A custom reviewer that checks scope against Linear, plus code, tests, and docs.

> [card] [dbt™ impact assessor](https://docs.paradime.io/guides/programmable-agents/impact-assessor.md)
>
> A custom reviewer that reports the downstream impact of a model change.


## Related topics

- [Add a reviewer](https://docs.paradime.io/products/dino-ai/code-review/add-a-reviewer.md)
- [End-to-end PR reviewer](https://docs.paradime.io/guides/programmable-agents/end-to-end-pr-reviewer.md)
- [End-to-end PR reviewer (Jira)](https://docs.paradime.io/guides/programmable-agents/end-to-end-pr-reviewer-jira.md)
- [Set up DinoAI Code Review](https://docs.paradime.io/guides/programmable-agents/set-up-dinoai-code-review.md)
- [dbt™ impact assessor](https://docs.paradime.io/guides/programmable-agents/impact-assessor.md)


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