source dump of claude code
at main 49 lines 2.1 kB view raw
1import { isAgentSwarmsEnabled } from '../../utils/agentSwarmsEnabled.js' 2 3export const DESCRIPTION = 'List all tasks in the task list' 4 5export function getPrompt(): string { 6 const teammateUseCase = isAgentSwarmsEnabled() 7 ? `- Before assigning tasks to teammates, to see what's available 8` 9 : '' 10 11 const idDescription = isAgentSwarmsEnabled() 12 ? '- **id**: Task identifier (use with TaskGet, TaskUpdate)' 13 : '- **id**: Task identifier (use with TaskGet, TaskUpdate)' 14 15 const teammateWorkflow = isAgentSwarmsEnabled() 16 ? ` 17## Teammate Workflow 18 19When working as a teammate: 201. After completing your current task, call TaskList to find available work 212. Look for tasks with status 'pending', no owner, and empty blockedBy 223. **Prefer tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones 234. Claim an available task using TaskUpdate (set \`owner\` to your name), or wait for leader assignment 245. If blocked, focus on unblocking tasks or notify the team lead 25` 26 : '' 27 28 return `Use this tool to list all tasks in the task list. 29 30## When to Use This Tool 31 32- To see what tasks are available to work on (status: 'pending', no owner, not blocked) 33- To check overall progress on the project 34- To find tasks that are blocked and need dependencies resolved 35${teammateUseCase}- After completing a task, to check for newly unblocked work or claim the next available task 36- **Prefer working on tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones 37 38## Output 39 40Returns a summary of each task: 41${idDescription} 42- **subject**: Brief description of the task 43- **status**: 'pending', 'in_progress', or 'completed' 44- **owner**: Agent ID if assigned, empty if available 45- **blockedBy**: List of open task IDs that must be resolved first (tasks with blockedBy cannot be claimed until dependencies resolve) 46 47Use TaskGet with a specific task ID to view full details including description and comments. 48${teammateWorkflow}` 49}