compaction
Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and…
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.
$ npx -y skills add kevin-hs-sohn/hipocampus --skill search --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/searchContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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."
| 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` |
Check `hipocampus.config.json`:
`memory/ROOT.md` is a functional index of everything in memory, auto-loaded every session. It has four sections:
**Before any lookup, check ROOT.md first:**
**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.
When using `qmd search` (BM25 mode), queries must be **keywords**, not natural language.
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
| Bad (natural language) | Good (keywords) | |------------------------|-----------------| | "How do I configure the database?" | "database config" | | "What did we decide about caching?" | "caching decision" |
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.
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:
The compaction tree and checkpoint protocol are fully independent of qmd. Search is a convenience layer, not a requirement.
If qmd is installed, re-index after changing memory or knowledge files:
qmd update
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.
Repo: kevin-hs-sohn/hipocampus
Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and…
3-tier agent memory system with 5-level compaction tree. Claude Code version. Defines session…
Manual memory flush: dump current session context to daily raw log via subagent. Invoke with…
Memory recall guide. Structured retrieval from hipocampus memory — ROOT.md triage,…