fanout

GitHub

安全并行执行无依赖子任务,为每个任务创建隔离工作区并派生子代理实现,自动交叉审查PR,最终由人工合并。

examples/polly/skills/fanout/SKILL.md omnigent-ai/omnigent

Trigger Scenarios

需要并行处理多个独立子任务 协调多个AI代理同时开发不同模块

Install

npx skills add omnigent-ai/omnigent --skill fanout -g -y
More Options

Non-standard path

npx skills add https://github.com/omnigent-ai/omnigent/tree/main/examples/polly/skills/fanout -g -y

Use without installing

npx skills use omnigent-ai/omnigent@fanout

指定 Agent (Claude Code)

npx skills add omnigent-ai/omnigent --skill fanout -a claude-code -g -y

安装 repo 全部 skill

npx skills add omnigent-ai/omnigent --all -g -y

预览 repo 内 skill

npx skills add omnigent-ai/omnigent --list

SKILL.md

Frontmatter
{
    "name": "fanout",
    "description": "Run independent subtasks in parallel — one git worktree and one implementation sub-agent per task, each opening its own PR — then cross-review every PR. polly never merges; the human does."
}

fanout — safe parallel execution

Use ONLY for subtasks that are parallel-safe (no shared files, no ordering dependency).

Procedure

  1. Per task, create an isolated worktree: sys_os_shell("git worktree add .worktrees/<task_id> -b polly/<task_id>"). Record the worktree path + branch in the registry (.polly/registry.json).
  2. Dispatch one implementation sub-agent per task, scoped to its worktree: sys_session_send(agent="claude_code"|"codex"|"opencode"|"cursor"|"hermes"|"agy", title="<task_slug>", args={purpose: "implement", input: "<task + acceptance contract + worktree path>"}). Use a short task-based title such as auth-refactor or fix-sse-error, never the raw vendor name. State the scope and that it must work only inside .worktrees/<task_id>. The worker drives the task to green and opens its OWN PR for the branch. Every commit the worker authors must end with a blank line followed by the exact co-sign trailer as its final line — Co-authored-by: omnigent <noreply@omnigent.ai>. For a long-running claude_code or codex implementation with an explicit completion condition, the input may instead be one standalone /goal <condition> command containing that same task, worktree, acceptance contract, green gates, and PR requirement. Do not use child goal mode for other workers or non-implementation purposes. Record each handle's conversation_id in the registry. Emit the worktree + sys_session_send tool calls in THIS turn — never end a turn having only said you will dispatch; the dispatch calls and their announcement go in the same turn. Dispatch the whole parallel-safe set, THEN (and only then) END YOUR TURN. Do not poll.
  3. Each sub-agent runs autonomously and notifies you through the inbox when it finishes. Collect its structured result with sys_read_inbox and record the PR URL in the registry. If the inbox result is empty/unclear, inspect that worker conversation with sys_session_get_history before deciding what to do next.
  4. Send each finished task's PR through cross-review.
  5. polly does NOT merge — the PR is the deliverable. When cross-review passes, the task is done: mark it ready in the registry with its PR URL and leave it for the human to review and merge. Never run git merge / gh pr merge.
  6. Remove a finished worktree (git worktree remove) only once its PR is open and review is clean — the branch lives on the remote, so the worktree is disposable. Don't remove a worktree that still has open fix-tasks.

Notes

  • Respect the per-turn dispatch cap (enforced by policy). More tasks than the cap → dispatch in waves (let the running batch finish before dispatching more).
  • The human can open any sub-agent in the UI's Subagents panel and read its conversation while it runs.
  • If a running worker is wrong, runaway, superseded, or no longer useful, call sys_cancel_task with task_id set to the recorded conversation_id before dispatching a replacement. claude_code is hard-stopped; codex cancellation is best-effort until its runner-side hard-stop exists.
  • A sub-agent that returns a dark or failing result: don't re-prompt it in a loop — re-dispatch a fresh implementation sub-agent in a clean worktree, or escalate to the user.
  • Because polly never merges, cross-PR conflicts surface when the human merges, not here. Keeping each parallel task's file scope disjoint is what keeps that rare — honor it.

Version History

  • a8f41cb Current 2026-08-12 09:03

Same Skill Collection

.claude/skills/antigravity-sdk-e2e-dev/SKILL.md
.claude/skills/copilot-sdk-e2e-dev/SKILL.md
.claude/skills/cursor-sdk-e2e-dev/SKILL.md
.claude/skills/harness-integration-guide/SKILL.md
.claude/skills/pi-native-e2e-dev/SKILL.md
deploy/docker/SKILL.md
examples/debby/skills/debate/SKILL.md
examples/deep-research/skills/deep-research/SKILL.md
examples/polly/skills/cross-review/SKILL.md
examples/polly/skills/investigate/SKILL.md
examples/scribe/skills/api-docs/SKILL.md
examples/scribe/skills/changelog/SKILL.md
examples/scribe/skills/migration-guide/SKILL.md
examples/sentinel/skills/security-audit/SKILL.md
omnigent/onboarding/agent/skills/build-omnigent/SKILL.md
omnigent/onboarding/agent/skills/detect-framework/SKILL.md
omnigent/onboarding/agent/skills/omnigent-knowledge/SKILL.md
.claude/skills/antigravity-native-e2e-dev/SKILL.md
.claude/skills/cli-setup-verify/SKILL.md
.claude/skills/polly-e2e-dev/SKILL.md
.claude/skills/run-load-test/SKILL.md

Metadata

Files
0
Version
0bea987
Hash
d01d3ffd
Indexed
2026-08-12 09:03

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-12 22:00
浙ICP备14020137号-1 $お客様$