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.
Le 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.
Remplacez les variables
[FEATURE]One feature, described by its outcome.
Quel modèle utiliser
- Gemini 3.1 Pro — Multi-file reasoning and test-writing land better on Pro.
Exemple d'entrée
- [FEATURE] = "add a CSV export button to the reports table".
Exemple de sortie
Nous ne publions que des exemples de sorties issus d'exécutions réelles sur un modèle. Ce modèle n'a pas encore été formellement testé, aucune sortie n'est donc affichée. Exécutez-le vous-même avec l'entrée ci-dessus.
Pourquoi cette structure fonctionne
- "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.
Échecs courants et correctifs
It rewrites unrelated files.
Correctif : Add: "Do not touch files unrelated to [FEATURE]. List any file you change and why."
Limites connues
- Always run the tests yourself; generated tests can be shallow.