From 2925224a9a14031f21b61918ac73585a5ac22b2d Mon Sep 17 00:00:00 2001 From: uroma Date: Thu, 29 Jan 2026 12:25:00 +0000 Subject: [PATCH] Remove Clawdbot integration - Deleted clawd command file (commands/clawd.md) - Deleted clawd hook files (hooks/clawd-*.sh) - Removed clawd references from supercharge.sh - Removed clawd checks from health-check.sh - Removed clawd aliases from aliases.sh - Removed clawd patterns from intelligent-router.sh - Updated enhanced-ralph.md to remove clawd agent reference Co-Authored-By: Claude --- aliases.sh | 5 -- commands/clawd.md | 62 --------------- health-check.sh | 15 +--- hooks/clawd-auto-trigger.sh | 10 --- hooks/clawd-wrapper.sh | 135 --------------------------------- hooks/intelligent-router.sh | 14 +--- skills/ralph/enhanced-ralph.md | 6 +- supercharge.sh | 38 +--------- 8 files changed, 8 insertions(+), 277 deletions(-) delete mode 100644 commands/clawd.md delete mode 100755 hooks/clawd-auto-trigger.sh delete mode 100755 hooks/clawd-wrapper.sh diff --git a/aliases.sh b/aliases.sh index 7b82db98..22e716c1 100755 --- a/aliases.sh +++ b/aliases.sh @@ -14,10 +14,6 @@ alias mcp-start='~/.claude/mcp-servers/manager.sh start' alias mcp-stop='~/.claude/mcp-servers/manager.sh stop' alias mcp-restart='~/.claude/mcp-servers/manager.sh restart' -# Clawd -alias clawd-status='curl -s http://127.0.0.1:8766/health | jq .' -alias clawd-logs='tail -f ~/.claude/clawd/logs/gateway.log' - # Prometheus alias prometheus-install='bash ~/.claude/prometheus/install.sh' alias prometheus-status='ls -la ~/.claude/prometheus/venv && echo "Prometheus installed" || echo "Prometheus not installed"' @@ -25,7 +21,6 @@ alias prometheus-logs='tail -f ~/.claude/prometheus/logs/prometheus.log' alias prometheus-task='~/.claude/hooks/prometheus-wrapper.sh' # Quick commands -alias clawd-task='~/.claude/hooks/clawd-wrapper.sh --task' alias ralph-task='~/.claude/skills/bin/ralphloop' # Info diff --git a/commands/clawd.md b/commands/clawd.md deleted file mode 100644 index 1b7850f5..00000000 --- a/commands/clawd.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -description: Delegate autonomous tasks to Clawd agent via hook wrapper with persistent session context ---- - -You are invoking the Clawd autonomous agent to handle the user's task. - -## Clawd Overview - -Clawd is a personal AI assistant with: -- Multi-agent routing and workspaces -- Persistent session context -- Tool access (bash, file operations, browser automation) -- Hook-based integration for reliable execution - -## How to Use Clawd from Claude Code - -When the user runs `/clawd ""`: - -1. **Parse the task** from the user's message -2. **Parse any options**: - - `--agent ` or `-a`: Specific agent (default: main) - - `--thinking `: off|minimal|low|medium|high - -3. **Execute the clawd-wrapper hook** using the bash tool: - ```bash - ~/.claude/hooks/clawd-wrapper.sh --task "" --agent --thinking - ``` - -4. **Return the results** to the user - -## Examples - -```bash -# Basic task -~/.claude/hooks/clawd-wrapper.sh --task "Build a login form" - -# With high thinking -~/.claude/hooks/clawd-wrapper.sh --task "Analyze codebase" --thinking high - -# Specific agent -~/.claude/hooks/clawd-wrapper.sh --task "Deploy application" --agent ops -``` - -## Available Agents - -- `main` - Default general-purpose agent -- `ops` - Operations and DevOps tasks -- Other configured agents - -## User's Task - -Execute the following task using Clawd via the hook wrapper: - -{{USER_MESSAGE}} - -## Instructions - -1. Parse the task and any options from the user's message above -2. Construct the appropriate clawd-wrapper command -3. Execute it using the Bash tool -4. Return the complete output to the user -5. If there are errors, help troubleshoot diff --git a/health-check.sh b/health-check.sh index c0a36148..26b5b91d 100755 --- a/health-check.sh +++ b/health-check.sh @@ -144,7 +144,6 @@ main() { # Core Binaries section "Core Binaries" check_binary "claude" || exit_code=1 - check_binary "clawdbot" || exit_code=1 check_binary "ralphloop" "${CLAUDE_DIR}/skills/bin/ralphloop" || exit_code=1 check_binary "jq" || exit_code=1 @@ -154,7 +153,6 @@ main() { check_directory "${CLAUDE_DIR}/skills" "Skills directory" || exit_code=1 check_directory "${CLAUDE_DIR}/hooks" "Hooks directory" || exit_code=1 check_directory "${CLAUDE_DIR}/plugins" "Plugins directory" || exit_code=1 - check_directory "${CLAUDE_DIR}/clawd" "Clawd directory" || exit_code=1 check_directory "${CLAUDE_DIR}/ralph-integration" "Ralph integration" || exit_code=1 check_directory "${CLAUDE_DIR}/mcp-servers" "MCP servers" || exit_code=1 check_directory "${CLAUDE_DIR}/prometheus" "Prometheus" || exit_code=1 @@ -167,14 +165,7 @@ main() { check_file "${CLAUDE_DIR}/plugins/installed_plugins.json" "Installed plugins" || exit_code=1 check_file "${CLAUDE_DIR}/plugins/marketplaces/official.json" "Official marketplace" || exit_code=1 check_file "${CLAUDE_DIR}/mcp-servers/registry.json" "MCP registry" || exit_code=1 - - # Clawd Components - section "Clawd Integration" - check_process "${CLAUDE_DIR}/clawd/gateway.pid" "Clawd Gateway" || exit_code=1 - check_port 8766 "Clawd Gateway" || exit_code=1 - check_file "${CLAUDE_DIR}/commands/clawd.md" "Clawd command" || exit_code=1 - check_file "${CLAUDE_DIR}/hooks/clawd-wrapper.sh" "Clawd wrapper hook" || exit_code=1 - + # Ralph Integration section "Ralph Integration" check_file "${CLAUDE_DIR}/skills/bin/ralphloop" "Ralph binary" || exit_code=1 @@ -220,8 +211,8 @@ main() { section "Hooks System" local hook_count=$(jq '.hooks | length' "${CLAUDE_DIR}/hooks.json" 2>/dev/null || echo "0") check_info "Registered hook events: $hook_count" - - for hook in clawd-auto-trigger.sh clawd-session-start.sh clawd-task-complete.sh unified-integration-v2.sh prometheus-wrapper.sh; do + + for hook in unified-integration-v2.sh prometheus-wrapper.sh; do check_file "${CLAUDE_DIR}/hooks/$hook" "Hook: $hook" || exit_code=1 done diff --git a/hooks/clawd-auto-trigger.sh b/hooks/clawd-auto-trigger.sh deleted file mode 100755 index 8928e736..00000000 --- a/hooks/clawd-auto-trigger.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -PROMPT=$(cat) -COMPLEXITY_INDICATORS=("build.*from scratch" "implement.*complete" "autonomous" "end to end" "full.*feature") -for indicator in "${COMPLEXITY_INDICATORS[@]}"; do - if echo "$PROMPT" | grep -qiE "$indicator"; then - echo "💡 Tip: This task looks complex. Consider using /clawd for autonomous execution." - break - fi -done -exit 0 diff --git a/hooks/clawd-wrapper.sh b/hooks/clawd-wrapper.sh deleted file mode 100755 index 25ecd7cf..00000000 --- a/hooks/clawd-wrapper.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/bash -# Clawd Hook Wrapper - Executes clawd via the hook system -# This avoids direct binary calls and uses the gateway properly - -set -euo pipefail - -CLAWD_DIR="${HOME}/.claude/clawd" -GATEWAY_PID_FILE="${CLAWD_DIR}/gateway.pid" -LOG_DIR="${CLAWD_DIR}/logs" - -# Ensure log directory exists -mkdir -p "${LOG_DIR}" - -log() { - echo "[$(date -u +"%Y-%m-%d %H:%M:%S UTC")] [clawd-wrapper] $*" | tee -a "${LOG_DIR}/wrapper.log" -} - -# Check if gateway is running -check_gateway() { - if [[ -f "$GATEWAY_PID_FILE" ]]; then - local pid - pid=$(cat "$GATEWAY_PID_FILE" 2>/dev/null || echo "") - if [[ -n "$pid" ]] && kill -0 "$pid" 2>/dev/null; then - return 0 - fi - fi - - # Check if Python gateway is running - if pgrep -f "uvicorn.*clawd.*main" > /dev/null 2>&1; then - return 0 - fi - - # Check if clawdbot-gateway is running - if pgrep -f "clawdbot-gateway" > /dev/null 2>&1; then - return 0 - fi - - return 1 -} - -# Start the Python gateway if not running -ensure_gateway() { - if check_gateway; then - log "Gateway already running" - return 0 - fi - - log "Starting Clawd gateway..." - cd "${CLAWD_DIR}/gateway" - - # Activate venv and start - source venv/bin/activate - nohup python -m uvicorn main:app --host 127.0.0.1 --port 8766 > "${LOG_DIR}/gateway.log" 2>&1 & - - local pid=$! - echo "$pid" > "$GATEWAY_PID_FILE" - sleep 2 - - if kill -0 "$pid" 2>/dev/null; then - log "Gateway started (PID: ${pid})" - return 0 - else - log "ERROR: Failed to start gateway" - return 1 - fi -} - -# Execute task via clawd using the agent command -execute_clawd() { - local task="$1" - local agent="${2:-main}" - local thinking="${3:-medium}" - - log "Executing task via clawd: ${task}" - - # Use clawdbot agent command with --local flag - if command -v clawdbot >/dev/null 2>&1; then - clawdbot agent --local --agent "$agent" --message "$task" --thinking "$thinking" 2>&1 - elif [[ -x "${HOME}/.local/bin/clawdbot" ]]; then - "${HOME}/.local/bin/clawdbot" agent --local --agent "$agent" --message "$task" --thinking "$thinking" 2>&1 - else - log "ERROR: clawdbot not found" - echo "Error: clawdbot not found. Please install clawdbot first." >&2 - return 1 - fi -} - -# Main entry point -main() { - local task="" - local agent="main" - local thinking="medium" - - # Parse arguments - while [[ $# -gt 0 ]]; do - case "$1" in - --agent|-a) - agent="$2" - shift 2 - ;; - --thinking) - thinking="$2" - shift 2 - ;; - --task) - task="$2" - shift 2 - ;; - *) - task="$1" - shift - ;; - esac - done - - # If no task, read from stdin - if [[ -z "$task" ]]; then - if [[ -t 0 ]]; then - echo "Usage: $0 [--agent ] [--thinking ] --task " >&2 - exit 1 - else - task=$(cat) - fi - fi - - log "Task: ${task}, Agent: ${agent}, Thinking: ${thinking}" - - # Ensure gateway is running - ensure_gateway - - # Execute the task - execute_clawd "$task" "$agent" "$thinking" -} - -main "$@" diff --git a/hooks/intelligent-router.sh b/hooks/intelligent-router.sh index 4cb1f1ed..c8b611a4 100755 --- a/hooks/intelligent-router.sh +++ b/hooks/intelligent-router.sh @@ -13,16 +13,9 @@ detect_agent() { local best_agent="" local best_score=0 local confidence="" - - # Clawd patterns - autonomous execution - if echo "$prompt" | grep -qiE "(autonomous|automatically|on its own|without supervision|delegate|handle this)"; then - best_agent="clawd" - best_score=90 - confidence="high" - fi - + # Ralph patterns - architecture/design - if echo "$prompt" | grep -qiE "(architecture|design system|microservices|system design|plan.*implementation|from scratch|build.*complete|end to end)"; then + if echo "$prompt" | grep -qiE "(architecture|design system|microservices|system design|plan.*implementation|from scratch|build.*complete|end to end|autonomous|automatically)"; then if [ $best_score -lt 85 ]; then best_agent="ralph" best_score=85 @@ -153,9 +146,6 @@ CONFIDENCE=$(echo "$RESULT" | grep "^CONFIDENCE:" | cut -d: -f2) # Only suggest if confidence is high enough if [ "$AGENT" != "none" ] && [ "$SCORE" -ge 70 ]; then case "$AGENT" in - clawd) - echo "💡 **Tip:** This task looks suitable for autonomous execution. Consider using: \`/clawd \"$PROMPT\"\`" - ;; ralph) echo "💡 **Tip:** This is a complex architecture task. Ralph can help: \`/ralph \"$PROMPT\"\`" ;; diff --git a/skills/ralph/enhanced-ralph.md b/skills/ralph/enhanced-ralph.md index 97d94617..017e1c0a 100644 --- a/skills/ralph/enhanced-ralph.md +++ b/skills/ralph/enhanced-ralph.md @@ -1,6 +1,6 @@ --- name: enhanced-ralph -description: "Enhanced Ralph with full integration access - Clawd, Prometheus, Dexto agents auto-routing based on task requirements" +description: "Enhanced Ralph with full integration access - Prometheus, Dexto agents auto-routing based on task requirements" --- # Enhanced Ralph - Universal Agent Orchestrator @@ -9,10 +9,6 @@ Ralph now has access to ALL integrated agents and can automatically route tasks ## Available Agents -### Autonomous Execution -- **Clawd** (`/clawd`) - Autonomous task delegation with persistent sessions - - Best for: "Do this autonomously", "Handle this automatically" - ### Architecture & Design - **Ralph** (`/ralph`) - System design and complex implementation planning - Best for: "Design architecture", "Plan implementation", "From scratch" diff --git a/supercharge.sh b/supercharge.sh index d1fc96ab..db487789 100755 --- a/supercharge.sh +++ b/supercharge.sh @@ -204,10 +204,7 @@ install_dependencies() { # Install Dexto Integration install_dexto_integration - - # Install Clawd Gateway - install_clawd_gateway - + # Configure MCP Servers configure_mcp_servers } @@ -283,35 +280,6 @@ install_dexto_integration() { fi } -install_clawd_gateway() { - log_step "Installing Clawd Gateway..." - - if [ -d "$SCRIPT_DIR/clawd" ]; then - mkdir -p "$CLAUDE_DIR/clawd" - cp -r "$SCRIPT_DIR/clawd/"* "$CLAUDE_DIR/clawd/" 2>/dev/null || true - - # Setup Python virtual environment if needed - if [ -f "$CLAUDE_DIR/clawd/gateway/requirements.txt" ]; then - if [ ! -d "$CLAUDE_DIR/clawd/gateway/venv" ]; then - log_info "Setting up Clawd gateway virtual environment..." - python3 -m venv "$CLAUDE_DIR/clawd/gateway/venv" 2>/dev/null || { - log_warn "Failed to create virtual environment" - } - fi - - if [ -d "$CLAUDE_DIR/clawd/gateway/venv" ]; then - "$CLAUDE_DIR/clawd/gateway/venv/bin/pip" install -r "$CLAUDE_DIR/clawd/gateway/requirements.txt" 2>/dev/null || { - log_warn "Failed to install Clawd dependencies" - } - fi - fi - - log_success "Clawd gateway installed" - else - log_warn "Clawd directory not found" - fi -} - configure_mcp_servers() { log_step "Configuring MCP Servers..." @@ -509,16 +477,14 @@ print_summary() { echo -e " ${GREEN}✓${NC} RalphLoop Autonomous Agent" echo -e " ${GREEN}✓${NC} Prometheus Code Analysis (6 commands)" echo -e " ${GREEN}✓${NC} Dexto Multi-Agent Harness (12 commands)" - echo -e " ${GREEN}✓${NC} Clawd Autonomous Gateway" echo -e " ${GREEN}✓${NC} Intelligent Auto-Routing System" echo -e " ${GREEN}✓${NC} Multi-AI Consultation (Qwen)" echo -e " ${GREEN}✓${NC} 10 MCP Servers Configured" echo -e " ${GREEN}✓${NC} Plugin Marketplace" echo "" - echo -e "${CYAN}Available Commands (21 total):${NC}" + echo -e "${CYAN}Available Commands (20 total):${NC}" echo "" echo -e "${BOLD}Autonomous Agents:${NC}" - echo -e " ${YELLOW}/clawd${NC} - Fully autonomous task execution" echo -e " ${YELLOW}/ralph${NC} - Iterative architecture & orchestration" echo "" echo -e "${BOLD}Prometheus (Code Analysis):${NC}"