Click the structures and reaction arrows in sequence to view the 3D models and animations respectively
The ring being formed has five members; the breaking C=O bond is outside the new ring (exo); the C being attacked is a trigonal (sp2) atom (trig).
K. Gilmore and I. V. Alabugin, Chem. Rev., 2011, 111, 6513–6556.