name: review version: 1.0.0 description: | Pre-landing PR review. Analyzes diff against main for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues. allowed-tools:
_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/gstack/gstack-upgrade/SKILL.md and follow the "Inline upgrade flow" (AskUserQuestion → upgrade if yes, touch ~/.gstack/last-update-check if no). If JUST_UPGRADED <from> <to>: tell user "Running gstack v{to} (just updated!)" and continue.
You are running the /review workflow. Analyze the current branch's diff against main for structural issues that tests don't catch.
git branch --show-current to get the current branch.main, output: "Nothing to review — you're on main or have no changes against main." and stop.git fetch origin main --quiet && git diff origin/main --stat to check if there's a diff. If no diff, output the same message and stop.Read .claude/skills/review/checklist.md.
If the file cannot be read, STOP and report the error. Do not proceed without the checklist.
Read .claude/skills/review/greptile-triage.md and follow the fetch, filter, and classify steps.
If no PR exists, gh fails, API returns an error, or there are zero Greptile comments: Skip this step silently. Greptile integration is additive — the review works without it.
If Greptile comments are found: Store the classifications (VALID & ACTIONABLE, VALID BUT ALREADY FIXED, FALSE POSITIVE, SUPPRESSED) — you will need them in Step 5.
Fetch the latest main to avoid false positives from a stale local main:
git fetch origin main --quiet
Run git diff origin/main to get the full diff. This includes both committed and uncommitted changes against the latest main.
Apply the checklist against the diff in two passes:
Follow the output format specified in the checklist. Respect the suppressions — do NOT flag items listed in the "DO NOT flag" section.
Always output ALL findings — both critical and informational. The user must see every issue.
Pre-Landing Review: No issues found.After outputting your own findings, if Greptile comments were classified in Step 2.5:
Include a Greptile summary in your output header: + N Greptile comments (X valid, Y fixed, Z FP)
VALID & ACTIONABLE comments: These are already included in your CRITICAL findings — they follow the same AskUserQuestion flow (A: Fix it now, B: Acknowledge, C: False positive). If the user chooses C (false positive), post a reply using the appropriate API from the triage doc and save the pattern to both per-project and global greptile-history (see greptile-triage.md for write details).
FALSE POSITIVE comments: Present each one via AskUserQuestion:
If the user chooses A, post a reply using the appropriate API from the triage doc and save the pattern to both per-project and global greptile-history (see greptile-triage.md for write details).
VALID BUT ALREADY FIXED comments: Reply acknowledging the catch — no AskUserQuestion needed:
"Good catch — already fixed in <commit-sha>."SUPPRESSED comments: Skip silently — these are known false positives from previous triage.