review — quorum code review
Caution
/brewcode:review is not a static plugin skill. It is generated into each target project by /brewcode:setup. The generated skill knows your tech stack, your project agents, your coding conventions, and your etalon classes — every project gets its own version.
Tip
Not the same as /brewcode:standards-review. Standards-review is a static plugin skill for rule/style/convention compliance checks. Review is a deliberative multi-agent pipeline with quorum consensus — it checks if the code is actually good, not just if it follows the rules.
Quick reference
| Field | Value |
|---|---|
| Command | /brewcode:review "<prompt-or-path>" [-q [G-]N-M] [-c] |
| Arguments | prompt or file path · -q quorum spec · -c Critic phase |
| Model | Opus |
| Tools | Read, Glob, Grep, Task, Bash, Write |
| Default quorum | 3 agents per group, threshold 2 (-q 3-2) |
When to use
- PR review before merge — point the skill at a branch diff or a plain description; agents cover all review groups in parallel
- Architecture audit — full-codebase pass with project-adapted tech checks; Critic phase flags what everyone missed
- Post-refactor sanity —
-q 5-3for higher signal, Critic enabled (-c) for adversarial pass - DB-heavy changes — the generated skill includes a
db-layergroup with N+1, transaction, and SQL checks when detected - Convention enforcement — project rules from
CLAUDE.mdare baked in; no manual checklist needed
| Scenario | Command |
|---|---|
| Review a PR by description | /brewcode:review "auth module PR 123" |
| Review from a file | /brewcode:review ./review-focus.md |
| 5 agents, quorum 3 | /brewcode:review "auth" -q 5-3 |
| 3 groups × 4 agents, quorum 2 | /brewcode:review "auth" -q 3-4-2 |
| With Critic phase | /brewcode:review "auth" -c |
Examples
# Standard review — 3 agents per group, quorum 2
/brewcode:review "check the payment module for correctness"
# High-confidence review — 5 agents, quorum 3, Critic enabled
/brewcode:review "full audit of auth subsystem" -q 5-3 -c
# Read review instructions from a file
/brewcode:review ./docs/review-focus.md
# Natural language also works
"review the last PR"
"code review with critic" # auto-enables Critic phase
Flow
- Codebase study
Parallel Explore agents scan repo topology, test layout, and DB layer. Results feed into group formation — which review groups are enabled for this run.
- Parallel review agents
N agents per group run simultaneously. Each agent applies the project’s adapted tech checks (DI, transactions, async patterns, security) and rules extracted from
CLAUDE.md. Groups:main-code,tests,db-layer, plus any project-specific groups likesecurityorinfra. - Quorum collection
Findings are clustered by file, line range (±5 lines), and category. A cluster is confirmed when ≥ M unique agents reported it. Five findings from one reviewer count as one vote — uniqueness is enforced. Severity blockers and criticals below quorum become P3 exceptions.
- DoubleCheck
One Opus reviewer agent re-verifies every confirmed finding: does it exist? Is it accurate? Is the severity right? Is the suggestion actionable? Findings that fail DoubleCheck are rejected.
- Critic phase (optional)
Enabled with
-cor when the prompt mentions critic. A second Opus reviewer receives all confirmed, rejected, and discarded findings plus the raw source — tasked with finding what everyone missed (missedFindings). A third agent double-checks the Critic’s output. - Prioritized report
Findings ordered: P0 Critic survivors → P1 DoubleCheck-confirmed → P2 quorum-only → P3 severity exceptions. Each finding: file, line range, category, description, suggestion, confidence, contributing agents.
Quorum rules & internals
De-duplication criteria — two findings from different agents count as the same finding when all of:
| Criterion | Tolerance |
|---|---|
| File path | Exact match |
| Line range | ±5 lines |
| Category | Same or equivalent |
| Description similarity | ≥ 0.6 semantic |
Merge rules within a confirmed cluster: longest description wins, highest severity, first non-null suggestion, averaged confidence, min/max line range, full list of contributing agents.
How the skill is generated — run /brewcode:setup. Phase 3.5 runs bash scripts/setup.sh review, copies brewcode/templates/skills/review/SKILL.md.template into .claude/skills/brewcode-review/SKILL.md, and fills 8 placeholders from parallel analysis agents:
| Placeholder | Filled with |
|---|---|
{PROJECT_AGENTS_TABLE} | Agents detected in .claude/agents/ |
{TECH_SPECIFIC_CHECKS} | Stack-tailored check categories |
{PROJECT_RULES} | Rules from CLAUDE.md (AssertJ, Lombok, logging, imports) |
{MAIN_AGENT}, {TEST_AGENT}, {DB_AGENT} | Group-specific agent picks |
{CUSTOM_GROUPS} | Extra groups: security, infra, ui |
{CODEBASE_BLOCKS} | Subtrees Phase 1 Explore should scan |
{REVIEW_PROMPT} | Default review framing |
Generated files in the target project:
<project>/.claude/skills/brewcode-review/
├── SKILL.md # instantiated skill (~460 lines)
└── references/
├── agent-prompt.md # standard / DB-layer / Critic prompts
└── report-template.md # report format + severity ladderThe skill is committable — check it into version control so your whole team shares the same adapted review standard.
/brewcode:standards-review
Static plugin skill for rule and convention compliance. Complementary — run both for full coverage.
/brewtools:debate
Evidence-based multi-agent debate. Accepts a —review flag that triggers /brewcode:review on the debate output.
GitHub template source
The 460-line template instantiated per project by /brewcode:setup.
brewcode overview
All brewcode skills and agents in one place.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.