Contributing to wickra-copilot
July 3, 2026 · View on GitHub
Thanks for your interest. Issues, bug reports, ideas and pull requests are all welcome at https://github.com/wickra-lib/wickra-copilot. For larger changes, open an issue first so we can agree on the approach.
Orientation
- The core — the
ContextSpecand the fold that turns serialized microstructure feeds (order book, trades, funding, open interest, liquidations) into aMarketContext, a list of hard facts (price moves, order-book imbalance, liquidation clusters, funding flips, OI changes, volatility spikes) — lives incrates/copilot-core. The context is data, not code: a serde data-model, so the same context crosses the C ABI and WASM unchanged, and stays byte-identical between the parallel (rayon) and sequential builds. - The LLM adapter is a separate, swappable crate (
crates/copilot-llm): it renders the context into a prompt and calls the user's own LLM endpoint (Ollama / OpenAI / Claude / Gemini over the OpenAI-compatible interface, key from the environment). The LLM call is non-deterministic and is never golden-tested — it is strictly separated from the deterministic core. - The reference consumer is
crates/copilot-cli(thewickra-copilotbinary,contextandasksubcommands); a localcrates/copilot-desktopfront-end drives the same core. - Every language binding lives under
bindings/<lang>/and exposes the same data-driven surface: aCopilothandle pluscommand(json) -> jsonandversion. Bindings must preserve the golden-parity invariant: given the spec + feed snapshots ingolden/, the same command produces the byte-identicalMarketContextingolden/expected/.
The dev loop
Every change runs green locally before a commit:
cargo fmt --all
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo clippy --workspace --all-targets --no-default-features -- -D warnings # WASM path (no rayon, no adapter networking)
cargo test --workspace --all-features
cargo test -p copilot-core --no-default-features # sequential == parallel (context builder)
cargo deny check
cargo fmt --all and the clippy -D warnings gate are enforced in CI on three
operating systems, across both the default (rayon parallel) and
--no-default-features (sequential / WASM) feature sets — the context builder
must produce a byte-identical MarketContext either way. The LLM adapter's
network path is exercised only by offline tests; it is not part of the
determinism gate.
Conventions
- Commits are signed and follow Conventional Commits (
feat:,fix:,chore:,docs:…). One logical change per commit. Open a PR againstmain; do not push tomaindirectly. - All public artifacts are in English — code, comments, commit messages, PR titles and bodies, issues and docs.
- No secrets, ever — not in code, tests, fixtures, logs, issues or PRs. The LLM API key is read from the environment, never committed, never logged, and never transmitted anywhere except the user-configured LLM endpoint. Market feeds read only public data.
- Production code only — no mocks outside
#[cfg(test)], no TODO stubs, and no defensive branches that can never run (they fail coverage).
Adding a fact
Facts are a serde enum, so extending the context means adding a variant, not a
closure. A new fact kind is added to crates/copilot-core/src/fact.rs and
derived in src/derive.rs, with a serde round-trip test and a golden fixture.
Indicators that ground a fact (volatility, OI deltas) come from the
Wickra core registry by name and
parameters — no indicator code lives here. See the guides under docs/.
Developer Certificate of Origin
Contributions are accepted under the DCO; sign off your commits with
git commit -s. By contributing you agree your work is dual-licensed under
MIT OR Apache-2.0.