kb
Installation
SKILL.md
kb CLI and Knowledge Base Pattern
kb maintains an Obsidian markdown knowledge base in the Karpathy LLM Wiki pattern. kb ingests sources, and its decision model gates, classifies and links them. You, the agent, compile wiki articles from the sources, answer questions from the wiki and file the answers back, and run lint-and-heal passes.
- Topic. Each topic is a folder in the vault: at the root (
go-best-practices/) or nested by[vault].topic_globs(harness/goclaw/).CLAUDE.mdis the topic marker and schema document (scope, conventions, current articles, gaps;AGENTS.mdmay symlink to it).topic.yamlholdsslug,title,domain,modeand the selection contract. kb renders the contract intoCLAUDE.mdunder## Selection contract; change it withkb topic contract, never inCLAUDE.md. - Mode.
mode: wiki(default;raw/,wiki/,outputs/,bases/,log.md, the ingest → compile → query → lint loop) ormode: okf(a flat, portable Open Knowledge Format bundle of typed concepts, filled bykb promote). - Division of labour. The decision model only judges text (yes/no, choice, score) and a small generation model only writes short literals (summaries, criteria, aliases, drafts); code applies thresholds and writes files. You write and update article prose, decide what to ingest, draft or edit contracts, and give the human verdicts in
kb review.
references/architecture.md has the rationale (compiler analogy, context window vs RAG, multi-topic vaults).