Your AI Agent Needs a Map: LLM Wiki or README Is Enough
OpenAI
Anthropic
The article discusses how AI agents can navigate complex codebases using structured knowledge bases like an LLM Wiki or a README-oriented repository. It presents Andrej Karpathy's LLM Wiki pattern, which uses an LLM to write and maintain a wiki, and contrasts it with a documentation-as-code approach where README files serve as the primary knowledge source. The author shares his practical implementation of an LLM Wiki for a payment platform and compares both approaches in terms of knowledge generation and maintenance.
The article argues that AI agents need a structured knowledge base (a 'map') to avoid starting from scratch each session. It introduces Andrej Karpathy's LLM Wiki pattern, which consists of three layers (raw documents, wiki pages maintained by LLM, and index/log files) and three operations (ingest, query, lint). The author implemented this pattern on a payment platform with a 70-page wiki covering the core payment domain. He also contrasts it with his previous README-oriented approach, where documentation lives in markdown files next to code, and a CLAUDE.md file routes the agent to relevant documentation. The key difference: in README, developers write knowledge per module; in LLM Wiki, the LLM synthesizes knowledge from multiple sources. The author notes that an LLM Wiki is not needed for every project, especially if the codebase is simple or the agent already makes good guesses.
- Сокращения
- LLM = Large Language Model — большая языковая модель
- RAG = Retrieval-Augmented Generation — генерация с дополнением извлечением
- DDD = Domain-Driven Design — предметно-ориентированное проектирование
- CQRS = Command Query Responsibility Segregation — разделение ответственности команд и запросов
- SHA = Secure Hash Algorithm — алгоритм безопасного хеширования
- DI = Dependency Injection — внедрение зависимостей
- ADR = Architecture Decision Record — запись архитектурного решения
Source: Habr — хаб ИИ —
original
