- Fixed Task.new/3 to handle both maps and keyword lists - Added robust inbox existence checking in find_available_agent - Ensure inbox creation during agent registration and task assignment - Add helper function ensure_inbox_exists to avoid crashes
5.2 KiB
5.2 KiB
Contributing to AgentCoordinator
Thank you for your interest in contributing to AgentCoordinator! This document provides guidelines for contributing to the project.
🤝 Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. Please report unacceptable behavior to the project maintainers.
🚀 How to Contribute
Reporting Bugs
- Check existing issues first to see if the bug has already been reported
- Create a new issue with a clear title and description
- Include reproduction steps with specific details
- Provide system information (Elixir version, OS, etc.)
- Add relevant logs or error messages
Suggesting Features
- Check existing feature requests to avoid duplicates
- Create a new issue with the
enhancementlabel - Describe the feature and its use case clearly
- Explain why this feature would be beneficial
- Provide examples of how it would be used
Development Setup
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/agent_coordinator.git cd agent_coordinator - Install dependencies:
mix deps.get - Start NATS server:
nats-server -js -p 4222 -m 8222 - Run tests to ensure everything works:
mix test
Making Changes
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes following our coding standards
- Add tests for new functionality
- Run the test suite:
mix test - Run code quality checks:
mix format mix credo mix dialyzer - Commit your changes with a descriptive message:
git commit -m "Add feature: your feature description" - Push to your fork:
git push origin feature/your-feature-name - Create a Pull Request on GitHub
📝 Coding Standards
Elixir Style Guide
- Follow the Elixir Style Guide
- Use
mix formatto format your code - Write clear, descriptive function and variable names
- Add
@docand@specfor public functions - Follow the existing code patterns in the project
Code Organization
- Keep modules focused and cohesive
- Use appropriate GenServer patterns for stateful processes
- Follow OTP principles and supervision tree design
- Organize code into logical namespaces
Testing
- Write comprehensive tests for all new functionality
- Use descriptive test names that explain what is being tested
- Follow the existing test patterns and structure
- Ensure tests are fast and reliable
- Aim for good test coverage (check with
mix test --cover)
Documentation
- Update documentation for any API changes
- Add examples for new features
- Keep the README.md up to date
- Use clear, concise language
- Include code examples where helpful
🔧 Pull Request Guidelines
Before Submitting
- Tests pass locally (
mix test) - Code is properly formatted (
mix format) - No linting errors (
mix credo) - Type checks pass (
mix dialyzer) - Documentation is updated
- CHANGELOG.md is updated (if applicable)
Pull Request Description
Please include:
- Clear title describing the change
- Description of what the PR does
- Issue reference if applicable (fixes #123)
- Testing instructions for reviewers
- Breaking changes if any
- Screenshots if UI changes are involved
Review Process
- At least one maintainer will review your PR
- Address any feedback or requested changes
- Once approved, a maintainer will merge your PR
- Your contribution will be credited in the release notes
🧪 Testing
Running Tests
# Run all tests
mix test
# Run tests with coverage
mix test --cover
# Run specific test file
mix test test/agent_coordinator/mcp_server_test.exs
# Run tests in watch mode
mix test.watch
Writing Tests
- Place test files in the
test/directory - Mirror the structure of the
lib/directory - Use descriptive
describeblocks to group related tests - Use
setupblocks for common test setup - Mock external dependencies appropriately
🚀 Release Process
- Update version in
mix.exs - Update
CHANGELOG.mdwith new version details - Create and push a version tag
- Create a GitHub release
- Publish to Hex (maintainers only)
📞 Getting Help
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and general discussion
- Documentation: Check the online docs
🏷️ Issue Labels
bug: Something isn't workingenhancement: New feature or requestdocumentation: Improvements or additions to documentationgood first issue: Good for newcomershelp wanted: Extra attention is neededquestion: Further information is requested
🎉 Recognition
Contributors will be:
- Listed in the project's contributors section
- Mentioned in release notes for significant contributions
- Given credit in any related blog posts or presentations
Thank you for contributing to AgentCoordinator! 🚀