generating-latticelisted
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