@cleocode/agents 2026.4.84 → 2026.4.85
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/cleo-subagent/AGENT.md +46 -17
- package/package.json +1 -1
package/cleo-subagent/AGENT.md
CHANGED
|
@@ -33,10 +33,11 @@ allowed_tools:
|
|
|
33
33
|
|
|
34
34
|
# CLEO Subagent Base Protocol
|
|
35
35
|
|
|
36
|
-
**Version**:
|
|
36
|
+
**Version**: 2.0.0
|
|
37
37
|
**Status**: ACTIVE
|
|
38
|
+
**Breaking change (v2.0.0 · T882)**: spawn prompts generated by `cleo orchestrate spawn <taskId>` are now **fully self-contained**. Subagents MUST NOT re-resolve protocol content, re-load skills via `@` notation, or re-hydrate task context — everything required to execute, verify, and close the task is in the spawn prompt itself.
|
|
38
39
|
|
|
39
|
-
This is the base protocol for all CLEO subagents.
|
|
40
|
+
This document is the base protocol for all CLEO subagents. It describes what subagents can rely on and what they must NOT do when invoked via the canonical spawn pipeline.
|
|
40
41
|
|
|
41
42
|
---
|
|
42
43
|
|
|
@@ -67,6 +68,36 @@ enforcement of that contract.
|
|
|
67
68
|
|
|
68
69
|
---
|
|
69
70
|
|
|
71
|
+
## Spawn Prompt Contract (T882 · v2.0.0)
|
|
72
|
+
|
|
73
|
+
Every subagent is invoked with a **fully-resolved spawn prompt** generated by
|
|
74
|
+
`cleo orchestrate spawn <taskId>`. The prompt contains, at minimum:
|
|
75
|
+
|
|
76
|
+
| Section | Contents |
|
|
77
|
+
|---------|----------|
|
|
78
|
+
| Task Identity | id, title, description, parent epic, acceptance criteria, size, priority, labels, dependencies |
|
|
79
|
+
| File Paths | absolute paths to agent-outputs dir, MANIFEST.jsonl, rcasd workspace, test-runs dir |
|
|
80
|
+
| Session Linkage | orchestrator session id (or "no active session" fallback) |
|
|
81
|
+
| Stage-Specific Guidance | protocol-specific deliverables for the current RCASD-IVTR+C phase |
|
|
82
|
+
| Evidence-Based Gate Ritual | exact `cleo verify --gate --evidence` commands per gate (ADR-051) |
|
|
83
|
+
| Quality Gates | `pnpm biome ci .` + `pnpm run build` + `pnpm run test` commands |
|
|
84
|
+
| Return Format Contract | exact one-line completion strings |
|
|
85
|
+
| CLEO Protocol | embedded (tier 1/2) or pointer (tier 0) — no `@file` re-resolution required |
|
|
86
|
+
|
|
87
|
+
**What subagents MUST do**: read the spawn prompt and follow it literally.
|
|
88
|
+
|
|
89
|
+
**What subagents MUST NOT do**:
|
|
90
|
+
- Re-load skills via `@skills/...md` references at runtime
|
|
91
|
+
- Re-query `cleo admin help` to discover operations already listed in the prompt
|
|
92
|
+
- Re-read `CLEO-INJECTION.md` when the prompt already embeds it
|
|
93
|
+
- Fabricate file paths — use the absolute paths the prompt provides
|
|
94
|
+
|
|
95
|
+
If a section is missing from the spawn prompt, the spawn was generated by an
|
|
96
|
+
older CLEO version; log this as a warning in the manifest entry and fall back
|
|
97
|
+
to `~/.cleo/templates/CLEO-INJECTION.md` as the authoritative protocol source.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
70
101
|
## Immutable Constraints (RFC 2119)
|
|
71
102
|
|
|
72
103
|
| ID | Rule | Enforcement |
|
|
@@ -293,26 +324,22 @@ Exit codes 7, 20, 21, 22, 60-63 support retry with exponential backoff.
|
|
|
293
324
|
|
|
294
325
|
## Escalation
|
|
295
326
|
|
|
296
|
-
|
|
327
|
+
The spawn prompt already contains the protocol content appropriate for the
|
|
328
|
+
current task. Only escalate when the prompt explicitly defers to a tier-2
|
|
329
|
+
operation or when you hit an error the prompt does not cover.
|
|
297
330
|
|
|
298
331
|
```bash
|
|
299
332
|
cleo admin help # tier 0 operations list
|
|
300
333
|
cleo admin help --tier 1 # + tier 1 operations
|
|
301
|
-
cleo admin help --tier 2 # all operations
|
|
302
|
-
|
|
303
|
-
# MCP equivalent
|
|
304
|
-
query { domain: "admin", operation: "help" }
|
|
305
|
-
query { domain: "admin", operation: "help", params: { tier: 1 } }
|
|
334
|
+
cleo admin help --tier 2 # all operations (rare — prompt usually covers what you need)
|
|
306
335
|
```
|
|
307
336
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
query { domain: "admin", operation: "help", params: { tier: 2 } } # all ops
|
|
315
|
-
```
|
|
337
|
+
Skills MUST NOT be loaded via `@skills/...md` notation at runtime. When a
|
|
338
|
+
subagent spawned by `cleo orchestrate spawn` needs skill content beyond
|
|
339
|
+
what the prompt embeds, the orchestrator should re-spawn with `--tier 2`.
|
|
340
|
+
Runtime `@` resolution is unreliable (paths differ per provider) and is the
|
|
341
|
+
root cause of the "spawned subagent hand-rolls prompts" anti-pattern that
|
|
342
|
+
v2.0.0 of this protocol eliminates.
|
|
316
343
|
|
|
317
344
|
---
|
|
318
345
|
|
|
@@ -327,5 +354,7 @@ query { domain: "admin", operation: "help", params: { tier: 2 } } # all ops
|
|
|
327
354
|
| Using `tasks.exists` | Removed from registry | Use `tasks.find { exact: true }` and check `results.length > 0` |
|
|
328
355
|
| Calling `tasks.list` without filters | Returns all tasks with notes, huge token cost | Use `tasks.find` for discovery |
|
|
329
356
|
| Appending to `MANIFEST.jsonl` directly | Legacy file — migrated to SQLite (ADR-027) | Use `pipeline.manifest.append` |
|
|
330
|
-
| Loading skills via `@` at runtime | Cannot resolve outside orchestrator spawn | Skills are
|
|
357
|
+
| Loading skills via `@` at runtime | Cannot resolve outside orchestrator spawn | Skills are embedded in the spawn prompt (tier 2). Ask the orchestrator to re-spawn with `--tier 2` if needed. |
|
|
358
|
+
| Re-resolving task/protocol context the prompt already supplies | Wastes tokens and duplicates work | Treat the spawn prompt as authoritative — every section is resolved |
|
|
359
|
+
| Fabricating absolute paths (manifest, rcasd dir) | Writes escape to wrong worktree | Use the exact paths in the **File Paths** section of the spawn prompt |
|
|
331
360
|
| Fabricating data when memory is empty | Hallucination | Use `memory.find` first; if truly unknown, state uncertainty |
|