Spec and contracts
This page explains what the package guarantees once a spec is compiled.
What the spec should guarantee
- Kernel/tail selection is legal under the chosen backend.
- Dimensions are internally consistent (data/model/latent cluster labels).
- All required pieces (functions, parameters) exist for downstream codegen.
Where contracts live
- Primary validation and legality checks are implemented in
R/00-global-contracts.R. - Kernel discovery and metadata live in
R/00-kernel-registry.R.
Practical guidance
- If you add a kernel: update the registry + add at least one contract test.
- If you change an invariant (notation, flags): update both the code and docs pages that mention it.
Prereqs
- Required packages and data for this page are listed in the setup chunks above.
Outputs
- This page renders model fits, diagnostics, and summary artifacts generated by package APIs.
Interpretation
- Canonical concept page: Spec And Contracts
- Treat this page as an application/example view and use the canonical page for core definitions.
Next
- Continue to the linked canonical concept page, then return for implementation-specific details.