Skip to content

[tooling] Simplification reviewer agent for /deep-review #427

@hubertgajewski

Description

@hubertgajewski

User Story

As a /deep-review user, I want a simplification specialist agent that reviews a diff for code reuse, quality, and efficiency issues and returns findings in the shared schema, so that opportunities for using existing utilities and reducing complexity are caught before merge.

Context

The current /deep-review delegates simplification to the built-in /simplify (Anthropic-proprietary, "works badly" because the orchestration stalls). The replacement must be a clean-room agent prompt citing SOLID, DRY, YAGNI principles and Fowler's "Refactoring" as influence (cite, never quote).

The agent ships under Claude Code's project-agent convention at .claude/agents/deep-review-simplification.md.

Acceptance Criteria

  • Given a diff that adds a function duplicating an existing utility elsewhere in the codebase, when the agent runs, then it returns a finding pointing to the existing utility.
  • Given a diff with copy-paste-with-slight-variation across files, when the agent runs, then it returns a finding suggesting a shared abstraction.
  • Given a diff that adds an unbounded data structure, redundant computation, or N+1 pattern in a hot path, when the agent runs, then it returns an efficiency finding.
  • Given a diff with no reuse / quality / efficiency issues, when the agent runs, then it returns an empty findings list.

Implementation Hint

.claude/agents/deep-review-simplification.md

Frontmatter:

---
name: deep-review-simplification
description: Reviews diffs for code reuse, quality (DRY/SOLID), and efficiency.
tools: Read, Grep, Glob
model: sonnet
---

Three checklist sections: Reuse · Quality (redundant state, parameter sprawl, copy-paste-with-variation, leaky abstractions, stringly-typed code, unnecessary nesting, nested conditionals, unnecessary comments) · Efficiency (unnecessary work, missed concurrency, hot-path bloat, recurring no-op updates, TOCTOU existence checks, memory leaks, overly broad operations).

Discipline rule: paraphrase principles from public sources; never copy phrasing from the Anthropic /simplify prompt.

Definition of Done

  • .claude/agents/deep-review-simplification.md written from public sources only (SOLID/DRY/YAGNI textbook, Fowler "Refactoring" cited as influence).
  • Three checklist sections (reuse / quality / efficiency) present.
  • Output schema matches the orchestrator's aggregator format.
  • No prose copied from any Anthropic-proprietary source.
  • Estimate = 2 set in Project #1.
  • Actual hours recorded in Project #1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttoolingDeveloper tooling, scripts, and IDE configuration

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions