If Context is King, Intent is Queen
Or: Why Your AI Agent Acts Like a Bulldozer with a Smile—And What's Missing
The Donkey from Shrek Moment
You know that scene where Donkey accidentally causes chaos, then turns to you with that big goofy grin and says, "Oops! I shouldn't have done that!"?
That's your AI agent at 3am when you realize it just deleted your production database.
<p class="aside"> If you've ever typed "UNDO THAT IMMEDIATELY" in all caps, you know exactly which moment I'm talking about. </p>
Here's what happened:
You said: "Clean up the test files in the database."
The AI heard: "DELETE FROM database."
Context: It had access to your database. It saw tables. It understood SQL.
Intent: You wanted to remove unused test records, not burn everything to the ground.
The AI had perfect context. It had zero understanding of intent.
And now you're restoring from backups at 3am while your AI agent—metaphorically—smiles at you like Donkey and says, "Oops!"
The Shoot-From-The-Hip Problem
We've built a generation of AI agents that are bulldozers champing at the bit to go.
They're powerful. They're fast. They have access to everything. And they're desperately eager to help.
The problem: They execute first, understand later.
<div class="knowing-nod"> Anyone who's watched their AI agent "helpfully" refactor an entire codebase—turning 1,000 lines of working code into 1,000 lines of technically correct but completely unusable code—has seen this bulldozer in action. </div>
You ask: "Can you improve this function?"
The AI thinks: "REFACTOR MODE ENGAGED. OPTIMIZING EVERYTHING."
What you wanted: Better variable names and a comment explaining the weird edge case.
What you got: The entire function rewritten with a different algorithm, new dependencies, and a structure you don't recognize.
Context: The AI saw the code. It understood the syntax. It knew best practices.
Intent: You wanted minor improvements, not architectural revolution.
The AI bulldozed forward because it had context—but it never understood your intent.
Context Engineering vs. Intent Engineering
Let's define terms, because the industry conflates these:
Context Engineering (What We're Good At)
Context = What exists around the task.
- Files in the codebase
- Environment variables
- API documentation
- Previous conversation history
- System state
Modern AI models are getting really good at context engineering:
- Long context windows (100K+ tokens)
- RAG systems for external knowledge
- Multi-modal inputs (text, images, code)
- Persistent conversation history
We can give AI access to everything.
Intent Engineering (What We're Terrible At)
Intent = What you're actually trying to accomplish and why.
- The goal behind the request
- Constraints that aren't explicit
- What "good" looks like
- What "too far" means
- Acceptable tradeoffs
Modern AI models are terrible at intent engineering:
- They don't ask clarifying questions
- They don't confirm destructive actions
- They don't sense when they're going too far
- They execute confidently, even when wrong
We give AI access to everything—but no ability to understand what we actually want.
The "One-Shot Wonder" Mentality
Here's the pattern I see everywhere:
User: "Fix the authentication bug."
AI (internally):
- Scans codebase (context ✓)
- Identifies auth module (context ✓)
- Sees potential issues (context ✓)
- Generates fix (execution ✓)
- Applies changes (execution ✓)
User: "Wait, that's not what I—"
AI: "Oops! I shouldn't have done that!"
<p class="subtle-callout"> (If you've ever had to roll back an AI's "helpful" changes, you've lived this exact moment.) </p>
What's missing: The pause. The clarification. The "Wait, let me make sure I understand what you want before I bulldoze your codebase."
The industry has optimized for speed and capability, not for understanding and alignment.
We have agents that can do anything. But they can't figure out what they should do.
Real Examples of Missing Intent
Let me show you what this looks like in the wild:
Example 1: The Over-Eager Refactor
What I said:
"This function is hard to read. Can you clean it up?"
What I meant:
Add better variable names, maybe extract one helper function if it makes sense. Keep the core logic intact.
What the AI did:
Rewrote the entire function using a different algorithm, changed the signature, introduced new dependencies, and "improved" it to use the latest fancy library.
Context: Perfect. It saw the code, understood it, applied best practices.
Intent: Missed completely.
Result: I spent 2 hours reverting changes and explaining what "clean up" actually meant. The AI had perfect context but zero intent understanding.
Example 2: The Helpful File Deletion
What I said:
"Remove the old test files, we don't need them anymore."
What I meant:
Delete the tests/legacy/ directory with the deprecated unit tests from 2 years ago.
What the AI did:
Deleted the entire tests/ directory. All of it. Current tests, integration tests, E2E tests. Gone.
Context: Perfect. It saw the file structure, understood the command.
Intent: Completely misunderstood what "old" meant.
<div class="knowing-nod"> If you've ever had that moment where you run git status and see 500 deleted files you didn't expect, you know the cold sweat this produces. The AI smiled and said "Done!" while you're frantically running git restore .. </div>
Example 3: The Security "Improvement"
What I said:
"The API authentication seems overly complex. Simplify it."
What I meant:
Remove the redundant token validation—we're checking the same token twice. Keep all the security measures, just deduplicate the logic.
What the AI did:
Removed all the "complex" security checks. JWT validation? Gone. Rate limiting? Gone. CORS? Gone.
Context: Understood the code perfectly.
Intent: Missed that "simplify" didn't mean "remove all security."
Result: Deployed to staging. Red alerts everywhere. Security team not happy. The AI thought it helped.
Example 4: The Optimization Disaster
What I said:
"This query is slow. Optimize it."
What I meant:
Add an index on the user_id column. That's it.
What the AI did:
Rewrote the query to use a complex CTE with 5 subqueries, materialized views, and "clever" caching that requires a complete schema migration and introduces 3 new race conditions.
Context: Saw the query, the schema, performance metrics.
Intent: Completely missed that "optimize" meant "small, safe improvement," not "architectural overhaul."
<p class="aside"> The query went from 200ms to 50ms. It also went from "stable for 3 years" to "nobody understands how it works anymore." </p>
Why This Happens: The Bulldozer Bias
AI agents are trained and optimized for:
- Capability: "Can it do X?"
- Speed: "How fast can it do X?"
- Autonomy: "Can it do X without human intervention?"
They're not optimized for:
- Understanding: "Does it know what X actually means?"
- Caution: "Should it ask first before doing X?"
- Alignment: "Is X what the human actually wants?"
The result: Bulldozers. Powerful, fast, autonomous bulldozers that will happily demolish your house if you say "improve the foundation" and they interpret that as "start from scratch."
The Training Reinforces This
Think about how we train/evaluate AI:
Metric 1: Task completion rate
(Did it complete the task? Yes = good, no = bad)
Metric 2: Speed
(How fast? Faster = better)
Metric 3: Autonomy
(Did it need help? Less help = better)
Missing metrics:
- Intent alignment: Did it do what the human actually wanted?
- Clarification quality: Did it ask the right questions before acting?
- Damage avoidance: Did it prevent unintended consequences?
We're optimizing for bulldozers—then surprised when they bulldoze.
What Intent Engineering Would Look Like
Imagine an AI that paused before executing. That asked clarifying questions. That understood intent before demolishing your codebase.
Intent-First Workflow
User: "Clean up this code."
AI (Intent-First):
"Before I proceed, let me clarify:
By 'clean up,' do you mean:
- Improve readability (formatting, naming)?
- Refactor structure (extract functions, reorganize)?
- Optimize performance?
- Remove unused code?
Constraints:
- Should I maintain current behavior exactly?
- Are breaking changes acceptable?
- Do you want me to change dependencies?
Scope:
- Just this function, or related code too?
- Should I touch tests?
Please clarify so I don't overcorrect."
<div class="knowing-nod"> If your AI had ever asked these questions BEFORE rewriting your entire codebase, you'd have saved hours of cleanup. But they don't. They bulldoze forward and smile when they're done. </div>
Destructive Action Confirmation
User: "Delete the old files."
AI (Intent-First):
"I found these files matching 'old':
/tests/legacy/(last modified: 2 years ago, 45 files)/docs/archive/(last modified: 1 year ago, 12 files)/tests/(last modified: yesterday, 230 files) ← seems actively used
Recommendation: Delete first two only. The /tests/ directory is actively maintained.
Confirm: Delete /tests/legacy/ and /docs/archive/? (yes/no)"
Result: You confirm. AI deletes the right thing. No "oops" moment. No 3am restore.
Scope Verification
User: "Optimize this function."
AI (Intent-First):
"I see multiple optimization approaches:
Option 1: Small improvement (5 min)
- Add index to
user_idcolumn - Expected: 200ms → 80ms
- Risk: Minimal, easily reversible
Option 2: Medium refactor (1 hour)
- Rewrite query with better joins
- Expected: 200ms → 30ms
- Risk: Moderate, requires testing
Option 3: Architectural change (1 day)
- Implement caching layer, schema changes
- Expected: 200ms → 10ms
- Risk: High, significant effort
Which approach aligns with your goals?"
Result: You pick Option 1. AI does exactly that. Everyone's happy.
The Missing Discipline: Intent Clarification
Context engineering is a solved problem (mostly). We have:
- Long context windows
- RAG systems
- Multi-modal inputs
- Persistent memory (improving)
Intent engineering is unsolved. We don't have:
- Systematic clarification frameworks
- Intent verification before execution
- "Measure twice, cut once" protocols
- Damage prevention heuristics
<p class="subtle-callout"> We've built bulldozers with perfect vision (context) but no sense of direction (intent). They can see everything. They understand nothing. </p>
Building Intent-Aware Systems
What would it take to move from bulldozers to thoughtful agents?
Framework 1: The Clarification Gate
Before executing any action, ask:
- Scope: What's included? What's excluded?
- Constraints: What must be preserved? What's off-limits?
- Success criteria: What does "done" look like?
- Failure modes: What would be considered "too far"?
Implementation:
class IntentAwareAgent:
def before_execute(self, user_request, proposed_action):
"""Gate that requires intent clarification before execution."""
# Analyze action for risk
risk_level = self.assess_risk(proposed_action)
if risk_level == "HIGH":
# File deletion, schema changes, etc.
return self.require_explicit_confirmation(user_request, proposed_action)
elif risk_level == "MEDIUM":
# Refactors, optimizations, etc.
return self.offer_clarification(user_request, proposed_action)
else:
# Low-risk: formatting, comments, etc.
return self.execute_with_notification(proposed_action)
def require_explicit_confirmation(self, request, action):
"""Show what will happen, require YES/NO."""
clarification = self.generate_clarification(request, action)
print(clarification)
response = input("Proceed? (yes/no): ")
return response.lower() == "yes"
def offer_clarification(self, request, action):
"""Present options, let user choose."""
options = self.generate_options(request, action)
print("Multiple approaches possible:")
for i, option in enumerate(options):
print(f"{i+1}. {option['description']} (risk: {option['risk']})")
choice = input("Select option (1-N) or 0 to abort: ")
return options[int(choice) - 1] if choice != "0" else None
Framework 2: The Scope Limiter
Prevent scope creep by making assumptions explicit:
User: "Clean up this function."
AI: "I'm assuming:
- Keep current behavior unchanged ✓
- Improve readability only ✓
- Don't change dependencies ✓
- Don't modify tests ✓
Override any assumptions? (type number or 'proceed')"
<div class="knowing-nod"> If AI asked this EVERY TIME before bulldozing, 80% of "oops" moments disappear. But they don't. They assume you want maximum "help." And maximum help = maximum destruction. </div>
Framework 3: The Undo Protocol
Make all actions reversible—and communicate this:
AI: "I'm about to delete 45 files in /tests/legacy/.
Safeguards:
- ✓ Commit current state to git first
- ✓ Create
.deleted_files_backup/with copies - ✓ Log all deletions to
deletion_log.txt
You can undo via:
git restore .(full restore)./restore_deleted.sh(selective restore)
Proceed?"
Result: User trusts the agent because there's a parachute. Not a bulldozer—a careful excavator.
Framework 4: The Progressive Execution
Instead of all-or-nothing, iterate:
User: "Refactor this module."
AI: "I'll refactor in stages. After each, you confirm or adjust:
Stage 1: Rename variables for clarity (2 min)
Stage 2: Extract helper functions (5 min)
Stage 3: Restructure main logic (10 min)
Stage 4: Optimize algorithms (15 min)
I'll show you the diff after each stage. You decide if we continue or stop.
Start with Stage 1?"
Result: User has control. AI isn't a bulldozer—it's a collaborative partner.
The Intent-Context Matrix
Not all tasks need the same level of intent clarification:
<table> <thead> <tr> <th></th> <th>Low Context Risk</th> <th>High Context Risk</th> </tr> </thead> <tbody> <tr> <td><strong>Low Intent Risk</strong></td> <td> <strong>Safe Zone</strong><br> Format code, add comments<br> Execute immediately </td> <td> <strong>Notify Zone</strong><br> Read large files, analyze data<br> Execute with heads-up </td> </tr> <tr> <td><strong>High Intent Risk</strong></td> <td> <strong>Clarify Zone</strong><br> Refactor logic, rename things<br> Clarify intent first </td> <td> <strong>Confirm Zone</strong><br> Delete files, migrate schemas<br> Explicit confirmation required </td> </tr> </tbody> </table>
Context Risk: Could accessing/modifying this cause damage?
Intent Risk: Is my interpretation of the request ambiguous?
The problem: Current AI treats everything as "Safe Zone." Even when it's "Confirm Zone."
Why Models Excel at Context, Fail at Intent
Here's the uncomfortable truth:
Context engineering is a technical problem. We can solve it with:
- Bigger context windows
- Better retrieval systems
- Smarter embeddings
- More training data
Intent engineering is a human problem. It requires:
- Understanding ambiguity
- Sensing hesitation
- Reading between the lines
- Knowing when you don't know
<p class="aside"> Some models are getting better (Claude, GPT-4 show glimmers of caution). But even the best still default to "execute fast, apologize later" when given the chance. </p>
The training disconnect:
We train models on "complete the task successfully."
We should train on "clarify the task correctly, THEN complete it successfully."
But clarification is:
- Slower (worse benchmark scores)
- More uncertain (looks like the model "doesn't know")
- Harder to measure (subjective quality)
So we optimize for bulldozers. And wonder why they bulldoze.
The Path Forward: Intent-Aware Agents
What would a production-ready intent-aware system look like?
1. Risk Detection Layer
Before execution:
- Classify action risk (low/medium/high)
- Identify destructive operations (delete, drop, modify)
- Flag scope ambiguity ("old files" = which files?)
2. Clarification Engine
When ambiguity detected:
- Generate clarifying questions
- Present multiple interpretations
- Offer scoped options (small/medium/large change)
3. Progressive Execution
For complex tasks:
- Break into stages
- Show preview of each stage
- User approves before continuing
4. Undo Infrastructure
For all modifications:
- Automatic snapshots before changes
- Clear rollback procedures
- Audit trail of all actions
5. Intent Confirmation
For high-risk actions:
- Show exactly what will happen
- Require explicit YES/NO
- Make user acknowledge risk
<div class="knowing-nod"> If this sounds like "slower" AI, you're right. But "slower and correct" beats "fast and catastrophically wrong" every time. We learned this with manufacturing (measure twice, cut once). We're relearning it with AI. </div>
The Business Case
"This sounds expensive. Why not just let AI execute and fix mistakes?"
Let me show you the math:
Scenario 1: Bulldozer AI (Fast, No Intent Verification)
Task: "Clean up the database."
Time to execute: 30 seconds
Time to realize it deleted production data: 5 minutes
Time to restore from backup: 2 hours
Time to verify data integrity: 4 hours
Customer impact: 2 hours downtime
Team impact: 3 engineers for 6 hours
Total cost: $10K+ (engineering time + customer goodwill + incident response)
Scenario 2: Intent-Aware AI (Slower, With Verification)
Task: "Clean up the database."
AI: "Clarify: Which data should I clean?
- Old test records (last 90 days)?
- Archived user data (inactive >1 year)?
- Temp tables (job artifacts)?
Confirm scope before proceeding."
Time to clarify: 1 minute
Time to execute: 30 seconds
Time to fix mistakes: 0 (no mistakes)
Customer impact: 0
Team impact: 1 minute
Total cost: $0.50 (1 minute of engineer time)
ROI of intent verification: 20,000x
<p class="subtle-callout"> Anyone who's lived through a "fast AI execution gone wrong" knows these numbers aren't exaggerated. One bulldozer mistake can cost weeks of cleanup. </p>
Conclusion: The Queen Matters
"If context is king, intent is queen."
You can give your AI perfect context—access to every file, every API, every system.
But if it doesn't understand what you actually want, it's just a very capable bulldozer.
<p class="aside"> And bulldozers don't care if they're demolishing a condemned building or your production database. They just do what they think you said. </p>
The industry has solved context. We have long context windows, RAG systems, persistent memory. We can give AI access to everything.
The industry hasn't solved intent. We have agents that execute confidently, ask questions rarely, and say "oops" frequently.
The winners won't be whoever builds the fastest AI agents.
They'll be whoever builds agents that pause, clarify, and align before they bulldoze.
Because the most powerful bulldozer in the world is useless if it's pointed the wrong direction.
And right now? Most AI agents are pointed the wrong direction—they're just moving really fast.
Appendix: The Intent Clarification Checklist
Before Executing Any Action:
Scope Questions:
- [ ] What's included in this action?
- [ ] What's explicitly excluded?
- [ ] How far should I go?
Constraint Questions:
- [ ] What must remain unchanged?
- [ ] What's off-limits?
- [ ] Are breaking changes acceptable?
Success Questions:
- [ ] What does "done" look like?
- [ ] How will you measure success?
- [ ] When should I stop?
Risk Questions:
- [ ] What would be "too far"?
- [ ] What failure modes are unacceptable?
- [ ] Is this action reversible?
For High-Risk Actions:
Required Confirmations:
- [ ] Show exactly what will be modified/deleted
- [ ] Explain why (intent interpretation)
- [ ] Present alternatives if available
- [ ] Require explicit YES/NO (not implicit)
- [ ] Provide undo mechanism
Progressive Execution Pattern:
1. Parse user request 2. Identify ambiguity / risk 3. Generate clarifying questions 4. Present options if multiple interpretations 5. Get explicit confirmation 6. Execute first stage 7. Show results, get approval 8. Continue or abort based on feedback 9. Log all actions for audit/undo
Key Takeaways:
- Context ≠ Intent (Access to everything ≠ Understanding what to do)
- AI = Bulldozers (Fast, powerful, and will demolish your house if misdirected)
- Intent clarification missing (No systematic frameworks for understanding what users actually want)
- "Oops" is expensive ($10K+ per bulldozer incident)
- Pause > Speed (Measure twice, cut once still applies)
- Clarification gate needed (Verify intent BEFORE execution, especially for high-risk)
- Progressive execution (Iterate, show results, get approval)
- Make it reversible (Undo mechanisms build trust)
If context is king, intent is queen.
And right now, we're building kingdoms with no queens.
Time to fix that.