Skip to main content

Welcome Contributors

Thank you for your interest in contributing to IronClaw! This guide will help you get started with contributing code, documentation, and improvements to the project.

Getting Started

Before you begin, make sure you have:
  • Rust 1.85+ installed via rustup
  • Git for version control
  • A GitHub account
See Building from Source for detailed setup instructions.

Development Workflow

1. Fork and Clone

2. Create a Branch

Create a descriptive branch name for your changes:

3. Make Your Changes

Write your code following the project’s coding standards:

4. Commit Your Changes

Write clear, concise commit messages:

5. Push and Create PR

Then create a Pull Request on GitHub with:
  • A clear title describing the change
  • A detailed description of what changed and why
  • Any relevant issue numbers (e.g., “Fixes #123”)

Feature Parity Requirement

IronClaw tracks feature parity with OpenClaw in FEATURE_PARITY.md. This is critical for coordinating development across contributors.

When to Update FEATURE_PARITY.md

Update FEATURE_PARITY.md in the same branch when your change:
  • Implements a new feature tracked in the parity matrix
  • Completes a partial implementation (🚧 → ✅)
  • Starts work on a planned feature (❌ → 🚧)
  • Changes the status or behavior of any tracked capability

Required Before Opening a PR

  1. Review the relevant rows in FEATURE_PARITY.md
  2. Update status markers:
    • ✅ Implemented
    • 🚧 Partial (in progress or incomplete)
    • ❌ Not implemented
    • 🔮 Planned
    • 🚫 Out of scope
    • ➖ N/A (not applicable to Rust)
  3. Add notes explaining any deviations or design decisions
  4. Include the FEATURE_PARITY.md diff in your commit

Example

If you implement hot-reload for configuration:

Code Quality Standards

Formatting

All code must be formatted with rustfmt:

Linting

Code should pass clippy without warnings:

Testing

Add tests for new functionality:
See Running Tests for more details.

Project Structure

Coding Conventions

Rust Style

  • Follow the Rust API Guidelines
  • Use snake_case for functions and variables
  • Use PascalCase for types and traits
  • Use SCREAMING_SNAKE_CASE for constants
  • Add documentation comments (///) for public APIs

Error Handling

  • Use Result<T, E> for fallible operations
  • Use anyhow::Result for application errors
  • Use custom error types with thiserror for library code
  • Provide context with .context() from anyhow

Async Code

  • Use async/await for I/O operations
  • Use tokio::spawn for concurrent tasks
  • Avoid blocking operations in async contexts

Documentation

Code Documentation

Document all public APIs:

User Documentation

For user-facing features, consider adding documentation in docs/.

Security Considerations

IronClaw is a security-focused project. Keep these principles in mind:

Defense in Depth

  • Always validate and sanitize external input
  • Use sandboxing (WASM/Docker) for untrusted code
  • Implement capability-based permissions
  • Detect and prevent prompt injection

Secrets Management

  • Never log secrets or credentials
  • Use the secrets encryption system
  • Inject credentials at the host boundary
  • Scan for secret exfiltration attempts

SSRF Protection

  • Validate all URLs and endpoints
  • Use allowlists for external requests
  • Block private IP ranges and localhost
  • Validate redirect targets

Testing Requirements

Unit Tests

Add unit tests for new functionality:

Integration Tests

For features that interact with external systems, add integration tests in tests/.

Database Tests

IronClaw uses libSQL for tests by default (no external database required):
For PostgreSQL integration tests:

WASM Tools and Channels

Building WASM Modules

If you modify channel or tool source code:

WASM Requirements

  • Use the WASM Component Model
  • Target wasm32-wasip2
  • Declare capabilities in manifests
  • Follow sandbox security guidelines

Pull Request Guidelines

PR Checklist

Before submitting, ensure:
  • Code is formatted (cargo fmt)
  • Linter passes (cargo clippy --all-features)
  • Tests pass (cargo test)
  • FEATURE_PARITY.md updated if applicable
  • Documentation added/updated
  • Commit messages are clear and descriptive
  • PR description explains the change

PR Description Template

Code Review Process

  1. Maintainers will review your PR
  2. Address any feedback or requested changes
  3. Once approved, a maintainer will merge your PR
  4. Your contribution will be included in the next release

Getting Help

  • GitHub Issues: Report bugs or request features
  • Telegram: Join @ironclawAI
  • Reddit: Visit r/ironclawAI
  • Discussions: Use GitHub Discussions for questions

Code of Conduct

Be respectful and professional in all interactions. We’re building a welcoming community for everyone.

License

By contributing to IronClaw, you agree that your contributions will be licensed under either:
  • Apache License, Version 2.0
  • MIT License
at the user’s option, consistent with the project’s dual licensing.

Recognition

All contributors are recognized in the project. Thank you for making IronClaw better!