Thank you for your interest in contributing! This guide covers the essentials.
- Rust: 1.85 or later (check with
rustc --version) - Cargo: Included with Rust
- Git: For version control
-
Clone the repository:
git clone https://github.com/randomm/oo.git cd oo -
Verify Rust version:
rustc --version # Should output 1.85 or later -
Build the project:
cargo build --release
-
Run tests to ensure everything works:
cargo test -
Create a symlink for development (optional):
ln -sf $(pwd)/target/release/oo /usr/local/bin/ooOr add
$(pwd)/target/releaseto your PATH.
After building, verify oo works with a simple command:
./target/release/oo echo "hello, world"Expected output:
hello, world
For a more comprehensive test, try indexing a large output:
./target/release/oo git log --oneline -100Expected output (if output > 4 KB):
● git log (indexed X.XX KiB → use `oo recall` to query)
- Fork and clone your fork
- Create a branch:
feature/issue-N-descriptionorfix/issue-N-description - Make changes with conventional commits:
feat(#N): description,fix(#N): description,chore: description - Run quality gates (ALL must pass):
cargo fmt --check cargo clippy -- -D warnings cargo test cargo tarpaulin --fail-under 70 - Open a PR linking to a GitHub issue with
Fixes #Nin the body
- Edition: 2024
- Rust version: 1.85+
- Error handling: Use
thiserrorfor error types; nounwrap()in library code (tests OK) - File size: 500 lines hard cap, 300 lines ideal
- No suppressions: No
#[allow(...)]without explanatory comment - Comments: Explain WHY, not WHAT
See Testing Guide for comprehensive details.
- TDD preferred — write tests before implementation
- 80%+ coverage for new code (enforced by
cargo tarpaulin) - Unit tests in-module (
#[cfg(test)]) - Integration tests in
tests/usingassert_cmd - Network-dependent tests: mark
#[ignore]with explanation
# All tests
cargo test
# Unit tests only
cargo test --lib
# Integration tests only
cargo test --test integration
# Coverage
cargo tarpaulin --fail-under 70- All public API items require
///doc comments - See Architecture for module responsibilities
- Use
cargo doc --opento preview documentation
README.mdis user-facing — keep it accurate- Legitimate docs go in
docs/with lowercase-hyphenated filenames - No agent work artifacts (RESEARCH.md, PLAN.md, etc.)
When contributing changes that will appear in releases:
- Write human-readable summaries: Explain user impact, not just technical changes
- ✅ "Fixes crash when git output contains non-UTF8 characters"
- ❌ "Fix: handle decode error in exec.rs"
- Focus on what changed: Users care about effects, not implementation details
- Keep it concise: One sentence per entry is usually sufficient
- Prioritize visible changes: Bug fixes, new features, breaking changes first
- Document breaking changes clearly: If something requires user action, say so
Note: The changelog is generated from conventional commits. Manual summaries in
CHANGELOG.mdshould supplement (not replace) generated entries with minimal narrative context about user impact.
Examples of good release notes:
- "Fix: pattern matching now works with multi-byte Unicode characters"
- "Add:
oo initgenerates Claude-compatible hooks automatically" - "Change: SQLite database moved to
~/.local/share/.oo/for XDG compliance"
See existing entries in CHANGELOG.md for style reference.
Before creating code, ask:
- Is this explicitly required by the GitHub issue?
- Can existing code/tools solve this instead?
- What's the SIMPLEST way to meet the requirement?
- Will removing this break core functionality?
- Am I building for hypothetical future needs?
If you cannot justify necessity, DO NOT create it.
No TODO/FIXME comments — open a GitHub issue instead.
- Architecture — System design and module responsibilities
- Security Model — Trust assumptions and data handling
- Testing Guide — How to write and run tests
- AGENTS.md — Complete project conventions for AI agents
cargo build --release # build optimised binary
cargo test # run all tests (unit + integration)
cargo clippy -- -D warnings # lint (warnings = errors)
cargo fmt # format code
cargo fmt --check # check formatting (used in CI)feature/issue-N-descriptionfor new featuresfix/issue-N-descriptionfor bug fixes
feat(#N): description— new featurefix(#N): description— bug fixchore: description— maintenance task
- Check Architecture and Testing Guide first
- See AGENTS.md for agent-specific conventions
- Open a GitHub issue if you're unsure about something