Prompt anatomy · 5 parts, found across dozens of real production agents

A job description tells a model what to output. These five things tell it how to behave under pressure.

Ask an agent to fix one failing test and watch it rewrite the file, rename three variables for clarity, reorganize the imports, and report back: "Done! Cleaned some things up while I was in there." Nobody asked for that. The prompt never forbade it either, so as far as the model was concerned, more work read as more help.

That failure has a name, and so do four others just like it. Read enough real, working agent prompts, ones that actually run in production, across long sessions, under real failure, and the same five parts show up again and again. Most prompts people write have two of them. The ones that hold up over a long session have all five.

A job title tells a model what to make. A posture tells it how to decide.

Part 1 of 5

Identity, built from a metaphor, not a job title

"You are a code reviewer" describes an output. It says nothing about how much benefit of the doubt to give, when to push back, or what counts as done. A metaphor compresses a whole posture into a sentence a model can actually act from, turn after turn, without re-deriving it.

Weak version

You are a helpful orchestrator agent that manages other agents.

Working version

You cue sections in. You don't play an instrument yourself. Every part is trusted to play correctly once cued, never micromanaged mid-performance.

The metaphor is the instruction. Everything else in the prompt is just working out its implications.

A firm identity is also what holds up under pushback: see Sycophancy in the failure catalog, the model folding when challenged even when it was right, a posture failure a real identity is built specifically to resist.

Part 2 of 5

What it cannot do, spelled out, not implied

Remember the test-fixing agent from the top of this page? It didn't lack instructions. "Fix the failing test" is a perfectly clear instruction. What it lacked was a single line saying what it couldn't touch while doing that. Here's the whole fix:

The one line that was missing

Does not modify anything beyond what's needed to make the failing test pass. Does not rename, refactor, or reorganize as a side effect, even improvements nobody would object to.

Positive instructions describe the job an agent already wants to do. The failures that actually happen in production don't look like refusing to help, they look like quietly doing more than was asked, deciding an ambiguous case on its own, or trusting an unverified claim. A model straining to be helpful will always find a way to satisfy a positive instruction, even the wrong way. Only an explicit prohibition catches that.

The prohibitions are usually more load-bearing than the instructions.

The two failure modes an explicit boundary list guards against most directly: Scope Creep, unrequested work arriving because more output reads as more help, and Destructive Action Without State Check, an overwrite that never checked what it was replacing.

1234

Part 3 of 5

A procedure with real steps, not a vibe

A real procedure names every stage, what it needs before starting, what it produces when it's done, and what to check before moving to the next one. The single biggest gap between a prompt that works reliably and one that "usually works" is whether "confirm the output actually exists" is a literal, numbered step, or something quietly assumed.

Weak version

Work through the pipeline stages and hand off to the next agent when ready.

Working version

After the agent completes, confirm the expected output file actually exists before treating the stage as finished. If it doesn't, ask what happened rather than assuming success.

"Assume it worked" is where a procedure quietly turns into a vibe.

This is the direct fix for Claimed Execution, "I've tested this and it works" with no test run, and for Premature Closure, committing to the first plausible answer before an alternative was ever generated.

"Round1: pass"

Part 4 of 5

Voice shown as an example, never described as an adjective

"Be concise" gets reinterpreted differently every single turn across a long session, because it's an instruction the model has to keep re-satisfying from scratch. A literal example message is something to pattern-match against directly, which holds up under pressure in a way an adjective never does.

Weak version

Keep responses short and to the point.

Working version

"Round 1 verdict: needs work. Blocking finding: [category], one line description. Routing back for round 2." Nothing else. The reports have the detail; the message doesn't repeat it.

Show the message. Don't describe the message.

This is exactly what Instruction Drift describes: tone and format, specified early, quietly reverting to model defaults over a long session. A shown example resists that decay in a way a described adjective doesn't.

Part 5 of 5

A structured self-report, not a free-form reflection

"Explain your reasoning at the end" produces prose nobody downstream can actually use. The stronger version is a fixed, small taxonomy: what was assumed and why, where the agent struggled, what it would flag as a gap in its own knowledge, each logged as its own tagged category, not folded into one paragraph.

Weak version

Briefly explain any assumptions you made at the end of your work.

Working version

Log an assumption the moment it happens, tagged by type, with what would need to change if it's wrong. A vague reflection at the end is easy to skip; a tagged entry in the moment isn't.

Structure turns one run into data. Prose turns it into a paragraph nobody reads twice.

This is the structural fix for Silent Assumption-Filling, picking an interpretation without saying which, and it gives Overconfident First Answer somewhere to go: a register for stating what's actually still uncertain.

Which of these five does your last agent prompt have?

Think of a real prompt you've written or are running right now, not the one you meant to write. Check only what it actually has.

0 of 5 checked.

None of these five is exotic. Having all five, consistently, is rare.

Every one of these parts is individually obvious once it's named. What's uncommon is a prompt that actually has all five at once, an identity a model can hold onto for a long session, a boundary list that catches the failures a positive instruction can't, a procedure specific enough to survive being followed literally, a voice shown rather than described, and a self-report structured enough for something else to use later.

Identity and a way to report on its own work are the two parts almost every agent prompt already has. Boundaries and a real procedure show up in most, but not all. Voice is where it actually breaks down most often, and not by being absent so much as by being described instead of shown: an adjective standing in for the one thing that was supposed to replace adjectives in the first place.

Next time an agent does something you didn't want, check which of the five was missing before you add another positive instruction on top of the pile.

Questions worth answering directly

What are the essential parts of a good agent system prompt?

Five: an identity built from a metaphor rather than a job title, an explicit list of what the agent must never do, a concrete numbered procedure, a communication style shown through literal example messages, and a structured format for the agent to report on its own work.

Why use a metaphor instead of a job description?

A job description states an output. A metaphor states a posture, how to weigh evidence, when to push back, what to treat as settled. A model can act on a posture turn after turn; it can only restate a job description.

Why is "what you cannot do" more important than positive instructions?

Positive instructions describe the job the agent already wants to do. The negative list stops the failures that don't look like refusing to help, scope creep, overreach, silent assumptions, which is exactly why they're the ones most likely to slip through unnoticed.

Why show example messages instead of describing tone?

An adjective like "be concise" gets reinterpreted differently every turn over a long session. A literal example message is something the model can pattern-match against directly, which holds up under pressure in a way a description of tone does not.

This pattern is one artifact of a larger practice.