MSTRMND
All insights
Architecture · 5 min read

Write the spec, not the prompt.

A prompt tuned to one model quietly encodes that model's habits. We write agent instructions as model-neutral specs and keep provider-specific phrasing in a thin, replaceable adapter.

Most agent instructions start as a prompt that worked. Someone iterated against one model until the output looked right, then kept every phrase that seemed to help: a repeated warning, an all-caps constraint, an example that nudged the format into shape. The prompt ships, and it becomes the place where the agent's behavior is defined.

The trouble is that a prompt tuned this way mixes two different things. Part of it describes what the agent must do. The rest compensates for how one particular model tends to misbehave. When the model changes, nobody can tell which lines are the requirement and which were a workaround. We separate the two on purpose, so the intent survives the model underneath it.

A tuned prompt is a fork of the model

Every workaround in a prompt is a statement about a specific model. Telling it twice not to invent fields, or wrapping a rule in emphasis because it was being ignored, records a behavior that the next model may not share. Some of those lines become harmless noise. Others actively push a different model in the wrong direction, because the correction is aimed at a failure that no longer exists.

Over time the prompt becomes a fork that only makes sense against the model it was tuned for. Swapping models then means re-tuning from scratch, and the original requirements are buried somewhere in the text. We treat that as an architecture problem, not a wording problem.

The spec states outcomes and constraints

The source of truth for an agent's behavior is a spec, written for a reader who has never seen the model. It says what the task is, what inputs it receives, what a correct result looks like, what the agent must never do, and when it should stop and ask. It names the tools available and the conditions under which each one is appropriate.

A good spec reads like a work order a competent engineer could follow. It does not contain persuasion, repetition for emphasis, or phrasing chosen because one model responded to it. If a constraint matters, it is stated once, plainly, and it is also enforced somewhere outside the model when the stakes call for it.

Adapters hold the model-specific parts

Models do differ, and pretending otherwise produces worse results. Some respond better to structured sections, some need the output format restated near the end, some handle long tool lists differently. That knowledge is real. It just does not belong in the spec.

We keep it in an adapter: a thin layer that renders the spec into whatever form a given model handles best. The adapter can reorder sections, add format reminders, or change how examples are presented. It cannot add requirements or remove them. When we move an agent to a different model, we write or adjust an adapter and leave the spec alone. The difference between two adapters is a readable record of how two models differ, which is useful on its own.

Rules the model must not break live outside the prompt

A spec can say that an agent never sends a message without approval, but a sentence in a prompt is a request, not a control. Any model can misread it, and untrusted content can argue with it.

So we sort constraints by consequence. Formatting and tone live in the spec and are checked by evals. Anything irreversible, anything that touches permissions, and anything that crosses a trust boundary is enforced by the operating layer: scoped tools, approval gates, and validation on outputs before they take effect. The spec still states those rules, so the model plans around them, but correctness does not depend on the model obeying.

Evals are written against the spec

If the spec defines correct behavior, the evals should test the spec, not the prompt. Each requirement maps to cases that check it: the agent asks when the input is ambiguous, refuses the out-of-scope action, produces the required fields, stops when it should.

This changes what an eval failure means. When a new model fails a case, the question is whether the adapter needs work or whether the model cannot meet the requirement. Neither answer involves rewriting the spec to match the model. When we change the spec, the evals change with it, in the same review, so intent and tests do not drift apart.

The cost is a second artifact

This approach asks for discipline. There are now two things to maintain instead of one, and early on it can feel faster to edit the prompt directly until it works. The cost shows up when the spec and adapter are allowed to blur, with requirements creeping into adapters because that was the quickest place to put them.

Our rule is simple: if a line would still be true for any model, it goes in the spec. If it is only true for one, it goes in that model's adapter. Reviews check that boundary the same way they check any other interface.

Intent that outlives the model

Models are interchangeable only if the instructions are. A system whose behavior lives in tuned prompts is locked to the model those prompts were tuned against, whatever its architecture diagram says.

In the operating layer we build, the spec is the durable statement of what an agent does, the adapter is the replaceable part, and the controls that matter are enforced outside both. When the model changes, the work order stays the same, and we still own the send.

03—Let's talk

Ready to build what's next?

We're always open to new conversations. Let's create something exceptional together.

Start the conversation