Files
kugetsu/skills/kugetsu/scripts/kugetsu-install.sh
shokollm b3171ed632 feat(kugetsu): add status, delegate, doctor commands; inject PM context at init
This commit implements Phase 3b/3c architectural improvements:

### New kugetsu CLI commands:
- `kugetsu status` - Check initialization status (replaces kugetsu-helper check-status)
- `kugetsu delegate <msg>` - Send message to PM agent (new command)
- `kugetsu doctor [--fix]` - Diagnose and fix kugetsu issues

### PM Context Injection:
- kugetsu init now reads ~/.kugetsu/pm-agent.md (if exists) and injects
  it into the PM agent session at creation time
- PM context is loaded ONCE at init, not on every delegation
- This improves efficiency - kugetsu-pm content read once, not 10 times

### kugetsu-chat updated:
- Now uses `kugetsu delegate` instead of kugetsu-helper
- Now uses `kugetsu status` instead of kugetsu-helper check-status
- Simplified - no longer depends on kugetsu-helpers

### kugetsu continue:
- Removed strict issue-ref format validation
- Now accepts any session name that is tracked in index.json["issues"]
- Issue-ref format is a guideline, not a hard requirement

### Documentation updated:
- phase3a-setup.md - Updated to reflect new kugetsu commands
- kugetsu-install.sh - Simplified Phase 3a setup instructions

### Breaking changes:
- kugetsu-helpers is no longer required for Phase 3a Chat Agent
- kugetsu-chat skill v3.0 now requires kugetsu CLI with new commands
2026-03-31 01:09:12 +00:00

63 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# kugetsu installation script
# Installs kugetsu CLI and optionally sets up Phase 3a Chat Agent
set -euo pipefail
KUGETSU_DIR="${KUGETSU_DIR:-$HOME/.kugetsu}"
BIN_DIR="${BIN_DIR:-$HOME/.local/bin}"
echo "Installing kugetsu..."
mkdir -p "$BIN_DIR"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cp "$SCRIPT_DIR/kugetsu" "$BIN_DIR/kugetsu"
chmod +x "$BIN_DIR/kugetsu"
echo "kugetsu installed at: $BIN_DIR/kugetsu"
add_to_shell() {
local rc_file="$1"
local export_line="export PATH=\"\$HOME/.local/bin:\$PATH\""
if [ -f "$rc_file" ]; then
if grep -q "$export_line" "$rc_file" 2>/dev/null; then
echo "$rc_file already has .local/bin in PATH"
else
echo "" >> "$rc_file"
echo "# kugetsu and other tools" >> "$rc_file"
echo "$export_line" >> "$rc_file"
echo "Added to $rc_file"
fi
fi
}
add_to_shell "$HOME/.bashrc"
add_to_shell "$HOME/.zshrc"
echo ""
echo "=== Verifying installation ==="
"$BIN_DIR/kugetsu" help | head -10
echo ""
echo "Installation complete!"
echo ""
echo "=== Phase 3a Chat Agent Setup (Optional) ==="
echo "To also install the Chat Agent skills for Phase 3a:"
echo ""
echo " 1. Link skills to Hermes:"
echo " mkdir -p ~/.hermes/skills/kugetsu-chat"
echo " ln -sf /path/to/kugetsu/skills/kugetsu-chat ~/.hermes/skills/"
echo ""
echo " 2. Install Chat Agent SOUL:"
echo " cp /path/to/kugetsu/skills/kugetsu-chat/SOUL.md ~/.hermes/SOUL-chat.md"
echo ""
echo " 3. Initialize kugetsu (requires TTY):"
echo " kugetsu init"
echo ""
echo " 4. Verify setup:"
echo " kugetsu status"
echo ""
echo "See docs/phase3a-setup.md for full installation guide."