8 / 87 · 02 AI-Augmented Test Design · Prompt Templates for Test Generation← prev⊞ allnext →☰ Read as one page
2.6Storing and Versioning Templates
Keep your prompt templates in your repository alongside the test code:
tests/
prompts/
requirements-to-tests.prompt.md
api-schema-to-tests.prompt.md
tdd-prompt.prompt.md
mutation-aware.prompt.md
test_users.py
test_orders.py
Version them in git. When you refine a template based on review feedback, commit the change with a message explaining what improved. This creates institutional knowledge about effective test generation.
Treat Prompts Like Code
By mid-2026 this has hardened from a tip into a team practice: prompts are versioned, reviewed, and tested like any other source file.
- Versioned: templates live in the repo (as above), change via PR, and get meaningful commit messages.
- Reviewed: a prompt change that alters what tests get generated is a behavioral change -- it goes through code review like one.
- Tested: keep a small set of golden inputs (a known spec excerpt) and periodically regenerate against them. If a template edit or a model upgrade suddenly produces weaker tests -- fewer negative cases, vaguer assertions -- you catch the regression before the whole team inherits it. Chapter LLM Evals and AI Test-Suite Quality covers this eval discipline in depth.
If you package team prompts as reusable skills, use the SKILL.md format: as of July 2026 it is portable across Claude Code, Cursor, Gemini CLI, and Codex CLI, so a test-generation skill written once works regardless of which assistant each engineer prefers.