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

# Daemon-powered PR reviews

> Define your PR review system. Charlie runs it.

Every repository has its own definition of useful review. Charlie's `pr-review` [daemon](/daemons) lets your team define that system in your repository and change it as your codebase evolves.

**You control judgment; Charlie handles the moving system.**

Your policy defines when Charlie reviews, which perspectives matter for a change, what evidence feedback requires, how follow-up reviews behave, and what Charlie may publish. Charlie applies that policy to the current pull request and combines the relevant perspectives into one coherent review.

A single broad review pass has to carry every concern at once. Focused review lanes give each perspective a clear job, its own applicability guidance, and an evidence bar. Charlie selects the lanes that are useful for the change instead of running every installed perspective on every pull request.

## How daemon-powered reviews work

When a review starts, Charlie loads the policy from your repository's default branch and gathers the current pull request context. That context includes the diff, changed files, checks, discussion, prior feedback, and relevant repository guidance.

Charlie inventories the installed review lanes and selects the ones that apply to the change. The selected lanes investigate their focused perspectives independently and in parallel against the same current pull request. Charlie then applies the review-wide policy in `DAEMON.md` to their candidate findings, reconciles overlapping or previously reported feedback, and produces one coherent review or the configured clean result.

The policy lives in ordinary Markdown:

```text theme={null}
.agents/daemons/pr-review/
├── DAEMON.md
└── references/lanes/
    ├── correctness.md
    └── repository-guidance.md
```

`DAEMON.md` defines when reviews run and the rules shared by the whole review. Each direct Markdown file under `references/lanes/` defines one focused perspective, including when it applies and what evidence a finding needs.

Your team changes these files through normal pull requests. After a change reaches the default branch, Charlie loads the updated policy within a few minutes.

## What your team controls and what Charlie handles

| Your team controls                                                  | Charlie handles                                                    |
| ------------------------------------------------------------------- | ------------------------------------------------------------------ |
| When reviews run                                                    | Loading the current pull request and repository context            |
| Which lanes exist, when they apply, and how deeply they investigate | Selecting applicable lanes and running focused work                |
| Evidence requirements, exclusions, and finding eligibility          | Verifying candidates and applying the root policy                  |
| Presentation, review outcomes, and follow-up review policy          | Reconciling overlap and prior feedback, then delivering one review |

## Start from the reference policy

The [`pr-review` reference daemon](https://github.com/charlie-labs/daemons/tree/master/daemons/pr-review) gives your team a working starting policy. It begins with two lanes:

* **Correctness** looks for reachable behavior errors, broken state or lifecycle invariants, and unhandled failure paths.
* **Repository guidance** checks the change against applicable repository instructions and documented contracts.

The reference policy reviews when:

* A non-draft pull request is opened.
* A draft pull request is marked ready for review.
* `CharlieHelps` is requested as a reviewer.
* A pull request comment requests a review from `CharlieHelps`.

It does not review every new commit by default. Your team can request another review explicitly or configure a different cadence.

The reference policy publishes findings with a `COMMENT` review. When a completed review is clean, Charlie adds one `+1` reaction to the pull request body instead of posting an empty review or summary. Your team can change the cadence, lanes, evidence rules, presentation, and allowed review outcomes as its needs evolve.

## Get started

Most teams should install the reference policy, observe a few representative reviews, and then change one decision at a time.

<CardGroup cols={2}>
  <Card title="Set up PR reviews" href="/pr-reviews/setup">
    Install the reference daemon and merge its policy into your default branch.
  </Card>

  <Card title="Configure PR reviews" href="/pr-reviews/configure">
    Change cadence, review perspectives, evidence rules, and review output.
  </Card>

  <Card title="Control review costs" href="/pr-reviews/cost-control">
    Tune review frequency and scope after observing representative reviews.
  </Card>

  <Card title="Troubleshoot PR reviews" href="/pr-reviews/troubleshooting">
    Diagnose missing, unexpected, or noisy reviews.
  </Card>
</CardGroup>

<Note>
  **Migrating from agent-powered reviews?** Read [Migrate to daemon-powered
  reviews](/pr-reviews/migrate) to understand what changes and how review
  coverage works during the transition.
</Note>
