# `Diffo.Provider.Extension.Verifiers.VerifySpecificationKind`
[🔗](https://github.com/diffo-dev/diffo/blob/v0.9.0/lib/diffo/provider/extension/verifiers/verify_specification_kind.ex#L5)

Verifies the declared `specification do type` matches the instance's kind:

  * a **Service** leaf (composes `Diffo.Provider.Service`) must declare
    `type :serviceSpecification`
  * a **Resource** leaf (composes `Diffo.Provider.Resource`) must declare
    `type :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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
