Skip to content

Claude Code integration

knomit integrates with Claude Code as a persistent, shared knowledge base — durable, typed, signed facts with provenance that your agents build on instead of re-deriving.

This is not an agent’s private memory store that stashes and replays notes: it is a temporal graph of lessons — learned and discovered — that links, evolves, and can be read as of any moment in its history.

The integration is a balanced hybrid where hooks automate the obvious capture and recall moments, skills (slash commands) handle the deliberate ones, and a CLAUDE.md block carries the philosophy and when-to-use guidance. It deliberately does not auto-inject facts via PreToolUse — recall is a tool the agent reaches for, not a firehose.

From a project’s root:

Terminal window
knomit-bridge claude init --source <slug> [--repo <name>] [--profile code|chat|generic]

This renders embedded templates into the project:

FileOwnership
.mcp.jsonmerge-required (a companion file is written if one already exists)
.claude/settings.json (hook registration)merge-required
CLAUDE.md (knomit usage block)merge-required
.claude/skills/knomit-*/SKILL.md (all 10 commands)owned — always (over)written
  • --source is the source-code slug used in generated src:// refs (e.g. src://knomit/internal/store/service.go@<sha>). It defaults to --repo if omitted.
  • --repo defaults to the current directory’s basename.
CommandWhen to use
/knomit-recall <area>Before non-trivial work — surface invariants, decisions, anti-patterns for an area
/knomit-rememberRight after a discovery, a user correction, or a bug fix that exposed a hidden invariant
/knomit-decided <slug>The moment a tradeoff is resolved (incl. an AskUserQuestion answer), before starting the work it authorizes
/knomit-why <fact-path>Before relying on a fact — walk its provenance and flag stale anchors
/knomit-update <fact-path>A fact’s body/confidence/refs drifted — fix it in place
/knomit-retract <fact-path>A fact is wrong or its subject no longer exists — remove it
/knomit-bootstrap <area>An area has zero facts and you’re about to work in it — seed foundational facts
/knomit-reviewAfter a burst of fact-writing or a refactor — prune (dedup), distill (synthesis), reflect (methodology)
/knomit-hypothesizeUser-requested only — generate falsifiable predictions from synthesis facts
/knomit-principleUser-invoked only — author a designer principle (agents must not invoke; validation rejects agent attempts)

Registered in .claude/settings.json, each runs knomit-bridge claude hook <event>:

EventClaude Code triggerWhat it does
session-startSessionStartPre-warms the session: emits known principles, recent facts, and the per-area TOC as a system reminder
post-editPostToolUse(Edit/Write/MultiEdit)If an edited file matches a fact’s entities, nudges /knomit-update or /knomit-retract for possibly-stale facts
post-askPostToolUse(AskUserQuestion)After a resolved AskUserQuestion with non-obvious tradeoffs, nudges /knomit-decided before the authorized work begins
pre-compactPreCompactScans a wider window for capture-worthy moments and suggests /knomit-remember / /knomit-decided

The “is this moment worth capturing?” signal is computed entirely in the bridge via regex — there is no server-side /detect endpoint. Intents (correction, discovery, decision, fix-bug, gotcha…) are conversational signals, not fact kinds: a “fix-bug” moment might become an incident or a gotcha fact.

claude init --profile selects the MCP instruction set; code is the default and the right choice for a code repo. See MCP tools.