Codebase Intelligence Copilot: ask a repo questions, get file:line answers

Syed Ali Mehdi
Published

0
  • Project creator

Ask a code repository a question in plain English and get an answer grounded in the real code, with exact file:line citations you can click and check.

New codebases are slow to learn, and a chatbot that guesses about code you haven’t read is worse than no chatbot. So the whole design is about making the answer checkable.

How it works

  • Splits code along real boundaries (functions, classes) using tree-sitter, not fixed-size chunks.
  • Hybrid retrieval: dense embeddings plus BM25, because exact identifier names matter in code and pure semantic search misses them.
  • The model only answers from retrieved chunks and has to cite them.
  • Works with a local model or a cloud one.

Result: recall@5 of 0.92 on my evaluation set, meaning the right chunk was in the top five results 92% of the time.

Python, tree-sitter, embeddings + BM25, any LLM.
Code: https://www.twine.net/signin