Thanks for your interest in contributing! This guide covers the basics.
- Rust 1.75+ β install via rustup
- Git
git clone https://github.com/codecoradev/uteke.git
cd uteke
cargo build --workspace# Run all tests
cargo test --workspace
# Run tests for a specific crate
cargo test -p uteke-core
cargo test -p uteke-cli# Format check β must pass
cargo fmt --all -- --check
# Lint β must pass with no warnings
cargo clippy --workspace --all-targets -- -D warningsRun cargo fmt before committing. Clippy warnings are treated as errors in CI.
Cora is an AI-powered code review tool that runs automatically on every PR via CI. It uses SARIF output and posts review comments directly on the PR.
Every PR to develop or main triggers the Cora Review CI job:
- Downloads the latest
cora-clibinary - Runs
cora review --base origin/develop --format sarif --severity major - Posts results as a PR comment (grouped by severity: π΄ Error / π‘ Warning / π΅ Note)
- Blocks merge if any Error-level issues are found
Run Cora locally before pushing to catch issues early:
# Install cora-cli (one-time)
# Download from https://github.com/codecoradev/cora-cli/releases
# Review your uncommitted changes
cora review --base HEAD~1 --format text
# Review against develop
cora review --base origin/develop --format textTip: Cora found real bugs in Uteke's own PRs (BM25 score always 0, missing metadata in server mode, RRF normalization). Running it locally saves CI cycles.
The Cora CI action is at .github/actions/cora-review/action.yml:
| Input | Default | Description |
|---|---|---|
base-branch |
origin/develop |
Branch to compare against |
severity |
major |
Minimum severity to report |
cora-version |
latest |
cora-cli version tag |
upload-sarif |
false |
Upload SARIF to GitHub Code Scanning |
LLM secrets are fetched via Infisical OIDC β no API keys stored in GitHub.
To enable SARIF upload to GitHub Code Scanning tab:
# In .github/workflows/cora-review.yml
uses: ./.github/actions/cora-review
with:
upload-sarif: 'true'- Fork the repository
- Create a branch from
developβ use descriptive names likefix/embedding-crashorfeat/export-command - Make your changes β keep PRs focused and small
- Add tests for new functionality
- Run Cora locally to catch review issues early
- Ensure CI passes β
cargo test,cargo fmt,cargo clippy, Cora Review all green - Open a Pull Request against the
developbranch
Every PR runs these checks (all must pass before merge):
| Check | Description |
|---|---|
| Build | cargo build --workspace |
| Check | cargo check --workspace |
| Clippy | cargo clippy β warnings = error |
| Format | cargo fmt --check β must be formatted |
| Test | cargo test --workspace β 107 unit tests |
| Cora Review | AI code review (blocking on errors) |
| CodeRabbit | AI review (non-blocking, advisory) |
| Cargo Audit | Dependency vulnerability scan |
| Trivy FS Scan | Filesystem security scan |
| GitGuardian | Secret leak detection |
Use clear, descriptive commit messages:
fix: handle empty query in recall command
feat: add --entity flag to remember command
docs: update README with hybrid search section
refactor: extract embedding normalization into helper
Prefix with type: feat, fix, docs, refactor, test, chore.
Uteke is a Cargo workspace with three crates:
| Crate | Purpose |
|---|---|
uteke-core |
Library β storage, embedding, vector search, FTS5 |
uteke-cli |
CLI binary β clap commands, JSON output |
uteke-server |
HTTP server β persistent daemon for fast agent access |
crates/
βββ uteke-core/ # Memory engine library
β βββ src/
β βββ lib.rs # Uteke struct β main API
β βββ memory/ # SQLite store + usearch vector index
β β βββ store.rs # Store struct β SQLite operations
β β βββ vector.rs # Vector index (usearch, RwLock)
β β βββ fts5.rs # FTS5 full-text search + RRF fusion
β β βββ schema.rs # Schema versioning + migrations
β β βββ crud.rs # CRUD operations
β β βββ types.rs # Type definitions (Memory, RecallResult, etc.)
β β βββ mod.rs # Module re-exports
β βββ embed/ # ONNX embedding engine
β βββ operations.rs # High-level operations (remember, recall, etc.)
β βββ consolidate.rs # Memory consolidation (dedup)
β βββ maintenance.rs # Doctor, verify, repair
β βββ import_export.rs # JSONL import/export
β βββ error.rs # Error types
βββ uteke-cli/ # CLI binary
β βββ src/
β βββ main.rs # Entry point
β βββ commands/ # Per-command modules
β βββ remember.rs
β βββ recall.rs
β βββ list.rs
β βββ server.rs # Server proxy
β βββ ... # Other commands
βββ uteke-server/ # HTTP server binary
βββ src/
βββ main.rs # Actix-web server
- RwLock for vector index β Read-heavy workload (recall/search) benefits from shared read locks; write ops (remember/forget) take exclusive write lock
- Mutex for embedder β ONNX tokenizer requires
&mut selfinternally; architectural limitation - FTS5 hybrid search β Vector similarity merged with FTS5 full-text search via Reciprocal Rank Fusion (RRF, k=60)
- SQLite-first dual-write β
remember()writes to SQLite before vector index;forget()acquires index lock before SQLite delete - Atomic file writes β All file saves use
.tmp+ rename pattern to prevent corruption on crash - Schema versioning β Integer counter in
schema_versiontable; auto-migration on upgrade
- Bugs: Use the Bug Report template
- Features: Use the Feature Request template
Open an issue with the question label. We're happy to help.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.