Chapter 4: Intent Engineering - From Prompts to Purpose
Three Eras of AI Communication
AI communication has moved through three waves. Each wave did not replace the last - it built on it.
Wave 1: Prompt Engineering. Optimizing how you phrase instructions. Better wording, better templates, better outputs. Necessary, but limited to a single interaction. By 2026 this is table stakes - you do not get credit for writing a better prompt any more than you got credit for knowing keyboard shortcuts.
Wave 2: Context Engineering. Optimizing what information the agent can see. Retrieval, memory, CLAUDE.md and AGENTS.md, structured documentation. Better context, better reasoning continuity. This is the substance of the previous chapters.
Wave 3: Intent Engineering. Optimizing what must be achieved. Defining objectives, success criteria, constraints, autonomy boundaries, and stop rules so agents deliver business outcomes - not just responses. This is the layer most teams are missing.
Context tells the agent what is true. Intent tells it what to value. An agent operating on context alone knows what to do but has no principled basis for deciding whether it should. Without intent, you have built a powerful system pointed at nothing in particular.
Execute Tasks vs. Achieve Goals
Most enterprise AI implementations fail not because the models are not capable, but because nobody defined what success actually looks like. An agent can produce well-structured code, retrieve accurate data, and maintain multi-turn reasoning - and still fail to deliver the business outcome it was built for. Roughly three in four enterprise AI projects fail to deliver expected value, and almost never because the model fell short.
Intent engineering introduces a structural layer between business objectives and AI systems: objectives, constraints, autonomy boundaries, health metrics, and stop rules. It is the difference between telling an agent what to generate and telling it what to accomplish. An organization with a mediocre model and strong intent infrastructure will consistently outperform a company running a frontier model without alignment. Model capability is table stakes. Intent is the differentiator.
The Intent Specification
Every agent gets a spec before it ships. Not a prompt. Not a policy doc. A short, executable contract that names the outcome the agent owes the business and the boundaries it cannot cross. The spec lives next to the agent in source control. It is reviewed in PRs. It is enforced in CI through evals. And when something goes wrong, it is the artifact the incident review opens first.
If you cannot write the spec, the agent is not ready for production.
# migrate-legacy-page.intent.yaml (v1)
objective:
Migrate a legacy page to a static HTML equivalent.
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%
- Tool call retry count > 3
stop_rule:
Abort if cost spend exceeds 1.5x the ceiling
or if any tool returns a permission error.
owner: platform-engineering@
This is the connective tissue between Wave 2 and Wave 3. Context gives the agent what it needs to know; the intent spec gives it what it must achieve and where it must stop. A deeper treatment of this discipline lives at intentengineering.dev.
The Six Failure Modes Intent Prevents
An agent without a spec does not fail in one way. It fails in six. Each is a real production incident pattern, and each is exactly what an intent specification is designed to catch before the agent ships.
1. Scope Drift. The agent expands the task beyond the ask. "Fix this bug" becomes a refactor of three unrelated modules. Intent fix: objective plus constraints fence the work to what was asked.
2. Runaway Tool Use. Unbounded retries, recursive tool calls, infinite loops - the agent burns tokens chasing a problem it cannot solve. Intent fix: cost ceiling and retry-count stop rules abort before the bill compounds.
3. Silent Partial Completion. The agent reports success on a half-done job. Two of five files updated, tests skipped, the PR looks green. Intent fix: success criteria are checked by evals, not by the agent's own self-report.
4. Missing Escalation. The agent guesses instead of asking. Ambiguous requirement, low confidence, and it ships a hallucinated decision. Intent fix: escalation triggers route ambiguity to a named human owner with full context.
5. Success Theater. The output looks beautiful; the business outcome was not achieved. Well-structured code that solves the wrong problem. Intent fix: success is defined as a measurable business outcome, not generation quality.
6. Irreversibility. The agent takes an action it cannot undo without approval - schema migrations, prod deploys, financial transactions, customer comms. Intent fix: human approval gates for irreversible actions are declared in the spec, not bolted on after.
From Vibe Coding to Intent Coding
"Vibe coding" - prompting your way to working software without reading much of the output - is a real and useful mode for prototyping and throwaway tools. But the gap between "it generated code" and "it solved my problem" is intent. For anything headed to production, the discipline is intent coding: name the outcome, the constraints, and the stop conditions; let the agent execute; and verify against criteria you wrote down in advance. Speed without wisdom is just faster destruction. Intent is how you keep the speed and add the wisdom.