KB Query
Search, answer, and generate outputs from the approved live layer.
In Karpathy's words: "good answers can be filed back into the wiki as new pages." In this bundle, that compounding still respects draft -> review -> live. Strong query results archive cleanly, then feed later writeback or maintenance work.
When a user speaks in the simpler raw/wiki/output language from Chinese-LLM-Wiki, translate it instead of widening the truth boundary:
综合页usually means a grounded reusable analysis, so start inoutputs/qa/**output/analysesmaps to archived grounded analysis, not approved truth先读 wiki/index.mdremains the default navigation posture
Minimal loop
- locate the best approved live pages and briefings
- answer or draft the artifact from
wiki/live/ - archive the result when it is substantive
- record the smallest durable delta that should flow back through review later
Read before querying
- local
AGENTS.md - local
CLAUDE.mdif present ../obsidian-notes-karpathy/scripts/skill-contract-registry.json../obsidian-notes-karpathy/references/file-model.md../obsidian-notes-karpathy/references/archive-model.md../obsidian-notes-karpathy/references/qa-template.md../obsidian-notes-karpathy/references/query-writeback-lifecycle.md
Treat skill-contract-registry.json as the canonical source for required references, baseline command, and expected write surfaces.
If onkb is available, run onkb --json query scope <vault-root> first and treat its output as the deterministic baseline for live-layer retrieval boundaries.
If onkb is missing, follow the install fallback in ../obsidian-notes-karpathy/references/lifecycle-matrix.md, then rerun the same command.
Then start with:
wiki/index.mdwiki/live/indices/INDEX.mdwiki/live/indices/CONCEPTS.mdwiki/live/indices/SOURCES.mdwiki/live/indices/TOPICS.mdwhen presentwiki/live/indices/QUESTIONS.mdwhen present- relevant
wiki/briefings/{role}.mdwhen the request maps to a role - prior
outputs/qa/
The navigation indices (INDEX.md, CONCEPTS.md, SOURCES.md, TOPICS.md, RECENT.md) and the managed onkb:indices block in wiki/index.md are rebuilt deterministically by onkb review indices, so treat them as trustworthy entry points. If they look stale relative to wiki/live/**, run onkb --json review indices <vault-root> as a dry drift check and route the repair through kb-review maintenance mode instead of hand-editing them.
Load on demand
Load these only when the trigger applies:
../obsidian-notes-karpathy/references/chinese-llm-wiki-compat.md— when the request leans on Chinese-LLM-Wiki vocabulary beyond the mappings inlined in this SKILL../obsidian-notes-karpathy/references/lifecycle-matrix.md— whenonkbis missing (install fallback) or a stage handoff is unclear../obsidian-notes-karpathy/references/briefing-template.md— when rebuilding or repairingwiki/briefings/**../obsidian-notes-karpathy/references/content-output-template.md— when producing publish-mode artifacts underoutputs/content/../obsidian-notes-karpathy/references/activity-log-template.md— when appending an entry towiki/log.md../obsidian-notes-karpathy/references/questions-and-reflection-policy.md— when standing questions, reflection notes, orQUESTIONS.mdgovernance is involved../obsidian-notes-karpathy/references/search-upgrades.md— when retrieval quality tuning or scaling beyond the default ranking is on the table../obsidian-notes-karpathy/references/memory-lifecycle.md— whenMEMORY.mdor episodic memory boundaries are involved../obsidian-notes-karpathy/references/graph-contract.md— when graph exports,relatededges, or relationship candidates are involved../obsidian-notes-karpathy/references/render-template.md— when handing off tokb-render../obsidian-notes-karpathy/references/profile-contract.md— when account profiles orsource_profilemetadata is involved../obsidian-notes-karpathy/references/episode-template.md— whenoutputs/episodes/**work is involved../obsidian-notes-karpathy/references/web-export-template.md— when running web export mode
Hard boundary
wiki/live/**is the default truth sourceraw/andwiki/drafts/are not retrieval truthMEMORY.mdis collaboration context, not topic truthoutputs/episodes/and graph snapshots can surface candidates, but they do not outrank approved live pages- archived outputs are reusable, but they remain artifact archive rather than approved truth
If a human explicitly asks for source inspection, you may cite raw evidence. Default synthesis should still stay on approved live coverage.
Modes
search
- use when the user wants ranked local candidates first
- output a ranked page list with short relevance notes
- do not create a new archive file unless the user asks
research
- use when the user wants a grounded reusable answer
- save substantive outputs under
outputs/qa/ - this is the closest current mapping to
output/analyses
publish
- use when the user wants creator-facing prose grounded in approved knowledge
- save article / thread / newsletter / talk-outline artifacts under
outputs/content/ - reuse prior archived Q&A when it already contains the needed grounded synthesis
web
- use when the user wants a static browseable export from approved knowledge
- save the package under
outputs/web/{slug}/index.html - follow
../obsidian-notes-karpathy/references/web-export-template.mdfor the site skeleton, per-page frontmatter, slug rules, navigation structure, andsearch.jsonshape
reflect-lite
- use when the user wants a synthesis note, question-resolution memo, or gap note that should stay outside live
- archive it under
outputs/qa/ - set
followup_route: draftif the result exposes durable knowledge work
If the user wants slides, deterministic reports, chart briefs, or canvas outputs from approved knowledge, hand off to kb-render.
Writeback contract
Every substantive query should leave explicit follow-up metadata behind. At minimum, record:
source_live_pagesopen_questions_touchedwhen relevantwriteback_candidateswriteback_statusfollowup_route
Use:
nonewhen the artifact is grounded and self-containeddraftwhen durable knowledge should re-enterdraft -> review -> livereviewwhen the next step is a governance or approval pass on already-prepared material
Candidates left at writeback_status: pending with followup_route: draft are picked up later by the deterministic writeback lane (onkb --json compile writeback <vault-root> in kb-compile), which scaffolds a reviewable draft grounded in the recorded source_live_pages and advances the status to drafted. Keep source_live_pages accurate: the lane grounds draft provenance in those approved pages, never in the archived artifact itself.
Prefer the smallest durable delta:
- extend an existing live page when the identity is already correct
- draft a new concept / entity / synthesis when the knowledge is durable but absent
- strengthen relationships or question tracking when the graph is the weak point
Checkpoint
Before archiving a substantive answer, confirm:
- the answer is grounded in approved pages
- archive reuse did not outrank live grounding
followup_routeis concrete- any
writeback_candidatesare actionable instead of vague
For simple search-mode lookups, no checkpoint is needed.
Output to the user
Report:
- which live pages and briefings were used
- whether prior Q&A was reused
- where the new artifact was saved
- whether a
queryorpublishlog entry should be appended - whether follow-up work belongs in drafts or maintenance instead of directly mutating live