43.1 Prompt reviews like code reviews

Overview and links for this section of the guide.

Diffing Text

Code reviews work because `git diff` shows exactly what changed. Prompts are text files. Treat them as such.

Do not store prompts in database rows where they are invisible to Git. Store them in `src/prompts/` as `.txt` or `.ts` files.

The Review Checklist

  • Injection Safety: "Did you sanitize user input before putting it in the prompt?"
  • Cost: "This system prompt is 2000 tokens. Can we cut it to 500?"
  • Clarity: "Is this instruction ambiguous? 'Be concise' means different things to different people. Use 'Max 2 sentences' instead."

Where to go next