| name | query-vault |
| description | Research questions against the wiki vault. Navigates indexes and wikilinks, synthesizes answers from wiki articles, and offers to file results back into the wiki. Use when asking questions about vault content, researching topics, comparing concepts, or generating outputs from the knowledge base. |
Answer research questions by navigating the wiki vault โ using indexes to locate relevant articles, following wikilinks for depth, and synthesizing grounded answers with citations. After generating outputs, offer to file insights back into the wiki so every query compounds the knowledge base.
<quick_start>
- Read
wiki/_index.md to locate relevant articles by title and summary
- Check domain indexes (files starting with
_ in wiki/) for curated context
- Read the most relevant articles, following wikilinks for depth
- Synthesize answer with
[[wikilinks]] citations
- Save non-trivial outputs to
outputs/research/ or outputs/slides/
- Offer to file insights back into the wiki
</quick_start>
The vault root is determined by the current working directory. Key paths:
wiki/ โ Flat knowledge base; one article per concept, tool, person, or company
wiki/_index.md โ Master index: every article with a one-line summary (start here)
- Domain indexes โ files starting with
_ in wiki/ (curated narrative overviews per domain)
outputs/research/ โ Filed research answers (markdown with frontmatter)
outputs/slides/ โ Marp-format slide decks
docs/conventions.md โ Full schema and rules
Every wiki article has frontmatter: title, type, domains, status, created, updated, sources, related. Articles use dense [[wikilinks]]. No tags.
Query types:
- Factual lookup โ "what is RAG?", "who is Andrej Karpathy?" โ one or two articles, direct answer
- Comparison โ "compare agent frameworks", "GPT-4 vs Claude" โ multiple articles, structured table
- Research question โ "state of AI safety", "how do MoE models work?" โ domain index + multiple articles, narrative synthesis
- Output request โ "create slides on agents", "write a report on evals" โ research then generate artifact
**Step 1: Understand the query**
Parse what the user is asking and classify it:
- Is this a factual lookup? โ find the one or two most relevant articles
- Is this a comparison? โ identify both sides, find articles for each
- Is this a research question? โ check the relevant domain index first, then read multiple articles
- Is this an output request? โ determine format (research doc, slides), then research first
For ambiguous queries, make a reasonable assumption and proceed โ don't ask clarifying questions unless the query is genuinely impossible to interpret.
Step 2: Navigate the wiki
- Read
wiki/_index.md to find relevant articles by scanning titles and summaries. Identify 3-10 candidates.
- Check the most relevant domain index for curated narrative context and to discover related articles you might have missed.
- Read the top 2-5 wiki articles in full. Follow
[[wikilinks]] one level deep when they point to directly relevant content.
- If the wiki doesn't have enough information, say so clearly. Name what's missing and suggest what sources could be added to
raw/ to fill the gap (e.g., specific papers, blog posts, documentation).
Do not read every article speculatively. Use the index to navigate efficiently.
Step 3: Synthesize the answer
- Ground every claim in wiki articles, citing with
[[wikilinks]]
- Be honest: distinguish what the wiki covers from what it doesn't
- For factual lookups: 1-3 paragraphs, direct and dense
- For comparisons: lead with a summary, then use a structured table, then nuance
- For research questions: narrative with clear sections, citations throughout
- For output requests: research first (steps 1-2), then generate the artifact
Step 4: Choose output format
Match output format to query complexity:
- Quick answer (factual lookup, simple comparison) โ respond in chat only, do not save
- Research answer (multi-article synthesis, research questions) โ save to
outputs/research/YYYY-MM-DD-topic.md:
---
title: "Query answer title"
query: "Original question"
created: YYYY-MM-DD
articles_consulted:
- "[[Article 1]]"
- "[[Article 2]]"
filed: false
---
- Slides (output request for a deck) โ save to
outputs/slides/YYYY-MM-DD-topic.md in Marp format:
---
marp: true
theme: default
---
# Title
After saving, tell the user the file path.
Step 5: Append log entry
After saving any non-trivial output (research answer or slides), append to wiki/log.md:
## [YYYY-MM-DD] query | Query summary
- Consulted: [[Article 1]], [[Article 2]]
- Output: outputs/research/YYYY-MM-DD-topic.md
- Filed back: yes/no
Step 6: Offer to file back
After generating a research answer or slides, ask:
"Want me to file these insights back into the wiki?"
If yes:
- Identify key insights from the synthesis that add new knowledge or sharpen existing articles
- Update existing wiki articles with those insights (add to body, update
updated: date, extend related: if needed)
- Create new wiki articles if the synthesis revealed concepts not yet in the wiki (apply the full frontmatter schema from
docs/conventions.md)
- Update
wiki/_index.md if new articles were created
- Update the relevant domain index if new articles belong to an existing domain
- Set
filed: true in the output file's frontmatter
This is the critical feedback loop: every query should leave the wiki smarter than before.
<anti_patterns>
- Do not answer from general knowledge when the wiki has relevant articles โ always check the wiki first, even for topics you know well
- Do not generate large research docs or slides for simple factual lookups โ match output size to query complexity
- Do not skip the "file back" offer after generating research answers or slides โ this is what makes the wiki compound over time
- Do not read every article speculatively โ use
_index.md and domain indexes to navigate, then read only the most relevant articles
- Do not fabricate citations โ only use
[[wikilinks]] that correspond to real articles you actually read
- Do not create new wiki articles during the "file back" step unless the synthesis genuinely revealed a concept not yet covered
</anti_patterns>
<success_criteria>
- Answer is grounded in wiki articles with accurate
[[wikilink]] citations
- Output format matches query complexity (chat for simple, saved file for research/slides)
- Gaps in wiki coverage are surfaced clearly with specific suggestions for what to add
- Research answers and slides are saved with correct frontmatter to the right output directory
- After non-trivial outputs, the "file back" offer is made
- Filing back actually updates the wiki โ existing articles improved, new articles created with full frontmatter, indexes updated
</success_criteria>