Remix.run Logo
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.

[1]: https://github.com/ninjaxtools/treesitter-index

chr15m 2 hours ago | parent | next [-]

Aider pioneered this with the "repo map" which works tremendously well.

ZeWaka 41 minutes ago | parent | prev [-]

Yep, there's also prewalk.