Check the health and status of the automatic agent routing system
From opspal-corenpx claudepluginhub revpalsfdc/opspal-commercial --plugin opspal-core[options]This command performs a comprehensive health check of the automatic agent routing system, verifying configuration, testing functionality, and reporting status.
The routing health check validates:
.claude-plugins/opspal-core/hooks/unified-router.shrouting-index.jsonscripts/lib/validate-routing-integrity.jsscripts/lib/validate-routing-state-semantics.jsrouting-patterns.json remains the routing authority/routing-health
╔════════════════════════════════════════════════════════╗
║ Routing System Health Check ║
╚════════════════════════════════════════════════════════╝
CONFIGURATION
─────────────────────────────────────────────────────────
✓ Hook configured: .claude/settings.json
✓ Auto-routing enabled: true
✓ Confidence threshold: 0.7
✓ Complexity threshold: 0.7
FILE SYSTEM
─────────────────────────────────────────────────────────
✓ Hook file present and executable
✓ Routing index present (137 agents, 199 keywords)
✓ All required scripts available
FUNCTIONALITY
─────────────────────────────────────────────────────────
✓ Test routing successful
Task: "Deploy to production"
→ release-coordinator (90% confidence, 0.8 complexity)
RECENT METRICS (Last 24 hours)
─────────────────────────────────────────────────────────
Total routings: 45
Auto-routed: 36 (80.0%)
Success rate: 95.6%
Top agent: sfdc-revops-auditor (12 uses)
╔════════════════════════════════════════════════════════╗
║ Status: HEALTHY ✓ ║
╚════════════════════════════════════════════════════════╝
Symptom: ✗ Hook not found in settings.json
Solution:
# Run setup script
.claude-plugins/opspal-core/scripts/setup-auto-routing.sh
Symptom: ✗ Hook file not executable
Solution:
chmod +x .claude-plugins/opspal-core/hooks/unified-router.sh
Symptom: ✗ Routing index not found
Solution:
# Source shared path resolver
RESOLVE_SCRIPT=""
for _candidate in \
"${CLAUDE_PLUGIN_ROOT:+${CLAUDE_PLUGIN_ROOT}/scripts/resolve-script.sh}" \
"$HOME/.claude/plugins/cache/opspal-commercial/opspal-core"/*/scripts/resolve-script.sh \
"$HOME/.claude/plugins/marketplaces"/*/plugins/opspal-core/scripts/resolve-script.sh \
"$PWD/plugins/opspal-core/scripts/resolve-script.sh" \
"$PWD/.claude-plugins/opspal-core/scripts/resolve-script.sh"; do
[ -n "$_candidate" ] && [ -f "$_candidate" ] && RESOLVE_SCRIPT="$_candidate" && break
done
if [ -z "$RESOLVE_SCRIPT" ]; then echo "ERROR: Cannot locate opspal-core resolve-script.sh"; exit 1; fi
source "$RESOLVE_SCRIPT"
node "$(find_script "routing-index-builder.js")"
Symptom: ✗ Test routing returned no recommendation
Possible causes:
Solutions:
node scripts/lib/routing-index-builder.jswhich nodenode scripts/lib/validate-routing-integrity.jsnode scripts/lib/validate-routing-state-semantics.jstail -f /tmp/routing-hook.log/route - Manually analyze routing for a task/agents - List all available agentsnode plugins/opspal-core/scripts/lib/validate-routing-integrity.js - Validate route, metadata, and tool-fit integrityThis command runs the health check script:
.claude-plugins/opspal-core/scripts/routing-health-check.sh