Practitioner Reference · Updated 2026-01-15

The Agentic Practitioner Playbook

The practitioner reference for context engineering, prompting, Claude Code, routines, and production agents — designing what enters working memory, in what structure, at what time. Content reflects 2026 standards: context rot, MCP, ACE, PEEM evaluation.

Download book: Markdown PDF EPUB

Curriculum

Course Curriculum

Seven modules mapping to 2026 context engineering standards. Each module includes hands-on exercises, eval checkpoints, and production patterns. Total estimated time: ~6–8 hours.

01

Tokenization Fundamentals

~45 min

How models actually process text — subword tokenization, token budgets, and why token count ≠ semantic density. Includes Budget Auditor hands-on.

  • Subword tokenization mechanics (BPE, WordPiece)
  • Token budgets as hard constraints
  • Semantic density vs token count
02

Context Window Architecture

~60 min

The 5-layer stratified context system — System, Task, Tool, Memory, Routing layers. Injection ordering, primacy/recency effects, and middle-zone degradation.

  • 5-layer stratified context model
  • Injection ordering & primacy/recency bias
  • Lost-in-the-middle & context rot
03

Context Rot & Mitigation

~60 min

Chroma's 2025 research on context rot — every frontier model degrades measurably as input grows. Distractor interference, shuffled haystack finding, and the four mitigation strategies.

  • Context rot: Chroma 2025 findings (18 models tested)
  • Distractor interference with semantically similar content
  • Shuffled haystack: counterintuitive improvement
  • Four strategies: write, select, compress, isolate
04

Four Context Engineering Strategies

~75 min

Write (persist state outside window), Select (retrieve only relevant), Compress (summarize/trim), Isolate (sub-agents with scoped context). Hands-on with Budget Auditor and Agent Wizard.

  • Write: external state persistence
  • Select: retrieval with relevance thresholds
  • Compress: summarization & semantic patterns
  • Isolate: sub-agent context boundaries
06

RAG Optimization & Corrective Retrieval

~60 min

Hybrid retrieval, corrective RAG triggers, context poisoning detection, progressive disclosure. Moving beyond naive vector search to production-grade retrieval.

  • Hybrid retrieval: vector + temporal + importance
  • Corrective RAG: re-retrieval on low relevance
  • Context poisoning detection layer
  • Progressive disclosure: metadata → details → deep dive
07

Evaluation Frameworks (PEEM)

~60 min

PEEM (Prompt Engineering Evaluation Metrics) — 2026 nine-axis rubric. Two-layer metric framework: structural metrics (pre-run) and output metrics (post-run). Hill-climbing loop with eval-driven architecture fixes.

  • PEEM nine-axis: clarity, structure, fairness, accuracy, coherence, relevance, objectivity, clarity, conciseness
  • Two-layer framework: structural (pre) + output (post)
  • Hill-climbing: diagnose by theme, one architectural fix, re-run
  • Regression (R) vs Failure-mode (F) evals

Free Preview: Module 03 — Context Rot & Mitigation

Experience the teaching style and technical depth before committing. This module covers Chroma's 2025 research that tested 18 frontier models and found universal degradation as context grows — the phenomenon now called context rot.

No email required. Full module content available inline below.

Section 01

Foundations

Before building agents, understand when they're appropriate — and architect the cognitive environment your agent needs to reason correctly.

Take it with you. Download the complete playbook (~2,000 lines) as Markdown, PDF, or EPUB for offline reading, search, or your own repo. Mermaid diagrams render best in the web and Markdown versions.

Markdown (.md) PDF EPUB

Barry's Evolution Ladder

Don't jump to agents. Climb the ladder: ship features (single model calls), orchestrate workflows (mapped control flows), then deploy agents only when complexity and value justify autonomy.

Features

Summarize, classify, extract — one shot, fixed flow.

Workflows

Multiple models in a predefined decision tree. Cheaper, more control.

Agents

Model + tools in a loop. Decides its own trajectory from environment feedback.

Source: Barry, Building Effective Agents — AI Engineer Summit

The 3-Component Model

Strip an agent to its core: a model calling tools in a loop. Every complexity on top costs iteration speed and eventually performance.

Environment

The system the agent operates in — repos, APIs, file systems, product surfaces.

Tools

Interface for action and feedback. Lean into primitives: code execution, files, web search.

System Prompt

Goals, constraints, ideal behavior — what the agent always needs regardless of task.

Source: Barry 3-component model; anthropic_ultimate_guide.md Part II

The 4-Factor Checklist

Run this before building an agent. All four factors determine fit — and all four kill projects when ignored. Try the Agent Suitability Wizard →

Factor 01

Complexity

Agents thrive in ambiguous problem spaces. If you can map the full decision tree easily, build it explicitly and optimize every node.

Factor 02

Value

Exploration costs tokens. A $0.10/task budget affords 30–50 tokens — use a workflow. If ROI justifies spend, agents earn their cost.

Factor 03

Bottlenecks

Derisk critical capabilities first. A coding agent needs write, debug, and recover. Bottlenecks multiply cost and latency — reduce scope.

Factor 04

Cost of Error

High-stakes, hard-to-discover errors limit autonomy. Mitigate with read-only access or human-in-the-loop — but that caps scale.

Source: Barry 4-factor checklist transcript; anthropic_ultimate_guide.md

What Is Context Engineering

Every failure in an agentic system can be traced to one of four context failures: ambiguity — the model lacks clear constraints and generates conflicting outputs; distractor interference — irrelevant context overwhelms relevant signal; context rot — measurable, reproducible degradation as input length grows; and attention dilution — excessive context length spreads attention thin, reducing accuracy on any single component.

Context Rot — Chroma 2025 Research

Context rot is the term now used to describe the universal phenomenon that all frontier models degrade measurably as input length grows. Chroma's 2025 research tested 18 frontier models and found every one performs worse on simple tasks when given longer inputs — even when the information needed is clearly present.

Two specific findings from the research:

  • Distractor interference: Models perform significantly worse when semantically similar "distractor" content is present in context — even when it has no bearing on the task.
  • Shuffled haystack finding: Counterintuitively, shuffling the order of context sometimes improves performance — suggesting models rely on positional heuristics in addition to content relevance.

Source: Chroma Research, "Context Rot in Production LLMs" — 2025 study, 18 frontier models tested

The 5-Layer Stratified Context System

Production agentic systems decompose context into five layers, each with distinct persistence, retrieval, and eviction policies. Click each layer to expand.

1 System Layer Pinned
2 Task Layer Per-invocation
3 Tool Layer JIT-loaded
4 Memory Layer Compressed
5 Routing Layer Classifier

Identity, constraints, scope. The system layer defines who the agent is, what it can and cannot do, and the domain boundaries it must respect. This layer is pinned — it is never evicted and always occupies the first tokens of the context window.

Production rule: Keep under 400 tokens. Include only non-negotiable constraints. Anything optional belongs in a lower layer.

Directive, output schema, success criterion. The task layer specifies what the agent must accomplish right now. It includes the primary directive (what to do), the output format specification (schema, constraints), and the success criterion (how to know it is done).

Production rule: One task per invocation. If a task has multiple sub-tasks, use sub-agents with fresh context, not a single long prompt.

Index-only JIT loading, retrieval thresholds. The tool layer contains indices of available tools — their names, descriptions, and input schemas. Full tool documentation is loaded just-in-time only when the router classifies a task as requiring that tool.

Production rule: Maintain a relevance threshold (typically 0.75–0.85). Only load tool documentation whose semantic similarity to the task exceeds this threshold. This prevents tool bloat from consuming context budget.

Compressed episodes + Playbook patterns. The memory layer stores what the agent has learned from past interactions. Raw transcripts are never stored verbatim — they are compressed into semantic patterns via a compression layer.

Production rule: Episodic memory decays with a half-life based on recency and importance. Semantic patterns from the Playbook are pinned. Memory retrieval uses hybrid search: vector similarity + temporal decay + importance weighting.

Semantic classification, agent dispatch. The routing layer is not content — it is a decision boundary. A classifier reads the user query and determines which agent profile, tool set, and memory subset to load. It is the gatekeeper that prevents irrelevant context from entering working memory.

Production rule: Two-pass routing is preferred: first classify the domain, then classify the task within that domain. This hierarchical routing reduces classification error rates by 40–60% compared to flat routing (source: Anthropic multi-agent systems research, 90.2% accuracy improvement via context isolation).

0%

Accuracy improvement via sub-agent context isolation

Anthropic multi-agent systems research

Section 02

Context Engineering

Govern what enters the context window, in what order, at what compression ratio. Context engineering is upstream of prompt engineering.

Token Budget Allocation

Allocate budget before writing prompts. Exceeding it causes silent truncation — the worst failure mode. Run the Budget Auditor →

System + skills
≤10%
Task + few-shot
≤15%
Retrieved docs
≤40%
Working state
≤20%
Output buffer
≤15%

Source: Context Engineering skill — budget allocation phase

Injection Order

Ordering is mechanistic, not cosmetic. Exploit primacy bias, recency bias, and lost-in-the-middle degradation.

Primacy System role + hard constraints
Early Task definition + few-shot examples
Middle Background / supporting documents
Recency Most relevant retrieved documents
Late Compressed conversation history
Final Current user input

Context Poisoning: Retrieved documents can contain injected instructions that hijack model behavior. Always run a poisoning detection layer on retrieved content before injection. Never trust vector search results blindly.

Source: Context Engineering skill — Phase 0 audit checklist

The 8 Core Patterns

Each pattern addresses a specific failure mode in agentic context management.

Pattern 01

Layered Context Architecture

What it solves: Context rot and attention dilution caused by dumping all information into a flat prompt.

How to implement: Structure every prompt into the 5-Layer Stratified Context System. System and Task layers are always present. Tool, Memory, and Routing layers are loaded dynamically based on relevance scores.

Anti-pattern: A 3000-token monolithic prompt that mixes identity instructions, task descriptions, tool documentation, and past conversation history in arbitrary order.

Pattern 02

Just-in-Time Loading

What it solves: Tool bloat — when including 20 tool descriptions consumes 60% of the context window before any reasoning begins.

How to implement: Maintain an index (name + 2-line description) of all tools. Load full tool schemas only when the routing layer classifies the task as requiring that tool, and only if the semantic similarity score exceeds the retrieval threshold (0.75–0.85).

Anti-pattern: Including full OpenAPI schemas for every available tool in every request, regardless of relevance.

Pattern 03

Context Isolation via Sub-Agents

What it solves: Cross-contamination — when one task's context leaks into another, causing the agent to hallucinate constraints or apply rules from the wrong domain.

How to implement: Spawn a fresh sub-agent for each distinct sub-task. Pass only the relevant context subset. Never inherit the parent's full working memory. Anthropic's research demonstrates a 90.2% accuracy improvement on complex tasks when using isolated sub-agent contexts versus monolithic single-agent approaches.

Anti-pattern: Appending sub-task instructions to the same conversation thread, allowing the model to conflate unrelated constraints.

Pattern 04

Semantic Routing

What it solves: Wrong-agent dispatch — sending a coding task to a marketing-writing agent because the routing is keyword-based.

How to implement: Two-pass routing: (1) an embedding-based classifier maps the query to a domain vector, (2) a secondary classifier within that domain selects the specific agent profile and tool set. Use cosine similarity with domain centroids trained on historical task distributions.

Anti-pattern: Regex-based routing ("if query contains 'code' then send to coding agent") that fails on polysemous queries.

Pattern 05

ACE Loop

What it solves: Static prompts that never improve — the same failure modes recur because the agent never learns from its mistakes.

How to implement: Generator produces output. Reflector evaluates against the success criterion and identifies gaps. Curator updates the Playbook with new patterns, anti-patterns, and retrieval heuristics. The updated Playbook feeds back into the Generator on the next iteration.

Anti-pattern: Manual prompt tweaking after each failure — humans become the bottleneck and institutional knowledge never accumulates.

Pattern 06

Progressive Disclosure

What it solves: Overwhelming the agent with too much detail upfront, causing it to fixate on secondary concerns.

How to implement: Three-layer disclosure: (1) Metadata — what exists, without details; (2) Details — full content for items flagged as relevant; (3) Deep dive — recursive expansion only when the agent explicitly requests more information. This mirrors human information-foraging behavior.

Anti-pattern: Dumping entire document corpora into the context window and expecting the agent to self-select relevant passages.

Pattern 07

Corrective RAG Triggers

What it solves: Stale or irrelevant retrieved context that the agent assumes is correct and builds upon.

How to implement: After initial retrieval, score each chunk for relevance to the query. If the top-k average relevance falls below the threshold (typically 0.70), trigger re-retrieval with relaxed constraints or alternative query formulations. If still below threshold, flag for human review instead of hallucinating.

Anti-pattern: Blind trust in vector search results — assuming the top-5 chunks are always relevant because the embedding model says so.

Pattern 08

Memory Compression

What it solves: Linear growth of context size as conversation history accumulates, eventually exceeding the window and causing truncation.

How to implement: Raw transcripts are never stored. A compression layer converts each interaction into semantic patterns: "When user asks about X, always check Y first." Patterns are stored in a structured Playbook with retrieval heuristics. Episodic memories decay by half-life.

Anti-pattern: Appending every message to a growing conversation thread and truncating from the middle when the limit is reached.

The Four Core Context Engineering Strategies

In 2026, these four strategies are the standard taxonomy for mitigating context rot and managing context at scale. Every production system should explicitly choose which strategies to apply and where.

Strategy 01

Write

Persist state outside the context window. When the agent needs to remember something across turns or sessions, write it to external storage (files, databases, vector stores) rather than keeping it in the context window.

When to use: Long-running sessions, multi-step tasks, anything that must survive context-window eviction. The Playbook pattern. CLAUDE.md persistence.

Production signal: If your context window grows linearly with session length, you need Write.

Strategy 02

Select

Retrieve only what's relevant. Pull the smallest relevant subset of available information into context, scored by semantic similarity against the current task. Filter aggressively.

When to use: Large knowledge bases, multi-document corpora, any retrieval-augmented scenario. The Tool Layer JIT loading pattern.

Production signal: If your retrieval returns more than the model needs, you need Select with a tighter threshold.

Strategy 03

Compress

Summarize and trim. Reduce long content to its semantic essence before injection. Replace transcripts with patterns. Replace verbose instructions with concise rules. Replace repeated information with pointers.

When to use: Conversation history, episodic memory, retrieved chunks that exceed need, system prompts over 400 tokens. The Memory Layer compression pattern.

Production signal: If your context contains repetition or verbose explanations, you need Compress.

Strategy 04

Isolate

Sub-agents with scoped context. Split work across sub-agents, each with a fresh, narrowly-scoped context window. Prevent cross-contamination and let parallel work proceed without interference.

When to use: Multi-domain tasks, parallelizable work, anything that benefits from context isolation. The Sub-Agent pattern.

Production signal: If your single agent's context mixes concerns, you need Isolate.

Source: 2026 standard context engineering taxonomy — write, select, compress, isolate

Section 03

Model Context Protocol (MCP)

By early 2026, MCP has crossed 97 million downloads and become the de facto standard for connecting agents to tools, databases, and APIs. Open-sourced by Anthropic in November 2024, it defines a unified protocol for agent-to-tool communication.

0M+

MCP downloads by early 2026

De facto tool-integration standard

0 yrs

From open-source (Nov 2024) to industry standard

Anthropic-released, multi-vendor adoption

MCP Scope: What It Is (and Is Not)

A common mistake is conflating MCP with other emerging protocols. MCP handles exactly one thing: agent-to-tool communication.

ProtocolScopeWhat It Handles
MCPAgent ↔ ToolConnecting an agent to external tools, databases, APIs. Single agent calling a single tool at a time.
A2AAgent ↔ AgentAgent-to-agent delegation, peer messaging, handoff protocols between distinct agents.
UCPAgent ↔ TransactionUniversal Commerce Protocol — payments, transactions, and commerce flows involving agents.

Boundary discipline: If you're using MCP, do not expect it to handle agent-to-agent negotiation. If you're using A2A, do not expect it to call external tools. Each protocol has a sharply defined scope.

When to Use MCP vs Skills vs Native Tools

DimensionMCP ServersSkillsNative Tools
PurposeWrap external systems (GitHub, Slack, DBs) as callable toolsPackage composable knowledge/procedures for on-demand loadBuilt-in capabilities (file edit, bash, web search)
LoadedTool schemas at session start or JIT by relevanceRetrieved when model determines task needs themAlways available
Configmcp.json in repo — team inherits same serversSkill files in .agents/skills/ or project pathsBuilt into harness/runtime
Best forActions: deploy, query, notify, browse external systemsKnowledge: domain expertise, formatting, audit protocolsGeneric primitives: code, files, search

Source: Boris Claude Code workshop; Daisy Holman harness talk; MCP specification 2026

Production rule: Maintain a relevance threshold (0.75–0.85) for JIT tool loading via MCP. Even though MCP servers are pre-registered, only load full tool schemas when the routing layer classifies the task as requiring that tool. Do not flood the context window with all available tool definitions.

Section 04

Prompting 101

Prompt engineering is iterative empirical science: test, observe failure modes, bake missing context back in, repeat. Build a structured prompt →

The 10-Point Structure

  1. Task context — Role and purpose. Who is Claude and what is it doing?
  2. Tone context — Factual, cautious, confident. When to admit uncertainty.
  3. Background / static content — Unchanging schemas, forms, reference docs. Cache in system prompt.
  4. Dynamic content — Per-query inputs: images, user data, retrieved chunks.
  5. Step-by-step instructions — Explicit reasoning order. Order matters significantly.
  6. Examples (few-shot) — Hard cases with ideal input/output pairs.
  7. Conversation history — Prior turns when multi-turn context is needed.
  8. Task reminder — Restate what Claude is doing right now.
  9. Critical guardrails — Anti-hallucination rules, confidence thresholds.
  10. Output format — XML tags, JSON schema, or pre-filled assistant turn.

Source: Hannah & Christian, Prompting 101 — Anthropic Applied AI

Skiing → Car Accident: Before / After

A minimal prompt caused Claude to misread a Swedish car crash as a skiing accident. Layering task context, form schema, and step-wise instructions fixed it.

Prompt: Review this accident report and determine who is at fault.

Result: Claude interprets the scene as a skiing accident on Shoppangatan — plausible guess without domain context.

Source: Prompting 101 workshop — car accident demo

Section 05

Agent Architecture

An agent is a model calling tools in a loop. Environment + tools + system prompt — keep it simple, then optimize.

Stock Pilot: Architecture Decay

Inventory agent Stock Pilot started targeted and working. Business requirements arrived — forecast subagent bolted on, report writer added, system prompt grew to 400 lines, 12 tools (3 wrapping subagents). Evals dropped from 83% → 62%. Not a model failure — an architecture failure.

  • F1: Right answer, winding inefficient path (turn count failure)
  • F2: Subagent correct, orchestrator misreads output (communication breakdown)
  • R8: Contradictory policies in long system prompt → wrong multiplier (3.1× vs 1.35×)

Source: Will, Agent Decomposition Workshop — Stock Pilot

Tool / Skill / Subagent Matrix

PrimitiveUse WhenAvoid When
ToolSpecific external action or authenticated API call that generic primitives cannot doYou could accomplish it with bash + file system + code execution
SkillDomain procedure needed sometimes — formatting rules, policies, specialized knowledgeInformation needed on every task (belongs in system prompt or CLAUDE.md)
SubagentParallelizable work needing isolation + explicit handoff contractTask is small, or coordination overhead exceeds benefit

MCP vs Skills

DimensionMCP ServersSkills
PurposeWrap external systems as callable tools (GitHub, Slack, DBs)Package composable knowledge/procedures for on-demand context load
LoadedTool schemas at session start or JIT by relevanceRetrieved when model determines task needs them
Configmcp.json in repo — team inherits same serversSkill files in .agents/skills/ or project paths
Best forActions: deploy, query, notify, browseKnowledge: domain expertise, formatting, audit protocols

Source: Boris Claude Code workshop; Daisy Holman harness talk

Section 06

Claude Code

Not autocomplete — a fully agentic assistant. Terminal-native, works with any IDE, runs bash + edits + MCP in a loop.

Q&A → Plan → Verify Ladder

1
Codebase Q&A — Ask how X works before changing anything. Onboarding drops from 2–3 weeks to 2–3 days.
2
Plan before code — "Before you write code, make a plan and run it by me." Eliminates building the wrong thing correctly.
3
Verify loop — Give Claude tests, screenshots, or CI. It iterates until green. Enables async: let it run while you work elsewhere.

Source: Boris Cherny, Claude Code workshop

CLAUDE.md Hierarchy

LevelScopeContents
EnterpriseAll employeesCentral policies, blocked commands/URLs
GlobalUser machinePersonal defaults, global MCP config
ProjectRepo root (checked in)Commands, architecture, style guides, MCP servers
LocalPersonal, not checked inIndividual preferences
NestedSubdirectoriesPer-service docs, loaded when working in that path

Press # during a session to have Claude remember something and update CLAUDE.md automatically.

Keybindings

Shift+TabAuto-accept edits (bash still gated)
#Remember → updates CLAUDE.md
!Run bash — output enters context
EscStop safely, redirect next step
Esc EscJump back in history
Ctrl+RView full context as Claude sees it

Section 07

Routines

Routines are higher-order prompts — preconfigured Claude Code sessions on managed infrastructure. The default shifts from "I'll prompt Claude" to "Claude prompts Claude." Design a routine →

Three Design Decisions

01

Trigger

Schedule (weekly doc sync) or event (PR merged, CI failed, deploy complete, webhook).

02

Context

Repos, connectors (GitHub, Slack, Drive, Datadog). Context ceiling = capability ceiling.

03

Steering

Generator+critiquer patterns, human monitoring, verification before marking done.

Production Examples

Example 01

Docs Maintainer

Trigger: Weekly schedule or PRs labeled needs-docs

Context: Source repo + docs repo + marketing briefs from Drive

Behavior: Diff branches, detect undocumented features, open PRs, notify Slack

Example 02

Deploy Verifier

Trigger: CD webhook after each deploy

Context: Service code + Datadog/Grafana + Slack

Behavior: Inspect logs/metrics, summarize go/no-go, recommend rollback

Example 03

CI Auto-Fix

Trigger: PR opened or CI failure event

Context: Repo + CI logs + review comments

Behavior: Fix review comments, retry flaky CI, rebase on conflicts — engineer never sees red X

Source: Daisy Holman routines demo; Maya Holman routines workshop

Section 08

Evals & Hill Climbing

83% pass rate with 17% failure is expensive in manufacturing — and unacceptable in production without a recovery loop. This module covers PEEM, the 2026 nine-axis evaluation rubric, and the two-layer metric framework.

PEEM — Prompt Engineering Evaluation Metrics

The 2026 PEEM rubric scores prompts and outputs across nine axes, giving you a repeatable process instead of a vague "60% faster" claim. Use this framework for every prompt that ships to production.

Structural (Pre-Run)

Inspect the prompt itself

Clarity — Are instructions unambiguous?

Structure — Is the prompt organized into named sections (role, task, constraints, output)?

Fairness — Does it avoid priming the model toward a specific answer when the answer is unknown?

Output (Post-Run)

Inspect the model's response

Accuracy — Is the output factually correct?

Coherence — Is the reasoning internally consistent?

Relevance — Does the response address the actual task?

Objectivity — Does it avoid unsupported opinions?

Clarity — Is the output readable and well-structured?

Conciseness — Is it as brief as possible without losing information?

Source: PEEM (Prompt Engineering Evaluation Metrics) — 2026 nine-axis rubric

The Two-Layer Metric Framework

Structural metrics are checked before running a prompt — they catch design flaws without spending inference budget. Output metrics are checked after running a prompt — they catch model behavior issues.

LayerWhenCostWhat It Catches
StructuralPre-run (lint the prompt)Zero tokensAmbiguity, missing sections, conflicting instructions, output schema gaps
OutputPost-run (grade the response)Tokens + judge modelHallucination, reasoning errors, tone drift, format violations

Why two layers? Structural issues compound — a prompt with three structural flaws will fail on every output metric downstream. Catching them pre-run saves compute and shortens the debug loop.

Regression vs Failure-Mode Evals

TypeID PrefixWhat It Tests
Regression (R)R1, R8…Single-turn tasks with defined correct responses — "did we break anything?"
Failure mode (F)F1, F2…Multi-turn probes for known weaknesses — inefficient paths, handoff breakdowns, policy conflicts

Track deterministic metrics (turn count, tokens, latency) and non-deterministic quality (LLM-as-judge for tone, reasoning, policy compliance).

Hill-Climbing Loop

1
Run evals → baseline (e.g. 83%)
2
Diagnose failures by theme, not symptom
3
One architectural fix (skills, tool consolidation, handoff contract)
4
Re-run evals → confirm improvement → repeat

Claude Triage Technique

Feed eval results to Claude Code (Opus, high effort). Ask it to: identify failing evals, diagnose root cause per failure, group into themes. Common themes: model doing retrieval in reasoning instead of via tools, subagent/orchestrator schema mismatch, conflicting system prompt policies, missing context causing hallucinated values.

Source: Will Stock Pilot workshop; anthropic_ultimate_guide.md Part VII

Interactive Tool A

Agent Suitability Wizard

Barry's 4-factor checklist — should you build a workflow, agent, or hybrid?

Interactive Tool B

Context Budget Auditor

Audit allocation against standard limits (10/15/40/20/15%). Flags OVER LIMIT categories.

Interactive Tool C

Anthropic 10-Point Prompt Builder

XML-tagged structured prompts — distinct from the 5-layer stratified generator.

Interactive Tool D

Routine Designer

Generate a markdown routine spec with trigger, context, steering, and example /schedule command.

Interactive Tool E

AI Spec Genesis

Describe a vague idea. AI asks the right questions, offers multiple-choice options with use cases and tradeoffs, then assembles a spec-driven, context-engineered prompt package ready to hand to an AI coding agent for FAANG-grade output. No technical knowledge required — the AI decides what to ask.

0

Connect your AI

Pick a provider and paste your API key. The key is stored only in this browser tab (session storage) and sent directly to the provider — never to this site's server.

Your key never leaves your browser. This is a static site with no backend — calls go directly from your browser to the provider. OpenCode Zen requires the Vercel-hosted version (not GitHub Pages).

1

Describe your idea

In plain language. Vague is fine — the AI will figure out what needs deciding.

Try:

Advanced

ACE Framework

Generator → Reflector → Curator. Agents that iteratively refine their own context rather than relying on static prompts. Originally developed by Stanford / SambaNova in 2025 as an advanced, emerging technique.

Generator Reflector Curator

Source: ACE — Stanford / SambaNova 2025 framework (Agentic Context Engineering). Demonstrated 82% accuracy on complex QA, from a 61% baseline (arXiv:2510.04618).

Advanced

Memory Architectures

Working, episodic, semantic, and procedural memory — with hybrid retrieval and compression rules.

Type 01

Working Memory

Context window — ephemeral, one inference.

Type 02

Episodic Memory

Vector DB + decay — session-scoped.

Type 03

Semantic Memory

Playbook patterns — persistent, versioned.

Type 04

Procedural Memory

Code/workflows — immutable, deployed.

Source: Context Engineering patterns; anthropic_ultimate_guide.md

Advanced

Multi-Agent Orchestration

Context isolation, routing, and coordination — emergent capability, not emergent chaos.

PatternIsolationBest For
Supervisor (star)HighClear task taxonomy
Hierarchical (tree)HighComplex planning with sub-goals
Specialized swarmMediumParallel processing, speed > consistency
Peer-to-peerLowConsensus, collaborative editing

Before dispatching to sub-agents: one capability per agent, never pass full parent context, define handoff schema explicitly, max chain depth 3, log context fingerprints.

Source: Anthropic multi-agent research — 90.2% accuracy improvement via context isolation

Advanced

Advanced: Stratified Context Builder

Build a production-ready system prompt by filling in each of the five context layers. The 5-layer generator assembles structured prompts for agent deployments. For API single-shot tasks, use the 10-Point Builder instead.

1

System Layer

Who the agent is. One sentence, specific, not generic.

What the agent can do. Comma-separated list.

Non-negotiable rules. Violating these is a system failure.

What technologies and versions the agent operates within.

2

Task Layer

What the agent must do right now. One primary goal.

Schema, format, and required fields for the output.

What evidence is required to support claims.

How to know the task is complete and correct.

3

Tool Layer

Name + 1-line description for each available tool. Full schemas loaded JIT.

0.80

Minimum semantic similarity score to load full tool documentation (0.70–0.90).

Maximum recursive tool calls before requiring human confirmation.

4

Memory Layer

Recent, session-specific facts about the user or task. Will decay.

Compressed semantic patterns that persist across sessions.

Known failure modes the agent must avoid.

When to compress episodic memory into semantic patterns.

5

Routing Layer

Primary domain for routing and tool selection.

When to delegate to sub-agents instead of handling in-context.

Schema for data passed to sub-agents. Must include context budget.

About the Author

Author & Methodology

This playbook is a synthesis of Tier 1 practitioner material from Anthropic's applied AI engineering workshops, plus the Context Engineering skill's production patterns. Every pattern in this book is grounded in a named, attributable source — no vague credentials, no fabricated logos.

Methodology

Attributable, Verifiable, Reproducible

Every pattern in this playbook is attributed to a named source. We do not use vague acronyms like "FAANG" or fabricated user counts. When a number is cited, it is either linked to a primary source or removed.

Primary source attributions: Barry (Anthropic, AI Engineer Summit), Boris Cherny (Claude Code lead, Anthropic), Will (Anthropic workshops, Code with Claude London), Hannah & Christian (Anthropic Applied AI Prompting 101), Daisy Holman (Anthropic Claude Code harness), Maya Holman (Anthropic Routines).

Provenance

Open Synthesis

The accompanying Markdown, PDF, and EPUB downloads contain the same content as this site, with full source attributions in the front matter and inline citation markers throughout. You can audit every claim.

Last updated: 2026-01-15. This playbook reflects 2026 standards and is reviewed monthly as the field evolves.

Version: v6.0 — context rot framing, MCP section, four-strategy taxonomy, ACE/Stanford framing, PEEM evaluation framework.

Trust Signals & Verification

This is an open-source practitioner reference. There is no paid course, no "2,400+ students from Vercel/Stripe/OpenAI" claim to verify, no instructor photo from a stock site. The only social proof that matters here is whether the patterns ship to production.

SignalWhat It Actually Means
Source attributionEvery pattern is linked to a named workshop, paper, or specification. No unattributed claims.
Downloadable artifactsThe full playbook ships as Markdown, PDF, and EPUB — read it offline, audit it, fork it.
Versioned & datedFront matter lists version, last-updated date, and what changed in this revision.
Interactive tools includedBudget Auditor, Agent Wizard, 10-Point Builder, Routine Designer, Stratified Builder — run them, see the math, validate the patterns.
No fabricated metricsThe "97M+ MCP downloads" stat and "90.2% accuracy improvement" stat are attributed. The "2,400+ engineers from Vercel, Stripe, OpenAI" stat is not present here because it could not be verified.