From agent-flow
This skill should be used when deciding whether to use Agent Teams for parallel execution or sequential subagent orchestration, based on task analysis, independence criteria, and cost-benefit.
npx claudepluginhub josix/agent-flow --plugin agent-flowThis skill uses the workspace's default tool permissions.
The team decision skill guides the choice between parallel Agent Teams execution and sequential subagent orchestration. This skill analyzes task characteristics to determine whether parallel execution is safe, beneficial, and cost-effective.
Automatically analyzes task complexity to decide Subagent vs Agent Teams for parallel code reviews, collaborative debugging, and cross-layer frontend/backend/testing development.
Orchestrates experimental Agent Teams to run parallel CC_GodMode agents as teammates coordinated via SharedTaskList for large features with independent modules. Requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
Share bugs, ideas, or general feedback.
The team decision skill guides the choice between parallel Agent Teams execution and sequential subagent orchestration. This skill analyzes task characteristics to determine whether parallel execution is safe, beneficial, and cost-effective.
Owner Agent: Senku (Planner Agent)
Consumers: Orchestrator (primary decision maker)
Apply team decision analysis when:
| Criterion | Use Teams (Parallel) | Use Sequential |
|---|---|---|
| Task Independence | No shared state or files | Tasks have dependencies |
| File Ownership | Exclusive file sets | Overlapping file sets |
| Parallelism Safety | Safe or Moderate | Risky |
| Number of Tasks | 2-4 independent tasks | 1 task or 5+ tasks |
| Time Sensitivity | High (user waiting) | Low (can afford serial) |
| Coordination Cost | Low (simple merge) | High (complex merge) |
| Risk Tolerance | High (can retry) | Low (must be correct) |
Task Decomposition Available?
|
+-- NO --> Sequential (single agent)
|
+-- YES
|
v
Subtasks Share Files?
|
+-- YES --> Sequential (conflict risk)
|
+-- NO
|
v
Subtasks Have Dependencies?
|
+-- YES --> Sequential (ordering required)
|
+-- NO
|
v
2-4 Subtasks?
|
+-- NO --> Sequential (too few or too many)
|
+-- YES
|
v
Time Savings > Overhead?
|
+-- YES --> TEAMS (Parallel)
|
+-- NO --> Sequential
Tasks that are completely independent and share no resources.
Examples:
Characteristics:
git merge or file concatenationTasks that may share some context but have isolated file ownership.
Examples:
Characteristics:
Mitigation: Assign read-only files to coordinator, exclusive write ownership to teammates
Tasks with high coordination costs or conflict potential.
Examples:
Characteristics:
Decision: Do NOT parallelize - use sequential orchestration
| Overhead Type | Estimated Cost | When Significant |
|---|---|---|
| Team spawn/setup | 5-10 seconds | Always |
| Context duplication | 2-5 seconds per teammate | Large context |
| Result merging | 10-30 seconds | Complex merge |
| Conflict resolution | 60-300 seconds | If conflicts occur |
| Coordination overhead | 5-15 seconds | Always |
Total Overhead: ~30-60 seconds for 2-3 teammates with simple merge
Sequential Time = Task1 + Task2 + Task3
Parallel Time = max(Task1, Task2, Task3) + Overhead
Net Savings = Sequential Time - Parallel Time
Break-Even Analysis:
Rule of Thumb: Parallelize only if each task takes 20+ seconds and tasks are independent
Each teammate in a team MUST have exclusive write ownership of their files.
Valid Assignment:
Teammate 1: src/auth/login.ts, src/auth/login.test.ts
Teammate 2: src/auth/register.ts, src/auth/register.test.ts
Teammate 3: src/auth/logout.ts, src/auth/logout.test.ts
Coordinator: src/auth/types.ts (read-only for teammates)
Invalid Assignment (conflict risk):
Teammate 1: src/auth/auth.ts (lines 1-50)
Teammate 2: src/auth/auth.ts (lines 51-100) ❌ Same file!
When tasks can be partitioned by directory, use directory-level ownership.
Example:
Teammate 1: src/components/Header/*
Teammate 2: src/components/Footer/*
Teammate 3: src/components/Sidebar/*
Benefits:
Common resources (types, utilities, configs) can be read by all teammates but owned by coordinator.
Pattern:
Coordinator owns (may modify):
- src/types/common.ts
- src/utils/helpers.ts
- config/constants.ts
Teammates read (do NOT modify):
- Import types from common.ts
- Use helpers from helpers.ts
- Read constants from constants.ts
For detailed ownership rules, see references/file-ownership-rules.md.
| Team Size | When Appropriate | Coordination Overhead |
|---|---|---|
| 2 teammates | Simple decomposition, clear separation | Low |
| 3 teammates | Moderate complexity, 3-way split | Medium |
| 4 teammates | Complex task, highly parallelizable | High |
| 5+ teammates | Rarely beneficial - overhead dominates | Very High |
Optimal: 2-3 teammates for most parallel tasks
Before deciding to use teams, verify:
If ALL checks pass → Consider Teams
If ANY check fails → Use Sequential Orchestration
## Team vs Sequential Decision
Task: [Brief description]
Decomposition:
- Subtask 1: [description]
- Subtask 2: [description]
- Subtask 3: [description]
Independence Analysis:
- Shared files: [None / List files]
- Dependencies: [None / List dependencies]
- Safety level: [Safe / Moderate / Risky]
Cost-Benefit:
- Sequential time: ~[X] seconds
- Parallel time: ~[Y] seconds (including overhead)
- Net savings: ~[Z] seconds
Decision: [TEAMS / SEQUENTIAL]
Rationale: [1-2 sentence justification]