muse-delegate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMuse Delegate
Muse Delegate
You are the orchestrator. This skill lets you hand a bounded coding task to a separate
implementer — Muse Code () — then review what it produced and land it yourself. You write
the brief and own the judgment; Muse does the typing in its own run; you verify and commit.
museexecNothing here is specific to one orchestrating agent. The loop needs only the ability to run a shell
command and read a file, so any agent with those two capabilities can drive it. The full delegate →
review → commit loop has been run with Claude Code as the orchestrator. Other orchestrators remain
unproven.
你是 orchestrator。此 skill 让你将范围明确的编码任务交给独立的 implementer——Muse Code()——然后审查其产出并自行提交落地。你负责编写 brief 并作出判断;Muse 在自己的 run 中负责编码;你负责验证和提交。
museexec这里没有针对某一种编排型 Agent 的特定要求。该循环只需要运行 shell 命令和读取文件的能力,因此任何具备这两项能力的 Agent 都可以驱动它。完整的委派 → 审查 → 提交流程已使用 Claude Code 作为 orchestrator 运行过;其他 orchestrators 尚未得到验证。
When NOT to use this
何时不要使用
- The task is small enough to just do inline — delegation overhead is not worth it.
- The CLI is not installed or not authenticated (run
muse, or setmuse login).META_API_KEY - You want to write the code yourself.
- You are on native Windows and need a supported launcher. Upstream's launcher is Darwin/Linux only; this skill still ships in the Windows contract matrix, but a live Windows dispatch is not a supported Muse install.
muse
- 任务足够小,可以直接 inline 完成——委派开销不值得。
- 未安装 CLI 或尚未认证(运行
muse,或设置muse login)。META_API_KEY - 你想自己编写代码。
- 你使用原生 Windows 且需要受支持的 launcher。上游 launcher 仅支持 Darwin/Linux;此 skill 仍包含在 Windows 支持矩阵中,但在 Windows 上实际调度并不是受支持的 Muse 安装方式。
muse
Read this before the first dispatch: the autonomy model
首次调度前必读:自主权模型
Headless Muse is only. is the interactive TUI and is never invoked.
is rejected; continue a run with (Muse's ).
muse execmuse resume--resume-last--session <id>--session-idWrite runs keep Muse's sandbox on and pass so a headless run cannot hang on a
tool-approval prompt. They also pass and . That is not
and not — do not invent either as the default. loads the
target repo's rules and skills into the implementer run, and nothing in the relay narrows the
implementer's tool set inside the sandbox; the brief is what bounds it to the task.
--disable-approval--trust-workspace--user-input-auto-resolve--yolo--full-access--trust-workspace--read-only--disable-write--disable-shell--provider echo|meta无头模式下 Muse 仅支持 。 是交互式 TUI,绝不会被调用。禁止使用 ;请使用 (Muse 的 )继续运行。
muse execmuse resume--resume-last--session <id>--session-id写入型 run 会保持 Muse 的 sandbox 开启,并传入 ,防止无头运行卡在工具审批提示上。它们还会传入 和 。这并不等同于 或 ——不要将二者杜撰为默认值。 会将目标仓库的规则和 skills 加载到 implementer run 中;relay 不会缩减 implementer 在 sandbox 内的工具集,真正将任务限定在指定范围内的是 brief。
--disable-approval--trust-workspace--user-input-auto-resolve--yolo--full-access--trust-workspace--read-only--disable-write--disable-shell--provider echo|metaPrerequisites (check once)
前置条件(检查一次)
- succeeds. If not, install Muse Code and run
muse --version(or exportmuse login).META_API_KEY - Confirm which is on PATH.
museshows the active launcher. The relay records the version it ran intocommand -v muse.result.json - You are in (or will point at) the target git repository.
--cd
- 执行成功。如果失败,请安装 Muse Code 并运行
muse --version(或导出muse login)。META_API_KEY - 确认 PATH 中使用的是哪个 。
muse会显示当前生效的 launcher。relay 会将其运行的版本记录到command -v muse中。result.json - 你当前位于目标 Git 仓库中,或将通过 指向该仓库。
--cd
Choose the implementer model
选择 implementer 模型
Muse has a configured default model, so a fresh run may omit . Pass or a fleet
that sets one when you need to pin a catalog id. On a resumed run, omit
to keep the session's model. If the human has not named a usable set, ask before guessing
a metered id.
--model--model--lane--session--modelMore depth: references/writing-the-brief.md.
Muse 已配置默认模型,因此全新 run 可以省略 。需要锁定 catalog id 时,传入 ,或使用可设置模型的 fleet 。在恢复 的 run 中,应省略 ,以保持该 session 的模型。如果人员没有指定可用模型集合,请在猜测按量计费 id 之前先询问。
--model--model--lane--session--model更多信息:references/writing-the-brief.md。
The loop
循环
Run these five steps per task. Steps 1, 4, and 5 are your judgment; 2 and 3 are mechanical.
每项任务执行以下五个步骤。步骤 1、4 和 5 需要你作出判断;步骤 2 和 3 则是机械操作。
1. Write the brief
1. 编写 brief
Muse sees only the text you send plus what it can read from the working tree — no chat history,
no shared context. Everything the task needs goes in the brief: the goal, the current state, what to
change, what to leave untouched, the project's actual gate commands (discover them from the repo's
AGENTS.md/CLAUDE.md/Makefile — do not assume), and a report contract. Tell Muse it will not
commit (you will). Keep one task per brief. Full guidance and a template:
references/writing-the-brief.md.
Muse 只能看到你发送的文本以及它能从工作树中读取的内容——没有聊天历史,也没有共享上下文。任务所需的一切都必须包含在 brief 中:目标、当前状态、需要修改的内容、需要保持不变的内容、项目的实际门禁命令(从仓库的 AGENTS.md/CLAUDE.md/Makefile 中发现这些命令——不要臆测),以及报告约定。告知 Muse 它不会提交代码(由你提交)。每份 brief 只处理一项任务。完整指南和模板:
references/writing-the-brief.md。
2. Dispatch
2. 调度
Send the brief to Muse with the bundled helper. It wraps , captures
the run, and writes a structured . ( below is this skill's installed
directory — the folder containing this .)
muse exec --json --prompt-fileresult.json<skill-dir>SKILL.mdbash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo使用内置 helper 将 brief 发送给 Muse。它会封装 、捕获此次 run,并写入结构化的 。(下文的 指的是此 skill 的安装目录,即包含 的文件夹。)
muse exec --json --prompt-fileresult.json<skill-dir>SKILL.mdbash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repooptional model: add --model <id>
optional model: add --model <id>
fleet lane from delegate-setup: add --lane <name> (dials apply; flags still win)
fleet lane from delegate-setup: add --lane <name> (dials apply; flags still win)
reasoning intensity: add --effort none|minimal|low|medium|high|xhigh|max|ultra
reasoning intensity: add --effort none|minimal|low|medium|high|xhigh|max|ultra
read-only (no non-shell writes, no shell): add --read-only
read-only (no non-shell writes, no shell): add --read-only
continue a specific Muse session: add --session <id> (delta brief only; no --resume-last)
continue a specific Muse session: add --session <id> (delta brief only; no --resume-last)
hard time limit (watchdog): add --timeout 2h (default: off; implementation runs routinely need 1-2h)
hard time limit (watchdog): add --timeout 2h (default: off; implementation runs routinely need 1-2h)
see all options: node .../relay.mjs --help
see all options: node .../relay.mjs --help
The helper writes artifacts to a temp dir, so the repo under review stays clean. It **never commits**
— see step 5. Mechanics, flags, and the `result.json` shape:
[references/dispatch-and-poll.md](references/dispatch-and-poll.md).
helper 会将 artifacts 写入临时目录,因此待审查的仓库保持干净。它**从不提交代码**——参见步骤 5。机制、flags 和 `result.json` 结构:
[references/dispatch-and-poll.md](references/dispatch-and-poll.md)。3. Wait for completion
3. 等待完成
The helper blocks until Muse finishes, so back it with whatever your orchestrator offers and resume
when it returns:
- Claude Code: run the Bash call with ; you are notified on completion.
run_in_background: true - Plain shell / other agents: run it in the foreground for short tasks, or background it and poll
the result file. The run is done when exists with a
result.json. (A pre-run usage error — bad args or an empty brief — instead exits with code 2 and writes no result file, so check the exit code too. A missingstatusbinary exits 127 but does write amusewith statusresult.json.muse_unavailableis a usage error: headless resume is--resume-last.)--session <id>
Do not trust progress trackers over reality: a run is finished when is written and the
process has exited. Muse can exit 0 without a event; the relay reports that
as , not . The implementer's full report is the field in
(also printed in full on stdout between the report markers).
result.jsonrun.terminal.completedfailedcompletedfinalMessageresult.jsonhelper 会阻塞直到 Muse 完成,因此应利用 orchestrator 提供的能力将其放到后台执行,并在返回时继续后续流程:
- Claude Code: 使用 运行 Bash 调用;完成后你会收到通知。
run_in_background: true - 普通 shell/其他 Agents: 短任务可在前台运行,也可以放到后台并轮询结果文件。当 存在且包含
result.json时,run 即已完成。(如果运行前发生用法错误,例如参数无效或 brief 为空,则会以代码 2 退出且不会写入结果文件,因此也要检查退出码。缺少statusbinary 时会以 127 退出,但会写入包含muse状态的muse_unavailable。result.json属于用法错误:无头恢复应使用--resume-last。)--session <id>
不要相信进度跟踪器而忽视实际状态:当 已写入且进程已退出时,run 才算完成。Muse 可能在没有 事件的情况下以 0 退出;relay 会将其报告为 ,而不是 。implementer 的完整报告位于 的 字段中(也会在 stdout 的报告标记之间完整打印)。
result.jsonrun.terminal.completedfailedcompletedresult.jsonfinalMessage4. Review — do not trust the self-report
4. 审查——不要相信自我报告
Muse's includes its own final message and any gate claims. Re-verify, don't accept:
result.json- Re-run the project's gates yourself (the test/lint/build commands from step 1). Never take "gates passed" on faith.
- Read the diff against the brief: did Muse do what was asked, nothing more (scope creep) and
nothing less? in the result is your starting point.
touchedFiles - Run the relevant guard skills on the diff if you have them installed (clean-code-guard,
test-guard, etc. from ) — this skill produces the work; those skills judge it.
guard-skills - For schema/migration changes, round-trip them; for removals, grep for dangling references.
Full checklist: references/review-and-land.md.
Muse 的 包含它自己的最终消息和各项门禁声明。请重新验证,不要直接接受:
result.json- 亲自重新运行项目的门禁(步骤 1 中的测试、lint 和构建命令)。绝不要盲目相信“门禁已通过”。
- 对照 brief 阅读 diff:Muse 是否完成了要求的内容,没有超出范围(scope creep),也没有遗漏任何内容?result 中的 是你的起点。
touchedFiles - 如果已安装相关 guard skills,请对 diff 运行这些 skills(来自 的 clean-code-guard、test-guard 等)——此 skill 负责产出工作,而这些 skills 负责评判工作。
guard-skills - 对于 schema 或 migration 变更,执行 round-trip 验证;对于删除操作,使用 grep 搜索悬空引用。
完整检查清单:references/review-and-land.md。
5. Land it
5. 落地
The implementer edits the working tree; the orchestrator commits. Committing should be the act of
the party that verified the work. Only after the gates pass and the diff holds:
- Commit the verified work yourself, with a clear message.
- If it needs changes, send a delta brief with (don't restate the whole task) and review again. There is no headless
--session <id>.--resume-last
implementer 会修改工作树;由 orchestrator 提交。 提交应当由实际验证过工作的一方完成。仅在门禁通过且 diff 经得起审查后执行:
- 使用清晰的消息,亲自提交已验证的工作。
- 如果还需要修改,请使用 发送 delta brief(不要重述整个任务),然后再次审查。无头模式不支持
--session <id>。--resume-last
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 — that is the whole point. Two limits on that
mandate: surface, don't absorb (report Muse's design decisions, defensible-but-unasked turns,
and non-blocking nitpicks rather than silently keeping them) and stop for scope changes (if correct
completion needs going beyond the brief, ask — don't expand the mandate yourself). The full treatment
is in references/review-and-land.md.
委派需要由人员主动选择。一旦人员选择“运行这个队列”或“继续”,提交经过验证且通过门禁的工作便成为双方约定的 contract——这正是该流程的核心所在。这项授权存在两项限制:如实披露,不要默默接受(报告 Muse 的设计决策、合理但未被要求的改动,以及不阻塞流程的小问题,而不是静默保留这些内容),以及遇到范围变更时停止(如果正确完成任务需要超出 brief 的范围,应先询问,不要自行扩大授权)。完整说明见 references/review-and-land.md。
References
参考资料
- references/writing-the-brief.md — how to write a brief Muse can execute blind: structure, XML blocks, the report contract, embedding the real gate commands.
- references/dispatch-and-poll.md — flags, the
relay.mjscontract, backgrounding per orchestrator, and recovery when a run misbehaves.result.json - references/review-and-land.md — the review checklist, the commit
boundary, and the rework cycle via .
--session - references/multi-task-queues.md — running a sequential queue: carrying constraints forward, progress tracking, and the end-of-run coherence check.
- references/writing-the-brief.md——如何编写一份 Muse 能在缺少共享上下文时执行的 brief:结构、XML blocks、报告约定,以及嵌入真实门禁命令。
- references/dispatch-and-poll.md——flags、
relay.mjs约定、针对不同 orchestrator 的后台运行方式,以及 run 异常时的恢复方法。result.json - references/review-and-land.md——审查清单、提交边界,以及通过 进行返工修改的循环。
--session - references/multi-task-queues.md——如何运行顺序任务队列:延续约束、跟踪进度,以及执行结束前的一致性检查。