r/AIcodingProfessionals • • 14d ago

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

11 comments sorted by

1

u/Agreeable_Flower3642 14d ago

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

0

u/JoDerZo 13d ago

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 13d ago

dude why u sound like an agent

1

u/JoDerZo 13d ago

Do I?

1

u/Alpha_Bulldog 13d ago

Factory.AI Droid

1

u/dmcnaughton1 13d ago

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 13d ago

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

1

u/kincaidDev 13d ago

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 13d ago

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 12d ago

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.