Chapter 6: The Delegated Mind (Agent Mode) cover

Chapter 6: The Delegated Mind (Agent Mode)

AgentSpek - A Beginner's Companion to the AI Frontier

by Joshua Ayson

How I work in agent mode with Claude Code: a CLAUDE.md file as the specification, whole subsystems handed over, and AWS infrastructure built by describing what should exist.

Rich Hickey said design is about pulling things apart. Agent mode is where that principle becomes visceral.

Intent into Reality

There is a moment when you realize you are no longer programming computers. You are programming intelligence, and you do it by saying clearly what you want.

I watched Sonnet 4 in agent mode transform my specifications into AWS CDK infrastructure. The specification was just a markdown file describing what should exist. The implementation emerged like a photograph developing, each detail getting clearer.

We are expressing intent clearly enough that an intelligence can make it real. The bottleneck moves from how well we can implement to how well we can say what we want.

CLAUDE.md: Blog Infrastructure Automation

## Mission Objective
Create complete AWS CDK infrastructure for Astro blog with automated content processing.
Automate the entire pipeline from markdown to deployed site.

## Success Criteria
The infrastructure must handle static site hosting with global CDN distribution through CloudFront. Content processing pipeline needs to extract metadata from thousands of markdown files and populate Neo4j graph database. Image optimization requires automatic WebP conversion with multiple responsive sizes. Deployment automation needs single-command updates with rollback capability. Cost optimization is critical, staying within AWS free tier where possible.

## Constraints
The solution must use Python for all automation scripts, not TypeScript CDK. Prefer simple, explicit approaches over clever abstractions. AWS costs must be predictable and minimal. The system needs to handle both batch processing at build time and incremental updates for new content. Everything must be version controlled and reproducible.

## Agent Responsibilities
Infrastructure as code using AWS CDK in Python, defining all resources programmatically. Content processing pipeline with error handling and retry logic. Neo4j integration for content relationship mapping. Build optimization to minimize deployment time. Documentation that explains not just how but why each decision was made.

## Human Oversight Points
Architecture review of AWS service choices and cost implications. Content processing logic validation for edge cases. Graph database schema design for future extensibility. Deployment strategy approval for production readiness.

The code that comes out is often better than what we would have written ourselves. The AI does not have our habits or our blind spots, and it does not reach for a pattern because it is familiar. Lambda functions come with error handling we did not specify and definitely need. Neo4j queries use graph patterns we had not seen before. The infrastructure has optimizations we would not have thought of.

Something shifted. I had moved from implementing solutions to specifying outcomes, from writing code to writing minds.

Fred Brooks distinguished between essential and accidental complexity in “No Silver Bullet,” the 1986 essay later collected in “The Mythical Man-Month.” Essential complexity is inherent to the problem. Accidental complexity comes from our tools, our languages, our implementations. Agent mode absorbs the accidental complexity. The API calls, the error handling, the retry logic, the boilerplate. We are left with the essential. What should exist? Why should it exist? How do we know if it is working?

AI can clearly write code. The question is whether we can say what code should be written.

Living Specifications

A new kind of artifact is showing up in software development, something between code and documentation. A specification a human can read and a machine can execute. An intention that turns into an implementation.

The CLAUDE.md file is a living specification that shapes how the agent understands and carries out what you want. The DNA of the project, what should be built and the principles for building it. Traditional programming starts with implementation details and hopes they add up to the intended outcome. This starts with the outcome and lets the implementation emerge.

Clear Intent

Military strategists have long understood what software developers are just discovering. The clearer your intent, the less you need to control the execution. Precise constraints make the solutions more creative.

“Mission command” in military doctrine defines clear outcomes and constraints, then trusts intelligent execution. The same principle applies to AI delegation. How do you convey context to something that can hold a whole codebase in view but has no experience? How do you express constraints to something that can consider millions of possibilities but might miss the one human factor you forgot to mention?

Better structured intent, rather than more detailed instructions:

## User Dashboard Specification

### Mission
Create a personalized dashboard that reduces user time-to-insight by 70% while maintaining security compliance.

### Success Metrics
- Key actions accessible within 2 clicks
- Page load time under 300ms
- Mobile responsiveness on devices >=320px width
- WCAG 2.1 AA accessibility compliance
- Zero stored credentials in browser storage

### Functional Requirements
1. **Activity Overview**: Recent actions, pending tasks, system notifications
2. **Quick Actions**: Primary workflows accessible without navigation
3. **Performance Metrics**: Role-appropriate KPIs with drill-down capability
4. **Customization**: Layout and widget configuration persistence

### Technical Constraints
- React 18+ with TypeScript
- State management via Zustand
- Authentication via existing AuthContext
- API calls through centralized service layer
- Design system: existing component library

### Quality Gates
- Unit test coverage >=85%
- Integration tests for all API interactions
- E2E tests for critical user paths
- Performance budgets for all page loads
- Security scan with zero high-severity findings

Constrained Creativity

Constraints feed creativity. Jazz musicians know this, and poets working in sonnets. AI agents know it too.

Tell an AI to “make it fast” and you get generic optimizations. Specify “page load under 300ms with 1000 concurrent users on 3G networks” and you get innovative solutions. The constraints define the solution space, and inside it the AI explores possibilities you never imagined.

The haiku’s five-seven-five. The blues’ twelve bars. The startup’s limited runway.

Delegation Patterns

Different problems want different kinds of delegation.

Assembly. Some problems are well-defined but tedious. Requirements clear, patterns established. The creativity is in doing it well. When I delegate my blog’s content pipeline, I am asking the AI to assemble proven patterns into a coherent whole. Python scripts that talk to each other. AWS CDK that defines the infrastructure. Neo4j queries that map the relationships. Whatever is new is in how these pieces fit together and how errors cascade. What are the inputs and outputs? What happens between them? What constraints hold? What defines success?

Exploration. Some problems are not well-defined. You know the destination but not the path. When I needed to understand how to model content relationships in Neo4j, I was asking it to explore a possibility space. What patterns exist? What trade-offs matter? What have others done? The AI becomes a research partner, prototyping fast, going down paths you do not have time for. It can hold several hypotheses at once and try them in parallel. While you go deep on one approach, it goes shallow on ten and tells you which deserve the dive.

Integration. Systems rarely live alone. They have to connect and talk to each other. When connecting an Astro blog to AWS services and Neo4j, no single service is the hard part. S3 is straightforward. CloudFront is well documented. Lambda functions are simple. The complexity is in how they interact. How do builds trigger deployments? How do failures cascade, or get contained? AI is good here because it can hold the whole topology in mind at once. While you focus on one integration point, it sees all the connections, all the data flows, the race conditions waiting.

Optimization. A different thing from creation. Measure before you change anything. When optimizing a build pipeline, the work is understanding where the time goes. Image processing? Markdown compilation? Network transfers? Database queries? AI can look at several levels at once. While you focus on speeding up image processing, it considers the whole pipeline. Maybe images should not be processed at build time at all. Maybe they should be processed once and cached forever. Maybe the real optimization is in the architecture. Optimizing usually turns out to mean making things simpler.

When Delegation Diverges

AI agents do not fail the way humans do. They do not get tired or distracted. They fail in their own way, with perfect logic toward an imperfect end, optimizing precisely for a metric that misses the point, solving the wrong problem correctly.

The literal interpretation problem. AI takes you at your word, even when your words do not capture your intent. You ask for “user-friendly error messages” and get verbose explanations that leak system internals. You request “performance optimization” and get microsecond improvements that make the code unmaintainable. The AI understood exactly what you said and not what you meant. The gap between specification and intention says something about communication itself. We carry huge amounts of implicit context. The AI has only what we gave it. More detailed specifications do not close the gap. Refining as you go does, and checking often, and accepting that perfect delegation is impossible because perfect communication is impossible.

Context as prison. Context accumulates like sediment in a river. Early assumptions become buried foundations for later decisions. Initial constraints shape solutions long after they have been relaxed. The AI remembers everything but does not know what to forget. Working on a Python ETL pipeline for my blog, I watched Sonnet 4 gradually drift from my actual needs. It started optimizing for batch processing efficiency when I had moved to thinking about real-time updates. Building the perfect solution for the problem I described an hour ago instead of the one I understood now. Say when the context moves. When a requirement shifts, say so. When a constraint changes, write it down. The AI needs checkpoints where you check that its understanding still matches yours.

Single metric seduction. AI optimizes brilliantly for what you measure and blindly ignores what you do not. Tell it to minimize build time and it will cache everything, even things that should not be cached. Tell it to maximize cache hits and it will never invalidate, serving stale content forever. When optimizing my blog’s CloudFront distribution, I asked for “maximum cache efficiency.” Cache hit rates were phenomenal. User experience was terrible. The specification becomes less about targets and more about boundaries. “Make this faster while preserving these qualities,” in place of “make this as fast as possible.”

The enthusiasm problem. AI agents are enthusiastic. Devastatingly enthusiastic. Ask for a simple content tagging system and they will design a complete knowledge graph. Request basic image optimization and they will build a multi-resolution CDN-backed image pipeline. When I asked for help organizing my blog’s content categories, Sonnet 4 designed a complete taxonomy with hierarchical categories, tag relationships, semantic clustering, and ML-powered recommendations. Technically impressive, and not what I needed. The fix is explicit boundaries, what to build and what not to build, the scope and the anti-scope. With AI the negative space matters as much as the positive.

Every failed delegation teaches something about the gap between what you meant and what the machine did with it. When delegation goes wrong, the question I ask is “What did I fail to communicate?” rather than “What did the AI do wrong?” These failures show the hidden assumptions in our thinking, the constraints we take for granted, the context we assume is shared.

Complete Delegation

There is a moment when you realize you have not written code in days, and not from planning or meetings. You have been delegating entire systems to AI agents while you focus on what those systems should do.

Every line of code you do not write is attention you can put into understanding the problem. Every detail you delegate is room in your head for the architecture.

When I needed the complete AWS infrastructure for my blog, I wrote specifications instead of CloudFormation templates. When the content processing pipeline needed optimization, I described outcomes instead of implementing algorithms. When Neo4j relationships needed mapping, I specified patterns instead of writing Cypher queries.

You become an architect of intent. Your value is in knowing what code should exist and why.

Delegation is transferring understanding, what needs to be done, why, what constraints shape it, what success looks like. Features are the surface. Purpose and values are underneath, and that is where the AI needs help. Features it can build easily.

We are learning to program at the level of intent.

Sources and Further Reading

The concept of delegation as a transformation from implementation to specification draws from management theory, particularly Peter Drucker’s work on knowledge work and the evolution from manual to intellectual labor.

The discussion of clear specification echoes the NATO Software Engineering Conference (1968), the meeting that gave the discipline its name and put the trouble of specifying large systems on the table.

Douglas Engelbart’s “Augmenting Human Intellect” (1962) provides the foundational vision for using computers to amplify human thinking through delegation and collaboration, a vision that AI agents are beginning to realize.

The architectural thinking principles build on classic works including Christopher Alexander’s “A Pattern Language” for understanding how complex systems can be specified through clear patterns and relationships, and Fred Brooks’ “No Silver Bullet” (collected in the anniversary edition of “The Mythical Man-Month”) for the distinction between essential and accidental complexity in system design.

For readers interested in the technical implementation of AI agents, the current documentation for Claude Code and for the agent modes in the mainstream chat tools provides practical guidance, though the field is evolving rapidly as agent capabilities improve.


Next: Chapter 7: The Unleashed Intelligence (Autonomous Mode)

← Back to AgentSpek


© 2025 Joshua Ayson. All rights reserved. Published by Organic Arts LLC.

This chapter is part of AgentSpek: A Beginner’s Companion to the AI Frontier. All content is protected by copyright. Unauthorized reproduction or distribution is prohibited.