use crate::types::*;
pub trait ProjectRepo: Send + Sync {
fn list(&self) -> Vec<Project>;
fn get(&self, id: &ProjectId) -> Option<Project>;
fn upsert(&self, project: &Project);
}
pub trait TaskRepo: Send + Sync {
fn create(&self, task: &Task<Conceptualizing>) -> TaskId;
fn get(&self, id: &TaskId) -> Option<TaskSummary>;
fn list_by_project(&self, project_id: &ProjectId) -> Vec<TaskSummary>;
fn save(&self, task: &TaskSummary);
fn children(&self, parent_id: &TaskId) -> Vec<TaskSummary>;
}
pub trait InsightStore: Send + Sync {
fn add(&self, content: &str, links: &[InsightLink]) -> Insight;
fn search(&self, query: &str) -> Vec<Insight>;
fn related(&self, target: &InsightLink) -> Vec<Insight>;
}
pub trait Spawner: Send + Sync {
fn spawn_command(&self, task: &TaskSummary, brief: &ContextBrief) -> String;
}