//! Query engine for Episteme with lifecycle filtering.
//!
//! This crate provides the query interface for reading assertions from the
//! knowledge graph. Queries can filter by subject, predicate, lifecycle stage,
//! and epoch.
//!
//! # Two Query Modes
//!
//! | Mode | Returns | Use Case |
//! |------|---------|----------|
//! | `QueryEngine` | Winner assertion | "Give me the answer" |
//! | `SkepticResolver` | Conflict analysis | "Show me the disagreement" |
//!
//! # Example: Standard Query
//!
//! ```ignore
//! use stemedb_query::{Query, QueryEngine};
//! use stemedb_core::types::LifecycleStage;
//!
//! let engine = QueryEngine::new(store);
//!
//! // Query only approved assertions
//! let query = Query::builder()
//!     .subject("Tesla_Inc")
//!     .predicate("has_revenue")
//!     .lifecycle(LifecycleStage::Approved)
//!     .build();
//!
//! let result = engine.execute(&query).await?;
//! ```
//!
//! # Example: Skeptic Query (Trust but Verify)
//!
//! ```ignore
//! use stemedb_query::SkepticResolver;
//!
//! let resolver = SkepticResolver::new(store, vote_store, trust_store);
//! let view = resolver.resolve("Semaglutide", "muscle_effect").await?;
//!
//! if view.analysis.status == ResolutionStatus::Contested {
//!     println!("⚠️ This fact is disputed!");
//! }
//! ```

mod decay;
mod engine;
mod error;
/// Background materializer for O(1) read performance.
pub mod materializer;
mod query;
mod skeptic;

pub use decay::{apply_decay, apply_source_class_decay};
pub use engine::QueryEngine;
pub use error::{QueryError, Result};
pub use materializer::{MaterializeReport, Materializer};
pub use query::{hamming_distance, Query, QueryBuilder, QueryResult};
pub use skeptic::{SkepticResolver, SkepticView};
