In my agent file I explain that I have a static analyzer which generates a callgraph. On starting the agent runs ~/.agent/tools/__callgraph__/generate_callgraph.py
It then gets to see callgraph.current.md and upon subsequent sessions callgraph.diff.md.
Here is an example of some output that I currently have in callgraph.current.md
For the Python version it also gives the parameters and types along with it. I think the next thing I'd need to do is give self-defined type definitions. Doing things this way allows an LLM to not read all that much but to be able to reason relatively well over what the code does. The caveat is that you abstracted your code well. If you didn't, the LLM doesn't know your implementation.
In my agent file I explain that I have a static analyzer which generates a callgraph. On starting the agent runs ~/.agent/tools/__callgraph__/generate_callgraph.py
It then gets to see callgraph.current.md and upon subsequent sessions callgraph.diff.md.
Here is an example of some output that I currently have in callgraph.current.md
For example:
ResultsTable calls getCellValue.
In these cases it's just one function but you also have stuff like
For the Python version it also gives the parameters and types along with it. I think the next thing I'd need to do is give self-defined type definitions. Doing things this way allows an LLM to not read all that much but to be able to reason relatively well over what the code does. The caveat is that you abstracted your code well. If you didn't, the LLM doesn't know your implementation.
I probably should also add return types.