← ClaudeAtlas

generating-latticelisted

Generate and maintain lat.md/ knowledge graphs with bidirectional source code anchoring. Docs link to code via [[src/file#symbol]] wiki links; code links back to docs via @lat: comments. lat check validates both directions, catching drift when either side changes. Use when user says "lat.md", "lattice", "knowledge graph", "document this codebase", "add back-links", or wants cross-referenced architecture docs anchored to source code symbols.
oaustegard/claude-skills · ★ 124 · Data & Documents · score 84
Install: claude install-skill oaustegard/claude-skills
# Generating Lattice Generate and maintain `lat.md/` knowledge graphs — structured, cross-referenced markdown anchored to source code symbols. The output is validated by the `lat` CLI, which catches documentation drift whenever code or docs change. **The core mechanism is bidirectional linking:** - **Top-down** (docs → code): `[[src/auth.js#getValidToken]]` wiki links in `lat.md/` files point to specific symbols in source. When a symbol is renamed or deleted, `lat check` catches the broken link. - **Bottom-up** (code → docs): `// @lat: [[auth#Token Refresh]]` comments in source point back to the concept they implement. When a section is renamed or removed, `lat check` catches the dangling reference. Without both directions, the lattice is a static essay that drifts silently. With both, `lat check` enforces consistency. **Dependency:** Requires **mapping-codebases** skill. The structural maps (`_MAP.md` files) are the input that makes LLM-assisted authoring token-efficient — read maps to understand API surfaces, then selectively read source files only where design rationale lives. ## Installation ```bash npm install -g lat.md lat --version # verify (requires Node.js 22+) ``` The `lat` CLI provides `lat check` (validation), `lat search` (semantic search), `lat section` (browsing), `lat refs` (reference lookup), and `lat mcp` (agent integration). ## Generation Pipeline ### Phase 1: Structural Scan Ensure `_MAP.md` files exist. Generate them if missing: ```ba