Thank you for your interest in contributing! This project follows the Tri-Perimeter Contribution Framework (TPCF) to ensure emotional safety and graduated trust.
Access Level: Open Contribution Trust Level: Minimal verification required Scope: This project operates in Perimeter 3, welcoming all contributions
What This Means:
- Anyone can fork, clone, and submit pull requests
- All contributions are reviewed before merge
- Maintainers verify code quality and security
- Contributors build trust through consistent, quality contributions
Future Perimeters:
- Perimeter 2: Trusted Collaborators - Proven contributors with direct commit access
- Perimeter 1: Core Maintainers - Long-term maintainers with full repository access
- Bug Fixes: Fix issues from the issue tracker
- New Features: Implement planned features from roadmap
- Performance Improvements: Optimize algorithms or reduce resource usage
- Test Coverage: Add tests to improve coverage
- Documentation: Improve inline docs, README, or guides
- Bug Reports: File detailed bug reports with reproduction steps
- Feature Requests: Propose new features with use cases
- Documentation: Write tutorials, guides, or improve existing docs
- Design: Create UI/UX improvements or visualizations
- Translation: Translate documentation (future)
- Community Support: Help others in discussions and issues
- CI/CD: Improve build pipelines or add new checks
- Tooling: Enhance development tools or scripts
- Security: Identify and report security vulnerabilities
- Performance: Profile and optimize critical paths
# Required
- Python 3.11+
- Rust (latest stable)
- Git
- Podman or Docker
# Recommended
- Just (command runner)
- Pre-commit
- VS Code with extensions (Python, Rust)# 1. Fork the repository on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/robot-vacuum-cleaner.git
cd robot-vacuum-cleaner
# 3. Add upstream remote
git remote add upstream https://github.com/Hyperpolymath/robot-vacuum-cleaner.git
# 4. Set up Python environment
python3.11 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
# 5. Set up Rust
cd src/rust
cargo build
cargo test
cd ../..
# 6. Install git hooks
./scripts/install-hooks.sh
# 7. Install pre-commit
pre-commit install# 1. Create a feature branch
git checkout -b feature/your-feature-name
# 2. Make your changes
# - Write code
# - Add tests
# - Update documentation
# 3. Run tests locally
pytest tests/python/ -v
cd src/rust && cargo test && cd ../..
# 4. Run code quality checks
black src/ tests/
isort src/ tests/
flake8 src/ tests/
mypy src/
# 5. Run security scans
bandit -r src/python/
trivy fs .
# 6. Commit your changes (pre-commit hooks will run)
git add .
git commit -m "feat(component): add your feature"
# 7. Push to your fork
git push origin feature/your-feature-name
# 8. Open a Pull Request- Code follows project style guidelines
- All tests pass locally
- New tests added for new functionality
- Documentation updated (README, inline comments)
- Commit messages follow Conventional Commits format
- No merge conflicts with main branch
- Pre-commit hooks pass
- Security scans pass
## Description
[Brief description of changes]
## Type of Change
- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] All tests pass
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review performed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] No new warnings generated
- [ ] Security considerations addressed
## Related Issues
Fixes #[issue number]
Relates to #[issue number]
## Screenshots (if applicable)
[Add screenshots for UI changes]
## Additional Notes
[Any additional information]- Automated Checks: CI/CD runs tests, linting, security scans
- Code Review: Maintainers review code quality, design, tests
- Feedback: Address review comments
- Approval: At least one maintainer approval required
- Merge: Maintainer merges after all checks pass
- Formatter: Black (line length 120)
- Import Sorting: isort (compatible with Black)
- Linter: Flake8, Pylint
- Type Hints: Required for public APIs
- Docstrings: Google style for all public functions
- Testing: pytest with 70%+ coverage
# Good example
def calculate_distance(start: Position, end: Position) -> float:
"""
Calculate Euclidean distance between two positions.
Args:
start: Starting position
end: Ending position
Returns:
Distance in meters
Raises:
ValueError: If positions are invalid
"""
return start.distance_to(end)- Formatter: rustfmt (default settings)
- Linter: clippy (all warnings enabled)
- Documentation: Doc comments for all public items
- Testing: Unit tests for all modules
- Safety: No unsafe code without extensive justification
/// Calculate distance between two positions.
///
/// # Arguments
///
/// * `start` - Starting position
/// * `end` - Ending position
///
/// # Returns
///
/// Distance in meters
///
/// # Examples
///
/// ```
/// let distance = calculate_distance(&start, &end);
/// assert!(distance > 0.0);
/// ```
pub fn calculate_distance(start: &Position, end: &Position) -> f64 {
start.distance_to(end)
}We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksperf: Performance improvementsci: CI/CD changesbuild: Build system changes
Examples:
feat(pathfinding): add A* algorithm with diagonal movement
fix(robot): correct battery consumption calculation
docs(readme): update installation instructions
test(slam): add particle filter unit tests
- Test Coverage: Aim for 80%+ coverage for new code
- Test Types: Unit, integration, and end-to-end tests
- Test Data: Use fixtures for reusable test data
- Assertions: Clear, specific assertions
- Edge Cases: Test boundary conditions and error cases
# Python tests
pytest tests/python/ -v --cov=src/python
# Rust tests
cd src/rust && cargo test --verbose
# Integration tests
pytest tests/integration/ -v
# Specific test file
pytest tests/python/test_robot.py -v
# With coverage report
pytest --cov=src/python --cov-report=html
open htmlcov/index.htmlSee SECURITY.md for security disclosure policy.
- Never commit secrets (use environment variables)
- Validate all external inputs
- Use parameterized queries (avoid SQL injection)
- Sanitize output (prevent XSS)
- Keep dependencies updated
- Run security scans before committing
- Python: Google-style docstrings
- Rust: Doc comments (///)
- Inline Comments: Explain "why", not "what"
- Examples: Include usage examples in docstrings
- README.md: Overview, installation, quick start
- ARCHITECTURE.md: System design and architecture
- API Documentation: Generated from code
- Guides: Step-by-step tutorials
This project follows the Code of Conduct. By participating, you agree to uphold this code.
- Be Respectful: Treat everyone with respect and kindness
- Be Inclusive: Welcome contributors from all backgrounds
- Be Collaborative: Work together constructively
- Be Patient: Remember everyone is learning
- Assume Good Intent: Give others the benefit of the doubt
All contributors are recognized in:
- CONTRIBUTORS.md (alphabetical list)
.well-known/humans.txt(machine-readable format)- GitHub contributors graph
- Release notes for significant contributions
Path to maintainership (TPCF Perimeter 2):
- Consistent Contributions: Regular, quality contributions over 3-6 months
- Code Reviews: Participate in reviewing others' PRs
- Community Support: Help others in issues and discussions
- Trust Building: Demonstrate commitment and understanding
- Invitation: Current maintainers extend invitation
- GitHub Issues: Bug reports, feature requests
- GitHub Discussions: Questions, ideas, general discussion
- Pull Requests: Code contributions and reviews
- Email: security@robot-vacuum.example.com (security only)
- Issues: Within 48-72 hours
- Pull Requests: Initial review within 1 week
- Security Reports: Within 48 hours
- General Questions: Best effort, no SLA
- Technical Questions: Open a GitHub Discussion
- Bug Reports: File a GitHub Issue
- Security Concerns: Email security@robot-vacuum.example.com
- General Inquiries: Open a GitHub Discussion
By contributing, you agree that your contributions will be licensed under the dual MIT + Palimpsest v0.8 license. See LICENSE.txt for details.
Under the Palimpsest License, you retain:
- Right to be credited in all derivative works
- Right to withdraw contributions (with notice)
- Protection from malicious modification
- Reversibility guarantees through version control
Thank you for contributing to Robot Vacuum Cleaner! 🤖🧹
Your contributions make this project better for everyone. We appreciate your time and effort!