← Back to gregblotzer.com

AI Context Infrastructure

Open Architecture · HLD Draft v0.1 · CC-BY-SA 4.0

AI coding assistants generate valuable context during development sessions — decisions made, patterns established, rationale for architectural choices. That context evaporates when the session ends. The next session starts cold. Across a team, different assistants accumulate different context with no way to reconcile them, no shared understanding of how the codebase works or why it was built the way it was.

This isn't a prompt engineering problem. It's an infrastructure problem. The context layer has no versioning, no provenance, no governance, and no security model. Most teams don't know it exists as a distinct layer worth treating seriously.

The HLD specifies a purpose-built context store organized as a trust-tiered belief graph. Context artifacts move through defined lifecycle stages with provenance tracking at every step. Human review gates control promotion from lower-trust to higher-trust tiers. Nothing reaches the shared organizational context layer without a human in the loop.

The architecture covers five layers: context snapshot (capturing session state), belief graph (the persistent store and its relationships), merge strategy (how conflicting context is reconciled), provenance (tracing every artifact to its origin), and the promotion interface (how context moves between trust tiers).

The document was developed using a generate-then-review workflow: Claude Sonnet 4.6 drafted the architecture, Claude Opus 4.6 reviewed it, and substantive findings from that review were incorporated before publishing. It is an application of the LLM-as-judge evaluation pattern to a real design problem rather than a benchmark.

Context and session memory are an underprotected attack surface. An adversary who can influence what an agent knows — or how it reasons about what it knows — can shape its outputs without touching credentials or source code. The HLD includes an explicit security posture section covering the threat surface, the governance controls that mitigate it, and the open questions that remain unsettled.

Two companion articles develop the security argument in more depth: one establishes the case for context infrastructure as a distinct engineering discipline, the other uses the GitHub Copilot supply chain breach as a concrete anchor for why the industry's post-incident conversation missed the most important layer.

Draft v0.1. The architecture is specified but several open questions are explicitly enumerated in the document. The roadmap includes a reference implementation on PostgreSQL, a related works survey positioning this work relative to adjacent projects, and a monitoring model for AI provider pricing changes that affect the cost model assumptions.

Architecture document

The full HLD on GitHub, published under CC-BY-SA 4.0 with structured issue templates for architectural critique.

The Case for Purpose-Built Context Infrastructure in AI-Assisted Development

Argues that AI session context is a production asset that belongs on purpose-built infrastructure, versioned, governed, and provenance-tracked.

The Asset You Probably Haven't Classified

On session context and reasoning chains as ungoverned attack surfaces, using the GitHub Copilot supply chain breach as an anchor.