Read README.md before starting work.
- Always think/reason in English (set thinking language to English)
- Source code and docs in English
- Bug fixing: When a bug is discovered, always check related files for similar bugs and propose to the user to inspect them
cargo fmt for formatting, cargo clippy for linting. Avoid unwrap()/expect() in library code.
Always run cargo fmt --all before committing changes.
Keep source files small and focused — one logical concern per file.
- Use
assert!with informative messages for programming invariants
Always use --release mode for tests.
cargo test --release # Full suite
cargo test --doc --release # Doc tests- Private functions:
#[cfg(test)]module in source file - Integration tests:
tests/directory
Public API doc comments (///) must include a minimal but sufficient example showing how to use the API.
Only make functions pub when truly public API.