← The Factory

Context, Memory, Knowledge & Skills

Keep durable truth in versioned artifacts, retrieve progressively, and treat skills as a supply chain.

medium confidence

Confidence: medium. Evidence: controlled study and case study. Last substantive change: 2026-08.

This subsystem owns what the agent knows and how it comes to know it: the context it loads, the memory it keeps, and the reusable skills it draws on.

The conclusion

Keep durable truth in versioned artifacts and retrieve it progressively, and treat context files and skills as software supply-chain components with owners, tests, freshness, and provenance. Context design reliably changes outcomes. Skill ecosystems are promising, but they introduce drift and a real attack surface.

How the thinking got here

Giant prompts gave way to repository maps and just-in-time context, then to persistent sessions with externalized state, then to trainable and curated skill libraries. Along the way it became clear that a skill is not a harmless snippet: it is a dependency, and dependencies rot, drift, and can be poisoned.

The same progression is happening in retrieval. Vector indexes find semantically similar passages. Knowledge graphs make entities, claims, and named relationships queryable. GraphRAG combines graph-derived structure with source text and retrieval. This can help with relationship and whole-corpus questions that similarity alone misses, but the graph is still a fallible index. Canonical, versioned artifacts and their provenance remain the source of truth.

Credible alternatives, and when each is right

Approach Right when
Full-context loading small codebases
Retrieval large corpora, targeted needs
Knowledge graph or GraphRAG questions depend on relationships or themes spread across a corpus
Summaries long histories that must be compressed
Event-sourced memory auditability and replay matter
Clean-slate subagents a task benefits from a fresh, distilled brief
Skills and code APIs recurring, well-scoped capabilities

Where it fails and what we still don't know

Failures include memory poisoning, stale context that silently misleads, generated graph edges that overstate uncertain relationships, and skill drift that breaks a contract the factory relied on. Evidence is strong that context design matters and contested on which document structures actually improve adherence; in one factorial study of 1,650 coding-agent sessions, the measurable effect was within-session decay rather than any of the tested file-structure variables. Open questions include truth reconciliation, stale-context detection, skill dependency graphs, and safe forgetting.

What would change our mind

A standard for skill provenance and freshness that measurably reduces drift and poisoning would make the skill supply chain trustworthy by default.

Evidence and further reading