docs: finish splitting README into component docs

README is now just an overview with links. Component docs:
- docs/memory.md: store design, algorithms, config, CLI reference
- docs/hooks.md: Claude Code integration setup
- docs/daemon.md, docs/notifications.md: from previous commit
This commit is contained in:
Kent Overstreet 2026-03-07 13:57:55 -05:00
parent 908f8c9e52
commit 9e6cf3b830
3 changed files with 187 additions and 190 deletions

49
docs/hooks.md Normal file
View file

@ -0,0 +1,49 @@
# Hooks
Hooks integrate poc-memory into Claude Code's session lifecycle.
Two hook binaries fire on session events, providing memory recall
and notification delivery.
## Setup
Configured in `~/.claude/settings.json`:
```json
{
"hooks": {
"UserPromptSubmit": [{"hooks": [
{"type": "command", "command": "memory-search", "timeout": 10},
{"type": "command", "command": "poc-hook", "timeout": 5}
]}],
"PostToolUse": [{"hooks": [
{"type": "command", "command": "poc-hook", "timeout": 5}
]}],
"Stop": [{"hooks": [
{"type": "command", "command": "poc-hook", "timeout": 5}
]}]
}
}
```
## memory-search (UserPromptSubmit)
Fires on every user prompt. Two modes:
1. **First prompt or post-compaction**: loads full memory context
via `poc-memory load-context` — journal entries, identity nodes,
orientation file, configured context groups.
2. **Every prompt**: keyword search over the knowledge graph,
returns relevant memories as `additionalContext`. Deduplicates
across the session to avoid repeating the same memories.
## poc-hook (UserPromptSubmit, PostToolUse, Stop)
Signals session activity to `poc-daemon` and delivers pending
notifications:
- **UserPromptSubmit**: signals user activity, drains pending
notifications into `additionalContext`
- **PostToolUse**: signals assistant activity (tool use implies
the session is active)
- **Stop**: signals session end, triggers experience-mine