Skip to content
This repository was archived by the owner on Oct 17, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The repository is the only source of truth for its portable Skills, Agents, inst

## What makes it different

- **Delegation has a threshold.** Subagents are used only when parallel evidence, specialization, or a bounded worker can materially improve the result; the separate PR Review policy authorizes only its selected read-only Reviewers.
- **Delegation has a threshold.** Subagents are used when parallel evidence, specialization, or a bounded worker can materially improve the result, and bounded read-only search, authority, or public-practice questions are delegated proactively; the separate PR Review policy authorizes only its selected read-only Reviewers.
- **Manager-only is explicit and ephemeral.** A clear user request can make the current root task a strong-delegation manager: code investigation goes to `explorer`, implementation/tests/validation go to a leased Worker, and the root cannot silently take over after failure. After three unsuccessful rounds, only read-only re-decomposition or a blocker report remains; the user must give a new direction or explicitly consent before new code work.
- **Handoffs preserve useful compression.** Delegation uses compact natural-language briefs with optional task, context, handoff, and reference sections instead of inventing mandatory fields or temporary documents. When a calling Skill or Agent role supplies a machine-validated return schema, that specialized contract still applies. Agents recover ordinary repository context and return traceable evidence.
- **Task language is local.** Setup can persist English or Simplified Chinese delegation prose while role names, paths, and external protocol literals stay stable.
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ python3 scripts/install.py --uninstall --apply

## 鲜明特点

- **委派有门槛。** 只有并行证据、专业分工或边界清晰的 Worker 能实质改善结果时,才启动子代理;独立的 PR Review 策略只授权它选中的只读 Reviewer。
- **委派有门槛。** 并行证据、专业分工或边界清晰的 Worker 能实质改善结果时启动子代理,边界清晰的只读搜索、权威事实或公开实践问题会主动委派;独立的 PR Review 策略只授权它选中的只读 Reviewer。
- **manager-only 必须显式且临时。** 用户明确请求后,当前根任务才进入强委派管理模式:代码调查交给 `explorer`,实现、测试和验证交给带租约的 Worker;子代理失败时主代理不得静默接管,必须重拆、替换或报告阻塞。三轮不通过后只能只读重拆或报告阻塞,不得启动第四轮代码写入;新的代码写入要等用户新方向或明确退出模式。
- **交接保留有效压缩。** 委派使用自然语言简报,任务、必要上下文、交接重点和参考资料都只是可选结构,不自行发明固定字段或临时文档;调用方 Skill 或 Agent 角色提供机器可校验的回传 schema 时,仍遵循该专用合同。Agent 自行恢复普通仓库上下文并返回可追溯证据。
- **任务语言保留在本机。** 初始化可持久化选择英文或简体中文的委派措辞;角色名、路径和外部协议字面量保持稳定。
Expand Down
16 changes: 14 additions & 2 deletions SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: codex-orchestration
description: Root-task orchestration for explicit subagent or parallel work, official Codex Worktree Roots, R1-R3 Reviewers selected by codex-review-gate, and coding tasks with a clear delegation payoff. An explicit user request for manager-only or pure-orchestration mode enables strong delegation for the current root task; in ordinary mode keep simple tasks and ordinary documentation with the main agent; derived agents must not invoke it.
description: Root-task orchestration for explicit subagent or parallel work, bounded read-only questions such as broad code search, call-path tracing, version-specific external facts, or public practice evidence, official Codex Worktree Roots, R1-R3 Reviewers selected by codex-review-gate, and coding tasks with a clear delegation payoff. An explicit user request for manager-only or pure-orchestration mode enables strong delegation for the current root task; in ordinary mode keep simple tasks and ordinary documentation with the main agent; derived agents must not invoke it.
metadata:
version: 0.10.7
---
Expand All @@ -16,7 +16,7 @@ change that boundary.

The root main agent owns the goal, decomposition, model selection, local write lease, Git,
acceptance, and delivery. An Integration Root additionally owns peer-lane coordination and
integrated acceptance. Delegate only when the result can change a decision or materially improve
integrated acceptance. Delegate when the result can change a decision or materially improve
execution. `codex-review-gate` separately authorizes only its selected R1-R3 read-only Reviewers;
run them with this Skill's routing, brief, lifecycle, and waiting rules without reapplying the
ordinary delegation threshold. That permission admits no unrelated delegation.
Expand All @@ -36,6 +36,18 @@ research only when it can change the decision and local or official sources do n
it. In manager-only mode, substantive code investigation follows
[references/manager-only.md](references/manager-only.md).

In ordinary mode, this Skill explicitly requests read-only delegation when the question can be
stated up front with a completion condition and the main agent needs only the conclusion and
evidence locations rather than the raw material: broad searches or call-path tracing across modules
or directories, or searches unlikely to hit in the first few tries, go to `explorer`; conclusions
that depend on version-specific behavior of an external library, API, protocol, or platform without
an authoritative in-repository source go to `reference-researcher`; decision-relevant public
practice, product comparison, or case evidence goes to `web-researcher`. When two or more such
questions are independent, delegate each to its own read-only agent in parallel and continue main
work that does not depend on their results. Keep with the main agent code it will edit next,
step-by-step investigation whose next step depends on the previous finding, single-file or
known-location work, and questions answerable in one or two searches.

In ordinary mode, the main agent directly reads project-owned architecture, ADR, and handoff
documents that define the decision frame, and the active writer reads the exact code it changes.
For delegated reading, verify decision-critical or suspicious claims from returned paths, symbols,
Expand Down
5 changes: 5 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ only orchestration policy: ordinary delegation uses `fork_turns="none"`, pending
dependency barrier, a follow-up invalidates earlier completion evidence, an explicit stop converges
the active tree, and a third worker round starts with a fresh package and lease.

Codex hosts may instruct the model not to spawn subagents unless the user or applicable
`AGENTS.md`/Skill instructions explicitly ask for delegation. The global block therefore routes
bounded read-only questions to `codex-orchestration`, and the Skill explicitly requests read-only
delegation for them; without that wording, ordinary delegation rarely starts unless the user asks.

### Explicit manager-only mode

Manager-only mode is enabled only by a clear user request such as “enable orchestration mode”, “main
Expand Down
2 changes: 1 addition & 1 deletion docs/hooks-and-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ into the active global `AGENTS.override.md` or `AGENTS.md` by default and owns o
<!-- CODEX-ORCHESTRATION:GLOBAL-RULES:START -->
## Agent orchestration

- Root tasks load `codex-orchestration` before creating, coordinating, or waiting for subagents or independent Worktree Roots; simple tasks and ordinary documentation stay with the main agent.
- Root tasks load `codex-orchestration` before creating, coordinating, or waiting for subagents or independent Worktree Roots, and when a bounded read-only question needs only a conclusion with evidence: broad code search or call-path tracing, version-specific external facts, or public practice evidence; simple tasks and ordinary documentation stay with the main agent.

## Code review

Expand Down
2 changes: 1 addition & 1 deletion examples/global-agents-block.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- CODEX-ORCHESTRATION:GLOBAL-RULES:START -->
## Agent orchestration

- Root tasks load `codex-orchestration` before creating, coordinating, or waiting for subagents or independent Worktree Roots; simple tasks and ordinary documentation stay with the main agent.
- Root tasks load `codex-orchestration` before creating, coordinating, or waiting for subagents or independent Worktree Roots, and when a bounded read-only question needs only a conclusion with evidence: broad code search or call-path tracing, version-specific external facts, or public practice evidence; simple tasks and ordinary documentation stay with the main agent.

## Code review

Expand Down
1 change: 1 addition & 0 deletions scripts/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ def validate_source() -> list[str]:
"same local orchestration authority as any other",
"separately authorizes only its selected R1-R3 read-only Reviewers",
"without reapplying the ordinary delegation threshold",
"this Skill explicitly requests read-only delegation",
"when the calling Skill or Agent role supplies a machine-validated return schema",
"follow that specialized schema",
):
Expand Down
Loading