review dynamic

This skill is different. /brewcode:review is 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:

  1. Codebase study — parallel Explore agents scan the repo topology, tests, and DB layer.
  2. Group formation — enables main-code, tests, db-layer (and any project-specific groups like security) based on detected files.
  3. Parallel reviewN agents per group run simultaneously; each one runs the project’s adapted checks and rules.
  4. Quorum collection — findings are clustered by file, line range (±5), and category; only clusters with ≥M unique agents are confirmed.
  5. DoubleCheck — one Opus reviewer re-verifies every confirmed finding (exists? accurate? actionable? right severity?).
  6. Critic (optional) — devil’s-advocate Opus agent challenges the whole review, looking for issues every reviewer missed.
  7. 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

ArgumentMeaningExample
promptPlain-text review focus/brewcode:review "auth module PR 123"
file pathRead file as review instructions/brewcode:review ./review-focus.md
-q N-MN agents per group, M quorum threshold-q 5-3 → 5 agents, needs 3 confirming
-q G-N-MG groups, N agents/group, M quorum-q 3-4-2 → 3 groups × 4 agents, quorum 2
-c / --criticEnable 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

  1. You run /brewcode:setup

    During setup, Phase 3.5 dispatches bash scripts/setup.sh review. The script creates .claude/skills/brewcode-review/ in your project and copies brewcode/templates/skills/review/SKILL.md.template into .claude/skills/brewcode-review/SKILL.md.

  2. Parallel analysis agents run in the setup skill

    Research agents spawned by /brewcode:setup scan 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 from CLAUDE.md, and characteristic patterns from etalon classes.

  3. 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 from CLAUDE.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
  4. Result: .claude/skills/brewcode-review/ in your project

    You 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:review is 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:

CriterionTolerance
File pathExact
Line range±5 lines
CategorySame 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:

CategoryChecks
DIConstructor injection, no field injection, @RequiredArgsConstructor
Transactions@Transactional scope, rollback rules, isolation levels
Null-safetyOptional usage, @NonNull/@Nullable, null checks
N+1Eager vs lazy loading, batch fetching, entity graphs
Security@PreAuthorize, input validation, SQL injection
CategoryChecks
AsyncPromise handling, unhandled rejections, async/await
TypesStrict null checks, type guards, generics
ValidationInput sanitization, Zod/Joi schema validation
SecurityXSS, CSRF, helmet.js
CategoryChecks
Type hintsFunction signatures, return types, generics
ExceptionsSpecific types, context managers
Asyncasyncio patterns, event loop handling
SecuritySQL parameterization, input validation
CategoryChecks
Error handlingWrapping, sentinel errors, error types
ConcurrencyGoroutine leaks, channel patterns, sync primitives
MemorySlice capacity, pointer semantics, defer usage
SecuritySQL injection, input validation

When /brewcode:setup detects your stack, only the relevant block is written into SKILL.md. Multi-stack projects get multiple blocks.

🔧

/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.