Runtime Notes
- Ask the user directly when the workflow says to stop for input.
- Treat
AGENTS.md, TODO.md, and TODOS.md as the likely sources of repo-local instructions.
- Keep the workflow intent intact, but translate any environment-specific wording to the current toolset.
Pre-Landing PR Review
You are running the review workflow. Analyze the current branch's diff against main for structural issues that tests don't catch.
Step 1: Check branch
- Run
git branch --show-current to get the current branch.
- If on
main, output: "Nothing to review — you're on main or have no changes against main." and stop.
- Run
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.
Step 2: Read the checklist
Read references/checklist.md.
If the file cannot be read, STOP and report the error. Do not proceed without the checklist.
Step 3: Get the diff
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.
Step 4: Two-pass review
Apply the checklist against the diff in two passes:
- Pass 1 (CRITICAL): SQL & Data Safety, LLM Output Trust Boundary
- Pass 2 (INFORMATIONAL): Conditional Side Effects, Magic Numbers & String Coupling, Dead Code & Consistency, LLM Prompt Issues, Test Gaps, View/Frontend
Follow the output format specified in the checklist. Respect the suppressions — do NOT flag items listed in the "DO NOT flag" section.
Step 5: Output findings
Always output ALL findings — both critical and informational. The user must see every issue.
- If CRITICAL issues found: output all findings, then for EACH critical issue ask the user directly in a separate message with the problem, your recommended fix, and options (A: Fix it now, B: Acknowledge, C: False positive — skip).
After all critical questions are answered, output a summary of what the user chose for each issue. If the user chose A (fix) on any issue, apply the recommended fixes. If only B/C were chosen, no action needed.
- If only non-critical issues found: output findings. No further action needed.
- If no issues found: output
Pre-Landing Review: No issues found.
Important Rules
- Read the FULL diff before commenting. Do not flag issues already addressed in the diff.
- Read-only by default. Only modify files if the user explicitly chooses "Fix it now" on a critical issue. Never commit, push, or create PRs.
- Be terse. One line problem, one line fix. No preamble.
- Only flag real problems. Skip anything that's fine.
1---2name: review3description: Pre-landing PR review. Analyzes diff against main for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues.4---56<!-- Generated by tools/convert_gstack.py. Edit the converter, not this file. -->78## Runtime Notes9- Ask the user directly when the workflow says to stop for input.10- Treat `AGENTS.md`, `TODO.md`, and `TODOS.md` as the likely sources of repo-local instructions.11- Keep the workflow intent intact, but translate any environment-specific wording to the current toolset.1213# Pre-Landing PR Review1415You are running the `review` workflow. Analyze the current branch's diff against main for structural issues that tests don't catch.1617---1819## Step 1: Check branch20211. Run `git branch --show-current` to get the current branch.222. If on `main`, output: **"Nothing to review — you're on main or have no changes against main."** and stop.233. Run `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.2425---2627## Step 2: Read the checklist2829Read `references/checklist.md`.3031**If the file cannot be read, STOP and report the error.** Do not proceed without the checklist.3233---3435## Step 3: Get the diff3637Fetch the latest main to avoid false positives from a stale local main:3839```bash40git fetch origin main --quiet41```4243Run `git diff origin/main` to get the full diff. This includes both committed and uncommitted changes against the latest main.4445---4647## Step 4: Two-pass review4849Apply the checklist against the diff in two passes:50511. **Pass 1 (CRITICAL):** SQL & Data Safety, LLM Output Trust Boundary522. **Pass 2 (INFORMATIONAL):** Conditional Side Effects, Magic Numbers & String Coupling, Dead Code & Consistency, LLM Prompt Issues, Test Gaps, View/Frontend5354Follow the output format specified in the checklist. Respect the suppressions — do NOT flag items listed in the "DO NOT flag" section.5556---5758## Step 5: Output findings5960**Always output ALL findings** — both critical and informational. The user must see every issue.6162- If CRITICAL issues found: output all findings, then for EACH critical issue ask the user directly in a separate message with the problem, your recommended fix, and options (A: Fix it now, B: Acknowledge, C: False positive — skip).63 After all critical questions are answered, output a summary of what the user chose for each issue. If the user chose A (fix) on any issue, apply the recommended fixes. If only B/C were chosen, no action needed.64- If only non-critical issues found: output findings. No further action needed.65- If no issues found: output `Pre-Landing Review: No issues found.`6667---6869## Important Rules7071- **Read the FULL diff before commenting.** Do not flag issues already addressed in the diff.72- **Read-only by default.** Only modify files if the user explicitly chooses "Fix it now" on a critical issue. Never commit, push, or create PRs.73- **Be terse.** One line problem, one line fix. No preamble.74- **Only flag real problems.** Skip anything that's fine.