pub struct Plan {
pub project: PlanProject,
pub statuses: PlanVocabulary,
pub milestones: Vec<PlanMilestone>,
pub issues: Vec<PlanIssue>,
pub waves: Vec<PlanWave>,
pub edges: Vec<PlanEdge>,
pub milestone_edges: Vec<PlanEdge>,
pub findings: Vec<PlanFinding>,
}Expand description
The whole derived plan: what every plan capability answers out of.
Fields§
§project: PlanProjectThe plan’s header, with the active milestone derived.
statuses: PlanVocabularyThe declared status vocabularies.
milestones: Vec<PlanMilestone>Every milestone, in id order.
issues: Vec<PlanIssue>Every issue, in id order.
waves: Vec<PlanWave>The execution waves, lowest first.
edges: Vec<PlanEdge>The issue dependency graph, sorted.
milestone_edges: Vec<PlanEdge>The milestone dependency graph, sorted.
findings: Vec<PlanFinding>Every finding, in derivation order.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn milestone(&self, id: &str) -> Option<&PlanMilestone>
pub fn milestone(&self, id: &str) -> Option<&PlanMilestone>
One milestone by id.
Sourcepub fn is_present(&self) -> bool
pub fn is_present(&self) -> bool
Whether this repository holds a canonical project model at all.
Sourcepub fn roadmap(&self) -> Vec<&PlanMilestone>
pub fn roadmap(&self) -> Vec<&PlanMilestone>
The milestone ids in roadmap order: rank, then order, then id. Derived from the graph; no list of versions is maintained anywhere.
Sourcepub fn next_ready(&self, milestone: Option<&str>) -> Option<&PlanIssue>
pub fn next_ready(&self, milestone: Option<&str>) -> Option<&PlanIssue>
The one issue a worker should take now: the lowest-wave READY issue of the active milestone, highest priority first, then id.
The active milestone can have nothing ready while another one does — a milestone
waiting on its own acceptance evidence, for instance — so the search widens to the
whole plan rather than answering “none” and sending a worker away from executable
work. mj_pj_next_ready in lib/project.sh does exactly this.
Sourcepub fn build(index: &Index) -> Plan
pub fn build(index: &Index) -> Plan
Build the plan from an index. A walk of values already in memory: no file is opened, no subprocess is started, nothing is cached.
Sourcepub fn after(index: &Index, id: &str, transition: Transition, now: &str) -> Plan
pub fn after(index: &Index, id: &str, transition: Transition, now: &str) -> Plan
The plan as it will read once transition has been written to id.
The same records, the same derive, one timestamp changed: the status a caller is
told after a write is computed by the one derivation every reader uses, never
announced by the writer. This matters because the resulting status is not a function
of the transition alone — a done whose required evidence is absent stays VERIFY,
and a record marked cancelled stays CANCELLED whatever is written to it.
Nothing is read from disk and nothing is written: this is the projection of a write,
and transition is what performs one.
use majordomus_cli::plan::{Plan, Transition};
let before = Plan::build(index);
let after = Plan::after(index, "I0001", Transition::Done, "2026-09-11T12:00:00Z");
// The status is derived both times, so an issue whose evidence is incomplete is
// still VERIFY afterwards and the caller can see that before writing anything.
assert_eq!(before.issue("I0001").is_some(), after.issue("I0001").is_some());Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
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 Plan
Source§impl JsonSchema for Plan
impl JsonSchema for Plan
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 moreimpl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
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.