Expand description
Bridges between LeanCTX project knowledge and Cloud repo knowledge.
plan_learnturns what the agent learned in a project since the last draft into new repo facts: every fact through the capture gate (crate::capture: one claim, a reference, evidence, dedupe, admission, screening), stable content ids, a lean-ctx provenance source.sync_into_knowledgemakes a pulled revision available to the agent like an installed package: merged into the project knowledge store, tagged withimported_from, replaced on every new revision.
Structs§
- Learn
Plan - What
plan_learnproposes.
Constants§
- IMPORT_
TAG_ SCHEME imported_fromof every fact pulled from a Cloud vault starts with this. It is stored in the project knowledge, so it keeps its pre-VA name: an older engine (downgrade) still recognizes and replaces these facts.
Functions§
- fact_id
- Stable id from content:
lc-<key-slug>-<sha256(category, key, value)[..8]>. - import_
source - The contract’s import source of an imported fact, from its anchor key:
git:<sha>→import:git:<sha>,<path>#<section path>/<n>→import:docs:<path>#<section slug>(the section path through the contract’sctxpkg::import_slug).Nonewhen the key names neither. - import_
tag_ source - A Cloud import tag without its scheme (
@ns/name@rN),Nonefor every other origin. - kind_of
- The C0 1.x fact kind of a captured node type.
- knowledge_
category - Project-knowledge category for a Cloud repo’s facts.
- plan_
import - Plan the imported facts (K1) new or changed after
sincethat pass the capture gate (evidenceimported, the import source as reference) and the repo does not hold yet, at mostlimit(oldest first), each with its import source. - plan_
learn - Plan the facts learned after
since(and those waiting for their commit) that pass the capture gate and the repo does not hold yet, at mostlimitof them (oldest first). - remove_
all_ pulled - Remove every fact copied in from any Cloud vault (3.12.8 account scope): on disconnect nothing pulled for one account stays in the project knowledge another account would recall. Returns how many.
- remove_
pulled - Remove the facts copied in from
@ns/namerevisions. Returns how many. - served_
by_ replica - Whether the vault
@ns/nameis delivered from a local C0 2.0 replica (SPEC-ENGINE E2, V4.10): its revisions are then no longer copied into the project knowledge. - sync_
into_ knowledge - Replace this repo’s facts in the project knowledge store with
doc. Returns(loaded, removed). A vault served by a replica only loses its old copies (its knowledge is delivered from the replica, §3.5).