Collapse doc/ and docs/
This commit is contained in:
parent
79e384f005
commit
6fa881f811
6 changed files with 0 additions and 0 deletions
|
|
@ -1,49 +0,0 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue