| name | cited-recall |
| description | Answer a question from memory with per-claim citations, GBrain-style — written answer, sources for every claim, explicit about what the memory does not contain. Use when the user needs a sourced or auditable answer about past sessions/decisions. |
/cited-recall
Answer a question from the memory store with a synthesized, cited answer instead of raw
chunks. This is the GBrain pattern (reranker + cited prose + "what the brain doesn't know")
rebuilt on memsearch primitives with Claude as the reranker — zero extra infrastructure,
zero API cost beyond the session itself.
Inputs
- A question about past sessions, decisions, people, or project history.
Procedure
- Freshness. Run
memsearch index .memsearch/memory/ first (the index lags mid-session;
see CLAUDE.md "Index freshness").
- Retrieve (L1). Run
memsearch search "<question>" — and at least one rephrased
variant if the first pass looks thin. Collect the top ~5 candidate chunks.
- Rerank (Claude-as-reranker). Judge each candidate for actual relevance to the
question. Discard near-misses; order the survivors by how directly they answer. Do not
trust the similarity score alone — a 0.9 on the wrong entity is still wrong.
- Expand (L2). For each survivor, run
memsearch expand <chunk-id> to get the full
markdown section and its anchors (source file, heading, session id, transcript path).
- Drill down (L3, only if needed). If the summaries conflict or lack a critical detail,
use
memsearch transcript against the anchored transcript to check the original exchange.
- Synthesize. Write a direct answer in prose. Every factual claim carries a citation:
(memory: <file> § <heading>) — add , transcript <session-id-prefix> when L3 was used.
If this repo contains other note collections (people notes, project notes), consult and
cite them the same way.
- Admit gaps. End with a "Not in memory:" line listing the parts of the question
the store could not answer — name what's missing rather than papering over it. If nothing
relevant was found at all, say exactly that and stop; never substitute plausible guesses.
Output
A short written answer: cited claims, then the "Not in memory:" line (omit only when the
answer is complete). No raw chunk dumps.
Rules
- Never present an uncited claim as remembered fact.
- A confident answer with no source is worse than "not found".
- Prefer fewer, well-supported claims over coverage.