Prompt Versioning

A code review agent evolves through four prompt versions. Every edit is auto-versioned with semantic rules — no manual tagging.

📝

The Scenario

An engineering team iterates on their code review agent's system prompt. Tone shifts, new variables, and breaking changes — all auto-detected.

Code Review "Review this pull request for correctness and style"
v1.0.0
ERROR: no error handling
Tone: flag all issues as errors
vs
v1.0.1
💡
Consider adding error handling
Tone: suggest improvements constructively
v1.0.0 Strict error flagging v2.0.0 Constructive + streamlined
1.0x
💥

The Key Moment: MAJOR Bump

When the language variable is removed, PromptOps detects a breaking change. Any caller passing language will break — so it bumps from v1.1.0 to v2.0.0 automatically.

No manual tagging. No forgotten version bumps. The version number tells you exactly what changed — PATCH (tone), MINOR (new variable), or MAJOR (removed variable).

What the Demo Shows

Act 1 — Create

Auto-Versioning via Git

Create a prompt template with variables, commit it, and PromptOps auto-tags v1.0.0. Every commit is versioned — no manual git tag needed.

Act 2 — Evolve

Semantic Bump Rules

Tone change → PATCH. New required variable → MINOR. Removed variable → MAJOR. PromptOps inspects the diff and applies the correct semver bump automatically.

Act 3 — Resolve

Version Resolution

get_prompt("name") resolves to latest. get_prompt("name:v1.0.0") pins a specific version. get_prompt("name:unstaged") tests uncommitted edits before committing.

Act 4 — Diff

Version Comparison

Diff any two versions side-by-side. See exactly what changed between PATCH, MINOR, and MAJOR bumps — tone shifts, added variables, removed variables.

Try It Yourself

PromptOps runs locally with no API keys. Install the package and start versioning prompts in 60 seconds.

pip install llmhq-promptops
promptops init
promptops list