Set field-only _spec before building the full spec with nested shapes.
Self-references resolve because cls._spec already exists when the
generator encounters shape._spec where shape is cls.
Also: pass cls into get_type_hints localns so forward ref strings
like list["CategoryShape"] resolve to the class being defined.
49 shapes tests, 0 skipped.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>