{"id":"2027770787659464812","url":"https://x.com/omarsar0/status/2027770787659464812","text":"AGENTS dot md files don't scale beyond modest codebases.\n\nLots of discussions on this lately.\n\nIf you're building serious software with Claude Code or any agentic tool, a single AGENTS dot md will eventually fail you. This paper shows what comes next.\n\nA 1,000-line prototype can be fully described in a single prompt. A 100,000-line system cannot. The AI must be told, repeatedly and reliably, how the project works, what patterns to follow, and what mistakes to avoid.\n\nSingle-file manifests hit a ceiling fast.\n\nThis new paper, Codified Context, documents a three-tier infrastructure built during real development of a 108,000-line C# distributed system across 283 sessions over 70 days.\n\nThe system uses a three-tier memory architecture: a hot-memory constitution (660 lines, always loaded), 19 specialized domain-expert agents (9,300 lines total) invoked per task, and a cold-memory knowledge base of 34 specification documents (~16,250 lines) queried on demand via an MCP retrieval server.\n\nAcross 283 sessions, this produced 2,801 human prompts, 1,197 agent invocations, and 16,522 autonomous agent turns, roughly 6 autonomous turns per human prompt, with a knowledge-to-code ratio of 24.2%.\n\nCrucially, none of it was designed upfront: each new agent and specification emerged from a real failure, a recurring bug, an architectural mistake, a convention forgotten, and was codified so it could never require re-explanation again, turning documentation into load-bearing infrastructure that agents depend on as memory, not reference.\n\nPaper: https://arxiv.org/abs/2602.20478\n\nLearn to build effective AI agents in our academy: https://academy.dair.ai/","author":{"name":"elvis","username":"omarsar0","avatarUrl":"https://pbs.twimg.com/profile_images/939313677647282181/vZjFWtAn_200x200.jpg"},"createdAt":"Sat Feb 28 15:40:04 +0000 2026","engagement":{"replies":92,"retweets":167,"likes":1486,"views":179196},"media":{"photos":[{"url":"https://pbs.twimg.com/media/HCQWyK3bEAQ9rt_.jpg?name=orig","width":1610,"height":1806}],"videos":[]},"externalLink":{"url":"https://arxiv.org/abs/2602.20478","displayUrl":"arxiv.org","title":"Codified Context: Infrastructure for AI Agents in a Complex Codebase","description":"LLM-based agentic coding assistants lack persistent memory: they lose coherence across sessions, forget project conventions, and repeat known mistakes. Recent studies characterize how developers configure agents through manifest files, but an open challenge remains how to scale such configurations for large, multi-agent projects. This paper presents a three-component codified context infrastructure developed during construction of a 108,000-line C# distributed system: (1) a hot-memory constitution encoding conventions, retrieval hooks, and orchestration protocols; (2) 19 specialized domain-expert agents; and (3) a cold-memory knowledge base of 34 on-demand specification documents. Quantitative metrics on infrastructure growth and interaction patterns across 283 development sessions are reported alongside four observational case studies illustrating how codified context propagates across sessions to prevent failures and maintain consistency. The framework is published as an open-source companion repository.","thumbnailUrl":"/static/browse/0.3.4/images/arxiv-logo-fb.png"}}