When Code Is Free, How Engineers Stay Valuable – Simon’s Engineering Patterns
The guide reveals that while AI agents have reduced code generation costs to near zero, the true expense lies in ensuring quality, requiring engineers to shift from writing code to defining problems, designing agentic systems, and applying rigorous testing patterns such as red‑green TDD, context‑managed sub‑agents, and advanced Git workflows.
Zero Code Cost, Rising Cognitive Cost
Simon’s guide shows that coding agents such as Claude Code and OpenAI Codex have driven the monetary cost of generating code to near zero, yet the cost of delivering good code—working, well‑tested, maintainable software—remains high.
What Constitutes Good Code
Code works without bugs
Evidence that the code works
Solves the correct problem
Gracefully handles error cases
Minimal and simple implementation
Test protection against regressions
Appropriate documentation reflecting current state
Design that eases future modifications
With machines generating code effortlessly, engineers transition from “code writers” to “problem definers” and “quality guarantors”, emphasizing judgment, system thinking, and business understanding.
From Writing Code to Designing Code‑Generation Systems
The shift from traditional for‑loops to agentic loops is essentially a move from writing code to designing systems that can write code. Each agent requires its own system prompt and role—architects plan, critics ensure quality—otherwise the collective collapses due to context drift.
Agentic Engineering is not mere prompt engineering or orchestration; it is context‑flow design where every decision governs where, when, and how information moves.
Non‑Linear Exploration of Real‑World Problems
Hrishi’s “Antibrittle Agents” argues that solving real problems is a maze with multiple paths, dead ends, and loops, contradicting linear step‑by‑step approaches such as rigid TODO lists.
Concrete Engineering Patterns
Red‑Green TDD: The Strongest Guard Against Hallucination
Agents first write a failing test (red), then produce code to pass it (green), preventing hallucinated, non‑working code.
Run Tests First: Instilling Quality Awareness
Every new session begins with “run tests first”, signaling the presence of a test suite and enforcing discipline.
Agentic Manual Testing
Agents use tools like Playwright or Rodney for real browser automation; passing automated tests alone may still miss server crashes or UI gaps.
Sub‑Agents for Context Management
Because large language models are limited to roughly one million tokens, sub‑agents operate in fresh contexts, allowing parallel execution and preserving the main context.
Advanced Git Usage
Agents master Git’s advanced features—history rewriting, branch management—enabling more ambitious version‑control strategies.
From Magic to Science: The Composite Engineering Loop
The guide frames Agentic Engineering as a teachable discipline, introducing the “composite engineering loop” where each project ends with a retrospective that records effective methods for future agents, allowing quality improvement to accumulate.
Guide Structure
Principles – definitions, cost shift, knowledge reuse, AI‑driven quality, anti‑patterns.
Working with Coding Agents – mechanisms, Git integration, sub‑agents.
Testing and QA – red‑green TDD, run‑tests‑first, manual agent testing.
Understanding Code – linear walkthroughs, interactive explanations.
Annotated Prompts – example with WebAssembly and Gifsicle.
Appendix – useful prompt templates.
Practical Transformations
Examples include an OCR tool built by combining Tesseract.js and PDF.js in the browser, and a GIF optimizer where Claude Code compiled Gifsicle to WebAssembly from a single prompt, dramatically lowering development barriers.
Future Challenges and Opportunities
Long‑running tasks generate millions of tokens, making useful interruption points and human hand‑off increasingly difficult. Cognitive debt grows as agent‑written code becomes opaque, threatening future feature planning. Solutions involve interactive explanations and linear walkthroughs, exemplified by Simon’s animated word‑cloud visualizations.
Conclusion
Agentic Engineering marks a paradigm shift from hand‑coding to designing autonomous code‑generation systems, redefining engineers’ core value in problem definition, system design, quality judgment, and deep business insight.
Guide URL: https://simonwillison.net/guides/agentic-engineering-patterns/
AI Engineering
Focused on cutting‑edge product and technology information and practical experience sharing in the AI field (large models, MLOps/LLMOps, AI application development, AI infrastructure).
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
