devfleet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Claude DevFleet Multi-Agent Orchestration

Claude DevFleet 多 Agent 编排

When to Use

何时使用

Use this skill when you need to dispatch multiple Claude Code agents to work on coding tasks in parallel. Each agent runs in an isolated git worktree with full tooling.
当需要并行调度多个 Claude Code Agent 执行编码任务时,使用此 skill。每个 Agent 都在隔离的 git worktree 中运行,并拥有完整的工具支持。

Setup

设置

The DevFleet server is a separate project, not bundled with ECC. Install and run it from its repository first: https://github.com/LEC-AI/claude-devfleet
Then connect the running instance via MCP:
bash
claude mcp add devfleet --transport http http://localhost:18801/mcp
Before first use, verify the process listening on port 18801 is the DevFleet binary you installed (see SECURITY.md on localhost MCP servers).
DevFleet server 是一个独立项目,不随 ECC 捆绑提供。请先从其仓库安装并运行:https://github.com/LEC-AI/claude-devfleet
然后通过 MCP 连接正在运行的实例:
bash
claude mcp add devfleet --transport http http://localhost:18801/mcp
首次使用前,请验证监听 18801 端口的进程是否为你安装的 DevFleet binary(请参阅 localhost MCP server 的 SECURITY.md)。

How It Works

工作原理

User → "Build a REST API with auth and tests"
  ↓
plan_project(prompt) → project_id + mission DAG
  ↓
Show plan to user → get approval
  ↓
dispatch_mission(M1) → Agent 1 spawns in worktree
  ↓
M1 completes → auto-merge → auto-dispatch M2 (depends_on M1)
  ↓
M2 completes → auto-merge
  ↓
get_report(M2) → files_changed, what_done, errors, next_steps
  ↓
Report back to user
User → "Build a REST API with auth and tests"
  ↓
plan_project(prompt) → project_id + mission DAG
  ↓
Show plan to user → get approval
  ↓
dispatch_mission(M1) → Agent 1 spawns in worktree
  ↓
M1 completes → auto-merge → auto-dispatch M2 (depends_on M1)
  ↓
M2 completes → auto-merge
  ↓
get_report(M2) → files_changed, what_done, errors, next_steps
  ↓
Report back to user

Tools

工具

ToolPurpose
plan_project(prompt)
AI breaks a description into a project with chained missions
create_project(name, path?, description?)
Create a project manually, returns
project_id
create_mission(project_id, title, prompt, depends_on?, auto_dispatch?)
Add a mission.
depends_on
is a list of mission ID strings (e.g.,
["abc-123"]
). Set
auto_dispatch=true
to auto-start when deps are met.
dispatch_mission(mission_id, model?, max_turns?)
Start an agent on a mission
cancel_mission(mission_id)
Stop a running agent
wait_for_mission(mission_id, timeout_seconds?)
Block until a mission completes (see note below)
get_mission_status(mission_id)
Check mission progress without blocking
get_report(mission_id)
Read structured report (files changed, tested, errors, next steps)
get_dashboard()
System overview: running agents, stats, recent activity
list_projects()
Browse all projects
list_missions(project_id, status?)
List missions in a project
Note on
wait_for_mission
:
This blocks the conversation for up to
timeout_seconds
(default 600). For long-running missions, prefer polling with
get_mission_status
every 30–60 seconds instead, so the user sees progress updates.
工具用途
plan_project(prompt)
AI 将描述拆解为一个包含链式 mission 的项目
create_project(name, path?, description?)
手动创建项目,返回
project_id
create_mission(project_id, title, prompt, depends_on?, auto_dispatch?)
添加一个 mission。
depends_on
是一个包含 mission ID 字符串的列表(例如
["abc-123"]
)。设置
auto_dispatch=true
后,将在依赖满足时自动启动。
dispatch_mission(mission_id, model?, max_turns?)
启动 Agent 执行 mission
cancel_mission(mission_id)
停止正在运行的 Agent
wait_for_mission(mission_id, timeout_seconds?)
阻塞至 mission 完成(参见下方说明)
get_mission_status(mission_id)
无需阻塞即可检查 mission 进度
get_report(mission_id)
读取结构化报告(已更改文件、测试结果、错误和后续步骤)
get_dashboard()
系统概览:运行中的 Agent、统计数据和近期活动
list_projects()
浏览所有项目
list_missions(project_id, status?)
列出项目中的 mission
关于
wait_for_mission
的说明:
该调用最多会阻塞对话
timeout_seconds
秒(默认 600)。对于长时间运行的 mission,建议改为每 30–60 秒轮询一次
get_mission_status
,以便用户能够看到进度更新。

Workflow: Plan → Dispatch → Monitor → Report

工作流:规划 → 调度 → 监控 → 报告

  1. Plan: Call
    plan_project(prompt="...")
    → returns
    project_id
    + list of missions with
    depends_on
    chains and
    auto_dispatch=true
    .
  2. Show plan: Present mission titles, types, and dependency chain to the user.
  3. Dispatch: Call
    dispatch_mission(mission_id=<first_mission_id>)
    on the root mission (empty
    depends_on
    ). Remaining missions auto-dispatch as their dependencies complete (because
    plan_project
    sets
    auto_dispatch=true
    on them).
  4. Monitor: Call
    get_mission_status(mission_id=...)
    or
    get_dashboard()
    to check progress.
  5. Report: Call
    get_report(mission_id=...)
    when missions complete. Share highlights with the user.
  1. 规划:调用
    plan_project(prompt="...")
    → 返回
    project_id
    和 mission 列表,其中包含
    depends_on
    依赖链,并设置
    auto_dispatch=true
    。
  2. 展示计划:向用户展示 mission 标题、类型和依赖链。
  3. 调度:在根 mission(
    depends_on
    为空)上调用
    dispatch_mission(mission_id=<first_mission_id>)
    。其余 mission 会在依赖完成后自动调度,因为
    plan_project
    为它们设置了
    auto_dispatch=true
    。
  4. 监控:调用
    get_mission_status(mission_id=...)
    或
    get_dashboard()
    检查进度。
  5. 报告:mission 完成后调用
    get_report(mission_id=...)
    。向用户分享重点内容。

Concurrency

并发

DevFleet runs up to 3 concurrent agents by default (configurable via
DEVFLEET_MAX_AGENTS
). When all slots are full, missions with
auto_dispatch=true
queue in the mission watcher and dispatch automatically as slots free up. Check
get_dashboard()
for current slot usage.
DevFleet 默认最多运行 3 个并发 Agent,可通过
DEVFLEET_MAX_AGENTS
配置。当所有名额均被占用时,设置了
auto_dispatch=true
的 mission 会在 mission watcher 中排队,并在名额释放后自动调度。调用
get_dashboard()
查看当前名额使用情况。

Examples

示例

Full auto: plan and launch

全自动:规划并启动

  1. plan_project(prompt="...")
    → shows plan with missions and dependencies.
  2. Dispatch the first mission (the one with empty
    depends_on
    ).
  3. Remaining missions auto-dispatch as dependencies resolve (they have
    auto_dispatch=true
    ).
  4. Report back with project ID and mission count so the user knows what was launched.
  5. Poll with
    get_mission_status
    or
    get_dashboard()
    periodically until all missions reach a terminal state (
    completed
    ,
    failed
    , or
    cancelled
    ).
  6. get_report(mission_id=...)
    for each terminal mission — summarize successes and call out failures with errors and next steps.
  1. plan_project(prompt="...")
    → 展示包含 mission 和依赖关系的计划。
  2. 调度第一个 mission,即
    depends_on
    为空的 mission。
  3. 其余 mission 会在依赖关系解决后自动调度(它们已设置
    auto_dispatch=true
    )。
  4. 报告项目 ID 和 mission 数量,让用户了解已启动的内容。
  5. 定期使用
    get_mission_status
    或
    get_dashboard()
    轮询,直至所有 mission 达到终止状态(
    completed
    、
    failed
    或
    cancelled
    )。
  6. 对每个进入终止状态的 mission 调用
    get_report(mission_id=...)
    ——总结成功内容,并指出失败项及其错误和后续步骤。

Manual: step-by-step control

手动:逐步控制

  1. create_project(name="My Project")
    → returns
    project_id
    .
  2. create_mission(project_id=project_id, title="...", prompt="...", auto_dispatch=true)
    for the first (root) mission → capture
    root_mission_id
    .
    create_mission(project_id=project_id, title="...", prompt="...", auto_dispatch=true, depends_on=["<root_mission_id>"])
    for each subsequent task.
  3. dispatch_mission(mission_id=...)
    on the first mission to start the chain.
  4. get_report(mission_id=...)
    when done.
  1. create_project(name="My Project")
    → 返回
    project_id
    。
  2. 为第一个(根)mission 调用
    create_mission(project_id=project_id, title="...", prompt="...", auto_dispatch=true)
    → 获取
    root_mission_id
    。 为每个后续任务调用
    create_mission(project_id=project_id, title="...", prompt="...", auto_dispatch=true, depends_on=["<root_mission_id>"])
    。
  3. 在第一个 mission 上调用
    dispatch_mission(mission_id=...)
    ,启动任务链。
  4. 完成后调用
    get_report(mission_id=...)
    。

Sequential with review

顺序执行并审查

  1. create_project(name="...")
    → get
    project_id
    .
  2. create_mission(project_id=project_id, title="Implement feature", prompt="...")
    → get
    impl_mission_id
    .
  3. dispatch_mission(mission_id=impl_mission_id)
    , then poll with
    get_mission_status
    until complete.
  4. get_report(mission_id=impl_mission_id)
    to review results.
  5. create_mission(project_id=project_id, title="Review", prompt="...", depends_on=[impl_mission_id], auto_dispatch=true)
    — auto-starts since the dependency is already met.
  1. create_project(name="...")
    → 获取
    project_id
    。
  2. create_mission(project_id=project_id, title="Implement feature", prompt="...")
    → 获取
    impl_mission_id
    。
  3. 调用
    dispatch_mission(mission_id=impl_mission_id)
    ,然后轮询
    get_mission_status
    直至完成。
  4. 调用
    get_report(mission_id=impl_mission_id)
    审查结果。
  5. create_mission(project_id=project_id, title="Review", prompt="...", depends_on=[impl_mission_id], auto_dispatch=true)
    ——由于依赖已满足,因此会自动启动。

Guidelines

准则

  • Always confirm the plan with the user before dispatching, unless they said to go ahead.
  • Include mission titles and IDs when reporting status.
  • If a mission fails, read its report before retrying.
  • Check
    get_dashboard()
    for agent slot availability before bulk dispatching.
  • Mission dependencies form a DAG — do not create circular dependencies.
  • Each agent runs in an isolated git worktree and auto-merges on completion. If a merge conflict occurs, the changes remain on the agent's worktree branch for manual resolution.
  • When manually creating missions, always set
    auto_dispatch=true
    if you want them to trigger automatically when dependencies complete. Without this flag, missions stay in
    draft
    status.
  • 除非用户已明确同意执行,否则调度前始终与用户确认计划。
  • 报告状态时包含 mission 标题和 ID。
  • 如果 mission 失败,先读取其报告再重试。
  • 批量调度前,调用
    get_dashboard()
    确认 Agent 槽位是否可用。
  • Mission 依赖构成 DAG——不要创建循环依赖。
  • 每个 Agent 都在隔离的 git worktree 中运行,并在完成后自动合并。如果发生合并冲突,更改会保留在 Agent 的 worktree 分支上,以便手动解决。
  • 手动创建 mission 时,如果希望其在依赖完成后自动触发,请始终设置
    auto_dispatch=true
    。未设置此标志时,mission 将保持
    draft
    状态。