Comment by ryuuseijin
3 hours ago
Here is another technique to save tokens: allow the model to read a skeleton of the source code before reading the code, to give it an index into the code so it can read targeted chunks.
There is a tool that uses ripgrep and treesitter that does this [1], adapted from the maki coding agent.
Aider pioneered this with the "repo map" which works tremendously well.
Yep, there's also prewalk.