//! Pattern Learning for Aphoria.
//!
//! When LLM extraction discovers security patterns that regex extractors miss,
//! we record the patterns here for potential promotion to declarative extractors.
//!
//! # Flow
//!
//! ```text
//! LLM extracts claim from code
//!         ↓
//! Pattern not in learned store?
//!         ↓
//! Store: { example_code, claim, project_hash }
//!         ↓
//! Same pattern seen in 5+ projects?
//!         ↓
//! Flag for promotion to declarative extractor
//! ```
//!
//! # Privacy
//!
//! - Only project hashes are stored, never project names
//! - Example code is stored locally for validation
//! - Patterns are normalized to remove specific values
//!
//! # Configuration
//!
//! ```toml
//! [learning]
//! enabled = true                    # Enable pattern learning
//! store = "local"                   # "local" | "hosted"
//! min_confidence = 0.7              # Minimum LLM confidence to learn
//! prune_after_days = 90             # Remove patterns not seen in N days
//!
//! [learning.promotion]
//! min_projects = 5                  # Projects needed before promotion
//! min_confidence = 0.8              # Average confidence needed
//! auto_promote = false              # Require human approval
//! ```

mod normalizer;
mod store;
mod types;

// Re-export public types
pub use normalizer::{are_patterns_similar, normalize_pattern, pattern_similarity};
pub use store::{learning_store_dir, LocalPatternStore, PatternStore};
pub use types::{ClaimTemplate, LearnedPattern, ValueType};
