-
Notifications
You must be signed in to change notification settings - Fork 266
Add panel-review command with multi-specialist code review panel #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stbenjam
wants to merge
2
commits into
openshift-eng:main
Choose a base branch
from
stbenjam:panel-review-command
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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] | ||
| ``` | ||
|
|
||
| ## 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. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.