🎉 Thank you for considering contributing to RuvScan!
RuvScan is building the future of code discovery — where developers find solutions from across domains they'd never think to search for. Every contribution helps make this vision real.
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/ruvscan.git
cd ruvscan# Run the setup script
bash scripts/setup.sh
# Or manually:
pip install -r requirements.txt
cd src/rust && cargo build --release
cd ../go && go mod downloadgit checkout -b feature/your-amazing-feature
# or
git checkout -b fix/bug-descriptionWrite awesome code! See our style guides below.
# Run all tests
./scripts/run_tests.sh
# Or specific suites
pytest tests/test_server.py
cd src/rust && cargo test
cd src/go && go test ./...git add .
git commit -m "feat: add amazing feature
- Describe what you changed
- Why you changed it
- Any breaking changes"Commit message format:
feat:New featurefix:Bug fixdocs:Documentationtest:Testsrefactor:Code restructuringperf:Performance improvementchore:Maintenance
git push origin feature/your-amazing-featureThen open a Pull Request on GitHub!
Found a bug? We want to fix it!
- Check if it's already reported
- If not, open an issue
- Submit a PR with the fix
Have an idea? Let's discuss!
- Open a feature request
- Discuss the design
- Get approval from maintainers
- Implement and submit PR
Docs are as important as code!
What we need:
- Tutorials and guides
- API examples
- Architecture explanations
- Troubleshooting tips
- Translation to other languages
Where to contribute:
README.md- Main docsdocs/- Detailed guides- Code comments
- Docstrings
Help us test edge cases!
Areas that need testing:
- Large-scale scans (1000+ repos)
- Different GitHub org structures
- Edge cases in similarity computation
- Error handling
- Performance under load
Build integrations with:
- IDEs (VS Code, Cursor, JetBrains)
- AI tools (Claude, ChatGPT, Copilot)
- CI/CD platforms
- Other developer tools
Design and build:
- Web dashboard for RuvScan
- Visualization of repo relationships
- Interactive query builder
- Metrics and analytics
# Format code
black src/mcp
# Lint
ruff check src/mcpGuidelines:
- Use type hints
- Write docstrings (Google style)
- Keep functions focused and small
- Prefer async/await for I/O
Example:
async def query_leverage(
intent: str,
max_results: int = 10
) -> List[LeverageCard]:
"""
Query for leverage cards based on user intent.
Args:
intent: User's problem or goal
max_results: Maximum cards to return
Returns:
List of leverage cards ranked by relevance
"""
# ImplementationStyle: rustfmt
cd src/rust
cargo fmt
cargo clippyGuidelines:
- Follow Rust conventions
- Use
Resultfor error handling - Add doc comments (
///) - Write tests for public APIs
Example:
/// Compute sublinear similarity between two vectors.
///
/// # Arguments
/// * `vec_a` - First vector
/// * `vec_b` - Second vector
/// * `distortion` - JL distortion parameter
///
/// # Returns
/// Similarity score and complexity description
pub fn sublinear_similarity(
vec_a: &Array1<f64>,
vec_b: &Array1<f64>,
distortion: f64
) -> (f64, String) {
// Implementation
}cd src/go
gofmt -w .
go vet ./...Guidelines:
- Follow Go conventions
- Use context for cancellation
- Handle errors explicitly
- Add package-level comments
Example:
// Scanner manages concurrent GitHub scanning.
// It handles rate limiting and parallel processing.
type Scanner struct {
client *github.Client
config ScanConfig
}
// ScanOrg scans all repos in a GitHub organization.
func (s *Scanner) ScanOrg(ctx context.Context) error {
// Implementation
}Python:
import pytest
def test_fact_cache_determinism():
"""Test that FACT cache returns identical results"""
cache = FACTCache()
prompt = "test"
response = "result"
hash1 = cache.set(prompt, response)
hash2 = cache.set(prompt, response)
assert hash1 == hash2Rust:
#[test]
fn test_jl_projection() {
let source_dim = 1000;
let jl = JLProjection::new(source_dim, 0.5);
assert!(jl.target_dimension < source_dim);
}Test full workflows:
def test_scan_query_workflow():
# Scan
scan_response = client.post("/scan", json={
"source_type": "org",
"source_name": "test"
})
assert scan_response.status_code == 200
# Query
query_response = client.post("/query", json={
"intent": "test query"
})
assert query_response.status_code == 200Aim for:
- Python: 80%+ coverage
- Rust: 70%+ coverage
- Critical paths: 100% coverage
When to comment:
- Complex algorithms
- Non-obvious decisions
- Performance optimizations
- Security considerations
When NOT to comment:
- Obvious code
- What the code does (use clear names instead)
Good:
# Use Johnson-Lindenstrauss projection to reduce from
# n dimensions to O(log n) while preserving distances
# within (1 ± ε) with probability > 99%
jl = JLProjection(dim, distortion=0.5)Bad:
# Create JL projection
jl = JLProjection(dim, distortion=0.5)Document all public APIs:
class RuvScanClient:
"""
Client for RuvScan MCP server.
Provides methods for scanning repos, querying for leverage,
and comparing repositories.
Example:
>>> client = RuvScanClient("http://localhost:8000")
>>> results = await client.query("optimize my code")
"""
async def query(
self,
intent: str,
max_results: int = 10
) -> List[LeverageCard]:
"""
Query for leverage based on intent.
Args:
intent: Your problem or goal
max_results: Max cards to return (default: 10)
Returns:
List of leverage cards sorted by relevance
Raises:
httpx.HTTPError: If request fails
"""PR checklist:
- Tests added/updated
- Documentation updated
- Code formatted
- All tests passing
- No merge conflicts
- Description explains changes
PR description template:
## What
Brief description of changes
## Why
Problem this solves or feature it adds
## How
Technical approach
## Testing
How you tested this
## Screenshots
If UI changesFor reviewers:
- Be kind and constructive
- Ask questions, don't demand changes
- Approve when it's good enough
- Focus on logic, not style (we have linters)
For authors:
- Respond to all comments
- Ask for clarification if needed
- Make requested changes or discuss
- Mark conversations as resolved
-
Performance Testing
- Benchmark O(log n) claims
- Load testing with 10k+ repos
- Memory profiling
-
LLM Integration
- Improve SAFLA reasoning prompts
- Test different models
- Optimize token usage
-
Error Handling
- Better error messages
- Retry logic
- Graceful degradation
-
IDE Integrations
- VS Code extension
- Cursor plugin
- JetBrains support
-
Dashboard
- Web UI for queries
- Visualization of results
- Admin panel
-
Documentation
- Video tutorials
- More examples
- Troubleshooting guide
Look for issues labeled good first issue:
- Documentation improvements
- Adding tests
- Bug fixes with clear reproduction
- Small feature additions
Before asking:
- Check existing issues
- Read the docs
- Search discussions
Still need help?
- Open a Discussion
- Ask in the issue you're working on
- Reach out to maintainers
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT OR Apache-2.0).
Every contribution makes RuvScan better for developers worldwide. Whether you fix a typo or add a major feature, we appreciate you!
Happy coding! 🚀
Built with 💙 by the RuvScan community