The system prompt is product behavior, but it lives in engineering's repo — and without an agreement, it changes without you knowing. This playbook writes the PM-engineering working contract: prompts in git, your golden eval set as the merge gate, change logs with eval deltas, canary rollout, and auto-rollback triggers.
Workflow area: Agents & Responsible AI · Tier: Advanced · Hands-on time: ~45 minutes
Prompts are the strangest artifact in modern product work: they read like specs, deploy like code, and change behavior like both. In most teams they occupy a governance vacuum — edited in a dashboard by whoever's debugging, untested against anything, unannounced to the PM who owns the resulting behavior. The failure is bidirectional: engineers ship "harmless wording tweaks" that shift refusal behavior, and PMs demand changes verbally with no record of what was asked. The contract fixes the vacuum with one move: treat prompts exactly like code, with the PM's eval set standing where code review stands.
Inventory the current reality first. Twenty minutes with the tech lead: where does each prompt live (repo, dashboard, database, someone's snippet stash)? Who can change each? What happens between edit and production? What broke in the last three months? The contract negotiates from this inventory — a contract written against an imagined pipeline gets ignored by the real one.
Draft the contract from the six-clause skeleton.
Draft a one-page prompt-governance working agreement between
product and engineering. Plain language, no legalese — this is
an internal team contract.
Context: [TEAM SIZE, WHERE PROMPTS LIVE TODAY, EVAL TOOLING
(promptfoo/Braintrust), OBSERVABILITY (Langfuse), FLAG TOOLING]
Recent incidents: [WHAT WENT WRONG, BRIEFLY]
Six clauses, each with: the rule, the mechanism enforcing it,
and the named owner.
1. SOURCE OF TRUTH — all production prompts in git; dashboard
edits are for experiments only and cannot reach production.
2. CHANGE PROCESS — every prompt change is a PR; PM is a
required reviewer for changes to [NAMED behavior-critical
prompts]; wording-only claims still run the gate.
3. MERGE GATE — the golden eval suite runs on every prompt PR;
merge requires scores at/above the launch bar; the PM owns
the eval set's content, engineering owns the runner.
4. CHANGE LOG — every merged change records: motivation, diff,
eval delta (before/after per suite), and model version tested
against. Auto-generated where possible.
5. ROLLOUT — behavior-critical prompt changes ship behind a
canary (X% traffic, Y hours) with named guardrail metrics.
6. ROLLBACK — auto-revert triggers (guardrail breach thresholds)
and the manual procedure, with the same authority list as
our rollout plan.
End with: what counts as "behavior-critical", the exception
process for emergencies, and the quarterly review of this
agreement itself.
Negotiate the two clauses that always get pushback. Clause 2 (PM review) draws "this will slow us down" — concede review only for the named behavior-critical prompts (system prompts, refusal instructions, tone) and let utility prompts flow with just the eval gate; speed objections usually dissolve when the gate is automated. Clause 4's eval delta draws "extra work" — make the CI job write it into the PR automatically (promptfoo output pasted by the action), so the log costs nobody anything. A contract that survives is one where every clause has a mechanism, not a hope.
Define "behavior-critical" as a list, not an adjective. Enumerate the actual prompt files/sections: the system prompt, safety and refusal instructions, persona and tone blocks, tool-use permissions phrasing, disclosure language (pb-49's annex text). Everything on the list gets PM review + canary; everything off it gets the eval gate only. Revisit the list quarterly — prompts migrate onto it after their first incident.
Run one change through the full pipe as the ratification. Pick a real pending prompt improvement and walk it: branch, PR with PM review, eval run posted, merge, canary with Langfuse watching the guardrails, promote, changelog entry with the delta. Time each step and fix what's clunky now — the contract is ratified by the walkthrough, not the signatures. Publish the agreement where specs live, with the walkthrough PR linked as the worked example.
Prompts frequently embed sensitive material — internal policy details, security instructions, disclosure wording with legal sign-off — so scope repo access accordingly, keep secrets out of prompt files entirely, and remember that anything in a prompt may be extractable by a determined user (pb-42's extraction probes test exactly this).
You can't own AI product behavior while its source code changes without you. Prompts in git, your golden set as the gate, deltas in the log, canary on the critical list — sign that with engineering once, and every future "who changed the bot?" has a link instead of an argument.