bootspring hook

Manage assistant hook configuration for Claude Code and Codex.

Overview

The hook command manages deterministic hook dispatching for AI assistants. Hooks inject memory context, session stats, and suggestions into every conversation automatically.

Usage

Loading code block...

Commands

CommandDescription
installWrite hook config to Claude and Codex settings, initialize .bootspring/memory/
statusShow installed hook configuration
doctorValidate hook configs for stale events and dispatcher drift
smoke [events...]Dry-run dispatcher handlers locally with sample payloads
memory-smokeVerify memory prompt injection with isolated fixtures
uninstallRemove all hook entries from Claude and Codex settings
dispatch <event>(Internal) Dispatch a hook event to handlers in order
profileManage hook profile (minimal, standard, strict)

Install Options

OptionDescription
--dry-runShow what would be written without modifying files

What hook install Does

  1. Writes deterministic hook config to .claude/settings.local.json and .codex/hooks.json
  2. Registers handlers in order: stats, suggest, recall
  3. Initializes .bootspring/memory/ with default blocks
  4. Auto-populates project context from repo metadata (package.json, git info, stack)

Hook Events

Hooks fire on these assistant lifecycle events:

EventDescription
UserPromptSubmitBefore a user prompt is sent (injects memory context)
PostToolUseAfter a tool completes (collects stats)
StopWhen the assistant stops (saves session snapshot)

Hook Profiles

ProfileDescription
minimalMemory recall only
standardMemory + stats + suggestions (default)
strictAll handlers + validation

Error Isolation

Each handler runs in its own subprocess. If one handler fails, the others continue unaffected. This prevents a broken stats collector from blocking memory injection.

Examples

Loading code block...