How it works

kenkeep runs a loop around your AI sessions. Capture and injection happen on their own. You trigger curation, and you decide what to keep.

kenkeep knowledge lifecycle: capture transcripts, curate them into reviewed notes, and inject them back into every session

1. Capture (automatic)

When a session ends, a hook saves the transcript to .ai/kenkeep/_sessions/. You don’t run this; it happens on its own. Each harness fires capture on the lifecycle events its runtime emits: Claude on Stop, SessionEnd, and PreCompact; Codex on Stop; Cursor on stop, sessionEnd, and preCompact; OpenCode on session.idle; and GitHub Copilot CLI on sessionEnd and agentStop, reading the per-session events.jsonl transcript under ${COPILOT_HOME:-~/.copilot}/session-state/<sessionID>/.

2. Curate (you start it, the AI does most of the work)

Run /kk-curate (the system nudges you once transcripts pile up). It reads the captured sessions, drafts proposed notes, writes them under .ai/kenkeep/nodes/, then rebuilds INDEX.md and GRAPH.md.

When a proposed note contradicts one you already have, the curator never overwrites it silently. It records the conflict, and /kk-curate walks each one with you: accept the new note, reject it, or keep the conflict as a record. This walkthrough is the only way contradictions get resolved.

3. Review (you decide)

The files under nodes/ are plain markdown. Review them with git diff, then keep with git commit or drop with git restore <path>. These notes shape every future session, so this is the one place a human stays in the loop.

What’s stored

Every kept fact is a markdown file under nodes/, in one of two kinds:

  • Practice: how we build. Conventions, prohibitions, gotchas.
  • Map: what exists. Modules, services, vocabulary.

Two files are regenerated from nodes/ automatically: INDEX.md, the catalog injected into every new session, and GRAPH.md, the cross-reference graph the harness reads on demand. Everything is plain text, diffable and version-controlled like any code. Full frontmatter shape: Schemas.

For how the AI actually runs inside your harness session, see Internals, Architecture.