Gap Detector
Measures the structural distance between an input and the closest shape.
What it does
The gap detector measures the structural distance (gap score) between the input and the closest shape in the library. If the gap score exceeds the threshold, the detector fires and triggers the bridge builder.
Gap score
The gap score is a value between 0 and 1. Low scores mean the input maps cleanly to a known shape. High scores mean there is structural distance that needs to be bridged.
- 0.0–0.3 — Clean match. Status is GROUND.
- 0.3–0.7 — Gap detected. Bridge builder runs. Status is BRIDGE.
- 0.7–1.0 — Large gap. If no bridge is viable, status is PROVISIONAL.
Threshold
The default threshold is 0.3. When the gap score exceeds this, thefires field in the structure is set to true and the bridge builder is invoked. The threshold is not configurable per-request — it is a property of the engine.
Why it matters
The gap detector is the honesty mechanism. It prevents the engine from claiming structural certainty when the input does not map cleanly to known geometry. Without gap detection, every output would look grounded — which is how most AI systems fail.