Skip to content

v0.5.0 — Claude Code integration

Latest

Choose a tag to compare

@Ars-Ludus Ars-Ludus released this 03 May 09:34
· 1 commit to main since this release

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 on UserPromptSubmit, retrieves relevant memories, injects <semcom_memory> block as additionalContext before the LLM call
  • stop.sh — fires on Stop, 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