Skip to content

docs: issue-dispatch 非 UI 的 Green 與審查改派 Codex - #1313

Merged
singyichen merged 2 commits into
mainfrom
docs/1281-codex-dispatch
Oct 13, 2026
Merged

singyichen merged 2 commits into
mainfrom
docs/1281-codex-dispatch

Conversation

@singyichen

Copy link
Copy Markdown
Owner

Summary

Closes #1281

依 #1281 的決議與 #1262 試點(PR #1287)證據,把 issue-dispatch skill 的非 UI Green 實作與獨立審查改派給 Codex,UI/UX 一律留在 Claude;Red 維持 senior-qa,不動 CLAUDE.md 的 TDD 擁有權規則。

Changes

.claude/skills/issue-dispatch/SKILL.md(唯一的內容檔):

  • Roles and topology:拓樸圖加上依 eligibility 分流的 Green 與審查;新增「Codex 是執行引擎不是對等方」段落,寫明 sandbox 的三個硬限制(.git 唯讀、無網路、只讀 AGENTS.md)與回合制委派。
  • Nested-specialist preamble 之後新增 Codex prompt file:五個 XML 區塊範本(task/action_safety/verification_loop/completeness_contract/compact_output_contract),放路徑不放內容。
  • Permission pre-flight:加 Bash(node *codex-companion.mjs *) allow 規則、setup --json 就緒檢查、companion 路徑由 installed_plugins.json 解析而非寫死版號。
  • Step 3 — Codex eligibility:路徑規則 + ui/claude-only/codex-ok label 覆寫;不確定歸 claude-only;Red 永遠 senior-qa。
  • Step 5 — Codex Green:lead 直接呼叫 companion 帶 --cwd(禁止經 codex:codex-rescue agent);完成後 touchedFiles 對照 git status、Red 測試檔零異動、lead 在 sandbox 外重跑閘、lead commit;--resume-last 修正上限兩輪,第三次交回 Claude specialist;Codex 的範圍外提醒由 lead 裁定。
  • Step 6:codex-eligible 的獨立審查改用 review --base <BASE> --scope branch;findings 處置規則(範圍內 Critical/High 回送、Medium/Low 記 PR body、範圍外另開 issue)。
  • Tooling:拆開 senior-code-reviewer、companion task/review、codex:rescue 三列。
  • Known pits:新增九條試點觀測(.git 唯讀、無網路、rescue agent cwd 釘死、路徑版號、主 session cd 被釘住、gh pr checks --watch 提前 exit 0、GitHub 502/504 重試、並行套件超時)。

.claude/settings.json(工具設定,不計入檔數):allow 清單加 Bash(node *codex-companion.mjs *)。

Scope note

單一目的:issue-dispatch 的 Codex 分工規則。未改 CLAUDE.md、AGENTS.md、任何 agent 定義或 Red 擁有權;Red 交 Codex 的 governance 變更若日後需要,依 #1281 決議另開 issue。

Test plan

🤖 Generated with Claude Code

https://claude.ai/code/session_01CjM45rELSv5vNdTVMgmz3Q

- **Add** a Codex eligibility classification to step 3: path rule plus `ui`/`claude-only`/`codex-ok` label overrides, UI/UX always Claude-only
- **Describe** Codex as a sandboxed execution engine in the topology — no commit, no network, sees only AGENTS.md — so the lead keeps commits, gates, gh calls, and checkpoints
- **Specify** the Codex Green flow in step 5: direct companion call with --cwd, touchedFiles vs git status check, lead reruns gates, two resume-last rounds then hand back to a Claude specialist
- **Switch** step 6 independent review for codex-eligible issues to the companion `review --base`, with finding disposition rules
- **Add** the five-block prompt-file template next to the nested-specialist preamble
- **Record** the pre-flight checks (allow rule, setup --json, version-pinned companion path) and nine pits observed in the #1262 pilot (PR #1287)
- **Allow** `Bash(node *codex-companion.mjs *)` in .claude/settings.json so an unattended wave does not stall on the first companion call

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CjM45rELSv5vNdTVMgmz3Q
@singyichen singyichen added the enhancement 功能修改 — Changes to existing features label Oct 13, 2026
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully documents the Codex integration into the issue-dispatch workflow. The changes are well-structured and comprehensive:

Changes validated:

  • .claude/settings.json: Valid JSON, correctly adds Codex companion permission
  • .claude/skills/issue-dispatch/SKILL.md: Extensive documentation additions covering Codex eligibility classification, prompt file format, sandbox constraints, and integration points throughout the dispatch workflow

Key additions:

  • Codex eligibility rules with clear path-based classification
  • Detailed prompt file template with five XML blocks
  • Sandbox limitation documentation (read-only .git, no network, limited file access)
  • Integration at multiple workflow steps (Green implementation, independent review, diagnosis)
  • Nine new known pits documenting observed Codex-specific issues from pilot testing

The documentation is thorough, includes proper guards against issues, and maintains consistency with existing workflow patterns. No defects found that would block merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T00:23:05.754554Z ae3ce36 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…tate note (#1281)

- **Use** origin/${BASE} for the companion review so a stale local main cannot widen the reviewed diff
- **Replace** the touchedFiles equality check with allowlist containment, because a --resume-last turn reports only its own edits
- **State** that COMPANION must be re-assigned in every Bash call, since shell state does not persist between calls

Addresses Codex review findings P1-1 to P1-3 on PR #1313; P1-4 (automated tests for a prose skill) declined, see the issue checkpoint.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CjM45rELSv5vNdTVMgmz3Q
@singyichen
singyichen merged commit 8c5bba8 into main Oct 13, 2026
20 checks passed
@singyichen
singyichen deleted the docs/1281-codex-dispatch branch October 13, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 功能修改 — Changes to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] issue-dispatch: 非 UI 工作改派 Codex(審查 + backend Green),#1262 為試點

1 participant