# review-pr

Comprehensive pull request review using all specialized agents. Posts only high-confidence, high-value inline comments directly on PR lines - no overall review report.

* Purpose - Review PR changes before merge with minimal noise
* Output - Inline comments on specific lines (only issues that pass confidence/impact thresholds)

```bash
/review-pr [review-aspects] [--min-impact critical|high|medium|medium-low|low]
```

## CI/CD Integration

You can integrate this plugin with your CI/CD pipeline by using Offical Anthropics Claude Code Action. See [CI/CD Integration](https://cek.neolab.finance/guides/ci-integration) for more details.

## Arguments

| Argument         | Format                 | Default | Description                                                                                                                   |
| ---------------- | ---------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `review-aspects` | Free text              | None    | Optional review aspects or focus areas (e.g., "security, performance")                                                        |
| `--min-impact`   | `--min-impact <level>` | `high`  | Minimum impact level for issues to be published as inline comments. Values: `critical`, `high`, `medium`, `medium-low`, `low` |

### Impact Level Mapping

| Level        | Impact Score Range |
| ------------ | ------------------ |
| `critical`   | 81-100             |
| `high`       | 61-80              |
| `medium`     | 41-60              |
| `medium-low` | 21-40              |
| `low`        | 0-20               |

## How It Works

1. **PR Context Loading**: Fetches PR details and diff
   * Changed files
   * Commit messages
   * PR description
   * Base branch context
2. **Parallel Agent Analysis**: Same six agents analyze the PR diff
   * Each agent examines changes from their specialty perspective
   * Considers PR context and commit messages
3. **Confidence & Impact Scoring**: Each issue is scored on two dimensions
   * **Confidence (0-100)**: How likely is this a real issue vs false positive?
   * **Impact (0-100)**: How severe is the consequence if left unfixed?
   * Progressive threshold: Critical issues (81-100 impact) need 50% confidence, Low issues (0-20 impact) need 95% confidence
4. **Inline Comment Posting**: Only issues passing both filters get posted
   * Issues below the `--min-impact` level (default: `high` / score 61+) are excluded
   * Issues below the progressive confidence threshold for their impact level are excluded
   * Uses GitHub inline comments on specific PR lines

## Usage Examples

```bash
# Review PR by number
> /review-pr #123

# Review PR with focus on security
> /review-pr security

# Include medium-impact issues and above
> /review-pr --min-impact medium

# Combine focus areas with a lower impact threshold
> /review-pr security, performance --min-impact medium-low

# Review current branch's PR (defaults to --min-impact high)
> /review-pr
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cek.neolab.finance/plugins/review/review-pr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
