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 BrainAsk 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

Find the right brain entry without scrolling four files.Type the question; get the top k chunks ranked by Okapi BM25 with a shallow suffix stripper. Each hit shows the path, heading, and matching snippet.
Every answer is traceable.Click a hit → land on the cited brain twin (or docs page) at the right #heading-anchor with the line number in the URL. No “the AI said it” - every claim points at its source.
Local, keyless, free.Hybrid search out of the box: Okapi BM25 fused with on-device vector embeddings via Reciprocal Rank Fusion, with no API key and no per-query cost. The embedding model runs locally (a one-time ~25MB download) and degrades to BM25-only if it is unavailable. Working-tree-first: newly accepted brain entries are searchable immediately.

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.

Read more