lat.md: A Markdown Knowledge Graph for Scalable Codebase Documentation

lat.md is a tool that organizes codebase documentation into a modular graph of markdown files rather than a single flat file. It uses wiki links and code annotations to connect documentation to implementation, ensuring accuracy through automated validation checks. The system features semantic search and CLI integration, making it a powerful resource for providing context to AI agents.
Key Points
- Replaces monolithic documentation with a modular, interconnected graph of markdown files for better scalability.
- Uses bi-directional linking between documentation sections and source code symbols to maintain context.
- Provides a CLI tool (lat check) to automatically validate that all links and code references are accurate and up-to-date.
- Supports advanced search capabilities, including exact, fuzzy, and semantic (vector) search via LLM embeddings.
- Integrates with AI workflows through an MCP server and a prompt expansion tool for agents.
Sentiment
The community is cautiously interested in lat.md's approach. There is broad agreement that the problem of scaling agent documentation is real and pressing. However, significant skepticism exists about whether lat.md specifically is the right solution, with many commenters noting they already use simpler approaches that seem to work. The repeated demand for benchmarks and measurable improvement suggests the community finds the concept intellectually appealing but isn't ready to adopt without evidence.
In Agreement
- Monolithic AGENTS.md files become unmanageable at scale and bloat context windows, making modular documentation a real need
- Smaller structured markdown files per folder effectively ground AI agents even in very large codebases (10M+ LOC)
- The documentation drift and staleness problem is real and valuable to detect via CI jobs or pre-commit hooks
- Bidirectional links between documentation and source code help agents navigate faster than raw grepping
- Knowledge compression through selective context loading is key for effective agent workflows
Opposed
- No benchmarks or measurable proof that lat.md improves agent performance — vibes-based adoption isn't sufficient for team buy-in
- Unclear what lat.md offers over a simple docs/ directory with well-organized markdown that agents can already read
- Existing tools like Obsidian, mkdocs, and vitepress already provide wiki-style knowledge graphs with the added benefit of human-readable rendered output
- AST/RAG approaches with LSP integration may be more effective than markdown-based documentation for agent code exploration
- Developers risk spending more time organizing agent context than on the actual development work the agent is supposed to accomplish
- Normative specs with deterministic generative tests offer stronger enforcement guarantees than lat.md's annotation-based approach