---
name: ai-pr-reviewer
description: Installs a blocking AI code reviewer that fails real defects and freezes changes to paths you mark as dangerous.
---

# AI Pull Request Reviewer

## 1. What it does

- Sets up an automated AI review on every pull request in your GitHub repository via GitHub Actions. It fails a required check when it finds a real defect, can auto-merge clean low-risk changes if you enable it, and freezes anything touching the paths you marked dangerous until a human approves.

## 2. When to use it

- When you have a team or several contributors sending pull requests regularly.
- When you want an automatic filter before a human reviews the code.
- When critical files (payments, auth) shouldn't be touched without approval.

## 3. Step by step

- Connect the reviewer to your GitHub repository using your own credential.
- Define the paths you consider sensitive or dangerous.
- Every pull request triggers an automatic review in GitHub Actions.
- If it finds a real defect, the required check fails and blocks the merge.
- Clean low-risk changes can auto-merge if you enable that option.
- Any change touching dangerous paths stays frozen until a human approves it.

## 4. Safety rules

- Safety rules: everything ships as a draft first; nothing is sent, published, or paid for without your explicit approval; no data, numbers, or results are ever invented; no credentials or secrets are typed into chat.

## 5. Best practices

- Always review the full draft before approving any send, publish, or payment.
- If real information (data, numbers, results) is missing, ask for it to be flagged as pending instead of invented.
- Keep credentials and keys out of chat; set them in environment variables or your secrets manager.

## 6. GoHighLevel integration

- Where relevant, results can be saved as contacts, tags, tasks, or notes inside your GoHighLevel sub-account.
- No automation inside GHL (workflow, campaign, trigger) activates without your review first.
