Understand any codebase.
Ask questions about a public GitHub repository and get answers that point to the exact lines they came from.
How does a request get dispatched to a handler?
The WSGI entry point is
App.__call__. It builds aRequestfrom the environ and passes it todispatch.dispatchasks the router to match the method and path. With no match it returns404 Not Found; otherwise it calls the handler with the captured params.Router.matchchecks routes in registration order and returns the first one whose pattern and method both match.Inference:Because method and path are checked together, a known path called with the wrong method gets a 404 rather than a 405.
Not verified: The retrieved chunks show no error handling around handler calls, so an exception in a handler probably reaches the WSGI server.
In rank order. Scores hidden in demo.
25 def __call__(self, environ: dict, start_response: Callable):26 request = Request.from_environ(environ)27 status, body = self.dispatch(request)28 start_response(status, [("Content-Type", "text/plain; charset=utf-8")])29 return [body.encode("utf-8")]18 def dispatch(self, request: Request) -> tuple[str, str]:19 matched = self.router.match(request.method, request.path)20 if matched is None:21 return "404 Not Found", "Not Found"22 handler, params = matched23 return "200 OK", handler(request, **params)23 def match(self, method: str, path: str):24 for route in self._routes:25 found = route.pattern.match(path)26 if found and method in route.methods:27 return route.handler, found.groupdict()28 return NoneImport graph from the fixture's 4 import statements. Select a file to open it.
package module
Understand how it fits together. Module and import graphs are parsed from the source, so every edge points at a real import statement.
Investigate with citations. Each claim in an answer links to a file and line range. Anything the code doesn't show is labelled as inference.
Measure retrieval, not prose. Score search against hand-labelled questions to see whether the right code was found before you trust an answer.
What works today
RepoKnit is early. The frontend is real; the indexing and answer backend isn't built yet. How it works covers the plan.
Working
- Repository URL validation in the browser
- The interactive demo above, over a bundled fixture
- A demo workspace with file tree, code search and keyword retrieval
- An architecture explorer over the fixture and this site's own source
- A Search Lab that scores BM25 configurations against hand-labelled questions
- Architecture and pipeline overview
Not built yet
- Fetching and indexing GitHub repositories
- Live questions and answers
- Semantic and hybrid retrieval
- Accounts, quotas and rate limits