vibe-delegate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vibe Delegate

Vibe 委托流程

You are the orchestrator. Hand a bounded coding task to a separate implementer — the Mistral Vibe CLI (
vibe
) — then review what it produced and land it yourself. You write the brief and own the judgment; Vibe does the typing in its own session; you verify and commit.
The loop needs only a shell command and file access, so any comparable orchestrator can drive it.
你作为编排者,将一个明确的编码任务交给独立的实现工具——Mistral Vibe CLI(
vibe
),然后审核其产出并自行完成提交。你撰写任务简报并负责判断;Vibe在独立会话中完成代码编写;你进行验证并提交。
这个流程只需要shell命令和文件访问权限,因此任何类似的编排工具都可以驱动它。

When NOT to use this

何时不使用此流程

  • The task is small enough to do inline; delegation overhead is not worth it.
  • The
    vibe
    CLI is not installed or authenticated.
  • 任务小到足以直接完成;委托的开销得不偿失。
  • 未安装或未认证
    vibe
    CLI。

Prerequisites (check once)

前置条件(只需检查一次)

  1. Install
    uv
    , then Mistral Vibe:
    • uv tool install mistral-vibe
  2. Configure your API key with
    vibe --setup
    , or set
    MISTRAL_API_KEY
    in the environment.
  3. Confirm
    vibe --version
    succeeds.
  4. Work in, or point
    --cd
    at, the target git repository.
  1. 安装
    uv
    ,然后安装Mistral Vibe:
    • uv tool install mistral-vibe
  2. 使用
    vibe --setup
    配置你的API密钥,或在环境变量中设置
    MISTRAL_API_KEY
  3. 确认
    vibe --version
    执行成功。
  4. 在目标git仓库中工作,或通过
    --cd
    指定目标git仓库路径。

The loop

流程步骤

Run these five steps per task. Steps 1, 4, and 5 require judgment; 2 and 3 are mechanical.
每个任务执行以下五个步骤。步骤1、4、5需要判断;步骤2和3是机械操作。

1. Write the brief

1. 撰写任务简报

Vibe sees only the text you send plus what it can inspect in the workspace — no chat history or shared context. Include the goal, current state, what to change, what to leave untouched, the project's actual gates, and a report contract. Tell Vibe not to commit. Keep one task per brief. See references/writing-the-brief.md.
Default mode cannot approve most shell commands headlessly, so the orchestrator runs the gates. Ask Vibe to run them only when the human explicitly authorized
--full-access
.
Vibe只能看到你发送的文本以及它在工作区中能检查到的内容——没有聊天历史或共享上下文。请包含目标、当前状态、需要修改的内容、无需改动的内容、项目的实际验证环节,以及报告要求。告知Vibe不要提交。每个任务对应一份简报。详见references/writing-the-brief.md
默认模式无法自动批准大多数shell命令,因此由编排者执行验证环节。仅当人类明确授权
--full-access
时,才让Vibe执行这些环节。

2. Dispatch

2. 分发任务

Use the bundled helper. It wraps Vibe's headless
--prompt
mode, captures the structured event stream, and writes
result.json
. (
<skill-dir>
is the installed folder containing this
SKILL.md
.)
bash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
使用内置的辅助工具。它封装了Vibe的无头
--prompt
模式,捕获结构化事件流并写入
result.json
。(
<skill-dir>
是包含此
SKILL.md
的安装文件夹。)
bash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo

limit turns for cost control: add --max-turns <n>

限制交互轮数以控制成本: add --max-turns <n>

indicative price threshold/token cap: add --max-price <usd> --max-tokens <n>

设置价格阈值/令牌上限: add --max-price <usd> --max-tokens <n>

planning/read-only: add --plan-only

仅规划/只读模式: add --plan-only

unrestricted shell and tools: add --full-access (explicit authorization required)

无限制shell和工具访问: add --full-access (explicit authorization required)

resume the most recent session: add --resume-last (delta brief only)

恢复最近的会话: add --resume-last (delta brief only)

resume a specific session: add --session <id> (delta brief only)

恢复特定会话: add --session <id> (delta brief only)

see all options: node .../relay.mjs --help

查看所有选项: node .../relay.mjs --help


The child process's cwd pins the workspace. The relay writes artifacts under the system temp dir by
default and never commits. See [references/dispatch-and-poll.md](references/dispatch-and-poll.md).

子进程的当前工作目录固定为工作区。默认情况下,中继工具在系统临时目录下写入产物,且从不提交。详见[references/dispatch-and-poll.md](references/dispatch-and-poll.md)。

3. Wait for completion

3. 等待完成

The helper blocks until Vibe finishes. Run it with the orchestrator's background-command facility, or background it in the shell and poll for
result.json
. A pre-run usage error exits 2 and writes no result; a missing
vibe
exits 127 and writes
status: "vibe_unavailable"
. The watchdog writes
status: "timeout"
; terminating the relay on POSIX writes
status: "aborted"
after stopping Vibe's process tree.
Trust process state and the working tree over a progress display. Completion means the process exited and
result.json
exists.
辅助工具会阻塞直到Vibe完成。可以通过编排者的后台命令功能运行它,或者在shell中将其置于后台并轮询
result.json
。预运行时的使用错误会以状态码2退出且不写入结果;若
vibe
不存在则以状态码127退出并写入
status: "vibe_unavailable"
。监控程序会写入
status: "timeout"
;在POSIX系统中终止中继工具会在停止Vibe的进程树后写入
status: "aborted"
优先信任进程状态和工作树,而非进度显示。完成意味着进程已退出且
result.json
已存在。

4. Review — do not trust the self-report

4. 审核——不要信任自我报告

Treat Vibe's final message and gate claims as claims:
  • Re-run the project's gates yourself.
  • Read the diff against the brief, starting with
    touchedFiles
    .
  • Run relevant guard skills if installed.
  • Round-trip migrations and grep for dangling references after removals or renames.
See references/review-and-land.md.
将Vibe的最终消息和验证环节完成声明视为待验证的说法:
  • 自行重新运行项目的验证环节。
  • 根据任务简报阅读差异,从
    touchedFiles
    开始。
  • 若已安装相关防护工具,则运行它们。
  • 在删除或重命名后,往返运行迁移并搜索悬空引用。
详见references/review-and-land.md

5. Land it

5. 完成提交

The implementer edits the working tree; the orchestrator commits. Commit only after the gates pass and the diff holds. If rework is needed, send a delta brief with
--resume-last
or
--session <id>
, then review again.
实现工具会修改工作树;编排者负责提交。仅在验证环节通过且差异符合要求后再提交。若需要返工,使用
--resume-last
--session <id>
发送增量简报,然后再次审核。

Autonomy and permissions

自主性与权限

In
--prompt
mode the relay always sets the agent profile explicitly:
Relay flagWhat Vibe getsUse when
(default)
--agent accept-edits
Normal implementation — built-in file edits are approved
--plan-only
--agent plan
Read-only review, exploration, or planning
--full-access
--agent auto-approve
Explicitly authorized runs that need arbitrary shell/tools
Default mode lets Vibe edit files inside the target worktree. Approval-gated shell commands, including most project gates, are denied headlessly; the orchestrator runs the gates.
--full-access
disables Vibe's tool approvals and permits arbitrary shell/tool execution under the user account; use it only with explicit human authorization. Always inspect
touchedFiles
and the diff after a run.
--trust
is always passed to prevent interactive directory-trust prompts in headless runs. It is not a sandbox and does not grant tool permissions.
--prompt
模式下,中继工具始终显式设置代理配置文件:
中继工具标志Vibe获得的权限使用场景
(默认)
--agent accept-edits
常规实现——内置文件编辑已获批准
--plan-only
--agent plan
只读审核、探索或规划
--full-access
--agent auto-approve
Explicitly authorized runs that need arbitrary shell/tools
默认模式允许Vibe编辑目标工作树内的文件。需要批准的shell命令(包括大多数项目验证环节)在无头模式下会被拒绝;由编排者执行这些环节。
--full-access
会禁用Vibe的工具批准机制,并允许在用户账户下执行任意shell/工具;仅在获得人类明确授权时使用。每次运行后务必检查
touchedFiles
和差异。
--trust
始终会被传递,以防止无头运行中出现交互式目录信任提示。它不是沙箱,也不授予工具权限。

Authorization model

授权模型

Delegation is something the human opts into. Once they have ("run this queue", "proceed"), committing verified, gate-passing work is the agreed contract. Two limits remain: surface, don't absorb (report Vibe's design decisions, defensible-but-unasked turns, and non-blocking nitpicks) and stop for scope changes (if correct completion needs going beyond the brief, ask instead of expanding the mandate). See references/review-and-land.md.
委托是用户主动选择的操作。一旦用户选择(如“处理这个队列”、“继续”),提交经过验证且通过验证环节的工作就是约定的内容。仍有两个限制:透明告知,而非隐瞒(报告Vibe的设计决策、合理但未要求的改动,以及不影响功能的小问题),以及范围变更时停止(若正确完成任务需要超出简报范围,需先询问用户而非自行扩展任务范围)。详见references/review-and-land.md

References

参考资料

  • references/writing-the-brief.md — structure, report contract, real gates, argv delivery, and delta briefs.
  • references/dispatch-and-poll.md — flags, artifacts,
    result.json
    , polling, and failure recovery.
  • references/review-and-land.md — review checklist, commit boundary, and rework through Vibe sessions.
  • references/multi-task-queues.md — sequential queues, constraint carry-forward, progress tracking, and the final coherence pass.
  • references/writing-the-brief.md — 结构、报告要求、实际验证环节、参数传递和增量简报。
  • references/dispatch-and-poll.md — 标志、产物、
    result.json
    、轮询和故障恢复。
  • references/review-and-land.md — 审核清单、提交边界,以及通过Vibe会话进行返工。
  • references/multi-task-queues.md — 顺序队列、约束传递、进度跟踪和最终一致性检查。