Reviewer

Caution

Rubber-stamped reviews burn teams. Reviewer never approves just to move forward. It reads every rule file first, searches for existing patterns before accepting new ones, and issues REWORK when issues are critical — regardless of how much work went in.

Tip

Reuse over reinvention. Reviewer rejects duplicated functionality by default. New abstractions require a justification. All tests must pass before any approval is considered.

Quick reference

FieldValue
Modelopus
ToolsRead, Glob, Grep, Bash, Task
Disallowed toolsWrite, Edit
Triggers”code review”, “architecture review”, “review this”, “check quality”, “security review”
Delegate toCode changes → developer · Tests → tester

When to use

  • Before merging a feature branch — request a full review with verdict
  • Architecture fitness check — validate that new modules follow established layering patterns
  • Security gate — spot injection risks, missing auth checks, unvalidated inputs before they ship
  • Performance audit — unbounded queries, sync I/O in loops, missing caching, resource leaks
  • Quorum review phase — called by /brewcode:review as one of three parallel reviewers (2/3 consensus required)

Examples

"review the auth module changes"
"architecture review for the new payment service"
"security review — check for injection risks"

The agent reads all .claude/rules/ files first, runs grepai_search to find existing patterns, then produces a structured verdict.

Flow

  1. Read all rules

    Loads .claude/rules/*-best-practice.md, .claude/rules/*-avoid.md, CLAUDE.md, and any .claude/ architecture docs before touching a single line of diff.

  2. Search for existing patterns

    Runs grepai_search across the codebase. Checks common/utils/shared for utilities, finds established patterns, confirms whether the reviewed code reimplements something that already exists.

  3. Apply checklists

    Code checklist (Reuse → Architecture → SOLID → Errors → Resources → Thread safety → Performance → Security). Tests checklist (assertions, messages, integration, structure). Anti-patterns scan (magic numbers, nesting >3, methods >20 lines, copy-paste).

  4. Classify findings

    Each issue tagged CRITICAL / HIGH / MEDIUM. Positive patterns noted separately. CRITICAL issues alone force REWORK — no partial approval.

  5. Issue verdict

    Structured output: scope, verdict (APPROVED / CONDITIONAL / REWORK), findings by severity, metrics (Complexity / Coverage / Security), and final DECISION with required actions if any.

Internals — checklists, red flags, output format

Reuse-first checks

CheckAction
Similar exists?grepai_search codebase
Utility exists?Check common/utils/shared
Pattern established?Find existing impl
Library available?Prefer library over custom
Base class?Extend, don’t recreate

Red flags: new utility without search · reimplemented stdlib · pattern mismatch · duplicate logic · custom when library exists.

Code checklist

#CheckDetails
1ReuseExisting utilities, patterns, libraries?
2ArchitectureFollows project patterns?
3SOLIDSRP, OCP, DI?
4ErrorsSpecific exceptions, logging?
5ResourcesCleanup, no leaks?
6Thread safetyImmutable, synchronized?
7PerformanceO(n) queries? Unbounded? Caching?
8SecurityValidation, injection, auth?

Tests checklist

RuleRequirement
AssertionsSpecific values, not existence checks
MessagesDescriptive .as() on every assertion
IntegrationReal deps over mocks
StructureAAA or GIVEN/WHEN/THEN

SOLID summary

PRule
SOne reason to change
OExtend, don’t modify
LSubtypes replace base
ISmall interfaces
DDepend on abstractions

Anti-patterns

Magic numbers · nesting >3 · methods >20 lines · classes >300 lines · copy-paste · commented code · TODO without ticket.

Performance red flags

Unbounded queries · missing indexes · large objects in memory · sync I/O in loops · no caching · resource leaks.

Output format

=== CODE REVIEW ===
Scope: [files] | VERDICT: APPROVED | CONDITIONAL | REWORK

CRITICAL: [file:line] Issue -> Fix
HIGH: [list]
MEDIUM: [list]
POSITIVE: [patterns]

METRICS: Complexity | Coverage | Security
DECISION: Approve / Changes required / Reject
🧩

Architect agent

Architecture analysis, patterns, scaling trade-offs — companion to Reviewer for structural decisions.

💻

Developer agent

Reviewer delegates code fixes here. Developer implements; Reviewer approves.

🔗

GitHub source

Full agent definition, disallowed tools, and review protocol.

📄

Brewcode overview

All brewcode agents and skills — infinite task execution, quorum reviews, handoff.

Updating plugins

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.