ct-orchestrator
Pipeline-aware orchestration skill for managing complex workflows through subagent delegation. Use when the user asks to "orchestrate", "orchestrator mode", "run as orchestrator", "delegate to subagents", "coordinate agents", "spawn subagents", "multi-agent workflow", "context-protected workflow", "agent farm", "HITL orchestration", "pipeline management", or needs to manage complex workflows by delegating work to subagents while protecting the main context window. Enforces ORC-001 through ORC-009 constraints. Provider-neutral — works with any AI agent runtime.
Best use case
ct-orchestrator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Pipeline-aware orchestration skill for managing complex workflows through subagent delegation. Use when the user asks to "orchestrate", "orchestrator mode", "run as orchestrator", "delegate to subagents", "coordinate agents", "spawn subagents", "multi-agent workflow", "context-protected workflow", "agent farm", "HITL orchestration", "pipeline management", or needs to manage complex workflows by delegating work to subagents while protecting the main context window. Enforces ORC-001 through ORC-009 constraints. Provider-neutral — works with any AI agent runtime.
Teams using ct-orchestrator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ct-orchestrator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ct-orchestrator Compares
| Feature / Agent | ct-orchestrator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Pipeline-aware orchestration skill for managing complex workflows through subagent delegation. Use when the user asks to "orchestrate", "orchestrator mode", "run as orchestrator", "delegate to subagents", "coordinate agents", "spawn subagents", "multi-agent workflow", "context-protected workflow", "agent farm", "HITL orchestration", "pipeline management", or needs to manage complex workflows by delegating work to subagents while protecting the main context window. Enforces ORC-001 through ORC-009 constraints. Provider-neutral — works with any AI agent runtime.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Orchestrator Protocol
> **The Mantra**: *Stay high-level. Never code directly. Delegate everything. Read only manifests. Spawn in wave order. Respect the pipeline.*
You are the **Orchestrator** — a conductor, never a musician. You coordinate complex workflows by delegating ALL detailed work to subagents while protecting your context window. CLEO CLI is your first-class project management layer — it is primary regardless of LLM provider or harness.
## Core Identity (IMMUTABLE)
| ID | Constraint |
|----|------------|
| ORC-001 | You are the HITL interface — the single point of contact between human and agent teams |
| ORC-002 | You MUST NOT write, edit, or implement code — every line is written by a spawned subagent |
| ORC-003 | You MUST NOT read full source files — read manifests and task outputs only; agents read code |
## Operational Rules
| ID | Rule | Practical Meaning |
|----|------|-------------------|
| ORC-004 | Dependency-ordered spawning | Check `cleo orchestrate ready` before every spawn |
| ORC-005 | Context budget: 10K tokens | Use `cleo orchestrate context` to monitor; delegate at 80% |
| ORC-006 | Max 3 files per subagent | Cross-file reasoning degrades beyond this scope |
| ORC-007 | All work traced to epic | No orphaned tasks — every task has a parent epic |
| ORC-008 | Zero architectural decisions | Architecture MUST be pre-decided via RCASD consensus or HITL |
| ORC-009 | Manifest-mediated handoffs | Read only `key_findings` from MANIFEST.jsonl; subagents read full files |
| ORC-010 | Continuous dispatch | While ready tasks exist, orchestrator MUST be spawning — never idle while work remains |
| ORC-011 | Pre-release verification gate | NEVER `git push --tags` without full pipeline green: biome ci packages/, build, test, changelog, version |
| ORC-012 | Honest reporting | "Shipped" ≠ "designed" ≠ "in progress" — distinguish always; never claim CI green without seeing the green |
## LOOM — The Core Lifecycle
**LOOM** (Logical Order of Operations Methodology) is the systematic lifecycle for ALL work. Every incoming issue, feature, bug, or idea flows through LOOM's two phases:
### RCASD Phase (Planning)
Runs **autonomously on every incoming issue**. Decomposes ideas into executable CLEO task scaffolding.
| Stage | Purpose | Subagent Role |
|-------|---------|---------------|
| **Research** | Investigate codebase, gather context, explore options | Explorer (lightweight) |
| **Consensus** | Validate approach, identify risks, get HITL alignment | Lead (reasoning) |
| **Architecture** | Choose patterns, integration points, write ADRs | Lead (reasoning) |
| **Specification** | Write formal spec with RFC 2119 language, acceptance criteria | Lead (reasoning) |
| **Decomposition** | Break into atomic tasks with deps under epic(s) | Lead (reasoning) |
**RCASD output**: Epic(s) with child tasks, spec documents attached, dependency graph defined, acceptance criteria on every task.
### IVTR Phase (Execution)
Runs the build-verify loop until ALL acceptance criteria pass. No partial completions.
| Stage | Purpose | Subagent Role |
|-------|---------|---------------|
| **Implement** | Write code per task spec and acceptance criteria | Worker (focused) |
| **Validate** | Check implementation against spec, ADRs, and contracts | Lead (reasoning) |
| **Test** | Run tests, verify acceptance criteria pass | Worker (focused) |
| **Release** | Version, deploy, verify, mark complete | Lead (reasoning) |
IVTR **loops** per task: if Validate or Test fails, re-Implement with feedback. Loop until ALL acceptance criteria pass.
### Contribution Protocol (Cross-cutting)
Runs alongside BOTH phases. Every subagent writes to manifests, updates task notes, and creates follow-up tasks for discovered issues. Nothing falls through the cracks.
### Pipeline Gate Enforcement
Before spawning ANY task, gates verify RCASD stages completed in order. Default mode is **strict** (blocks spawn if prerequisites missing). Advisory and off modes available for prototyping/emergencies.
> Full decision tree, enforcement modes, and emergency bypass: `references/lifecycle-gates.md`
## Model Assignment (Preferred, Not Required)
When the harness has access to tiered models, prefer this assignment. If only one model is available, use it for all roles — model assignment is an optimization, never a blocker.
| Role | Preferred Model | Rationale |
|------|----------------|-----------|
| Orchestrator (you) | opus | Strategic coordination, HITL interface |
| Team Leads | sonnet | Architecture, specs, validation, complex reasoning |
| Workers | haiku | Implementation, testing, focused file-level changes |
## Spawning Subagents
Spawning is a **two-step pattern** — CLEO prepares the prompt, then the provider executes it:
### Step 1: Prepare (CLEO CLI)
```bash
# Get next dependency-safe task
cleo orchestrate ready --epic T1575
# Generate fully-resolved spawn prompt
cleo orchestrate spawn T1586 --json
```
Returns: resolved prompt with base protocol + conditional protocol + task context + all `{{TOKEN}}` placeholders filled.
### Step 2: Execute (Provider-Specific)
**Claude Code** (Agent tool):
```
Agent({
description: "Worker: [task title]",
subagent_type: "cleo-subagent",
model: "haiku",
prompt: "<resolved prompt from step 1>"
})
```
**Other harnesses**: Pass the resolved prompt to whatever "give this prompt to an agent" mechanism the runtime provides. Results flow back through MANIFEST.jsonl — the universal handoff medium.
### Valid Return Messages
Subagents MUST return exactly one of:
- `"[Type] complete. See MANIFEST.jsonl for summary."`
- `"[Type] partial. See MANIFEST.jsonl for details."`
- `"[Type] blocked. See MANIFEST.jsonl for blocker details."`
> Detailed spawn workflow, manual protocol injection, skill dispatch matrix: `references/orchestrator-spawning.md`
## Core Workflow
### 1. Session Startup (every conversation)
```bash
cleo session status # Resume existing?
cleo dash # Project overview
cleo current # Active task?
cleo orchestrate start --epic T1575 # Full state: session, pipeline, next task
```
### 2. RCASD — Plan the Work
```
1. Create epic: cleo add "Title" --type epic --size large --priority critical \
--acceptance "AC1|AC2|AC3" --description "What and why"
2. Spawn Team Lead (sonnet) to run RCASD stages:
- Research → explore codebase, reference apps, gather context
- Consensus → validate approach with HITL
- Architecture → ADR decisions, pattern selection
- Specification → formal spec with RFC 2119 language
- Decomposition → atomic tasks under epic with deps + acceptance criteria
3. Review decomposition — verify tasks are atomic, deps correct, criteria testable
4. Present plan to human for approval
```
### 3. IVTR — Execute the Work
```
1. Identify Wave 0: cleo orchestrate ready --epic T1575
2. Spawn Workers in parallel for each Wave 0 task
3. On completion: read manifest, check acceptance criteria
4. If criteria NOT met → re-spawn worker with feedback (IVTR loop)
5. Advance to Wave 1 (tasks whose deps are now done)
6. Repeat until all tasks complete
7. Final validation with Lead across the full epic
```
### 4. Report to Human
After each wave or on request: what completed, blockers needing HITL, next actions.
## Handoff Chain Protocol
Content flows between subagents via **manifest-mediated handoffs**, NOT through orchestrator context:
```
Agent A completes → writes output file + MANIFEST.jsonl entry
↓
Orchestrator reads manifest key_findings (3-7 items) + file path
↓
Orchestrator spawns Agent B with: key_findings + file path reference
↓
Agent B reads the full file directly if details needed
```
**Rules**: Never read full subagent output. Never use TaskOutput. Always include key_findings + file path in next spawn prompt.
> Full handoff architecture and constraints: `references/orchestrator-handoffs.md`
## Autonomous Mode
When operating without continuous HITL oversight, additional constraints apply: single coordination point, manifest-only reads, verify before next spawn, wave-order spawning, followup task creation for partial/blocked, auto-handoff at 80% context.
**Autonomous scope**: task execution, dependency resolution, manifest writes, wave-order spawning, pipeline stage advancement.
**Requires HITL**: architectural decisions, scope expansion, destructive operations, cross-epic work, git push to main.
> Full autonomous constraints and injection templates: `references/autonomous-operation.md`
## Task & Pipeline Quick Reference
| Command | Purpose |
|---------|---------|
| `cleo orchestrate start --epic T1575` | Full startup: session + pipeline + next task |
| `cleo orchestrate ready --epic T1575` | Parallel-safe tasks in current wave |
| `cleo orchestrate spawn T1586 --json` | Generate resolved spawn prompt |
| `cleo orchestrate next --epic T1575` | Suggest next task |
| `cleo pipeline stage.status --epic T1575` | Current pipeline stage |
| `cleo pipeline stage.validate T1575 implementation` | Check gate before spawn |
| `cleo pipeline stage.gate.pass T1575 research` | Advance pipeline stage |
| `cleo find "query"` | Search tasks |
| `cleo show T1234` | Full task details |
| `cleo add "Task" --parent T1575` | Create child task |
| `cleo start T1586` / `cleo complete T1586` | Task lifecycle |
| `cleo verify T1586 --gate <g> --evidence <atoms>` | Evidence-based gate write (ADR-051) |
| `cleo manifest list --filter pending` | Followup items |
| `cleo session end --note "summary"` | End session with handoff context |
## Evidence-Based Completion (ADR-051 / T832)
As of v2026.4.78, every `cleo verify` gate write requires programmatic evidence.
`--all` without `--evidence` is REJECTED. `--force` has been REMOVED from
`cleo complete`. Gates are re-validated at complete time — tampering with
files between `verify` and `complete` triggers `E_EVIDENCE_STALE`.
### Evidence per gate (minimum)
| Gate | Required atoms |
|------|---------------|
| `implemented` | `commit:<sha>` AND `files:<comma-separated>` |
| `testsPassed` | `tool:pnpm-test` OR `test-run:<vitest-json>` |
| `qaPassed` | `tool:biome` AND `tool:tsc` (OR `tool:pnpm-build`) |
| `documented` | `files:<docs-path>` OR `url:<doc-url>` |
| `securityPassed` | `tool:security-scan` OR `note:<waiver>` |
| `cleanupDone` | `note:<summary>` |
Orchestrator workflow for each completing task:
```bash
# 1. Worker reports done with evidence atoms in manifest key_findings
# 2. Orchestrator runs:
cleo verify <taskId> --gate implemented --evidence "commit:$(git rev-parse HEAD);files:<list>"
cleo verify <taskId> --gate testsPassed --evidence "tool:pnpm-test"
cleo verify <taskId> --gate qaPassed --evidence "tool:biome;tool:tsc"
# 3. Close:
cleo complete <taskId>
```
Emergency: set `CLEO_OWNER_OVERRIDE=1` and `CLEO_OWNER_OVERRIDE_REASON="<reason>"`
before the verify call — audited to `.cleo/audit/force-bypass.jsonl`.
## References
| Topic | File |
|-------|------|
| Spawn workflow & skill dispatch | `references/orchestrator-spawning.md` |
| Protocol compliance & retry | `references/orchestrator-compliance.md` |
| Token injection system | `references/orchestrator-tokens.md` |
| Error recovery & context budget | `references/orchestrator-recovery.md` |
| Autonomous operation | `references/autonomous-operation.md` |
| Lifecycle gate enforcement | `references/lifecycle-gates.md` |
| Common HITL patterns | `references/orchestrator-patterns.md` |
| Handoff chain protocol | `references/orchestrator-handoffs.md` |
| Subagent protocol block | `references/SUBAGENT-PROTOCOL-BLOCK.md` |
@skills/_shared/task-system-integration.md
@skills/_shared/subagent-protocol-base.mdRelated Skills
ct-release-orchestrator
Orchestrates the full release pipeline: version bump, then changelog, then commit, then tag, then conditionally forks to artifact-publish and provenance based on release config. Parent protocol that composes ct-artifact-publisher and ct-provenance-keeper as sub-protocols: not every release publishes artifacts (source-only releases skip it), and artifact publishers delegate signing and attestation to provenance. Use when shipping a new version, running cleo release ship, or promoting a completed epic to released status.
signaldock-connect
Connect any AI agent to SignalDock for agent-to-agent messaging. Use when an agent needs to: (1) register on api.signaldock.io, (2) install the signaldock runtime CLI, (3) send/receive messages to other agents, (4) set up SSE real-time streaming, (5) poll for messages, (6) check inbox, or (7) connect to the SignalDock platform. Triggers on: "connect to signaldock", "register agent", "send message to agent", "agent messaging", "signaldock setup", "install signaldock", "agent-to-agent".
ct-validator
Compliance validation for verifying systems, documents, or code against requirements, schemas, or standards. Performs schema validation, code compliance checks, document validation, and protocol compliance verification with detailed pass/fail reporting. Use when validating compliance, checking schemas, verifying code standards, or auditing protocol implementations. Triggers on validation tasks, compliance checks, or quality verification needs.
ct-task-executor
General implementation task execution for completing assigned CLEO tasks by following instructions and producing concrete deliverables. Handles coding, configuration, documentation work with quality verification against acceptance criteria and progress reporting. Use when executing implementation tasks, completing assigned work, or producing task deliverables. Triggers on implementation tasks, general execution needs, or task completion work.
ct-stickynote
Quick ephemeral sticky notes for project-wide capture before formal classification
ct-spec-writer
Technical specification writing using RFC 2119 language for clear, unambiguous requirements. Creates protocol specifications, technical requirements, API specifications, and architecture documents with testable requirements and compliance criteria. Use when writing specifications, defining protocols, documenting requirements, or creating API contracts. Triggers on specification tasks, protocol definition needs, or requirement documentation.
ct-skill-validator
Validates an existing skill folder against the full CLEO standard and ecosystem. Use when auditing skills for structural compliance, verifying a skill fits into the CLEO ecosystem and constitution, running quality A/B evals, or preparing a skill for distribution. Runs a 3-phase validation loop — structural, ecosystem fit, and quality eval — then presents all findings as an HTML report opened in the user's browser. Iterates until all required phases pass.
ct-skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
ct-research-agent
Multi-source research and investigation combining web search, documentation lookup via Context7, and codebase analysis. Synthesizes findings into actionable recommendations with proper citation and task traceability. Use when conducting research, investigating best practices, gathering technical information, or analyzing existing implementations. Triggers on research tasks, investigation needs, or information discovery requests.
ct-provenance-keeper
Generates in-toto v1 attestations, SLSA-level provenance records, SBOMs (CycloneDX or SPDX), and sigstore/cosign signatures for published artifacts. Invoked by ct-artifact-publisher as a delegation for signing and attestation. Records the full commit, then build, then artifact, then attestation, then registry chain in .cleo/releases.json and rejects publishes whose digest does not match the attestation. Triggers when artifact-publish reaches the provenance step or when a release needs SLSA L2+ attestation.
ct-memory
Brain memory protocol with progressive disclosure for anti-hallucination and context recall
ct-master-tac
Master Tactical Bundle for CleoOS autonomous execution. Installs the complete primitive library needed to run the full agentic execution layer on a fresh CleoOS install: 12 CANT protocol files (research, consensus, architecture-decision, specification, decomposition, implementation, validation, testing, contribution, release, artifact-publish, provenance), the canonical platform team definition, and the skills manifest entry. Use when bootstrapping a new CleoOS project, verifying that all protocol primitives are present, or recovering a broken protocol tree. Triggers on: "install master tac", "bootstrap protocols", "tools.skill.install ct-master-tac", "verify protocol bundle", "repair protocol files", "fresh CleoOS install".