pub struct IntentView {Show 13 fields
pub id: String,
pub title: String,
pub statement: String,
pub invariants: Vec<String>,
pub stage: IntentStage,
pub milestones: Vec<IntentMilestone>,
pub satisfaction: Vec<IntentCriterion>,
pub met: usize,
pub verdict: IntentVerdict,
pub governance: Vec<String>,
pub non_goals: Vec<String>,
pub superseded_by: Option<String>,
pub source: String,
}Expand description
One intent, as its record declares it and as the plan and the ledger derive it: the statement and invariants as authored, each milestone with its derived status, each criterion with the state of its evidence, the stage that follows from both, and the verdict that follows from the evidence alone.
use majordomus_cli::intent::{verdict, IntentStage, IntentVerdictState, IntentView};
let view = IntentView {
id: "intent-lifecycle".into(),
title: "Work is traceable to the intent it serves".into(),
statement: "A reader can ask what work is for.".into(),
invariants: vec!["no intent status is stored".into()],
stage: IntentStage::Declared,
milestones: vec![],
satisfaction: vec![],
met: 0,
verdict: verdict(&[]),
governance: vec!["adr:adr-0070".into()],
non_goals: vec![],
superseded_by: None,
source: ".ai/repo/project/intents/intent-lifecycle.yaml".into(),
};
// a record naming no milestone that resolves has not been planned
assert_eq!(view.stage, IntentStage::Declared);
// and one declaring no criterion cannot be settled by evidence
assert_eq!(view.verdict.state, IntentVerdictState::Unknown);Fields§
§id: StringThe identity, which is also the file name.
title: StringOne line.
statement: StringWhat must become true.
invariants: Vec<String>What must stay true.
stage: IntentStageDerived: the stage.
milestones: Vec<IntentMilestone>The milestones, each with its derived status.
satisfaction: Vec<IntentCriterion>The criteria, each with its evidence state.
met: usizeDerived: how many criteria are met.
verdict: IntentVerdictDerived from the criteria alone, never from the plan: whether the evidence settles the intent, and which criteria hold it back.
governance: Vec<String>The governance a worker on this intent loads.
non_goals: Vec<String>What is deliberately not required.
superseded_by: Option<String>The replacement, when the record names one.
source: StringRepository-relative path of the record.
Trait Implementations§
Source§impl Clone for IntentView
impl Clone for IntentView
Source§fn clone(&self) -> IntentView
fn clone(&self) -> IntentView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IntentView
impl Debug for IntentView
Source§impl<'de> Deserialize<'de> for IntentView
impl<'de> Deserialize<'de> for IntentView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for IntentView
Source§impl JsonSchema for IntentView
impl JsonSchema for IntentView
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for IntentView
impl PartialEq for IntentView
Source§fn eq(&self, other: &IntentView) -> bool
fn eq(&self, other: &IntentView) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for IntentView
impl Serialize for IntentView
impl StructuralPartialEq for IntentView
Auto Trait Implementations§
impl Freeze for IntentView
impl RefUnwindSafe for IntentView
impl Send for IntentView
impl Sync for IntentView
impl Unpin for IntentView
impl UnsafeUnpin for IntentView
impl UnwindSafe for IntentView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.