The System Prompt Is The Agent's Worldview
An agent is a model plus a worldview you reinstall on every turn. That worldview is the real programming, and it arrives as one briefing card. A line earns its place on that card only by changing a decision the agent makes.
The model is the same one anyone can use. Claude Code is that model plus the worldview assembled in front of it before your message arrives. Change the worldview and you get a different agent.
Worldview model
Every turn, a new worker shows up who knows nothing about your house. Same skill, zero memory of you.
So you hand them one card before they touch anything. The card says who you are, what the job is, the house rules, and what we worked out yesterday. Leave a line off and they do something silly with total confidence.
That card, rebuilt fresh every turn, is the worldview. The model is the worker, and the card makes the worker yours.
The system prompt is a briefing built in layers. Each layer answers a question the model cannot answer on its own. Most of the card is careful rather than clever. The skill is picking what the agent needs to know for the next decision, and cutting the rest.
Watch the worldview get assembled, bottom to top.
01The model forgets, so the worldview is rebuilt every turn
The model keeps no memory between calls. On its own it does not know it is Claude Code. So Claude Code rebuilds the agent in front of the model, one briefing card per turn.
That one fact explains the rest: counted words, a card that barely changes, memory as its own job. The card is expensive to hand over, and you hand it over every turn.
02Identity is a job description, not a personality
The first line on the card says what kind of thing the agent is. You take real actions, and you own what they do. Prefer doing the work to talking about it, and stop to check when the stakes are high. That one line sets two dials, how eager to act and how careful to be. Drop the eager dial and the agent narrates and waits. Drop the careful dial and it charges at what it cannot undo.
Set the dials. One line of identity moves both at once, and the agent's whole disposition follows.
The dials aren't independent knobs you tune. One sentence about what kind of thing the agent is sets both.
03It has to be told what it can do
The agent cannot see its own tools. The card names each tool, what it is for, and how to use it. The list tells the agent what exists. The habits tell it what to reach for first. Search before you go digging, and read a file before you change it. Never guess what is inside.
04Where it is matters as much as what it is
The card carries the plain facts of where the agent stands. The operating system decides which command runs at all. The working directory decides which file it opens. Today's date keeps the latest version from meaning whatever was true during training. Each fact stops one common mistake.
05The project's conventions are part of the briefing
Your project keeps its own notes file, and those notes go onto the card. The notes say how this code gets tested, which patterns to follow, and what to never touch. You control this layer, and it pays off most. Without it you get correct code that does not fit your project. You rewrite that code by hand.
The quiet economy
A subagent sent to look one thing up gets a lighter card, with the project notes left off. It does not need them for a job that narrow. Size the card to the job, and decide that size before the subagent starts.
06Most of it is stable, and stability is the point
Almost all of the card holds still from turn to turn: the identity, the tools, the environment, the project notes. Only the conversation at the bottom keeps growing. That sameness is deliberate, because an identical card gets reused and you pay for it once. Put the stable parts first and your changing task last. That order looks like a prompt. It is a money decision in disguise.
The cost
Every line on the card costs words, and every line can confuse the agent with something it did not need. A stuffed card costs more and runs slower, and it buries the part that matters. The test is blunt. Each line must change something the agent decides. Name that decision, or cut the line.
Decision
If you build an agent, design the card before you tune the wording. That is the order I wish I had started with. Write down what the agent must know to act well. The list is short: who it is, what it can do, where it is, whose rules apply, what it learned.
Then take one line off the card and predict what fails. The next piece takes the first thing the card teaches, the tool contract.