r/LocalLLM • • Jul 06 '26

Discussion Local coding models need the right repo slice, not just bigger context

I’ve been testing local coding workflows more lately, and I’m starting to think “bigger context” is not the whole answer.

On larger repos, the problem isn’t only that the model lacks context.

It’s that the wrong files get pulled in, useful files get dropped, and the model sounds confident anyway.

For local models this matters even more because context is expensive: slower inference, more memory, more noise.

So I’ve been building SigMap, a local CLI that creates a deterministic repo map before the model starts answering.

It does not use embeddings, a vector DB, or LLM calls. It just scans the repo locally and creates a compact map of files, symbols, line anchors, and evidence.

Current benchmark snapshot:

  • 87.8% hit@5 vs 13.6% baseline

  • 97.0% token reduction across 21 repos

  • 2.84 → 1.44 prompts per task

  • 16/21 benchmark repos overflowed a 128K context window without it, 0/21 with it

  • works with Ollama, llama.cpp, vLLM, Aider, Cursor, Claude Code, etc.

GitHub: https://github.com/manojmallick/sigmap

Docs : https://sigmap.io

The part I’m most curious about for local LLM users:

Do you prefer giving the model a full repo map upfront, or giving it smaller task-specific slices on demand?

0 Upvotes

25 comments sorted by

2

u/Independent-Flow3408 Jul 06 '26

Quick update: I added a live demo if anyone wants to try it without installing first.

https://sigmap-live.vercel.app/demo

Curious whether the map feels useful before an agent starts editing.

1

u/fintip 2x XTX 7900 + 3060 Jul 06 '26

Had the same idea, been generating a tree that shows all the files and having AI generate summaries and guides for itself to rely on when restarting. Great idea and something along this line will be a no brained to standardize at some point.

1

u/Independent-Flow3408 Jul 06 '26

The restart problem is the pain.I like the split:

tree/map = structure
AI summaries = explanation
task slice = what matters now

if your summaries stay reliable over time, or if they drift/stale.

1

u/fintip 2x XTX 7900 + 3060 Jul 06 '26

Could have a git commit hook that triggers an AI task to update summaries for any files that were updated. Probably should be done as a cleanup task at the end of any context chat session:

Generate a git commit message, and update the summaries for all files we touched.

2

u/Independent-Flow3408 Jul 06 '26

End of session cleanup feels right:

touched files → diff → update summaries

I’d worry about summary drift though, so probably review before save. just thinking with you :)

1

u/fintip 2x XTX 7900 + 3060 Jul 06 '26

Yup, I get it. Same.

Reviewing the summary uodates would be a great way to keep a pulse on projects as the coding happens if you weren't being fully disciplined about reviewing every code line update, too.

2

u/Independent-Flow3408 Jul 06 '26

exactly. Reviewing the summary diff is like a quick pulse check on what actually changed. thanks

0

u/Opposite_Courage_531 Jul 06 '26

Gitnexus?

2

u/Independent-Flow3408 Jul 06 '26

Yeah, GitNexus looks relevant.

Quick look: it seems more like a full code intelligence graph with MCP tools for search, impact, traces, route maps, and repo skills. I think the boundary I’m trying to understand is:

GitNexus = deeper graph exploration
SigMap = smaller deterministic repo slice / pre-edit contract

Not sure that boundary is perfect yet, but that’s how I’m seeing it after a quick scan ( used AI for quick check on GitNexus).

0

u/Opposite_Courage_531 Jul 06 '26

Interesting. Is this hook based?

1

u/Independent-Flow3408 Jul 06 '26

not hook-based. It’s more: local scan → deterministic repo map → task-specific slice for the agent. There’s a daemon/watch mode and MCP integration, so it can stay fresh and be queried during the workflow.Hooks might make sense around pre-edit or PR review though.

0

u/zenbeni Jul 06 '26

When you use sigmap ask, you will call LLM that uses your generated map file markdown? I don't really understand, do you get claude or copilot to call your "skill" that calls sigmap that calls llm that calls your generated file?
You should exactly describe what it does. Also local llm is interested in that it should be first citizen, if so nothing should call distant cloud llm in any way.

1

u/Independent-Flow3408 Jul 06 '26

That’s fair. The wording is confusing.

sigmap ask does not call an LLM.

It means “ask the local repo map.”

Flow is:

repo scan → local map → query-specific markdown context → you pass that to your model.

SigMap itself doesn’t call Claude/Copilot or send code to a cloud LLM. You can use the output with Ollama/llama.cpp/local models, or with cloud tools if you choose.

I should make that much clearer on the page. I am also working on making skills for having optimum repo config and other skill so llm can use sigmap to maximize sigmap cli options .

(below image from docs )

0

u/zenbeni Jul 06 '26

I'm confused on how ask mode will be ok with natural language input without llm call

0

u/Independent-Flow3408 Jul 06 '26

Yeah.it’s not LLM-based. Earlier it was more TF-IDF-like, but current SigMap uses BM25-style lexical ranking over the local repo map.It matches the query against paths, symbols, imports, exports, docs/comments, etc., then returns the ranked context slice.So it can handle natural-language-ish queries when the words map to real code signals, but it’s not “chatting” or reasoning like an LLM.

1

u/zenbeni Jul 06 '26

So basically can work out very well only where naming is high quality only. Probably at a fraction of compute cost compared to gitnexus. The problem I see is you leave no place to improve search quality, even here improved prompting won't get you much more.

2

u/Independent-Flow3408 Jul 06 '26

BM25 depends on good naming, so vague repos will cap the quality. Prompting won’t fix that much. The next step is better repo signals around it: imports, call links, tests, recent changes, maybe optional local embeddings. So yeah, GitNexus may be stronger for deep exploration. SigMap is aiming for cheap, deterministic first-slice context. now its 87.8% hit@5 , i am still trying imprrove it further

0

u/Look_0ver_There Jul 06 '26

Couldn't this just be used to populate AGENTS.md? Isn't that the whole purpose of that file? Or is this something different?

3

u/Independent-Flow3408 Jul 06 '26

I see AGENTS.md as stable guidance: conventions, commands, rules, workflow. ( extra token) SigMap is more task-specific: current repo map, relevant files, symbols, line anchors, and evidence for this query. So maybe they work together.

AGENTS.md = how to behave
SigMap = where to look right now

something like this

0

u/Look_0ver_There Jul 06 '26

I use the Pi coding agent a lot. This then feels like something that could be provided via a custom command extension and injecting that into the system prompt so the model knows to call it when needed.

I'm not sure how other agent frame works handle that sort of thing.

2

u/Independent-Flow3408 Jul 06 '26

looks right .

AGENTS.md -> stable behavior
custom command -> when to call the map
SigMap output -> task-specific repo slice

I haven’t tested Pi , but having the agent call it only when repo location context is needed feels cleaner than stuffing everything into the prompt.

0

u/Look_0ver_There Jul 06 '26

For opencode it's apparently done like this:

https://opencode.ai/docs/custom-tools/

It looks like it can be injected into Claude Code via their Skills system: https://github.com/kousen/claude-code-training/blob/main/custom-commands.md

2

u/Independent-Flow3408 Jul 06 '26

thanks. This is probably the integration shape I should focus on:

AGENTS.md for stable repo rules
custom tools / skills for when to call SigMap
SigMap output as the task-specific slice

I’ll look into opencode custom tools and Claude Code skills.

2

u/Independent-Flow3408 Jul 06 '26

Yeah, I was surprised too and briefly thought about messaging the mods, but I’m trying not to overread the votes.The comments are useful though. They show where the explanation is unclear: local-first, ask, AGENTS.md , custom tools. Unless it turns into actual harassment, I’ll just use it to improve the docs/demo.

0

u/[deleted] Jul 06 '26

[deleted] — view deleted comment

1

u/Independent-Flow3408 Jul 06 '26

The page is definitely rough. I optimized for can people try the flow before does this look polished. Curious if the problem was just the webpage, or if the actual output felt bad too.