Optional structured companion data on a TypeDiagnostic. The
variants map one-to-one with diagnostics that have specific
tooling-consumable state beyond the human-readable message; each
variant is attached only by the sites that produce its
corresponding diagnostic, so a consumer can pattern-match on the
variant without parsing the error string.
Produce a detail string describing why a Shape type is incompatible with
another Shape type — e.g. “missing field ‘age’ (int)” or “field ‘name’
has type int, expected string”. Returns None if both types are not shapes.