[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74969":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":14,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},74969,"lat.md","1st1\u002Flat.md","1st1","Agent Lattice: a knowledge graph for your codebase, written in markdown.","https:\u002F\u002Fwww.lat.md",null,"TypeScript",1637,106,9,13,0,22,187,27,19.09,"MIT License",false,"main",[],"2026-06-12 02:03:30","\u003Cp align=\"center\">\n  \u003Cimg src=\"templates\u002Flogo-dark.svg\" alt=\"lat.md\" width=\"500\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002F1st1\u002Flat.md\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002F1st1\u002Flat.md\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"CI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Flat.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Flat.md\" alt=\"npm\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">A knowledge graph for your codebase, written in markdown.\u003C\u002Fp>\n\n## The problem\n\n`AGENTS.md` doesn't scale. A single flat file can describe a small project, but as a codebase grows, maintaining one monolithic document becomes impractical. Key design decisions get buried, business logic goes undocumented, and agents hallucinate context they should be able to look up.\n\n## The idea\n\nCompress the knowledge about your program domain into a **graph** — a set of interconnected markdown files that live in a `lat.md\u002F` directory at the root of your project. Sections link to each other with `[[wiki links]]`, markdown files link into the codebase (`[[src\u002Fauth.ts#validateToken]]`), source files link back with `\u002F\u002F @lat: [[section-id]]` comments, and `lat check` ensures nothing drifts out of sync.\n\n- **Faster coding for agents** — instead of grepping through your codebase, agents search the knowledge graph to discover key design decisions, constraints, and domain context fast and consistently.\n\n- **Faster workflow for humans** — your agents maintain lat files for you. When you review a diff, start with the semantic changes in `lat.md\u002F` to understand *what* changed and *why*. Reviewing code becomes the secondary task.\n\n- **Knowledge retention** — the context and reasoning behind your prompts is usually lost after a session ends. With lat, agents capture that knowledge into the graph as they work, so future sessions start with full context instead of rediscovering it from scratch.\n\n- **Test specs with enforcement** — test cases can be described as sections in `lat.md\u002F` and marked with `require-code-mention: true`. Each spec then must be referenced by a `\u002F\u002F @lat:` comment in test code. `lat check` flags any spec without a backlink, so you can review and maintain test coverage from the knowledge graph.\n\nThe `lat` CLI gives agents and humans a system to navigate and maintain the graph:\n\n- **`lat init`** — sets up popular coding agents with hooks and instructions to keep lat updated and correct\n- **`lat check`** — enforces referential consistency; agents call it automatically before finishing work\n- **`lat search`** and **`lat section`** — agents use these to understand your prompts and navigate the graph instead of endless `grep` calls\n\n`lat` is a workflow that comes with tools — build pre-commit hooks and GitHub bots, run CI tasks that improve the knowledge graph in the background.\n\n## Install\n\n```bash\nnpm install -g lat.md\n```\n\nThen run `lat init` in the repo you want to use lat in.\n\n## How it works\n\nRun `lat init` to scaffold a `lat.md\u002F` directory, then write markdown files describing your architecture, business logic, test specs — whatever matters. Link between sections using `[[file#Section#Subsection]]` syntax. Link to source code symbols with `[[src\u002Fauth.ts#validateToken]]`. Annotate source code with `\u002F\u002F @lat: [[section-id]]` (or `# @lat: [[section-id]]` in Python) comments to tie implementation back to concepts.\n\n```\nmy-project\u002F\n├── lat.md\u002F\n│   ├── architecture.md    # system design, key decisions\n│   ├── auth.md            # authentication & authorization logic\n│   └── tests.md           # test specs (require-code-mention: true)\n├── src\u002F\n│   ├── auth.ts            # \u002F\u002F @lat: [[auth#OAuth Flow]]\n│   └── server.ts          # \u002F\u002F @lat: [[architecture#Request Pipeline]]\n└── ...\n```\n\n## CLI\n\n```bash\nlat init                        # scaffold a lat.md\u002F directory\nlat check                       # validate all wiki links and code refs\nlat locate \"OAuth Flow\"         # find sections by name (exact, fuzzy)\nlat section \"auth#OAuth Flow\"   # show a section with its links and refs\nlat refs \"auth#OAuth Flow\"      # find what references a section\nlat search \"how do we auth?\"    # semantic search via embeddings\nlat expand \"fix [[OAuth Flow]]\" # expand [[refs]] in a prompt for agents\nlat mcp                         # start MCP server for editor integration\n```\n\n## Configuration\n\nSemantic search (`lat search`) requires an OpenAI (`sk-...`) or Vercel AI Gateway (`vck_...`) API key. The key is resolved in order:\n\n1. `LAT_LLM_KEY` env var — direct value\n2. `LAT_LLM_KEY_FILE` env var — path to a file containing the key\n3. `LAT_LLM_KEY_HELPER` env var — shell command that prints the key (10s timeout)\n4. Config file — saved by `lat init`. Run `lat config` to see its location.\n\n## Development\n\nRequires Node.js 22+ and pnpm.\n\n```bash\npnpm install\npnpm build\npnpm test\n```\n","Agent Lattice（lat.md）是一个用于代码库的知识图谱工具，通过Markdown文件形式组织。其核心功能包括使用相互链接的Markdown文件构建知识图谱，并通过`lat check`确保文档与代码同步；支持快速搜索关键设计决策和业务逻辑，提高开发效率。此外，它还提供了一系列命令行工具如`lat init`、`lat check`等，帮助开发者初始化项目、检查引用一致性以及搜索相关信息。适合于需要高效管理和维护大型代码库的设计文档、技术决策记录等场景，尤其适用于团队协作中保持知识的一致性和可访问性。",2,"2026-06-11 03:51:46","high_star"]