pub mod agents;
pub mod autopsy;
pub mod baseline;
pub mod client;
pub mod context;
pub mod decisions;
pub mod detectors;
pub mod engine;
pub mod evals;
pub mod insights;
pub mod mailbox;
pub mod metrics;
pub mod pref_store;
pub mod preferences;
pub mod prompts;
pub mod retrieval;
pub mod risk;
use std::path::PathBuf;
pub fn gate_mode_path() -> PathBuf {
let home = std::env::var("HOME").unwrap_or_else(|_| "/tmp".into());
PathBuf::from(home)
.join(".claudectl")
.join("brain")
.join("gate-mode")
}
pub fn read_gate_mode() -> String {
let path = gate_mode_path();
std::fs::read_to_string(&path)
.map(|s| s.trim().to_string())
.unwrap_or_else(|_| "on".into())
}