This commit adds comprehensive integration of three major AI agent platforms: ## MCP Servers (3) - Prometheus MCP: Knowledge graph code reasoning with AST analysis - Every Code MCP: Fast terminal-based coding agent with Auto Drive - Dexto MCP: Agent harness with orchestration and session management ## Claude Code Skills (6) - /agent-plan: Generate implementation plans - /agent-fix-bug: Fix bugs end-to-end - /agent-solve: Solve complex problems - /agent-review: Review code quality - /agent-context: Get code context - /agent-orchestrate: Orchestrate workflows ## Ralph Auto-Integration - Pattern-based auto-trigger for all three platforms - Intelligent backend selection - Multi-platform coordination - Configuration in ralph/ralph.yml ## Documentation - Complete integration guides - Ralph auto-integration documentation - Setup scripts - Usage examples Co-Authored-By: Claude <noreply@anthropic.com>
12 KiB
12 KiB
Unified Agent Integration: Prometheus + Every Code
Overview
This document outlines the integration of two major AI coding agent platforms into Claude Code CLI:
- Prometheus (Python/LangGraph) - Multi-agent code reasoning with knowledge graphs
- Every Code (Rust/Codex) - Fast terminal-based coding agent with TUI
Architecture Comparison
| Aspect | Prometheus | Every Code |
|---|---|---|
| Language | Python | Rust |
| Framework | LangGraph state machines | Custom event-driven |
| Core Features | Knowledge graphs (Neo4j), AST parsing, Docker containers | Auto Drive, Browser integration, MCP support, Multi-agent |
| Agent Types | Classification, Bug Reproduction, Context Retrieval, Patch Generation | Plan, Code, Solve, Auto Drive, Auto Review |
| Code Understanding | Neo4j knowledge graph with Tree-sitter AST | Native file system + grep |
| Execution | Docker containers | Native shell with sandboxing |
| LLM Support | OpenAI, Anthropic, Gemini | ChatGPT, Claude, Gemini (multi-CLI orchestration) |
Unified Integration Strategy
Hybrid MCP Server Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Claude Code CLI │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Unified Agent Skills │ │
│ │ /agent-plan /agent-fix-bug /agent-solve │ │
│ │ /agent-review /agent-context /agent-code │ │
│ └───────────────────────────┬────────────────────────────────┘ │
│ │ MCP Client │
└──────────────────────────────┼──────────────────────────────────┘
│
┌──────────────────────────────┼──────────────────────────────────┐
│ Unified Agent MCP Server │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ Router Layer │ │
│ │ Routes to appropriate backend │ │
│ └────────────┬──────────────────────────────┬────────────────┘ │
│ │ │ │
│ ┌────────────▼────────────┐ ┌─────────────▼────────────────┐ │
│ │ Prometheus Backend │ │ Every Code Backend │ │
│ │ - Knowledge graph │ │ - Auto Drive orchestration │ │
│ │ - AST parsing │ │ - File operations │ │
│ │ - Docker containers │ │ - Browser integration │ │
│ │ - LangGraph agents │ │ - Multi-agent coordination │ │
│ └─────────────────────────┘ └──────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
MCP Tool Specification
Shared Tools (Available from both backends)
| Tool | Description | Backend Priority |
|---|---|---|
agent_find_file |
Find files by pattern | Both |
agent_search_code |
Search code by text | Prometheus (AST) > Every Code (grep) |
agent_read_file |
Read file with context | Both |
agent_create_file |
Create new file | Both |
agent_edit_file |
Edit existing file | Both |
agent_run_command |
Execute shell command | Every Code (native) > Prometheus (Docker) |
Prometheus-Specific Tools
| Tool | Description |
|---|---|
prometheus_classify_issue |
Classify GitHub issues (bug/feature/question/doc) |
prometheus_fix_bug |
End-to-end bug fixing with reproduction |
prometheus_get_context |
Semantic code context retrieval |
prometheus_search_ast |
Search by AST node type (function/class) |
prometheus_search_docs |
Search documentation |
prometheus_run_tests |
Run tests in Docker container |
prometheus_verify_patch |
Verify patch with regression tests |
Every Code-Specific Tools
| Tool | Description |
|---|---|
everycode_auto_drive |
Orchestrate multi-agent automation |
everycode_plan |
Generate implementation plan |
everycode_solve |
Coordinate multiple CLI agents |
everycode_auto_review |
Background code review |
everycode_browser |
Browser automation (CDP) |
everycode_screenshot |
Capture screenshots |
everycode_approve |
Handle approval workflow |
Claude Code Skills to Create
Core Agent Skills
.claude/skills/agents/
├── plan.md - Generate implementation plans (Every Code)
├── fix-bug.md - Fix bugs end-to-end (Prometheus)
├── solve.md - Solve complex problems (Every Code)
├── review.md - Review code (Every Code Auto Review)
├── context.md - Get code context (Prometheus)
├── implement.md - Implement features (Both)
├── test.md - Run and analyze tests (Prometheus)
└── README.md - Documentation
Skill Implementations
/agent-plan
# Agent: Plan
Generate implementation plans using Every Code's planning capabilities.
## Usage
/agent-plan "Implement user authentication with JWT"
## Backend
- Primary: Every Code (/plan command)
- Fallback: Prometheus (feature analysis)
/agent-fix-bug
# Agent: Fix Bug
End-to-end bug fixing with reproduction and verification.
## Usage
/agent-fix-bug "Login fails after password reset"
## Backend
- Primary: Prometheus (bug pipeline)
- Enhancement: Every Code Auto Review
/agent-solve
# Agent: Solve
Multi-agent problem solving with orchestration.
## Usage
/agent-solve "Optimize database queries for performance"
## Backend
- Primary: Every Code (/solve command)
- Support: Prometheus (context retrieval)
/agent-review
# Agent: Review
Background code review with quality checks.
## Usage
/agent-review
## Backend
- Primary: Every Code Auto Review
- Analysis: Prometheus (AST analysis)
Implementation Plan
Phase 1: Foundation (Week 1)
- ✅ Analyze both architectures
- ⏳ Create unified MCP server skeleton
- ⏳ Implement router for backend selection
- ⏳ Add basic file operations (shared)
- ⏳ Test MCP server with Claude Code
Phase 2: Prometheus Integration (Week 2)
- ⏳ Set up Prometheus locally
- ⏳ Implement knowledge graph tools
- ⏳ Add AST search capabilities
- ⏳ Create bug fixing pipeline
- ⏳ Test with sample codebase
Phase 3: Every Code Integration (Week 2-3)
- ⏳ Install Every Code CLI
- ⏳ Implement Auto Drive orchestration
- ⏳ Add browser automation tools
- ⏳ Create multi-agent coordination
- ⏳ Test with sample tasks
Phase 4: Claude Code Skills (Week 3)
- ⏳ Create core skills (/plan, /fix-bug, /solve)
- ⏳ Add secondary skills (/review, /context, /test)
- ⏳ Implement skill routing logic
- ⏳ Add documentation and examples
- ⏳ Test end-to-end workflows
Phase 5: Polish & Documentation (Week 4)
- ⏳ Performance optimization
- ⏳ Error handling and recovery
- ⏳ User documentation
- ⏳ Developer guide
- ⏳ Release preparation
Installation Guide
Prerequisites
# System requirements
- Python 3.11+
- Rust + Cargo
- Node.js 20+
- Docker + Docker Compose
- Neo4j (for Prometheus knowledge graph)
# Clone repositories
git clone https://github.com/EuniAI/Prometheus.git ~/Prometheus
git clone https://github.com/just-every/code.git ~/EveryCode
Prometheus Setup
cd ~/Prometheus
pip install -r requirements.txt
cp example.env .env
# Edit .env with API keys
# Start Neo4j
docker-compose up -d neo4j
# Build knowledge graph for your repo
python -m prometheus.script.build_kg --repo_path /path/to/repo
Every Code Setup
cd ~/EveryCode
npm install -g @just-every/code
# Authenticate
code
# Choose "Sign in with ChatGPT" or set OPENAI_API_KEY
# Test installation
code --version
Unified MCP Server
# Install unified MCP server
pip install git+https://github.com/your-org/unified-agent-mcp.git
# Configure Claude Code
# Add to ~/.config/claude-code/config.json:
{
"mcpServers": {
"unified-agents": {
"command": "unified-agent-mcp",
"args": [
"--prometheus-path", "~/Prometheus",
"--everycode-path", "~/EveryCode",
"--repo", "/path/to/your/repo"
],
"env": {
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Usage Examples
Example 1: Bug Fixing
# Claude Code session
/agent-fix-bug "Users can't delete their accounts"
# Flow:
# 1. Prometheus classifies issue
# 2. Prometheus reproduces bug
# 3. Prometheus generates patch
# 4. Every Code Auto Review validates
# 5. Prometheus runs regression tests
# 6. Present verified fix
Example 2: Feature Implementation
/agent-plan "Add dark mode toggle to settings"
# Flow:
# 1. Every Code generates plan
# 2. Prometheus provides context from similar code
# 3. Present implementation plan
# 4. /agent-implement to execute
Example 3: Code Review
# After making changes
/agent-review
# Flow:
# 1. Every Code Auto Review runs in background
# 2. Prometheus analyzes AST changes
# 3. Present findings and suggestions
Success Metrics
- ✅ Both platforms accessible via MCP
- ✅ Core skills functional
- ✅ Backend routing works correctly
- ✅ End-to-end bug fixing working
- ✅ Auto Drive integration working
- ✅ Knowledge graph queries working
- ✅ Documentation complete
Limitations & Considerations
-
Complexity: Two large platforms to integrate
- Mitigation: Modular design, gradual rollout
-
Performance: Knowledge graph queries can be slow
- Mitigation: Caching, async operations
-
Setup Complexity: Multiple dependencies
- Mitigation: Docker Compose setup script
-
Cost: Multiple API calls across platforms
- Mitigation: Smart caching, cost tracking
-
Compatibility: Different data structures
- Mitigation: Normalization layer in MCP server
Next Steps
- ✅ Analyze architectures (COMPLETE)
- ⏳ Design unified MCP server
- ⏳ Implement Prometheus backend
- ⏳ Implement Every Code backend
- ⏳ Create Claude Code skills
- ⏳ Test and document