feat: Add unified agent integration with Prometheus, Every Code, and Dexto

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>
This commit is contained in:
uroma
2026-01-27 20:23:14 +00:00
Unverified
parent 0465526bf0
commit 3b128ba3bd
21 changed files with 4172 additions and 0 deletions

95
skills/agents/fix-bug.md Normal file
View File

@@ -0,0 +1,95 @@
# Agent: Fix Bug
End-to-end bug fixing with reproduction, patch generation, and verification.
## Usage
```
/agent-fix-bug "Login fails after password reset"
```
## Description
The `/agent-fix-bug` skill fixes bugs through a systematic process:
1. Classify the issue type (bug/feature/question/doc)
2. Reproduce the bug in isolated environment
3. Retrieve relevant code context via knowledge graph
4. Generate and apply patch
5. Verify fix with regression tests
## Examples
### Fix a reported bug
```
/agent-fix-bug "Users with special characters in names cannot sign up"
```
### Fix with specific error
```
/agent-fix-bug "NullPointerException in UserService.updateProfile
Error: java.lang.NullPointerException: Cannot invoke \"String.length()\" because the return value of \"User.getName()\" is null"
```
### Fix with reproduction steps
```
/agent-fix-bug "Shopping cart loses items when user switches tabs
Steps:
1. Add item to cart
2. Open new tab
3. Cart appears empty
4. Return to original tab
5. Cart still shows items"
```
## Backends
- **Primary**: Prometheus (bug pipeline with LangGraph agents)
- **Verification**: Every Code Auto Review
- **Testing**: Prometheus (Docker container execution)
## Workflow
### 1. Issue Classification
- Analyze issue description
- Classify as bug/feature/question/documentation
- Identify affected components
### 2. Bug Reproduction
- Create minimal reproduction case
- Execute in Docker container
- Capture error logs and stack traces
### 3. Context Retrieval
- Search knowledge graph for related code
- Analyze AST for function call chains
- Identify similar bug fixes
### 4. Patch Generation
- Generate fix using AI reasoning
- Apply patch with git
- Test in isolated environment
### 5. Verification
- Run regression tests
- Verify reproduction case is fixed
- Generate test coverage report
## Output
```
✓ Issue classified as: bug
✓ Bug reproduced: UserService.updateProfile throws NPE for null names
✓ Context retrieved: 5 related files, 12 similar issues
✓ Patch generated: Added null check in UserService.updateProfile
✓ Tests passed: 15/15
✓ Regression verified: No existing tests broken
Fix applied: prometheus-backend/src/main/java/com/prometheus/service/UserService.java:47
```
## Follow-up
After fixing:
- `/agent-review` - Review the changes
- `/agent-test` - Run specific tests
- `/agent-context` - Understand the fix context

57
skills/agents/plan.md Normal file
View File

@@ -0,0 +1,57 @@
# Agent: Plan
Generate implementation plans using Every Code's planning capabilities with Prometheus context.
## Usage
```
/agent-plan "Implement user authentication with JWT tokens"
```
## Description
The `/agent-plan` skill generates detailed implementation plans by:
1. Using Every Code's `/plan` command for structured planning
2. Augmenting with Prometheus knowledge graph for context
3. Providing step-by-step implementation guidance
## Examples
### Plan a feature
```
/agent-plan "Add dark mode with system preference detection"
```
### Plan with constraints
```
/agent-plan "Refactor the user service to use GraphQL
Scope: backend only, no frontend changes"
```
### Plan database migration
```
/agent-plan "Migrate from PostgreSQL to MySQL for the users table"
```
## Backends
- **Primary**: Every Code (/plan command)
- **Enhancement**: Prometheus (context from similar code)
## Workflow
1. Parse your request and identify key requirements
2. Query Prometheus for similar existing code patterns
3. Generate implementation plan using Every Code
4. Present plan with:
- Architecture overview
- Step-by-step tasks
- Files to create/modify
- Dependencies to add
- Testing considerations
## Follow-up
After planning, use:
- `/agent-implement` - Execute the plan
- `/agent-context` - Get more context on specific files

105
skills/agents/solve.md Normal file
View File

@@ -0,0 +1,105 @@
# Agent: Solve
Multi-agent problem solving with orchestration across multiple tools and approaches.
## Usage
```
/agent-solve "Optimize database queries for slow dashboard loading"
```
## Description
The `/agent-solve` skill tackles complex problems by coordinating multiple agents:
1. Every Code's `/solve` command for orchestration
2. Prometheus for deep code analysis
3. Multiple solution attempts with validation
4. Best solution selection based on metrics
## Examples
### Solve performance issue
```
/agent-solve "Dashboard takes 10 seconds to load with 1000 items"
```
### Solve architecture problem
```
/agent-solve "Refactor monolithic payment service into microservices
Constraints: Must maintain backward compatibility"
```
### Solve integration challenge
```
/agent-solve "Integrate Stripe webhooks with existing payment system
Context: Using Express.js, PostgreSQL, Redis"
```
## Backends
- **Primary**: Every Code (/solve multi-agent orchestration)
- **Analysis**: Prometheus (knowledge graph, AST analysis)
- **Validation**: Both platforms (testing, review)
## Workflow
### 1. Problem Decomposition
- Break down complex problem into sub-tasks
- Identify dependencies and constraints
- Determine success criteria
### 2. Parallel Solution Attempts
- Agent 1: Analyze current implementation
- Agent 2: Research best practices
- Agent 3: Generate solution candidates
- Agent 4: Validate solutions
### 3. Solution Synthesis
- Compare solution approaches
- Merge best aspects from each
- Create unified solution
### 4. Implementation & Testing
- Apply selected solution
- Run comprehensive tests
- Measure improvement metrics
## Output
```
# Problem: Dashboard loading optimization
## Analysis
- Current load time: 10.2s
- Bottleneck identified: N+1 queries in item fetching
- Database queries: 1,247 per page load
## Solution Candidates
1. Query batching with DataLoader: 2.1s (79% improvement)
2. Caching layer with Redis: 1.8s (82% improvement)
3. Combined approach: 0.9s (91% improvement)
## Selected Solution
- Implemented DataLoader for batch queries
- Added Redis caching for hot data
- Optimized database indexes
## Results
✓ Load time: 10.2s → 0.9s (91% improvement)
✓ Queries: 1,247 → 47 per page load
✓ All tests passing: 127/127
✓ No regressions detected
Files modified:
- src/services/dashboard.ts
- src/api/items.ts
- src/cache/redis.ts
- prisma/schema.prisma
```
## Follow-up
After solving:
- `/agent-review` - Review implementation quality
- `/agent-test` - Validate with tests
- `/agent-context` - Understand solution architecture