pub fn review(
intents: &[IntentOutline],
plan: &Plan,
gaps: &[GapRecord],
critiques: &[CritiqueRecord],
) -> Vec<IntentFinding>Expand description
The findings of the gap and critique records against the intents and the plan: whether each record holds together, and whether execution waited for the review.
use majordomus_cli::intent_plan::IntentOutline;
use majordomus_cli::intent_review::review;
use majordomus_cli::plan::Plan;
let intent = IntentOutline {
id: "x".into(),
criteria: vec!["a".into()],
milestones: vec!["m".into()],
..Default::default()
};
// I1 has started, and no critique of this intent's plan was ever recorded
let findings = review(&[intent], &plan, &[], &[]);
assert!(findings.iter().any(|f| f.code == "executing_without_critique"));