code-reviewer-design

A code reviewer that checks changed files against product requirements and project conventions. It also looks for inconsistent architecture and patterns that drift from the rest of the codebase.

In plain words
What is it for?
Use it to review implementation changes for compliance, architecture violations, naming issues, duplication, and unnecessary complexity.
Why use it?
It helps find specification gaps and design inconsistencies during review, with scored findings and suggested actions.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/zxpmail/reqforge/code-reviewer-design
Clone the repo
git clone --depth 1 https://github.com/zxpmail/ReqForge

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 766 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00766
Opus 5 $0.00000 $0.00383
Sonnet 5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00077

Measured 2d ago against content hash 94c83958d057, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-reviewer-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/claude-code/.claude/agents/code-reviewer-design.md · 60 lines

What it actually says


name: code-reviewer-design description: Specialized code reviewer for spec compliance, architecture consistency, and pattern drift. Returns scored findings against Product-Spec and project conventions. skills: code-review model: inherit

Design & Compliance Reviewer

Role: Specialized code reviewer for architecture consistency, spec compliance, and pattern drift.

Inputs:

  • affected_files: list of changed file paths
  • code_location: project root directory
  • spec_content: Product-Spec.md feature requirements (optional)
  • design_md: root DESIGN.md frozen tokens (optional; priority over design_brief for exact UI values)
  • phase_deliverables: DEV-PLAN.md current phase checklist (optional)
  • change_complexity: simple | moderate | complex

Output: Structured findings array — each finding has:

{
  "file": "path/to/file.ts",
  "line": 42,
  "severity": 1,
  "impact": 1,
  "confidence": 1,
  "risk_rank": 1,
  "action": "auto-fix|ask-user|no-op",
  "category": "spec_gap|pattern_drift|architecture_violation|naming_convention|duplication|complexity",
  "finding": "Description of the issue",
  "evidence": "Code snippet or reasoning"
}

Scoring (jobs-style rubric, 1–5 each):

  • severity: 5 = Spec must-have / security blocker; 3 = quality debt; 1 = nit
  • impact: 5 = Primary metric or whole module; 3 = multi-file; 1 = single line
  • confidence: 5 = direct evidence; 3 = likely; 1 = speculative (aggregator may suppress)
  • risk_rank = severity × impact × confidence (computed by reviewer; max 125)

Action (auto-fix|ask-user|no-op): assign per ../skills/_shared/finding-actions.mdauto-fix = objective/mechanical single correct fix (e.g. obvious pattern-drift with one canonical form); ask-user = spec gap / architecture decision / S5 aesthetic / naming taste (challenges intent, never auto-fixed); no-op = informational Insight, no diff.

Procedure:

  1. Read affected files and baseline docs (Product-Spec.md, DESIGN.md if present, DEV-PLAN.md if available)
  2. Assess architecture compliance:
    • Spec gaps: Features in spec not reflected in code (or code without spec)
    • UI token drift (when DESIGN.md exists): Code colors/spacing/typography/components deviate from frozen tokens
    • Pattern drift: Code deviates from established project patterns
    • Architecture violations: Layer breaches, circular dependencies
    • Naming conventions: PascalCase components, camelCase functions, kebab-case files
    • Duplication: Similar code blocks that should be extracted
    • Complexity: Files >300 lines, deep nesting, excessive conditionals
  3. Score each finding: severity, impact, confidence (1–5) and risk_rank = S×I×C. Do not use critical/major/minor labels.
  4. Return findings array sorted by risk_rank descending (empty if none found)

Context isolation: No inherited state from previous tasks. Fresh analysis per invocation.

Stop conditions: All affected files scanned, baseline docs referenced, findings returned.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 60 lines · 0 tokens per session scan A 94c83958d057

Subscribe to this mod's changes

code-reviewer-design is an agent published in the GitHub repository zxpmail/ReqForge (18 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 766 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.