omp-delegate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOh My Pi Delegate
Oh My Pi 任务委托
You are the orchestrator. Delegate a bounded coding task to a separate implementer - Oh My
Pi () - then review what it produced and land it yourself. You write the brief and own the
judgment; the implementer makes changes in its own session; you verify and commit.
ompThe loop needs only a shell command and file access, so any comparable orchestrator can drive it.
你作为协调者,将一个边界明确的编码任务委托给独立的实现工具——Oh My Pi(),之后审核其产出并自行完成提交。你编写任务简报并负责判断;实现工具在独立会话中进行修改;你负责验证并提交。
omp该流程仅需Shell命令和文件访问权限,因此任何类似的协调工具都可以驱动它。
The binary is omp
, not pi
omppi二进制工具是omp
,而非pi
omppiOh My Pi is a fork of Pi. This skill drives (). The original
Pi CLI is a different binary () with a different skill (). If is missing but
is installed, you have Pi, not Oh My Pi.
omp@oh-my-pi/pi-coding-agentpipi-delegateomppiOh My Pi是Pi的分支版本。此技能驱动的是****()。原始Pi CLI是另一个不同的二进制工具(),对应不同的技能()。如果未安装但已安装,说明你使用的是Pi,而非Oh My Pi。
omp@oh-my-pi/pi-coding-agentpipi-delegateomppiWhen NOT to use this
请勿使用此技能的场景
- The task is small enough to do inline; delegation overhead is not worth it.
- The CLI is not installed or authenticated.
omp - The user asked for the original Pi CLI () — use
pi.pi-delegate - You need a sandboxed implementer. Oh My Pi has no sandbox. restricts the tool surface; a write-capable run executes without prompts (
--read-only).--yolo
- 任务小到可以直接完成;委托的开销得不偿失。
- CLI未安装或未完成身份验证。
omp - 用户要求使用原始Pi CLI()——请使用
pi。pi-delegate - 你需要沙箱化的实现工具。Oh My Pi没有沙箱。参数会限制工具可用范围;允许写入的运行会无提示执行(
--read-only参数)。--yolo
Prerequisites (check once)
前置条件(只需检查一次)
- Install omp with (or the install path from https://omp.sh).
bun install -g @oh-my-pi/pi-coding-agent - Authenticate: inside omp for a subscription provider, or an API-key environment variable for an API-key provider. Credentials live under
/login.~/.omp/ - Confirm succeeds.
omp --version - Work in, or point at, the target git repository.
--cd
- 使用安装omp(或从https://omp.sh获取安装路径)。
bun install -g @oh-my-pi/pi-coding-agent - 身份验证:在omp内执行以使用订阅提供商,或设置API密钥环境变量以使用API密钥提供商。凭据存储在
/login目录下。~/.omp/ - 确认命令执行成功。
omp --version - 在目标Git仓库中工作,或使用参数指定目标Git仓库路径。
--cd
Choose the model (optional)
选择模型(可选)
Omit (and ) to use omp's configured default for this project / profile. The
catalog is this install's authenticated providers — not a fixed list in this skill.
--model--providerTo pick another model:
- List what this install can actually run. Do not pass — that flag is gone and omp treats it as an unknown flag (exit 2). Use the
omp --list-modelssubcommand:models- — every available model, grouped by provider
omp models - — the same catalog, machine-readable
omp models --json - — filter by provider, id, or name (example:
omp models find <substring>)omp models find sonnet - — one provider's models
omp models <provider>
- Pass that id to the relay. is omp's own
--model <pattern>: a fuzzy match against the catalog (provider/id, a bare id, or a unique substring).--modelpins the provider when the pattern is ambiguous.--provider <name> - The relay forwards only letters, digits, and . Glob patterns with
. _ : / -are rejected.*
--thinking <level>offautominimallowmediumhighxhighmaxinheritA fleet lane () can set , , and . Lane becomes
; an explicit / / flag wins over the lane.
--laneprovidermodelefforteffort--thinking--thinking--model--providerThe relay does not forward , , , or . Those stay omp's own CLI.
--api-key--smol--slow--plan省略(和)参数将使用omp为当前项目/配置文件设置的默认模型。模型目录是当前安装已认证的提供商列表——并非此技能中的固定列表。
--model--provider如需选择其他模型:
- 查看当前安装可实际运行的模型。请勿执行——该参数已移除,omp会将其视为未知参数(退出码2)。请使用
omp --list-models子命令:models- ——按提供商分组显示所有可用模型
omp models - ——以机器可读的JSON格式显示相同的模型目录
omp models --json - ——按提供商、ID或名称过滤模型(示例:
omp models find <substring>)omp models find sonnet - ——显示指定提供商的所有模型
omp models <provider>
- 将模型ID传递给中继工具。是omp自身的
--model <pattern>参数:对模型目录进行模糊匹配(提供商/ID、纯ID或唯一子字符串)。当匹配模式存在歧义时,使用--model参数锁定提供商。--provider <name> - 中继工具仅转发字母、数字以及字符。包含
. _ : / -的通配符模式会被拒绝。*
--thinking <level>offautominimallowmediumhighxhighmaxinherit集群通道()可以设置、和参数。通道的参数会映射为;显式设置的//参数优先级高于通道设置。
--laneprovidermodelefforteffort--thinking--thinking--model--provider中继工具不会转发、、或参数。这些参数属于omp自身的CLI参数。
--api-key--smol--slow--planThe 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. 编写任务简报
Oh My Pi 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 omp not to commit. Keep one task per brief.
omp auto-loads / context files from the workspace and its parents, so repo
instructions reach it without inlining. See
references/writing-the-brief.md.
AGENTS.mdCLAUDE.mdOh My Pi只能看到你发送的文本以及它在工作区中可检查的内容——没有聊天历史或共享上下文。简报需包含目标、当前状态、需要修改的内容、需要保留的内容、项目的实际准入标准以及报告约定。告知omp不要提交。每个简报对应一个任务。omp会自动加载工作区及其父目录中的/上下文文件,因此仓库中的说明无需内联到简报中。详情请查看references/writing-the-brief.md。
AGENTS.mdCLAUDE.md2. Dispatch
2. 调度任务
Use the bundled relay. It pipes the brief to on stdin, captures the JSON event
stream, and writes . ( is the installed folder containing this
.)
omp --mode jsonresult.json<skill-dir>SKILL.mdbash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo使用内置的中继工具。它会将简报通过标准输入传递给,捕获JSON事件流并写入文件。(是包含此文件的技能安装目录。)
omp --mode jsonresult.json<skill-dir>SKILL.mdbash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repolist models first: omp models (or: omp models --json)
先列出模型: omp models (或: omp models --json)
choose a model: add --model <id from omp models>
选择模型: 添加 --model <omp models中获取的ID>
choose a provider: add --provider <name>
选择提供商: 添加 --provider <名称>
set thinking level: add --thinking high
设置推理级别: 添加 --thinking high
read-only run (review/diagnosis): add --read-only
只读运行(审核/诊断): 添加 --read-only
trust project .omp resources: add --approve
信任项目的.omp资源: 添加 --approve
resume the most recent session: add --resume-last (delta brief only)
恢复最近的会话: 添加 --resume-last (仅需增量简报)
resume a specific session: add --session <id> (delta brief only)
恢复指定会话: 添加 --session <id> (仅需增量简报)
hard time limit (watchdog): add --timeout 2h (the 30m default suits short runs; implementation briefs routinely need 1-2h)
硬超时限制(监控): 添加 --timeout 2h (默认30分钟适合短任务;实现类简报通常需要1-2小时)
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 relay blocks until omp finishes. Run it with the orchestrator's background-command facility,
or background it in the shell and poll for . A pre-run usage error exits 2 and writes
no result; a missing exits 127 and writes .
result.jsonompstatus: "omp_unavailable"Trust process state and the working tree over a progress display. Completion means the process
exited and exists. omp's full report is the field in
(also printed in full on stdout between the report markers).
result.jsonfinalMessageresult.json中继工具会阻塞直到omp完成任务。可以使用协调工具的后台命令功能运行它,或者在Shell中将其后台运行并轮询文件。预运行时的使用错误会以退出码2结束且不会生成结果;若未找到则会以退出码127结束并写入。
result.jsonompstatus: "omp_unavailable"优先信任进程状态和工作树,而非进度显示。任务完成意味着进程已退出且文件已生成。omp的完整报告位于的字段中(也会在报告标记之间完整打印到标准输出)。
result.jsonresult.jsonfinalMessage4. Review - do not trust the self-report
4. 审核——不要轻信自我报告
Treat omp'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.
将omp的最终消息和准入标准声明仅视为声明:
- 自行重新运行项目的准入检查。
- 根据简报审核差异,从开始查看。
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 or
, then review again.
--resume-last--session <id>实现工具会编辑工作树;协调者负责提交。仅当准入检查通过且差异符合要求时再提交。若需要返工,使用或参数发送增量简报,之后再次审核。
--resume-last--session <id>Autonomy and permissions
自主性与权限
Oh My Pi has no sandbox. Print mode has no approval UI, so a write-capable relay run always
passes () — otherwise a user's or config
would stall until the watchdog. The other controls are:
--yolotools.approvalMode: yoloalways-askwrite- restricts omp's callable tools to
--read-only. It does not pass--tools read,grep,glob. Installed extension code still runs with the user's host permissions if project resources are trusted.--yolo - The relay passes by default, so project
--no-extensions --no-skills --no-rulesextensions, skills, and rules stay undiscovered..ompis the explicit opt-in for a repository the user trusts.--approve - and the diff are the record of what changed. Inspect them after every run.
touchedFiles
Oh My Pi没有沙箱。打印模式没有审批UI,因此允许写入的中继工具运行会始终传递参数()——否则用户的或配置会导致任务停滞直到监控超时。其他控制措施包括:
--yolotools.approvalMode: yoloalways-askwrite- 参数将omp可调用的工具限制为
--read-only。它不会传递--tools read,grep,glob参数。若信任项目资源,已安装的扩展代码仍会以用户的主机权限运行。--yolo - 中继工具默认传递参数,因此项目的
--no-extensions --no-skills --no-rules扩展、技能和规则不会被发现。.omp参数是用户信任某仓库时的显式选择项。--approve - 和差异记录了所有变更内容。每次运行后都需检查它们。
touchedFiles
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 omp'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.
委托是用户主动选择的操作。一旦用户确认(如“处理此队列”、“继续”),提交已验证且通过准入检查的工作就是约定的契约。仍有两个限制:披露而非隐瞒(报告omp的设计决策、合理但未要求的变更以及非阻塞性小问题)和范围变更时停止(若正确完成任务需要超出简报范围,需先询问用户而非自行扩展任务范围)。详情请查看references/review-and-land.md。
References
参考资料
- references/writing-the-brief.md - structure, report contract, real gates, stdin delivery, model listing, and delta briefs.
- references/dispatch-and-poll.md - flags, artifacts,
, polling, and failure recovery.
result.json - references/review-and-land.md - review checklist, commit boundary, and rework through omp 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 - 审核清单、提交边界以及通过omp会话进行返工。
- references/multi-task-queues.md - 顺序队列、约束传递、进度跟踪以及最终一致性检查。