Contributing to Stepflow
Thank you for your interest in contributing to Stepflow! We welcome contributions of all kindsβfrom bug fixes and new features to documentation improvements and examples.
This guide will help you get started quickly. For comprehensive development guidelines, see the full CONTRIBUTING.md in the repository.
Ways to Contributeβ
There are many ways to contribute to Stepflow:
- π Report bugs - Help us identify and fix issues
- β¨ Suggest features - Share ideas for new functionality
- π Improve documentation - Help others understand Stepflow better
- π§ Submit code - Fix bugs or implement new features
- π‘ Create examples - Show how to use Stepflow in different scenarios
- π§ͺ Write tests - Improve code quality and coverage
Quick Startβ
Prerequisitesβ
Before you begin, make sure you have:
- Rust 1.70+ - Install via rustup
- Python 3.8+ - For Python SDK development and examples
- uv - Python package manager:
pip install uv
Getting Startedβ
-
Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/stepflow.git
cd stepflow -
Sign the Individual Contributor License Agreement (ICLA)
REQUIRED BEFORE FIRST CONTRIBUTIONBefore making your first contribution, you must sign the ICLA:
python scripts/sign_icla.pyThe ICLA is a one-time legal agreement that:
- Grants the project rights to use your contributions
- Confirms you own the copyright to your work
- Ensures clear licensing for all project code
Your PR will be blocked until the ICLA is signed. For full details, see ICLA.md.
-
Build the project
cd stepflow-rs
cargo build -
Run tests to verify setup
cargo test -
Try running an example
cargo run -- run --flow=examples/basic/workflow.yaml \
--input=examples/basic/input1.json \
--config=examples/basic/stepflow-config.yml
Development Workflowβ
1. Create a Feature Branchβ
git checkout -b feature/your-feature-name
2. Make Your Changesβ
- Write code following our conventions
- Add tests for new functionality
- Update documentation as needed
3. Test Your Changesβ
# Run unit tests
cd stepflow-rs
cargo test
# Run with snapshot testing (recommended)
cargo insta test --unreferenced=delete --review
# Check code quality
cargo clippy
cargo fmt --check
4. Commit Your Changesβ
Use conventional commit format:
git add .
git commit -m "feat: add your feature description"
Commit prefixes:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Formatting changesrefactor:- Code refactoringtest:- Adding or modifying testschore:- Maintenance tasks
Pre-commit hooks will automatically check formatting, linting, and ICLA status.
5. Push and Create a Pull Requestβ
git push origin feature/your-feature-name
Then create a pull request on GitHub with:
- Clear description of changes
- Link to related issues
- Testing notes
- Any breaking changes
Code Standardsβ
Rust Codeβ
- Formatting: Use
rustfmt- runcargo fmt - Linting: Use
clippy- runcargo clippy - Line length: Maximum 100 characters
- Documentation: Use
///for public APIs, include examples - Testing: Place unit tests in the same file with
#[cfg(test)]
Error Handlingβ
- Define custom error types using
thiserror - Use domain-specific errors internally
- Convert to boundary errors at public API boundaries
- Include context in error messages
Example:
#[derive(Error, Debug)]
pub enum MyError {
#[error("Connection failed to {host}")]
ConnectionFailed { host: String },
}
Logging and Tracingβ
- Use
logfor detailed debugging (state changes, variables) - Use
fastracefor high-level execution structure (workflow lifecycle) - Trace context is automatically injected into logs
Testingβ
# Fast unit tests
cargo test
# Test specific crate
cargo test -p stepflow-execution
# Test specific function
cargo test -p stepflow-execution -- execute_flows
# Integration tests (requires Python)
cd ..
./scripts/test-integration.sh
# Complete test suite
./scripts/test-all.sh
Pull Request Requirementsβ
Your PR should:
- β ICLA signed - Required for all contributions
- β Pass all existing tests
- β Include tests for new functionality
- β
Pass
cargo clippywithout warnings - β
Be formatted with
cargo fmt - β Include appropriate documentation
- β Have a clear commit history
Project Structureβ
The repository contains:
stepflow-rs/- Main Rust execution engine and runtimestepflow-ui/- Web-based frontend for workflow managementsdks/python/- Python SDK for building componentssdks/typescript/- TypeScript SDK for building componentsdocs/- Documentation site (Docusaurus)examples/- Example workflows and use cases
Key Rust Cratesβ
stepflow-core- Core types and workflow definitionsstepflow-execution- Workflow execution enginestepflow-plugin- Plugin system and trait definitionsstepflow-protocol- JSON-RPC communication protocolstepflow-builtins- Built-in component implementationsstepflow-components-mcp- MCP integration
Getting Helpβ
- π¬ Questions? Ask in GitHub Discussions
- π Found a bug? Report it in GitHub Issues
- π Need more details? See the full CONTRIBUTING.md
- π Community resources - Visit our Community page
Development Tipsβ
Common Commandsβ
# Quick development cycle
cargo check # Fast syntax check
cargo test # Run tests
cargo clippy # Check for issues
cargo fmt # Format code
# Working with examples
cd stepflow-rs
cargo run -- run --flow=examples/python/basic.yaml \
--input=examples/python/input1.json
# Debugging
RUST_LOG=debug cargo run -- run --flow=your-flow.yaml \
--input=your-input.json
IDE Setupβ
For VS Code users, we recommend:
rust-analyzerextensionBetter TOMLextension- Configure format-on-save for consistent formatting
Code of Conductβ
All contributors are expected to follow our code of conduct principles:
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Assume good intentions
Thank you for contributing to Stepflow! π