Validate a parsed ResourceDefinition and return structured diagnostics
with fix suggestions. This is the “AI-friendly” counterpart to validator::validate_resource.
Identical to diagnose_resource, but attaches Span data from the
SpanMap by looking up each diagnostic’s field path. For v0.14.x only
root-level codes (SR001-SR005) get spans; per-field codes still emit
without spans.