//! Knowledge graph module (D-041). //! //! Implements information boundaries (D-010 principle 2): every piece of //! state is tagged with who knows it. Per-entity KnowledgeGraph component //! tracks what each entity knows about others and the world. use bevy_app::prelude::*; use bevy_ecs::prelude::*; pub mod content_registry; pub mod events; pub mod graph; pub mod registry; pub mod types; pub use content_registry::ContentEntityRegistry; pub use events::{ ContradictionDetectedEvent, ContradictionDetectedQueue, InteractionType, KnowledgeEvent, KnowledgeEventQueue, KnowledgeEventType, ProcessedEntityGrant, ProcessedFactGrant, ProcessedKnowledgeGrant, }; pub use graph::KnowledgeGraph; pub use registry::{EntityRegistry, StableEntityId}; pub use types::*; /// Knowledge system plugin. /// Registers resources and systems for knowledge graph processing. pub struct KnowledgePlugin; impl Plugin for KnowledgePlugin { fn build(&self, app: &mut App) { app.init_resource::() .init_resource::() .init_resource::() .init_resource::() .init_resource::() .add_systems( Update, ( events::process_knowledge_events .after(crate::perception::observer::compute_observer_snapshot), events::decay_knowledge.after(events::process_knowledge_events), ), ); tracing::debug!("KnowledgePlugin initialized"); } }