- 1
//! vak-commit: durable obligations, and a falsifiable answer to "is it done?" - 2
//! - 3
//! # What this replaces - 4
//! - 5
//! vak's unit of identity was the session, and completion was "the model - 6
//! stopped talking". Both assumptions break as soon as work outlives one - 7
//! conversation. A [`Commitment`] inverts them: - 8
//! - 9
//! | Before | Now | - 10
//! |---|---| - 11
//! | the session is the identity | the commitment is; sessions are [`Episode`]s that advance it | - 12
//! | the model decides it is done | the **runtime** evaluates a predicate against the world | - 13
//! | progress is tokens spent | progress is [`Advancement`]: criteria moved, or an explicit reason none did | - 14
//! | blocking or losing the thread | [`Suspension`] against a typed wake condition | - 15
//! | work quietly evaporates | every commitment [`Closure`]s with a [`Verdict`] and evidence | - 16
//! - 17
//! The agent loop does not disappear; it becomes the implementation of an - 18
//! episode rather than the top-level abstraction. - 19
//! - 20
//! # The closure invariant - 21
//! - 22
//! A commitment declares the weakest [`vak_intent::Satisfaction`] that may - 23
//! close it as [`Verdict::Fulfilled`], taken from its reading's `evidence` - 24
//! axis. [`Commitment::may_close`] enforces it, and - 25
//! [`ledger::CommitmentLedger::append`] refuses the event outright — a ledger - 26
//! that can record a lie is not an audit trail. - 27
//! - 28
//! Crucially, the strength of a criterion comes from **how it was - 29
//! established**, not from anyone's confidence: a shell command the runtime - 30
//! ran is `Observed`, an external receipt is `Attested`, and the model's own - 31
//! judgement is `Asserted` no matter how emphatically it is phrased. See - 32
//! [`satisfy`]. - 33
//! - 34
//! Failure verdicts are deliberately *unconstrained*. Recording a - 35
//! [`Verdict::Failed`], a [`Verdict::Abandoned`], or an honest - 36
//! [`Verdict::Unknown`] must always be possible, or the ledger could not tell - 37
//! the truth about work that went wrong. - 38
//! - 39
//! # Reuse - 40
//! - 41
//! Criterion and evidence vocabulary comes from `vak-session` - 42
//! (`CriterionKind`, `CriterionResult`, `EvidenceRef`, `WorkCriterion`, - 43
//! `WorkOwner`) rather than being redefined here. That vocabulary already - 44
//! expresses "this shell command exits zero" and "this flow completed"; a - 45
//! second one for the same idea would be a liability. - 46
- 47
pub mod ledger; - 48
pub mod portfolio; - 49
pub mod satisfy; - 50
pub mod types; - 51
- 52
pub use ledger::{CommitmentLedger, Event, EventKind, LedgerError, project, spec_from_reading}; - 53
pub use portfolio::{Priority, SchedulerContext, next, prioritize, rank}; - 54
pub use satisfy::{ - 55
CriterionEvaluator, Evaluation, evaluate_all, is_machine_checkable, strength_of, - 56
}; - 57
pub use types::{ - 58
Advancement, Closure, ClosureRefusal, Commitment, CommitmentSpec, CriterionState, Economics, - 59
Episode, Phase, Suspension, Verdict, - 60
}; - 61
Indexing the workspace…
Vakyartha documentation is discovering safe artifacts, anchors, and source references.