The Intent Engineering Reference

Intent Engineering is how you tell an AI agent what done means.

A working reference for the discipline: the definition, the intent specification field by field, the failure modes it prevents, and where intent is enforced in a production stack.

Intent Engineering, defined

A dictionary open on a lectern under a lamp, a single orange ribbon marking the page

Intent Engineering (noun): the practice of specifying the outcome an AI system must achieve, the evidence that proves it was achieved, the boundaries it must respect, and the conditions under which it must stop or hand control to a person - captured as a versioned artifact and enforced by tooling rather than by trust.

It is the third layer of a stack that grew one question at a time. Prompt engineering asked how should I phrase this? Context engineering asked what does the model need to know? Intent Engineering asks what must be true when the agent is finished - and what must never happen on the way?

The difference matters most once a system acts instead of answers. A chatbot with vague instructions gives a weak reply. An agent with vague intent changes production, spends money and sends messages in pursuit of a goal nobody wrote down.

three-layers.md ref
prompt engineering:
  optimizes the wording of one request
  unit: a message

context engineering:
  optimizes what the model can see
  unit: a context window

intent engineering:
  optimizes what must be achieved
  and what must never happen
  unit: an outcome, with an owner

Anatomy of an intent specification, field by field

An intent specification is short, lives in source control next to the agent, and is reviewed like code. Seven fields carry the weight. Each one answers a question that otherwise gets answered by the agent, at run time, by guessing.

objective

What must be true at the end

One outcome, stated as a state of the world, not an activity. "Page migrated and live" - not "work on the migration".

Test: could two people disagree on whether it was met? Then it is not finished.

success_criteria

The evidence, not the claim

Checks a machine can run: a visual diff threshold, links resolving, a score floor. Success is what the evals see, never what the agent reports.

Test: every criterion maps to an eval that can fail.

constraints

The fence around the work

Cost ceiling, paths it may edit, dependencies it may not add, data it may not read. Boundaries are declared, never implied.

Test: scope drift should hit a constraint, not a reviewer.

tool_permissions

What it may touch, and how

Each tool, with its scope: read or write, which path, commit but no push. Enforced at the protocol layer, not requested in prose.

Test: the agent cannot do what the spec does not grant.

escalate_to_human_when

When it must ask

Named conditions that hand control to a person: ambiguity, a threshold crossed, an edge case the spec did not foresee, anything irreversible.

Test: the escalation reaches a named owner with full context.

stop_rule + owner

When it must quit, and who answers

A hard abort - spend past the ceiling, a permission error, a retry limit - plus one accountable person. Not a team alias.

Test: a runaway agent stops itself before anyone notices the bill.

The example on the right is a complete spec for one real kind of job: moving a legacy server-rendered page to static HTML. Notice what is missing - there is no instruction about how to do the migration. The agent chooses the steps. The spec only fixes the destination, the evidence, the fence and the exits.

If you cannot write the spec, the agent is not ready for production.

migrate-legacy-page.intent.yaml v1
objective:
  Replace one legacy server-rendered page with a
  static HTML equivalent, live at the same URL.

success_criteria:
  - Visual diff vs. production within 2% pixel delta
  - All inbound links resolve (no 404s)
  - Lighthouse score >= 95 on mobile

constraints:
  - Cost ceiling: $4.00 per page
  - No edits outside /src/migrated/
  - No new third-party JS

tool_permissions:
  - mcp:filesystem (read+write, scoped path)
  - mcp:playwright (read-only screenshots)
  - mcp:git (commit, no push)

escalate_to_human_when:
  - Original page contains a form
  - Visual diff exceeds 5%

stop_rule:
  Abort if spend exceeds 1.5x the ceiling,
  retries exceed 3, or any tool is denied.

owner: platform-engineering@

Six ways an agent fails without intent

Each failure mode below has a recognizable symptom and a specific field of the spec that prevents it. Use the list as a review checklist: if a spec has no answer for one of these, that is where the next incident will come from.

Six museum dioramas of agents failing in six ways, around a seventh where a fenced path leads straight to the target
01 - Scope Drift

Symptom: the diff is bigger than the ask

A one-line fix arrives as a refactor of three modules nobody asked to change.

Prevented by: objective + constraints.

02 - Runaway Tool Use

Symptom: the bill arrives before the result

Retries, loops and recursive calls chasing a problem the agent cannot solve.

Prevented by: cost ceiling + stop_rule.

03 - Silent Partial Completion

Symptom: "done" with work missing

Two of five files updated, tests skipped, and a confident success message.

Prevented by: success_criteria checked by evals.

04 - Missing Escalation

Symptom: a guess where a question belonged

An ambiguous requirement resolved by the agent, silently, and shipped.

Prevented by: escalate_to_human_when + owner.

05 - Success Theater

Symptom: polished output, unchanged outcome

Clean, well-structured work that solves a problem nobody had.

Prevented by: an objective stated as an outcome.

06 - Irreversibility

Symptom: something that cannot be undone

A deploy, a migration, a payment or a customer email sent without approval.

Prevented by: approval gates declared in the spec.

Where intent is enforced in a production stack

A spec that only lives in a document is a wish. Intent becomes real at the points in the stack where an agent can be stopped. These are the four that matter.

A cutaway of agent pipelines passing four checkpoints - a release gate, a tool valve, a guarded barrier with an operator, and an audit ledger
Release

Evals as CI gates

Success criteria become evals that run on every change. An agent - or a change to its prompt, model or tools - does not ship when its intent evals fail, whatever a public benchmark says.

Tools

The protocol layer

Tool permissions are enforced where the agent connects to tools (MCP) and to other agents (A2A), not in the prompt. A grant the spec does not contain is a call the agent cannot make.

Runtime

Gates and stop rules

Approval steps on irreversible actions, spend limits, retry caps and permission errors that end the run. These fire without anyone watching, which is the point.

Evidence

Audit trail and owner

Every action is logged against the spec version that allowed it, and every escalation lands with a named person. The incident review opens the spec first.

Six principles of the discipline

01

Outcomes over output

The unit of work is a result in the world, not a response, a file or a token count.

02

Evidence over self-report

An agent's claim of success is a hypothesis. Evals are the verdict.

03

Declared, not implied

Every boundary an agent must respect is written down. An unwritten rule is one it will eventually break.

04

Every agent has an owner

One named person answers for each agent's intent, its escalations and its retirement.

05

Irreversible means human

Anything that cannot be undone passes through a person, by design and in the spec.

06

Cost is a constraint

Spend has a ceiling and a cost per outcome. An agent that cannot be afforded is not working.

Terms of the trade

A wooden card catalog with one drawer open and glowing, a single index card lifted from the rest

Intent specification

A short, versioned artifact stating an agent's objective, success criteria, constraints, tool permissions, escalation triggers, stop rule and owner.

Outcome eval

An automated check that a success criterion was actually met. Distinct from a model benchmark, which measures capability, not attainment.

Autonomy boundary

The set of actions an agent may take without asking. Everything outside it requires escalation or is denied outright.

Escalation trigger

A named condition under which the agent must stop and hand the decision, with its context, to a person.

Stop rule

A hard abort condition - spend, retries, a denied permission - that ends a run regardless of progress.

Cost per outcome

Total agent spend divided by outcomes that passed their evals. The number that tells you whether an agent is worth running.

Agent owner

The one person accountable for an agent's intent spec, its escalations, its incidents and its retirement.

Success theater

Output that looks excellent and changes nothing the business measures. The failure mode prompt quality cannot fix.

Common questions about the discipline

An empty lecture hall at night with a single spotlight on the lectern

Is Intent Engineering a framework or a product?

Neither. It is a practice, like code review or incident management. It works with any model, agent framework or orchestration platform.

How does it relate to spec-driven development?

Spec-driven development specifies the software a coding agent should build. An intent spec sits one level up: the business outcome any agent owes, and the limits on how it gets there.

Is it the same as AI governance?

Governance sets policy. Intent Engineering turns policy into something an individual agent is held to at run time: specific permissions, gates, evals and owners.

Who should write the intent spec?

The business owner of the outcome and the engineer who maintains the agent, together. Either one alone writes half a spec.

Does a simple agent need a spec?

If it can take an action someone would have to undo, yes. Read-only assistants need less, but still benefit from a stated objective and an owner.

Where should the spec live?

In source control, next to the agent's code and configuration, versioned and reviewed in the same pull requests.

A brass letter slot glowing warm in a heavy wooden door, a folded note resting in it

Have a question about the discipline?

0 / 2000

Message sent

Thanks - you will get a reply at the address you provided.

Ask about a term, a failure mode, or how a spec would look for your own agents. Every question gets a reply.