Contributing
The canonical contribution guide is CONTRIBUTING.md in the repo — setup details, style rules, commit format, issue templates. This page is the short version plus corrections where the file has gone stale.
Prereqs and the clone → npm install → pip install -r kernel/requirements.txt → npm run tauri dev loop are covered in
Install & build. Fork first;
branch from main as feat/... or fix/....
Conventions (the short list)
Section titled “Conventions (the short list)”- TypeScript: strict mode, no
any; functional components + hooks only; all shared state through Zustand stores. - Python (kernel): type hints on all signatures; dataclasses for
structured data (
kernel/models/); Black + Ruff. - Rust:
cargo fmt --checkandcargo clippymust pass (clippy warnings are CI errors). - Commits:
<type>: <description>withfeat/fix/refactor/docs/test/chore/perf; first line under 72 chars. - Tests are required for new features; bug fixes need a regression test.
- Files under 800 lines, functions under 50, no hardcoded secrets.
Test commands
Section titled “Test commands”| Layer | Command | Status |
|---|---|---|
| Frontend | npm test (Vitest) | Working |
| Kernel | python3 -m pytest kernel/tests -q (from repo root) | Working — 365 tests, run in CI (kernel-tests.yml) |
| Docs honesty suites | included in the kernel run: test_docs_fixtures.py replays every protocol fixture, test_docs_examples.py runs the extending-guide worked examples | Working |
| Rust | cargo test | No tests exist yet — planned |
| Docs site | cd docs-site && npm run build | Working |
PR flow
Section titled “PR flow”- Keep the PR focused on one concern.
- Run locally before pushing:
npm test,npm run build,python3 -m pytest kernel/tests -q,cargo fmt --check,cargo clippy. - Open against
mainwith a conventional title, a what/why description, and screenshots for UI changes. - Push follow-up commits during review (no force-pushes); approved PRs are squash-merged.
Where extensions go
Section titled “Where extensions go”| You’re adding | Guide |
|---|---|
| A quantum framework | Framework adapters |
| A hardware provider | Hardware providers |
| Dirac behavior / prompts | Extending Dirac |
| Protocol changes | Update fixtures + protocol changelog |