Contributing
How to contribute to stochastic-rs — coding conventions, the SKILL system that automates per-feature recipes, and the per-PR docs/tests/bench rule.
Contributing
Contributions welcome. Every PR that adds a public type ships with three things, in this order:
- The implementation, with a paper citation in the source file.
- A comparison test against the cited paper's numerical example.
- A criterion bench under
benches/.
For documentation:
- A docs page under
website/content/docs/<section>.mdx(orwebsite/content/docs/<section>/<name>.mdxif the section already has multiple pages), following one of the eight templates in thedocs-writingSKILL. - A Python wrapper if the type is user-facing (per the
python-bindingsSKILL).
SKILLs — the per-feature recipes
The .claude/skills/ directory contains step-by-step recipes for each
extension axis. Read the relevant SKILL before opening a PR. Each
SKILL captures load-bearing project conventions plus the file-by-file
order of operations.
| SKILL | Use when |
|---|---|
dev-rules | Project-wide development conventions |
new-module | Creating any new top-level module |
add-diffusion-process | New SDE process (GBM / OU / CIR style) |
add-jump-process | Jump-diffusion / Lévy / compound-Poisson |
add-fractional-process | Hurst-parameterised / rough process |
add-gpu-sampler | Port a CPU sampler to CUDA / Metal |
adding-distribution | New univariate distribution |
copula-bivariate | New bivariate copula |
stats-estimator | New statistical estimator |
calibration-pattern | New calibrator |
greeks-pattern | Expose first- + second-order Greeks |
add-mc-variance-reduction | New MC variance-reduction technique |
vol-surrogate-nn | New NN volatility surrogate |
bench-writing | Writing or refactoring criterion benches |
integration-test-writing | Writing integration tests |
feature-flag-management | Adding / propagating Cargo features |
python-bindings | Python (PyO3) wrapping |
adding-python-binding | Quickstart Python wrap |
docs-writing | Per-page docs templates + KaTeX gotchas |
release-checklist | Cutting an rc / stable / patch release |
License
Dual-licensed under MIT or Apache-2.0 at your option. By contributing you agree your code can be distributed under both.