mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 06:06:02 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: main - Timestamp: 2026-02-07T22:48:32Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fa4f3a507
commit
ec23b8ea6e
1 file changed
+117
@@ -526,6 +526,123 @@ const config = optimizer.getOptimalConfig(agentCount);
|
||||
### Testing & Validation
|
||||
`tdd-london-swarm`, `production-validator`
|
||||
|
||||
## Agent Teams (Multi-Agent Coordination)
|
||||
|
||||
Claude Code's experimental Agent Teams feature is fully integrated with Claude Flow for advanced multi-agent coordination.
|
||||
|
||||
### Enabling Agent Teams
|
||||
|
||||
Agent Teams is automatically enabled when you run `npx claude-flow@v3alpha init`. The following is added to `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"env": {
|
||||
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
||||
},
|
||||
"claudeFlow": {
|
||||
"agentTeams": {
|
||||
"enabled": true,
|
||||
"teammateMode": "auto",
|
||||
"taskListEnabled": true,
|
||||
"mailboxEnabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Agent Teams Components
|
||||
|
||||
| Component | Tool | Purpose |
|
||||
|-----------|------|---------|
|
||||
| **Team Lead** | You (main Claude) | Coordinates teammates, assigns tasks, reviews results |
|
||||
| **Teammates** | `Task` tool | Sub-agents spawned to work on specific tasks |
|
||||
| **Task List** | `TaskCreate/TaskList/TaskUpdate` | Shared todo list visible to all team members |
|
||||
| **Mailbox** | `SendMessage` | Inter-agent messaging for coordination |
|
||||
|
||||
### Creating and Managing Teams
|
||||
|
||||
```javascript
|
||||
// Create a team
|
||||
TeamCreate({
|
||||
team_name: "feature-dev",
|
||||
description: "Building new feature",
|
||||
agent_type: "coordinator"
|
||||
})
|
||||
|
||||
// Create shared tasks
|
||||
TaskCreate({ subject: "Design API", description: "...", activeForm: "Designing" })
|
||||
TaskCreate({ subject: "Implement endpoints", description: "...", activeForm: "Implementing" })
|
||||
TaskCreate({ subject: "Write tests", description: "...", activeForm: "Testing" })
|
||||
|
||||
// Spawn teammates (run in background for parallel work)
|
||||
Task({
|
||||
prompt: "Design the API according to task #1...",
|
||||
subagent_type: "system-architect",
|
||||
team_name: "feature-dev",
|
||||
name: "architect",
|
||||
run_in_background: true
|
||||
})
|
||||
Task({
|
||||
prompt: "Implement endpoints from task #2...",
|
||||
subagent_type: "coder",
|
||||
team_name: "feature-dev",
|
||||
name: "developer",
|
||||
run_in_background: true
|
||||
})
|
||||
```
|
||||
|
||||
### Agent Teams Hooks
|
||||
|
||||
| Hook | Trigger | Purpose |
|
||||
|------|---------|---------|
|
||||
| `TeammateIdle` | Teammate finishes turn | Auto-assign pending tasks to idle teammates |
|
||||
| `TaskCompleted` | Task marked complete | Train patterns from successful work, notify lead |
|
||||
|
||||
### Hook Commands
|
||||
|
||||
```bash
|
||||
# Handle idle teammate (auto-assigns available tasks)
|
||||
npx claude-flow@v3alpha hooks teammate-idle --auto-assign true
|
||||
|
||||
# Handle task completion (trains patterns, notifies lead)
|
||||
npx claude-flow@v3alpha hooks task-completed -i task-123 --train-patterns true
|
||||
|
||||
# Check on team progress
|
||||
TaskList
|
||||
|
||||
# Send message to teammate
|
||||
SendMessage({
|
||||
type: "message",
|
||||
recipient: "developer",
|
||||
content: "Please prioritize the auth endpoint",
|
||||
summary: "Prioritize auth"
|
||||
})
|
||||
|
||||
# Shutdown teammate gracefully
|
||||
SendMessage({
|
||||
type: "shutdown_request",
|
||||
recipient: "developer",
|
||||
content: "Work complete, shutting down"
|
||||
})
|
||||
```
|
||||
|
||||
### Best Practices for Agent Teams
|
||||
|
||||
1. **Spawn teammates in background**: Use `run_in_background: true` for parallel work
|
||||
2. **Create tasks first**: Use TaskCreate before spawning teammates so they have work
|
||||
3. **Use descriptive names**: Name teammates by role (architect, developer, tester)
|
||||
4. **Don't poll status**: Wait for teammates to message back or complete
|
||||
5. **Graceful shutdown**: Always send shutdown_request before TeamDelete
|
||||
6. **Clean up**: Use TeamDelete after all teammates have shut down
|
||||
|
||||
### Teammate Display Modes
|
||||
|
||||
| Mode | Description |
|
||||
|------|-------------|
|
||||
| `auto` | Automatically selects best mode for environment |
|
||||
| `in-process` | Teammates run in same process (default for CI/background) |
|
||||
| `tmux` | Split-pane display in terminal (requires tmux) |
|
||||
|
||||
## V3 Hooks System (17 Hooks + 12 Workers)
|
||||
|
||||
### Hook Categories
|
||||
|
||||
Reference in new issue
Block a user