Verifies the declared specification do type matches the instance's kind:
- a Service leaf (composes
Diffo.Provider.Service) must declaretype :serviceSpecification - a Resource leaf (composes
Diffo.Provider.Resource) must declaretype :resourceSpecification
The kind is detected by the discriminating attribute each subtype fragment
contributes — :state for Service, :lifecycle_state for Resource. A resource
that declares no specification (e.g. the generic Diffo.Provider.Instance), or
that composes neither subtype fragment, is not checked.
This is the compile-time guard carried over from #191: it keeps an instance and its specification on the same side of the Service/Resource divide.