Browse code by meaning

37 points by Gabriella439


mitchellh

I think a lot about project structure in the age of AI in general. And I don't mean that in the colloquial sense that people often say that phrase, I really mean I routinely, regularly, actually think about project structure in the age of AI. This is filesystem structure but also identifier naming and scoping too. There are so many facets around it I find interesting:

First, many agentic coding tools allow directory-scoped instructions (e.g. AGENTS.md/CLAUDE.md). A well-formed AGENTS.md can make a critical difference between perfect first-try agentic behavior or necessary back-and-forth. In newer projects, I've consciously reorganized some files I would've previously put next to others into separate directories ONLY so I can have a scoped AGENTS.md.

Second, agents work better when they find the right context faster and more reliably. The first line of most agents are filesystem operations like ls. So, it makes sense to organize your project in a way that is friendly to an agent, perhaps even at the expense of the human. This blog post talks about this, although I don't go so far in my own practice: https://ampcode.com/notes/by-an-agent-for-an-agent

Third, I am more and more often finding what I need in a codebase (even my own that I'm familiar with!) by just prompting an agent. Example from today: https://ampcode.com/threads/T-019c6781-46f6-76db-af2a-22a47ad1376b I always backstop that with "link me to the files you found" so I can open an editor and verify it myself. But it's just SO MUCH FASTER in many cases than manually digging through a bunch of files. So, as this gets better and faster, why does the filesystem structure matter?

Basically, I'm already browsing many codebases by "meaning" as this blog post states.

So, given all that, I've often wondered: should things like the default GitHub view actually be something closer to this blog post? Should it be structured by derived meaning with an AI search bar? By default? Of course, tree view should be available somewhere still.