I audited 27 of my own AI prompts. 22 of them were broken.

Last month I opened my prompts.md and read every prompt in it like a stranger would. I had 27 of them, accumulated over a year of building AI agents and automation workflows.

22 failed a basic test: hand the prompt to someone else and have them get the same output I get.

That number annoyed me enough to write down the failure pattern. It is boring, and it is the same every time.

The three ways prompts break

1. They describe a vibe, not a job.

You are an expert developer. Review this code and tell me if it's good. 

There is no standard here. "Expert" is not a standard. "Good" is not a standard. The model has to invent your bar, and it will invent a different one on Tuesday.

2. They let the model fill gaps.

Summarise this customer feedback. 

When the input is thin, the model does not stop. It produces plausible-sounding filler, and you ship it because it reads fine.

3. They never say what "done" looks like.

Write tests for this function. 

You get six tests. You wanted the boundary cases. You did not say which ones mattered, so it guessed.

The fix is a contract, not a better sentence

I rewrote all 27 prompts against four explicit parts. Same model, same day:

Part What it answers Bad Good
Role Who, held to what standard "You are an expert" "You are a staff engineer reviewing a PR; reject speculative abstraction"
Context Facts it cannot invent (omitted) "Stack: Next.js 15 + Supabase. Unknowns marked TODO."
Constraints Hard rules and forbidden moves (omitted) "Only flag real defects. Never invent APIs not in the diff. Max 150 words."
Output schema The exact shape of the answer "tell me if it's good" `{"blocking": [...], "nits": [...], "verdict": "approve"\

Here is the same code-review prompt, rewritten:
{% raw %}

ROLE: You are a staff engineer reviewing a pull request. You optimise for correctness and maintainability and reject speculative abstraction. CONTEXT: Language: TypeScript. Framework: Next.js 15. The diff is below. Tests: passing. CONSTRAINTS: Only comment on real defects (bugs, race conditions, missing error handling, security). Do not restyle. Never invent APIs that are not in the diff. If the diff is too small to judge, say so. OUTPUT: Return only JSON: {"blocking":[{"file":string,"line":string,"issue":string,"fix":string}], "nits":string[],"verdict":"approve"|"request_changes"} 

What actually changed

Two things, and both are measurable:

  1. Output stopped drifting. Same prompt, five runs, same JSON shape. I could pipe it into an n8n node without a repair step.
  2. The model stopped guessing. The TODO escape hatch turned "plausible filler" into null, which is a value I can handle.

The second one is the one nobody talks about. Prompt drift is not the model being random. It is the model being helpful in the absence of instructions, which is exactly what you asked for.

The anti-hallucination block

If you take one thing from this post, take this block. Paste it at the end of any prompt where a wrong answer costs you money:

If the answer is not supported by the CONTEXT above, respond exactly: {"error":"insufficient_context","missing":[<what you need>]} Never fill gaps with plausible-sounding facts. 

That is it. It is four lines and it removed the single most expensive failure mode in my own agent stack.

Why I am writing this down

I ended up rewriting all 27 prompts and then writing 19 more that I actually reuse — code review, refactor planning, cold email, lead scoring, incident post-mortems, market sizing. I kept the four-part template at the top of the file because I kept forgetting it.

I put the finished set into a single PDF, mostly so I would stop losing it across three machines. It is 46 prompts plus the system blocks from this post.

If that is useful, it is here: PromptHub — 46 production AI prompts ($2, instant download, no subscription).

But the framework in this post is the whole point, and it is free. Go rewrite one prompt with it right now — pick the one that annoys you most. You will feel the difference on the first run.

I build deterministic AI agents and automation tools. More at ancuboy.gumroad.com.