JOUNES // BOOKS
Home  ·  Books  ·  Essays
// FIELD GUIDE · AI ENGINEERING

Context Engineering Field Guide

A practitioner's manual for engineers shipping with AI agents.

141 pages. · 12 chapters + 5 worksheets + glossary. · Free.
// DOWNLOAD
Download the full 141-page PDF (free)
12 chapters + 5 worksheets + glossary

Most AI agent sessions don't fail because the model is bad. They fail because the context window is a mess: stale instructions competing with fresh ones, intermediate reasoning from three tasks ago still consuming budget, tool outputs no one needed after the first read. The model sees everything loaded into it and does its best. The problem is what you loaded.

This field guide names four failure modes that kill real production sessions: context rot (accumulated noise that degrades output quality without obvious errors), instruction drift (rules that worked at session start no longer matching behavior at turn 40), token bloat (budget consumed by content that stopped being load-bearing), and agent loop thrashing (the agent cycling through failed approaches without recognizing the repetition). Each has a named chapter and a repair procedure.

The guide is organized around five disciplines that together form a harness model for context management: Generate (what the agent always knows, from CLAUDE.md to hook-loaded rules), Retrieve (pulling the right context at the right moment, not everything always), Compress (shrinking what's already loaded without losing what matters), Route (matching instructions to context rather than broadcasting all rules to all tasks), and Evict (clearing what the session no longer needs). The five disciplines are not independent. They compose into a harness: a system that keeps the context window accurate, minimal, and current across the full arc of a session.

Worked examples throughout: a CLAUDE.md refactor that cut instruction noise by 60%, a retrieval pipeline that routes summaries and raw spans to the right agent tier, a subagent dispatch pattern that keeps the orchestrator context small, an on-disk hook that enforces dispatch discipline without relying on the model's memory, and a scored eval framework that measures context quality with numbers instead of intuition. Every pattern is deployable without a framework change.

contents

// DOWNLOAD
Download the full 141-page PDF (free)
12 chapters + 5 worksheets + glossary

Theoretical grounding: Context as Cognitive Substrate

// FIELD GUIDE · PUBLISHED 2026-05-27 · FREE · NO TRACKING
← back to books