#!/bin/bash
# 极简分配任务脚本
TASK_ID=$1
AGENT=$2

# 从pending移动到assigned
mv "management/tasks/pending/${TASK_ID}.md" "management/tasks/assigned/${TASK_ID}.md"

# 创建Agent通知文件
cp "management/tasks/assigned/${TASK_ID}.md" "management/agents/${AGENT}/${TASK_ID}.task"

echo "任务 ${TASK_ID} 分配给 ${AGENT}"
EOF && chmod +x management/workflow/scripts/assign_task.sh