Hooks inject memories at the right moment. Individual scripts in hooks/ handle each lifecycle event, configured via hooks.json (plugin) or ~/.claude/settings.json (standalone).
.cc-soul-realm, or git repofull_resonate search — semantic recall with realm filteringanticipation_predict — predict likely actions from context patterns[SOLUTION], [GOTCHA], [PREFERENCE], [DECISION], [FAILURE], [PATTERN] markersanticipation_observe — record context→action patternhooks.json to wire lifecycle events to individual scripts in hooks/. Activated when running as a Claude Code plugin via claude --plugin-dir or the plugins list.
hooks.json file defines event matchers that dispatch to dedicated scripts: session-start-hook.sh, prompt-hook.sh, stop-hook.sh, etc.
~/.claude/settings.json to wire lifecycle events to the same individual scripts in hooks/. Installed by smart-install.sh.
session-start-hook.sh, prompt-hook.sh, stop-hook.sh, pre-compact-hook.sh, pre-tool-hook.sh, post-bash-hook.sh.
Hooks automatically detect patterns in Claude’s responses and user messages, storing learnings without explicit commands.
learn_correction to store the mistake and the correct approach as a high-confidence counter-memory.
"actually" "that's wrong" "I was mistaken"learn_preference to store as a global preference visible across all projects.
"I prefer" "don't do X" "always Y"learn_milestone to record the achievement as a relationship marker.
"shipped" "released" "finished"learn_approach to improve future interactions.
"no" "stop" "wrong"The hook system learns context→action patterns over time, anticipating what you need before you ask.
anticipation_predict checks if the current context matches known patterns. If a match is found, the predicted action is surfaced in the system prompt alongside recalled memories.
anticipation_observe records what action was taken in response to context. This builds the pattern database that predictions draw from.
anticipation_success. Patterns that consistently predict correctly become stronger over time.
chittad background process./tmp/chitta-{hash}.sock where {hash} is the djb2 hash of the mind database path. Each mind gets a unique socket.
chitta thin client if the socket is unavailable.
/tmp/chitta-{hash}.pid for daemon management. Used by subconscious.sh for start, stop, restart, and health check operations.
The smart-install.sh script writes the following hook configuration into ~/.claude/settings.json, wiring each lifecycle event to its dedicated entry-point script.
{ "hooks": { "SessionStart": [{ "type": "command", "command": "~/.claude/hooks/session-start-hook.sh" }], "UserPromptSubmit": [{ "type": "command", "command": "~/.claude/hooks/prompt-hook.sh" }], "Stop": [{ "type": "command", "command": "~/.claude/hooks/stop-hook.sh" }], "PreCompact": [{ "type": "command", "command": "~/.claude/hooks/pre-compact-hook.sh" }], "PreToolUse": [{ "type": "command", "command": "~/.claude/hooks/pre-tool-hook.sh" }], "PostToolUse": [{ "type": "command", "command": "~/.claude/hooks/post-bash-hook.sh" }] } }