feat(simulation): knowledge grant schema, events, and contradiction detection (#545, #546, #547)

KnowledgeGrant untagged enum (Fact + Entity variants), ContentEntityRegistry
resource, KnowledgeGranted event processing, ContradictionClaim struct with
600-tick window detection in observe_entity. Wires knowledge_grant field in
dialogue line selection. Implements D-079, D-083. Closes Q-026.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 12:14:53 +01:00
co-authored by Claude Opus 4.6
parent 381526ff74
commit 3d636fd4bb
13 changed files with 1121 additions and 12 deletions
+9 -1
View File
@@ -7,12 +7,18 @@
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 events::{InteractionType, KnowledgeEvent, KnowledgeEventQueue, KnowledgeEventType};
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::*;
@@ -24,7 +30,9 @@ pub struct KnowledgePlugin;
impl Plugin for KnowledgePlugin {
fn build(&self, app: &mut App) {
app.init_resource::<KnowledgeEventQueue>()
.init_resource::<ContradictionDetectedQueue>()
.init_resource::<EntityRegistry>()
.init_resource::<ContentEntityRegistry>()
.init_resource::<DecayThresholds>()
.add_systems(
Update,