Contributing
We welcome contributions to Jugar!
Getting Started
Clone the Repository
git clone https://github.com/paiml/jugar.git
cd jugar
Install Tools
make install-tools
Run Tests
make tier2
Development Workflow
1. Create a Branch
git checkout -b feature/my-feature
2. Make Changes
Follow the coding standards below.
3. Run Checks
# Quick check during development
make tier1
# Full check before committing
make tier2
4. Commit
git add .
git commit -m "feat: add my feature"
5. Push and Create PR
git push origin feature/my-feature
# Create PR on GitHub
Coding Standards
Zero JavaScript
CRITICAL: No JavaScript in game logic.
- ❌ No
.jsor.tsfiles - ❌ No
npmorpackage.json - ❌ No JavaScript bundlers
- ✅ Pure Rust only
- ✅ WASM output only
Batuta-First
Use Batuta stack components before external crates:
truenofor SIMD/GPU computeaprenderfor ML/AItrueno-vizfor rendering
Formatting
cargo fmt
Linting
cargo clippy --all-targets -- -D warnings
No warnings allowed.
Tests
- Write tests for all new code
- Maintain 95%+ coverage
- Include property tests for complex logic
make coverage
Documentation
- Add doc comments to public APIs
- Update book if adding features
- Include examples for new functionality
Commit Messages
Follow conventional commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationrefactor: Code refactoringtest: Adding testschore: Maintenance
Examples:
feat(physics): add continuous collision detection
fix(ai): correct pathfinding edge case
docs(book): add probar chapter
Pull Request Guidelines
Requirements
All PRs must:
- Pass CI (tier2 equivalent)
- Have tests for new code
- Update documentation if needed
- Have descriptive commit messages
Review Process
- Automated checks run
- Maintainer reviews code
- Feedback addressed
- Approval and merge
PR Template
## Summary
Brief description of changes.
## Changes
- Change 1
- Change 2
## Testing
How was this tested?
## Checklist
- [ ] Tests added
- [ ] Documentation updated
- [ ] `make tier2` passes
Architecture Decisions
For significant changes:
- Open an issue first
- Discuss the approach
- Get approval before implementing
Code of Conduct
Be respectful and constructive. We're all here to build something great together.
Getting Help
- Open an issue for questions
- Check existing issues first
- Join discussions on GitHub
License
By contributing, you agree that your contributions will be licensed under the MIT License.