Thanks for your interest in contributing! This document covers everything you need to build, test, and submit changes.
- Rust stable (edition 2021) — install via rustup
- No other toolchain is required: SQLite is bundled (compiled from source by
rusqlite), and Ollama is an optional runtime dependency only.
cargo build --workspace # full build
cargo test --workspace # unit + integration tests (incl. stdout-purity)cargo fmt # format (run before committing)
cargo fmt --check # CI-enforced
cargo clippy --workspace --all-targets -- -D warnings # zero warnings toleratedCore logic must stay above 80% line coverage:
cargo install cargo-llvm-cov --locked
cargo llvm-cov --workspace --fail-under-lines 80This gate is CI-enforced on every push/PR and re-verified in the release pipeline.
Use conventional prefixes:
feat: add semantic search fallback mode
fix: vec_memories orphan cleanup on TTL sweep
test: add idempotency cases for gsd-state import
docs: document --allow-remote semantics
chore: pin cargo-zigbuild 0.23.0
refactor: extract decay blend into helper
- No
unwrap()in production code — use?or handle the error explicitly.unwrap/expectare acceptable only inside#[cfg(test)]. - Stdout purity (MCP-05): when
agent-memory serveruns, stdout is a pure JSON-RPC channel. ALL logging goes to stderr (tracingsubscriber). Neverprintln!in any code path reachable fromserve— thestdio_purityintegration test enforces this. - Pattern match exhaustively — avoid catch-all
_arms unless truly needed. - No secrets, API keys, or tokens committed — credentials via environment variables only.
CI runs on UnityInFlow org self-hosted runners (never GitHub-hosted
images). PRs run the same gates listed above: fmt check, clippy
-D warnings, the full workspace test suite, and the >80% llvm-cov line
coverage gate. If your PR's CI seems stuck in queue, a maintainer may need to
bring a runner online — leave a comment.
Releases are tag-triggered: pushing a v* tag runs
.github/workflows/release.yml, which cross-compiles all supported triples
via cargo-zigbuild, packages per-triple tarballs, generates
SHA256SUMS.txt, and publishes a GitHub Release. The darwin cross-compile
spike (.github/workflows/spike-cross-compile.yml) must be green before
tagging.