orca-orchestrator
Coordinate supervised Orca workers across parallel git worktrees, threaded FIFO inboxes, injected preambles, and structured worker_done settlements. Do not use for non-Orca single-agent tasks.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- orca-orchestrator
- description
- Coordinate supervised Orca workers across parallel git worktrees, threaded FIFO inboxes, injected preambles, and structured worker_done settlements. Do not use for non-Orca single-agent tasks.
02 资源文件 3
- 参考文档CARD.md3.2 KB
- 参考文档config.default.yaml490 B
- 脚本scripts/orca_coordinator.py1.4 KB
03 SKILL.md 正文
Orca Orchestrator: Multi-Agent Worktree & Swarm Supervisor
orca-orchestrator coordinates parallel autonomous agent swarms (Codex CLI, Claude Code, OpenCode, Pi) within isolated Git worktrees. It enforces authoritative Dispatch preambles, layered liveness detection, FIFO coordinator mailboxes with 15s keepalives, and explicit settlement gates.
See CARD.md for the companion summary card, 5D complexity radar, and invariants checklist.
Consult orca_bridge plugin in plugins/agent_orchestration/orca_bridge/ for programmatic IoC container resolution.
The Three Foundational Pillars
1. Visual Brief & Telemetry Pillar
Every multi-agent swarm run can render an interactive HTML visual brief in %TEMP%\orca-orchestrator-<timestamp>.html detailing worktree topologies, worker placement DAGs, and mailbox delivery queues.
2. Mandatory Checkpoint & Governance Pillar
Coordinators must never dispatch destructive swarm actions or release unresolved resources without presenting an implementation_plan.md artifact with RequestFeedback: true to obtain explicit operator authorization.
3. Anti-Pattern Invariants
Rigid architectural guardrails prevent unacknowledged message storms, detached worktrees, and ambiguous task settlement.
5-Stage Progression Matrix
[1. Surface & Role Classification] ──► [2. Worktree & Worker Placement]
│
▼
[5. Settlement & Worktree Cleanup] ◄── [4. Supervised Mailbox Coordination] ◄── [3. Injected Dispatch Preamble]
1. Surface & Role Classification
Classify the operational boundary and user intent before launching terminals or worktrees:
- Role Identification:
- Coordinator: User requests supervision, progress tracking, DAG coordination, or decision gates. Binds an orchestration Run.
- Dispatched Worker: Current prompt has an injected preamble with
TASK_IDandDISPATCH_ID. Follow worker obligations and idle afterworker_done. - Handoff Owner: User requests full transfer of ownership ("handoff", "give this to another agent"). Launch independent worktree with
--no-parentand stop.
- Path & Environment Verification:
- Confirm repo path and resolve the authoritative
orcaCLI executable. - Ensure execution host capabilities match required models (
gpt-6-astra,claude-3-7-sonnet).
- Confirm repo path and resolve the authoritative
Completion criterion: Role determined, operational mode selected, and CLI runtime verified.
2. Worktree & Worker Placement
Provision isolated Git worktrees to prevent workspace lock contention across parallel agents:
- Worktree Provisioning:
- Format worktree identifier strictly as
<repoId>::<worktreePath>. - For independent tasks:
orca worktree create --name <task-name> --no-parent --json. - For stacked work: specify
--parent-worktree active.
- Format worktree identifier strictly as
- Worker Dispatch Placement:
- Dispatch workers with:
orca orchestration worker-start --task <task_id> --worktree <wt_id> --agent codex --model <model> --effort <level> --json - Distinguish fleet projection liveness (
projection.liveness) from physical PTY observation status (observation.status).
- Dispatch workers with:
Completion criterion: Dedicated worktree created, worker dispatched, and Dispatch ID recorded.
3. Injected Dispatch Preamble
Inject immutable authority into worker terminals:
- Authority Construction:
- Construct authoritative preamble containing:
TASK_ID: Unique task node identifier.DISPATCH_ID: Authoritative attempt identifier.COORDINATOR_MAILBOX: Run mailbox address (run:<id>).
- Construct authoritative preamble containing:
- Worker Obligations:
- Worker must do ONLY the specified task.
- For blocking questions, send
orca orchestration replyrather than opening a local TUI. - Send heartbeats only at the cadence specified in the preamble.
- Never encode completion or failure in freeform prose; always emit structured
worker_done.
Completion criterion: Preamble delivered to worker PTY and acknowledged.
4. Supervised Mailbox Coordination
Manage the asynchronous coordinator inbox to track progress without busy-waiting:
- FIFO Mailbox Ingestion:
- Check messages with:
orca orchestration check --wait --timeout-ms 60000 --json - Ignore
_keepalivetelemetry lines (emitted every 15s to verify process liveness).
- Check messages with:
- Batch Acknowledgment:
- Process every message in the delivery batch before acknowledging with
--ack <delivery_id>. - Answer worker questions promptly via:
orca orchestration reply --id <msg_id> --body "<answer>" --json
- Process every message in the delivery batch before acknowledging with
Completion criterion: All delivery batches processed and acknowledged with zero dropped messages.
5. Settlement & Worktree Cleanup
Conclude the orchestration cycle with explicit verification and resource reclamation:
- Settlement Verification:
- Worker transmits terminal settlement signal:
orca orchestration send --type worker_done --outcome succeeded --files-modified "<csv>" --report-path "<path>" --json - Verify outcome is explicitly
succeededorfailed.
- Worker transmits terminal settlement signal:
- Resource Release & Retention:
- On success: merge or archive branch, and release worker terminal via
orca orchestration worker-release --dispatch <dispatch_id>. - On failure: preserve worktree for inspection (
worker-abandon), retaining all diagnostic logs.
- On success: merge or archive branch, and release worker terminal via
Completion criterion: Final task outcome reported to user with evidence, and settled resources reclaimed.
Invariant Checklist
- [ ] All worktrees strictly addressed as
<repoId>::<worktreePath>. - [ ] Coordinator inbox polled with
--waitand acknowledged in atomic FIFO batches. - [ ]
worker_donemessages contain explicit--outcome succeededor--outcome failed. - [ ] No local TUI question prompts spawned in headless worker terminals.
- [ ] Slotted domain models (
slots=True,frozen=True) used for all internal coordination records.
Anti-Patterns
- Ambiguous Worktree Addressing — Truncating worktree IDs to raw repo IDs instead of using the two-part
<repoId>::<worktreePath>format causes target resolution failures. - Prose-Only Failure Encoding — Describing task errors in markdown text without emitting an explicit
--outcome failedflag prevents coordinator automated error handling. - Unacknowledged Batch Thrashing — Polling coordinator inboxes without acknowledging previous delivery batches via
--ackcauses identical message replays. - Premature Worktree Deletion — Deleting worktree directories before verifying worker exit status discards diagnostic test logs and uncommitted git diffs.
- Busy Polling Main Loops — Polling the coordinator inbox in a tight sleep loop instead of using
--waitwith 15s keepalive streams burns excessive CPU cycles.
04 同仓库更多 Skills
ui-behavior-primitive-architect
Architect, audit, and verify zero-dependency headless UI behavior primitives, WebMCP agent bridges, WAI-ARIA/SSR/RTL tri-modal checks, and framework expert routing. Do not use for static CSS theme styling or backend database migrations.
trustgraph-ontology-governor
Govern knowledge graphs, SHACL-AF triple policies, OntologyRAG subclass validation, PROV-O dual named graphs, and Laya entropy decision scoring. Do not use for relational SQL queries or generic web scraping.
shim-harness-governor
Govern universal CLI agent loops, 4-tier tool permissions, ancestor-symlink workspace sandboxes, deterministic-first command routing, collision-safe MCP namespacing, and layered skill loading. Do not use for static UI styling or external SQL analytics.
graphiti-zep-memory-governor
Govern bi-temporal knowledge graphs with Graphiti future-edge clamping, MinHash/LSH entity dedup, RRF/MMR reranking, and Zep typed ontologies. Do not use for static SQL joins or generic web crawling.
agora-mcp-workbench-architect
Architect, audit, and orchestrate Agora Workbench MCP servers, loopback sidecars, unified state graphs, gateway/dispatcher connectors, and policy-enforced data lakes. Do not use for static frontend CSS styling or non-MCP desktop GUI automation.
skill-eval-assurance-runner
Evaluate and assure agent skills using small-N Wilson confidence intervals, unbiased pass^k reliability, deterministic trajectory graders, preflight boundary honesty, and sealed digest verification. Do not use for subjective prose review or unconstrained production deployment.