11# AI review prompts
22
3- Each ` *.md ` (except this ` README.md ` ) defines a ** prompt** that the
4- ` AI review ` job runs in parallel against the PR diff. Discovery is by glob:
5- to add a new review dimension just drop another ` .md ` here — no YAML
6- changes needed.
3+ Each ` *.md ` (except this ` README.md ` ) defines a ** prompt** that ` pr-checks.yml `
4+ runs against the PR diff, one at a time in a loop (see the "Run AI review"
5+ step). Discovery is by glob: to add a new review dimension just drop another
6+ ` .md ` here — no YAML changes needed.
77
88## File format
99
1010``` markdown
1111---
1212name: short-name # optional, defaults to filename without extension
13- model: gemini-3-flash-lite # optional, defaults to workflow 's AI_REVIEW_MODEL
13+ model: gemini-3-flash-lite # optional, defaults to ai-review.sh 's built-in default
1414---
1515
1616<instructions for the model >
@@ -36,39 +36,48 @@ this exact shape (no markdown, no code fences, no extra text):
3636}
3737```
3838
39- ### Severity drives the merge gate
39+ ### Severity drives the comment, not the merge
4040
41- The approver blocks the merge based on ** severity** , not on how many findings
42- there are. Pick the lowest severity that honestly fits — don't inflate a nit.
41+ The AI review is ** informational only** — severity/tier decide how a finding
42+ is presented in the sticky comment, never whether the PR can merge. Only
43+ ` release/** ` targets get this comment (see the main
44+ ` .github/workflows/README.md ` → "AI review policy"); ` pr-checks.yml ` doesn't
45+ even trigger for PRs into ` v10 ` /` v11 ` /` v12 ` . Pick the lowest severity that
46+ honestly fits — don't inflate a nit.
4347
44- - ** ` critical ` / ` high ` → BLOCKING. ** Something that can break: crashes, nil
48+ - ** ` critical ` / ` high ` ** — Something that can break: crashes, nil
4549 dereferences, data loss/corruption, races/deadlocks, broken or unsafe DB
46- migrations, security holes, breaking API/proto/contract changes. These stop
47- auto-merge .
48- - ** ` medium ` / ` low ` → non-blocking WARNING. ** Real but contained: missing
49- user feedback, inconsistent patterns, naming, typos in docs/strings, style.
50- Reported as warnings; the PR can still merge .
50+ migrations, security holes, breaking API/proto/contract changes. Flagged
51+ prominently (🛑) — the author decides whether to fix before merging .
52+ - ** ` medium ` / ` low ` ** — Real but contained: missing user feedback,
53+ inconsistent patterns, naming, typos in docs/strings, style. Reported as
54+ minor findings .
5155
5256### Tier semantics
5357
54- ` tier ` is a coarse signal. The gate uses severity for blocking, ** plus** Tier 3:
58+ ` tier ` is a coarse signal that only affects the comment's wording/urgency —
59+ it never blocks:
5560
56- - ** Tier 1** — fine to merge; no high/critical issues (minor warnings allowed).
57- - ** Tier 2** — at least one high-severity bug that should be fixed .
58- - ** Tier 3** — engineer review required / could break . Critical paths (crypto,
61+ - ** Tier 1** — no high/critical issues (minor findings allowed).
62+ - ** Tier 2** — at least one high-severity bug worth a look .
63+ - ** Tier 3** — sensitive area, extra care recommended . Critical paths (crypto,
5964 auth, DB migrations, installer, gRPC contracts, CI/CD, secret handling) or
60- changes the model can't judge confidently. Always blocks and @ mentions the
61- team .
65+ changes the model can't judge confidently. Flagged in the comment only —
66+ nobody is @ mentioned .
6267
63- ** The merge is blocked if** any finding is ` high ` /` critical ` , ** or** any prompt
64- returns Tier 3, ** or** no review ran. Otherwise the approver approves the PR
65- (any medium/low findings ride along as warnings).
68+ ** Nothing here blocks the merge or @mentions anyone.** The comment exists
69+ purely so the author knows what to fix. ` pr-checks.yml ` has no
70+ team-membership check at all — whoever has write access to the repo can
71+ merge ` release/** ` PRs; see ` .github/workflows/README.md ` → "Release policy".
6672
6773### Routine dependency bumps
6874
69- A separate required check (` go_deps ` ) already enforces that Go modules are on
70- their latest version, so mass ` go.mod ` / ` go.sum ` bumps are routine and
71- expected. The ` architecture ` and ` security ` prompts treat a version bump of
75+ ` pr-checks.yml ` already reports outdated Go modules as its own "Go
76+ dependencies" section in the sticky comment (see
77+ ` .github/workflows/README.md ` → "AI review policy") — that's informational
78+ too, so a dependency bump is expected to still show up there, not something
79+ these prompts need to flag separately. The ` architecture ` and ` security `
80+ prompts treat a version bump of
7281existing modules as ** Tier 1** — not an architectural/agent-breaking change
7382and not a vulnerability — and only flag genuine anomalies (new deps, major
7483breaking jumps, downgrades, known-vulnerable pins, suspicious ` replace `
@@ -81,9 +90,10 @@ Tier 1, a brief `summary` ("No security concerns detected.") and
8190
8291### Unparseable responses
8392
84- If the model returns something that isn't valid JSON matching the schema, the
85- approver treats it as a blocking ` high ` finding. Fail-safe behaviour — we'd
86- rather hold for a human than let something pass without understanding it.
93+ If the model returns something that isn't valid JSON matching the schema,
94+ ` ai-review.sh ` writes a fallback: Tier 2 with a ` high ` finding saying "manual
95+ review recommended". Still informational only — flagged prominently in the
96+ comment, but it does not block the merge.
8797
8898## Picking a model
8999
0 commit comments