mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 07:20:19 +00:00
Full rename of all identifiers, filenames, and references: ironclaw → optimclaw IronClaw → OptimClaw IRONCLAW → OPTIMCLAW ironclaw_common → optimclaw_common ironclaw_safety → optimclaw_safety Upstream: nearai/ironclaw
2.0 KiB
2.0 KiB
Contributing
Getting Started
git clone https://github.com/nearai/optimclaw.git
cd optimclaw
./scripts/dev-setup.sh
This installs the Rust toolchain, WASM targets, git hooks, and runs initial checks.
Development Workflow
cargo fmt # format
cargo clippy --all --benches --tests --examples --all-features # lint (zero warnings)
cargo test # unit tests
cargo test --features integration # + PostgreSQL tests
Code Style
- Zero clippy warnings policy
- No
.unwrap()or.expect()in production code (tests are fine) - Use
thiserrorfor error types, map errors with context - Prefer
crate::for cross-module imports - Comments for non-obvious logic only
See CLAUDE.md for full style guidelines.
Feature Parity Requirement
When your change affects a tracked capability, update FEATURE_PARITY.md in the same branch.
Required before opening a PR
- Review the relevant parity rows in
FEATURE_PARITY.md. - Update status/notes if behavior changed.
- Include the
FEATURE_PARITY.mddiff in your commit when applicable.
Review Tracks
All PRs follow a risk-based review process:
| Track | Scope | Requirements |
|---|---|---|
| A | Docs, tests, chore, dependency bumps | 1 approval + CI green |
| B | Features, refactors, new tools/channels | 1 approval + CI green + test evidence |
| C | Security (src/safety/, src/secrets/), runtime (src/agent/, src/worker/), database schema, CI workflows |
2 approvals + rollback plan documented |
Select the appropriate track in the PR template based on what your changes touch.
Database Changes
OptimClaw uses dual-backend persistence (PostgreSQL + libSQL). All new persistence features must support both backends. See src/db/CLAUDE.md.
Adding Dependencies
Run cargo deny check before adding new dependencies to verify license compatibility and check for known advisories.