This file is read on every Claude Code session in this repo. Keep it short and only include things that aren't obvious from the source or already documented in CONTRIBUTING.md.
- Do not add a
Co-Authored-By: Claude ...trailer to commit messages. - Do not add any "Generated with Claude Code" line to commit bodies or PR descriptions.
- Use Conventional Commit prefixes:
feat:,fix:,docs:,test:,refactor:,perf:,chore:,style:. - Never bypass the pre-commit hook with
--no-verify— fix the underlying issue.
- Canonical "did I break anything" command:
./scripts/check-all.sh. Runs the same 7 checks CI runs (fmt, clippy, build, test, doc tests, README sync, bench compile). Prefer this over running each step piecemeal. - Clippy must pass with
cargo clippy --all --all-features -- -D warnings(warnings are denied — stricter thancargo clippy --all). - Do not run
cargo benchunless explicitly asked. CI only checks bench compilation, and a full run is slow.
- Snapshot files live in
src/snapshots/*.snapand are managed bycargo insta. - When a snapshot test fails because output formatting changed legitimately, run
cargo insta review(orcargo insta acceptafter eyeballing the diff). Do not hand-edit.snapfiles.
- The crate-level rustdoc is generated from
README.mdvia#![doc = include_str!("../README.md")]insrc/lib.rs— README.md IS the crate's top-level docs, and code blocks in it run as doc tests undercargo test --doc. ./scripts/check-readme-sync.shenforces structural sync; run it after touching docs.- When adding examples to README.md, make sure they compile, or mark them
ignore/no_rundeliberately.
- Crate forbids
unsafe(#![forbid(unsafe_code)]insrc/lib.rs). Do not addunsafeblocks. - MSRV is 1.88, edition 2024 (see
Cargo.toml). Don't reach for language features that exceed this. - Public API changes ripple into
examples/*.rsandfuzz/fuzz_targets/— both compile in CI, so update them when renaming or changing exported types.