Developers
Developer hub for architecture, tooling, tests, contracts, and release process.
This section is not required for normal use. If you are reading it, you are probably doing at least one of:
- adding a kernel/tail option
- changing a sampler / model component
- extending prediction/plotting/summary behavior
- preparing a release or CI workflow
Wrapper-first note: user-facing documentation should default to dpmix() / dpmgpd() for one-arm models and dpmix.causal() / dpmgpd.causal() for causal models. Internal pages in this section can describe bundle() + mcmc() when implementation detail matters.
ImportantDeveloper notes
Treat registry metadata as the primary extension entry point: it defines supported signatures, defaults, and compatibility. When possible, reuse shared bundle/runner/consumer layers instead of writing workflow-specific code.
ImportantGolden rules (do not break)
- Notation: mixture components use subscript j; restriction time uses L; Cox shorthand is ph.
- User-facing output: the “GPD flag” must display as TRUE/FALSE (not ON/OFF).
- Causal legality: the only unused/disallowed combo is SB + normal + GPD = FALSE.
Core pages
- Architecture
- Tools
- Testing
- Site build
- Conventions
- Spec and contracts
- Registry
- Add kernel
- Add tail option
- Causal internals
- Releasing
## Where to change what (quick routing)
| You want to… | Start here | Then check |
|---|---|---|
| Add a new kernel (bulk distribution) | R/00-kernel-registry.R |
R/*-mixgpd.R, tests in tests/testthat/, kernel docs in website/kernels/ |
| Add or modify a tail option | R/0-base-kernels.R |
contracts in R/00-global-contracts.R, docs in website/advanced/ and website/start/ |
| Change SB or CRP code generation | R/03-build-and-run.R |
backend comparison tests and example pages |
| Change causal pipeline | R/05-causal.R |
qte(), ate(), and S3 methods in R/04-S3-Methods.R |
| Change print, summary, or plot methods | R/04-S3-Methods.R |
helpers in R/06-visualization-helpers.R |
| Update website navigation | website/_quarto.yml |
hubs like website/developers/index.qmd, website/start/index.qmd, and website/examples/index.qmd |
Common pitfalls
- Registry mismatch: the registry advertises a kernel, but a required d/p/q/r function (or MixGPD wrapper) isn’t implemented.
- Support mismatch: kernel claims positive support but returns density for negative inputs (or vice versa).
- Tail discontinuity: the bulk and GPD pieces don’t match at the splice point (visible as a “kink” in log-density or CDF).
- Backend drift: SB and CRP paths diverge in parameter naming or dimensions, causing subtle posterior differences.
- Docs drift: website kernel page says one parameterization but code uses another.
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.