Skip to main content

Module goal

Module goal 

Source
Expand description

Live bridge for the goal loop: project GoalInputs from a Runtime’s ground truth — its event-log receipts, its shared state, its transactional consistency — so car-verify’s pure car_verify::goal::evaluate_goal decides completion against what actually happened, not a transcript read.

See docs/proposals/goal-loop.md. This is the deterministic Evaluator half of the goal loop. It is the seam the flagship assistant and the external (Codex / Claude Code) executors plug into: each iteration, the caller runs any command / model-judge checks it owns, then calls Runtime::gather_goal_inputs to fold in the runtime-owned signals, then runs evaluate_goal. The loop driver itself (car_verify::goal::run_goal_loop) stays injected and crate-free.

Structs§

GoalGather
What to project into a GoalInputs for one evaluation. The runtime-owned signals (claims, plan, transaction_proposal, state_keys) are gathered by Runtime::gather_goal_inputs; the caller-owned checks (command_exits, model_verdicts) are passed through verbatim, since running a shell check or a model judge belongs to the executor, not the runtime (the same injected split the driver uses).

Functions§

model_tier
Best-effort local | cloud | unknown tier from a model id’s provider prefix (the segment before the first /).
turn_completed_data
Build the durable TurnCompleted event-data map.