kb-memory
The shared brain is a git repo of markdown notes. Location is configurable: use
$KB_DIR if set, else run kb root to resolve it (default ~/kb). All commands
below go through the kb CLI (in the repo's scripts/, or on PATH after install).
Read (on the way in)
Before answering anything non-trivial:
kb index— readMEMORY.md, the one-line-per-note index.- Open the
memory/**/*.mdnotes whose hook matches the task (recursive — notes are nested undermemory/<group>/…). Skip reserved files (index.md,log.md,_TEMPLATE.md) — they are not concept notes. - Need fresher/deeper detail? Fetch a note's
sources:URLs (the…/llms.txt).
Write (on the way out)
- Unsure if durable → quick-capture:
kb capture "<rough note>"(appends toraw/inbox/<today>.md). The dream pass distills it later. - Known keeper → add a standard note in
memory/<group>/…(group ∈user,feedback,reference,projects, ortopics/<domain>) followingmemory/_TEMPLATE.md: top-level frontmatter (name== filename,description,type∈ user|feedback|project|reference|tech,tags,created,updated,timestampISO 8601; optionaltitle/category/aliases/related/sources). Link related notes with[[slug]]. Add a one-line pointer toMEMORY.md. - Then
kb lint(enforce the standard),kb gen(regenerate the OKFindex.mdfiles +viz.html), andkb sync(pull/commit/push).
Scope
Public, durable, general facts only — this repo is public. Never store secrets,
SSH hosts, internal/confidential details. See $KB_DIR/AGENTS.md for the full
protocol and kb-dream for consolidation.