Skip to main content

Module intent_realization

Module intent_realization 

Source
Expand description

Intent realization: which work realises which intent, through which sessions and providers, how each link is known, and what the intent still lacks.

An intent (ADR 0070) says what must become true; the plan says which issues realise it (ADR 0073). Neither says who is doing that work, in which episode, under which provider, or which handover carried it from one session to the next. That lineage already exists as records — the ledger stamps every task, handover and plan transition with its episode, the provider events name the provider of each episode, a closed session record lists the issues it moved, and a peer’s claim names what it is working on and where. This module joins them to the intents. It stores nothing: every link is derived on read, so a session that ends or a provider that changes leaves the intent exactly where it was.

Every link says how it is known, because a join that flattened a guess into a fact would make inferred lineage read as declared intent:

provenancelink
declaredthe work names the issue itself: a claim or a task title citing it
observedthe ledger or a session record shows the episode moving the issue
derivedthe branch the work ran on names the issue
inferrednothing stronger exists and an open issue’s scope overlaps the work

And for each intent it answers what remains: the criteria without current evidence with the issues serving each, and the drift between closed work and unproven reality — every milestone DONE while a criterion’s evidence is stale or failing is closed work that reality contradicts, reported as closed_work_contradicted rather than hidden behind a closed plan. An intent that was satisfied and regresses shows exactly this: its stage falls back to verifying and the criterion that stopped holding is named.

use majordomus_cli::intent_realization::IntentLinkProvenance;
// declared is the strongest link and inferred the weakest; a join keeps the strongest
assert!(IntentLinkProvenance::Declared < IntentLinkProvenance::Inferred);
assert_eq!(IntentLinkProvenance::Observed.as_str(), "observed");

Structs§

IntentEpisode
One execution episode of a piece of work, and the provider that ran it when a record says. A provider is never guessed: an episode opened by hand has none.
IntentExplanation
Why an intent stands where it stands: the record, each sentence that explains the stage and each criterion, the plan’s coverage of its criteria, and the work realising it.
IntentLink
One link from a piece of work to an intent: through which issue and milestone, serving which of its criteria, read from which fact, known how.
IntentRealization
Every intent, realised, and every unit of work, joined: what majordomus intent realization answers.
IntentRealizationView
One intent, realised: how far reality is from it, the work realising it and by whom, and the drift between closed work and current evidence.
IntentRealizedWork
A unit of work with every intent it realises, or the reason it realises none.
IntentUnmetCriterion
A criterion an intent still lacks, with the issues that declare they serve it.
IntentWorkRef
A unit of work as one intent sees it: which record, how it stands, and the strongest link.
IntentWorkUnit
One unit of work as its records describe it, before it is joined to any intent.

Enums§

IntentLinkProvenance
How a link from a piece of work to an issue is known, strongest first.
IntentLinkVia
The fact a link was read from.
IntentWorkKind
Which record a unit of work was read from.

Constants§

CLOSED_WORK_NOT_SATISFIED
The drift code of an intent whose milestones are all DONE (stage verifying) and whose verdict is not satisfied.
EVIDENCE_AHEAD_OF_PLAN
The drift code of an intent whose verdict is satisfied while its stage is planned or executing: the evidence settles it before the plan closes it.
REPRODUCE
The command that shows every realization finding again.

Functions§

drift
The drift of one intent: the plan’s closure against the evidence’s verdict.
explain
Explain one intent out of the derivations already made.
gather
Every unit of work this checkout can see, and the ledger lines it could not read.
issue_tokens
The ids in a text that are issues of the plan, each once, in order of appearance.
link
Join one unit of work to the intents, through the plan.
realize
Join every unit of work to every intent. Pure: the records are already read.
tasks_from_ledger
The tasks of a ledger, each with every episode that worked on it, the provider of each episode where a record names one, the handovers that carried it, and the issues its episodes moved. providers maps an episode to its provider and provider session, as the open episode files name them; the ledger’s own provider events add to it.