agentleFS
mshtawythugmshtawythug/second-brain/skills/brain-ask/SKILL.md

brain-ask

Skill16 starsChanged 21 days agoMITView on GitHub

Multi-hop, cited answer synthesis and audio overviews over the user's local second-brain. `brain ask` plans sub-queries, retrieves across iterations, and composes ONE answer with inline [N] citations back to the user's own documents; `brain audio` generates a two-host NotebookLM-style overview of a person or a topic. Use when a question needs several documents stitched together into an auditable answer, or when the user wants a listenable summary. For a single lookup, a quote, or drafting in the user's voice use `consult-brain`; for themes and connections across a relationship use `brain-graph`; for what is due for review use `brain-proactivity`. MANDATORY TRIGGERS: brain ask, brain audio, ask my brain properly, synthesize an answer, synthesize across my notes, cited answer, with citations, an answer with sources, multi-hop, what did we decide about, what did I learn about, pull it all together, connect the dots on, stitch my notes together, deep dive across my documents, walk me through what I know about, notebooklm, audio overview, two-host overview, podcast of my notes, narrate my notes.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If only the embedder is down, ask, brain search and brain recall all fall back to text-only matching and say so (ask prints Retrieval: …

    line 58
  2. Very specific:

    Default to plain brain ask.

    line 88
  3. Very specific:

    Always offer the underlying document: When the user pushes on a specific [N], hand them brain show <id> (see consult-brain) rather than …

    line 101
  4. Distinctive:

    Treat a non-zero exit as "no answer", never as "try harder".

    line 145
  5. Very specific:

    brain audio writes files by default: Use --json when the user only wants to read the script, and confirm before pointing --out anywhere …

    line 155

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Brain Ask

Two commands that both produce a composed artifact rather than a list of hits: brain ask writes one cited answer, brain audio writes a two-host script (and optionally synthesizes it). Both are grounded strictly in the user's own corpus, and both require a local Ollama.

ask vs search vs graph

DeliverableCommandSkill
A ranked list of documents you read yourselfbrain search --briefconsult-brain
Passages to read, capped at a token budgetbrain recall --budget Nconsult-brain
One composed answer with inline [N] citationsbrain askthis one
Themes, patterns, who-connects-to-whatbrain graphrag …brain-graph
A listenable two-host overviewbrain audiothis one

Reach for the manual search-then-read loop in consult-brain when you need raw documents in your context — voice mimicry, verbatim quoting, drafting. Reach for brain ask when the deliverable is the answer itself and the user wants to see where each claim came from.

recall vs ask — who does the reading

Both are bounded; they differ in where the reading happens.

  • brain ask does the reading on local Ollama and returns one composed answer (~1–2k tokens). The source text never enters your context. Choose it when the answer is the deliverable and you don't need the raw prose.
  • brain recall --budget N puts the passages themselves in your context, packed to fit within N tokens with [N] citations. Choose it when you must reason over, quote, or write from the actual wording — ask's synthesis would have already thrown that away.

Rule of thumb: if you would have followed ask with "now show me the source", you wanted recall. If the chat model (Ollama) is down, ask exits non-zero. If only the embedder is down, ask, brain search and brain recall all fall back to text-only matching and say so (ask prints Retrieval: text-only under the answer and "fallback": "fts_only" in --json; recall's header ends , text-only). They are the fallback, not a brain show loop. brain recall shares every filter with brain search; the full cost-ordered table lives in consult-brain, which is the one place it is maintained.

consult-brain also documents these two commands as part of its own workflow; that is deliberate overlap, not a conflict. Use this skill when synthesis is the point of the request.

brain ask

brain ask "what tradeoffs did we weigh on the retention policy"
brain ask "how did the migration plan change" --explain
brain ask "what is my position on on-call rotation" --no-loop
brain ask "who owns the ingest pipeline" --mode fuse -n 8
brain ask "summarize the pricing debate" --max-iter 2 --json
FlagPurpose
--modehybrid (default, vector/FTS only) | auto (graph router) | fuse (RRF of graph + hybrid) | local (graph, entity-centric).
--no-loopSkip plan/reflect — one retrieve + synthesize pass. Faster, shallower.
--limit / -nMax documents retrieved per iteration.
--max-iterHard cap on loop iterations.
--explainPrint the sub-query plan and the iteration trace.
--jsonStructured output instead of prose.

Default to plain brain ask. Add --explain when the user questions how an answer was reached, and --no-loop when they want speed over coverage. The three graph-backed modes (auto, fuse, local) need the Apache AGE image and a built graph; on a plain install, stay on hybrid.

Reading the citations

The answer carries inline [N] markers, each mapping to one of the user's documents. Two rules:

  • Never restate a claim the answer did not cite. An uncited sentence is the model's connective tissue, not something the corpus says. Do not promote it to a fact in your reply.
  • Always offer the underlying document. When the user pushes on a specific [N], hand them brain show <id> (see consult-brain) rather than re-summarizing what you already summarized.

An answer that says "the corpus does not cover this" is a correct answer. Do not re-run with broader flags until something appears — that manufactures confidence the documents do not support.

brain audio

brain audio --person "Jordan Alvarez"
brain audio --topic "platform migration" --turns 12
brain audio --topic "hiring" --out /tmp/hiring-overview
brain audio --person "Jordan Alvarez" --tts 'shell:/path/to/tts.sh'
brain audio --topic "pricing" --json

Exactly one of --person or --topic is required:

  • --person builds a themes overview (graph themes mode).
  • --topic builds a community-level overview (graph global mode) and needs brain graphrag communities build to have run first.

--turns caps the dialogue (positive even integer). --out sets the artifact base path, defaulting under $BRAIN_HOME/audio/. --tts synthesizes audio through a pluggable backend spec. --json prints the script and writes no files at all.

The .json and .md artifacts are written before TTS runs, so a failing TTS backend still leaves the script behind.

When it fails

SymptomCauseWhat to do
ask exits non-zero citing OllamaOllama is downSay so, offer brain search via consult-brain (it falls back to text-only matching when the embedder is down, and says so). Do not retry in a loop.
ask answers, with Retrieval: text-only / "fallback": "fts_only"Only the embedder is downRelay the answer and say it came from text-only matching, so it may miss documents a semantic search would find.
ask --mode auto/fuse/local errorsNo AGE image / no built graphFall back to --mode hybrid.
audio --topic finds no communitiesgraphrag communities build never ranRoute to brain-graph / brain-maintenance.
audio --person finds no such personName is not in the graphReport it plainly; do not guess spellings.

brain ask exits non-zero rather than returning a partial answer. That is deliberate — a half-retrieved synthesis reads exactly like a complete one. Treat a non-zero exit as "no answer", never as "try harder".

Safety rules

  • Only snippets reach the LLM in ask, and only entity names plus document summaries in audio — never full bodies. Do not work around that by pasting document bodies into a prompt yourself.
  • brain audio artifacts land in the gitignored audio/ directory. Never commit them. They are generated, personal, and often large; they do not belong in version control under any circumstance.
  • brain audio writes files by default. Use --json when the user only wants to read the script, and confirm before pointing --out anywhere outside the default directory.
  • There is no MCP tool for brain audio — it is CLI-only. Do not claim otherwise or invent a tool name for it.
  • Never present a brain ask answer as your own reasoning. It is a synthesis over the user's documents; say so, and keep the citations attached when you relay it.
  • Both commands are read-only against the corpus. Neither ingests, edits, nor deletes anything, so a failed run never needs cleanup.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.