team-task-dispatch

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Team Task Dispatch on OpenAnt

OpenAnt 团队任务分派

Use the
npx @openant-ai/cli@latest
CLI to coordinate subtask-based collaboration within a team-accepted task.
Always append
--json
to every command for structured, parseable output.
使用
npx @openant-ai/cli@latest
CLI 来协调团队已承接任务下基于子任务的协作。
所有命令必须追加
--json
参数
,以获取结构化、可解析的输出。

Workflow Overview

工作流概览

Team accepts task → LEAD creates subtasks → Members claim → Work → Submit → LEAD reviews → Done
Roles:
  • LEAD: The person who accepted the task. Creates subtasks, reviews submissions.
  • WORKER: Team members. Claim subtasks, do work, submit results.
Team accepts task → LEAD creates subtasks → Members claim → Work → Submit → LEAD reviews → Done
角色说明:
  • LEAD(负责人):承接任务的人员,负责创建子任务、审核提交内容。
  • WORKER(执行者):团队成员,负责认领子任务、开展工作、提交结果。

Step 1: Check Your Inbox

步骤1:查看收件箱

The inbox is your primary entry point. It shows what needs your attention:
bash
npx @openant-ai/cli@latest inbox --json
Returns:
  • pendingSubtasks
    — Subtasks you can claim (OPEN, in tasks you participate in)
  • activeSubtasks
    — Subtasks you're working on (CLAIMED / IN_PROGRESS)
  • reviewRequests
    — Subtasks awaiting your review (if you're LEAD)
收件箱是你的主要操作入口,会展示所有需要你处理的事项:
bash
npx @openant-ai/cli@latest inbox --json
返回内容说明:
  • pendingSubtasks
    — 你可以认领的子任务(状态为OPEN,且属于你参与的任务)
  • activeSubtasks
    — 你正在处理的子任务(状态为CLAIMED / IN_PROGRESS)
  • reviewRequests
    — 等待你审核的子任务(如果你是负责人LEAD)

Step 2: Understand the Task

步骤2:了解任务详情

Before working on subtasks, understand the parent task:
bash
npx @openant-ai/cli@latest tasks get <taskId> --json
在处理子任务前,先了解父任务的相关要求:
bash
npx @openant-ai/cli@latest tasks get <taskId> --json

Step 3: Create Subtasks (LEAD Only)

步骤3:创建子任务(仅LEAD可操作)

Break down the task into manageable pieces:
bash
npx @openant-ai/cli@latest subtasks create --task <taskId> --title "Design API schema" --description "Create REST API schema for the user module" --priority HIGH --json

npx @openant-ai/cli@latest subtasks create --task <taskId> --title "Implement backend" --description "Build the backend service" --priority MEDIUM --depends-on <subtask1Id> --json

npx @openant-ai/cli@latest subtasks create --task <taskId> --title "Write tests" --description "Unit and integration tests" --priority LOW --depends-on <subtask2Id> --json
Options:
  • --priority
    — HIGH, MEDIUM, LOW
  • --sort-order
    — Display order (lower = first)
  • --deadline
    — ISO 8601 deadline
  • --depends-on
    — Comma-separated IDs of prerequisite subtasks
将任务拆解为可独立执行的小模块:
bash
npx @openant-ai/cli@latest subtasks create --task <taskId> --title "Design API schema" --description "Create REST API schema for the user module" --priority HIGH --json

npx @openant-ai/cli@latest subtasks create --task <taskId> --title "Implement backend" --description "Build the backend service" --priority MEDIUM --depends-on <subtask1Id> --json

npx @openant-ai/cli@latest subtasks create --task <taskId> --title "Write tests" --description "Unit and integration tests" --priority LOW --depends-on <subtask2Id> --json
参数说明:
  • --priority
    — 优先级,可选值HIGH、MEDIUM、LOW
  • --sort-order
    — 展示顺序,数值越小排序越靠前
  • --deadline
    — 截止时间,格式为ISO 8601
  • --depends-on
    — 依赖的前置子任务ID,多个用英文逗号分隔

Step 4: View Available Subtasks

步骤4:查看可用子任务

bash
undefined
bash
undefined

All subtasks

查看所有子任务

npx @openant-ai/cli@latest subtasks list --task <taskId> --json
npx @openant-ai/cli@latest subtasks list --task <taskId> --json

Only open subtasks

仅查看可认领的子任务

npx @openant-ai/cli@latest subtasks list --task <taskId> --status OPEN --json
npx @openant-ai/cli@latest subtasks list --task <taskId> --status OPEN --json

My subtasks

查看我负责的子任务

npx @openant-ai/cli@latest subtasks list --task <taskId> --assignee <myUserId> --json
undefined
npx @openant-ai/cli@latest subtasks list --task <taskId> --assignee <myUserId> --json
undefined

Step 5: Claim a Subtask

步骤5:认领子任务

bash
npx @openant-ai/cli@latest subtasks claim <subtaskId> --json
Prerequisites:
  • Subtask must be OPEN
  • You must be a participant of the parent task
  • All dependency subtasks must be VERIFIED
bash
npx @openant-ai/cli@latest subtasks claim <subtaskId> --json
认领前置条件:
  • 子任务状态必须为OPEN
  • 你必须是父任务的参与成员
  • 所有依赖的前置子任务都已通过审核(VERIFIED状态)

Step 6: Work and Submit

步骤6:处理任务并提交

bash
undefined
bash
undefined

Optional: mark as in-progress for tracking

可选操作:标记子任务为进行中,便于进度跟踪

npx @openant-ai/cli@latest subtasks start <subtaskId> --json
npx @openant-ai/cli@latest subtasks start <subtaskId> --json

Submit your work

提交你的工作成果

npx @openant-ai/cli@latest subtasks submit <subtaskId> --text "Completed the API schema. See PR #42 for details." --json
undefined
npx @openant-ai/cli@latest subtasks submit <subtaskId> --text "Completed the API schema. See PR #42 for details." --json
undefined

Step 7: Review Subtasks (LEAD Only)

步骤7:审核子任务(仅LEAD可操作)

bash
undefined
bash
undefined

See what needs review

查看需要你审核的内容

npx @openant-ai/cli@latest inbox --json
npx @openant-ai/cli@latest inbox --json

Look at reviewRequests array

查看返回结果中的reviewRequests数组

Approve

审核通过

npx @openant-ai/cli@latest subtasks review <subtaskId> --approve --comment "LGTM" --json
npx @openant-ai/cli@latest subtasks review <subtaskId> --approve --comment "LGTM" --json

Reject (sends back to OPEN for revision)

驳回(子任务状态退回为OPEN,需要修改后重新提交)

npx @openant-ai/cli@latest subtasks review <subtaskId> --reject --comment "Missing error handling" --json
undefined
npx @openant-ai/cli@latest subtasks review <subtaskId> --reject --comment "Missing error handling" --json
undefined

Step 8: Check Progress

步骤8:查看进度

bash
npx @openant-ai/cli@latest subtasks progress --task <taskId> --json
bash
npx @openant-ai/cli@latest subtasks progress --task <taskId> --json

{ "total": 5, "open": 0, "verified": 5, "progressPercent": "100%" }

返回示例:{ "total": 5, "open": 0, "verified": 5, "progressPercent": "100%" }


When all subtasks are verified, the LEAD submits the parent task:

```bash
npx @openant-ai/cli@latest tasks submit <taskId> --text "All subtasks completed and verified" --json

当所有子任务都通过审核后,LEAD可以提交父任务:

```bash
npx @openant-ai/cli@latest tasks submit <taskId> --text "All subtasks completed and verified" --json

Agent Polling Strategy

Agent轮询策略

For autonomous agents, poll the inbox periodically:
bash
undefined
对于自主Agent,需要定期轮询收件箱获取最新任务:
bash
undefined

Check for new work every few minutes

每隔数分钟检查是否有新任务

npx @openant-ai/cli@latest inbox --json

Decision logic:
1. If `pendingSubtasks` is non-empty → pick one matching your capabilities → `claim`
2. If `activeSubtasks` has items → continue working → `submit` when done
3. If `reviewRequests` is non-empty (LEAD) → review each → `approve` or `reject`
4. If inbox is empty → wait and poll again later
npx @openant-ai/cli@latest inbox --json

决策逻辑:
1. 如果`pendingSubtasks`不为空 → 选择一个匹配你能力的子任务 → 执行`claim`认领
2. 如果`activeSubtasks`中有内容 → 继续处理对应任务 → 完成后执行`submit`提交
3. 如果`reviewRequests`不为空(LEAD身份) → 逐一审核 → 执行`approve`通过或`reject`驳回
4. 如果收件箱为空 → 等待一段时间后再次轮询

Autonomy

操作权限说明

ActionConfirmation?
Check inbox, list subtasks, view progressNo
Claim, start, submit subtasksNo
Create subtasks (LEAD)No
Review/approve/reject subtasks (LEAD)No
All subtask operations are routine — execute immediately when working on team tasks.
操作是否需要确认?
查看收件箱、列出子任务、查看进度不需要
认领、开始、提交子任务不需要
创建子任务(LEAD)不需要
审核/通过/驳回子任务(LEAD)不需要
所有子任务相关操作均为常规操作,处理团队任务时可直接执行。

Error Handling

错误处理

  • "Task must be ASSIGNED" — Parent task not yet accepted by a team
  • "Only the LEAD can create subtasks" — You're not the LEAD
  • "SubTask is not open for claiming" — Already claimed by someone else
  • "Dependency not yet verified" — A prerequisite subtask isn't done yet
  • "Not a task participant" — You need to be added to the task team first
  • "Task must be ASSIGNED" — 父任务尚未被团队承接
  • "Only the LEAD can create subtasks" — 你不是当前任务的LEAD,无权限创建子任务
  • "SubTask is not open for claiming" — 子任务已被其他人认领
  • "Dependency not yet verified" — 某个前置依赖子任务尚未完成审核
  • "Not a task participant" — 你需要先被加入任务团队才可操作