Skip to main content

Module knowledge

Module knowledge 

Source
Expand description

Project knowledge with Cloud: session learnings stream out as draft proposals (draft), reviewed revisions stream back in (pull).

The last pulled revision of each project is kept in <data_dir>/cloud/knowledge/<vault_id>/base.json; it is the base that drafts are computed and rebased against. Nothing is written into the user’s project tree except the project knowledge store.

Modules§

code_graph
The code graph an owner may publish to Cloud (Cloud plan v3 N1; C0 1.9 section 8).
doc
Operations on the ctxpkg.research-context.v1 document: applying a proposal patch exactly like Cloud does on merge, and rebasing pending draft ops onto a newer revision. The wire types and their structural validation live in lean_ctx_protocol::cloud::knowledge.
draft
Captured session knowledge → one draft proposal in the outbox.
import_draft
Facts imported from the repository itself (K1: lean-ctx import docs|git) → import drafts in the outbox (C0 1.9 import addendum).
learn
Bridges between LeanCTX project knowledge and Cloud repo knowledge.
pull
The network half of knowledge sync, run by the scheduler or lean-ctx cloud sync, never inside a tool call:
screening
The one mandatory path into the Cloud outbox for content.
screening_exceptions
Narrow screening exceptions (owner decision 03.11.2026), identical in the LeanCTX instance and the Cloud server (cloud-screen/src/exceptions.rs). C0 vectors/screening_exceptions.vectors.json is their single source; a test below asserts every case.

Structs§

BaseRevision
The last revision pulled for a project: the delivered (released) head, the only one ever loaded into a checkout.

Functions§

load_base
The stored base of vault_id, or revision 0 (the empty document).
save_base