Thank you for your interest in contributing to AI Orchestrator! This document provides guidelines and instructions for contributing.
This project adheres to a Code of Conduct that all contributors are expected to follow. Please read CODE_OF_CONDUCT.md before contributing.
- Python 3.8 or higher
- Git
- pip and virtualenv
- Fork and clone the repository
git clone https://github.com/your-username/ai-orchestrator.git
cd ai-orchestrator- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install development dependencies
make install-dev
# or
pip install -e ".[dev]"- Install pre-commit hooks
pre-commit installgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fixBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or changes
- Write clear, concise code
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
Before committing, ensure your code passes all checks:
# Format code
make format
# Run linters
make lint
# Run type checking
make type-check
# Run tests
make test
# Run all checks
make allWe follow conventional commit messages:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Test additions or changeschore: Build process or auxiliary tool changes
Example:
feat(adapters): Add support for new AI agent
- Implement new adapter for Agent X
- Add configuration options
- Add comprehensive tests
Closes #123
git push origin your-branch-nameThen create a Pull Request on GitHub.
- Code follows project style guidelines
- All tests pass
- New tests added for new functionality
- Documentation updated
- Commit messages follow convention
- No merge conflicts with main branch
Include:
- What: Brief description of changes
- Why: Reason for changes
- How: Technical details of implementation
- Testing: How changes were tested
- Screenshots: If applicable
- Automated checks must pass (CI/CD)
- At least one maintainer review required
- Address all review comments
- Keep PR updated with main branch
- Follow PEP 8
- Use type hints
- Maximum line length: 100 characters
- Use descriptive variable names
- Add docstrings to all public functions/classes
def process_task(
task: str,
workflow: str = "default",
max_iterations: Optional[int] = None
) -> Dict[str, Any]:
"""
Process a task using specified workflow.
Args:
task: Task description
workflow: Workflow name (default: "default")
max_iterations: Maximum iterations (optional)
Returns:
Dictionary containing results
Raises:
ValueError: If task is invalid
"""
pass- Write unit tests for all new code
- Aim for >80% code coverage
- Use meaningful test names
- Test edge cases and error conditions
def test_task_validation_rejects_empty_task() -> None:
"""Test that empty tasks are rejected."""
with pytest.raises(ValidationError):
validate_task("")- Update README.md for user-facing changes
- Add docstrings to all public APIs
- Update relevant docs in
docs/directory - Include examples where appropriate
# All tests
pytest
# Specific test file
pytest tests/test_orchestrator.py
# Specific test
pytest tests/test_orchestrator.py::TestOrchestrator::test_execute_task
# With coverage
pytest --cov
# Integration tests only
pytest -m integration
# Unit tests only
pytest -m "unit or not integration"- Use pytest fixtures for setup/teardown
- Mock external dependencies
- Test both success and failure cases
- Use parametrize for multiple test cases
@pytest.fixture
def orchestrator():
"""Create orchestrator instance for testing."""
return Orchestrator(config_path="tests/fixtures/config.yaml")
@pytest.mark.parametrize("workflow,expected", [
("default", 3),
("quick", 1),
("thorough", 5),
])
def test_workflow_steps(workflow, expected):
"""Test workflow step counts."""
steps = get_workflow_steps(workflow)
assert len(steps) == expected- Create adapter in
adapters/your_agent_adapter.py - Extend
BaseAdapter - Implement required methods
- Add configuration in
config/agents.yaml - Add tests in
tests/test_adapters.py - Update documentation
- Define workflow in
config/agents.yaml - Test workflow execution
- Add examples to documentation
- Add integration test
cd docs
make htmlREADME.md- Main project READMEdocs/architecture.md- Architecture overviewdocs/interactive-shell.md- Shell usage guidedocs/adding-agents.md- Guide for adding agentsdocs/workflows.md- Workflow configuration
Maintainers only:
- Update version in
setup.pyandpyproject.toml - Update CHANGELOG.md
- Create release branch
- Tag release:
git tag -a v1.0.0 -m "Release 1.0.0" - Push tag:
git push origin v1.0.0 - GitHub Actions will create release and publish to PyPI
- Questions: Open a GitHub Discussion
- Bugs: Open a GitHub Issue
- Security: Email security@example.com
Contributors will be recognized in:
- GitHub contributors page
- CHANGELOG.md
- Release notes
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT License).
Thank you for contributing! 🎉