- 1
//! vak-intent: the decision layer that turns a request into a typed, - 2
//! inspectable, narrowing-only engagement. - 3
//! - 4
//! # What this crate is for - 5
//! - 6
//! vak decides a great deal before a turn runs — which model, which tools, - 7
//! which budget, which approval posture, what "done" means — and until now it - 8
//! made every one of those decisions without any model of what the user was - 9
//! trying to do. The only classifier in the codebase was a keyword scan that - 10
//! fired on thirteen English verbs, and the route ladder's demand scorer was - 11
//! being fed zeros. - 12
//! - 13
//! This crate supplies that missing model, as three deliberately separate - 14
//! things: - 15
//! - 16
//! * [`Reading`] — what the request *is*, **inferred** on seven orthogonal - 17
//! axes ([`Act`], [`Horizon`], [`Stakes`], [`Evidence`], [`Clarity`], - 18
//! [`Modality`], [`Attendance`]). - 19
//! * [`Authority`] — what a human has **delegated** ([`Autonomy`] and an - 20
//! [`Envelope`]). Never inferred, because a resolution bug must not be able - 21
//! to change what the agent is allowed to do. - 22
//! * [`Engagement`] — what the runtime will therefore **do**, derived from the - 23
//! first two. - 24
//! - 25
//! # The one rule - 26
//! - 27
//! **Intent narrows, never widens.** An [`Engagement`]'s [`Limits`] may - 28
//! subtract a capability, shorten the route ladder to a prefix, lower a - 29
//! budget, or *raise* an approval floor. It can never grant a tool, extend a - 30
//! ladder, raise a cap, or lower a floor. - 31
//! - 32
//! That is a property of the types rather than a rule to remember: [`Limits`] - 33
//! is a meet semilattice whose top element ([`Limits::unrestricted`]) - 34
//! reproduces vak's pre-kernel behaviour, [`Limits::meet`] is the only - 35
//! composition operator offered, and there is deliberately no `join` to reach - 36
//! for by accident. [`Limits::is_at_most`] states the invariant as a - 37
//! predicate, and the inline tests in `limits.rs` prove it holds - 38
//! across every reading the resolver can produce. - 39
//! - 40
//! Two consequences worth stating explicitly: - 41
//! - 42
//! * **Intent never gates the permission engine.** Permission is evaluated - 43
//! exactly as it always was; an engagement can only add an approval - 44
//! requirement on top. Nothing here can authorize anything. - 45
//! * **Uncertainty resolves to the orienting engagement.** A reading below the - 46
//! confidence floor loads the orientation floor (files and memory) and - 47
//! leaves every other admitted tool one `find_tools` call away; what a human - 48
//! delegated still applies. Being unsure never removes a capability — it - 49
//! only sends less up front. [`Engagement::general`], which restricts - 50
//! nothing at all, is what a *disabled* kernel produces. - 51
//! - 52
//! # Reproducibility - 53
//! - 54
//! Tiers 0 and 1 are pure functions of recorded inputs, so a decision that - 55
//! narrowed a turn can be reconstructed from the ledger months later. Tiers 2 - 56
//! and 3 may call a model and are marked `reproducible: false` with the model - 57
//! id and prompt digest that produced them — the same honesty the routing - 58
//! ledger applies to `Settlement::Unknown`. Never claim replay fidelity you do - 59
//! not have. - 60
- 61
pub mod authority; - 62
pub mod axes; - 63
pub mod control; - 64
pub mod engage; - 65
pub mod goal; - 66
pub mod limits; - 67
pub mod outcome; - 68
pub mod reading; - 69
pub mod resolve; - 70
pub mod signals; - 71
pub mod strand; - 72
- 73
pub use authority::{ - 74
ApprovalCeiling, Authority, Autonomy, Envelope, Escalation, GateFallback, PermissionCeiling, - 75
}; - 76
pub use axes::{ - 77
Act, Attendance, Clarity, EpistemicStance, Evidence, Horizon, Modality, Satisfaction, Stakes, - 78
}; - 79
pub use engage::{ - 80
Cadence, ClarifyPolicy, ContextProfile, DeliveryPosture, DemandHint, Engagement, HilMode, - 81
OutputShape, Posture, StopProfile, Urgency, apply_authority, derive, - 82
}; - 83
pub use engage::{DOMAIN_VOCABULARY, FLOOR_DOMAINS}; - 84
pub use goal::{ - 85
GoalControlState, GoalRelation, GoalState, GoalUpdate, goal_relation, next_goal_update, - 86
}; - 87
pub use limits::{DomainSet, Limits}; - 88
pub use outcome::{ - 89
Command, CompletionVerdict, ControlSource, EvidenceReceipt, EvidenceState, - 90
InterventionDecision, InterventionEvaluation, InterventionKind, InterventionRequest, - 91
OutcomeRequirement, OutcomeSpec, OutcomeStatus, RequirementEvaluation, RequirementImportance, - 92
RequirementKind, RequirementOrigin, RequirementStatus, evaluate_completion, - 93
evaluate_intervention, evaluate_requirements, evaluate_requirements_with_evidence, - 94
evaluate_requirements_with_receipt, evaluate_requirements_with_state, evaluate_response, - 95
evaluate_response_with_failures, evidence_state_from_age, evidence_state_from_receipt, - 96
human_review_state, parse_command, - 97
}; - 98
pub use reading::{Confidences, Intent, Provenance, Reading, Tier}; - 99
pub use resolve::{ - 100
Classification, Declared, RESOLVER_VERSION, Resolution, ResolverConfig, apply_classification, - 101
apply_envelopes, classification_budget, classification_prompt, implied_stakes, - 102
parse_classifications, prompt_digest, resolve, - 103
}; - 104
pub use signals::{ - 105
Attachment, HistoryFacts, Request, Signal, SignalKind, Surface, WorkspaceFacts, extract, - 106
}; - 107
pub use strand::{Lineage, LineageHint, Strand, StrandRelation, ThreadFact}; - 108
Indexing the workspace…
Vakyartha documentation is discovering safe artifacts, anchors, and source references.