--- name: lean-review description: One consolidated, evidence-based review of the current diff (correctness, failure handling, tests, security only when warranted). Use on demand before finishing or opening a PR. disable-model-invocation: true allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git status:*), Bash(git log:*) --- # Lean diff review Read-only. Review `git diff` against the base branch (or the target the user names) once, in a single pass. Do not spawn other agents. 1. Run the project's tests/lint/type check if not already run; note results. 2. For each suspicion, it is only a candidate. Try to refute it: read callers, look for existing guards, confirm the path is reachable. 3. Report only candidates you could not refute, each with: file:line, a concrete failing input or state, and the wrong result. Drop refuted ones; list unresolved ones separately with what you checked. 4. Check: wrong value captured or boundary arithmetic; failures swallowed or missing timeouts on external calls; tests that pass without exercising the change; new behaviour without a test. 5. Add a security section only if the diff touches auth, secrets, input parsing, or dependencies. Output at most 10 findings, worst first, then a one-line verdict. No style nits.