Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
Be respectful, constructive, and collaborative. We're building tools to help people think better.
- Clone the repository
- Install dependencies:
docker-compose build obsidian-graph
- Configure
.envwith your Voyage API key - Start development environment:
docker-compose up -d
# Quick validation
docker exec -i obsidian-graph python test_e2e.py
# Full test suite
docker exec -i obsidian-graph pytest tests/ -vBefore submitting:
- Check existing issues to avoid duplicates
- Test with latest version
- Gather logs:
docker logs obsidian-graph
Bug report should include:
- Steps to reproduce
- Expected vs actual behavior
- Environment (OS, Docker version, vault size)
- Relevant logs/error messages
Feature requests should describe:
- Problem you're trying to solve
- Proposed solution
- Example use cases
- Impact on existing functionality
Before submitting:
- Create feature branch:
git checkout -b feature/your-feature-name - Write tests for new functionality
- Update documentation (README, docstrings)
- Ensure tests pass
- Follow commit message conventions
Commit message format:
feat(component): Add feature description
fix(component): Fix issue description
docs(component): Update documentation
test(component): Add tests
PR checklist:
- Tests pass
- Documentation updated
- Code follows project style
- No hardcoded credentials or personal paths
- Backwards compatible (or migration path provided)
- Python: Follow PEP 8
- Type hints: Use for all public functions
- Docstrings: Google style for modules and functions
- Logging: Use loguru with appropriate levels
- Error handling: Specific exceptions, clear error messages
- Unit tests: For individual components
- Integration tests: For cross-component workflows
- Performance tests: Verify quality baselines
- Coverage target: >80% for new code
New features should meet these baselines:
- Search operations: <500ms
- Graph operations: <2s for depth=3
- Hub/orphan queries: <100ms
- Similarity scores: Always in [0.0, 1.0] range
- Never commit credentials: Use .env files (gitignored)
- Validate inputs: Check user-provided paths, parameters
- Safe serialization: Use JSON for caching (this project uses JSON, not unsafe formats)
- Sanitize SQL: Use parameterized queries (never string concatenation)
obsidian-graph/
├── src/
│ ├── server.py # MCP server entry point
│ ├── vector_store.py # PostgreSQL operations
│ ├── embedder.py # Voyage Context-3 client
│ ├── graph_builder.py # BFS graph traversal
│ ├── hub_analyzer.py # Hub/orphan detection
│ ├── file_watcher.py # Watchdog integration
│ ├── indexer.py # Initial vault indexing
│ └── schema.sql # Database schema
├── tests/
│ ├── test_tools.py # Unit tests
│ └── test_simple.py # Integration tests
├── docs/ # User documentation
├── examples/ # Example configurations
└── README.md
- Implement tool function in appropriate module
- Add tool definition to
server.py::list_tools() - Add tool handler to
server.py::call_tool() - Write tests in
tests/ - Update README with usage example
- Profile first: Use timing logs to identify bottlenecks
- Index strategically: Add PostgreSQL indexes for common queries
- Batch operations: Minimize round-trips to database/API
- Cache intelligently: Use materialized columns for expensive computations
Currently supports Voyage Context-3 only. To add alternatives:
- Create abstraction layer (see research in OBSIDIAN_GAP_ANALYSIS.md)
- Implement provider interface for new model
- Update configuration to support selection
- Document dimension requirements
- Provide migration path for existing indexes
- Update version in README, pyproject.toml, CHANGELOG.md
- Run full test suite
- Update CHANGELOG.md with changes
- Create git tag:
git tag v1.x.x - Push:
git push origin main --tags - Create GitHub release with changelog
- Issues: https://github.com/drewburchfield/obsidian-graph/issues
- Discussions: Use GitHub Discussions for questions
- MCP Community: https://modelcontextprotocol.io/community
Contributors will be recognized in:
- CHANGELOG.md for their contributions
- README.md contributors section (future)
- GitHub insights
Thank you for making knowledge tools better!