Skip to main content

Module evaluator

Module evaluator 

Source
Expand description

Evaluator execution (CONTEXT.md §10, §12).

Tool evaluators run a command and check its exit code — tool-grounded grading, preferred where possible. AI evaluators return a review whose verdict the engine parses. Human evaluators are handled by the engine’s parking logic.

Structs§

AiEvaluator
An AI evaluator: a worker reviews the work and ends with a machine-readable verdict. Absent or FAIL fails closed; an explicit REPLAN triggers a replan.
EvalVerdict
The result of grading a node.
HumanEvaluator
A human evaluator: there is no automatic verdict, so it parks for the user.
ToolEvaluator
A tool evaluator: run the node’s acceptance command, pass iff it exits as required. The combined output is the critique on failure.

Constants§

AI_VERDICT_INSTRUCTION
The instruction suffix appended to AI-evaluator prompts so their verdict is machine-readable.

Functions§

parse_ai_verdict
Parse an AI evaluator’s review into a verdict. The engine instructs AI evaluators to end with VERDICT: PASS or VERDICT: FAIL; absent or FAIL is treated as a failure (fail-closed), and the full review is the critique.
run_tool
Run a tool evaluator’s acceptance command in workspace, passing iff the process exits with must_exit. The combined output becomes the critique on failure (CONTEXT.md §10 acceptance).