Skip to main content

Module hypothesis

Module hypothesis 

Source
Expand description

Hypothesis-loop mismatch classification for the agent runloop.

desirable loop: hypothesis → observation → mismatch → inspect evidence → revise hypothesis. This module is the pure, testable core of that loop: it names the mismatch, but never blocks, retries, or performs I/O. The binary’s deterministic failure diagnosis calls into it to frame the model-facing next_action; the evaluator scores the behavior.

Dimension key for MismatchEvidence (index → field → meaning):

fieldmeaning when set
exit_codetool result carried this process exit status
empty_search_no_matchgrep-style exit 1 with no output inside the queried scope
patch_mismatchpatch context/deletion lines do not match the current file
verifier_faileda standalone verifier reported a non-zero status
repeated_evidencequery returned only previously seen lines/ranges

Structs§

MismatchEvidence
Structured evidence for one mismatch classification.

Enums§

MismatchKind
Named mismatch between the agent’s hypothesis and its observation.

Functions§

append_revision_guidance
Append revision guidance to a deterministic next_action.
classify_mismatch
Classify mismatch evidence into its highest-priority kind.
revision_guidance
Model-facing revision guidance for a classified mismatch.