923 B
923 B
name, description, whenToUse
| name | description | whenToUse |
|---|---|---|
| batch | Decompose work into parallel tasks executed by elfs | When a task can be split into independent parallel sub-tasks with no shared write state |
Analyze the user's request and decompose it into independent parallel sub-tasks.
Rules:
- Identify which parts of the work can run independently (no shared write state).
- For each independent unit, write a focused prompt that includes specific file paths.
- Call spawn_elfs with ALL tasks in a single call — do NOT spawn one elf at a time.
- Read-only tasks on disjoint files can always parallelize.
- Write tasks to the same file must be sequenced — group them into one elf.
- Limit batch size to 5-7 tasks for optimal throughput.
- After all elfs complete, synthesize their outputs into a coherent response.
- If any elf failed, report the failure and suggest a retry for that specific sub-task.
User's request: {{.Args}}