task-coordination-strategies
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTask Coordination Strategies
任务协调策略
Strategies for decomposing complex tasks into parallelizable units, designing dependency graphs, writing effective task descriptions, and monitoring workload across agent teams.
将复杂任务分解为可并行处理的单元、设计依赖关系图、撰写有效的任务描述,以及监控Agent团队间工作负载的策略。
When to Use This Skill
何时使用此技能
- Breaking down a complex task for parallel execution
- Designing task dependency relationships (blockedBy/blocks)
- Writing task descriptions with clear acceptance criteria
- Monitoring and rebalancing workload across teammates
- Identifying the critical path in a multi-task workflow
- 将复杂任务拆分为可并行执行的模块
- 设计任务依赖关系(blockedBy/blocks)
- 撰写包含明确验收标准的任务描述
- 监控并重新平衡团队成员的工作负载
- 识别多任务工作流中的关键路径
Task Decomposition Strategies
任务分解策略
By Layer
按层级拆分
Split work by architectural layer:
- Frontend components
- Backend API endpoints
- Database migrations/models
- Test suites
Best for: Full-stack features, vertical slices
按架构层级拆分工作:
- 前端组件
- 后端API端点
- 数据库迁移/模型
- 测试套件
最适用于:全栈功能、垂直切片开发
By Component
按组件拆分
Split work by functional component:
- Authentication module
- User profile module
- Notification module
Best for: Microservices, modular architectures
按功能组件拆分工作:
- 认证模块
- 用户资料模块
- 通知模块
最适用于:微服务、模块化架构
By Concern
按关注点拆分
Split work by cross-cutting concern:
- Security review
- Performance review
- Architecture review
Best for: Code reviews, audits
按横切关注点拆分工作:
- 安全审查
- 性能审查
- 架构审查
最适用于:代码审查、审计
By File Ownership
按文件所有权拆分
Split work by file/directory boundaries:
- — Implementer 1
src/components/ - — Implementer 2
src/api/ - — Implementer 3
src/utils/
Best for: Parallel implementation, conflict avoidance
按文件/目录边界拆分工作:
- — 开发者1
src/components/ - — 开发者2
src/api/ - — 开发者3
src/utils/
最适用于:并行开发、避免冲突
Dependency Graph Design
依赖关系图设计
Principles
原则
- Minimize chain depth — Prefer wide, shallow graphs over deep chains
- Identify the critical path — The longest chain determines minimum completion time
- Use blockedBy sparingly — Only add dependencies that are truly required
- Avoid circular dependencies — Task A blocks B blocks A is a deadlock
- 最小化链深度 — 优先选择宽而浅的图,而非深链
- 识别关键路径 — 最长的任务链决定最短完成时间
- 谨慎使用blockedBy — 仅添加真正必要的依赖
- 避免循环依赖 — 任务A阻塞B,B又阻塞A会导致死锁
Patterns
模式
Independent (Best parallelism):
Task A ─┐
Task B ─┼─→ Integration
Task C ─┘Sequential (Necessary dependencies):
Task A → Task B → Task CDiamond (Mixed):
┌→ Task B ─┐
Task A ─┤ ├→ Task D
└→ Task C ─┘独立型(最佳并行性):
Task A ─┐
Task B ─┼─→ Integration
Task C ─┘顺序型(必要依赖):
Task A → Task B → Task C钻石型(混合模式):
┌→ Task B ─┐
Task A ─┤ ├→ Task D
└→ Task C ─┘Using blockedBy/blocks
使用blockedBy/blocks
TaskCreate: { subject: "Build API endpoints" } → Task #1
TaskCreate: { subject: "Build frontend components" } → Task #2
TaskCreate: { subject: "Integration testing" } → Task #3
TaskUpdate: { taskId: "3", addBlockedBy: ["1", "2"] } → #3 waits for #1 and #2TaskCreate: { subject: "Build API endpoints" } → Task #1
TaskCreate: { subject: "Build frontend components" } → Task #2
TaskCreate: { subject: "Integration testing" } → Task #3
TaskUpdate: { taskId: "3", addBlockedBy: ["1", "2"] } → #3 waits for #1 and #2Task Description Best Practices
任务描述最佳实践
Every task should include:
- Objective — What needs to be accomplished (1-2 sentences)
- Owned Files — Explicit list of files/directories this teammate may modify
- Requirements — Specific deliverables or behaviors expected
- Interface Contracts — How this work connects to other teammates' work
- Acceptance Criteria — How to verify the task is done correctly
- Scope Boundaries — What is explicitly out of scope
每个任务应包含:
- 目标 — 需要完成的内容(1-2句话)
- 负责文件 — 明确列出该团队成员可能修改的文件/目录
- 需求 — 具体的交付成果或预期行为
- 接口契约 — 此项工作与其他团队成员工作的衔接方式
- 验收标准 — 如何验证任务已正确完成
- 范围边界 — 明确排除在范围外的内容
Template
模板
undefinedundefinedObjective
Objective
Build the user authentication API endpoints.
Build the user authentication API endpoints.
Owned Files
Owned Files
- src/api/auth.ts
- src/api/middleware/auth-middleware.ts
- src/types/auth.ts (shared — read only, do not modify)
- src/api/auth.ts
- src/api/middleware/auth-middleware.ts
- src/types/auth.ts (shared — read only, do not modify)
Requirements
Requirements
- POST /api/login — accepts email/password, returns JWT
- POST /api/register — creates new user, returns JWT
- GET /api/me — returns current user profile (requires auth)
- POST /api/login — accepts email/password, returns JWT
- POST /api/register — creates new user, returns JWT
- GET /api/me — returns current user profile (requires auth)
Interface Contract
Interface Contract
- Import User type from src/types/auth.ts (owned by implementer-1)
- Export AuthResponse type for frontend consumption
- Import User type from src/types/auth.ts (owned by implementer-1)
- Export AuthResponse type for frontend consumption
Acceptance Criteria
Acceptance Criteria
- All endpoints return proper HTTP status codes
- JWT tokens expire after 24 hours
- Passwords are hashed with bcrypt
- All endpoints return proper HTTP status codes
- JWT tokens expire after 24 hours
- Passwords are hashed with bcrypt
Out of Scope
Out of Scope
- OAuth/social login
- Password reset flow
- Rate limiting
undefined- OAuth/social login
- Password reset flow
- Rate limiting
undefinedWorkload Monitoring
工作负载监控
Indicators of Imbalance
失衡指标
| Signal | Meaning | Action |
|---|---|---|
| Teammate idle, others busy | Uneven distribution | Reassign pending tasks |
| Teammate stuck on one task | Possible blocker | Check in, offer help |
| All tasks blocked | Dependency issue | Resolve critical path first |
| One teammate has 3x others | Overloaded | Split tasks or reassign |
| 信号 | 含义 | 行动 |
|---|---|---|
| 团队成员空闲,其他人忙碌 | 分配不均 | 重新分配待处理任务 |
| 团队成员卡在某一任务上 | 可能存在阻塞点 | 跟进情况,提供帮助 |
| 所有任务均被阻塞 | 依赖关系问题 | 优先解决关键路径问题 |
| 某团队成员任务量是他人3倍 | 负载过重 | 拆分任务或重新分配 |
Rebalancing Steps
重新平衡步骤
- Call to assess current state
TaskList - Identify idle or overloaded teammates
- Use to reassign tasks
TaskUpdate - Use to notify affected teammates
SendMessage - Monitor for improved throughput
- 调用评估当前状态
TaskList - 识别空闲或负载过重的团队成员
- 使用重新分配任务
TaskUpdate - 使用通知受影响的团队成员
SendMessage - 监控吞吐量是否提升