Prompts are code too
Prompts are code too
AI is fast. But every prompt that drives something belongs in version control, not a chat history or someone's head.
AI is fast. But speed without discipline mostly produces surprises. That is why we treat every prompt that drives something important not as a sticky note, but as code.
A prompt belongs in version control
A prompt running in production is part of your product. Yet on many teams it lives in a loose text field, a chat history or someone's head. With us it lives in the repo, next to the rest of the code.
That gives you three things you otherwise lose: you can roll back to an earlier version, you can see who changed what and why, and you can review a change before it goes live.
If you do not know which version of a prompt is running in production, you also do not know why your output was better yesterday than today.
What we check before a prompt goes live
A prompt review is not a formality. We look at a few things that make the difference in practice:
- Intent. Does the prompt do exactly one thing, clearly described?
- Edge cases. What happens with empty, messy or hostile input?
- Cost. How many tokens does this spend per call, and can it be shorter without losing quality?
Version control looks simple
You do not need to make it complicated. A prompt with an id, a model and a clear instruction is already enough to track it:
export const valuationPrompt = {
id: "valuation/v3",
model: "claude-opus-4-8",
system: "You are a valuer. Give a range, not loose promises.",
};
The real work is not in the syntax, it is in the habit. We wrote earlier about why we keep AI in the loop instead of on autopilot, and this is the other side of it: the human decides, but the system remembers.
A prompt you can read back, review and roll back is not overhead. It is the difference between a product you understand and a product you have to get to know again every morning.