Repository navigation
What's new
Claude Code self-instrumentation — semcom now injects its own memories and ingests its own responses when running as a Claude Code agent.
Two hook scripts installed to ~/.local/share/semcom/hooks/claude-code/:
user-prompt-submit.sh— fires onUserPromptSubmit, retrieves relevant memories, injects<semcom_memory>block asadditionalContextbefore the LLM callstop.sh— fires onStop, extracts the last assistant response from the session JSONL, ingests it into memory
Adapter layer — semcom_adapter/claudecode harness handles Claude Code's hook event format. New /hooks/claude route on the semcom server.
Setup
After installing, add to ~/.claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [{"hooks": [{"type": "command", "command": "~/.local/share/semcom/hooks/claude-code/user-prompt-submit.sh"}]}],
"Stop": [{"hooks": [{"type": "command", "command": "~/.local/share/semcom/hooks/claude-code/stop.sh"}]}]
}
}The installer prints this snippet automatically if ~/.claude is detected.
Upgrading from v0.4.x
mkdir -p ~/.local/share/semcom/install && cd ~/.local/share/semcom/install
curl -fsSL https://github.com/Ars-Ludus/semcom-install/releases/latest/download/semcom-release.tar.gz | tar xz
bash install.sh