@cleocode/skills 2026.9.21 → 2026.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -63
- package/frontmatter.d.mts +60 -0
- package/frontmatter.mjs +277 -0
- package/index.d.ts +3 -3
- package/index.js +34 -9
- package/package.json +4 -2
- package/profiles/core.json +10 -3
- package/profiles/full.json +10 -6
- package/profiles/recommended.json +29 -3
- package/skills/_shared/manifest-operations.md +19 -40
- package/skills/_shared/skill-chaining-patterns.md +5 -9
- package/skills/_shared/subagent-protocol-base.md +6 -6
- package/skills/_shared/task-system-integration.md +5 -5
- package/skills/ct-adr-recorder/SKILL.md +18 -17
- package/skills/ct-artifact-publisher/SKILL.md +10 -7
- package/skills/ct-cleo/SKILL.md +26 -9
- package/skills/ct-cleo/references/loom-lifecycle.md +1 -1
- package/skills/{ct-memory/SKILL.md → ct-cleo/references/memory.md} +10 -23
- package/skills/ct-cleo/references/orchestrator-constraints.md +5 -5
- package/skills/ct-cleo/references/session-protocol.md +11 -8
- package/skills/{ct-stickynote/SKILL.md → ct-cleo/references/sticky-notes.md} +7 -29
- package/skills/ct-codebase-mapper/SKILL.md +62 -38
- package/skills/ct-consensus-voter/SKILL.md +10 -7
- package/skills/ct-contribution/SKILL.md +7 -5
- package/skills/ct-dev-workflow/SKILL.md +7 -7
- package/skills/ct-documentor/SKILL.md +29 -29
- package/skills/{ct-docs-review/__tests__/skill-docs-review.test.ts → ct-documentor/__tests__/reviewing-reference.test.ts} +4 -3
- package/skills/{ct-docs-write/__tests__/skill-docs-write.test.ts → ct-documentor/__tests__/writing-reference.test.ts} +4 -3
- package/skills/ct-documentor/references/anti-patterns.md +8 -8
- package/skills/{ct-docs-write → ct-documentor}/references/audience-targeting.md +5 -5
- package/skills/ct-documentor/references/chain-orchestration.md +19 -19
- package/skills/{ct-docs-write → ct-documentor}/references/cleo-style-guide.md +1 -1
- package/skills/ct-documentor/references/doc-types-and-templates.md +1 -1
- package/skills/{ct-docs-review → ct-documentor}/references/pr-review-mode.md +1 -1
- package/skills/{ct-docs-review/SKILL.md → ct-documentor/references/reviewing.md} +6 -26
- package/skills/ct-documentor/references/style-coordination.md +5 -5
- package/skills/{ct-docs-review → ct-documentor}/references/style-violations.md +1 -1
- package/skills/{ct-docs-write/SKILL.md → ct-documentor/references/writing.md} +5 -25
- package/skills/ct-epic-architect/SKILL.md +12 -9
- package/skills/ct-epic-architect/references/commands.md +5 -5
- package/skills/ct-epic-architect/references/output-format.md +2 -2
- package/skills/ct-epic-architect/references/patterns.md +2 -2
- package/skills/ct-epic-architect/references/skill-aware-execution.md +3 -3
- package/skills/ct-grade/SKILL.md +3 -4
- package/skills/ct-grade/agents/scenario-runner.md +1 -1
- package/skills/ct-ivt-looper/SKILL.md +23 -22
- package/skills/ct-lead/SKILL.md +52 -13
- package/skills/ct-lead/references/aggregation-protocol.md +44 -21
- package/skills/ct-lead/references/spawn-pattern.md +12 -11
- package/skills/ct-orchestrator/README.md +2 -2
- package/skills/ct-orchestrator/SKILL.md +14 -10
- package/skills/ct-orchestrator/references/SUBAGENT-PROTOCOL-BLOCK.md +4 -4
- package/skills/ct-orchestrator/references/autonomous-operation.md +4 -4
- package/skills/ct-orchestrator/references/orchestrator-compliance.md +3 -3
- package/skills/ct-orchestrator/references/orchestrator-patterns.md +20 -19
- package/skills/ct-orchestrator/references/orchestrator-recovery.md +13 -23
- package/skills/ct-orchestrator/references/orchestrator-spawning.md +9 -10
- package/skills/ct-orchestrator/references/orchestrator-tokens.md +9 -9
- package/skills/ct-provenance-keeper/SKILL.md +10 -7
- package/skills/ct-release-orchestrator/SKILL.md +21 -13
- package/skills/ct-release-orchestrator/references/composition.md +1 -1
- package/skills/ct-release-orchestrator/references/release-types.md +33 -15
- package/skills/ct-research-agent/SKILL.md +14 -12
- package/skills/ct-research-agent/references/triggers-and-routing.md +4 -4
- package/skills/{ct-skill-creator → ct-skill-author}/SKILL.md +9 -6
- package/skills/{ct-skill-validator → ct-skill-author}/agents/ecosystem-checker.md +1 -1
- package/skills/{ct-skill-validator → ct-skill-author}/evals/quality_evals.json +10 -10
- package/skills/{ct-skill-validator → ct-skill-author}/evals/trigger_queries.json +1 -1
- package/skills/{ct-skill-validator → ct-skill-author}/references/cleo-ecosystem-rules.md +8 -4
- package/skills/{ct-skill-creator → ct-skill-author}/references/provider-deployment.md +10 -6
- package/skills/{ct-skill-validator/SKILL.md → ct-skill-author/references/validating.md} +14 -21
- package/skills/{ct-skill-validator → ct-skill-author}/references/validation-rules.md +2 -2
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/_skill_finder.py +2 -2
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/check_depth.py +2 -5
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/generate_validation_report.py +1 -1
- package/skills/{ct-skill-validator → ct-skill-author}/scripts/run_quality_eval.py +2 -2
- package/skills/ct-spec-writer/SKILL.md +9 -7
- package/skills/ct-task-executor/SKILL.md +19 -16
- package/skills/ct-task-executor/references/common-failures.md +1 -1
- package/skills/ct-validator/SKILL.md +11 -9
- package/skills/ct-validator/references/compliance-reports.md +1 -1
- package/skills/ct-validator/references/validation-modes.md +3 -3
- package/skills/manifest.json +381 -365
- package/dispatch-config.json +0 -983
- package/provider-skills-map.json +0 -97
- package/skills/ct-docs-lookup/SKILL.md +0 -185
- package/skills/ct-docs-lookup/references/ctx7-workflow.md +0 -198
- package/skills/ct-docs-lookup/references/library-id-resolution.md +0 -217
- package/skills/ct-docs-lookup/references/version-specific-docs.md +0 -220
- package/skills/ct-master-tac/SKILL.md +0 -120
- package/skills/ct-master-tac/__tests__/install.test.ts +0 -304
- package/skills/ct-master-tac/bundled/README.md +0 -40
- package/skills/ct-master-tac/bundled/protocols/architecture-decision.cant +0 -90
- package/skills/ct-master-tac/bundled/protocols/artifact-publish.cant +0 -105
- package/skills/ct-master-tac/bundled/protocols/consensus.cant +0 -85
- package/skills/ct-master-tac/bundled/protocols/contribution.cant +0 -92
- package/skills/ct-master-tac/bundled/protocols/decomposition.cant +0 -102
- package/skills/ct-master-tac/bundled/protocols/implementation.cant +0 -77
- package/skills/ct-master-tac/bundled/protocols/provenance.cant +0 -100
- package/skills/ct-master-tac/bundled/protocols/release.cant +0 -107
- package/skills/ct-master-tac/bundled/protocols/research.cant +0 -77
- package/skills/ct-master-tac/bundled/protocols/specification.cant +0 -77
- package/skills/ct-master-tac/bundled/protocols/testing.cant +0 -99
- package/skills/ct-master-tac/bundled/protocols/validation.cant +0 -75
- package/skills/ct-master-tac/bundled/teams/platform.cant +0 -115
- package/skills/ct-master-tac/manifest.json +0 -55
- package/skills/ct-skill-creator/eval-viewer/__pycache__/generate_review.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/manifest-entry.json +0 -17
- package/skills/ct-skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/aggregate_benchmark.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/generate_report.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/improve_description.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/init_skill.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/run_loop.cpython-314.pyc +0 -0
- package/skills/ct-skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
- package/skills/ct-skill-validator/manifest-entry.json +0 -20
- package/skills/ct-stickynote/README.md +0 -14
- package/skills/signaldock-connect/SKILL.md +0 -137
- package/skills/signaldock-connect/assets/agent-card.json +0 -48
- package/skills/signaldock-connect/references/api-endpoints.md +0 -131
- package/skills.json +0 -495
- /package/skills/{ct-docs-review → ct-documentor}/references/inline-comment-patterns.md +0 -0
- /package/skills/{ct-docs-write → ct-documentor}/references/markdown-patterns.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/agents/analyzer.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/agents/comparator.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/agents/grader.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/assets/eval_review.html +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/assets/valid-skill-example.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/eval-viewer/generate_review.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/eval-viewer/viewer.html +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/dynamic-context.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/frontmatter.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/invocation-control.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/output-patterns.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/schemas.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/references/workflows.md +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/__init__.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/aggregate_benchmark.py +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/scripts/audit_body.py +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/scripts/check_ecosystem.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/generate_report.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/improve_description.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/init_skill.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/package_skill.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/quick_validate.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/run_eval.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/run_loop.py +0 -0
- /package/skills/{ct-skill-creator → ct-skill-author}/scripts/utils.py +0 -0
- /package/skills/{ct-skill-validator → ct-skill-author}/scripts/validate.py +0 -0
package/skills/ct-lead/SKILL.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ct-lead
|
|
3
|
-
description: "Phase Lead orchestration playbook for spawning and supervising a parallel worker swarm in one wave. Use when spawned by ct-orchestrator with role=orchestrator to fan out N leaf workers via delegate_task, drain the epic
|
|
3
|
+
description: "Phase Lead orchestration playbook for spawning and supervising a parallel worker swarm in one wave. Use when spawned by ct-orchestrator with role=orchestrator to fan out N leaf workers via delegate_task, drain the epic-{TID}.wave-{n} conduit topic plus pipeline_manifest, await rollupWaveStatus convergence, and return ONE rolled-up contract string to the parent Orchestrator. Triggers: 'phase lead', 'wave lead', 'supervise wave', 'fan out workers', 'aggregate worker results', 'rollup wave', any task with role=orchestrator that is itself a child of another orchestrator. Implements ADR-070 hierarchical orchestration."
|
|
4
4
|
metadata:
|
|
5
|
-
version: 1.0.
|
|
5
|
+
version: 1.0.6
|
|
6
6
|
tier: core
|
|
7
7
|
install: harness
|
|
8
|
+
covers:
|
|
9
|
+
- packages/core/src/orchestration/lead-rollup.ts
|
|
10
|
+
- packages/core/src/orchestration/waves.ts
|
|
11
|
+
lastReviewed: 2026-09-28
|
|
8
12
|
stability: stable
|
|
9
13
|
---
|
|
10
14
|
|
|
@@ -33,7 +37,7 @@ exactly ONE aggregated summary.
|
|
|
33
37
|
|----|------|-------------------|
|
|
34
38
|
| LEAD-005 | Subscribe BEFORE spawn | Subscribe to `epic-<TID>.wave-<n>` conduit topic before issuing any `delegate_task` — late subscribers miss early completion events |
|
|
35
39
|
| LEAD-006 | Parallel fanout | All workers in a wave fan out via a SINGLE `delegate_task` batch (`tasks: [...]`) — never sequential per-worker calls |
|
|
36
|
-
| LEAD-007 | Bounded by `
|
|
40
|
+
| LEAD-007 | Bounded by `maxConcurrent` (default 10) | Wave width MUST NOT exceed it; split into multiple waves if larger. No config key or runtime check enforces this yet (`delegation.max_concurrent_children` is not read by CLEO) — the Lead enforces it |
|
|
37
41
|
| LEAD-008 | Convergence over polling | Wait on conduit signals + `rollupWaveStatus`; do not poll task status in a busy loop |
|
|
38
42
|
| LEAD-009 | Roll up via `rollupWaveStatus` | Always call `rollupWaveStatus(epicId, waveId)` before returning — never hand-aggregate manifest rows |
|
|
39
43
|
| LEAD-010 | One summary upstream | Return ONE contract string to parent Orchestrator; detail lives in pipeline_manifest under your wave's roll-up entry |
|
|
@@ -49,7 +53,7 @@ The parent Orchestrator spawns you with a resolved prompt containing:
|
|
|
49
53
|
| `waveId` | Wave index within the epic (e.g., `wave-2`) |
|
|
50
54
|
| `workerTasks[]` | Pre-resolved leaf task IDs in this wave (deps already satisfied) |
|
|
51
55
|
| `conduitTopic` | `epic-<epicId>.wave-<waveId>` — your subscription topic |
|
|
52
|
-
| `maxConcurrent` |
|
|
56
|
+
| `maxConcurrent` | Wave width cap passed by the parent (default 10) |
|
|
53
57
|
| `subagentTimeoutSeconds` | Default 600 — wall-clock budget per worker |
|
|
54
58
|
|
|
55
59
|
## Workflow
|
|
@@ -58,10 +62,11 @@ The parent Orchestrator spawns you with a resolved prompt containing:
|
|
|
58
62
|
|
|
59
63
|
```bash
|
|
60
64
|
# Subscribe FIRST — race-free (LEAD-005)
|
|
61
|
-
cleo conduit subscribe "epic-${EPIC}.wave-${WAVE}"
|
|
65
|
+
cleo conduit subscribe --topic "epic-${EPIC}.wave-${WAVE}"
|
|
62
66
|
|
|
63
|
-
# Verify the wave is well-formed
|
|
64
|
-
cleo orchestrate ready
|
|
67
|
+
# Verify the wave is well-formed: ready tasks and the computed wave plan
|
|
68
|
+
cleo orchestrate ready "${EPIC}"
|
|
69
|
+
cleo orchestrate waves "${EPIC}"
|
|
65
70
|
```
|
|
66
71
|
|
|
67
72
|
### 2. Parallel Fanout (one batch)
|
|
@@ -85,19 +90,53 @@ delegate_task({
|
|
|
85
90
|
### 3. Convergence (drain conduit + manifest)
|
|
86
91
|
|
|
87
92
|
```bash
|
|
88
|
-
#
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
# WAVE = the wave number `cleo orchestrate waves` prints now (1-based);
|
|
94
|
+
# topic and roll-up use the same number.
|
|
95
|
+
|
|
96
|
+
# Read worker terminal signals on the wave topic. There is no blocking
|
|
97
|
+
# await: poll with --since between checks, bounded by the wave budget.
|
|
98
|
+
cleo conduit listen --topic "epic-${EPIC}.wave-${WAVE}" --since "${SPAWNED_AT}"
|
|
92
99
|
|
|
93
100
|
# Roll up authoritative status from pipeline_manifest
|
|
94
|
-
cleo
|
|
101
|
+
cleo orchestrate roll-up "${EPIC}" --wave "${WAVE}" --json \
|
|
95
102
|
> /tmp/rollup-${EPIC}-${WAVE}.json
|
|
96
103
|
```
|
|
97
104
|
|
|
105
|
+
> **Wave contract (T12682).** One wave number `n` names everything: it is
|
|
106
|
+
> the 1-based number `cleo orchestrate waves <epic>` prints, spawned workers
|
|
107
|
+
> publish on `epic-<epicId>.wave-<n>`, and `cleo orchestrate roll-up <epic>
|
|
108
|
+
> --wave <n>` takes the same `n` (`--wave 0` is refused with
|
|
109
|
+
> `E_CLEO_VALIDATION`, pointing at `cleo orchestrate waves`).
|
|
110
|
+
>
|
|
111
|
+
> **What a wave number guarantees (T12683).** A task's wave is its
|
|
112
|
+
> structural dependency depth: 1 plus the deepest wave among its
|
|
113
|
+
> dependencies, whatever their status and whichever epic holds them.
|
|
114
|
+
>
|
|
115
|
+
> - **Stable** when any task's status changes (done, cancelled, archived)
|
|
116
|
+
> or a task moves between epics. A finished wave stays in `cleo
|
|
117
|
+
> orchestrate waves` with status `completed`; `--hide-completed` omits
|
|
118
|
+
> finished waves without renumbering the rest.
|
|
119
|
+
> - **Not stable** when a dependency edge is added or removed anywhere
|
|
120
|
+
> upstream, including in another epic: downstream waves shift. If you
|
|
121
|
+
> subscribed ahead to `epic-<epicId>.wave-<n>`, re-read `cleo orchestrate
|
|
122
|
+
> waves` after any dependency change.
|
|
123
|
+
> - **Numbers can skip, and an epic's first wave can be above 1** (a task
|
|
124
|
+
> whose external prerequisite sits at depth 3 is in wave 4). Always take
|
|
125
|
+
> `n` from `cleo orchestrate waves`; never assume the first wave is 1.
|
|
126
|
+
>
|
|
127
|
+
> `orchestrate ready`, `plan` and `parallel start --wave <n>` never re-run
|
|
128
|
+
> finished tasks.
|
|
129
|
+
|
|
98
130
|
`rollupWaveStatus` (T9082, `packages/core/src/orchestration/lead-rollup.ts`)
|
|
99
131
|
returns `{ wave, total, complete, partial, blocked, failed, workers: [...] }`.
|
|
100
132
|
|
|
133
|
+
A stored manifest row with malformed metadata no longer fails the roll-up
|
|
134
|
+
(T12686): it is skipped, every other worker is still reported, and a
|
|
135
|
+
`W_MANIFEST_ROW_MALFORMED` warning names the row, the bad field and the
|
|
136
|
+
repair. Treat that warning as missing coverage, not a clean wave: run
|
|
137
|
+
`cleo doctor manifest-rows` to list such rows, `--repair` to see the plan,
|
|
138
|
+
and `--repair --apply` to rewrite them with a receipt.
|
|
139
|
+
|
|
101
140
|
### 4. Decide: retry / escalate / return
|
|
102
141
|
|
|
103
142
|
See `references/aggregation-protocol.md` for the full decision matrix.
|
|
@@ -133,7 +172,7 @@ cleo manifest append \
|
|
|
133
172
|
- **Sequential fanout**: spawning workers one-by-one defeats parallelism and breaks the wave model — use ONE batch (LEAD-006).
|
|
134
173
|
- **Recursive Leads**: do NOT spawn a Lead from within a Lead — escalate to parent Orchestrator with a `blocked` contract instead (LEAD-003).
|
|
135
174
|
- **Forwarding raw outputs**: never paste worker manifest entries upstream — parent's context budget assumes ONE rollup string per wave (LEAD-004).
|
|
136
|
-
- **Polling**: do not `while true; sleep` on
|
|
175
|
+
- **Polling task status**: do not `while true; sleep` on `cleo show` — read the wave topic with `cleo conduit listen --topic … --since …` and aggregate with `cleo orchestrate roll-up` (LEAD-008).
|
|
137
176
|
- **Unbounded retries**: cap local retry at 1 per worker — repeated failure escalates to parent.
|
|
138
177
|
|
|
139
178
|
## Cross-references
|
|
@@ -21,12 +21,12 @@ fast-finishing workers and silently loses early `complete` signals.
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
# CORRECT — subscribe, then spawn
|
|
24
|
-
cleo conduit subscribe "epic-T9080.wave-2"
|
|
25
|
-
cleo orchestrate
|
|
24
|
+
cleo conduit subscribe --topic "epic-T9080.wave-2"
|
|
25
|
+
cleo orchestrate fanout T9080 --tasks T9301,T9302,T9303
|
|
26
26
|
|
|
27
27
|
# WRONG — fanout, then subscribe (race window)
|
|
28
|
-
cleo orchestrate
|
|
29
|
-
cleo conduit subscribe "epic-T9080.wave-2"
|
|
28
|
+
cleo orchestrate fanout T9080 --tasks T9301,T9302,T9303
|
|
29
|
+
cleo conduit subscribe --topic "epic-T9080.wave-2" # may miss T9301 done
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
The conduit retains buffered signals for `conduit.replay_window` (default 30s)
|
|
@@ -36,19 +36,44 @@ to defend against tiny races, but relying on the buffer is brittle.
|
|
|
36
36
|
|
|
37
37
|
## 2. Drain loop
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
There is no blocking await. The Lead polls the wave topic with
|
|
40
|
+
`cleo conduit listen --topic <topic> --since <last-seen>` until the expected number of
|
|
41
|
+
terminal signals has arrived OR its wall-clock budget elapses.
|
|
41
42
|
|
|
42
43
|
```bash
|
|
43
|
-
cleo conduit
|
|
44
|
-
|
|
45
|
-
--timeout 600 \
|
|
46
|
-
--json > /tmp/conduit-drain.json
|
|
44
|
+
cleo conduit listen --topic "epic-T9080.wave-2" --since "${SPAWNED_AT}" \
|
|
45
|
+
> /tmp/conduit-drain.json
|
|
47
46
|
|
|
48
|
-
# Then read authoritative state from manifest
|
|
49
|
-
cleo
|
|
47
|
+
# Then read authoritative state from manifest — same wave number as the topic.
|
|
48
|
+
cleo orchestrate roll-up T9080 --wave 2 --json > /tmp/rollup.json
|
|
50
49
|
```
|
|
51
50
|
|
|
51
|
+
> **Wave contract (T12682).** One wave number `n` names everything: it is
|
|
52
|
+
> the 1-based number `cleo orchestrate waves <epic>` prints, spawned workers
|
|
53
|
+
> publish on `epic-<epicId>.wave-<n>`, and `cleo orchestrate roll-up <epic>
|
|
54
|
+
> --wave <n>` takes the same `n` (`--wave 0` is refused with
|
|
55
|
+
> `E_CLEO_VALIDATION`, pointing at `cleo orchestrate waves`).
|
|
56
|
+
>
|
|
57
|
+
> **What a wave number guarantees (T12683).** A task's wave is its
|
|
58
|
+
> structural dependency depth: 1 plus the deepest wave among its
|
|
59
|
+
> dependencies, whatever their status and whichever epic holds them.
|
|
60
|
+
>
|
|
61
|
+
> - **Stable** when any task's status changes (done, cancelled, archived)
|
|
62
|
+
> or a task moves between epics. A finished wave stays in `cleo
|
|
63
|
+
> orchestrate waves` with status `completed`; `--hide-completed` omits
|
|
64
|
+
> finished waves without renumbering the rest.
|
|
65
|
+
> - **Not stable** when a dependency edge is added or removed anywhere
|
|
66
|
+
> upstream, including in another epic: downstream waves shift. If you
|
|
67
|
+
> subscribed ahead to `epic-<epicId>.wave-<n>`, re-read `cleo orchestrate
|
|
68
|
+
> waves` after any dependency change.
|
|
69
|
+
> - **Numbers can skip, and an epic's first wave can be above 1** (a task
|
|
70
|
+
> whose external prerequisite sits at depth 3 is in wave 4). Always take
|
|
71
|
+
> `n` from `cleo orchestrate waves`; never assume the first wave is 1.
|
|
72
|
+
>
|
|
73
|
+
> `orchestrate ready`, `plan` and `parallel start --wave <n>` never re-run
|
|
74
|
+
> finished tasks.
|
|
75
|
+
|
|
76
|
+
|
|
52
77
|
`rollupWaveStatus` returns:
|
|
53
78
|
|
|
54
79
|
```json
|
|
@@ -94,15 +119,13 @@ Local retry shape:
|
|
|
94
119
|
RETRIABLE=$(jq -r '.workers[] | select(.status=="failed" and (.reason|test("testsPassed|qaPassed|INFRASTRUCTURE"))) | .taskId' /tmp/rollup.json)
|
|
95
120
|
|
|
96
121
|
# Re-spawn ONLY those (NEW conduit topic suffix to avoid replay collision)
|
|
97
|
-
cleo
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
cleo conduit await "epic-T9080.wave-2.retry-1" --expect $(echo $RETRIABLE | wc -w) --timeout 600
|
|
105
|
-
cleo lead rollup --epic T9080 --wave wave-2 --include-retries --json > /tmp/rollup-final.json
|
|
122
|
+
cleo conduit subscribe --topic "epic-T9080.wave-2.retry-1"
|
|
123
|
+
cleo orchestrate fanout T9080 --tasks "$(echo $RETRIABLE | tr ' ' ,)"
|
|
124
|
+
|
|
125
|
+
# Re-drain on the retry topic, then roll up again (the manifest holds the
|
|
126
|
+
# latest status of every worker, retries included)
|
|
127
|
+
cleo conduit listen --topic "epic-T9080.wave-2.retry-1" --since "${RETRY_AT}"
|
|
128
|
+
cleo orchestrate roll-up T9080 --wave 2 --json > /tmp/rollup-final.json
|
|
106
129
|
```
|
|
107
130
|
|
|
108
131
|
After the single retry pass, whatever `rollup-final.json` shows IS the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Spawn Pattern — Worker Fanout Examples
|
|
2
2
|
|
|
3
3
|
The Phase Lead fans out all workers in a single `delegate_task` batch.
|
|
4
|
-
Width is bounded by `
|
|
4
|
+
Width is bounded by `maxConcurrent` (default 10; a convention the Lead enforces — no runtime check exists).
|
|
5
5
|
Each child carries `role=leaf` and inherits the wave's conduit topic.
|
|
6
6
|
|
|
7
7
|
All examples assume:
|
|
@@ -32,15 +32,14 @@ Typical for narrowly-scoped IVTR waves where deps fan in tightly.
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
CLI equivalent (one shell call, NOT a loop)
|
|
35
|
+
CLI equivalent (one shell call, NOT a loop). `fanout` takes the epic and the
|
|
36
|
+
task list only; role, model and timeout come from each task's spawn prompt
|
|
37
|
+
(`cleo orchestrate spawn <taskId>`), and the Lead subscribes to the wave topic
|
|
38
|
+
before it runs:
|
|
36
39
|
|
|
37
40
|
```bash
|
|
38
|
-
cleo
|
|
39
|
-
|
|
40
|
-
--topic epic-T9080.wave-2 \
|
|
41
|
-
--timeout 600 \
|
|
42
|
-
--tasks T9101,T9102,T9103 \
|
|
43
|
-
--child-role leaf --model sonnet
|
|
41
|
+
cleo conduit subscribe --topic epic-T9080.wave-2
|
|
42
|
+
cleo orchestrate fanout T9080 --tasks T9101,T9102,T9103
|
|
44
43
|
```
|
|
45
44
|
|
|
46
45
|
---
|
|
@@ -69,7 +68,7 @@ cleo orchestrate spawn-batch \
|
|
|
69
68
|
|
|
70
69
|
## Example 3 — 10-worker fanout (max-width wave)
|
|
71
70
|
|
|
72
|
-
This is the upper bound at default `
|
|
71
|
+
This is the upper bound at the default `maxConcurrent = 10`.
|
|
73
72
|
For wider waves, the parent Orchestrator MUST split into multiple Leads.
|
|
74
73
|
|
|
75
74
|
```json
|
|
@@ -111,10 +110,12 @@ done
|
|
|
111
110
|
DO NOT exceed `maxConcurrent`:
|
|
112
111
|
|
|
113
112
|
```bash
|
|
114
|
-
# WRONG —
|
|
115
|
-
cleo orchestrate
|
|
113
|
+
# WRONG — 20 workers in one wave; split into waves of at most maxConcurrent
|
|
114
|
+
cleo orchestrate fanout T9300 --tasks $(seq -s, T9301 T9320)
|
|
116
115
|
```
|
|
117
116
|
|
|
117
|
+
Nothing in the runtime enforces the cap today; the Lead must.
|
|
118
|
+
|
|
118
119
|
DO NOT spawn workers with `role=orchestrator`:
|
|
119
120
|
|
|
120
121
|
```json
|
|
@@ -27,8 +27,8 @@ Skill: orchestrator
|
|
|
27
27
|
|
|
28
28
|
Install to your project for persistent availability:
|
|
29
29
|
```bash
|
|
30
|
-
cleo
|
|
31
|
-
cleo
|
|
30
|
+
cleo skills install ct-orchestrator # install to your agent directory
|
|
31
|
+
cleo skills info ct-orchestrator # verify it resolves
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Files
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
name: ct-orchestrator
|
|
3
3
|
description: "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."
|
|
4
4
|
metadata:
|
|
5
|
-
version: 4.0.
|
|
5
|
+
version: 4.0.4
|
|
6
6
|
tier: core
|
|
7
7
|
install: harness
|
|
8
|
+
covers:
|
|
9
|
+
- packages/cleo/src/cli/commands/orchestrate.ts
|
|
10
|
+
- packages/core/src/orchestration/spawn-prompt.ts
|
|
8
11
|
lastReviewed: 2026-09-28
|
|
9
12
|
stability: stable
|
|
10
13
|
---
|
|
@@ -94,7 +97,7 @@ Runs **autonomously on every incoming issue**. Decomposes ideas into executable
|
|
|
94
97
|
| **Specification** | Write formal spec with RFC 2119 language, acceptance criteria | Lead (reasoning) |
|
|
95
98
|
| **Decomposition** | Break into atomic tasks with deps under epic(s) | Lead (reasoning) |
|
|
96
99
|
|
|
97
|
-
**RCASD output**: Epic(s) with child tasks, spec documents attached, dependency graph defined, acceptance criteria on every task. Architecture decisions stored in BRAIN decision-store via `cleo memory store --
|
|
100
|
+
**RCASD output**: Epic(s) with child tasks, spec documents attached, dependency graph defined, acceptance criteria on every task. Architecture decisions stored in BRAIN decision-store via `cleo memory decision-store --decision "..." --rationale "..."`, not in adrs markdown blobs.
|
|
98
101
|
|
|
99
102
|
### IVTR Phase (Execution)
|
|
100
103
|
|
|
@@ -137,7 +140,7 @@ Spawning is a **two-step pattern** — CLEO prepares the prompt, then the provid
|
|
|
137
140
|
|
|
138
141
|
```bash
|
|
139
142
|
# Get next dependency-safe task
|
|
140
|
-
cleo orchestrate ready
|
|
143
|
+
cleo orchestrate ready T1575
|
|
141
144
|
|
|
142
145
|
# Generate fully-resolved spawn prompt
|
|
143
146
|
cleo orchestrate spawn T1586 --json
|
|
@@ -178,7 +181,7 @@ After successful verification, subagents MUST return exactly one of:
|
|
|
178
181
|
cleo session status # Resume existing?
|
|
179
182
|
cleo dash # Project overview
|
|
180
183
|
cleo current # Active task?
|
|
181
|
-
cleo orchestrate start
|
|
184
|
+
cleo orchestrate start T1575 # Full state: session, pipeline, next task
|
|
182
185
|
```
|
|
183
186
|
|
|
184
187
|
### 2. RCASD — Plan the Work
|
|
@@ -199,11 +202,12 @@ cleo orchestrate start --epic T1575 # Full state: session, pipeline, next task
|
|
|
199
202
|
### 3. IVTR — Execute the Work
|
|
200
203
|
|
|
201
204
|
```
|
|
202
|
-
1.
|
|
203
|
-
|
|
205
|
+
1. Read the waves: cleo orchestrate waves T1575 (take each wave n from here;
|
|
206
|
+
numbers can skip and the first need not be 1), then cleo orchestrate ready T1575
|
|
207
|
+
2. Spawn Workers in parallel for each ready task in the first incomplete wave
|
|
204
208
|
3. On completion: read manifest, check acceptance criteria
|
|
205
209
|
4. If criteria NOT met → re-spawn worker with feedback (IVTR loop)
|
|
206
|
-
5. Advance to
|
|
210
|
+
5. Advance to the next wave cleo orchestrate waves lists (its deps are now done)
|
|
207
211
|
6. Repeat until all tasks complete
|
|
208
212
|
7. Final validation with Lead across the full epic
|
|
209
213
|
```
|
|
@@ -281,10 +285,10 @@ When operating without continuous HITL oversight, additional constraints apply:
|
|
|
281
285
|
|
|
282
286
|
| Command | Purpose |
|
|
283
287
|
|---------|---------|
|
|
284
|
-
| `cleo orchestrate start
|
|
285
|
-
| `cleo orchestrate ready
|
|
288
|
+
| `cleo orchestrate start T1575` | Full startup: session + pipeline + next task |
|
|
289
|
+
| `cleo orchestrate ready T1575` | Parallel-safe tasks in current wave |
|
|
286
290
|
| `cleo orchestrate spawn T1586 --json` | Generate resolved spawn prompt |
|
|
287
|
-
| `cleo orchestrate next
|
|
291
|
+
| `cleo orchestrate next T1575` | Suggest next task |
|
|
288
292
|
| `cleo saga rollup <sagaId>` | Cross-Epic status aggregation when orchestrating a multi-Epic Saga (ADR-073) |
|
|
289
293
|
| `cleo saga members <sagaId>` | Member Epics of a Saga (parent_id containment — NOT `task_relations.groups`) |
|
|
290
294
|
| `cleo pipeline stage.status --epic T1575` | Current pipeline stage |
|
|
@@ -8,8 +8,8 @@ Copy and include this block in EVERY subagent prompt spawned via Task tool.
|
|
|
8
8
|
## SUBAGENT PROTOCOL (RFC 2119 - MANDATORY)
|
|
9
9
|
|
|
10
10
|
OUTPUT REQUIREMENTS:
|
|
11
|
-
1. MUST
|
|
12
|
-
2. MUST append ONE entry via `cleo manifest append <json
|
|
11
|
+
1. MUST record findings with `cleo docs add {{TASK_ID}} --content - --type <kind> --slug {{TOPIC_SLUG}}` (never a raw file under `.cleo/agent-outputs/`)
|
|
12
|
+
2. MUST append ONE entry via `cleo manifest append --entry '<json>'` (writes to pipeline_manifest table per ADR-027/T1093)
|
|
13
13
|
3. MUST return ONLY: "Research complete. Manifest appended to pipeline_manifest."
|
|
14
14
|
4. MUST NOT return research content in response.
|
|
15
15
|
|
|
@@ -33,8 +33,8 @@ You are the {ROLE} subagent. Your job is to complete CLEO task {TASK_ID}.
|
|
|
33
33
|
|
|
34
34
|
## SUBAGENT PROTOCOL (RFC 2119 - MANDATORY)
|
|
35
35
|
OUTPUT REQUIREMENTS:
|
|
36
|
-
1. MUST
|
|
37
|
-
2. MUST append ONE entry via `cleo manifest append <json
|
|
36
|
+
1. MUST record findings with `cleo docs add {{TASK_ID}} --content - --type <kind> --slug {{TOPIC_SLUG}}` (never a raw file under `.cleo/agent-outputs/`)
|
|
37
|
+
2. MUST append ONE entry via `cleo manifest append --entry '<json>'` (writes to pipeline_manifest table per ADR-027/T1093)
|
|
38
38
|
3. MUST return ONLY: "Research complete. Manifest appended to pipeline_manifest."
|
|
39
39
|
4. MUST NOT return research content in response.
|
|
40
40
|
|
|
@@ -115,19 +115,19 @@ HANDOFF CONTENTS:
|
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
117
|
# 1. Read last handoff
|
|
118
|
-
cleo
|
|
118
|
+
cleo docs list --type handoff --project
|
|
119
119
|
|
|
120
120
|
# 2. Verify session exists
|
|
121
|
-
cleo session
|
|
121
|
+
cleo session show <session_id>
|
|
122
122
|
|
|
123
123
|
# 3. Check for concurrent modifications
|
|
124
|
-
cleo session list --
|
|
124
|
+
cleo session list --status active
|
|
125
125
|
|
|
126
126
|
# 4. Resume if clear
|
|
127
127
|
cleo session resume <session_id>
|
|
128
128
|
|
|
129
129
|
# 5. Continue from next_tasks
|
|
130
|
-
cleo orchestrate next
|
|
130
|
+
cleo orchestrate next <epic_id>
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
## Exit Codes
|
|
@@ -37,7 +37,7 @@ research_id="${topic_slug}-${date}" # e.g., "auth-research-2026-01-21"
|
|
|
37
37
|
# 2. Verify manifest entry exists
|
|
38
38
|
cleo research show "$research_id"
|
|
39
39
|
# OR
|
|
40
|
-
|
|
40
|
+
cleo manifest show "$research_id"
|
|
41
41
|
|
|
42
42
|
# 3. Block on missing manifest - DO NOT spawn next agent until confirmed
|
|
43
43
|
if ! cleo research show "$research_id" &>/dev/null; then
|
|
@@ -91,7 +91,7 @@ fi
|
|
|
91
91
|
|
|
92
92
|
| Violation | Detection | Recovery |
|
|
93
93
|
|-----------|-----------|----------|
|
|
94
|
-
| Missing protocol block | `grep -q "SUBAGENT PROTOCOL"` fails |
|
|
94
|
+
| Missing protocol block | `grep -q "SUBAGENT PROTOCOL"` fails | Regenerate the prompt with `cleo orchestrate spawn <taskId>` (it embeds the protocol) |
|
|
95
95
|
| Invalid return message | Not in allowed format list | Mark as violation, re-spawn |
|
|
96
96
|
| No manifest entry | `cleo research show` returns error | Re-spawn with explicit manifest requirement |
|
|
97
97
|
| No research link | `jq '.task.linkedResearch'` empty | Orchestrator links via `cleo research link` |
|
|
@@ -240,7 +240,7 @@ if (( $(echo "$compliance_pass_rate < $COMPLIANCE_THRESHOLD" | bc -l) )); then
|
|
|
240
240
|
stricter_prompt="$original_prompt
|
|
241
241
|
|
|
242
242
|
## COMPLIANCE CHECKLIST (VERIFY BEFORE RETURNING)
|
|
243
|
-
- [ ] Output
|
|
243
|
+
- [ ] Output recorded with `cleo docs add` (`cleo docs fetch <slug>` returns it)
|
|
244
244
|
- [ ] pipeline_manifest entry appended via `cleo manifest append`
|
|
245
245
|
- [ ] Return message is EXACTLY: 'Research complete. Manifest appended to pipeline_manifest.'
|
|
246
246
|
- [ ] Task linked via: {{TASK_LINK_CMD}} {{TASK_ID}} <research-id>
|
|
@@ -21,14 +21,14 @@ cleo orchestrate spawn T1575 # Auto-detects epic → uses decomposition protoco
|
|
|
21
21
|
cleo research show <research-id>
|
|
22
22
|
|
|
23
23
|
# 5. Continue with wave-0 tasks
|
|
24
|
-
cleo orchestrate next
|
|
24
|
+
cleo orchestrate next T1575
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Pattern: Resuming Interrupted Work
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# 1. Check state on conversation start
|
|
31
|
-
cleo orchestrate start
|
|
31
|
+
cleo orchestrate start T1575
|
|
32
32
|
# Shows: session active, current T1586, next task T1589
|
|
33
33
|
|
|
34
34
|
# 2. Check for incomplete subagent work
|
|
@@ -36,7 +36,7 @@ cleo research pending
|
|
|
36
36
|
# Shows: needs_followup: ["T1586"]
|
|
37
37
|
|
|
38
38
|
# 3. Resume focused task or spawn followup
|
|
39
|
-
cleo show T1586
|
|
39
|
+
cleo show T1586
|
|
40
40
|
cleo orchestrate spawn T1586 # Re-spawn if needed
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -52,7 +52,7 @@ cleo add "Add error handling to auth" --parent T1586 --depends T1586
|
|
|
52
52
|
cleo add "Write auth tests" --parent T1586 --depends T1586
|
|
53
53
|
|
|
54
54
|
# 3. Spawn for new tasks
|
|
55
|
-
cleo orchestrate next
|
|
55
|
+
cleo orchestrate next T1575
|
|
56
56
|
cleo orchestrate spawn T1590
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -64,7 +64,7 @@ cleo orchestrate analyze T1575
|
|
|
64
64
|
# Shows: Wave 0: T1578, T1580, T1582 (no deps)
|
|
65
65
|
|
|
66
66
|
# 2. Verify parallel safety
|
|
67
|
-
cleo orchestrate ready
|
|
67
|
+
cleo orchestrate ready T1575
|
|
68
68
|
# Returns: ["T1578", "T1580", "T1582"]
|
|
69
69
|
|
|
70
70
|
# 3. Spawn multiple subagents (different sessions)
|
|
@@ -84,13 +84,13 @@ cleo phase show
|
|
|
84
84
|
# Returns: "core"
|
|
85
85
|
|
|
86
86
|
# 2. Get tasks in current phase
|
|
87
|
-
cleo orchestrate ready
|
|
87
|
+
cleo orchestrate ready T1575
|
|
88
88
|
|
|
89
89
|
# 3. Spawn within phase context
|
|
90
90
|
cleo orchestrate spawn T1586
|
|
91
91
|
|
|
92
92
|
# 4. When phase complete, advance
|
|
93
|
-
cleo
|
|
93
|
+
cleo phase list
|
|
94
94
|
cleo phase advance # Move to testing phase
|
|
95
95
|
```
|
|
96
96
|
|
|
@@ -125,18 +125,19 @@ cleo list --parent T1575 --status pending # Should be empty
|
|
|
125
125
|
|
|
126
126
|
# 2. Run pre-release validation
|
|
127
127
|
./tests/run-all-tests.sh
|
|
128
|
-
cleo
|
|
129
|
-
|
|
130
|
-
# 3.
|
|
131
|
-
cleo release
|
|
132
|
-
cleo release
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
cleo release
|
|
128
|
+
cleo check arch
|
|
129
|
+
|
|
130
|
+
# 3. Plan and open the release PR (ADR-065; merged through PRs, tagged explicitly)
|
|
131
|
+
cleo release plan v0.85.0 --tasks T001,T002,T003
|
|
132
|
+
cleo release open v0.85.0
|
|
133
|
+
cleo release pr-status v0.85.0
|
|
134
|
+
git tag -a v0.85.0 -m "Release v0.85.0" && git push origin v0.85.0
|
|
135
|
+
cleo release reconcile v0.85.0
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
**IMPORTANT**: `dev/release-version.sh` is **DEPRECATED** (since v0.78.0)
|
|
139
|
-
|
|
138
|
+
**IMPORTANT**: `dev/release-version.sh` is **DEPRECATED** (since v0.78.0), and the
|
|
139
|
+
`release create`/`release ship` verbs were removed (T9540, T10103). Always use
|
|
140
|
+
`cleo release plan` → `open` → tag → `reconcile`.
|
|
140
141
|
|
|
141
142
|
See `src/protocols/release.md` for the full release protocol specification.
|
|
142
143
|
|
|
@@ -158,7 +159,7 @@ cleo orchestrate spawn T105 # implementation protocol
|
|
|
158
159
|
# contribution protocol auto-triggers for shared resources
|
|
159
160
|
|
|
160
161
|
# RELEASE (polish phase)
|
|
161
|
-
cleo release
|
|
162
|
-
cleo release
|
|
162
|
+
cleo release plan v0.74.0 --tasks T104,T105
|
|
163
|
+
cleo release open v0.74.0
|
|
163
164
|
cleo session end --note "Feature X released v0.74.0"
|
|
164
165
|
```
|
|
@@ -18,11 +18,8 @@
|
|
|
18
18
|
## Context Budget Monitoring
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
# Check
|
|
22
|
-
cleo orchestrate context
|
|
23
|
-
|
|
24
|
-
# With specific token count
|
|
25
|
-
cleo orchestrate context --tokens 5000
|
|
21
|
+
# Check context usage for an epic
|
|
22
|
+
cleo orchestrate context T1575
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
**Status Thresholds**:
|
|
@@ -54,15 +51,14 @@ Orchestrator sessions may span multiple Claude conversations. This is expected a
|
|
|
54
51
|
### Cleanup Commands
|
|
55
52
|
|
|
56
53
|
```bash
|
|
57
|
-
# Standard garbage collection
|
|
54
|
+
# Standard garbage collection
|
|
58
55
|
cleo session gc
|
|
59
56
|
|
|
60
|
-
#
|
|
61
|
-
cleo session gc --
|
|
57
|
+
# Also end active sessions older than N days
|
|
58
|
+
cleo session gc --max-age 7
|
|
62
59
|
|
|
63
|
-
#
|
|
64
|
-
cleo session
|
|
65
|
-
cleo session gc --include-active --dry-run
|
|
60
|
+
# There is no dry-run; inspect first
|
|
61
|
+
cleo session list --status active
|
|
66
62
|
```
|
|
67
63
|
|
|
68
64
|
### Configuration
|
|
@@ -84,12 +80,12 @@ cleo config set retention.autoEndActiveAfterDays 14 # Extend to 2 weeks
|
|
|
84
80
|
|
|
85
81
|
2. **Session suspend for long waits**: Suspend when blocked on external factors
|
|
86
82
|
```bash
|
|
87
|
-
cleo session suspend --
|
|
83
|
+
cleo session suspend <sessionId> --reason "Awaiting code review"
|
|
88
84
|
```
|
|
89
85
|
|
|
90
86
|
3. **Periodic cleanup**: Run garbage collection periodically to remove stale sessions
|
|
91
87
|
```bash
|
|
92
|
-
cleo session gc --
|
|
88
|
+
cleo session gc --max-age 7
|
|
93
89
|
```
|
|
94
90
|
|
|
95
91
|
4. **Multi-day work**: No need to restart sessions daily - orchestrator sessions are designed for extended work periods
|
|
@@ -99,15 +95,9 @@ cleo config set retention.autoEndActiveAfterDays 14 # Extend to 2 weeks
|
|
|
99
95
|
## Validation
|
|
100
96
|
|
|
101
97
|
```bash
|
|
102
|
-
#
|
|
103
|
-
cleo orchestrate validate
|
|
104
|
-
|
|
105
|
-
# Validate for specific epic
|
|
106
|
-
cleo orchestrate validate --epic T1575
|
|
107
|
-
|
|
108
|
-
# Validate specific subagent output
|
|
109
|
-
cleo orchestrate validate --subagent research-id-2026-01-18
|
|
98
|
+
# Validate one task's subagent output
|
|
99
|
+
cleo orchestrate validate T1586
|
|
110
100
|
|
|
111
|
-
#
|
|
112
|
-
cleo orchestrate validate --manifest
|
|
101
|
+
# Validate a specific output file, and that a manifest entry was appended
|
|
102
|
+
cleo orchestrate validate T1586 --file <output-path> --manifest
|
|
113
103
|
```
|
|
@@ -11,14 +11,13 @@ Spawning is ALWAYS a two-step process: CLEO **prepares** the prompt, then the pr
|
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
# Get next dependency-safe task
|
|
14
|
-
cleo orchestrate next
|
|
14
|
+
cleo orchestrate next T1575
|
|
15
15
|
|
|
16
16
|
# Generate fully-resolved spawn prompt
|
|
17
17
|
cleo orchestrate spawn T1586
|
|
18
18
|
|
|
19
|
-
# Or
|
|
20
|
-
cleo orchestrate spawn T1586 --
|
|
21
|
-
cleo orchestrate spawn T1586 --template RESEARCH-AGENT # aliases work
|
|
19
|
+
# Or override the protocol (the skill follows from it)
|
|
20
|
+
cleo orchestrate spawn T1586 --protocol research
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
The `spawn` command returns:
|
|
@@ -110,7 +109,7 @@ skills/ct-documentor/SKILL.md
|
|
|
110
109
|
|
|
111
110
|
```bash
|
|
112
111
|
# Step 1: Get ready task
|
|
113
|
-
cleo orchestrate next
|
|
112
|
+
cleo orchestrate next T1575
|
|
114
113
|
# Returns: { nextTask: { id: "T1586", title: "...", priority: "high" } }
|
|
115
114
|
|
|
116
115
|
# Step 2: Generate spawn prompt (handles all token injection)
|
|
@@ -148,7 +147,7 @@ The function performs these steps automatically:
|
|
|
148
147
|
|
|
149
148
|
| Step | Action | Details |
|
|
150
149
|
|------|--------|---------|
|
|
151
|
-
| 1 | Read task from CLEO | `cleo show T1234
|
|
150
|
+
| 1 | Read task from CLEO | `cleo show T1234` |
|
|
152
151
|
| 2 | Select skill | Auto-dispatch from task type/labels or use override |
|
|
153
152
|
| 3 | Validate skill | Check compatibility with target model |
|
|
154
153
|
| 4 | Inject protocol | Load skill template + subagent protocol |
|
|
@@ -161,7 +160,7 @@ The function performs these steps automatically:
|
|
|
161
160
|
Step 6 validates that the generated prompt contains the `SUBAGENT PROTOCOL` marker. This is **mandatory** and will fail loudly if missing:
|
|
162
161
|
|
|
163
162
|
- **Exit code**: `EXIT_PROTOCOL_MISSING` (60)
|
|
164
|
-
- **Fix command**: `cleo
|
|
163
|
+
- **Fix command**: `cleo orchestrate spawn <taskId>` (regenerates the prompt with the protocol embedded)
|
|
165
164
|
- **Validation function**: `orchestrator_verify_protocol_injection()`
|
|
166
165
|
|
|
167
166
|
If validation fails, the spawn is **blocked** and you must fix the skill template or manually inject the protocol block.
|
|
@@ -266,7 +265,7 @@ ti_set_context "T1234" "$(date +%Y-%m-%d)" "auth-implementation"
|
|
|
266
265
|
|
|
267
266
|
# Set defaults and get task context
|
|
268
267
|
ti_set_defaults
|
|
269
|
-
task_json=$(cleo show T1234
|
|
268
|
+
task_json=$(cleo show T1234)
|
|
270
269
|
ti_set_task_context "$task_json"
|
|
271
270
|
```
|
|
272
271
|
|
|
@@ -290,6 +289,6 @@ Use Task tool with:
|
|
|
290
289
|
# Check manifest for completion
|
|
291
290
|
{{RESEARCH_SHOW_CMD}} <research-id>
|
|
292
291
|
|
|
293
|
-
# Or
|
|
294
|
-
|
|
292
|
+
# Or list the task's pipeline_manifest entries
|
|
293
|
+
cleo manifest list --task <taskId> --json --limit 1
|
|
295
294
|
```
|