pub struct KnowledgeBase {Show 19 fields
pub schema: u32,
pub name: String,
pub description: String,
pub content: Content,
pub tier: Tier,
pub importance: f64,
pub confidence: f64,
pub tags: Tags,
pub applies: Applies,
pub evidence: Evidence,
pub links: Links,
pub lifecycle: Lifecycle,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub maturity: Maturity,
pub decay: DecayMeta,
pub scope: Scope,
pub version: u32,
pub revision: Option<String>,
}Expand description
Shared fields for all knowledge items (patterns, workflows).
Embedded via #[serde(flatten)] so YAML stays flat.
Fields§
§schema: u32§name: StringUnique identifier (kebab-case, e.g. “swift-testing-macro”)
description: StringHuman-readable one-line description
content: ContentDual-layer content (technical + principle)
tier: TierKnowledge tier: session → project → core
importance: f64Importance score (0.0-1.0), adjusted by feedback
confidence: f64Extraction confidence (0.0-1.0)
Classification tags
applies: AppliesScope: where this knowledge applies
evidence: EvidenceUsage evidence and effectiveness tracking
links: LinksConnections to other knowledge items (Zettelkasten-style)
lifecycle: LifecycleLifecycle management
created_at: DateTime<Utc>§updated_at: DateTime<Utc>§maturity: MaturityMaturity level
decay: DecayMetaDecay metadata
scope: ScopeOwnership/audience scope (Personal / Team / Community).
Orthogonal to tier — tier manages temporal half-life, scope manages audience.
version: u32Monotonically increasing version counter, managed by VersionedYamlStore. 0 means “not yet versioned” (pre-schema-3 or pre-bootstrap). Omitted from YAML when zero so old files stay clean.
revision: Option<String>12-char short SHA of the knowledge-layer commit that wrote this version. None until the pattern has been committed at least once post-schema-3.
Trait Implementations§
Source§impl Clone for KnowledgeBase
impl Clone for KnowledgeBase
Source§fn clone(&self) -> KnowledgeBase
fn clone(&self) -> KnowledgeBase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more