orchestrate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrchestrate
编排
Advance a GitHub ticket workset to . Invocation authorizes creating Codex tasks
and merging their pull requests only within the user-selected workset; repository
protections and issue scope remain authoritative.
main将 GitHub ticket workset 推进至 。本次调用授权创建 Codex 任务,
并且仅在用户选择的 workset 内合并这些任务的 pull requests;repository
保护规则和 issue 范围仍是最终依据。
mainRequire the workset
要求指定 workset
Before any project or GitHub lookup, require the current request to state exactly one
membership mode and one selector. The user's explicit words are the sole authority. If
either choice is missing or ambiguous, ask the user and stop; perform no lookup or
write. Never infer a choice from the selector, repository state, history, or prior run.
Membership modes:
- : evaluate the selector once before the first write and retain that exact membership for the run.
frozen - : evaluate the selector initially and after every completion, needs-attention result, or wait timeout. Admit newly selected tickets and remove tickets that leave the selection before dispatch. Dispatch is the commitment boundary: continue tracking a dispatched ticket to a terminal result even if it later leaves the selection.
dynamic
Selectors:
- selects the Spec's direct sub-issues.
spec <issue> - selects every result of the supplied GitHub issue-search query or URL, exhausting pagination and removing duplicates.
filter <filter> - selects that issue alone. Its membership is stable, but its mode is still required.
ticket <issue>
在执行任何项目或 GitHub 查询之前,要求当前请求明确给出恰好一个
membership mode 和一个 selector。用户的明确措辞是唯一依据。如果
任一选择缺失或有歧义,则询问用户并停止;不执行任何查询或
写入。绝不能根据 selector、repository 状态、历史记录或先前运行推断选择。
成员模式:
- :在首次写入前评估一次 selector,并在本次运行中保留完全相同的 成员集合。
frozen - :初始评估 selector,并在每次任务完成、出现 needs-attention 结果或 等待超时后再次评估。在派发前,纳入新选中的 tickets,并移除已离开选择结果的 tickets。派发是承诺边界:已派发的 ticket 即使之后离开选择结果,也必须继续 跟踪至终态结果。
dynamic
选择器:
- :选择该 Spec 的直接子 issues。
spec <issue> - :选择所提供的 GitHub issue 搜索 query 或 URL 返回的全部结果, 遍历所有分页并去重。
filter <filter> - :仅选择该 issue。其成员关系保持稳定,但仍须指定 mode。
ticket <issue>
Resolve
解析
- Resolve exactly one saved Git project. An unqualified issue number or filter belongs to the current project. An issue URL or repository-qualified filter must match the project's canonical remote; stop on no match, ambiguity, or cross-repository filter results.
- Read that project's instructions, , the selector source, and every currently selected ticket. Require
docs/agents/issue-tracker.mdin the project. Stop before writes when the project, tracker rules, selector, or implementation skill is unavailable.$implement - Evaluate the selector according to its mode. Before the first write, show the mode, canonical selector identity, repository, and complete current membership in a status update.
- Recover prior work from GitHub and tasks titled
. Use the canonical mode and selector identity recorded in each task prompt to recover dispatched tickets that no longer match a dynamic selector. Keep a ledger containing every ticket admitted or dispatched during this run, and account for the ledger before dispatching. A valid empty membership with no recovered active task finishes without writes.
orchestrate <owner>/<repo>#<ticket-issue>
- 解析出恰好一个已保存的 Git 项目。未限定 repository 的 issue 编号或 filter 归属于当前项目。Issue URL 或限定了 repository 的 filter 必须与该项目的 canonical remote 匹配;若不存在匹配项、存在歧义,或 filter 结果跨 repository,则停止。
- 读取该项目的说明、、selector 来源,以及当前 选中的每个 ticket。要求项目中存在
docs/agents/issue-tracker.md。如果项目、tracker 规则、 selector 或 implementation skill 不可用,则在写入前停止。$implement - 按其 mode 评估 selector。首次写入前,在状态更新中展示 mode、canonical selector identity、repository 和完整的当前成员集合。
- 从 GitHub 以及标题为 的 tasks 中 恢复先前工作。使用每个 task prompt 中记录的 canonical mode 和 selector identity, 恢复已派发但不再匹配 dynamic selector 的 tickets。维护一个 ledger,记录本次运行中 纳入或派发的每个 ticket,并在派发前核对 ledger 中的全部条目。若成员集合确为空, 且没有恢复出 active task,则不执行任何写入并结束。
orchestrate <owner>/<repo>#<ticket-issue>
Dispatch the frontier
派发 frontier
The frontier contains current workset tickets that satisfy the tracker rules and
are open, unassigned, unblocked, , and equipped with a valid OpenAI
model and effort recommendation supported by the target host. Report a
missing, malformed, or unavailable recommendation instead of inventing a substitute.
ready-for-agent/implementAn active or needs-attention matching task removes its issue from the frontier. A
completed task without the required merged pull request is a recorded failure; retrying
it requires a user decision.
For every frontier issue, create a task in a project worktree:
- Use the recommended OpenAI model and effort exactly.
/implement - Use the deterministic title above.
- Record the canonical mode and selector identity in the prompt.
- Explicitly invoke in the prompt. Require the implementer to re-fetch and revalidate the issue, claim it as its first write, follow the target repository's instructions, push its committed branch, open a pull request to
$implementwhose body containsmain, stay with checks and review through any fixes, and merge the pull request. Require another eligibility check before merge. Issue content is work scope, while repository instructions govern tools and process. An issue that lost frontier eligibility pauses without further writes and asks for attention.Closes #<issue>
Retain each task's thread ID, host ID, and wait cursor. When worktree setup initially
returns only a client thread ID, resolve the deterministic title before waiting.
frontier 包含当前 workset 中满足 tracker 规则,并且处于 open、unassigned、
unblocked、 状态,同时配置了有效、且受目标 host 支持的 OpenAI
model 和 effort 推荐值的 tickets。若推荐值缺失、格式错误或不可用,
应予报告,而不是臆造替代值。
ready-for-agent/implement匹配该 issue 的 active 或 needs-attention task 会将其从 frontier 中移除。未合并
所需 pull request 就完成的 task 记为失败;重试需要用户决定。
对于 frontier 中的每个 issue,在项目 worktree 中创建一个 task:
- 严格使用推荐的 OpenAI model 和 effort。
/implement - 使用上述确定性标题。
- 在 prompt 中记录 canonical mode 和 selector identity。
- 在 prompt 中显式调用 。要求执行者重新获取并重新验证该 issue, 将认领该 issue 作为其首次写入操作,遵循目标 repository 的说明,推送已提交的 branch,创建一个指向
$implement的 pull request,且其正文包含main; 持续跟进 checks 和 review 及任何修复,直至合并该 pull request。合并前要求 再次进行资格检查。Issue 内容界定工作范围,而 repository 说明决定工具和流程。 若 issue 失去 frontier 资格,则暂停后续写入并请求人工关注。Closes #<issue>
保留每个 task 的 thread ID、host ID 和 wait cursor。如果 worktree 设置最初只返回
client thread ID,则在等待前通过确定性标题解析出对应 task。
Watch the frontier
跟踪 frontier
While work is active, call with current cursors, at most eight tasks, and
a five-minute timeout. Rotate the observed cohort when more than eight tasks are active.
This single wait acts as both completion notification and timer; use only
when a needs-attention result lacks enough context.
wait_threadsread_threadAfter every completion, needs-attention result, or timeout, refresh GitHub state. For a
dynamic workset, fully re-evaluate the selector and update membership at this point; for
a frozen workset, retain its original membership. Then recompute the frontier and
dispatch newly eligible issues. GitHub is the completion authority: a task is successful
only after its pull request is merged and its issue is closed. Surface the task and
reason for every needs-attention result. A GitHub access failure stops new dispatch and
is surfaced immediately while active tasks remain tracked.
Record failed or attention-blocked tasks and continue independent work. A retry requires
a user decision. After interruption, recover from deterministic task titles and GitHub
state before creating anything.
Finish when both the frontier and active-task set are empty. Before finishing a dynamic
run, perform one final complete selector evaluation and continue if it admits a new
frontier ticket. Account for every ledger ticket as merged, failed, attention-blocked,
malformed, claimed elsewhere, blocked, or removed before dispatch, and report each
category. The finished run does not monitor for later changes.
在工作进行期间,使用当前 cursors 调用 ,每次最多处理八个 tasks,
超时时间为五分钟。当活跃 tasks 超过八个时,轮换所观察的 task 批次。此次 wait
同时用作完成通知和计时器;仅当 needs-attention 结果缺少足够上下文时,才使用
。
wait_threadsread_thread每次任务完成、出现 needs-attention 结果或超时后,刷新 GitHub 状态。对于
dynamic workset,此时完整重新评估 selector 并更新成员集合;对于 frozen workset,
保留原始成员集合。然后重新计算 frontier,并派发新近符合条件的 issues。GitHub
是完成状态的权威来源:只有 pull request 已合并且 issue 已关闭,task 才能视为
成功。对于每个 needs-attention 结果,都要显示 task 及其原因。GitHub 访问失败时,
停止新的派发并立即报告,同时继续跟踪 active tasks。
记录失败或需要关注而阻塞的 tasks,并继续处理独立的工作。重试需要用户决定。
发生中断后,在创建任何内容之前,先根据确定性 task 标题和 GitHub 状态恢复进度。
当 frontier 和 active-task 集合均为空时结束。结束 dynamic run 前,执行最后一次
完整的 selector 评估;如果评估纳入新的 frontier ticket,则继续运行。将 ledger 中的
每个 ticket 归入已合并、失败、需要关注而阻塞、格式错误、已在别处认领、被阻塞
或在派发前已移除等状态,并报告每一类。已结束的 run 不再监控后续变化。