Skip to content
Dennis Lee edited this page May 21, 2026 · 1 revision

title: lat.md type: tool created: 2026-05-19 last_updated: 2026-05-19 related: ["Playradar", "radar/tools/Statewright", "radar/tools/Lattice", "radar/tools/TDDGuard"] sources: ["https://github.com/1st1/lat.md"] radar_quadrant: Tools radar_ring: Assess radar_position: inner

lat.md

A CLI tool and workflow system for building markdown knowledge graphs of codebases, designed for use by AI coding agents. Addresses the scaling problem with AGENTS.md: a single flat file cannot document a growing codebase without burying key decisions and causing agent hallucination. lat.md distributes knowledge across interconnected markdown files in a lat.md/ directory, with bidirectional links between concepts and source code.

Core Design

Knowledge lives in a lat.md/ directory at the project root. Markdown files describe architecture, business logic, and test specifications. Sections link to each other with [[file#Section]] syntax. Source files reference the knowledge graph with // @lat: [[section-id]] annotations. lat check validates all links in both directions, catching documentation drift before it causes agent errors.

my-project/
├── lat.md/
│   ├── architecture.md    # system design, key decisions
│   ├── auth.md            # auth logic and constraints
│   └── tests.md           # test specs (require-code-mention: true)
├── src/
│   ├── auth.ts            # // @lat: [[auth#OAuth Flow]]

CLI

Command Purpose
lat init Scaffold directory; configure agents with hooks
lat check Validate all wiki links and source annotations
lat search "query" Semantic search via embeddings
lat locate "name" Find sections by name (exact or fuzzy)
lat section "file#id" Show a section with its links and refs
lat expand "[[ref]]" Expand wiki references in a prompt
lat mcp Start MCP server for editor integration

Agent Workflow

Agents call lat check before finishing work. lat search replaces grep-based codebase exploration. lat init configures pre-commit hooks and agent instructions to keep the graph updated. lat expand injects full section context into prompts without manual copy-paste.

Test Spec Enforcement

Sections marked require-code-mention: true must be referenced by a // @lat: annotation in test code. lat check flags any unlinked test spec, providing a link-level equivalent of test coverage visibility from the knowledge graph.

Maturity

1,505 GitHub stars; MIT licensed; v0.11.0 released 2026-03-23; TypeScript codebase; npm distribution.

Radar Assessment

lat.md sits in the Assess ring of the Tools quadrant, at inner position. First studied via the GitHub repository on 2026-05-19; no personal use. Directly applicable to any Claude Code project: resolves a concrete and observable problem (agents hallucinating context from flat AGENTS.md), and lat init is the only setup step. Inner position reflects minimal installation friction, an active npm package, MCP server integration that pairs with the MCP Platforms blip, and direct complementarity with Statewright and Lattice already on the radar. The remaining gate is a first lat init on an active Claude Code project.

Clone this wiki locally