Memory
Search first: /mnemonic:search {relevant_keywords}
Capture after: /mnemonic:capture {namespace} "{title}"
Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.
Mnemonic Search Skill
Search and filtering for mnemonic memories.
Trigger Phrases
- "search memories", "find in memories", "grep memories", "search mnemonic"
- "deep search memories", "comprehensive memory search", "synthesize knowledge about"
Core Search Patterns
By Namespace
rg "^namespace: _semantic/decisions" ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
By Tag
# Single tag
rg -l "^ - architecture" ${MNEMONIC_ROOT}/ --glob "*.memory.md"
# Multiple tags (AND)
rg -l "^ - architecture" ${MNEMONIC_ROOT}/ --glob "*.memory.md" | xargs rg -l "^ - database"
By Type
rg "^type: semantic" ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
rg "^type: episodic" ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
rg "^type: procedural" ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
By Date
rg "^created: 2026-01" ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
By Title
rg -i '^title: ".*auth.*"' ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
By Confidence
rg "confidence: 0\.9" ${MNEMONIC_ROOT}/ --glob "*.memory.md" -l
Full-Text
rg -i "search term" ${MNEMONIC_ROOT}/ --glob "*.memory.md"
Combined: Namespace + Text
rg "database" ${MNEMONIC_ROOT} --path "*/_semantic/decisions/" --glob "*.memory.md"
Recent Files
find ${MNEMONIC_ROOT} -name "*.memory.md" -mtime -7
Progressive Disclosure Protocol
Always start at Level 1. Expand only if needed.
| Level | What | How |
|---|---|---|
| 1 (start here) | Titles only | rg -l "pattern" ${MNEMONIC_ROOT}/ --glob "*.memory.md" then extract ^title: |
| 2 | Frontmatter + summary | Read first ~50 lines of matched files |
| 3 | Full detail | Read entire memory file |
Semantic Search (requires qmd)
If @tobilu/qmd is installed (see /mnemonic:qmd-setup):
# BM25 keyword search (ranked)
qmd search "authentication middleware" -n 10
# Semantic vector search (meaning-based)
qmd vsearch "how do we handle user sessions" -n 10
# Hybrid search (BM25 + vector combined)
qmd query "authentication patterns" -n 10
# Scope to collection
qmd search "auth" -c mnemonic-zircote
| Tool | Best For | Requires |
|---|---|---|
rg | Exact strings, regex, frontmatter fields | Nothing |
qmd search | Ranked keyword search, typo-tolerant | qmd update |
qmd vsearch | Conceptual/meaning-based queries | qmd embed |
qmd query | Best overall recall, combines both | Both |
After adding memories, run /mnemonic:qmd-reindex to update indexes.
Enhanced Search (Iterative with Synthesis)
For complex or multi-faceted queries:
- Initial search with user's query
- Analyze results for gaps
- Iterative refinement (up to 3 rounds via Task tool with
mnemonic-search-subcallagent) - Synthesize findings into a coherent answer with source citations
Use when queries span multiple namespaces or need comprehensive coverage.
Output Format
## Synthesized Answer
{Answer drawing from all found memories}
### Sources
| Memory | Namespace | Relevance |
|--------|-----------|-----------|
| [[memory-id]] title | namespace | High/Medium |
### Gaps
- {Topics where no memories were found}
