I've been maintaining my own script that does something like this. A few things I've found to be useful: It can also pull in context from git history (prioritize based on which files have been most recently worked on, include recent git commit messages which can help the LLM know more about what's going on), and optionally it can go do multiple stages... for long files, first summarizing them, then including the summary in the final prompt.