mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 13:23:51 +08:00
fix(team-skills): enable true parallel execution with --agent-name mechanism
Previously, parallel tasks assigned to the same role (e.g., multiple EXPLORE-* tasks with owner: 'explorer') executed serially because only one agent instance existed per role name. This adds conditional parallel agent spawning with instance-specific names (explorer-1, explorer-2) and --agent-name arg for role task discovery filtering. Affected skills: team-ultra-analyze, team-quality-assurance, team-brainstorm, team-issue. Single-task modes preserve backward compatibility with original agent names.
This commit is contained in:
@@ -135,10 +135,14 @@ Dependencies: ${explorerContext.dependencies?.join(', ') || 'N/A'}
|
||||
### Phase 1: Task Discovery
|
||||
|
||||
```javascript
|
||||
// Parse agent name for parallel instances (e.g., implementer-1, implementer-2)
|
||||
const agentNameMatch = args.match(/--agent-name[=\s]+([\w-]+)/)
|
||||
const agentName = agentNameMatch ? agentNameMatch[1] : 'implementer'
|
||||
|
||||
const tasks = TaskList()
|
||||
const myTasks = tasks.filter(t =>
|
||||
t.subject.startsWith('BUILD-') &&
|
||||
t.owner === 'implementer' &&
|
||||
t.owner === agentName && // Use agentName (e.g., 'implementer-1') instead of hardcoded 'implementer'
|
||||
t.status === 'pending' &&
|
||||
t.blockedBy.length === 0
|
||||
)
|
||||
@@ -370,7 +374,7 @@ TaskUpdate({ taskId: task.id, status: 'completed' })
|
||||
// Check for next BUILD-* task (parallel BUILD tasks or new batches)
|
||||
const nextTasks = TaskList().filter(t =>
|
||||
t.subject.startsWith('BUILD-') &&
|
||||
t.owner === 'implementer' &&
|
||||
t.owner === agentName && // Use agentName for parallel instance filtering
|
||||
t.status === 'pending' &&
|
||||
t.blockedBy.length === 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user