Skip to main content

Module knowledge

Module knowledge 

Source

Re-exports§

pub use snapshot::KnowledgeSnapshot;

Modules§

agents_md
Project knowledge → a section of AGENTS.md (K1 export).
anchors
Code anchors of knowledge facts (Hive plan v3 J2; C0 1.9 section 3, CodeAnchorV1).
chunking
Theta-gamma chunking for wakeup facts (#543, EFF-6).
hooks
Knowledge bookkeeping the Hive connector keeps: how often its facts reached an agent (M1, M5) and the session learnings it queues for review at a session’s end. The connector registers KnowledgeHooks at start-up (register_knowledge_hooks); without them (library use, tests) nothing is counted or queued. Neither hook decides what an agent is shown.
import_tag
The import tag of a fact pulled from a Hive vault: imported_from reads hive-repo:@ns/name@rN. Facts with such a tag are other members’ knowledge; every other origin is local or a context package.
journal
Change journal of a project’s knowledge.
local_store
In-memory Knowledge Hub store for local sessions and tests.
maintenance
Maintenance for the on-disk knowledge stores.
okf
Open Knowledge Format (OKF) rendering for lean-ctx project knowledge.
protection
Current project policy at durable knowledge boundaries.
retrieval
Retrieval contract and the local reference implementation.
snapshot
KnowledgeSnapshot — the single in-memory view of a project’s durable knowledge that every outbound rendering shares.
source_view
A source-authorized read view is not a replacement for the complete store.
store
Storage contract for portable local knowledge objects.
supersession
Local supersession helpers.

Structs§

ConsolidatedInsight
Contradiction
FactCapture
Structured fields of a fact for the Hive capture gate (SPEC-ENGINE §3.1.3), written by ctx_knowledge remember type= steps= commands= refs= evidence=.
FactReview
Why a fact needs a person’s look again (C0 1.9 fact states).
FidelityScore
ImportResult
JudgedPair
KnowledgeFact
KnowledgeIndex
KnowledgeQuery
Filters understood by portable Knowledge Hub stores.
ProcedureCommand
A command of a procedure: data only, never executed by the engine.
ProjectKnowledge
ProjectPattern
SimilarFact
SimpleFactEntry
Community-compatible simple fact format for import/export interop.
SolutionDecisionMeta

Enums§

AdmissionResult
Outcome of a write-time admission decision (#970), returned by ProjectKnowledge::remember_admitted. It is the difference between “the agent asked to store X” and “what lean-ctx actually persisted”.
ContradictionSeverity
EvidenceLevel
How a captured claim is backed.
FactOrigin
FactReviewReason
The contract’s reasons; source_removed is an imported fact whose source section is gone (K1).
FactReviewState
FactStatus
Whether a fact rests on a source (V01): verified when a provider or a derivation from sourced facts backs it, assumption otherwise — what an agent or a person wrote down without evidence.
FactValidity
Validity class of a fact (AP01 §4, D04): what its reuse is bound to.
ImportMerge
KnowledgeArchetype
NodeType
Node types a fact can be captured as.
SolutionDecisionKind
SolutionStatus
WithheldKnowledge
A complete typed record hidden from this read view and retained only so the checked save path can detect stale views without serializing hidden data.

Constants§

COGNITION_SYNTHESIS_SOURCE
source_session marker for facts written by the cognition loop’s observation synthesis step (#802). Lets recall distinguish synthesized entity-summaries from user-supplied findings (both are Observation archetype).
COMPACTION_DIGEST_SOURCE
source_session marker for digest facts written by the cognition loop’s cluster-compaction step (#971). A digest replaces a cluster of low-value, mutually-similar facts; the originals are archived (recoverable). Excluded from being compacted again so digests never cannibalize each other.

Functions§

fact_served
Whether the fact category/key of the knowledge store of store_root may be delivered with value to the running request, and the one place a fact’s sources enter the call’s capture (archive::bindings::serve):
find_cross_key_similar
is_machine_derived
Whether this fact was derived by lean-ctx rather than written by a person.
knowledge_dir_of
The directory of project_root’s store (knowledge.json, its journal).
parse_import_data
Parse import data: tries native ProjectKnowledge first, then simple [{...}] array.
sort_fact_for_output