| name | team |
| description | Reactive team orchestration. Spawn workers, monitor completions, dynamically spawn newly unblocked tasks until all complete. |
| argument-hint | <task description> |
Team Skill - Reactive Wave Orchestration
Use reactive team orchestration where waves emerge from task completions, not predefined schedules.
The Pattern
User: "extract all code, go through iterations until done"
│
▼
[TEAM LEAD]
│
├── Analyze task → Create all tasks with dependencies
│
├── Spawn workers for ALL initially unblocked tasks (Wave 1)
│
├── MONITOR LOOP (until all tasks done)
│ ├── receive_messages → check for completions
│ ├── task_list → check which tasks are now unblocked
│ └── For each newly unblocked task:
│ └── Spawn worker for that task
│
└── When all tasks complete → Shutdown workers
How It Works
- Create all tasks upfront with
blockedBy dependencies
- Spawn workers for all tasks that have no blockers
- Monitor - poll for completions and newly unblocked tasks
- React - spawn workers for newly unblocked tasks
- Repeat until all tasks complete
This means you tell the lead: "Keep iterating until X is done" and it will keep spawning workers as tasks become available.
Example: Document Codebase
User: "document all code, keep working until TYPELESS-FEATURE-MAP.md is complete"
│
▼
Lead: Create tasks with dependencies:
- Task 1 (beautifier): no blockers
- Task 2 (renderer): blocked by 1
- Task 3 (main-doc): no blockers
- Task 4 (koffi-doc): no blockers
- Task 5 (native-doc): no blockers
- Task 6 (feature-doc): blocked by 2,3,4,5
Lead: Spawn workers for initially unblocked (1,3,4,5)
MONITOR LOOP:
├─ Beautifier completes → Task 2 unblocked → Spawn worker for Task 2
├─ Main-doc completes → (no new unblocked)
├─ Koffi-doc completes → (no new unblocked)
├─ Native-doc completes → (no new unblocked)
├─ Renderer-doc completes → Task 6 unblocked → Spawn worker for Task 6
└─ Feature-doc completes → ALL DONE → Shutdown
Result: TYPELESS-FEATURE-MAP.md is complete!
Execution Steps
Step 1: Create Team
team_create({ "teamName": "doc-team" })
Step 2: Create ALL Tasks with Dependencies
task_create({ "teamName": "doc-team", "subject": "Beautify JS", "description": "..." })
task_create({ "teamName": "doc-team", "subject": "Renderer analysis", "description": "...", "blockedBy": ["beautifier-task-id"] })
task_create({ "teamName": "doc-team", "subject": "IPC handlers", "description": "..." })
task_create({ "teamName": "doc-team", "subject": "Feature map", "description": "...", "blockedBy": ["renderer-id", "main-doc-id", ...] })
Step 3: Spawn Initial Workers (All Unblocked Tasks)
task_list({ "teamName": "doc-team", "status": "pending" })
team_spawn_worker({ "teamName": "doc-team", "workerName": "beautifier", "agentType": "executor", "taskId": "task-1-id" })
team_spawn_worker({ "teamName": "doc-team", "workerName": "main-doc", "agentType": "executor", "taskId": "task-3-id" })
Step 4: Monitor Loop
The lead monitors and reacts:
receive_messages({ "teamName": "doc-team", "recipient": "team-lead", "clear": false })
task_list({ "teamName": "doc-team", "status": "pending" })
team_spawn_worker({ "teamName": "doc-team", "workerName": "renderer-doc", "agentType": "executor", "taskId": "task-2-id" })
Step 5: Continue Until Done
task_list({ "teamName": "doc-team", "status": "completed" })
Monitoring Commands
| Check | Command |
|---|
| Pending tasks (available to spawn) | task_list({ "teamName": "x", "status": "pending" }) |
| In progress tasks | task_list({ "teamName": "x", "status": "in_progress" }) |
| Completed tasks | task_list({ "teamName": "x", "status": "completed" }) |
| Worker messages | receive_messages({ "teamName": "x", "recipient": "team-lead" }) |
| Full status | team_status({ "teamName": "x" }) |
Progress Report Format
## Team Progress
**Completed:**
- Task 1 (beautifier) - Done
- Task 3 (main-doc) - Done
**In Progress:**
- Task 4 (koffi-doc) - worker-2 working
**Unblocked (spawn now):**
- Task 2 (renderer) - ready to spawn
**Blocked (waiting):**
- Task 6 (feature-doc) - blocked by 2,3,4,5
**Next Action:** Spawn worker for Task 2
Key Insight: Reactive vs Predefined
| Approach | How it works |
|---|
| Predefined waves | You decide waves upfront, spawn in batches |
| Reactive (this skill) | You create all tasks, lead spawns workers as tasks become unblocked |
The reactive approach is better when:
- User says "keep iterating until done"
- Dependencies are complex
- You don't know exactly how many iterations
Example User Prompt
"Use team orchestration to document this codebase. Create tasks for:
1. Beautify all JS bundles
2. Document renderer architecture (after beautifier)
3. Document main process IPC handlers
4. Analyze Koffi FFI bindings
5. Analyze native modules and preload
6. Write TYPELESS-FEATURE-MAP.md (after all above)
Spawn workers, monitor completions, and keep spawning newly unblocked tasks until Task 6 is complete."
Complete Workflow
team_create({ "teamName": "doc-team" })
task_create({ "teamName": "doc-team", "subject": "Beautify", "description": "..." })
task_create({ "teamName": "doc-team", "subject": "Renderer", "description": "...", "blockedBy": ["beautifier-id"] })
team_delete({ "teamName": "doc-team" })