I came upon this article yesterday while thinking about token reduction. How to generate accurate LLM responses on large code repositories: Presenting CGRAG, a new feature of dir-assistant | by Chase Adams | Medium
TLDR: this developer took the approach of using RAG as a means of pulling in context from a large project for code development but recognized that traditional RAG by itself might not pull in all the context from intricate project dependencies. They instead use 2 rounds of RAG, one to determine dependience and a second to pull context for code generation.