Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"name": "code-review",
"source": "./plugins/code-review",
"description": "Automated code quality review with language-aware analysis for pre-commit verification",
"version": "0.0.7"
"version": "0.0.10"
},
{
"name": "golang",
Expand Down
1 change: 1 addition & 0 deletions PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ See [plugins/ci/README.md](plugins/ci/README.md) for detailed documentation.
Automated code quality review with language-aware analysis for pre-commit verification

**Commands:**
- **`/code-review:panel-review` `[--serial] [--comment] [--coderabbit] [pr-url-or-number]`** - Comprehensive multi-perspective code review with architecture, security, consistency, QA, and adversarial analysis
- **`/code-review:pr` `<pr-url-or-number> [--language <lang>] [--profile <name>] [--skip-build] [--skip-tests]`** - Automated PR code quality review with language-aware analysis and project-specific profiles
- **`/code-review:pre-commit-review` `[--language <lang>] [--profile <name>] [--skip-build] [--skip-tests]`** - Automated pre-commit code quality review with language-aware analysis and project-specific profiles

Expand Down
13 changes: 12 additions & 1 deletion docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,12 @@
},
{
"commands": [
{
"argument_hint": "[--serial] [--comment] [--coderabbit] [pr-url-or-number]",
"description": "Comprehensive multi-perspective code review with architecture, security, consistency, QA, and adversarial analysis",
"name": "panel-review",
"synopsis": "/code-review:panel-review [--serial] [--comment] [--coderabbit] [pr-url-or-number]"
},
{
"argument_hint": "<pr-url-or-number> [--language <lang>] [--profile <name>] [--skip-build] [--skip-tests]",
"description": "Automated PR code quality review with language-aware analysis and project-specific profiles",
Expand Down Expand Up @@ -1687,9 +1693,14 @@
"description": "Project-specific review profile for the openshift/hypershift repository \u2014 delegates to the repo's own agents and skills",
"id": "profile-hypershift",
"name": "HyperShift Project Profile"
},
{
"description": "Multi-specialist panel review. Dispatches 7 parallel sub-agent reviewers (Architecture, Security & Supply Chain, UX/API, Codebase Consistency, QA Engineer, Devil's Advocate, Technical Writer) then a Panel Arbiter synthesizes one verdict.",
"id": "review-panel",
"name": "review-panel"
}
],
"version": "0.0.7"
"version": "0.0.10"
},
{
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/code-review/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-review",
"description": "Automated code quality review with language-aware analysis for pre-commit verification",
"version": "0.0.7",
"version": "0.0.10",
"author": {
"name": "github.com/openshift-eng"
}
Expand Down
27 changes: 27 additions & 0 deletions plugins/code-review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ Automated code quality review with language-aware analysis for pre-commit verifi

## Commands

### `/code-review:panel-review`

Comprehensive multi-perspective code review with architecture, security, consistency, QA, adversarial, and documentation analysis. Seven specialist reviewers execute in parallel as sub-agents, each examining the changes through a different lens. After all reviewers complete, a Panel Arbiter synthesizes findings, resolves disagreements, and produces a single verdict.

Inspired by Microsoft's [APM Review Panel](https://github.com/microsoft/apm/tree/bb94e789a888d4143e347bff9f37cdbb3ef75a63/.apm/skills/apm-review-panel).

**Usage:**
```bash
/code-review:panel-review [pr-url-or-number] [coderabbit]
```

**Arguments:**
- PR identifier (optional): Full GitHub PR URL or PR number. If omitted, diffs current branch against its upstream merge base.
- External reviewers (optional): Names of external review tools to include. Currently supported: `coderabbit`.

**Specialist Panel:**

| Reviewer | Focus |
|----------|-------|
| Architecture | Structural patterns, SOLID, cross-file impact, module boundaries |
| Security & Supply Chain | Vulnerabilities, dependency trust, supply chain integrity |
| UX & API | Naming, error messages, API ergonomics, backwards compatibility |
| Codebase Consistency | Duplicate helpers, convention drift, style match |
| QA Engineer | Test coverage gaps, missing edge-case tests, concrete test suggestions |
| Devil's Advocate | Assumes every line is wrong; tries to break the code |
| Technical Writer | Documentation accuracy, staleness, consistency with code changes |

### `/code-review:pre-commit-review`

Performs a comprehensive code quality review of staged and unstaged changes before committing. Analyzes unit test coverage, idiomatic code patterns, DRY compliance, SOLID principles, and build verification.
Expand Down
96 changes: 96 additions & 0 deletions plugins/code-review/commands/panel-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
description: "Comprehensive multi-perspective code review with architecture, security, consistency, QA, and adversarial analysis"
argument-hint: "[--serial] [--comment] [--coderabbit] [pr-url-or-number]"
---

## Name
code-review:panel-review

## Synopsis
```
/code-review:panel-review [--serial] [--comment] [--coderabbit] [pr-url-or-number]
```
Comment thread
stbenjam marked this conversation as resolved.

## Description
The `panel-review` command runs a multi-specialist review panel. Seven specialist reviewers each examine the changes through a different lens. Optionally, external review tools (like CodeRabbit) run alongside them. After all reviewers complete, an arbiter synthesizes findings, resolves disagreements, and produces a single verdict.

By default, each specialist runs as a parallel sub-agent. Pass `--serial` to run all specialists inline in the main agent instead — this is significantly cheaper since the codebase context is derived once and shared across all specialists, but reviews run sequentially rather than concurrently.

This panel is best suited for complex or risky changes. For routine changes, consider `/code-review:pre-commit-review` instead.

This command does not perform build verification. Use `/code-review:pr` if build verification is needed.

No arguments are required. By default, the command diffs the current branch against its upstream merge base. Language and profile skills are auto-detected.

## Implementation

### Step 1 — Parse Arguments

Split `$ARGUMENTS` on whitespace. Classify each token:

- A **PR URL** (contains `github.com` and `/pull/`) or **PR number** (bare integer) — pass to the skill as the PR identifier.
- `--serial` — enable serial execution mode (all specialists run inline instead of as sub-agents).
- `--comment` — post the verdict as a comment on the PR after the review completes. Requires a PR identifier.
- `--coderabbit` — include CodeRabbit as an external reviewer.
- **Anything else** — warn and ignore.

If more than one PR identifier is found, error and exit.

### Step 2 — Execute the Review Panel

Read `skills/review-panel/SKILL.md` relative to the plugin root directory. Follow its instructions for all remaining work — diff resolution, language detection, sub-agent dispatch, arbitration, and verdict.

Pass to the skill:
- The PR identifier (if any)
- The list of requested external reviewers (if any)
- Whether serial mode was requested
- Whether comment mode was requested

If `--comment` is passed without a PR identifier, error and exit — a PR is required to post a comment.

## Return Value
- **Format**: Structured verdict using the template from `skills/review-panel/verdict-template.md`.
- **Success**: Verdict with APPROVE or NEEDS_DISCUSSION disposition.
- **Failure**: Verdict with REQUEST_CHANGES and blocking findings listed.

## Examples

1. **Review current branch (default)**:
```
/code-review:panel-review
```

2. **Review with CodeRabbit**:
```
/code-review:panel-review --coderabbit
```

3. **Review current branch in serial mode (cheaper)**:
```
/code-review:panel-review --serial
```

4. **Review a PR and post the verdict as a comment**:
```
/code-review:panel-review --comment 456
```

5. **Review a specific PR with CodeRabbit**:
```
/code-review:panel-review https://github.com/openshift/hypershift/pull/789 --coderabbit
```

6. **Review by PR number in current repo**:
```
/code-review:panel-review 456
```

## See Also
- `/code-review:pr` — single-reviewer analysis with build verification, language-specific idiom checks, and SOLID/DRY compliance
- `/code-review:pre-commit-review` — lightweight pre-commit review of staged changes

## Arguments:
- PR identifier (optional): Full GitHub PR URL or PR number. If omitted, diffs current branch against its upstream merge base.
- `--serial` (optional): Run all specialists inline in the main agent instead of as parallel sub-agents. Cheaper but sequential.
- `--comment` (optional): Post the verdict as a comment on the PR. Requires a PR identifier.
- `--coderabbit` (optional): Include CodeRabbit as an external reviewer. Runs in parallel with (or alongside, in serial mode) internal specialists.
Loading