pub struct KnowledgeRecord {Show 15 fields
pub id: String,
pub uri: String,
pub path: String,
pub source_class: String,
pub class: String,
pub status: String,
pub epistemics: String,
pub origin: String,
pub date: String,
pub title: String,
pub derived_from: Vec<ResolvedReference>,
pub relations: Vec<ResolvedRelation>,
pub superseded_by: Option<String>,
pub resolved: bool,
pub content: String,
}Expand description
One knowledge record, with every reference it names resolved.
objects.get already serves the same file as metadata and content. What this adds is
the resolution: which of the record’s references answer, through which reader, and which
dangle — the question a reviewer asks before promoting a candidate, and the question the
integrity validator asks of every record.
use majordomus_cli::capability::builtin::knowledge_base::KnowledgeRecord;
let r: KnowledgeRecord = serde_json::from_str(r#"{
"id": "e1-0123456789ab", "uri": "majordomus://knowledge/e1-0123456789ab",
"path": ".ai/repo/knowledge/candidates/e1-0123456789ab.md", "source_class": "candidates",
"class": "convention", "status": "candidate", "epistemics": "decided", "origin": "extracted",
"date": "2026-09-12", "title": "An assertion", "resolved": true, "content": "---\n---\n"
}"#).unwrap();
assert!(r.derived_from.is_empty(), "a record that names nothing has nothing to resolve");
assert_eq!(r.superseded_by, None, "and is not superseded");Fields§
§id: StringThe record id.
uri: Stringmajordomus://knowledge/<id>.
path: StringRepository-relative path.
source_class: StringThe source class that discovered it: candidates or curated.
class: Stringfact, convention, constraint, memory or lesson.
status: Stringcandidate, verified or superseded.
epistemics: Stringobserved, inferred or decided.
origin: Stringauthored or extracted; empty when the record carries no provenance.
date: StringThe day the record reached its status.
title: StringThe assertion.
derived_from: Vec<ResolvedReference>Every provenance.derived_from reference, resolved, in the record’s order.
relations: Vec<ResolvedRelation>Every relations entry, resolved, in the record’s order.
superseded_by: Option<String>The record that replaced this one, when the status is superseded.
resolved: boolTrue when every reference above resolved. The one bit a reviewer reads first.
content: StringThe whole file, front matter and body.
Trait Implementations§
Source§impl Clone for KnowledgeRecord
impl Clone for KnowledgeRecord
Source§fn clone(&self) -> KnowledgeRecord
fn clone(&self) -> KnowledgeRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnowledgeRecord
impl Debug for KnowledgeRecord
Source§impl<'de> Deserialize<'de> for KnowledgeRecord
impl<'de> Deserialize<'de> for KnowledgeRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for KnowledgeRecord
Source§impl JsonSchema for KnowledgeRecord
impl JsonSchema for KnowledgeRecord
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for KnowledgeRecord
impl PartialEq for KnowledgeRecord
Source§fn eq(&self, other: &KnowledgeRecord) -> bool
fn eq(&self, other: &KnowledgeRecord) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for KnowledgeRecord
impl Serialize for KnowledgeRecord
impl StructuralPartialEq for KnowledgeRecord
Auto Trait Implementations§
impl Freeze for KnowledgeRecord
impl RefUnwindSafe for KnowledgeRecord
impl Send for KnowledgeRecord
impl Sync for KnowledgeRecord
impl Unpin for KnowledgeRecord
impl UnsafeUnpin for KnowledgeRecord
impl UnwindSafe for KnowledgeRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.