We love your input! We want to make contributing to the AI Agent Simulation Platform as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repository and create your branch from
main - Make your changes following our coding standards
- Add tests for any new functionality
- Update documentation if needed
- Ensure the test suite passes
- Submit a pull request
feature/agent-library-enhancement- New featuresfix/favorites-api-bug- Bug fixesdocs/api-documentation- Documentation updatesrefactor/database-optimization- Code refactoringtest/agent-creation-workflow- Test improvements
# Use type hints
def create_agent(agent_data: dict) -> dict:
"""Create a new agent with the provided data.
Args:
agent_data: Dictionary containing agent information
Returns:
Dictionary with created agent data
Raises:
ValueError: If agent_data is invalid
"""
pass
# Follow PEP 8
# Use meaningful variable names
# Write comprehensive docstrings
# Handle errors appropriately// Use ES6+ features
const AgentCard = ({ agent, onFavorite }) => {
const [isFavorite, setIsFavorite] = useState(false);
// Use meaningful component names
// Implement proper error handling
// Use React hooks appropriately
// Follow consistent naming conventions
return (
<div className="agent-card">
{/* Component JSX */}
</div>
);
};
export default AgentCard;We use Conventional Commits format:
feat: add star icons to agent cards
fix: resolve favorites API authentication issue
docs: update API documentation for saved agents
style: improve agent card hover effects
refactor: optimize database queries for agent library
test: add comprehensive tests for favorites system
# Backend tests
cd backend
python -m pytest tests/ -v --cov=server
# Frontend tests
cd frontend
yarn test --coverage
# Integration tests
./scripts/run-integration-tests.shimport pytest
from fastapi.testclient import TestClient
from server import app
client = TestClient(app)
def test_create_agent():
"""Test agent creation endpoint."""
agent_data = {
"name": "Test Agent",
"archetype": "scientist",
"goal": "Test goal"
}
response = client.post("/api/agents", json=agent_data)
assert response.status_code == 200
assert response.json()["name"] == "Test Agent"import { render, screen, fireEvent } from '@testing-library/react';
import AgentCard from './AgentCard';
describe('AgentCard', () => {
const mockAgent = {
id: '1',
name: 'Test Agent',
archetype: 'scientist'
};
test('renders agent information', () => {
render(<AgentCard agent={mockAgent} />);
expect(screen.getByText('Test Agent')).toBeInTheDocument();
});
test('calls onFavorite when star is clicked', () => {
const mockOnFavorite = jest.fn();
render(<AgentCard agent={mockAgent} onFavorite={mockOnFavorite} />);
fireEvent.click(screen.getByRole('button', { name: /favorite/i }));
expect(mockOnFavorite).toHaveBeenCalledWith(mockAgent);
});
});- Use OpenAPI/Swagger annotations
- Provide clear examples
- Document all parameters and responses
- Include error codes and messages
- Write clear, concise comments
- Document complex logic
- Use meaningful variable names
- Include usage examples
- Keep installation instructions current
- Update feature lists
- Add new API endpoints
- Include troubleshooting tips
When reporting bugs, please include:
-
Environment details
- Operating system
- Python/Node.js versions
- Browser (if frontend issue)
-
Steps to reproduce
- Clear, numbered steps
- Expected vs actual behavior
- Screenshots if applicable
-
Error messages
- Full error logs
- Stack traces
- Console output
For new features, please provide:
-
Use case description
- Who would use this feature?
- What problem does it solve?
- How would it work?
-
Implementation suggestions
- Possible approaches
- Technical considerations
- UI/UX mockups if applicable
-
Priority and impact
- How important is this feature?
- What's the expected user impact?
- Python 3.8+
- Node.js 16+
- MongoDB 4.4+
- Git
# Clone the repository
git clone https://github.com/your-username/ai-agent-simulation.git
cd ai-agent-simulation
# Set up backend
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Configure your .env file
# Set up frontend
cd ../frontend
yarn install
cp .env.example .env
# Configure your .env file
# Start development servers
# Terminal 1: Backend
cd backend && uvicorn server:app --reload
# Terminal 2: Frontend
cd frontend && yarn startFor development, use a local MongoDB instance:
# Start MongoDB
mongod
# Or use Docker
docker run -d -p 27017:27017 mongo:latest- Code follows project style guidelines
- Tests are included and passing
- Documentation is updated
- No unnecessary dependencies added
- Error handling is appropriate
- Performance impact is considered
- Security implications are addressed
- Be constructive - Provide specific, actionable feedback
- Be respectful - Focus on the code, not the person
- Be thorough - Check functionality, style, and documentation
- Be timely - Respond to reviews within 2-3 business days
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and community discussion
- Pull Requests: Code contributions and reviews
We are committed to providing a welcoming and inspiring community for all. Please read our Code of Conduct.
Contributors will be recognized in:
- README.md contributor section
- Release notes
- Project documentation
- README.md - Project overview and setup
- API Documentation - Backend API reference
- Wiki - Detailed guides
- GitHub Issues: Technical problems and bugs
- GitHub Discussions: Questions and community help
- Email: maintainers@ai-agent-simulation.com
- Setup Problems: Check Troubleshooting
- API Issues: Refer to API Documentation
- UI/UX Questions: See Component Documentation
Your contributions make this project better for everyone. Whether you're fixing a bug, adding a feature, or improving documentation, every contribution is valuable and appreciated.
Happy coding! 🚀