-
Notifications
You must be signed in to change notification settings - Fork 1
Contributing Guidelines
How to contribute to JARVIS AI Agent development.
We appreciate your interest in contributing to JARVIS. This guide will help you get started.
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what is best for the community
- Show empathy towards other contributors
# Fork repository on GitHub
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/JARVIS-AI-Agent.git
cd JARVIS-AI-Agent
# Add upstream remote
git remote add upstream https://github.com/derekjrussell/JARVIS-AI-Agent.git# Update main
git checkout main
git pull upstream main
# Create feature branch
git checkout -b feature/your-feature-nameDevelopment Setup:
# Install development dependencies
pip install -r backend/requirements.txt
pip install -r backend/requirements-optional.txt
# Install pre-commit hooks
pre-commit install
# Run tests
cd backend
pytest tests/Required:
# Unit tests
pytest tests/unit/ -v
# Integration tests
pytest tests/integration/ -v
# Code quality
black backend/
flake8 backend/
pylint backend/Use Conventional Commits:
# Format: <type>(<scope>): <description>
git commit -m "feat(voice): add ECAPA-TDNN speaker recognition"
git commit -m "fix(database): resolve Cloud SQL connection timeout"
git commit -m "docs(wiki): add API documentation"Types:
-
feat: New feature -
fix: Bug fix -
docs: Documentation -
style: Code style (formatting) -
refactor: Code refactoring -
test: Add/update tests -
chore: Maintenance
# Push to your fork
git push origin feature/your-feature-name
# Create pull request
gh pr create --fillUse Conventional Commits format:
feat(voice): Add SpeechBrain STT engine
fix(gcp): Resolve VM auto-scaling issue
docs(setup): Update installation guide
Include:
## Summary
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or documented)Preferred sizes:
- XS: <10 lines
- S: 10-99 lines
- M: 100-499 lines
- L: 500-999 lines
- XL: 1000+ lines (split if possible)
Follow PEP 8 with Black formatting:
# Format code
black backend/
# Sort imports
isort backend/
# Lint
flake8 backend/
pylint backend/Type hints required:
def process_command(text: str, context: Dict[str, Any]) -> Dict[str, Any]:
"""Process voice command with context."""
passDocstrings required:
def analyze_screen(prompt: str) -> Dict[str, Any]:
"""
Analyze screen content with Claude Vision API.
Args:
prompt: Analysis prompt
Returns:
Dict containing analysis results
Raises:
VisionAPIError: If analysis fails
"""
passFollow ESLint rules:
// Use const/let, not var
const apiUrl = 'http://localhost:8010';
// Arrow functions for callbacks
ws.onmessage = (event) => {
handleMessage(JSON.parse(event.data));
};
// Async/await, not callbacks
async function fetchData() {
const response = await fetch(apiUrl);
return response.json();
}Required for:
- New features
- Bug fixes
- Refactored code
Example:
import pytest
from intelligence.cai import ContextAwarenessIntelligence
def test_intent_prediction():
cai = ContextAwarenessIntelligence()
result = cai.predict_intent("unlock my screen")
assert result['intent'] == 'screen_unlock'
assert result['confidence'] > 0.7
assert result['requires_auth'] is TrueRequired for:
- API endpoints
- Database operations
- External service integrations
Minimum: 70% overall Target: 85%
# Check coverage
pytest --cov=backend tests/When adding features:
- Update relevant Wiki page
- Add docstrings to code
- Update API documentation if needed
- Add examples to README
When fixing bugs:
- Document fix in PR description
- Add to CHANGELOG.md
- Update troubleshooting guide if applicable
Code Quality:
- Follows style guidelines
- Well-structured and readable
- Properly tested
- No unnecessary complexity
Functionality:
- Solves stated problem
- No regressions
- Edge cases handled
- Error handling implemented
Documentation:
- Clear commit messages
- Updated documentation
- Code comments where needed
- PR description complete
- Initial Review: Within 48 hours
- Follow-up: Within 24 hours
- Approval: Minimum 1 reviewer
# Make requested changes
git add .
git commit -m "fix: address PR feedback"
git push origin feature/your-feature-nameInclude:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment details
- Logs/screenshots
Template:
## Bug Description
Clear description of the bug
## Steps to Reproduce
1. Start JARVIS
2. Execute command "..."
3. Observe error
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Environment
- OS: macOS 13.5 (M1)
- Python: 3.10.12
- JARVIS: v17.4.0
## LogsPaste relevant logs
Include:
- Use case/problem to solve
- Proposed solution
- Alternatives considered
- Additional context
# Start JARVIS in dev mode
DEBUG=true python start_system.py --dev
# Watch logs
tail -f jarvis_startup.log
# Test API endpoints
curl http://localhost:8010/health# Use logging instead of print
import logging
logger = logging.getLogger(__name__)
logger.debug("Debug info")
logger.info("Info message")
logger.error("Error occurred")- Profile code before optimization
- Use async/await for I/O operations
- Cache expensive operations
- Monitor memory usage
- Check existing documentation
- Search GitHub issues
- Ask in discussions
- Create detailed issue
# Sync your fork
git fetch upstream
git checkout main
git merge upstream/main
git push origin mainThank you for contributing to JARVIS!
Last Updated: 2025-10-30
๐ JARVIS AI Agent Wiki | Main Repository | Issues | Discussions
Last updated: $(date +"%Y-%m-%d %H:%M:%S")
Version: v17.4.0 Last Updated: $(date +"%Y-%m-%d")