Geometrically-Constrained Agent for Spatial Reasoning