autonomous-orchestration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Autonomous Orchestration

自主编排

Overview

概述

Orchestrates long-running autonomous work across multiple issues, spawning parallel workers, monitoring CI, and persisting state across sessions.
Core principle: GitHub is the source of truth. Workers are disposable. State survives restarts.
Announce at start: "I'm using autonomous-orchestration to work through [SCOPE]. Starting autonomous operation now."
跨多个议题编排长期运行的自主工作,生成并行工作进程、监控CI,并在会话间持久化状态。
核心原则: GitHub是事实来源。工作进程可随时销毁,状态可在重启后保留。
启动时公告: "我正在使用autonomous-orchestration处理[SCOPE]。现在开始自主操作。"

Prerequisites

前置条件

  • worker-dispatch
    skill for spawning workers
  • worker-protocol
    skill for worker behavior
  • ci-monitoring
    skill for CI/WAKE handling
  • Git worktrees support (workers use isolated worktrees)
  • GitHub CLI (
    gh
    ) authenticated
  • GitHub Project Board configured
  • worker-dispatch
    技能:用于生成工作进程
  • worker-protocol
    技能:用于规范工作进程行为
  • ci-monitoring
    技能:用于处理CI/WAKE相关操作
  • 支持Git工作树(工作进程使用独立工作树)
  • GitHub CLI(
    gh
    )已完成认证
  • 已配置GitHub项目看板

State Management

状态管理

CRITICAL: All state is stored in GitHub. NO local state files.
State StorePurposeUsed For
Project Board StatusTHE source of truthReady, In Progress, In Review, Blocked, Done
Issue CommentsActivity logWorker assignment, progress, deviations
LabelsLineage only
spawned-from:#N
,
depth:N
,
epic-*
MCP MemoryFast cache + active markerRead optimization, active orchestration detection
See:
reference/state-management.md
for detailed state queries and updates.
关键注意事项: 所有状态均存储在GitHub中,不使用本地状态文件。
状态存储用途适用场景
项目看板状态事实唯一来源就绪、进行中、审核中、阻塞、已完成
议题评论活动日志工作进程分配、进度更新、偏差记录
标签仅用于血缘追踪
spawned-from:#N
depth:N
epic-*
MCP内存快速缓存+活动标记读取优化、活跃编排检测
参考:
reference/state-management.md
包含详细的状态查询与更新说明。

Context Compaction Survival

上下文压缩存活机制

CRITICAL: Orchestration must survive mid-loop context compaction.
关键注意事项: 编排进程必须能在循环中途的上下文压缩中存活。

On Start: Write Active Marker

启动时:写入活动标记

bash
undefined
bash
undefined

Write to MCP Memory when orchestration starts

编排启动时写入MCP内存

mcp__memory__create_entities([{ "name": "ActiveOrchestration", "entityType": "Orchestration", "observations": [ "Status: ACTIVE", "Scope: [MILESTONE/EPIC/unbounded]", "Tracking Issue: #[NUMBER]", "Started: [ISO_TIMESTAMP]", "Repository: [owner/repo]", "Phase: BOOTSTRAP|MAIN_LOOP", "Last Loop: [ISO_TIMESTAMP]" ] }])
undefined
mcp__memory__create_entities([{ "name": "ActiveOrchestration", "entityType": "Orchestration", "observations": [ "Status: ACTIVE", "Scope: [MILESTONE/EPIC/unbounded]", "Tracking Issue: #[NUMBER]", "Started: [ISO_TIMESTAMP]", "Repository: [owner/repo]", "Phase: BOOTSTRAP|MAIN_LOOP", "Last Loop: [ISO_TIMESTAMP]" ] }])
undefined

On Each Loop Iteration: Update Marker

每次循环迭代时:更新标记

bash
mcp__memory__add_observations({
  "observations": [{
    "entityName": "ActiveOrchestration",
    "contents": ["Last Loop: [ISO_TIMESTAMP]", "Phase: MAIN_LOOP"]
  }]
})
bash
mcp__memory__add_observations({
  "observations": [{
    "entityName": "ActiveOrchestration",
    "contents": ["Last Loop: [ISO_TIMESTAMP]", "Phase: MAIN_LOOP"]
  }]
})

On Complete: Remove Marker

完成时:移除标记

bash
mcp__memory__delete_entities({
  "entityNames": ["ActiveOrchestration"]
})
bash
mcp__memory__delete_entities({
  "entityNames": ["ActiveOrchestration"]
})

On Session Resume (After Compaction)

会话恢复(压缩后)

Session-start skill checks for active orchestration:
bash
undefined
会话启动技能会检查是否存在活跃编排:
bash
undefined

Check MCP Memory for active orchestration

检查MCP内存中的活跃编排

ACTIVE=$(mcp__memory__open_nodes({"names": ["ActiveOrchestration"]}))
if [ -n "$ACTIVE" ]; then echo "⚠️ ACTIVE ORCHESTRATION DETECTED" echo "Scope: [from ACTIVE]" echo "Tracking: [from ACTIVE]" echo "" echo "Resuming orchestration loop..."

Invoke autonomous-orchestration skill to resume

fi

**This ensures:** Even if context compacts mid-loop, the next session will detect the active orchestration and resume it.
ACTIVE=$(mcp__memory__open_nodes({"names": ["ActiveOrchestration"]}))
if [ -n "$ACTIVE" ]; then echo "⚠️ 检测到活跃编排" echo "范围: [来自ACTIVE]" echo "跟踪: [来自ACTIVE]" echo "" echo "正在恢复编排循环..."

调用autonomous-orchestration技能恢复

fi

**这确保:** 即使在循环中途发生上下文压缩,下一个会话仍能检测到活跃编排并恢复运行。

Immediate Start (User Consent Implied)

立即启动(默认用户已同意)

The user's request for autonomous operation IS their consent. No additional confirmation required.
When the user requests autonomous work:
  1. Identify scope - Parse user request for milestone, epic, specific issues, or "all"
  2. Announce intent - Briefly state what you're about to do
  3. Start immediately - Begin orchestration without waiting for additional input
markdown
undefined
用户对自主操作的请求即视为同意,无需额外确认。
当用户请求自主工作时:
  1. 确定范围 - 解析用户请求中的里程碑、史诗、特定议题或“全部”
  2. 告知意图 - 简要说明即将执行的操作
  3. 立即启动 - 无需等待额外输入,直接开始编排
markdown
undefined

Starting Autonomous Operation

启动自主操作

Scope: [MILESTONE/EPIC/ISSUES or "all open issues"] Workers: Up to 5 parallel Mode: Continuous until complete
Beginning work now...

**Do NOT ask for "PROCEED" or any confirmation.** The user asked for autonomous operation - that is the confirmation.
范围: [里程碑/史诗/议题或“所有未关闭议题”] 工作进程: 最多5个并行进程 模式: 持续运行直至完成
开始工作...

**请勿**询问“是否继续”或任何形式的确认。用户要求自主操作本身就是确认。

Automatic Scope Detection

自动范围检测

When the user requests autonomous operation without specifying a scope:
当用户请求自主操作但未指定范围时:

Priority Order

优先级顺序

  1. User-specified scope - If user mentions specific issues, epics, or milestones
  2. Urgent/High Priority standalone issues - Issues with
    priority:urgent
    or
    priority:high
    labels not part of an epic
  3. Epic-based sequential work - Work through epics in order, completing all issues within each epic
  4. Remaining standalone issues - Any issues not part of an epic
bash
detect_work_scope() {
  # 1. Check for urgent/high priority standalone issues first
  PRIORITY_ISSUES=$(gh issue list --state open \
    --label "priority:urgent,priority:high" \
    --json number,labels \
    --jq '[.[] | select(.labels | map(.name) | any(startswith("epic-")) | not)] | .[].number')

  if [ -n "$PRIORITY_ISSUES" ]; then
    echo "priority_standalone"
    echo "$PRIORITY_ISSUES"
    return
  fi

  # 2. Get epics in order (by creation date)
  EPICS=$(gh issue list --state open --label "type:epic" \
    --json number,title,createdAt \
    --jq 'sort_by(.createdAt) | .[].number')

  if [ -n "$EPICS" ]; then
    echo "epics"
    echo "$EPICS"
    return
  fi

  # 3. Fall back to all open issues
  ALL_ISSUES=$(gh issue list --state open --json number --jq '.[].number')
  echo "all_issues"
  echo "$ALL_ISSUES"
}
  1. 用户指定范围 - 如果用户提及特定议题、史诗或里程碑
  2. 紧急/高优先级独立议题 - 带有
    priority:urgent
    priority:high
    标签且不属于任何史诗的议题
  3. 基于史诗的顺序工作 - 按顺序处理史诗,完成每个史诗下的所有议题
  4. 剩余独立议题 - 所有不属于任何史诗的议题
bash
detect_work_scope() {
  # 1. 优先检查紧急/高优先级独立议题
  PRIORITY_ISSUES=$(gh issue list --state open \
    --label "priority:urgent,priority:high" \
    --json number,labels \
    --jq '[.[] | select(.labels | map(.name) | any(startswith("epic-")) | not)] | .[].number')

  if [ -n "$PRIORITY_ISSUES" ]; then
    echo "priority_standalone"
    echo "$PRIORITY_ISSUES"
    return
  fi

  # 2. 按创建日期顺序获取史诗
  EPICS=$(gh issue list --state open --label "type:epic" \
    --json number,title,createdAt \
    --jq 'sort_by(.createdAt) | .[].number')

  if [ -n "$EPICS" ]; then
    echo "epics"
    echo "$EPICS"
    return
  fi

  # 3. 回退到所有未关闭议题
  ALL_ISSUES=$(gh issue list --state open --json number --jq '.[].number')
  echo "all_issues"
  echo "$ALL_ISSUES"
}

Continuous Operation Until Complete

持续运行直至完成

Autonomous operation continues until ALL of:
  • No open issues remain in scope
  • No open PRs awaiting merge
  • No issues in "In Progress" or "In Review" status
The operation does NOT pause for:
  • Progress updates
  • Confirmation between issues
  • Switching between epics
  • Any user input (unless blocked by a fatal error)
自主操作会持续运行,直至满足以下所有条件:
  • 范围内无未关闭议题
  • 无等待合并的未关闭PR
  • 无处于“进行中”或“审核中”状态的议题
以下情况不会暂停操作:
  • 进度更新
  • 议题间的确认请求
  • 切换史诗
  • 任何用户输入(除非遇到致命错误被阻塞)

PR Resolution Bootstrap Phase

PR解决引导阶段

CRITICAL: Before spawning ANY new workers, resolve all existing open PRs first.
┌──────────────────────────────────────────────────────────┐
│                    BOOTSTRAP PHASE                        │
│             (Runs ONCE before main loop)                  │
└─────────────────────────┬────────────────────────────────┘
               ┌───────────────────┐
               │ GET OPEN PRs      │
               │                   │
               │ Filter out:       │
               │ - release/*       │
               │ - release-        │
               │   placeholder     │
               └─────────┬─────────┘
              ┌──────────┴──────────┐
              ▼                     ▼
        ┌───────────┐         ┌───────────┐
        │ Has PRs?  │─── No ──│ → MAIN    │
        │           │         │   LOOP    │
        └─────┬─────┘         └───────────┘
              │ Yes
        ┌───────────────────────────────┐
        │ FOR EACH PR:                  │
        │                               │
        │ 1. Check CI status            │
        │ 2. Verify review artifact     │
        │ 3. Merge if ready OR          │
        │ 4. Wait/fix if not            │
        └───────────────────────────────┘
                    MAIN LOOP
关键注意事项: 在生成任何新工作进程之前,必须先解决所有现有未关闭PR。
┌──────────────────────────────────────────────────────────┐
│                    引导阶段                              │
│            (主循环前仅运行一次)                          │
└─────────────────────────┬────────────────────────────────┘
               ┌───────────────────┐
               │ 获取未关闭PR      │
               │                   │
               │ 排除以下类型:    │
               │ - release/*       │
               │ - release-        │
               │   placeholder     │
               └─────────┬─────────┘
              ┌──────────┴──────────┐
              ▼                     ▼
        ┌───────────┐         ┌───────────┐
        │ 存在PR?  │─── 否 ──│ → 进入主  │
        │           │         │   循环    │
        └─────┬─────┘         └───────────┘
              │ 是
        ┌───────────────────────────────┐
        │ 遍历每个PR:                  │
        │                               │
        │ 1. 检查CI状态                 │
        │ 2. 验证审核工件               │
        │ 3. 若就绪则合并,否则         │
        │ 4. 等待或修复                 │
        └───────────────────────────────┘
                    主循环

Bootstrap Implementation

引导阶段实现

bash
resolve_existing_prs() {
  echo "=== PR RESOLUTION BOOTSTRAP ==="

  # Get all open PRs, excluding release placeholders
  OPEN_PRS=$(gh pr list --json number,headRefName,labels \
    --jq '[.[] | select(
      (.headRefName | startswith("release/") | not) and
      (.labels | map(.name) | index("release-placeholder") | not)
    )] | .[].number')

  if [ -z "$OPEN_PRS" ]; then
    echo "No actionable PRs to resolve. Proceeding to main loop."
    return 0
  fi

  echo "Found PRs to resolve: $OPEN_PRS"

  for pr in $OPEN_PRS; do
    echo "Processing PR #$pr..."

    # Get CI status
    ci_status=$(gh pr checks "$pr" --json state --jq '.[].state' 2>/dev/null | sort -u)

    # Get linked issue
    ISSUE=$(gh pr view "$pr" --json body --jq '.body' | grep -oE 'Closes #[0-9]+' | grep -oE '[0-9]+' | head -1)

    if [ -z "$ISSUE" ]; then
      echo "  ⚠ No linked issue found, skipping"
      continue
    fi

    # Check if CI passed
    if echo "$ci_status" | grep -q "FAILURE"; then
      echo "  ❌ CI failing - triggering ci-monitoring for PR #$pr"
      # Invoke ci-monitoring skill to fix
      handle_ci_failure "$pr"
      continue
    fi

    if echo "$ci_status" | grep -q "PENDING"; then
      echo "  ⏳ CI pending for PR #$pr, will check in main loop"
      continue
    fi

    if echo "$ci_status" | grep -q "SUCCESS"; then
      # Verify review artifact
      REVIEW_EXISTS=$(gh api "/repos/$OWNER/$REPO/issues/$ISSUE/comments" \
        --jq '[.[] | select(.body | contains("<!-- REVIEW:START -->"))] | length' 2>/dev/null || echo "0")

      if [ "$REVIEW_EXISTS" = "0" ]; then
        echo "  ⚠ No review artifact - requesting review for #$ISSUE"
        gh issue comment "$ISSUE" --body "## Review Required

PR #$pr has passing CI but no review artifact.

**Action needed:** Complete comprehensive-review and post artifact to this issue.

---
*Bootstrap phase - Orchestrator*"
        continue
      fi

      # All checks pass - merge
      echo "  ✅ Merging PR #$pr"
      gh pr merge "$pr" --squash --delete-branch
      mark_issue_done "$ISSUE"
    fi
  done

  echo "=== BOOTSTRAP COMPLETE ==="
}
bash
resolve_existing_prs() {
  echo "=== PR解决引导阶段 ==="

  # 获取所有未关闭PR,排除发布占位符
  OPEN_PRS=$(gh pr list --json number,headRefName,labels \
    --jq '[.[] | select(
      (.headRefName | startswith("release/") | not) and
      (.labels | map(.name) | index("release-placeholder") | not)
    )] | .[].number')

  if [ -z "$OPEN_PRS" ]; then
    echo "无可操作PR需要解决。进入主循环。"
    return 0
  fi

  echo "发现需要解决的PR:$OPEN_PRS"

  for pr in $OPEN_PRS; do
    echo "正在处理PR #$pr..."

    # 获取CI状态
    ci_status=$(gh pr checks "$pr" --json state --jq '.[].state' 2>/dev/null | sort -u)

    # 获取关联议题
    ISSUE=$(gh pr view "$pr" --json body --jq '.body' | grep -oE 'Closes #[0-9]+' | grep -oE '[0-9]+' | head -1)

    if [ -z "$ISSUE" ]; then
      echo "  ⚠ 未找到关联议题,跳过"
      continue
    fi

    # 检查CI是否通过
    if echo "$ci_status" | grep -q "FAILURE"; then
      echo "  ❌ CI失败 - 为PR #$pr触发ci-monitoring"
      # 调用ci-monitoring技能修复
      handle_ci_failure "$pr"
      continue
    fi

    if echo "$ci_status" | grep -q "PENDING"; then
      echo "  ⏳ PR #$pr的CI正在进行,将在主循环中检查"
      continue
    fi

    if echo "$ci_status" | grep -q "SUCCESS"; then
      # 验证审核工件
      REVIEW_EXISTS=$(gh api "/repos/$OWNER/$REPO/issues/$ISSUE/comments" \
        --jq '[.[] | select(.body | contains("<!-- REVIEW:START -->"))] | length' 2>/dev/null || echo "0")

      if [ "$REVIEW_EXISTS" = "0" ]; then
        echo "  ⚠ 无审核工件 - 为#$ISSUE请求审核"
        gh issue comment "$ISSUE" --body "## 需要审核

PR #$pr的CI已通过,但无审核工件。

**需执行操作:** 完成全面审核并将工件发布至该议题。

---
*引导阶段 - 编排器*"
        continue
      fi

      # 所有检查通过 - 合并
      echo "  ✅ 合并PR #$pr"
      gh pr merge "$pr" --squash --delete-branch
      mark_issue_done "$ISSUE"
    fi
  done

  echo "=== 引导阶段完成 ==="
}

Release Placeholder Detection

发布占位符检测

PRs are excluded from bootstrap resolution if:
ConditionExample
Branch starts with
release/
release/v2.0.0
,
release/2025-01
Has
release-placeholder
label
Manual exclusion
Has
do-not-merge
label
Explicit hold
以下PR会被排除在引导阶段的解决范围外:
条件示例
分支以
release/
开头
release/v2.0.0
release/2025-01
带有
release-placeholder
标签
手动排除
带有
do-not-merge
标签
明确暂停

Orchestration Loop

编排循环

┌──────────────────────────────────────────────────────────┐
│                       MAIN LOOP                          │
└─────────────────────────┬────────────────────────────────┘
      ┌───────────────────┼───────────────────┐
      ▼                   ▼                   ▼
┌───────────┐      ┌───────────┐      ┌───────────┐
│ CHECK     │      │ CHECK     │      │ SPAWN     │
│ WORKERS   │      │ CI/PRs    │      │ WORKERS   │
└─────┬─────┘      └─────┬─────┘      └─────┬─────┘
      │                  │                  │
      └──────────────────┼──────────────────┘
               ┌───────────────────┐
               │ EVALUATE STATE    │
               │                   │
               │ All done? → Exit  │
               │ Waiting? → SLEEP  │
               │ Work? → Continue  │
               └───────────────────┘
See:
reference/loop-implementation.md
for full loop code.
┌──────────────────────────────────────────────────────────┐
│                       主循环                            │
└─────────────────────────┬────────────────────────────────┘
      ┌───────────────────┼───────────────────┐
      ▼                   ▼                   ▼
┌───────────┐      ┌───────────┐      ┌───────────┐
│ 检查工作  │      │ 检查CI/PR │      │ 生成工作  │
│ 进程状态  │      │ 状态       │      │ 进程       │
└─────┬─────┘      └─────┬─────┘      └─────┬─────┘
      │                  │                  │
      └──────────────────┼──────────────────┘
               ┌───────────────────┐
               │ 评估状态          │
               │                   │
               │ 全部完成?→退出  │
               │ 等待中?→休眠     │
               │ 有工作?→继续     │
               └───────────────────┘
参考:
reference/loop-implementation.md
包含完整的循环代码。

Loop Steps

循环步骤

  1. Check Deviation Resolution - Resume issues whose children are all closed
  2. Check CI/PRs - Monitor for merge readiness, verify review artifacts
  3. MERGE GREEN PRs - Any PR with passing CI is merged IMMEDIATELY
  4. Spawn Workers - Up to 5 parallel workers from Ready queue
  5. Evaluate State - Determine next action (continue, sleep, complete)
  6. Brief Pause - 30 second interval between iterations
  1. 检查偏差解决 - 恢复所有子议题均已关闭的父议题
  2. 检查CI/PR - 监控合并就绪状态,验证审核工件
  3. 合并绿色PR - 任何CI通过的PR立即合并
  4. 生成工作进程 - 从就绪队列中生成最多5个并行工作进程
  5. 评估状态 - 确定下一步操作(继续、休眠、完成)
  6. 短暂暂停 - 每次迭代间隔30秒

CRITICAL: Merge Green PRs Immediately

关键注意事项:立即合并绿色PR

Every loop iteration must check for and merge passing PRs:
bash
undefined
每次循环迭代必须检查并合并通过CI的PR:
bash
undefined

In each loop iteration

在每次循环迭代中

for pr in $(gh pr list --json number,statusCheckRollup --jq '.[] | select(.statusCheckRollup | all(.conclusion == "SUCCESS")) | .number'); do

Check for do-not-merge label

if ! gh pr view "$pr" --json labels --jq '.labels[].name' | grep -q "do-not-merge"; then echo "Merging PR #$pr (CI passed)" gh pr merge "$pr" --squash --delete-branch
# Get linked issue and mark done
ISSUE=$(gh pr view "$pr" --json body --jq '.body' | grep -oE 'Closes #[0-9]+' | grep -oE '[0-9]+' | head -1)
if [ -n "$ISSUE" ]; then
  # Update project board status to Done
  mark_issue_done "$ISSUE"
fi
fi done

**Do NOT:**
- Report "PRs are ready for merge" and stop
- Wait for user to request merge
- Summarize completed work and ask for next steps

**The loop continues until scope is complete. Green PR = immediate merge.**
for pr in $(gh pr list --json number,statusCheckRollup --jq '.[] | select(.statusCheckRollup | all(.conclusion == "SUCCESS")) | .number'); do

检查是否有do-not-merge标签

if ! gh pr view "$pr" --json labels --jq '.labels[].name' | grep -q "do-not-merge"; then echo "正在合并PR #$pr(CI已通过)" gh pr merge "$pr" --squash --delete-branch
# 获取关联议题并标记为完成
ISSUE=$(gh pr view "$pr" --json body --jq '.body' | grep -oE 'Closes #[0-9]+' | grep -oE '[0-9]+' | head -1)
if [ -n "$ISSUE" ]; then
  # 更新项目看板状态为已完成
  mark_issue_done "$ISSUE"
fi
fi done

**请勿:**
- 报告“PR已就绪可合并”后停止
- 等待用户请求合并
- 总结已完成工作并询问下一步操作

**循环会持续运行直至范围完成。绿色PR = 立即合并。**

Scope Types

范围类型

Milestone

里程碑

bash
gh issue list --milestone "v1.0.0" --state open --json number --jq '.[].number'
bash
gh issue list --milestone "v1.0.0" --state open --json number --jq '.[].number'

Epic

史诗

bash
gh issue list --label "epic-dark-mode" --state open --json number --jq '.[].number'
bash
gh issue list --label "epic-dark-mode" --state open --json number --jq '.[].number'

Unbounded (All Open Issues)

无边界(所有未关闭议题)

bash
gh issue list --state open --json number --jq '.[].number'
Do NOT ask for "UNBOUNDED" confirmation. The user's request is their consent.
bash
gh issue list --state open --json number --jq '.[].number'
请勿询问“无边界”确认。用户的请求即视为同意。

Failure Handling

故障处理

Workers that fail do NOT immediately become blocked:
Attempt 1 → Research → Attempt 2 → Research → Attempt 3 → Research → Attempt 4 → BLOCKED
Only after 3+ research cycles is an issue marked as blocked.
See:
reference/failure-recovery.md
for research cycle implementation.
失败的工作进程不会立即被标记为阻塞:
尝试1 → 研究 → 尝试2 → 研究 → 尝试3 → 研究 → 尝试4 → 阻塞
只有经过3次以上研究周期后,议题才会被标记为阻塞。
参考:
reference/failure-recovery.md
包含研究周期的实现说明。

Blocked Determination

阻塞判定

An issue is only marked blocked when:
  • Multiple research cycles completed (3+)
  • Research concludes "impossible without external input"
  • Examples: missing credentials, requires human decision, external service down
只有满足以下条件时,议题才会被标记为阻塞:
  • 已完成多次研究周期(3次及以上)
  • 研究结论为“无外部输入则无法完成”
  • 示例:缺少凭据、需要人工决策、外部服务宕机

SLEEP/WAKE

SLEEP/WAKE

Entering SLEEP

进入休眠

Orchestration sleeps when:
  • All issues are either blocked or in review
  • No work can proceed without external event
State is posted to GitHub tracking issue (survives crashes).
在以下情况下,编排会进入休眠:
  • 所有议题要么被阻塞,要么处于审核中
  • 无外部事件则无法继续工作
状态会发布到GitHub跟踪议题(可在崩溃后存活)。

WAKE Mechanisms

唤醒机制

  • Session start - Checks CI status on new Codex session
  • Manual -
    codex resume [SESSION_ID]
  • 会话启动 - 在新Codex会话中检查CI状态
  • 手动 -
    codex resume [SESSION_ID]

Checklist

检查清单

Before starting orchestration:
  • Scope identified (explicit or auto-detected)
  • Git worktrees available (
    git worktree list
    )
  • GitHub CLI authenticated (
    gh auth status
    )
  • No uncommitted changes in main worktree
  • Tracking issue exists with
    orchestration-tracking
    label
  • Project board configured with Status field
Bootstrap phase:
  • Existing open PRs detected
  • Release placeholders excluded (
    release/*
    ,
    release-placeholder
    ,
    do-not-merge
    labels)
  • CI status checked for each PR
  • Review artifacts verified before merge
  • PRs merged or flagged for attention
  • Bootstrap complete before spawning workers
During orchestration:
  • Workers spawned with worktree isolation
  • Worker status tracked via Project Board (NOT labels)
  • CI status monitored
  • Review artifacts verified before PR merge
  • Failed workers trigger research cycles
  • Handovers happen at turn limit
  • SLEEP entered when only waiting on CI
  • Deviation resolution checked each loop
  • Status posted to tracking issue
启动编排前:
  • 已确定范围(显式指定或自动检测)
  • Git工作树可用(
    git worktree list
  • GitHub CLI已认证(
    gh auth status
  • 主工作树中无未提交更改
  • 存在带有
    orchestration-tracking
    标签的跟踪议题
  • 项目看板已配置状态字段
引导阶段:
  • 已检测到现有未关闭PR
  • 已排除发布占位符(
    release/*
    release-placeholder
    do-not-merge
    标签)
  • 已检查每个PR的CI状态
  • 合并前已验证审核工件
  • PR已合并或标记为需要关注
  • 引导阶段完成后才生成工作进程
编排期间:
  • 工作进程使用工作树隔离生成
  • 工作进程状态通过项目看板跟踪(而非标签)
  • CI状态已监控
  • PR合并前已验证审核工件
  • 失败的工作进程触发研究周期
  • 在轮次限制时进行交接
  • 仅等待CI时进入休眠
  • 每次循环都检查偏差解决
  • 状态已发布到跟踪议题

Review Enforcement

审核强制

CRITICAL: The orchestrator verifies review compliance:
  1. Before PR merge:
    • Review artifact exists in issue comments
    • Review status is COMPLETE
    • Unaddressed findings = 0
  2. Child issues (from deferred findings):
    • Follow full
      issue-driven-development
      process
    • Have their own code reviews
    • Track via
      spawned-from:#N
      label
  3. Deviation handling:
    • Parent status set to Blocked on project board
    • Resumes only when all children closed
关键注意事项: 编排器会验证审核合规性:
  1. PR合并前:
    • 议题评论中存在审核工件
    • 审核状态为已完成
    • 未解决的问题数为0
  2. 子议题(来自延迟发现的问题):
    • 遵循完整的
      issue-driven-development
      流程
    • 有独立的代码审核
    • 通过
      spawned-from:#N
      标签跟踪
  3. 偏差处理:
    • 父议题在项目看板中的状态设置为阻塞
    • 仅当所有子议题关闭后才恢复

Integration

集成

This skill coordinates:
SkillPurpose
worker-dispatch
Spawning workers
worker-protocol
Worker behavior
worker-handover
Context passing
ci-monitoring
CI and WAKE handling
research-after-failure
Research cycles
issue-driven-development
Worker follows this
comprehensive-review
Workers must complete before PR
project-board-enforcement
ALL state queries and updates
该技能与以下技能协同工作:
技能用途
worker-dispatch
生成工作进程
worker-protocol
规范工作进程行为
worker-handover
上下文传递
ci-monitoring
CI和WAKE处理
research-after-failure
研究周期
issue-driven-development
工作进程遵循该流程
comprehensive-review
工作进程必须在PR前完成该审核
project-board-enforcement
所有状态查询与更新操作

Reference Files

参考文件

  • reference/state-management.md
    - State queries, updates, deviation handling
  • reference/loop-implementation.md
    - Full loop code and helpers
  • reference/failure-recovery.md
    - Research cycles, blocked handling, SLEEP/WAKE
  • reference/state-management.md
    - 状态查询、更新、偏差处理
  • reference/loop-implementation.md
    - 完整循环代码与辅助函数
  • reference/failure-recovery.md
    - 研究周期、阻塞处理、SLEEP/WAKE