From 8659b6dfd794b0d28ea589d280980080fc4c8ccb Mon Sep 17 00:00:00 2001 From: Rob Lambell Date: Thu, 19 Mar 2026 18:40:20 +0000 Subject: [PATCH] fix: use three-dot diff for scope drift detection in /review The scope drift step (Step 1.5) used `git diff origin/ --stat` (two-dot), which shows the full tree difference between the branch tip and the base ref. On rebased branches this includes commits already on the base branch, producing false-positive "scope drift" findings for changes the author did not introduce. Switch to `git diff origin/...HEAD --stat` (three-dot / merge-base diff), which shows only changes introduced on the feature branch. This matches what /ship already uses for its line-count stat. --- review/SKILL.md | 2 +- review/SKILL.md.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/review/SKILL.md b/review/SKILL.md index d1901dd9..2e8bdc0b 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -195,7 +195,7 @@ Before reviewing code quality, check: **did they build what was requested — no Read commit messages (`git log origin/..HEAD --oneline`). **If no PR exists:** rely on commit messages and TODOS.md for stated intent — this is the common case since /review runs before /ship creates the PR. 2. Identify the **stated intent** — what was this branch supposed to accomplish? -3. Run `git diff origin/ --stat` and compare the files changed against the stated intent. +3. Run `git diff origin/...HEAD --stat` and compare the files changed against the stated intent. 4. Evaluate with skepticism: **SCOPE CREEP detection:** diff --git a/review/SKILL.md.tmpl b/review/SKILL.md.tmpl index bab95d91..03c1a042 100644 --- a/review/SKILL.md.tmpl +++ b/review/SKILL.md.tmpl @@ -42,7 +42,7 @@ Before reviewing code quality, check: **did they build what was requested — no Read commit messages (`git log origin/..HEAD --oneline`). **If no PR exists:** rely on commit messages and TODOS.md for stated intent — this is the common case since /review runs before /ship creates the PR. 2. Identify the **stated intent** — what was this branch supposed to accomplish? -3. Run `git diff origin/ --stat` and compare the files changed against the stated intent. +3. Run `git diff origin/...HEAD --stat` and compare the files changed against the stated intent. 4. Evaluate with skepticism: **SCOPE CREEP detection:**