Contributing¶
Development Setup¶
git clone https://github.com/pinexai/repobrain.git
cd repobrain
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Running Tests¶
Target: 80%+ coverage on all PRs.
Code Style¶
All three must pass before opening a PR.
Project Structure¶
repomind/ # Python package (internal name)
├── cli/ # Click CLI commands
├── config/ # pydantic-settings configuration
├── core/ # Coordinator + indexing pipeline
├── generation/ # RAGAwareDocGenerator + cost tracking
├── git/ # History, metrics, ownership, PR analysis
├── graph/ # CodeGraphBuilder + GraphAnalyzer
├── mcp/ # FastMCP server + 12 tools
├── parsing/ # Tree-sitter parsers + dynamic hints
├── storage/ # SQL, LanceDB, NetworkX adapters
├── utils/ # Hashing, file utilities, logging
└── webhook/ # FastAPI webhook server
Adding a New Language Parser¶
- Create
repomind/parsing/languages/yourlang.pyextendingBaseLanguageHandler - Implement
parse(content: str) -> ParseResult - Register in
repomind/parsing/languages/__init__.py - Add tests in
tests/unit/test_parsing.py
Adding a New MCP Tool¶
- Create
repomind/mcp/tools/your_tool.py - Register with
@mcp.tool()inrepomind/mcp/server.py - Document in
docs/mcp/your-tool.md - Add to the nav in
mkdocs.yml
Submitting a PR¶
- Fork the repo
- Create a feature branch:
git checkout -b feat/your-feature - Write tests first (TDD)
- Ensure all checks pass:
ruff check && mypy && pytest - Open a PR with a clear description of the change and why
- Link any related issues
Reporting Bugs¶
Open an issue at github.com/pinexai/repobrain/issues with:
- repobrain version (repobrain --version)
- OS and Python version
- Full error traceback
- Debug logs: REPOMIND_LOG_LEVEL=DEBUG repobrain <command> 2>&1