← narwal.one/Second Brain
SecondBrain
Ask the Brain
Index/Conceptupdated Sun Sep 27 2026 08:00:00 GMT+0800 (Philippine Standard Time)

Context Engineering

context-engineeringretrievalgovernanceagentslifecycletacit-knowledgecontext-rightsizing

Context Engineering

The discipline of getting the right data to the model at the right time, with the right permissions, in the right shape — at runtime.

"A model is only as good as the context it can access." — Context Engineering and GraphRAG (IBM Technology)

Per Martin Keen, model intelligence is no longer the bottleneck for most use cases. Context is. Context engineering is the infrastructure problem of fixing that.

Four pillars (per IBM video)

  1. Connected access — visibility across the data estate; zero-copy federation (query data where it lives; preserve original ACLs); always fresh
  2. Knowledge layer — entity resolution, relationships, hierarchies, decision traces, institutional knowledge
  3. Precision retrieval — filter by intent, role, time, policy. "Better context is not more context — it's more precise context."
  4. Runtime governance — enforced live at retrieval time AND response time. Can the agent query this? Should this result be included given who's asking?

Worked example

"Prep me for the client meeting tomorrow."

  • Bad: model returns a beautifully formatted but generic meeting template
  • Good: pulls open support tickets (relevant — known issue), pulls deal history (relevant — renewal coming), excludes internal pricing (governance — your role doesn't have access)

The difference isn't model intelligence. It's the system around the model.

How this maps to the LLM Wiki Pattern

The Second Brain itself is a context-engineering system:

Pillar Realization in this wiki
Connected access raw/ collection + index.md
Knowledge layer Entity / concept pages + <span class="deadlink" title="Not published">wikilinks</span> graph
Precision retrieval Index-first lookup, frontmatter filtering, source-type categorization
Runtime governance CLAUDE.md schema + page-level sources: provenance

This is not coincidence — Karpathy's wiki pattern is one realization of context engineering, optimized for human curation in the loop.

Adjacent concepts

  • RAG — the simplest precision-retrieval mechanism (vector similarity)
  • Agentic RAG — iterative retrieval inside the loop
  • GraphRAG — graph-navigation retrieval
  • Context compression — summarize/rank to maximize signal in the window
  • Context Development Lifecycle — Patrick Debois's Generate → Evaluate → Distribute → Observe loop. Process counterpart to Keen's architectural four-pillars view.
  • What an Enterprise Context Layer Is (Prukalpa) — enterprise-scope view: substrate (data + semantics + skills) plus five capabilities (mining, lifecycle, learning, activation, governance). Extends the discipline past prompts/skills into business artefacts (glossaries, ontologies, sales playbooks).

Four lenses worth holding together

  • Architecture (IBM, Martin Keen) — the four pillars above. What contextual systems must be made of, at runtime.
  • Lifecycle (Tessl, Patrick Debois) — the Context Development Lifecycle. How you maintain context as a discipline over time, with evals, packaging, and observability. Patrick's coda: "LLMs are just the engine. If you give the engine the wrong fuel, which is context, they're not going to perform."
  • Enterprise scope (Prukalpa) — the context layer decomposed into substrate + capabilities across the whole organisation's tools and artefacts. Scopes the discipline past code-context into business-context (metrics, ontology, playbooks).
  • Tacit Knowledge (Economist, 2026-06-27) — Teaching AI How People Work Is Fraught with Problems (Economist) adds the epistemic floor: the substrate the other three lenses assume may not exist in codified form yet and may be actively withheld by the workers who own it. The Polanyi frame: "We can know more than we can tell." The three-route capture taxonomy (corpus → video → keystroke tracking → expert rating) is where extraction happens, each with its own political and technical failure mode.

The four views compose: pillars describe what the runtime system needs; the lifecycle describes how you keep building it; the enterprise-scope view describes what the substrate has to include to serve the whole firm; the tacit-knowledge lens describes what has to be extracted from unwilling humans before the substrate exists at all.

Fifth lens — the rightsizing counterpart (Anthropic, 2026-07-24)

The New Rules of Context Engineering for Claude 5 (Thariq Shihipar) adds a fifth lens: the four above ask "how do we get the right context to the model?"; this one asks "what should we remove from what we currently send?" — the maintenance counterpart to the discipline. Anthropic removed 80% of Claude Code's system prompt for the Claude 5 generation with no measurable loss on their coding evaluations; the mechanism is Capability Overhang (older-model guardrails now block newer-model imagination). See Context Rightsizing for the concept page synthesising this into a discipline with cross-vantage evidence (Pocock deletion test, Christopherson context-rot, Tyler Brown model-release cadence).

The five views compose: pillars describe what the runtime system needs; the lifecycle describes how you keep building it; the enterprise-scope view describes what the substrate has to include to serve the whole firm; the tacit-knowledge lens describes what has to be extracted from unwilling humans; and rightsizing describes what to remove as the model class advances so that yesterday's constraints don't silently degrade today's model.

2026-09-26 — Compaction retires the handoff doc (per 7 Ways How We Use AI Is Changing (AI Daily Brief))

A sixth, interaction-level view: much of 2025–early-2026 practitioner context engineering was manual handoff documents moving context between threads. Improved compaction (Codex) and Claude/Cursor Projects make the long-lived Mono-Thread viable, automating that layer. The unsolved frontier moves up a level — Atlan's Rishi Bhatnagar: "Personal context feels solved; org-wide is wide open" — see Multiplayer AI (Shared Agents). Contested by the GSD "context rot" school (see warning on Mono-Thread).

2026-09-26 — The session budget: smart zone vs dumb zone (AI Skills with Matt Pocock (The Pragmatic Engineer))

Dex Horthy's heuristic, relayed by Matt Pocock: quality holds for roughly the first ~150k tokens regardless of window size, then degrades ("every token is shouting for attention"). Operational rule: portion any bigger job across sessions with state persisted outside the model. See Smart Zone and Dumb Zone.

2026-09-26 — Specs as persistent context (Full Course Spec-Driven Development with Coding Agents (DeepLearningAI))

Spec-Driven Development (SDD) reframed as context engineering at project scope: agents are stateless and their windows fill, so a versioned Project Constitution (mission / tech stack / roadmap) plus per-feature specs are loaded fresh at the start of each session (/clear, then read specs) instead of relying on chat memory — the course's cure for "context decay." Its rule on what to put in: lots of goals, audience and constraints (context the agent can't know), little low-level detail it can work out. Consistent with the rightsizing lens above and with the smart-zone budget: persist state outside the model, reload the minimum.

2026-09-27 — The executive version: "hook your LLM to your actual data" (How AI Is Changing Communication (HBR IdeaCast))

Zapier CEO Wade Foster's single top tip for executives is plain context engineering: "If you are not hooking up your LLM to the actual data that you have inside your organization, you are getting a much worse experience." He points an agent at Slack, email, meeting notes, project management, CRM and the codebase to get company-wide summaries that used to take "layers and layers of management". His caveat is the data-quality lens: inconsistent communication or data, plus meeting-recorder speaker mis-attribution, make the summaries only "directionally correct". This is the leadership-audience framing of the enterprise context layer argument.

Sources