- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
6.1 KiB
Auto-Trigger Integration Complete ✅
Date: 2026-01-27
Status: ✅ All agents auto-routing enabled via Ralph
What Was Added
1. Intelligent Router Hook
File: ~/.claude/hooks/intelligent-router.sh
This hook automatically analyzes user prompts and suggests the best agent for the task. It runs on every UserPromptSubmit event.
Routing Logic:
- Analyzes task keywords and patterns
- Calculates confidence scores (threshold: 70%)
- Suggests appropriate agent command
- Covers ALL 21 integrated commands
2. Enhanced Ralph Command
File: ~/.claude/commands/ralph.md (updated)
Ralph now:
- Has access to ALL integrated agents (Clawd, Prometheus, Dexto)
- Routes to best agent automatically
- Can orchestrate multi-agent workflows
- Removed
disable-model-invocationfor proper functionality
3. Enhanced Ralph Skill
File: ~/.claude/skills/ralph/enhanced-ralph.md (new)
Complete documentation of all agents and routing patterns.
4. Updated Hooks Configuration
File: ~/.claude/hooks.json (updated to v5)
Added intelligent-router.sh as the first hook in UserPromptSubmit chain.
Auto-Routing Patterns
| Task Pattern | Routes To | Example |
|---|---|---|
| "autonomous", "automatically", "on its own" | /clawd |
"Handle this autonomously" |
| "architecture", "design system", "from scratch" | /ralph |
"Design microservices architecture" |
| "bug", "fix", "reproduce", "regression" | /prometheus-bug |
"Fix authentication bug" |
| "feature", "implement", "add functionality" | /prometheus-feature |
"Add two-factor auth" |
| "code context", "how does", "explain" | /prometheus-context |
"How does payment work?" |
| "github", "pr", "issue", "commit" | /dexto-github |
"Analyze the pull request" |
| "pdf", "document", "summarize paper" | /dexto-pdf |
"Summarize this document" |
| "generate image", "create picture", "ai art" | /dexto-nano-banana |
"Generate an image" |
| "video", "sora", "generate clip" | /dexto-sora |
"Create a video" |
| "music", "audio", "podcast", "beat" | /dexto-music |
"Create a beat" |
| "database", "sql", "query", "schema" | /dexto-database |
"Optimize this query" |
| "explore code", "analyze codebase" | /dexto-explore |
"Explore this codebase" |
| "product name", "branding", "research" | /dexto-research |
"Research product names" |
| "support ticket", "triage", "categorize" | /dexto-triage |
"Triage this ticket" |
How It Works
User Experience
-
User types a task:
Fix the authentication bug in the login system -
Intelligent Router analyzes:
- Detects "bug", "fix", "authentication" keywords
- Matches to Prometheus Bug Analyzer (score: 85)
- Confidence: high
-
Suggestion appears:
💡 **Tip:** This is a code analysis task. Use Prometheus: `/prometheus "Fix the authentication bug in the login system"` -
User can:
- Click/tap the suggested command
- Type it manually
- Ignore and use default Claude
- Use
/ralphto let Ralph orchestrate
Ralph Orchestration
When using /ralph, it:
- Analyzes task requirements
- Selects best agent automatically
- For complex tasks, chains multiple agents:
- Example: "Analyze code, find bugs, create fix plan"
- Ralph chains:
dexto-explore→prometheus-bug→prometheus-feature
Examples
Example 1: Bug Fix
User: "The login is broken after password reset"
Router detects: bug pattern
Suggestion: 💡 Use Prometheus: `/prometheus-bug "The login is broken after password reset"`
Example 2: Image Generation
User: "Create an image of a cyberpunk city"
Router detects: image generation pattern
Suggestion: 💡 Use Dexto nano-banana agent: `/dexto-nano-banana "Create an image of a cyberpunk city"`
Example 3: Architecture Design
User: "Design a scalable e-commerce backend"
Router detects: architecture pattern
Suggestion: 💡 This is a complex architecture task. Ralph can help: `/ralph "Design a scalable e-commerce backend"`
Example 4: Autonomous Execution
User: "Automatically deploy the application to production"
Router detects: autonomous pattern
Suggestion: 💡 This task looks suitable for autonomous execution. Consider using: `/clawd "Automatically deploy the application to production"`
Configuration
Enable/Disable Router
Edit ~/.claude/hooks.json:
{
"type": "command",
"command": "/home/roman/.claude/hooks/intelligent-router.sh",
"timeout": 10
}
Adjust Confidence Threshold
Edit ~/.claude/hooks/intelligent-router.sh:
if [ "$SCORE" -ge 70 ]; then # Change 70 to desired threshold
Add New Patterns
Add to the detect patterns in intelligent-router.sh:
if echo "$prompt" | grep -qiE "(your|pattern)"; then
best_agent="your-agent"
best_score=80
fi
Testing
Test the router:
# Test various patterns
echo "Fix this bug" | ~/.claude/hooks/intelligent-router.sh
echo "Generate an image" | ~/.claude/hooks/intelligent-router.sh
echo "Design architecture" | ~/.claude/hooks/intelligent-router.sh
echo "Handle this autonomously" | ~/.claude/hooks/intelligent-router.sh
Files Modified/Created
~/.claude/
├── hooks/
│ ├── intelligent-router.sh # NEW - Auto-routing logic
│ └── hooks.json # UPDATED - v5 with router
├── commands/
│ └── ralph.md # UPDATED - Enhanced capabilities
└── skills/
└── ralph/
└── enhanced-ralph.md # NEW - Documentation
Health Check
~/.claude/health-check.sh
Status: ✅ All systems operational (291 skills)
Summary
Your Claude Code CLI now has intelligent auto-routing that:
- ✅ Detects task type from natural language
- ✅ Suggests best agent automatically
- ✅ Routes via Ralph for complex orchestration
- ✅ Covers all 21 commands (Clawd, Prometheus, Dexto)
- ✅ Runs on every prompt via hooks
Just describe your task and the system will guide you to the best tool! 🎯