Contributing to ARCP¶
Thank you for your interest in contributing to ARCP (Agent Registry & Control Protocol)! This document provides guidelines and information for contributors.
Table of Contents¶
- Code of Conduct
- Getting Started
- Development Setup
- Contributing Guidelines
- Code Style and Standards
- Testing
- Documentation
- Pull Request Process
- Release Process
- Community
Code of Conduct¶
This project adheres to the Apache Code of Conduct. By participating, you are expected to uphold this code.
Getting Started¶
Prerequisites¶
- Python: 3.11+ required
- Docker: For running the complete stack
- Git: For version control
Quick Start¶
-
Fork and clone the repository:
-
Set up development environment:
-
Set up environment variables:
-
Run the development stack:
Development Setup¶
Local Development¶
-
Install pre-commit hooks:
-
Run ARCP in development mode:
Project Structure¶
ARCP/
├── src/arcp/ # Main application code
│ ├── api/ # API endpoints
│ ├── core/ # Core services and configuration
│ ├── models/ # Pydantic models
│ ├── services/ # External service integrations
│ └── utils/ # Utility functions
├── tests/ # Test suite
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ ├── e2e/ # End-to-end tests
│ ├── fixtures/ # Test fixtures
│ ├── performance/ # Performance tests
│ └── security/ # Security tests
├── docs/ # Documentation
├── examples/ # Example agents and clients
├── deployment/ # Deployment configurations
└── monitoring/ # Monitoring configurations
Contributing Guidelines¶
Types of Contributions¶
We welcome the following types of contributions:
- 🐛 Bug Fixes: Fix issues and improve stability
- ✨ New Features: Add new functionality
- 📚 Documentation: Improve or add documentation
- 🚀 Performance: Optimize performance
- 🛡️ Security: Enhance security measures
- 🧪 Tests: Add or improve tests
- ♻️ Refactoring: Improve code quality
Before You Start¶
- Check existing issues to avoid duplicate work
- Create an issue to discuss major changes
- Join our discussions for feature planning
- Review the roadmap to align with project direction
Code Style and Standards¶
Python Code Style¶
We use strict code formatting and linting:
# Format code
black src/ tests/
isort src/ tests/
# Lint code
flake8 src/ tests/
# Security checks
bandit -r src/
safety check
Code Standards¶
- Type Hints: All functions must have type hints
- Documentation: All public functions need docstrings
- Error Handling: Use structured exceptions
- Logging: Use structured logging with correlation IDs
- Security: Follow OWASP guidelines
Configuration¶
All code style is configured in: - pyproject.toml
Testing¶
Test Suite Structure¶
# Run all tests
pytest
# Run specific test types
pytest tests/unit/ # Unit tests
pytest tests/integration/ # Integration tests
pytest tests/e2e/ # End-to-end tests
pytest tests/performance/ # Performance tests
pytest tests/security/ # Security tests
# Run with coverage
pytest --cov=arcp --cov-report=html
Writing Tests¶
- Unit Tests: Test individual functions and classes
- Integration Tests: Test service interactions
- E2E Tests: Test complete workflows
- Performance Tests: Test performance characteristics
- Security Tests: Test security vulnerabilities
Test Requirements¶
- Coverage: Maintain >90% test coverage
- Async Support: Use
pytest-asyncio
for async tests - Mocking: Use
pytest-mock
for external dependencies - Fixtures: Use fixtures for common test setup
Documentation¶
Types of Documentation¶
- API Documentation: Auto-generated from code
- User Guides: Step-by-step instructions
- Developer Guides: Technical implementation details
- Deployment Guides: Production setup instructions
Documentation Standards¶
- Markdown: Use Markdown for all documentation
- MkDocs: Documentation is built with MkDocs Material
- Code Examples: Include working examples
- Screenshots: Add screenshots for UI components
Pull Request Process¶
Before Submitting¶
- Update tests: Ensure tests pass and add new tests
- Update documentation: Update relevant documentation
- Sync with main: Rebase on latest main branch
PR Requirements¶
- Clear title: Descriptive title summarizing changes
- Detailed description: Explain what, why, and how
- Link issues: Reference related issues
- Breaking changes: Clearly mark breaking changes
- Testing: Describe testing performed
PR Template¶
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing performed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or clearly documented)
Review Process¶
- Automated checks: All CI checks must pass
- Code review: At least one maintainer review
- Testing: Comprehensive testing validation
- Documentation: Documentation review if applicable
Release Process¶
Semantic Versioning¶
We follow Semantic Versioning:
- MAJOR (X.0.0): Breaking changes
- MINOR (0.X.0): New features (backward compatible)
- PATCH (0.0.X): Bug fixes (backward compatible)
Release Workflow¶
- Feature freeze: No new features during release preparation
- Testing: Comprehensive testing of release candidate
- Documentation: Update changelog and documentation
- Tagging: Create release tag with proper version
- Deployment: Deploy to staging, then production
Community¶
Getting Help¶
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Community discussions and Q&A
- Documentation: Comprehensive guides and API reference
Communication Guidelines¶
- Be respectful: Treat everyone with respect
- Be constructive: Provide actionable feedback
- Be patient: Maintainers are volunteers
- Search first: Check existing issues and discussions
Maintainer Responsibilities¶
Maintainers are responsible for: - Code review: Thorough review of contributions - Issue triage: Categorizing and prioritizing issues - Release management: Coordinating releases - Community management: Fostering a welcoming community
Recognition¶
Contributors are recognized through: - Contributors file: All contributors listed - Release notes: Contributor acknowledgments - GitHub insights: Contribution statistics - Community highlights: Outstanding contributions featured
Questions?¶
If you have questions about contributing, please:
- Check the documentation
- Search existing issues
- Start a discussion
- Contact maintainers directly
Thank you for contributing to ARCP! 🚀