agentleFS
criptoguscriptogus/brainstack/skills/retrieval/SKILL.md

retrieval

Skill4 starsChanged 4 months agoMITView on GitHub

Use when answering questions from a vault - finding what the brain knows about a topic, person, or company. Hybrid semantic search + Iron Law backlinks, with synthesis and gap analysis. Consult the vault before any external API.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Don't use for: storing new knowledge (see capture / memory), or nightly maintenance (see consolidate).

    line 26
  2. Distinctive:

    Never fabricate: if the vault is silent, say so.

    line 40
  3. Distinctive:

    Synthesis over dump: never paste whole notes as the answer.

    line 59
  4. Distinctive:

    Cite or abstain: every claim traces to a note.

    line 61
  5. Very specific:

    Freshness matters: check now/recent.md first - the answer may be in today's changelog, not in the index.

    line 63
  6. Very specific:

    After structural changes (moves, renames, new folders), reindex: python3 bin/semantic-index.py --rebuild (or the provided script).

    line 71
  7. Distinctive:

    Answering from memory alone: If the fact is not in the vault, either it was never captured (capture it now) or it is not a fact yet.

    line 79
  8. Distinctive:

    Trusting a stale index: Check index freshness before trusting a negative result ("vault has nothing" may be "index is outdated").

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Retrieval

Answer questions from the brain, not from guesses. Retrieval combines two complementary paths - the semantic index (search by meaning) and the Iron Law backlinks (walk the graph) - and always synthesizes instead of dumping.

When to Use

  • "What do we know about X?" (topic, person, company, project)
  • Preparing context before a meeting, decision, or conversation
  • Checking whether the brain already has something before searching externally
  • Answering with evidence: what the vault says + what is missing

Don't use for: storing new knowledge (see capture / memory), or nightly maintenance (see consolidate).

The protocol

  1. Brain-first lookup: consult the vault BEFORE any external API. The external world is the second stop, not the first.
  2. Two paths, always both:
    • Semantic: query the local index (python3 bin/semantic-search.py "your question").
    • Graph: start from the entity page (person/company) and walk its backlinks ("Referenced in" section) plus its linked notes.
  3. Synthesize + gap analysis: answer from the vault in your own words, citing sources, then state what the vault does NOT have and where to get it.
  4. Never fabricate: if the vault is silent, say so. Do not invent facts to fill the silence - the gap analysis exists exactly for this.

Anatomy of a good answer

## Answer
<the synthesis, 2-5 bullets, citing note titles>

## Sources
- [[Note Title]] - what it says
- [[Entity Page]] - backlink context

## Gaps
- The vault has nothing on <X>. Suggested source: <where to look>

Rules

  • Synthesis over dump: never paste whole notes as the answer. The vault is the brain; your answer is the thought.
  • Cite or abstain: every claim traces to a note. If it can't, mark it as inference, not fact.
  • Freshness matters: check now/recent.md first - the answer may be in today's changelog, not in the index.
  • RAG policy: respect governance/corpus.json (or equivalent) - some folders are deliberately excluded from the index (secrets, drafts). Never bypass the corpus policy to read excluded content.

Index maintenance

  • After structural changes (moves, renames, new folders), reindex: python3 bin/semantic-index.py --rebuild (or the provided script).
  • A stale index answers yesterday's brain. The health skill flags staleness.

Common Pitfalls

  1. External-first. Reaching for search engines before the vault trains the brain to atrophy. Vault first, always.
  2. Answering from memory alone. If the fact is not in the vault, either it was never captured (capture it now) or it is not a fact yet.
  3. Dumping notes as answers. Synthesis is the product; notes are the inputs.
  4. Ignoring the gap. An answer without a gap section looks complete but hides what's missing. Say it explicitly.
  5. Searching only strings. The graph path (backlinks) finds what keywords miss - entity pages accumulate context from every note that mentions them.
  6. Trusting a stale index. Check index freshness before trusting a negative result ("vault has nothing" may be "index is outdated").

Verification Checklist

  • Vault consulted before any external source
  • Both paths used: semantic search + backlink graph (when entity involved)
  • Answer synthesized with citations, no full-note dumps
  • Gap analysis included (what's missing + where to find it)
  • No fabricated facts - silence admitted when the vault is silent

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.