Diff Review
The mechanical layer of code review, automated: run it on every diff and the human (or agent) reviewer only sees what actually needs judgment.
Commands
git diff | python3 scripts/diff_review.py
git diff main...HEAD | python3 scripts/diff_review.py --json
git diff | python3 scripts/diff_review.py --tools-dir skills/
git diff --cached | python3 scripts/diff_review.py --fail-over 3
Detects
| Kind | What it catches |
|---|---|
debug-output |
print(, console.log(, puts, pprint, dbg! added to non-test code |
unresolved-marker |
TODO, FIXME, HACK, XXX, WIP, REMOVE ME added by the change |
trivial-assertion |
assert True, assert 1 == 1 — tests that can never fail |
test-deleted |
def test_ / it( lines removed without replacement |
secret-gate-findings |
credential leaks (when chained via --tools-dir) |
comment-checker-findings |
unjustified comments (when chained via --tools-dir) |
Chaining ecosystem gates
--tools-dir <skills-root> looks for secret-gate/scripts/secret_gate.py and
comment-checker/scripts/comment_checker.py in that directory and feeds them
the added lines. Their findings appear as *-findings entries with the first
evidence line. Both are optional — chain whatever is installed.
Pairs with
merge-quiz (the human comprehension gate after the mechanical pass),
remove-ai-slops (structural cleanup beyond what a diff pass can see),
verification-before-completion (the evidence-before-claims wrapper around
the whole workflow).