> ## 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.

# Setup

> Install the `pr-review` daemon and confirm your first PR review.

Install the `pr-review` daemon to define Charlie's pull request review policy in your repository. Installation creates a normal pull request, so your team can inspect the policy before Charlie uses it.

You are done when the daemon files are on the repository's default branch and Charlie has loaded the policy, which usually happens within a few minutes. The daemon can then activate when a pull request event or explicit request matches its `watch` policy.

## Before you start

Complete the [Charlie GitHub integration](/integrations/github) for this repository so Charlie can access it. Inviting `@CharlieHelps` is optional. It lets teammates request reviews through GitHub's reviewer picker or pull request comments. Learn more about [Charlie's GitHub identities](/integrations/github-identities). Make sure someone on your team can merge the installation pull request.

## 1. Install the daemon

Installing from the dashboard is the fastest option. You can also ask Charlie on Slack, GitHub, or Linear, or use the daemons CLI for a local workflow. Each method installs the same reference policy.

<Tabs defaultTabIndex={0} sync={false}>
  <Tab title="Dashboard">
    1. Open the [Charlie dashboard](https://dash.charlielabs.ai/).
    2. Navigate to the **Overview** page.
    3. Click **Add daemon** for the desired repository.
    4. Click **Add daemon to repo** for the `pr-review` daemon.
    5. Open the installation pull request.

    The dashboard does not write directly to the default branch. Charlie starts using the policy only after your team merges the pull request.
  </Tab>

  <Tab title="Ask Charlie">
    Ask Charlie on Slack, GitHub, or Linear. Name the repository if it is not clear from context. For example:

    ```text theme={null}
    Add the `pr-review` daemon from `charlie-labs/daemons` to this repository using the daemons CLI
    ```

    Charlie will open an installation pull request for your team to review.
  </Tab>

  <Tab title="CLI">
    Use the daemons CLI if you prefer to install the files locally. Run this command from the repository root:

    ```bash theme={null}
    bunx @charlie-labs/daemons add pr-review
    ```

    Inspect the files, commit them on a branch, and open a normal pull request.
  </Tab>
</Tabs>

## 2. Review the installation pull request

The [reference `pr-review` daemon](https://github.com/charlie-labs/daemons/tree/master/daemons/pr-review) adds three files:

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

* `DAEMON.md` defines when reviews run and the policy shared by the whole review.
* `correctness.md` looks for evidence-backed correctness problems.
* `repository-guidance.md` checks applicable repository instructions and durable local conventions.

The reference policy starts with these defaults:

| Choice              | Reference default                                                                                                                                                                            |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| When reviews run    | When a non-draft pull request opens, a draft becomes ready, `CharlieHelps` is requested as a reviewer, or a comment requests a review from `CharlieHelps`. It does not run after every push. |
| Review perspectives | Correctness and repository guidance.                                                                                                                                                         |
| Review outcomes     | `COMMENT` only. Findings must meet the evidence and usefulness bar, and there is no fixed finding cap.                                                                                       |
| Clean review        | Charlie adds one `+1` reaction to the pull request body instead of posting an empty review or comment.                                                                                       |
| Final review        | Precise findings appear inline when possible. Cross-file concerns appear in the review body. Generic summaries and praise are omitted.                                                       |

If you are unsure, keep the reference defaults. You can change them after seeing the first review.

### Optional changes before your first review

Most teams should merge the reference policy unchanged. Consider these two changes now only if they match how your team already reviews pull requests.

1. **Review every push.** Add this condition to the `watch` section in `DAEMON.md`:

   ```text theme={null}
   A new commit is pushed to an open non-draft pull request.
   ```

   This increases review frequency and cost. Without it, follow-up reviews require an explicit request. For a middle ground, review only substantial updates; see [Cost controls](/pr-reviews/cost-control#review-only-substantial-updates).

2. **Allow decision reviews.** Update the review outcomes in `DAEMON.md` to permit `APPROVE` or `REQUEST_CHANGES` in addition to `COMMENT`. Define a clear threshold for each outcome so Charlie knows when it is appropriate.

<Note>
  For the first review, leave the lanes, suppressions, evidence rules, presentation, and rereview policy unchanged. Starting from a known baseline makes later changes easier to evaluate.
</Note>

## 3. Merge the installation pull request

Merge the installation pull request into the repository's default branch. Charlie loads the policy from the default branch, so changes in an open pull request are not used yet.

Charlie loads the policy within a few minutes after the daemon files reach the default branch. A matching pull request event or explicit request can then activate the daemon.

Installation does not automatically review pull requests that are already open. Explicitly request a review for an existing pull request, or wait for a new configured event.

## 4. Confirm your first review

Choose a small, representative pull request and request `CharlieHelps` as a reviewer or ask `CharlieHelps` for a review in a pull request comment. The explicit request uses the same repository-owned policy as automatic reviews.

When a finding qualifies, the reference policy publishes a `COMMENT` review. When the review is clean, Charlie adds one `+1` reaction to the pull request body.

You can also open [Dashboard > Activity](https://dash.charlielabs.ai/) to confirm that Charlie handled the request. If the expected review activity or GitHub output does not appear, see [Troubleshoot PR reviews](/pr-reviews/troubleshooting).

## Next steps

* [Configure PR reviews](/pr-reviews/configure) to change cadence, review lanes, outcomes, presentation, or follow-up behavior.
* [Control PR review costs](/pr-reviews/cost-control) to tune review frequency and scope.
* [Troubleshoot PR reviews](/pr-reviews/troubleshooting) if a review does not run or the result is unexpected.
