r/AIcodingProfessionals • • Oct 18 '26

Question AI coding on large repos

I use Github Copilot at work and have great success on green field project, even larger ones.

But I have a harder time on our (very) large Unreal Engine application, which is brown field with millions of lines of code. This seems to challenge Opus and other frontier models.

What's the best workflow and tooling to work with AI on repositories this large?

  • Application code: ~2M LOC
  • Unreal Engine 5.8: ~41M LOC
  • Unreal Engine ./Engine/Source excluding third-party code: ~8.6M LOC

I did some quick tests with CodeGraph, but that did not bring any significant benefits for the things I tried.

Note: Code is mostly C++ and solution is Visual Studio 2022

6 Upvotes

13 comments sorted by

1

u/Agreeable_Flower3642 Oct 18 '26

have the model build scripts and programs that do the work for it? or something like codebase-memory-mcp

0

u/JoDerZo Oct 19 '26

I tried to find more information on codebase-memory-mcp, and could not find any clear testimony of its usefulness. Do you have hands-on experience with it that you can share?

2

u/Agreeable_Flower3642 Oct 19 '26

dude why u sound like an agent

1

u/JoDerZo Oct 19 '26

Do I?

1

u/Agreeable_Flower3642 3d ago

Haha fair, my bad. Yes, hands-on: I run it daily on a few repos (Mojo libs, Android apps, a FastAPI stack). It indexes the repo into a graph once (fast mode runs in the background, no LLM tokens), then the agent calls search_graph / trace_path / get_code_snippet instead of grepping and reading whole files. Biggest win for me is "who calls X" and impact checks before an edit: one call instead of 5 to 10 reads, so less context burned and fewer wrong guesses. Weak spots: needs a re-index after big refactors, and for plain string literals grep is still better. Worth a try on anything over a few hundred files.

1

u/Agreeable_Flower3642 3d ago

Haha fair, my bad. Yes, hands-on: I run it daily on a few repos (Mojo libs, Android apps, a FastAPI stack). It indexes the repo into a graph once (fast mode runs in the background, no LLM tokens), then the agent calls search_graph / trace_path / get_code_snippet instead of grepping and reading whole files. Biggest win for me is "who calls X" and impact checks before an edit: one call instead of 5 to 10 reads, so less context burned and fewer wrong guesses. Weak spots: needs a re-index after big refactors, and for plain string literals grep is still better. Worth a try on anything over a few hundred files.

1

u/Alpha_Bulldog Oct 19 '26

Factory.AI Droid

1

u/dmcnaughton1 Oct 19 '26

Context window size is the biggest single limiting factor for LLMs right now. Your only solution is to rearchitect the repository to allow for better context window management and progressive discovery of the project so the model can restrict its context to just solving the problem handed to it.

1

u/wisembrace Oct 19 '26

Agree with this - also get it to fully document the repo before attempting changes.

1

u/kincaidDev Oct 19 '26

Try using festival

https://github.com/Obedience-Corp/festival

Create a camp wprkspace and link your projects to it. Create docs, scripts and workflows to help you work on the large codebases in the camp workspace. I use this system with large codebases every day and it works great

1

u/Banner80 Oct 19 '26

The same way a human does it. Nobody is thinking in millions of lines of code at a time. Not even thousands.

You need meta structures for navigation. While the work focus is on a specific script file that should have a reasonable size (thousands of lines, no larger), there is some way to keep a meta explanation of the project at various depth levels.

The bot should never get lost trying to find a file or function. It should be able to navigate the meta structure: this section contains the X family of features, and within that section there are 5 tree branches and they are all named and explained with a short description. And within each branch there's a catalog of functions with their names and params and a text explanation of what they do.

Then anyone can navigate this quickly, not just the robot.

1

u/Plenty_Line2696 Oct 20 '26

Especially for larger codebases, organization still matters a lot and it's something LLM's simply suck at.

In a tidy codebase navigating the file hierarchy alone tells a story about what's what, making it relatively way easier to navigate, try that in LLM slop codebases and you'll typically see there's no rhyme nor reason to it.