Files
leo-claude-mktplace/plugins/pr-review/commands/pr-review.md
lmiranda 9698e8724d feat(plugins): implement Sprint 4 commands (#241-#258)
Sprint 4 - Plugin Commands implementation adding 18 new user-facing
commands across 8 plugins as part of V5.2.0 Plugin Enhancements.

**projman:**
- #241: /sprint-diagram - Mermaid visualization of sprint issues

**pr-review:**
- #242: Confidence threshold config (PR_REVIEW_CONFIDENCE_THRESHOLD)
- #243: /pr-diff - Formatted diff with inline review comments

**data-platform:**
- #244: /data-quality - DataFrame quality checks (nulls, duplicates, outliers)
- #245: /lineage-viz - dbt lineage as Mermaid diagrams
- #246: /dbt-test - Formatted dbt test runner

**viz-platform:**
- #247: /chart-export - Export charts to PNG/SVG/PDF via kaleido
- #248: /accessibility-check - Color blind validation (WCAG contrast)
- #249: /breakpoints - Responsive layout configuration

**contract-validator:**
- #250: /dependency-graph - Plugin dependency visualization

**doc-guardian:**
- #251: /changelog-gen - Generate changelog from conventional commits
- #252: /doc-coverage - Documentation coverage metrics
- #253: /stale-docs - Flag outdated documentation

**claude-config-maintainer:**
- #254: /config-diff - Track CLAUDE.md changes over time
- #255: /config-lint - 31 lint rules for CLAUDE.md best practices

**cmdb-assistant:**
- #256: /cmdb-topology - Infrastructure topology diagrams
- #257: /change-audit - NetBox audit trail queries
- #258: /ip-conflicts - Detect IP conflicts and overlaps

Closes #241, #242, #243, #244, #245, #246, #247, #248, #249,
#250, #251, #252, #253, #254, #255, #256, #257, #258

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:02:26 -05:00

4.5 KiB

/pr-review - Full Multi-Agent Review

Purpose

Conduct a comprehensive pull request review using specialized agents for security, performance, maintainability, and test coverage.

Usage

/pr-review <pr-number> [--repo owner/repo]

Behavior

Step 1: Fetch PR Data

Using Gitea MCP tools:

  1. get_pull_request - PR metadata
  2. get_pr_diff - Code changes
  3. get_pr_comments - Existing discussion

Step 2: Dispatch to Agents

The coordinator dispatches review tasks to specialized agents:

PR Review: #123 - Add user authentication
═══════════════════════════════════════════════════

Dispatching to review agents:
├─ Security Reviewer     → analyzing...
├─ Performance Analyst   → analyzing...
├─ Maintainability Auditor → analyzing...
└─ Test Validator        → analyzing...

Step 3: Aggregate Findings

Collect findings from all agents, each with:

  • Category (security, performance, maintainability, tests)
  • Severity (critical, major, minor, suggestion)
  • Confidence score (0.0 - 1.0)
  • File and line reference
  • Description
  • Suggested fix (if applicable)

Step 4: Filter by Confidence

Filter findings based on PR_REVIEW_CONFIDENCE_THRESHOLD (default: 0.7):

Confidence Label Description
0.9 - 1.0 HIGH Definite issue, must address
0.7 - 0.89 MEDIUM Likely issue, should address
0.5 - 0.69 LOW Possible concern, consider addressing
< threshold (filtered) Below configured threshold

Note: With the default threshold of 0.7, only MEDIUM and HIGH confidence findings are shown. Adjust PR_REVIEW_CONFIDENCE_THRESHOLD to include more or fewer findings.

Step 5: Generate Report

═══════════════════════════════════════════════════
PR Review Report: #123
═══════════════════════════════════════════════════

Summary:
  Files changed: 12
  Lines added: 234
  Lines removed: 45

Findings: 8 total
  🔴 Critical: 1
  🟠 Major: 2
  🟡 Minor: 3
  💡 Suggestions: 2

───────────────────────────────────────────────────
CRITICAL FINDINGS
───────────────────────────────────────────────────

[SEC-001] SQL Injection Vulnerability (Confidence: 0.95)
File: src/api/users.ts:45
Category: Security

The query uses string interpolation without parameterization:
```ts
const query = `SELECT * FROM users WHERE id = ${userId}`;

Suggested fix:

const query = 'SELECT * FROM users WHERE id = ?';
db.query(query, [userId]);

─────────────────────────────────────────────────── MAJOR FINDINGS ───────────────────────────────────────────────────

[PERF-001] N+1 Query Pattern (Confidence: 0.82) ...

─────────────────────────────────────────────────── VERDICT ───────────────────────────────────────────────────

REQUEST_CHANGES

This PR has 1 critical security issue that must be addressed before merging. See SEC-001 above.

───────────────────────────────────────────────────


### Step 6: Submit Review (Optional)

Submit this review to Gitea?

  1. Yes, with REQUEST_CHANGES
  2. Yes, as COMMENT only
  3. No, just show me the report

If yes, use `create_pr_review` MCP tool.

## Output

Full review report with:
- Summary statistics
- Findings grouped by severity
- Code snippets with context
- Suggested fixes
- Overall verdict

## Configuration

| Variable | Default | Description |
|----------|---------|-------------|
| `PR_REVIEW_CONFIDENCE_THRESHOLD` | `0.7` | Minimum confidence to report (0.0-1.0) |
| `PR_REVIEW_AUTO_SUBMIT` | `false` | Auto-submit to Gitea |