GapMeasurement is a shared result shape for measuring the difference between an agent’s output and a chosen standard. It keeps downstream search and archives independent of which method produced the signal. section 2.2.2 section 3.1.4
The result can carry:
- A score, preference between two answers, or feedback sentence; each can be left empty when a signal does not supply it. section 3.1.4
- Confidence and bookkeeping fields for signal ID, cost, and metadata. The proven flag marks a formal proof, not an ordinary ground-truth check. section 3.1.4
Different signals, one result
Ground truth can fill the score; an LLM judge can fill the preference; reflection can fill feedback. A formal proof sets a binary score and proven=true. Downstream code reads populated fields without branching on signal type. section 3.1.4
Figure 3.4 The GapMeasurement union. Every signal returns the same object: a proof fills the score with 1.0 or 0.0 and sets proven, ground truth fills the score, the chapter-2 judge fills the preference, and a reflection fills the feedback, while confidence and the bookkeeping fields travel with every measurement. Search and the archive read whichever field is filled, so the loop never branches on which signal ran.

Shows how proof, ground truth, judging, and reflection converge on the shared result shape. section 3.1.4
