Live data from Hacker News

Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

github.com

41–50 of 70 posts

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#41

I found having smaller structured markdowns in each folder explaining the space and classes within keeps Claude and Codex grounded even in a 10M+ LOC codebase of c/c++

I'm working on making lat hierarchical, e.g.

  - lat.md           # high-level description of the project
  - frontend/lat.md  # frontend-related knowledge
  - backend/lat.md   # details about your backend

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#42
i've had a related question recently but it didn't get much traction

https://news.ycombinator.com/item?id=47543324

what's the point of markdown? there's nothing useful you can do with it other than handing it over to llm and getting some probabilistic response

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#44

At that point why not have an obsidian vault in your repo and get the Agent to write to it?

Because lat gives agents more tools and enforces the workflow.

Unlike obsidian, lat allows markdown files link into functions/structs/classes/etc too.

This saves agents time on grepping but also allows you to build better workflows with tests.

Test cases can be described as sections in `lat.md/` and marked with `require-code-mention: true`. Each spec then must be referenced by a `// @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.

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#45
Can you offer any insights how this compares to building an AST or RAG over your codebase? Several projects do that and it autoupdates on changes too. The agent does a wide sweep using AST/RAG search followed by drill down using an LSP. This sped up my search phase by 50%. How Will this project help me?

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#46

Can you offer any insights how this compares to building an AST or RAG over your codebase? Several projects do that and it autoupdates on changes too. The agent does a wide sweep using AST/RAG search followed by drill down using an LSP. This sped up my search phase by 50%. How Will this project help me?

I think it's a great idea and I'm considering building this in lat too. Code embedding models can definitely speed up grepping further, but they still wouldn't help much when you have a business logic detail encoded across multiple complex files. With lat you'd have it documented in a paragraph of text + a few [[..]] links into your code.

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#47
post #3

[flagged]

I would say that when you treat your Markdown as the authoritative source, I of course don't get it automated but that is my choice. It takes knowledge of the domain, but when you have deep specific knowledge that is worth so much more than automated updates. I use AI to get the initial MD but then I edit that. Sure it doesn't get auto updated, but I would never trust advice on the fly that got updated based on AI ou…

I think you can have your workflow with lat and it might make it even nicer. Would love feedback from you.

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#48

I definitely agree with the need for this. There's just too much to put into the agents file to keep from killing your context window right off the bat. Knowledge compression is going to be key. I saw this a couple of days ago and I've been working on figuring out what the right workflows will be with it. It's a useful idea: the agents.md torrent of info gets replaced with a thinner shim that tells the agent how to g…

++

> I suspect there's ways to shrink that context even more.

Yeah, I'm experimenting with some ideas on that, like adding `lat agent` command to act as a subagent to search through lat and summarize related knowledge without polluting the parent's agent context.

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#49

managing agents.md is important, especially at scale. however I wonder how much of a measurable difference something like this makes? in theory, it's cool, but can you show me that it's actually performing better as compared to a large agents.md, nested agents.md, skills? more general point being that we need to be methodical about the way we manage agent context. if lat.md shows a 10% broad improvement in agent perf…

I'm working on a blog post and on benchmarks. Here [1] Armin suggested I take something like quickjs, built lat base for it, and compare side by side how, say, claude code works with lat vs. without.

I'm very early into this and need to build proper harness, but I can see sometimes lat allowing for up to 2x faster coding sessions. But the main benefit to me isn't speed, it's the fact that I can now review diffs faster and stay more engaged with the agent.

[1] https://x.com/mitsuhiko/status/2037649308086902989?s=20

Re: Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

#50
post #36
post #34

Earlier quoted context omitted.

I'm working on a blog post about lat, stay tuned. Yes, it does work and I continue improving it.

Cool. I've been thinking about tools to help coding agents lately, and I've always wondered if I could do a better job than actual Claude Code / Codex. They can do the `rg`s and kick off multiple agents and the skills, etc, and I couldn't find a way to actually prove there's a ROI of using something like Agent Lattice. Curious to see the results!

One anecdote: I added lat to quickjs codebase and asked questions like "how does quickjs gc circular object graphs" and was able to get an answer in 12 seconds vs 2 minutes without lat. But take this with a grain of salt, I need better benchmark harness. Benchmarks are hard to do in general, for LLMs it's its own hell. :)
Post reply on HN