Skip to content
Agent Memory
Skill

/search

Search memory using qmd (BM25 + optional vector) and compaction tree traversal. Use ROOT.md to decide whether to search memory or look externally. Always check memory before external lookups.

From plugin
hipocampus
2115 skills3 hooks

Claude Code

$ npx -y skills add kevin-hs-sohn/hipocampus --skill search --agent claude-code

SKILL.md

search.SKILL.md
name: hipocampus-search
description: "Search memory using qmd (BM25 + optional vector) and compaction tree traversal. Use ROOT.md to decide whether to search memory or look externally. Always check memory before external lookups."

Hipocampus Search

Quick Reference

| Action | Command | |--------|---------| | Hybrid search (best quality) | `qmd query "keyword1 keyword2"` | | Keyword search (fast) | `qmd search "keyword1 keyword2"` | | Vector search only | `qmd vsearch "semantic query"` | | Find files | `qmd search "query" --files` | | Read file | `qmd get "path/to/file.md"` | | Re-index | `qmd update` |

Which Search to Use

Check `hipocampus.config.json`:

  • `search.vector: true` (default) → `qmd query` for best results (BM25 + vector + rerank)
  • `search.vector: false` → `qmd search` for BM25 keyword search

ROOT.md — "Do I Know About This?"

`memory/ROOT.md` is a functional index of everything in memory, auto-loaded every session. It has four sections:

  • **Active Context** — current week's work and priorities (immediate situational awareness)
  • **Recent Patterns** — cross-cutting insights not tied to a specific time period
  • **Historical Summary** — high-level chronology of past periods
  • **Topics Index** — keyword lookup table for O(1) "do I know about X?" judgment

**Before any lookup, check ROOT.md first:**

  • Topic found in Topics Index → search memory (qmd or tree traversal)
  • Topic NOT in Topics Index → use external search or answer from general knowledge
  • This eliminates "loading to decide whether to load" — ROOT.md is always in context

**This is the core value of the compaction tree.** Search only works when you know what to search for. The Topics Index tells you what you know at a glance.

BM25 Query Construction

When using `qmd search` (BM25 mode), queries must be **keywords**, not natural language.

Rules

1. Use **2-4 specific keywords** — more precise = better results 2. **No natural language** — strip filler words 3. **Try variations** — if first query misses, use synonyms or related terms

Examples

| Bad (natural language) | Good (keywords) | |------------------------|-----------------| | "How do I configure the database?" | "database config" | | "What did we decide about caching?" | "caching decision" |

Tree Traversal

When qmd search returns insufficient results, traverse the compaction tree:

1. ROOT.md Topics Index → confirm topic exists, note any file references
2. ROOT.md Historical Summary → identify relevant time period
3. memory/monthly/YYYY-MM.md → identify relevant week
4. memory/weekly/YYYY-WNN.md → identify relevant day
5. memory/daily/YYYY-MM-DD.md → detailed view
6. memory/YYYY-MM-DD.md → full raw original

Always try qmd search first. Tree traversal is the fallback.

When to Search

  • **Before any external lookup** — check ROOT.md, then search memory
  • **Resuming prior work** — search for task context, past progress
  • **Past decisions** — search daily logs and knowledge files
  • **Credentials/configs** — search before asking user

Without qmd

If qmd is not installed (e.g., `--no-search` was used during init, or the user has a different RAG tool), the memory system still works:

  • **ROOT.md** is always available — use the Topics Index for "do I know about this?" judgment
  • **Tree traversal** works without qmd — just read the files directly: ROOT → monthly/ → weekly/ → daily/ → raw
  • **Manual file reads** — use `ls memory/daily/` to find files, then read them
  • Skip `qmd update` / `qmd search` commands — they will fail silently

The compaction tree and checkpoint protocol are fully independent of qmd. Search is a convenience layer, not a requirement.

After Modifying Files

If qmd is installed, re-index after changing memory or knowledge files:

qmd update
Read more
@kevin-hs-sohn
Ships withhipocampus

Drop-in proactive memory harness for AI agents. Zero infrastructure — just files. One command to set up. Works immediately with Claude Code, OpenCode, and OpenClaw.

Stars on GitHub

Momentum

stars in total
211
Star history of kevin-hs-sohn/hipocampus on GitHub, a chart by star-history.com

Other skills on hipocampus.

compaction

compaction

Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle. Run at session…

core

core

3-tier agent memory system with 5-level compaction tree. Claude Code version. Defines session start protocol, end-of-task…

flush

flush

Manual memory flush: dump current session context to daily raw log via subagent. Invoke with /hipocampus:flush. Run…

recall

recall

Memory recall guide. Structured retrieval from hipocampus memory — ROOT.md triage, manifest-based LLM selection, qmd search…

More skills from other plugins.

agent-cost-report

agent-cost-report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…

@thedotmack@thedotmackInstall Skill
bot-handoff

bot-handoff

Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…

@vectorize-io@vectorize-ioInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@mempalace@mempalaceInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@milla-jovovich@milla-jovovichInstall Skill

Questions about search.

Which coding agents can use search?
search installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.