A prompt edit is a production deploy. Treat it accordingly:
1. Version prompts in the repo (or a registry) with an id and a changelog. 2. Offline eval the new version against the golden suite; block on regressions. 3. Shadow it on a traffic sample, comparing scores without showing users the output. 4. Canary 5% behind a flag, watching quality, latency, cost, and refusal rate. 5. Roll out or roll back with one flag flip.
ts
const variant = flags.pick(userId, { "reply.v7": 0.95, "reply.v8": 0.05 });
const out = await model({ prompt: PROMPTS[variant], input });
await obs.score(traceId, "variant", variant);Model upgrades need the same treatment: a newer model can regress your specific task, especially where prompts were tuned to old quirks or where structured-output behaviour changed. Pin model ids explicitly, never "latest", so a provider-side change cannot alter your product silently.
Exercise: run a canary between two prompt versions for 24 hours and decide from the trace scores, not intuition.