RepoOps
Open the app
07 / Memory and the brain

Find the brain entry that answers the question

Ask the brain searches a tracked repository's .claude/brain/ and docs/ markdown and ranks the passages with BM25, with no model download and no key. Every hit names its file, heading and line. Vector ranking is optional and names its provider, and a model writes an answer only when you press the button.

Last updated

Watch it

30.0 s, captions on. Narration: Microsoft Zira Desktop (provisional voice; an approved narration source is pending).Transcript
Read the narration
  1. 0:00 You know the brain answered this once.
  2. 0:02 Nobody can name the file.
  3. 0:06 RepoOps searches the markdown and cites it.
  4. 0:09 Lexical ranking needs no model download or key.
  5. 0:13 Every hit carries the file, the heading and the line.
  6. 0:16 A counting question answers by SQL, and shows it.
  7. 0:23 Open the source and judge it yourself.
  8. 0:25 Save the answer as a decision.

Synthetic example. Read the guide

1

How to

A tracked repository whose brain and docs are markdown on disk. For a model answer or Telemetry questions the resolver cannot match: ANTHROPIC_API_KEY in the data directory's .env.

  1. Open Memory, then the Ask tab.

    Search the brain and docs is the first card. Pick the Scope: This repository, This repository's client, This account or All my repositories. The card starts on This repository when the page opens for one.

  2. Ask in the words you would say out loud.

    Press Search. Each hit shows the path, the heading and the line with a snippet; Open the source lands on the cited heading. Follow-up picks New search or Refine the last hits, which ranks the last turn's hits first. When nothing matches, the turn says No matches.

  3. Read the ranking line.

    Each turn says how many hits came from how many chunks and files, and whether it ranked by BM25 alone or by BM25 and vector, naming the provider.

  4. Press Write a cited answer only when the hits are not enough.

    It sends the question and the top hits to Anthropic on your key and returns an answer with numbered citations back to the hits. It never runs on its own. A reached daily cap refuses with the numbers.

  5. Use Ask the telemetry for a question about your usage.

    It is the card under the search. A deterministic resolver answers metric questions first, at no cost, and says so. Only a question it cannot match runs a tool loop on your key, at most six tool calls a question.

  6. Write a good answer back.

    Save as decision, under a cited answer or a kept answer in Saved conversations, appends to the repository's decisions.md; Save as note writes a new file under .claude/brain/notes/ and never overwrites one. The next search finds it, because the corpus is read from the working tree.

2

Use cases

Recovering the reasoning behind a decision

Situation
A reviewer asks why the integration tests do not mock the database. You remember the argument and cannot name the file.
You do
Open the Ask tab on this repository and type the question.
You see
Ranked hits with path, heading and line, ranked by BM25. You open the cited section and read the original argument. Nothing was sent anywhere to get it.

A number, not a passage

Situation
You want last week's spend per active developer and do not want a number a model made up.
You do
Type it into Ask the telemetry and press Ask.
You see
A card with the figure, its window, the repositories and the modules that produced it, marked as answered by the resolver with no model call. With no active developers to divide by, the card refuses and gives the reason instead of a figure.
3

Expected outcome

WorkedHits that each cite a file, a heading and a line, and open at that heading.
WorkedA counting question gets an exact answer card with Show the SQL above the ranked hits.
WorkedA cited answer whose numbered citations point back at the hits, with the tokens used against the daily cap.
Did not workNo matches. Try a broader query, or words that would actually appear in the brain.

Next step: Re-ask in the author's likely wording, or widen the Scope.

Did not workThe ranking line says BM25 alone.

Next step: Press Test on the Brain embeddings card in Settings. An overrun of the 2,500 ms deadline warms in the background.

Did not workA 403 on a scope that spans more than one client.

Next step: Allow cross-client Ask the brain is off. Turn it on in Settings if that crossing is intended.

Did not workDaily synth cap reached.

Next step: Wait for 00:00 UTC or raise Daily token cap (per user) in Settings. The hits are unaffected.

Did not workTelemetry says the chat needs a key.

Next step: Add ANTHROPIC_API_KEY to the data directory's .env, or rephrase toward a shape the resolver answers.

4

What else to consider

Bring your own embeddings key

The lightweight installer ranks with BM25 alone. In Settings, the Brain embeddings card adds vector ranking from Voyage (voyage-3), OpenAI (text-embedding-3-small) or OpenRouter (openai/text-embedding-3-large at 1536 dimensions): pick the Provider, paste the API key, press Save, then Test. The key stays in the data directory's .env and goes only to that provider, which receives the text it embeds. A provider error or timeout falls back to BM25 for that search. Remove clears a key saved from the card. REPOOPS_BRAIN_EMBED_PROVIDER=none keeps BM25 alone.

Telemetry mode in detail

The tool loop reads only ANTHROPIC_API_KEY, runs on Claude Sonnet by default (REPOOPS_TELEMETRY_CHAT_CHEAP=1 uses Haiku), and calls a small set of read-only tools over your usage aggregates. It shares the daily token cap with synthesis, and every model call it makes is recorded in your own AI-calls telemetry under the surface repoops-chat. Without a key, a question the resolver cannot match is refused with a hint; resolver answers keep working.

Caps, the boundary and retention

Settings sets Max tokens per question (2,000), Daily token cap (per user) (50,000) and Allow cross-client Ask the brain (off); every allowed crossing writes one hashed audit row. A conversation keeps at most 10 turns and 100 stay active. One older than 30 days is archived and purged 90 days later (REPOOPS_ASK_ARCHIVE_PURGE_DAYS). A write-back has no review step and no undo in the app; revert it in git.

On repoops.ai

On repoops.ai, /team/ask opens the Ask tab of the Memory page, which matches a question against the lessons, decisions and wiki claims your bound desktops published, inside the repositories you can see. It makes no model call and asks for no key, and it never reads your conversation files. The personal brain at repoops.ai/my-brain is the hosted path that reasons, on a provider key you store.