Prompts are config, not code
Manage LLM prompts like feature flags
Your LLM prompts are the highest-churn, most-experimented artifact in an AI app — so they belong in the same system as your flags and config. Store every prompt in Quonfig: version-controlled in git, changeable without a deploy, targetable by cohort, and type-safe. One targeting engine, one set of SDKs, one git-powered audit trail.
Store
Store prompts as config
A string or JSON config holds the prompt. Edit it in the UI, the CLI, or git — whichever fits your workflow. Every change is a real git commit with an author, a timestamp, and a diff, and the prompt changes without redeploying your app.
- Change the prompt at runtime — no deploy, no release train
- Every edit is a reviewable git commit (diff + author + timestamp)
- Roll back to any prior prompt the way you roll back any commit
1{2 "key": "support.triage-prompt",3 "type": "config",4 "valueType": "string",5 "default": {6 "rules": [{7 "criteria": [{ "operator": "ALWAYS_TRUE" }],8 "value": {9 "type": "string",10 "value": "You are a support triage assistant. Classify the ticket from {{customer}} (plan: {{plan}}) into one of: billing, bug, feature, other. Respond with only the label."11 }12 }]13 }14}
# Edit the prompt in the UI, the CLI, or git — your choice.$ qfg set-default support.triage-prompt \--value "You are a support triage assistant. Classify the ticket..." \--environment production# Every change is a real git commit: author, timestamp, diff.$ git log --oneline -1 configs/support.triage-prompt.jsona1f3c2e support.triage-prompt: tighten classification rubric
Type safety
Mustache templating, fully typed
Prompts are rarely static strings — they interpolate user, plan, and request data. Quonfig string configs support Mustache {{variables}}, and qfg generate turns each one into a checked function parameter.
# Generate type-safe accessors for your prompts (TypeScript: node-ts, react-ts).$ qfg generate --targets node-tsNote: generated code imports 'mustache' for templated config values.Add it to your project: npm install mustache @types/mustache
What you get
- A render function per templated prompt, with every
{{variable}}typed as a parameter - Miss a variable and the build fails — not the model call
- TypeScript targets:
node-tsandreact-ts
1// AUTOGENERATED by quonfig-cli's 'generate' command2import Mustache from "mustache";34// Each {{variable}} in the prompt becomes a checked parameter.5// The accessor is typed as:6// supportTriagePrompt: (...params: [{ customer: string; plan: string }]) => string78const qfg = new QuonfigTypesafeNode(quonfig);910const prompt = qfg.supportTriagePrompt()({11 customer: "Acme Corp",12 plan: "enterprise",13});14// -> "You are a support triage assistant. Classify the ticket15// from Acme Corp (plan: enterprise) into one of: ..."1617// Forget a variable, or pass a number, and the compiler stops you18// before the prompt ever reaches your model.
Accurate by design: typed generation is TypeScript-only (Node and React targets), Mustache variables are typed as string, and mustache is a peer dependency the generator reminds you to install.
Rollout
A/B test prompts with the same targeting engine
A new prompt is just a config change. Roll it out to 10% of users, target it to a cohort or environment, and roll it back instantly — driven by the exact same targeting engine that powers your feature flags.
Target by cohort
Serve a new prompt to enterprise users, one region, or a single environment. Same rule engine, same context, as your flags.
Percentage rollout
Ramp a prompt from 10% to 100% as confidence grows. Every step is a config change in git — reviewable and reversible.
Instant rollback
If a prompt underperforms, revert to the previous version from the UI or CLI. No deploy, no support ticket.
Proof
We dogfood this
Quonfig's own “infer a JSON Schema from examples” feature is powered by an Anthropic Claude prompt — and that prompt lives in a Quonfig config, not in our source code. When we tune the rubric, we edit a config and commit; no app redeploy. The feature that makes your prompts config is built on a prompt-as-config of our own.
our-config/configs/llm.infer-json-schema.jsonA prompt change is a commit
We sharpen the schema-inference prompt by editing one config. The change ships through git history like everything else — author, timestamp, diff.
No redeploy to iterate
The app reads the prompt from config at runtime, so prompt iterations don't wait on a release. The same loop is available to you on day one.
Put your prompts where your config already lives
Version them in git, change them without a deploy, target them by cohort, and generate type-safe render functions. Get started in minutes.