We love your input! We want to make contributing to Halos 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, track issues and feature requests, and accept pull requests.
# Fork the repo on GitHub, then:
git clone https://github.com/your-username/halos.git
cd halos# Backend setup
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Frontend setup
cd ../frontend
npm install
# Copy environment template
cp backend/.env.example backend/.env
# Edit backend/.env with your API keysgit checkout -b feature/amazing-feature
# or
git checkout -b fix/important-bug- Update Documentation: Ensure README.md and relevant docs are updated
- Add Tests: Include tests for new functionality
- Follow Code Style: Run linters and formatters
- Small Commits: Keep changes focused and atomic
- Descriptive Messages: Use clear commit messages
We follow Conventional Commits:
type(scope): description
[optional body]
[optional footer(s)]
Types:
feat: New featuresfix: Bug fixesdocs: Documentation onlystyle: Code style (formatting, missing semicolons, etc.)refactor: Code refactoringtest: Adding testschore: Maintenance tasks
Examples:
feat(search): add semantic similarity search
fix(parser): handle empty files gracefully
docs(api): update endpoint documentation
test(indexer): add lexical search testscd backend
python -m pytest tests/ -v
python -m pytest tests/test_analyzer.py::test_parse_file -v # Specific testcd frontend
npm test
npm run test:coverage# Start backend
cd backend && python -m app.main &
# Run API tests
curl http://localhost:8000/health
curl -X POST http://localhost:8000/analyze -H "Content-Type: application/json" -d '{"repo_path": "test_data"}'We use:
- Black for formatting
- isort for import sorting
- flake8 for linting
- mypy for type checking
cd backend
# Format code
black .
isort .
# Check style
flake8 .
mypy .
# All in one
pre-commit run --all-filesWe use:
- ESLint for linting
- Prettier for formatting
cd frontend
# Format code
npm run format
# Check style
npm run lint
# Fix auto-fixable issues
npm run lint:fixbackend/
├── app/
│ ├── main.py # FastAPI application
│ ├── code_analyzer.py # Core analysis logic
│ ├── lexical_indexer.py # BM25 text search
│ ├── vector_indexer.py # Semantic embeddings
│ ├── dependency_graph.py # Graph analysis
│ └── ai_integration.py # OpenAI integration
├── tests/
│ ├── test_analyzer.py
│ └── test_indexers.py
└── requirements.txt
# In code_analyzer.py
async def your_new_search(self, query: str, **kwargs) -> List[Dict]:
"""Your new search implementation."""
pass
# In main.py
@app.post("/search/your-new-type")
async def your_new_search_endpoint(request: YourRequest):
"""API endpoint for your search."""
pass# Add tree-sitter grammar to requirements.txt
tree-sitter-yourlang==x.y.z
# Update LANGUAGES in code_analyzer.py
try:
import tree_sitter_yourlang as tsyl
languages["yourlang"] = tsyl.language()
except ImportError:
pass
# Add file extension mapping
'.yourlang': 'yourlang'# Create new_indexer.py
class NewIndexer:
def __init__(self, config):
pass
def index_chunk(self, chunk: CodeChunk):
pass
def search(self, query: str) -> List[Dict]:
pass
# Integrate in code_analyzer.py
if enable_new_indexing:
self.new_indexer = NewIndexer(config)Great bug reports include:
- Summary: Quick description
- Environment: OS, Python version, dependencies
- Steps to Reproduce: Detailed steps
- Expected vs Actual: What should happen vs what happens
- Additional Context: Screenshots, logs, etc.
Template:
## Bug Description
Brief description of the issue
## Environment
- OS: macOS 13.0
- Python: 3.11.7
- Halos Version: 1.0.0
## Steps to Reproduce
1. Start backend with `python -m app.main`
2. Call API endpoint `/analyze` with...
3. See error...
## Expected Behavior
Analysis should complete successfully
## Actual Behavior
Error: IndexError: list index out of range
## Additional Context
```bash
Error logs, stack traces, etc.
## 💡 Feature Requests
Feature requests are welcome! Please:
1. **Check existing issues** to avoid duplicates
2. **Describe the problem** you're trying to solve
3. **Propose a solution** with examples
4. **Consider alternatives** you've thought about
**Template:**
```markdown
## Problem
Clear description of the problem/need
## Proposed Solution
Detailed description of your proposed solution
## Alternatives Considered
Other solutions you've considered
## Additional Context
Mock-ups, examples, related issues, etc.
- Update docstrings for new endpoints
- Include request/response examples
- Document error cases
- Update feature lists
- Add new configuration options
- Include usage examples
- Document complex algorithms
- Explain business logic
- Include TODO comments for future improvements
We use labels to categorize issues and PRs:
bug- Something isn't workingenhancement- New feature or requestdocumentation- Documentation improvementsgood first issue- Good for newcomershelp wanted- Extra attention neededquestion- Further information requestedpriority:high- High priority itemsarea:backend- Backend-relatedarea:frontend- Frontend-relatedarea:docs- Documentation-related
Contributors are recognized in:
- README.md contributors section
- Release notes for significant contributions
- GitHub contributor statistics
- 💬 GitHub Discussions: General questions and ideas
- 🐛 GitHub Issues: Bug reports and feature requests
- 📧 Email: For sensitive security issues
Before submitting a PR:
- Code follows style guidelines
- Tests pass locally
- Documentation updated
- Commit messages follow convention
- PR description is clear
- Changes are backwards compatible (or breaking changes documented)
Every contribution makes Halos better. Whether you're fixing typos, adding features, or improving documentation - thank you for making the open source community a better place!
Happy Coding! 🚀