Tab · Knowledge
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
- Localhost:
/brain-ask.html?repo=<id> - API:
GET /api/brain/ask?repo=<id>&q=<query>&k=<n> - Keyboard: ⌘ K then
ask - Sidebar: Knowledge → Ask the brain
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 — the corpus is built from the brain's on-disk markdown on the first request. Caps: 2,000 files / 500 KB per file (prevents pathological brain corruption). v2 follow-up (separate PR) adds optional vector embeddings + RRF fusion + Haiku synthesis when you bring a Voyage/OpenAI key.
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.