用途:orchestrate-codex 用于在同一个 manifest、一个 Monitor 和统一策略下编排多个 codex CLI 工作进程,属于 codex 专用编排技能。它先检测模式,再生成 manifest、启动分离运行器、发出 Monitor 提示并退出;codex 工作进程在后台运行,agent 留在会话中,manifest 作为唯一事实来源。
主要模式:exec(≥2 个独立编码任务在多工作树并行,按任务 codex exec);batch(同一提示模板向 N 个输入扇出,每个输入一个答案文件);single(单个大型 codex 任务,通过 JSONL 事件流式进入 Monitor);review(一组分支按轮次执行 codex exec review,分类器驱动收敛或阻塞判定);rescue(重新接续未完成的既有 manifest,重派失败或未开始的条目)。
使用方式:调度器路径为 <skill-root>/scripts/orchestrate-codex.mjs。例如 rescue 用 node <skill-root>/scripts/orchestrate-codex.mjs rescue --manifest <path>;review 用 node <skill-root>/scripts/orchestrate-codex.mjs review --branches <list> [--base main];batch 用 node <skill-root>/scripts/orchestrate-codex.mjs batch --inputs <file> --template <tmpl> [--answers-dir <dir>],--template 必填且无默认;single 用 node <skill-root>/scripts/orchestrate-codex.mjs single --prompt-file <file>(或 --prompt "...");exec 用 node <skill-root>/scripts/orchestrate-codex.mjs exec --tasks <tasks.json>。分发器返回后,下一步工具调用必须是 Monitor,并原样传入 envelope.monitor.tool_hint,不要手写 Monitor 块。
限制:仅限 codex,不负责开 PR(交给 ask-review)、不整合第三方评论(交给 evaluate-code-review)、不做非 codex 后端的通用 LLM CLI 扇出。单次琐碎调用(≤5 分钟)应直接运行 codex exec。同一工作区并发需 --force-new-run --run-id <custom>。运行前做预检:codex --version、auth 门、git 仓库检查等,必要时用 ORCHESTRATE_SKIP_CODEX_AUTH=1 并做烟测。统一策略默认包含 --dangerously-bypass-approvals-and-sandbox、--skip-git-repo-check、-m gpt-5.5、-c model_reasoning_effort=xhigh,模型与 effort 可用环境变量覆盖;禁止 --full-auto 等标志。其他细节暂未提供。