Skip to main content

do_memory_mcp/patterns/
mod.rs

1//! # Advanced Pattern Analysis Module
2//!
3//! This module provides sophisticated statistical analysis capabilities for the MCP server,
4//! including changepoint detection, correlation analysis, forecasting, and causal inference.
5//!
6//! ## Features
7//!
8//! - **Statistical Engine**: Bayesian changepoint detection and correlation analysis
9//! - **Predictive Models**: Time series forecasting and anomaly detection
10//! - **Causal Inference**: Hyper-geometric computational causality
11//! - **Performance**: Streaming algorithms and parallel processing
12//!
13//! ## Architecture
14//!
15//! ```text
16//! ┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
17//! │  Statistical    │    │   Predictive     │    │   MCP Tool      │
18//! │   Engine        │    │   Models         │    │   Integration   │
19//! │                 │    │                  │    │                 │
20//! │ - Changepoint   │    │ - Forecasting    │    │ - Tool Reg.     │
21//! │ - Correlation   │    │ - Anomaly Det.  │    │ - Input Val.    │
22//! │ - Significance  │    │ - Causal Inf.   │    │ - Memory Query  │
23//! └─────────────────┘    └──────────────────┘    └─────────────────┘
24//!         │                       │                       │
25//!         └───────────────────────┼───────────────────────┘
26//!                                 ▼
27//!                    ┌─────────────────────┐
28//!                    │   Performance &     │
29//!                    │   Caching Layer     │
30//!                    │                     │
31//!                    │ - redb Cache        │
32//!                    │ - Streaming Alg.    │
33//!                    │ - Parallel Proc.    │
34//!                    └─────────────────────┘
35//! ```
36
37pub mod compatibility;
38pub mod predictive;
39pub mod statistical;
40
41#[cfg(test)]
42mod benchmarks;
43
44pub use compatibility::{
45    AssessmentConfig, CompatibilityAssessment, CompatibilityAssessor, PatternContext, RiskFactor,
46    RiskFactorType, RiskLevel,
47};
48pub use predictive::{AnomalyDetector, CausalAnalyzer, ForecastingEngine};
49pub use statistical::{ChangepointDetector, CorrelationAnalyzer, StatisticalEngine};