Thank you for your interest in contributing to RAG-CLI! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help others learn and grow
git clone https://github.com/ItMeDiaTech/rag-cli.git
cd rag-cli# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
pip install -r requirements.txt
# Install development tools
pip install black isort flake8 mypy pytest pytest-covgit checkout -b feature/your-feature-name- Follow the code style (see below)
- Add tests for new functionality
- Update documentation
# Run tests
pytest tests/
# Run linters
black src/
isort src/
flake8 src/
mypy src/git add .
git commit -m "type: brief description
Longer description if needed.
- Point 1
- Point 2
"feat:- New featurefix:- Bug fixdocs:- Documentationtest:- Test additionrefactor:- Code improvementperf:- Performance optimizationchore:- Maintenance
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- Use Black for formatting (line length: 120)
- Use isort for imports
- Follow PEP 8 for naming conventions
- Add docstrings to all functions
def example_function(param: str) -> int:
"""Brief description.
Longer description if needed.
Args:
param: Parameter description
Returns:
Return value description
"""
return 0# Install pre-commit
pip install pre-commit
# Setup hook
pre-commit install
# Run manually
pre-commit run --all-filespytest tests/unit/ -vpytest tests/integration/ -vpytest --cov=src --cov-report=html- All new features need tests
- Aim for >80% coverage
- Test both success and failure cases
- Keep README.md current
- Add examples for new features
- Update table of contents
- Explain WHY, not WHAT
- Keep comments concise
- Update when code changes
- Document public APIs
- Include examples
- List exceptions
- Each component in
src/core/should be independent - Minimize cross-module dependencies
- Use dependency injection
- Commands in
src/plugin/commands/ - Hooks in
src/plugin/hooks/ - Skills in
src/plugin/skills/
- Agents inherit from base Agent class
- Use agent communication hub
- Implement proper error handling
- Target latency: <100ms for vector search
- Target end-to-end: <5 seconds
- Profile code for bottlenecks
- Use async for I/O operations
- Cache expensive computations
- Never commit API keys or secrets
- Use environment variables
- Validate user input
- Handle exceptions gracefully
- Review dependency updates
-
Before submitting:
- Run all tests:
pytest - Check code style:
black,isort,flake8 - Update CHANGELOG.md
- Update documentation
- Run all tests:
-
PR Description:
- Describe changes
- Explain motivation
- Reference related issues
- Include testing notes
-
Review Process:
- Maintain responsiveness
- Be open to feedback
- Make requested changes
- Squash commits if asked
-
After Merge:
- Delete feature branch
- Close related issues
- Announce in discussions
- Bug fixes and security issues
- Performance improvements
- Documentation enhancements
- Test coverage
- New features
- CLI improvements
- Monitoring enhancements
- API server for remote access
- Database-backed vector store
- Custom agent creation
- Advanced caching strategies
Include:
- Python version
- Installation method
- Steps to reproduce
- Expected vs actual behavior
- Logs and error messages
Include:
- Use case description
- Proposed solution
- Alternatives considered
- Expected benefits
- GitHub Issues: For bugs and features
- GitHub Discussions: For questions
- Documentation: Check before asking
Maintainers follow:
- Semantic versioning (MAJOR.MINOR.PATCH)
- CHANGELOG.md updates
- GitHub releases with notes
- PyPI package updates
By contributing, you agree your code is licensed under the MIT License.
Your contributions help make RAG-CLI better for everyone. We appreciate your effort!
For questions, open a GitHub Discussion or Issue. Happy contributing! [LAUNCH]