$npx -y skills add stevesolun/ctx --skill lat-md-knowledge-graphDesign or audit a repo-local markdown knowledge graph with wiki links, source-code backlinks, drift checks, and searchable sections. Use when AGENTS.md/CLAUDE.md is too flat for a large codebase or when a custom harness needs durable structured project memory.
| 1 | # lat.md Knowledge Graph |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Turn durable project knowledge into linked markdown files that agents can |
| 6 | search, cite, and keep synchronized with code. |
| 7 | |
| 8 | ## When to Use |
| 9 | |
| 10 | - One root instruction file is too large or hides domain decisions. |
| 11 | - Agents repeatedly rediscover the same architecture or business rules. |
| 12 | - Test intent needs explicit specs linked to test code. |
| 13 | - A custom harness needs persistent memory outside conversation history. |
| 14 | |
| 15 | ## Design Pattern |
| 16 | |
| 17 | 1. Create a repo-local knowledge directory such as `lat.md/` or `docs/knowledge/`. |
| 18 | 2. Split pages by durable concepts: architecture, domain rules, workflows, |
| 19 | interfaces, test specs, and operational constraints. |
| 20 | 3. Link concepts with `[[wiki links]]`. |
| 21 | 4. Link knowledge pages to source symbols or files. |
| 22 | 5. Add code backlinks such as comments or metadata where the code implements a |
| 23 | documented rule. |
| 24 | 6. Add a check that fails on broken links, missing backlinks, stale indexes, or |
| 25 | test specs without code mentions. |
| 26 | |
| 27 | ## ctx Fit |
| 28 | |
| 29 | Use this alongside ctx's LLM-wiki when a project needs its own local memory |
| 30 | graph. ctx recommends skills/MCPs/agents from its catalog; the repo-local graph |
| 31 | stores project-specific facts that should not live in the global catalog. |
| 32 | |
| 33 | ## Quality Bar |
| 34 | |
| 35 | - Page titles and section anchors are stable. |
| 36 | - Links resolve both ways where needed. |
| 37 | - Code backlinks are narrow and reviewable. |
| 38 | - Checks run in CI before merge. |
| 39 | - Sensitive facts stay out unless the repo already allows them. |
| 40 | - The graph explains current behavior, not a speculative roadmap. |