Brain · Ask the brain
Ask the brain
Search your brain like text - every answer cites the file, heading, and line. Free-text query across this repo's .claude/brain/ + docs/ markdown. BM25 ranking, deterministic, no LLM call, no key. Click a hit; deep-link to the cited source at the right #anchor.
See it in motion
Where to find it
- Desktop:
http://localhost:4000/, then Brain → Ask the brain in the sidebar. - Hosted:
repoops.ai/team/ask - Keyboard: ⌘ K, then type “Ask the brain”.
- API:
GET /api/brain/ask?repo=<id>&q=<query>&k=<n>
What it does for you
k chunks ranked by Okapi BM25 with a shallow suffix stripper. Each hit shows the path, heading, and matching snippet.#heading-anchor with the line number in the URL. No “the AI said it” - every claim points at its source.Configure
Nothing by default: the corpus is built from the brain's on-disk markdown on the first request, and semantic search runs keyless on-device (a one-time ~25MB model download), fused with BM25 via Reciprocal Rank Fusion. Caps: 2,000 files per repo; files are indexed in 500 KB windows so the whole file is searchable at any size, with a 4 MB per-file hard ceiling that stops a pathological file from wedging the index. Bring a Voyage or OpenAI key for a hosted embedding provider, or set the provider to none for BM25-only.
Use it well
Open Ask the brain when you suspect the answer is in the brain but you can't name the file. The cited line + snippet is usually enough to decide which hit to open. For specific facts, prefer Brain links (graph view) over Ask (text search); for “what was the reasoning for X”, Ask wins.