🤝 Welcome Contributors! - Help us build the future of quantum state machines
Thank you for your interest in contributing to StatePro! This guide outlines how to contribute effectively and ensure your changes are merged smoothly.
- Code of Conduct
- Types of Contributions
- Development Setup
- Development Workflow
- Code Style and Standards
- Testing
- Documentation
- Pull Request Process
- Reporting Issues
- Getting Help
- Recognition
StatePro is committed to providing a welcoming and harassment-free experience for everyone. By participating in this project, you agree to abide by our code of conduct.
- Be Respectful - Treat all community members with respect and kindness
- Be Constructive - Provide helpful feedback and focus on solutions
- Stay On-Topic - Keep discussions relevant to the project
- Be Collaborative - Work together to achieve common goals
- Be Patient - Help newcomers learn and grow
- Take Responsibility - Accept accountability for mistakes and learn from them
- Harassment, discrimination, or offensive comments
- Personal attacks or inflammatory language
- Publishing others' private information
- Trolling, spamming, or disruptive behavior
Violations will be reported to project maintainers. Serious violations may result in temporary or permanent exclusion from the project.
This code of conduct is adapted from the Contributor Covenant
We welcome all types of contributions to StatePro! Here's how you can help:
- Report bugs with detailed reproduction steps
- Suggest improvements to existing features
- Request new features with clear use cases
- Help triage and respond to existing issues
- Bug Fixes - Fix reported issues and edge cases
- New Features - Implement requested functionality
- Performance - Optimize execution speed and memory usage
- Testing - Add unit tests, integration tests, and benchmarks
- Refactoring - Improve code quality and maintainability
- API Documentation - Improve GoDoc comments and examples
- Guides & Tutorials - Write step-by-step tutorials
- Examples - Create real-world usage examples
- Troubleshooting - Document common issues and solutions
- Translations - Help translate documentation (future)
- Developer Tools - Improve debugging and development experience
- CI/CD - Enhance build and testing pipelines
- Automation - Create scripts and tools for maintenance
- Monitoring - Add observability and metrics
Look for issues labeled:
good first issue- Perfect for newcomershelp wanted- Community contributions neededdocumentation- Documentation improvementsenhancement- Feature improvements
Before you start contributing, ensure you have:
- Go 1.22+ - Required for development
- Git - For version control
- Code Editor - VS Code, GoLand, or Vim with Go support
- (Optional) Docker - For containerized development and testing
- Fork the repository on GitHub
- Clone your fork locally
- Add upstream remote for syncing
- Install dependencies
- Verify installation by running tests and examples
- Find an Issue - Check open issues or create one
- Fork & Clone - Fork the repo and clone your fork locally
- Setup Remotes - Add upstream remote for syncing
- Create Branch - Always branch from latest main
- Make Changes - Implement changes and verify with examples
- Sync & Rebase - Keep your branch up-to-date with main
- Create PR - Submit pull request with clear description
- Code Review - Collaborate with maintainers on feedback
- Merge - Celebrate your contribution!
Browse open issues and filter by labels like good first issue, help wanted, bug, enhancement, or documentation.
If you have an idea not covered, create a new issue with a clear title, description, use case, and proposed solution.
Use descriptive branch naming conventions:
- Features:
feature/add-custom-validators - Bug fixes:
fix/issue-123-memory-leak - Documentation:
docs/api-reference-examples - Refactoring:
refactor/simplify-observer-logic
Always start from the latest main branch.
- Make small, focused changes with one logical change per commit
- Test early and often
- Verify examples still work
- Check code quality
- Run the complete test suite before committing
Regularly sync with upstream by fetching latest changes and rebasing your branch.
- Follow standard Go formatting
- Use gofmt and goimports for consistent formatting
- Follow Go naming conventions
- Write clear, concise comments
- Use meaningful variable and function names
Use clear, descriptive commit messages following conventional format:
feat: add support for custom event validators
- Add EventValidator interface
- Implement default validators
- Update documentation
Fixes #123
- Keep packages focused and cohesive
- Use interfaces for extensibility
- Document public APIs thoroughly
- Include examples in package comments
- Write unit tests for all new functionality
- Include integration tests for complex features
- Use table-driven tests for multiple test cases
- Test error conditions and edge cases
- Test with real JSON state machine definitions
- Aim for >80% test coverage
- Unit tests for data models
- Integration tests for runtime
- Example-based tests to verify JSON definitions work
- Benchmark tests for performance monitoring
- Keep README.md up to date
- Update docs/ for significant changes
- Include code examples in documentation
- Test all code examples
- Use clear, concise language
- Include practical examples
- Explain concepts before implementation details
- Keep cross-references up to date
- Fork the repository
- Clone your fork
- Create a feature branch
- Make changes and test thoroughly
- Sync with upstream
- Create pull request
- Address code review feedback
- Merge
- Go to the StatePro repository on GitHub
- Click "Fork" to create your own copy
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/statepro.git - Add upstream remote:
git remote add upstream https://github.com/rendis/statepro.git
- Sync with upstream:
git checkout main && git pull upstream main - Create branch:
git checkout -b feature/your-feature-name
- Implement your changes
- Test thoroughly (run tests, verify examples work)
- Commit with clear messages
- Fetch upstream:
git fetch upstream - Rebase your branch:
git rebase upstream/main - Push to your fork:
git push origin feature/your-feature-name
- Go to your fork on GitHub
- Click "Compare & pull request"
- Fill out the PR template with clear description
- Submit the PR
- Automated checks will run
- Maintainers will review and provide feedback
- Address any requested changes
- Push updates to your branch
- Once approved, maintainers will merge your PR
- Clean up your local branches
Before creating a PR, ensure:
- Fork is up-to-date with upstream main
- All tests pass
- New functionality has tests (when applicable)
- Examples run successfully
- Code is formatted
- No static analysis issues
- Dependencies are clean
- Documentation updated (if needed)
- Commit messages are descriptive
- No merge conflicts exist
Use this template for your PR description:
## Description
Provide a clear and concise description of what this PR does.
### Changes Made
- List key changes in bullet points
### Related Issues
Closes #123
Fixes #456
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
- [ ] Refactoring
- [ ] Performance improvement
- [ ] Test addition
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] All existing tests pass
- [ ] Examples still work correctly
## Checklist
- [ ] Code follows the project's style guidelines
- [ ] Self-review of code completed
- [ ] Documentation updated (if needed)
- [ ] Tests added for new functionality
- [ ] All tests pass locally
- [ ] No new warnings or errors
- [ ] Commit messages follow convention
- [ ] Breaking changes documented (if any)
- Automated checks will run (tests, linting)
- Code review by maintainers
- Feedback and requested changes
- Approval and merge
Respond to feedback promptly, make requested changes, and communicate clearly with reviewers.
When reporting bugs, include:
- Clear title describing the issue
- Steps to reproduce the problem
- Expected behavior vs actual behavior
- Environment details (Go version, OS, etc.)
- Code samples or minimal reproduction case
- Error messages and stack traces
For new features, include:
- Clear description of the proposed feature
- Use case and why it's needed
- Implementation ideas if you have them
- Potential impact on existing code
bug: Something isn't workingenhancement: New feature or improvementdocumentation: Documentation issuesgood first issue: Good for newcomershelp wanted: Community contribution neededquestion: Questions and discussions
- Issues: Use GitHub issues for bugs and feature requests
- Discussions: Use GitHub discussions for questions and ideas
- Documentation: Check docs/ directory for detailed guides
Contributors will be recognized in:
- GitHub's contributor insights
- Release notes for significant contributions
- Project documentation
Thank you for contributing to StatePro! 🚀