Ask Gemini to review a diff for correctness, security, and clarity, rank findings by severity with a concrete failure scenario each, and skip style nits unless they hide a bug.
El prompt
Review this change for correctness, security, and clarity. For each finding: give a severity (blocker / major / minor), the specific failure scenario, and the smallest fix. Skip pure style nits unless they hide a bug. If the change looks safe, say so plainly. Diff: [DIFF].
Reemplaza las variables
[DIFF]The diff or the changed files.
Qué modelo usar
- Gemini 3.1 Pro — Severity judgement and failure scenarios need careful reasoning.
Entrada de ejemplo
- [DIFF] = a pull request touching auth middleware.
Resultado de ejemplo
Solo publicamos resultados de ejemplo de ejecuciones reales del modelo. Esta plantilla aún no se ha probado formalmente, por lo que no se muestra ningún resultado. Ejecútala tú mismo con la entrada de arriba.
Por qué funciona esta estructura
- Severity + failure scenario filters out noise and false alarms.
- Permission to say "looks safe" reduces invented problems.
Fallos comunes y soluciones
Every line gets a comment.
Solución: Cap it: "Report at most the 5 most important findings."
Limitaciones conocidas
- A model review complements, not replaces, human review and tests.