pub mod analysis;
pub mod scoring;
#[cfg(test)]
mod tests;
pub use analysis::{
build_draft_context, build_draft_context_with_selection, classify_reply_archetype,
classify_tweet_format, retrieve_ancestors, retrieve_cold_start_seeds,
};
pub use scoring::{compute_engagement_score, compute_retrieval_weight};
use crate::context::retrieval::VaultCitation;
pub const RECENCY_HALF_LIFE_DAYS: f64 = 14.0;
pub const MAX_ANCESTORS: u32 = 5;
pub const COLD_START_WEIGHT: f64 = 0.5;
pub const MIN_ENGAGEMENT_SCORE: f64 = 0.1;
pub const RAG_MAX_CHARS: usize = 4000;
pub const MAX_ANCESTOR_CHARS: usize = 800;
pub const MAX_COLD_START_SEEDS: u32 = 5;
#[derive(Debug, Clone)]
pub struct WinningAncestor {
pub tweet_id: String,
pub content_preview: String,
pub content_type: String,
pub archetype_vibe: String,
pub engagement_score: f64,
pub retrieval_weight: f64,
pub posted_at: String,
}
#[derive(Debug, Clone)]
pub struct DraftContext {
pub winning_ancestors: Vec<WinningAncestor>,
pub content_seeds: Vec<ContentSeedContext>,
pub vault_citations: Vec<VaultCitation>,
pub prompt_block: String,
}
#[derive(Debug, Clone)]
pub struct ContentSeedContext {
pub seed_text: String,
pub source_title: Option<String>,
pub archetype_suggestion: Option<String>,
pub engagement_weight: f64,
}