review dynamic
This skill is different.
/brewcode:reviewis not shipped with the brewcode plugin. It is generated into every target project by /brewcode:setup — tailored to the project’s tech stack, detected agents, coding conventions, and etalon classes. Every project ends up with its own/brewcode:review, adapted to what that codebase actually looks like.
Not to be confused with /brewcode:standards-review
/brewcode:standards-review is a static plugin skill for prescriptive style / rules / convention compliance.
/brewcode:review is a dynamic per-project skill for deliberative multi-agent code review with quorum consensus, tech-specific checks, and optional Critic / devil’s-advocate phases.
Think of it as: standards-review checks if the code follows the rules, review checks if the code is actually good.
What it does
A single invocation runs a full multi-phase pipeline:
- Codebase study — parallel Explore agents scan the repo topology, tests, and DB layer.
- Group formation — enables
main-code,tests,db-layer(and any project-specific groups likesecurity) based on detected files. - Parallel review —
Nagents per group run simultaneously; each one runs the project’s adapted checks and rules. - Quorum collection — findings are clustered by file, line range (±5), and category; only clusters with ≥
Munique agents are confirmed. - DoubleCheck — one Opus reviewer re-verifies every confirmed finding (exists? accurate? actionable? right severity?).
- Critic (optional) — devil’s-advocate Opus agent challenges the whole review, looking for issues every reviewer missed.
- Report — prioritized findings (P0 Critic → P1 DoubleCheck-confirmed → P2 quorum only → P3 exceptions).
Invocation
/brewcode:review "<prompt-or-file-path>" [-q|--quorum [G-]N-M] [-c|--critic]
Parameters
| Argument | Meaning | Example |
|---|---|---|
| prompt | Plain-text review focus | /brewcode:review "auth module PR 123" |
| file path | Read file as review instructions | /brewcode:review ./review-focus.md |
-q N-M | N agents per group, M quorum threshold | -q 5-3 → 5 agents, needs 3 confirming |
-q G-N-M | G groups, N agents/group, M quorum | -q 3-4-2 → 3 groups × 4 agents, quorum 2 |
-c / --critic | Enable Critic phase 5.5 after DoubleCheck | -c |
| Default | -q 3-2 (3 agents per group, quorum 2), no critic | — |
The skill also auto-enables Critic when the prompt contains the words critic, критик, or с критиком.
How generation works
- You run
/brewcode:setupDuring setup, Phase 3.5 dispatches
bash scripts/setup.sh review. The script creates.claude/skills/brewcode-review/in your project and copiesbrewcode/templates/skills/review/SKILL.md.templateinto.claude/skills/brewcode-review/SKILL.md. - Parallel analysis agents run in the setup skill
Research agents spawned by
/brewcode:setupscan your codebase in parallel and collect: tech stack (Java/Spring, Node/TS, Python, Go, Kotlin, etc.), test framework (JUnit, Jest, pytest, go test, …), available project agents from.claude/agents/, linting/formatting rules fromCLAUDE.md, and characteristic patterns from etalon classes. - Placeholders in the template get replaced
The template has 8 placeholders filled in from the analysis:
{PROJECT_AGENTS_TABLE}— your project’s agents (e.g.db_expert,api_reviewer){TECH_SPECIFIC_CHECKS}— tech-stack-tailored check categories{PROJECT_RULES}— AssertJ/Lombok/logging/import rules extracted fromCLAUDE.md{MAIN_AGENT},{TEST_AGENT},{DB_AGENT}— group-specific agent picks{CUSTOM_GROUPS}— e.g.security,infra,ui{CODEBASE_BLOCKS}— which subtrees Phase 1 Explore should scan{REVIEW_PROMPT}— the default review framing
- Result:
.claude/skills/brewcode-review/in your projectYou now have a project-local skill:
.claude/skills/brewcode-review/SKILL.md— the instantiated skill, ~460 lines, ready to run.claude/skills/brewcode-review/references/agent-prompt.md— standard / DB-layer / Critic agent prompt variants.claude/skills/brewcode-review/references/report-template.md— report format + severity ladder
From now on
/brewcode:reviewis a real slash command in that project — not a plugin skill, a project skill.
Quorum semantics
Findings are de-duplicated before being counted toward a quorum. Two findings from different agents are treated as the same finding when all of:
| Criterion | Tolerance |
|---|---|
| File path | Exact |
| Line range | ±5 lines |
| Category | Same or equivalent |
| Description similarity | ≥0.6 semantic |
Only unique-agent counts matter: five findings from one reviewer still count as one vote, not five. If unique_agents ≥ M the cluster is confirmed; if not but severity ∈ {blocker, critical} it becomes a P3 exception (surfaced but below quorum); otherwise discarded.
Merge rules within a confirmed cluster: longest description, highest severity, first non-null suggestion, averaged confidence, min/max line range, full list of contributing agents.
The Critic phase
When -c / --critic is set (or the prompt mentions critic / критик), an extra pair of phases runs after DoubleCheck:
- Phase 5.5 — Critic. A single Opus reviewer is given every confirmed, rejected, and discarded finding plus the raw source, and tasked with finding what everyone missed. Its output category is
missedFindings. - Phase 5.75 — DoubleCheck Critic. A second Opus agent verifies the Critic’s own findings using the same CONFIRM/REJECT verdict JSON.
Anything that survives both stages gets top priority (P0) in the final report.
Tech-specific checks
The template ships with example check blocks for the major stacks:
| Category | Checks |
|---|---|
| DI | Constructor injection, no field injection, @RequiredArgsConstructor |
| Transactions | @Transactional scope, rollback rules, isolation levels |
| Null-safety | Optional usage, @NonNull/@Nullable, null checks |
| N+1 | Eager vs lazy loading, batch fetching, entity graphs |
| Security | @PreAuthorize, input validation, SQL injection |
| Category | Checks |
|---|---|
| Async | Promise handling, unhandled rejections, async/await |
| Types | Strict null checks, type guards, generics |
| Validation | Input sanitization, Zod/Joi schema validation |
| Security | XSS, CSRF, helmet.js |
| Category | Checks |
|---|---|
| Type hints | Function signatures, return types, generics |
| Exceptions | Specific types, context managers |
| Async | asyncio patterns, event loop handling |
| Security | SQL parameterization, input validation |
| Category | Checks |
|---|---|
| Error handling | Wrapping, sentinel errors, error types |
| Concurrency | Goroutine leaks, channel patterns, sync primitives |
| Memory | Slice capacity, pointer semantics, defer usage |
| Security | SQL injection, input validation |
When /brewcode:setup detects your stack, only the relevant block is written into SKILL.md. Multi-stack projects get multiple blocks.
Related
/brewcode:setup
Generates this skill into your project. Rerun setup after major stack changes so review stays aligned.
/brewcode:standards-review
Static plugin skill for rule/style/convention enforcement. Complementary — run both for full coverage.
reviewer agent
The Opus agent that powers DoubleCheck and Critic phases.
/brewtools:debate
Evidence-based multi-agent debate. Accepts a —review flag that triggers /brewcode:review on the final output when this skill is present in the project.
Files in a target project
<project>/
└── .claude/
└── skills/
└── brewcode-review/
├── SKILL.md # instantiated skill (~460 lines)
└── references/
├── agent-prompt.md # standard/DB/Critic agent prompts
└── report-template.md # report layout + severity ladder
The skill is committable — you can check it into version control so your whole team shares the same project-adapted review standard.
View template source
The 461-line template that gets instantiated per-project.
View setup skill
Phase 3.5 is where this skill is generated. Lines 181–262.