Skip to content

feat: Go hook binaries, event coordination, and rlm-core default enablement - #9

Merged
rand merged 8 commits into
mainfrom
feat/go-hooks
Feb 2, 2026
Merged

rand merged 8 commits into
mainfrom
feat/go-hooks

Conversation

@rand

@rand rand commented Feb 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replace Python hook scripts with compiled Go binaries for faster startup
  • Add event schemas (JSON Schema) and Python event helpers for cross-plugin coordination
  • Add config migration (v1→v2) with backwards compatibility
  • Wire RLM complexity-check to all DP phases via SuggestedRLMMode
  • Enable rlm-core Rust backend by default (USE_RLM_CORE=true)
    • Add metadata/provenance/embedding support to PyO3 bindings (in rlm-core repo)
    • Add delegation helpers to MemoryStore with separate -core.db for schema isolation
    • Fix pre-existing bug: hyperedge queries used wrong column name (edge_type vs type)
    • Remove requires_python_backend skip markers from integration tests
    • Add rlm_core import verification to session-init

Test plan

  • go test ./... — all Go tests pass
  • RLM_USE_CORE=true pytest tests/ — all tests pass (229 key tests verified)
  • RLM_USE_CORE=false pytest tests/ — fallback path works
  • Default (no env var) — defaults to rlm-core, all pass
  • End-to-end smoke test: node CRUD, search, edges, confidence logging, evolution log
  • Smart router: classification, route_core(), provider fallbacks all working

🤖 Generated with Claude Code

rand and others added 7 commits February 1, 2026 10:06
- Add Go hook infrastructure (hookio, events packages) for ~5ms startup
  vs ~500ms Python cold start
- Implement session-init (CLAUDE_ENV_FILE venv bootstrap), complexity-check
  (DP phase-aware), and trajectory-save Go binaries
- Convert UserPromptSubmit, PostToolUse, PreCompact to prompt-based hooks
- Add hook-dispatch.sh with platform detection and Python fallback
- Move Python scripts to scripts/legacy/ (RLM_USE_LEGACY_HOOKS=1 to restore)
- Add GitHub Actions CI for cross-platform binary builds and releases
- Add Makefile with dev/all/test/clean targets for 5 platforms

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- 9 tests for hookio (input parsing, output format, session context,
  env helpers, malformed input handling)
- 7 tests for events (emit/read, JSONL append, DP phase mapping,
  RLM mode detection, suggested mode mapping)
- All tests pass with -race detector

Co-Authored-By: Claude Opus 4.5 <[email protected]>
When multiple Bash calls run in parallel and one returns non-zero
(e.g., grep/ls with no matches), Claude Code cancels all sibling
calls. Added platform guidance so the orchestrator can make informed
decisions about when to parallelize vs sequence exploratory commands.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add internal/config package with V1→V2 config migration (preserves user
  customizations, creates .v1.bak backup)
- Add JSON Schema files for RLM events (trajectory, mode-change, memory-evolution)
  and shared coordination schemas (request/response)
- Add Python event emission/consumption helpers (src/events/) matching Go API
- Integrate config.Load() into session-init for both fast and first-run paths

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace hardcoded spec/review check with events.SuggestedRLMMode()
- Update PostToolUse prompt with DP phase-to-RLM mode alignment guidance

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Flip USE_RLM_CORE default to True in config.py
- Add rlm_core delegation helpers to MemoryStore (create, get, delete,
  query, search) with separate -core.db to avoid schema conflicts
- Fix pre-existing bug: hyperedge queries used row["type"] instead of
  row["edge_type"] matching the actual SQLite column name
- Remove requires_python_backend skip markers from integration tests
  (metadata/confidence/session isolation all work with rlm_core now)
- Add rlm_core import verification to session-init Go binary
- Keep Python SQLite as primary store for full API compatibility (FTS5,
  confidence logging, evolution log, access tracking, hyperedges)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@rand rand changed the title feat: replace Python hooks with Go binaries feat: Go hook binaries, event coordination, and rlm-core default enablement Feb 2, 2026
- Document rlm-core enabled by default in CHANGELOG
- Document hyperedge bug fix in CHANGELOG
- Update README to reflect new default (USE_RLM_CORE=true)
- Update performance comparison table
- Update config reference table

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@rand
rand merged commit 2d325a7 into main Feb 2, 2026
1 check passed
@rand
rand deleted the feat/go-hooks branch February 2, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant