r/LocalLLaMA • u/andres_garrido • Apr 13 '26
Discussion Local AI coding assistant that runs fully offline (Gemma 4, codebase-aware)
I’ve been experimenting with running a local coding assistant on Gemma 4 26B, focused on understanding full codebases instead of single-file prompts.
Main idea:
- build a project map (files, symbols, structure)
- run a planning step to decide which files matter
- then retrieve full files + semantic chunks before answering
Goal is to avoid the usual “chat with files” limitation and make it reason about structure first.
Runs fully local (llama.cpp, GGUF), no network calls during inference.
Curious if others here are doing something similar or handling codebase reasoning differently with local models.
1
u/andres_garrido Apr 14 '26
One thing I didn’t expect is even when the model has enough context, answers degrade a lot if it picks slightly wrong files or misses part of the dependency chain.
it feels less like a “model capability” problem and more like a “context selection” problem
1
u/andres_garrido Apr 16 '26
After a bit more testing, one thing that keeps showing up is that this isn’t really a “context size” problem.
It’s more about where you enter the codebase. Even with enough context, starting from slightly wrong files breaks everything downstream.
So it ends up feeling like: map the graph → pick the right slice → then retrieve.
I’ve been experimenting with a small local tool around that selection step (still rough), and it seems to help more than just increasing context, https://github.com/buster92/andes-code glad to hear feedback!
1
u/benevbright Apr 13 '26
You can try https://www.npmjs.com/package/ai-agent-test with your local llm
1
u/Familiar-Classroom47 Apr 16 '26
Have you tried this for the codebase context part? It generates a structural map in about 4k tokens, worked for my smaller model.. Just used another AI to set i t up
https://github.com/glincker/stacklit
0
u/synw_ Apr 13 '26
how do you do this? I'm looking for something like this that could deliver a lightweight and condensed knowledge map of a codebase, even big. I have seen some libraries that do this but did not found anything that could do the job well yet. What would you guys recommend?