feat: add /debug recommendation to /review (Step 5.7)

When /review finds what appears to be a pre-existing bug in the base
branch (not introduced by the PR's diff), it now classifies it as
INFORMATIONAL and recommends running /debug for systematic root-cause
investigation. No Agent spawning — /review's scope stays on the diff.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-18 11:09:04 -07:00
parent b85490f7f7
commit b9d734ad91
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -409,6 +409,18 @@ If no documentation files exist, skip this step silently.
---
## Step 5.7: Pre-existing bug detection
If during the two-pass review you identified findings that appear to be bugs in the **base branch** (not introduced by this PR's diff):
1. Classify them as INFORMATIONAL in your output
2. Note: "This appears to be a pre-existing issue, not introduced by this PR."
3. Recommend: "Run `/debug` to investigate this systematically — it traces root cause before applying fixes."
Do not spawn agents or investigate further — /review's scope is the diff. Pre-existing bugs are out of scope for this review.
---
## Important Rules
- **Read the FULL diff before commenting.** Do not flag issues already addressed in the diff.
+12
View File
@@ -230,6 +230,18 @@ If no documentation files exist, skip this step silently.
---
## Step 5.7: Pre-existing bug detection
If during the two-pass review you identified findings that appear to be bugs in the **base branch** (not introduced by this PR's diff):
1. Classify them as INFORMATIONAL in your output
2. Note: "This appears to be a pre-existing issue, not introduced by this PR."
3. Recommend: "Run `/debug` to investigate this systematically — it traces root cause before applying fixes."
Do not spawn agents or investigate further — /review's scope is the diff. Pre-existing bugs are out of scope for this review.
---
## Important Rules
- **Read the FULL diff before commenting.** Do not flag issues already addressed in the diff.