I was thinking about the similar topic and started to wonder if I can generated a diagram of a large codebase.
I thought that LLMs are great at compressing information and thought of putting it to good use by compressing a large codebase into a single diagram. Since entire codebase doesn't fit in the context window, I built a recursive LLM tool that calls itself.
It takes two params:
* current diagram state,
* new files it needs to expand the diagram.
The seed set would be an empty diagram and an entry point to source code. And I also extended it to complexity analysis.
I thought that LLMs are great at compressing information and thought of putting it to good use by compressing a large codebase into a single diagram. Since entire codebase doesn't fit in the context window, I built a recursive LLM tool that calls itself.
It takes two params: * current diagram state, * new files it needs to expand the diagram.
The seed set would be an empty diagram and an entry point to source code. And I also extended it to complexity analysis.
It worked magically well. Here are couple of diagrams it generated: * https://gist.github.com/priyankc/27eb786e50e41c32d332390a42e... * https://gist.github.com/priyankc/0ca04f09a32f6d91c6b42bd8b18...
If you are interested in trying out, I've blogged here: https://updates.priyank.ch/projects/2025/03/12/complexity-an...