AI guide
# The Context Engineering Handbook
### Drew Breunig (Editor)
---
【One-Line Pitch】
A practical field guide to the emerging discipline of context engineering—the art and science of structuring information for AI systems—showing how to move beyond prompt hacks toward reliable, maintainable LLM applications. Essential reading for AI engineers, technical leads, and anyone building production-grade agentic systems.
---
【Book Arc】
- **Opening (~0%–9%)**: Establishes the book's thesis—that reliable AI systems require an engineering mindset, not just clever prompting—and introduces the roadmap from prompt engineering to context engineering, with a brief table of contents mapping the full journey from failure modes to fixes to case studies.
- **Early (~9%–25%)**: Delivers a historical tour of prompt engineering's evolution, from GPT-3's 2020 debut and the coining of the term, through the image generation era (DALL-E 2, Midjourney, Stable Diffusion) that brought prompting mainstream, to the ChatGPT explosion that crossed the consumer chasm and ignited enterprise adoption.
- **Early (~25%–34%)**: Covers the competitive AI landscape of 2022–2023—Google's "code red," Anthropic's Claude launch, the context window arms race (8k to 100k tokens)—and the rise of the early agent era with ReAct patterns, function calling, and orchestration frameworks like LangChain.
- **Middle (~34%–47%)**: Explores the shift from prompt engineering to AI engineering, introducing DSPy's "programming, not prompting" paradigm, the vibe coding era, and the formal birth of context engineering in March 2025—alongside concepts like context rot and the management principles needed for coordinating fleets of agents.
- **Middle (~47%–53%)**: Examines the agentic future: skills as SOPs, MCPs as tool access layers, spec-driven development, and the "Ralph Wiggum" technique for autonomous coding agents—while questioning whether these harnesses will eventually fall away as models improve.
---
【Key Takeaways】
- **Context engineering is the successor to prompt engineering** (Early): As models moved from single-turn completions to long-running agents, the bottleneck shifted from writing prompts to curating what information flows into the model at any moment. Too much context confuses; too little starves the task.
- **The history of prompting mirrors management principles** (Early): Mike Taylor's observation that managing neural networks parallels managing biological intelligence—clear instructions, curated examples, and formal evaluation methods—provides a mental model that persists throughout the book.
- **Reliability, not capability, is the persistent problem** (Early): From GPT-3 to GPT-4, each model improvement simply enabled more ambitious tasks, which meant reliability issues never disappeared—they just moved to a higher level of complexity.
- **Context windows created a false sense of "RAG is dead"** (Early): When Anthropic launched a 100k context window, many declared retrieval dead—but the book shows this was premature, as long-context failures like context rot soon emerged.
- **Writing the prompt was never the hard part** (Middle): DSPy's insight—that defining inputs, outputs, and evaluation metrics matters more than the prompt string itself—parallels the engineering adage that building a bridge is easier than designing it.
- **Agent management requires managerial surfaces** (Middle): As humans step back from direct prompting, they must adopt traditional management tools: SOPs become "skills," culture docs become agents.md files, and tool access becomes MCPs—the infrastructure of the agentic workplace.
- **Simple loops can outperform complex harnesses** (Middle): The "Ralph Wiggum" technique—a bash script piping a prompt file into a coding agent with git commits and todo lists—demonstrates that smarter models enable naive persistence to work surprisingly well.
- **The economics of intelligence are deflationary** (Middle): With LLM inference costs dropping 9x–900x annually, frontier capability becomes "too cheap to meter"—but Jevon's paradox suggests we'll simply demand more, not less, from AI systems.
---
【Reading Tips】
- **Skim Chapter 1's history if you're already experienced** (Early): The 2018–2023 timeline is engaging but familiar territory for practitioners. Focus instead on the management-principles framing and the transition to agentic workflows.
- **Deep-read the context engineering paradigm sections** (Middle ~38%–47%): This is the conceptual core—where the book defines the discipline, explains context rot, and introduces the managerial surfaces (skills, MCPs, agents.md) that will structure your work.
- **Pay attention to the failure taxonomy** (Middle): The book's structure (Part II: How Contexts Fail) suggests a systematic approach to diagnosing problems—context poisoning, rot, confusion, and "fighting the weights" are distinct failure modes requiring different fixes.
- **Note what's unavailable in this early release** (Throughout): Many chapters (Data Retrieval, Context Summarization, Security, Case Studies) are marked unavailable. The available material is strongest on history and paradigm, thinner on hands-on techniques.
- **Take away the mental models, not the specific tools** (Ending): Tools like DSPy, LangChain, and OpenClaw will evolve, but the underlying principles—defining inputs/outputs, formalizing evaluation, treating prompts as black boxes—will remain relevant.
---
【Coverage Limits】
This guide covers the available early-release material: the historical narrative (Chapters 1–2) and the context engineering paradigm discussion. The practical "how to fix" chapters (retrieval, summarization, pruning, security) and most case studies were unavailable in the source excerpts and are not covered here.
---
Passage locations
Excerpt 1
ver Designer: Susan Brown Cover Illustrator: José Marzan Jr. Interior Designer: David Futato Interior Illustrator: Kate Dullea June 2027: First Edition Revis...
View in text
Excerpt 2
test growing open-source projects in history ( Figure 1-2 ). People were astounded that you could get comparable results to DALL-E 2, running for free on you...
View in text
Excerpt 3
more transferable code across models and workflow patterns. Despite predictions that prompt engineering was going away as models got smarter and context wind...
View in text
Excerpt 4
se to optimize that workflow and make it more deterministic. If it’s going to be done many more times than that, formalize it further into code and make it i...
View in text