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