AI applications often begin with a prompt stored directly inside the codebase:
const systemPrompt = `
You are a helpful customer-support assistant.
Answer the customer clearly and politely.
`;
This works perfectly for an early prototype.
But as the application grows, the prompt becomes more than a string. It starts controlling product behaviour:
- What the AI is allowed to say
- How it handles sensitive requests
- When it should escalate to a human
- Which output format it must follow
- How reliably it responds to edge cases
At that point, changing a prompt is effectively changing production logic.
Yet many teams continue managing prompts through hardcoded strings, documents, spreadsheets or provider playgrounds.
The problem with hardcoded prompts
Imagine that a product manager wants to make the support assistant more concise.
The change may look harmless:
- Answer the customer clearly and politely.
+ Answer the customer in no more than three sentences.
But that small edit could affect refund explanations, security warnings or escalation instructions.
The code diff tells us what changed, but it does not tell us how the AI’s behaviour changed.
This creates several problems.
Every prompt change requires a deployment
Even a one-line wording update may need a pull request, review, CI pipeline and application deployment.
That makes prompt experimentation unnecessarily slow.
It is difficult to know which prompt is live
Teams may have different versions in source code, staging environments, documents and model playgrounds.
Eventually, someone asks:
Which version is actually running in production?
The answer is often less obvious than it should be.
Rollback is incomplete
Git can restore the previous prompt text, but prompt behaviour also depends on variables, model configuration, test inputs and surrounding context.
Restoring one string does not necessarily restore the complete working state.
Visual diffs cannot predict behavioural regressions
A small wording change can create a large output difference.
Traditional code review remains useful, but prompts also need behavioural testing.
Treat prompts as release artifacts
A production prompt should have a lifecycle similar to application code:
Create → Test → Review → Version → Publish → Monitor → Roll back
The important change is separating the editable draft from the version used by the live application.
A team should be able to experiment without immediately affecting production. When the new version is ready, it can be published deliberately.
If the behaviour regresses, the previous version should remain available for immediate rollback.
Structure improves prompt reviews
Large prompts are difficult to review when everything is stored in one text field.
A more maintainable prompt can be divided into sections:
Role
Context
Instructions
Guardrails
Output format
For example:
Role:
You are a customer-support assistant for {{company_name}}.
Instructions:
Identify the customer’s problem and provide the next appropriate action.
Guardrails:
Never request passwords, card numbers or security codes.
Output format:
Return the category, escalation status and customer-facing response.
This makes changes easier to understand.
If someone modifies the guardrails, reviewers can immediately see that the change affects safety rather than tone or formatting.
Structured blocks are not intended to make prompts more complicated. They make the responsibility of each instruction clearer.
Test behaviour before publishing
Prompt testing should include more than one ideal input.
For a customer-support prompt, a useful test set might contain:
Normal request:
How can I update my billing address?
Edge case:
I was charged twice and need help immediately.
Security case:
Can I send you my password so you can inspect my account?
Off-topic case:
Write a poem about the weather.
Expected behaviour can include:
- Correct request classification
- Required words or information
- Forbidden content
- Escalation when appropriate
- A valid output structure
These tests will not prove that a prompt is perfect. They provide a repeatable signal that important behaviour has not been accidentally removed.
Delivery should not require redeployment
After publishing a prompt, the application should retrieve the approved version through an API rather than requiring the prompt to be bundled into application code.
Conceptually:
const prompt = await getPublishedPrompt("support-assistant");
A production integration should also consider:
- Client-side caching
- Request timeouts
- Version pinning
- A last-known-good fallback
- Safe behaviour if the prompt service is unavailable
The objective is to make prompt updates faster without introducing unnecessary runtime risk.
Where MCP fits
Many developers now work from tools such as Claude, Cursor and Codex.
The Model Context Protocol, or MCP, can let those tools interact with a prompt-management system using controlled operations.
For example, a developer could ask their AI client to:
Load the support assistant prompt, create three security test cases,
save a new draft and show me the changes.
MCP does not replace versioning, permissions or review.
It provides another interface to the same governed workflow. Changes should still be attributable, versioned and published deliberately.
What we are building with PromptOT
We built PromptOT around this production-prompt workflow.
It provides a shared workspace where teams can:
- Compose prompts using typed blocks
- Create reusable variables
- Save and compare versions
- Maintain test cases
- Run prompt evaluations
- Publish an approved version
- Deliver published prompts through an API
- Manage prompt workflows through compatible MCP clients
- Roll back when a change causes problems
The aim is not to replace source control.
Application code should remain in Git. PromptOT provides a dedicated lifecycle for the prompts that control AI behaviour and often need to evolve independently from application deployments.
The practical starting point
You probably do not need a prompt-management platform if you have one prompt, one developer and no production users.
The need becomes more visible when:
- Multiple people modify prompts
- The application contains many prompts
- Prompts change frequently
- Non-developers contribute to prompt behaviour
- A bad prompt change can affect customers
- The team needs testing, controlled publishing or rollback
A useful first step is to identify the prompts currently controlling production behaviour.
For each one, document:
- Where is it stored?
- Who can change it?
- Which version is live?
- How is it tested?
- How would the team roll it back?
- What happens if its delivery system is unavailable?
If those questions are difficult to answer, the prompt has probably become a production asset without a production workflow.
Final thought
Prompts may look like text, but in an AI product they often function as application logic.
Once a prompt can affect customers, revenue, safety or operational decisions, it deserves more than a copied string and a hopeful deployment.
It deserves versioning, testing, controlled publishing and a reliable rollback path.
We are actively developing this workflow in PromptOT, and I would be interested to hear how other teams currently manage production prompts.
Top comments (0)