pr-loop
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesepr-loop
pr-loop
Status: scaffold. Implementation lands in Phase 1 per.docs/specs/2026-04-30-multi-cli-orchestrator-design.md
状态:框架搭建中。具体实现将根据在第一阶段完成。docs/specs/2026-04-30-multi-cli-orchestrator-design.md
Loop
循环流程
- Trigger Codex review (comment on the PR or wait for auto-review).
@codex review - Poll until the review completes.
gh pr view <n> --json reviews,comments,statusCheckRollup - Classify Codex comments:
- P0/P1 → blocking, must be addressed before merge
- P2/nit → ignore for merge gating
- Round-by-round behavior:
- Round 1–2: spawn subagent per blocking comment, push commits.
pr-fixer - Round 3: route the failing fix to a different worker (OpenCode or Gemini) for a different perspective.
- Round 4: label PR , comment with iteration history, stop.
needs-human
- Round 1–2: spawn
- Stall detection: if the same P0/P1 comment reappears in two consecutive rounds, skip ahead to round 3 (different worker) early.
- 触发Codex评审(在PR中添加评论,或等待自动评审)。
@codex review - 轮询直到评审完成。
gh pr view <n> --json reviews,comments,statusCheckRollup - 分类Codex评论:
- P0/P1 → 阻塞级,合并前必须解决
- P2/nit → 不影响合并检查,可忽略
- 分轮次处理逻辑:
- 第1-2轮:针对每条阻塞级评论启动子Agent,推送修复提交。
pr-fixer - 第3轮:将修复失败的问题转交给其他处理节点(OpenCode或Gemini),获取不同解决方案视角。
- 第4轮:为PR标记标签,添加包含迭代历史的评论,停止循环。
needs-human
- 第1-2轮:针对每条阻塞级评论启动
- 停滞检测:如果同一P0/P1评论连续两轮重复出现,则提前跳转到第3轮(更换处理节点)。
Merge gates (all must pass)
合并检查项(需全部通过)
- CI green
- Tests green
- Typecheck green
- Lint green
- Zero unresolved P0 or P1 Codex comments
- Branch protection enforced on
main
When all green: auto-merge, archive the cache directory.
- CI检查通过
- 测试用例通过
- 类型检查通过
- 代码扫描通过
- 无未解决的P0或P1级Codex评论
- 分支已启用分支保护
main
当所有检查项均通过时:自动合并PR,并归档缓存目录。
Subagent
子Agent
agents/claude-code/pr-fixer.mdagents/opencode/pr-fixer.mdpr-loop-pr-fixerscripts/install-agents.shagents/claude-code/pr-fixer.mdagents/opencode/pr-fixer.mdscripts/install-agents.shpr-loop-pr-fixerState
状态存储
.mco-cache/<pr-number>/.mco-cache/<pr-number>/