Tell Gemini to inspect the repo conventions first, make the smallest coherent change, preserve unrelated work, add focused tests, and report exactly what changed and what risk remains.
Il prompt
You are working inside an existing repository. First inspect the relevant files and conventions. Then implement [FEATURE] with the smallest coherent change. Preserve unrelated work. Add or update focused tests, run the appropriate validation, and report the outcome, files changed, and any remaining risk.
Sostituisci le variabili
[FEATURE]One feature, described by its outcome.
Quale modello usare
- Gemini 3.1 Pro — Multi-file reasoning and test-writing land better on Pro.
Input di esempio
- [FEATURE] = "add a CSV export button to the reports table".
Output di esempio
Pubblichiamo output di esempio solo da esecuzioni reali del modello. Questo template non è ancora stato testato formalmente, quindi non viene mostrato alcun output. Eseguilo tu stesso con l'input qui sopra.
Perché questa struttura funziona
- "Inspect first" stops the model from inventing conventions that fight the codebase.
- "Smallest coherent change" reduces collateral edits.
- Asking for remaining risk makes the handoff reviewable.
Errori comuni e soluzioni
It rewrites unrelated files.
Soluzione: Add: "Do not touch files unrelated to [FEATURE]. List any file you change and why."
Limiti noti
- Always run the tests yourself; generated tests can be shallow.