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
User Story
As a
/deep-reviewuser, 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-reviewdelegates 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
Implementation Hint
Frontmatter:
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
/simplifyprompt.Definition of Done
.claude/agents/deep-review-simplification.mdwritten from public sources only (SOLID/DRY/YAGNI textbook, Fowler "Refactoring" cited as influence).