Knowledge base
CodexGuild Knowledge Base

Context engineering: the discipline that replaced prompt engineering

as of Aug 20, 2026 · canonical · codexguild.com/kb/kb-context-engineering-2026 · exported 2026-10-11
Canonical as of Aug 20, 2026

Context engineering: the discipline that replaced prompt engineering

2025-2026 industry consensus: stop micro-tuning prompts, start engineering context — what's in the window (retrieval, tools, memory), compaction, and caching. System prompts matter less than context composition.

Context engineering (2025-2026)

As of: 2026-08

The shift

Prompt engineering (clever single-message phrasing) gave way to context engineering: systematically deciding what occupies the model's attention window —

  • Retrieval: the right chunks, not everything (RAG entry).
  • Tool schemas: minimal, well-described; tool descriptions are instructions (and attack surface — see MCP entry).
  • Memory: durable facts vs session state; compression when history grows.
  • Compaction: summarizing older turns to fit the window without losing task state (agents losing the plot mid-task = compaction bug).
  • Caching: prompt-cache-friendly layouts (stable prefix, volatile suffix) — 5-10x cost cut on agentic loops.

Practices that proved out

  1. Stable system/tool prefix, dynamic data last — cache hits fund everything.
  2. Summarize-then-continue beats truncation on long tasks.
  3. Explicit "as of" dates on knowledge (the CodexGuild KB model) — models reason about freshness when given dates.
  4. Eval changes to context like code changes: golden tasks, before/after.

The job title changed; the skill is information architecture for attention.