# vasilopoulos-codified-context-infrastructure-ai-agents-2026-02-24

## Veille

Codified context infrastructure for AI agents: 3-tier architecture, persistent memory, 283 sessions, MCP, specialized agents, complex codebase

## Titre Article

Codified Context: Infrastructure for AI Agents in a Complex Codebase

## Date

2026-02-24

## URL

https://arxiv.org/html/2602.20478v1

## Keywords

codified context, AI agent infrastructure, persistent memory, 3-tier architecture, constitution, specialized agents, knowledge base, MCP, Model Context Protocol, Claude Code, AI-assisted development, specifications, documentation maintenance, expertise routing, development sessions, C#, distributed system

## Authors

Aristidis Vasilopoulos (Chercheur indépendant, USA)

## Ton

**Profile**: Independent researcher-practitioner perspective, rigorous academic register, advanced level

**Description**: Vasilopoulos adopts the tone of an empirical research paper, with abstract, methodology, quantitative results and explicit limitations. The style is methodical and honest, acknowledging biases (single-developer, single-project, observational) while presenting impressive concrete data (283 sessions, 2,801 prompts, 16,522 autonomous turns). The author avoids an evangelistic tone and prefers observational case studies to categorical claims. Vocabulary draws from software architecture (tiers, hot/cold memory, routing) and research (confounding factors, quantitative metrics). The target audience consists of developers using AI agents on complex projects and researchers in AI-assisted software engineering.

## Pense-betes

- **Fundamental problem**: LLM agents lack persistent memory across sessions. They lose project coherence and repeat the same mistakes. This is the same problem addressed by CLAUDE.md, AGENTS.md, and Patrick Debois's Context Development Lifecycle.
- **3-tier architecture**:
- **Tier 1 — Constitution (Hot Memory)**: A single 660-line Markdown file, always loaded. Naming conventions, build commands, architectural patterns, known failure modes, routing tables to specialized agents.
- **Tier 2 — Specialized agents (Domain Experts)**: 19 agent specifications (9,300 lines). More than half of the content consists of codebase facts, formulas, patterns and failure modes — not behavioral instructions.
- **Tier 3 — Knowledge Base (Cold Memory)**: 34 on-demand specification documents (16,250 lines) retrieved via an MCP server.
- **Impressive metrics**: 283 sessions over 70 days, 2,801 human prompts, 1,197 agent invocations, 16,522 autonomous turns. The context infrastructure accounts for 24.2% of total documentation.
- **Session pattern**: 87% ad-hoc with optional specialist agents, 13% structured (plan-execute-review). More than 80% of prompts are under 100 words — pre-loaded context reduces the need for explanation.
- **Most-invoked agents**: Code reviewer (154 invocations), network-protocol-designer (85). Shows that the primary use cases are quality control and domain-specific correction.
- **4 case studies**: 1. Backup system: 283-line spec referenced in 74 sessions → zero corruption bugs 2. UI synchronization: documentation of manually discovered patterns → first-attempt success on the following feature 3. Drop system: spec creation before refactoring → acceleration of dozens of subsequent interactions 4. Deterministic RNG: 915-line agent with determinism theory → identification of 3 subtle bugs after 5 failed attempts
- **6 practitioner guidelines**: 1. A basic constitution delivers substantial improvements from day 1 2. Planning agents should automatically surface required specs and specialists 3. Trigger tables encode expertise routing 4. Repeated explanations signal the need to create a spec 5. Creating specialized agents unblocks stalled sessions 6. Outdated specs actively mislead (primary failure mode)
- **Maintenance cost**: ~5 min per affected session + biweekly 30-45 min review = 1-2h/week
- **Compounding knowledge**: Each documented subsystem accelerates not only its own future modifications but also every adjacent feature that depends on it. Connects to Patrick Debois's "Context Flywheel" concept.
- **Strong link to the watch corpus**: This article is the empirical, quantified version of what Debois (CDLC, Context Flywheel), Anthropic's skills, CLAUDE.md, and the spec-driven approach describe. Arguably the most data-rich paper on the topic.

## RésuméDe400mots

Aristidis Vasilopoulos presents a **codified context** infrastructure developed while building a 108,000-line C# distributed system, addressing a fundamental problem: LLM agents lack persistent memory across sessions, losing project coherence and repeating mistakes.

The architecture is organized into **three tiers**. Tier 1 (Constitution) is a single 660-line Markdown file, always loaded in memory, encoding conventions, patterns, failure modes, and routing tables to specialized agents. Tier 2 comprises 19 specialized agents (9,300 lines) functioning as domain-priming mechanisms — more than half of their content consists of codebase facts rather than behavioral instructions. Tier 3 is a knowledge base of 34 documents (16,250 lines) retrieved on demand via an **MCP** (Model Context Protocol) server.

The quantitative evaluation covers **283 sessions** over 70 days, 2,801 human prompts generating 1,197 agent invocations and 16,522 autonomous turns. The context infrastructure accounts for 24.2% of total documentation. Sessions are 87% ad-hoc and 13% structured (plan-execute-review). More than 80% of prompts are under 100 words, demonstrating that pre-loaded context considerably reduces the need for explanation.

Four **observational case studies** illustrate the system's value. A 283-line backup specification, referenced in 74 sessions, produced zero corruption bugs. Documentation of UI synchronization patterns enabled first-attempt success on the following feature. Creating a spec before a drop-system refactor accelerated dozens of subsequent interactions. A 915-line network agent identified three subtle synchronization bugs that had resisted five prior attempts.

The author proposes **six guidelines**: a basic constitution delivers immediate gains; planning agents should automatically surface required specs; routing tables replace human memory; repeated explanations signal the need to create a spec; specialized agents unblock stalled sessions; and outdated specs constitute the primary failure mode.

Maintenance cost is estimated at 1-2 hours per week. The article demonstrates that documented knowledge **compounds**: each documented subsystem accelerates both its own future modifications and every adjacent feature that depends on it. The author acknowledges limitations (single-developer, observational) but provides one of the most detailed quantitative evaluations of AI agent-assisted development on a real, complex project.

## GrapheDeConnaissance

- Aristidis Vasilopoulos —a_créé→ infrastructure contexte codifié (METHODOLOGIE, 0.98)
- infrastructure contexte codifié —utilise→ Claude Code (TECHNOLOGIE, 0.97)
- infrastructure contexte codifié —utilise→ Model Context Protocol (TECHNOLOGIE, 0.97)
- conventions, patterns, tables routage —fait_partie_de→ Tier 1 Constitution (CONCEPT, 0.96)
- 19 spécifications domain experts —fait_partie_de→ Tier 2 Agents spécialisés (CONCEPT, 0.96)
- Tier 3 Knowledge Base —utilise→ serveur MCP (TECHNOLOGIE, 0.95)
- infrastructure contexte codifié —améliore→ cohérence agents IA entre sessions (CONCEPT, 0.95)
- specs obsolètes —réduit→ qualité output agents IA (CONCEPT, 0.93)
- connaissance documentée —améliore→ productivité développement agentique (CONCEPT, 0.92)
- infrastructure contexte codifié —est_basé_sur→ architecture 3 tiers hot/warm/cold (CONCEPT, 0.95)
- Aristidis Vasilopoulos —affirme_que→ constitution basique améliore output dès jour 1 (AFFIRMATION, 0.94)
- Tier 2 Agents spécialisés —fait_partie_de→ infrastructure contexte codifié (METHODOLOGIE, 0.96)

---
Canonical: https://www.thekb.eu/en/fiches/vasilopoulos-codified-context-infrastructure-ai-agents-2026-02-24/
