# Code review

Reviews a pull request against your CODEREVIEW.md with eight independent reviewers. Every finding quotes its line.

Requires GitHub, through the AgentRun GitHub App.

## Install

```sh
npx @parcha/agentrun template install github:Parcha-ai/agentrun/packages/serve/templates/code-review@860cae180df56af4d9a206ef2c997178da29fcf9 --trust
```

Or open `<your AgentRun address>/#/templates/install?src=github%3AParcha-ai%2Fagentrun%2Fpackages%2Fserve%2Ftemplates%2Fcode-review%40860cae180df56af4d9a206ef2c997178da29fcf9`. Pinned to commit 860cae180df56af4d9a206ef2c997178da29fcf9.

## What it does

Reviews a pull request on its own read-only checkout with eight independent reviewers (five quick, three deep), each with a fresh context and the shell where there is one, for correctness against the repo's CODEREVIEW.md. Each tries to break each changed function and quotes the line behind each finding; the agent merges and dedupes their findings, verifies them, ranks them P0/P1/P2 with a 1-5 risk score, posts one COMMENT review and answers with the findings as JSON.

- Skill `review`: Review a pull request with eight independent reviewers (five quick, three deep) on one read-only checkout, merge and dedupe what they find, post one COMMENT review and return the findings as JSON. Use for "review this PR", /review.
- Rules: `CODEREVIEW.md`

## What starts it

- A GitHub pull request on your repository (opened, reopened, synchronize, ready for review). Needs the GitHub App connected. At most 3 at once.
- By hand, any time: from the console, the API or the CLI.

## Inputs

Each run takes a plain message (`content`).

### Setup, filled in once at install

| Name | Type | Required | What it is |
| --- | --- | --- | --- |
| `owner` | string | yes | The GitHub account that owns the repository to review, as GitHub spells it, like Parcha-ai. |
| `repo` | string | yes | The repository's name alone, without its owner, as GitHub spells it, like agentrun. |
| `focus` | string | no | Optional: one line on what matters most here ("auth and money paths"), read before the repo's own rules. |

## What it needs

- Harness: pi
- Model: fast tier, medium effort
- Model choices, picked at install instead:
  - Particle 1 (OpenRouter): `openrouter/particle-ai/particle-1` on `pi`, needs `OPENROUTER_API_KEY`. The model this template was tuned and measured on: about 18 cents a review on our own pull requests.
- Tools: read, bash, subagent
- GitHub tools (optional): pull_request_read, get_file_contents, get_repository_tree, pull_request_review_write, add_comment_to_pending_review. Reads the pull request and the repo through GitHub, and posts one COMMENT review with the findings. Every call is held to this one repository. It never approves, requests changes or resolves a thread.
- Computer: a computer with a shell, else no computer (file tools only)
- Keys: A model key
- Learning: off

## Sample output

No sample output ships with this template yet.

## Tested

12 eval cases: clean-refactor, injection, mentions-defused, never-flag, null-name, off-by-one, other-repo, pasted-by-reference, re-review, re-review-open, repo-rule, two-defects.

## Source

- Package: https://github.com/Parcha-ai/agentrun/tree/860cae180df56af4d9a206ef2c997178da29fcf9/packages/serve/templates/code-review
- Publisher: Parcha-ai (1210 stars, 95 forks)
- Author: Parcha Labs
- Version: 0.4.0
- License: Apache-2.0
- Category: Engineering
- Page: https://marketplace.agentrun.ai/templates/code-review/
