minimal_diff_review
Review a diff for signs of over-building, flagging concrete evidence like single-use abstractions, thin wrappers, or unnecessary dependencies, and offer smaller alternatives without blocking your write.
Instructions
Reviews a diff for signs of over-building — findings NEVER block a write, they are hints. Deterministic, no LLM: it flags a single-use abstraction, a thin forwarding wrapper, a new dependency with a well-known stdlib equivalent, a possible duplicate helper, and a logic change with no accompanying test change. Evidence is asymmetric: a check stays silent unless it can point at concrete evidence and (where defensible) a smaller alternative, so silence is NOT proof a change is minimal. Findings are labelled by confidence: high = proven from the diff text; low = leans on the topology index, which is approximate (its call graph is intra-file — unlike find_references' exact cross-file lookup) and may be a few edits stale. Reviews the working-tree diff vs base_ref (default HEAD); pass files to scope it to your change in a shared worktree. Degrades cleanly outside a git repository.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | changed (default) reviews the working tree vs base_ref (all uncommitted changes); staged reviews only the index vs base_ref. | |
| files | No | Restrict the review to these paths (workspace-relative or absolute). Strongly recommended in a shared worktree so unrelated peer-agent edits are excluded. | |
| base_ref | No | Git ref to diff against (default HEAD, i.e. review uncommitted changes). | |
| max_findings | No | Cap on findings returned (default 20, max 100). | |
| include_suggestions | No | Include a concrete smaller-alternative line per finding (default true). |