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.
Der 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.
Ersetze die Variablen
[FEATURE]One feature, described by its outcome.
Welches Modell verwenden
- Gemini 3.1 Pro — Multi-file reasoning and test-writing land better on Pro.
Beispieleingabe
- [FEATURE] = "add a CSV export button to the reports table".
Beispielausgabe
Wir veröffentlichen nur Beispielausgaben aus echten Modellläufen. Diese Vorlage wurde noch nicht formell getestet, daher wird keine Ausgabe angezeigt. Führe sie selbst mit der Eingabe oben aus.
Warum diese Struktur funktioniert
- "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.
Häufige Fehler & Lösungen
It rewrites unrelated files.
Lösung: Add: "Do not touch files unrelated to [FEATURE]. List any file you change and why."
Bekannte Grenzen
- Always run the tests yourself; generated tests can be shallow.