pub fn get_stats(mana_dir: &Path) -> Result<StatsResult, Error>Expand description
Get aggregate project statistics.
Returns counts by status, priority distribution, completion percentage, and cost/token metrics from unit history (if available).
§Errors
ManaError::IndexError— index cannot be loadedManaError::IoError— filesystem failure
§Example
use mana_core::api::get_stats;
use std::path::Path;
let stats = get_stats(Path::new("/project/.mana")).unwrap();
println!("Completion: {:.1}%", stats.completion_pct);
println!("Total: {}, Open: {}, Closed: {}", stats.total, stats.open, stats.closed);