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.
O 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].
Substitua as variáveis
[DIFF]The diff or the changed files.
Que modelo utilizar
- Gemini 3.1 Pro — Severity judgement and failure scenarios need careful reasoning.
Dados de entrada de exemplo
- [DIFF] = a pull request touching auth middleware.
Resultado de exemplo
Só publicamos resultados de exemplo provenientes de execuções reais dos modelos. Este modelo ainda não foi formalmente testado, pelo que não é apresentado nenhum resultado. Execute-o você mesmo com os dados de entrada acima.
Por que esta estrutura funciona
- Severity + failure scenario filters out noise and false alarms.
- Permission to say "looks safe" reduces invented problems.
Falhas comuns e correções
Every line gets a comment.
Correção: Cap it: "Report at most the 5 most important findings."
Limitações conhecidas
- A model review complements, not replaces, human review and tests.