Agentic Context Engineering Playbook
Treat the agent's system prompt and long-lived memory as a structured, item-addressable playbook that evolves through small delta updates from a Generator/Reflector/Curator loop, so accumulated tactics resist the context collapse that monolithic rewrites cause.
Problem
When self-reflection is free-form and the agent is asked to rewrite the whole playbook in one pass, each rewrite tends to paraphrase yesterday's concrete tactic into a vague generality and then drop it on the next pass. There is no addressable unit a reflection step can point at, so the playbook either bloats with near-duplicates or collapses into platitudes. Three different jobs (proposing a new lesson, judging whether it is correct, and deciding whether to keep it) all happen inside the same prompt, which produces vague output because the model cannot do all three jobs well at once. The team is forced to choose between losing accumulated specifics and letting the playbook grow unbounded.
Solution
The playbook is stored as an ordered list of items with stable identifiers; each item carries a short tactic, optional worked example, and provenance. A run produces a trajectory and outcome. The Generator reads the trajectory and proposes new candidate items as deltas. The Reflector reviews proposed and existing items against the outcome and recent history, scoring which to keep, edit, or drop. The Curator applies the resulting delta set — strictly add/edit/remove operations against item ids — with dedup against existing items. Whole-playbook rewrites are forbidden. The three roles are separate prompts (and may be separate model calls) so that generation cannot pre-empt evaluation, and evaluation cannot quietly drop items the Curator did not authorise.
When to use
- The agent has a long-lived prompt or memory that accumulates tactics across many runs.
- Whole-prompt rewrites have measurably degraded specificity (context collapse).
- Outcomes are observable per run and can score items.
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.