🚀 Native benchmarking of the roocode SPARC system using SWE-bench (Software Engineering Benchmark)
This integration provides a complete pipeline for benchmarking the roocode SPARC agentic system against SWE-bench tasks without using Docker containers. All SWE tasks (patch generation, testing, debugging, etc.) are completed by the appropriate roocode modes rather than direct LLM calls.
Setup Environment
bash
make setup
Configure Credentials
bash
cp swe-bench-workspace/.env.example swe-bench-workspace/.env
# Edit .env with your GitHub token
Validate Installation
bash
make validate
Run Lite Benchmark
bash
make benchmark-lite
Run Full Benchmark
bash
make benchmark-full
The SWE-bench integration routes different types of tasks to specialized roocode modes:
| SWE Task | roocode Mode | Purpose |
|---|---|---|
| Patch Generation | code |
Generate code fixes and implementations |
| Test Execution | tdd |
Run and validate test suites |
| Code Analysis | debug |
Analyze errors and debug issues |
| Security Review | security-review |
Check for security vulnerabilities |
| Documentation | docs-writer |
Generate documentation for changes |
| Integration | integration |
Merge and validate complete solutions |
| Orchestration | sparc |
Coordinate overall benchmark workflow |
graph TD
A[SPARC Orchestrator] --> B[Environment Setup]
B --> C[Task Distribution]
C --> D[Code Mode: Patch Generation]
C --> E[TDD Mode: Test Execution]
C --> F[Debug Mode: Issue Analysis]
C --> G[Security Mode: Vulnerability Check]
D --> H[Integration Mode: Result Aggregation]
E --> H
F --> H
G --> H
H --> I[Documentation Mode: Report Generation]
I --> J[Results & Metrics]
/workspaces/sparc-bench/
├── plans/
│ └── swe-bench-integration.md # Complete implementation plan
├── scripts/
│ └── swe-bench-setup.sh # Native setup script
├── swe-bench-workspace/ # Created during setup
│ ├── config/
│ │ └── roocode-config.yaml # roocode SPARC configuration
│ ├── datasets/ # SWE-bench datasets
│ ├── logs/ # Execution logs
│ ├── results/ # Benchmark results
│ │ ├── lite/ # Lite benchmark results
│ │ └── full/ # Full benchmark results
│ └── SWE-bench/ # Cloned SWE-bench repository
├── .roomodes # Updated with SWE-bench orchestration
├── Makefile # Automation and workflow management
└── README-swe-bench.md # This documentation
# roocode SPARC Configuration for SWE-bench
github_token: 'your_github_token_here'
benchmark_mode: 'native'
docker_enabled: false
agent_system: 'roocode_sparc'
# roocode mode assignments for SWE tasks
task_routing:
patch_generation: 'code'
test_execution: 'tdd'
code_analysis: 'debug'
security_review: 'security-review'
integration: 'integration'
# Benchmark settings
swe_bench:
lite_enabled: true
full_enabled: true
max_concurrent_tasks: 4
timeout_minutes: 30
# Required
GITHUB_TOKEN=your_github_token_here
ROOCODE_API_ENDPOINT=your_roocode_endpoint
# SWE-bench Native Mode
SWE_BENCH_DOCKER_DISABLED=true
SWE_BENCH_NATIVE_MODE=true
make benchmark-lite
make benchmark-full
make monitor # View recent logs and activity
make status # Check overall system status
make config # Display current configuration
Results are saved in structured format:
swe-bench-workspace/results/
├── lite/
│ ├── predictions.jsonl # roocode SPARC predictions
│ ├── evaluation_results.json # Benchmark scores
│ └── detailed_logs/ # Per-task execution logs
└── full/
├── predictions.jsonl # roocode SPARC predictions
├── evaluation_results.json # Benchmark scores
└── detailed_logs/ # Per-task execution logs
Python Dependencies
bash
pip install -r swe-bench-workspace/SWE-bench/requirements.txt
GitHub API Rate Limits
.envMonitor API usage in logs
Memory Issues
max_concurrent_tasks in configMonitor system resources during execution
Configuration Errors
bash
make validate # Check setup
make config # Review configuration
# View recent logs
tail -f swe-bench-workspace/logs/*.log
# Check specific mode performance
grep "code mode" swe-bench-workspace/logs/*.log
grep "tdd mode" swe-bench-workspace/logs/*.log
# Validate roocode integration
python3 swe-bench-workspace/validate-setup.py
Edit swe-bench-workspace/config/roocode-config.yaml to customize:
# Automated benchmarking
make setup && make validate && make benchmark-lite
max_concurrent_tasks based on system resourcestimeout_minutes for complex tasks✅ Environment: SWE-bench installed and running natively (no Docker)
✅ Integration: All SWE tasks completed by roocode modes (not direct LLM calls)
✅ Orchestration: SPARC orchestrator delegates benchmark sub-tasks via new_task
✅ Execution: Both lite and full benchmarks execute successfully
✅ Performance: Results demonstrate roocode SPARC system capabilities
✅ Modularity: All components are modular (<500 lines) and environment-safe
✅ Documentation: Complete coverage of integration points and workflows
Ready to benchmark roocode SPARC on SWE-bench! 🚀
$ claude mcp add sparc-bench \
-- python -m otcore.mcp_server <graph>