- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
75 lines
1.9 KiB
Bash
75 lines
1.9 KiB
Bash
#!/usr/bin/env bash
|
|
# Delegate agent-ready tasks to specialist agents
|
|
set -euo pipefail
|
|
|
|
KANBAN_API="http://127.0.0.1:5003/api"
|
|
|
|
echo "🤖 Finding agent-ready tasks..."
|
|
|
|
# Get queue tasks with agent tags
|
|
tasks=$(curl -s "$KANBAN_API/tasks?status=queue" | \
|
|
jq -r '.[] | select(.tags | contains("agent:")) |
|
|
select(.tags | contains("size:s") or contains("size:m")) |
|
|
"\(.id)|\(.tags)|\(.title)"' | head -20)
|
|
|
|
if [ -z "$tasks" ]; then
|
|
echo "No agent-ready tasks found"
|
|
exit 0
|
|
fi
|
|
|
|
echo "$tasks" | while IFS='|' read -r id tags title; do
|
|
agent=$(echo "$tags" | grep -oP 'agent:\K[^,]+' || echo "")
|
|
size=$(echo "$tags" | grep -oP 'size:\K[^,]+' || echo "")
|
|
|
|
if [ -z "$agent" ]; then continue; fi
|
|
|
|
echo ""
|
|
echo "📋 [$id] $title"
|
|
echo " Agent: $agent | Size: $size"
|
|
echo " Delegate now? (y/n/s=skip all)"
|
|
read -r ans
|
|
|
|
case "$ans" in
|
|
y|Y)
|
|
# Get task description
|
|
desc=$(curl -s "$KANBAN_API/tasks/$id" | jq -r '.description')
|
|
|
|
# Map agent to model
|
|
case "$agent" in
|
|
gemini-flash) model="gemini-flash";;
|
|
gemini-pro) model="gemini-pro";;
|
|
nvidia|deepseek) model="nvidia/deepseek-ai/deepseek-v3.2";;
|
|
*) model="gemini-flash";;
|
|
esac
|
|
|
|
# Spawn isolated agent
|
|
echo " 🚀 Starting $model agent..."
|
|
openclaw agent \
|
|
--agent free \
|
|
--model "$model" \
|
|
--thinking low \
|
|
--message "Kanban Task #$id: $title
|
|
|
|
$desc
|
|
|
|
Your mission:
|
|
1. Analyze the task requirements
|
|
2. Create implementation plan
|
|
3. Execute the work
|
|
4. Update Kanban task with results
|
|
|
|
Use: bash /home/alex/clawd/skills/kanban-agent-skill/scripts/kanban.sh
|
|
|
|
When done, update task status to 'done'." \
|
|
--local &
|
|
|
|
echo " ✅ Agent spawned (PID $!)"
|
|
;;
|
|
s|S) echo "Skipping remaining tasks"; break;;
|
|
*) echo " Skipped";;
|
|
esac
|
|
done
|
|
|
|
echo ""
|
|
echo "✅ Delegation complete"
|