@cleocode/skills 2026.5.61 → 2026.5.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/skills",
3
- "version": "2026.5.61",
3
+ "version": "2026.5.63",
4
4
  "description": "CLEO skill definitions - bundled with CLEO monorepo",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -5,611 +5,27 @@ description: CLEO task management protocol - session, task, and workflow guidanc
5
5
 
6
6
  # CLEO Protocol Guide
7
7
 
8
- CLEO is the task management protocol for AI coding agents. It provides structured task tracking, session management, and multi-agent coordination with anti-hallucination validation.
9
-
10
- **Operation set**: 164 operations (97 query + 67 mutate) across 10 canonical domains.
11
-
12
- ## Canonical Decision Tree
13
-
14
- Every agent MUST use this tree to select the minimum-cost operation path.
15
-
16
- ### Entry Point: Session Start (MANDATORY)
17
-
18
- ```
19
- Agent starts work
20
- │
21
- ├── STEP 1: cleo session status
22
- │ ├── Active session exists
23
- │ │ └── cleo briefing → resume prior context, then STEP 2
24
- │ └── No active session
25
- │ └── cleo session start --scope task:TXXX (or epic:TXXX)
26
- │
27
- ├── STEP 2: cleo dash → project overview, active epic, blockers
28
- │
29
- ├── STEP 3: cleo current → is a task already in progress?
30
- │ ├── Yes → continue that task (skip STEP 4)
31
- │ └── No → STEP 4
32
- │
33
- └── STEP 4: cleo next → what to work on next
34
- └── cleo show {taskId} → full task requirements
35
- ```
36
-
37
- **Anti-pattern blocked**: Never skip `session.status`. Resuming without `handoff.show` loses prior context and causes duplicate work.
38
-
39
- ---
40
-
41
- ### Phase Mapping (RCASD-IVTR+C)
42
-
43
- Each task lives in a lifecycle phase. Match your tooling to the current phase:
44
-
45
- | Phase | When | Key Commands |
46
- |-------|------|--------------|
47
- | `research` | Gathering information, reading docs, exploring codebase | `cleo memory find`, `cleo docs add`, `cleo show` |
48
- | `implement` | Writing code, making changes, building features | `cleo start`, `cleo verify`, code tools |
49
- | `validate` | Verifying correctness, running acceptance criteria | `cleo verify <id> --run`, `cleo check gate.status` |
50
- | `test` | Running test suites, asserting coverage | `pnpm run test`, `cleo check test` |
51
- | `release` | Versioning, changelog, publishing | `cleo release ship`, `cleo pipeline stage.record` |
52
-
53
- **Check current phase**: `cleo show <id>` → `pipelineStage` field.
54
-
55
- ---
56
-
57
- ### Goal: Discover Work
58
-
59
- ```
60
- I need to find what to work on
61
- │
62
- ├── What should I do next (auto-selected)?
63
- │ └── cleo next [tier 0]
64
- │ └── cleo show {taskId} [tier 0] → full details
65
- │
66
- ├── I know keywords — search for a specific task
67
- │ └── cleo find "..." [tier 0]
68
- │ ├── Found one match → cleo show {taskId}
69
- │ └── Need to browse children of a known parent
70
- │ └── cleo list --parent TXXX [tier 1] ← ONLY with parent filter
71
- │ ANTI-PATTERN: cleo list with no parent = full dump, never do this
72
- │
73
- ├── I need a prioritized planning view (upcoming tasks, blockers, dependencies)
74
- │ └── cleo plan [tier 0]
75
- │
76
- ├── I need the full task hierarchy under a parent
77
- │ └── (discover via cleo find first, then)
78
- │ └── cleo tree {taskId} [tier 1] → subtask hierarchy
79
- │
80
- ├── I need to see what's blocking a task
81
- │ └── cleo blockers {taskId} [tier 1]
82
- │
83
- └── I need leverage-sorted discovery (highest-impact tasks first)
84
- └── cleo analyze [tier 1]
85
- ```
86
-
87
- ---
88
-
89
- ### Goal: Memory Operations
90
-
91
- ```
92
- I need to save or recall information across sessions
93
- │
94
- ├── Save an observation right now (free-form)
95
- │ └── cleo memory observe "text" --title "title" [tier 0]
96
- │
97
- ├── Search for something I or a prior agent observed
98
- │ └── cleo memory find "..." [tier 0] ← ALWAYS start here (cheap)
99
- │ └── Found interesting IDs → cleo memory timeline {anchorId} [tier 1]
100
- │ └── Need full content → cleo memory fetch {ids} [tier 1]
101
- │ 3-LAYER PATTERN: find → timeline → fetch (never skip to fetch directly)
102
- │
103
- ├── Save a structured decision (with rationale, alternatives, taskId)
104
- │ └── cleo memory decision store "decision" --rationale "..." --task TXXX [tier 1]
105
- │ └── Recall: cleo memory decision find "query" [tier 1]
106
- │
107
- ├── Look up an architectural decision (D0xx or other ID)
108
- │ └── STEP 1: cleo memory decision-find --query <id> --json [tier 1]
109
- │ ├── Found → verify source document and outcome status
110
- │ └── NOT FOUND → STEP 2
111
- │ └── STEP 2: cleo memory find <id> --json [tier 1]
112
- │ ├── Found as observation/pattern → note O-* ID and context
113
- │ └── NOT FOUND → STEP 3
114
- │ └── STEP 3: grep -r "<id>" docs/adr/ [tier 1]
115
- │ ├── Found in ADR → read full ADR for canonical definition
116
- │ │ └── Check superseded-by / supersedes relationships
117
- │ └── NOT FOUND → STEP 4
118
- │ └── STEP 4: grep -r "<id>" .cleo/agent-outputs/ [tier 1]
119
- │ ├── Found in planning doc → note session scope and migration impact
120
- │ └── NOT FOUND → decision may not be recorded; flag to owner
121
- │ ⚠️ ID OVERLOAD: Same ID can exist in multiple docs with different meanings.
122
- │ Always cite the source document, not just the ID.
123
- │
124
- └── Associate a memory entry with a task (research linking protocol)
125
- └── cleo memory link {memoryId} {taskId} [tier 1]
126
- ```
127
-
128
- **Anti-pattern blocked**: Never call `memory.fetch` without first calling `memory.find`. Fetching without filtering returns all entries (expensive).
129
-
130
- ---
131
-
132
- ### Goal: Track Session Context
133
-
134
- ```
135
- I need to manage session lifecycle or read session state
136
- │
137
- ├── Check whether a session is active
138
- │ └── cleo session status [tier 0] ← FIRST, always
139
- │
140
- ├── Resume prior context after a restart
141
- │ └── cleo briefing [tier 0]
142
- │
143
- ├── Get a composite cold-start briefing (combines status + handoff)
144
- │ └── cleo briefing [tier 0]
145
- │
146
- ├── Start a new session
147
- │ └── cleo session start --scope task:TXXX (or epic:TXXX) [tier 0]
148
- │ RULE: scope is required — no unscoped sessions
149
- │
150
- ├── End the current session (triggers debrief + handoff generation)
151
- │ └── cleo session end [tier 0]
152
- │
153
- └── Browse past sessions
154
- └── cleo session find "..." [tier 1] ← NOT session list unfiltered
155
- └── Full session record: cleo session show {sessionId} [tier 1]
156
- ```
157
-
158
- ---
159
-
160
- ### Goal: Discover Available Skills
161
-
162
- ```
163
- I need to know what skills or providers are available
164
- │
165
- ├── List all installed skills (cold-start safe)
166
- │ └── cleo skill list [tier 0]
167
- │ └── Detail on a specific skill: cleo skill show {skillId} [tier 1]
168
- │
169
- └── Detect active provider
170
- └── cleo provider detect [tier 0]
171
- ```
172
-
173
- ---
174
-
175
- ### Goal: System Information
176
-
177
- ```
178
- I need system or configuration info
179
- │
180
- ├── What is the overall project state?
181
- │ └── cleo dash [tier 0] ← mandatory efficiency sequence step 2
182
- │
183
- ├── What operations are available at this tier?
184
- │ └── cleo help [tier 0] → tier 0 + tier 1 ops
185
- │ └── cleo help --tier 2 → reveals tier-2 ops + escalation hints
186
- │
187
- └── Inspect configuration
188
- └── cleo config show [tier 1]
189
- ```
190
-
191
- ---
192
-
193
- ## Pre-Complete Gate Ritual (ADR-051 — evidence required)
194
-
195
- MANDATORY before every `cleo complete <id>`. Every verification gate MUST be
196
- backed by programmatic evidence. CLEO validates commits against the git
197
- history, file sha256 against disk, tool exit codes against real runs, and
198
- vitest JSON against the reporter output. No evidence → no gate pass.
199
-
200
- ### Capture evidence per gate
201
-
202
- ```bash
203
- # implemented gate: commit + file list
204
- cleo verify T### --gate implemented \
205
- --evidence "commit:$(git rev-parse HEAD);files:packages/a/src/b.ts,packages/a/src/c.ts"
206
-
207
- # testsPassed gate: run tests and capture
208
- cleo verify T### --gate testsPassed --evidence "tool:pnpm-test"
209
-
210
- # qaPassed gate: biome + tsc both exit 0
211
- cleo verify T### --gate qaPassed --evidence "tool:biome;tool:tsc"
212
-
213
- # documented gate: docs/spec file
214
- cleo verify T### --gate documented --evidence "files:docs/specs/T###-spec.md"
215
-
216
- # cleanupDone gate: summary note
217
- cleo verify T### --gate cleanupDone --evidence "note:removed old helpers"
218
-
219
- # securityPassed gate: scan or waiver
220
- cleo verify T### --gate securityPassed --evidence "tool:security-scan"
221
-
222
- # Then complete — evidence is RE-VALIDATED at this step
223
- cleo memory observe "..." --title "..."
224
- cleo complete T###
225
- ```
226
-
227
- ### Anti-patterns (ADR-051)
228
-
229
- - ❌ `cleo verify --all` without `--evidence` — returns `E_EVIDENCE_MISSING`
230
- - ❌ `cleo complete --force` — flag REMOVED
231
- - ❌ Modifying source files between `verify` and `complete` — caught by
232
- staleness check (`E_EVIDENCE_STALE`)
233
- - ❌ Passing `note:` as evidence for `implemented` or `testsPassed` —
234
- fails `E_EVIDENCE_INSUFFICIENT`
235
- - ❌ Self-attesting without programmatic proof
236
-
237
- ### Emergency override (audited)
238
-
239
- ```bash
240
- CLEO_OWNER_OVERRIDE=1 CLEO_OWNER_OVERRIDE_REASON="<reason>" \
241
- cleo verify T### --gate implemented --evidence "note:<justification>"
242
- ```
243
-
244
- Writes to `.cleo/audit/force-bypass.jsonl` with PID, command, and reason. Do not
245
- normalize.
246
-
247
- ---
248
-
249
- ## Multi-Agent Coordination
250
-
251
- FIRST: do I have >= 5 tasks under one epic?
252
-
253
- ```
254
- Do I have an epic with >= 5 tasks?
255
- │
256
- ├── YES → cleo orchestrate start <epicId> (auto-inits LOOM) — MANDATORY before touching any child task
257
- │ │
258
- │ └── For each wave:
259
- │ cleo orchestrate ready --epic <id> → get parallel-safe task set
260
- │ │
261
- │ └── For each task in wave:
262
- │ cleo orchestrate spawn <taskId> → get resolved prompt
263
- │ Dispatch subagent via Agent tool
264
- │ On return: cleo manifest show <id> → read key_findings
265
- │
266
- └── NO → continue as solo executor
267
- └── proceed through standard work loop (cleo next → cleo show → implement → cleo complete)
268
- ```
269
-
270
- **Gate-failure loop (IVTR)**:
271
-
272
- ```
273
- Task returns blocked
274
- │
275
- ├── Read failure in manifest (cleo manifest show <id>)
276
- │
277
- └── cleo orchestrate ivtr <id> --loop-back --phase implement --reason "..." → re-spawn
278
- ├── Max 2 retries → escalate to HITL
279
- └── Document blocker in manifest before escalating
280
- ```
281
-
282
- ---
283
-
284
- ## Greenfield Bootstrap (new project)
285
-
286
- Copy-paste sequence:
287
-
288
- ```bash
289
- cd /path/to/new-project
290
- cleo init # creates .cleo/, tasks.db, brain.db
291
- cleo session start --scope global
292
- cleo add "Epic: <your goal>" --type epic --lifecycle auto \
293
- --description "..." \
294
- --acceptance "REQ-1|REQ-2|REQ-3|REQ-4|REQ-5"
295
- EPIC_ID=$(cleo current | jq -r '.data.currentTask.id')
296
-
297
- # Attach research/spec documents
298
- cleo docs add $EPIC_ID ./spec.md --desc "initial spec" --labels spec
299
-
300
- # Decompose into atomic tasks with typed gates
301
- cleo add "Task A" --type task --parent $EPIC_ID
302
- cleo req add <taskA-id> IMPL-01 --gate '{"kind":"test","command":"npm test","expect":"pass","description":"..."}'
303
-
304
- # Start orchestrator — auto-inits LOOM
305
- cleo orchestrate start $EPIC_ID
306
-
307
- # Drive IVTR on first task
308
- cleo orchestrate ivtr <taskA-id> --start # begins Implement phase
309
- ```
310
-
311
- ---
312
-
313
- ## Reference
314
-
315
- ### CLI-First Workflow
316
-
317
- CLI (`cleo` / `ct`) is the **only** dispatch method. All operations use `cleo <command>` syntax.
318
-
319
- #### Tier-0 Read Operations — Always Available
320
-
321
- | Domain | Operation | Description |
322
- |--------|-----------|-------------|
323
- | `tasks` | `show` | Get task details (`params: { taskId }`) |
324
- | `tasks` | `find` | Search tasks (`params: { query }` or `{ id }`) |
325
- | `tasks` | `next` | Auto-select highest-priority next task |
326
- | `tasks` | `plan` | Composite planning view: upcoming tasks, blockers, dependencies |
327
- | `tasks` | `current` | Show currently active (started) task |
328
- | `session` | `status` | Current session state — **mandatory first call** |
329
- | `session` | `handoff.show` | Resume prior context from last session |
330
- | `session` | `briefing.show` | Composite cold-start briefing (status + handoff combined) |
331
- | `memory` | `find` | Search brain for past observations, decisions, patterns (`params: { query }`) |
332
- | `admin` | `version` | CLEO version number |
333
- | `admin` | `health` | Installation health check |
334
- | `admin` | `dash` | Project dashboard — mandatory efficiency sequence step 2 |
335
- | `admin` | `help` | Discover available operations; use `{tier:2}` to reveal advanced ops |
336
- | `tools` | `skill.list` | List all installed agent skills |
337
- | `tools` | `provider.list` | List all known LLM/agent providers |
338
- | `tools` | `provider.detect` | Detect currently active provider |
339
-
340
- #### Tier-1 Read Operations — After Session Init
341
-
342
- | Domain | Operation | Description |
343
- |--------|-----------|-------------|
344
- | `tasks` | `list` | List direct children (`--parent <id>`) — **requires parent filter; prefer `cleo find` for discovery** |
345
- | `tasks` | `tree` | Full subtask hierarchy (`params: { taskId }`) |
346
- | `tasks` | `analyze` | Leverage-sorted task discovery |
347
- | `tasks` | `blockers` | Tasks blocking a specific task (`params: { taskId }`) |
348
- | `tasks` | `depends` | Full dependency graph for a task (`params: { taskId }`) |
349
- | `session` | `list` | List sessions (prefer `session.find` for discovery) |
350
- | `session` | `decision.log` | Recorded decisions for the current session |
351
- | `session` | `find` | Search sessions (`params: { query }`) |
352
- | `session` | `show` | Full session record (`params: { sessionId }`) |
353
- | `session` | `context.drift` | Inspect context drift during long sessions |
354
- | `memory` | `timeline` | Context around an anchor entry (`params: { anchorId }`) |
355
- | `memory` | `fetch` | Batch-fetch brain entries (`params: { ids: [...] }`) |
356
- | `memory` | `decision.find` | Search stored decisions (`params: { query, taskId? }`) |
357
- | `memory` | `pattern.find` | Search stored patterns (`params: { query, type? }`) |
358
- | `memory` | `learning.find` | Search stored learnings (`params: { query, minConfidence? }`) |
359
- | `orchestrate` | `analyze` | Dependency wave analysis (`params: { epicId }`) |
360
- | `orchestrate` | `ready` | Tasks ready to spawn (`params: { epicId }`) |
361
- | `orchestrate` | `next` | Next task suggestion (`params: { epicId }`) |
362
- | `orchestrate` | `status` | Current orchestration state |
363
- | `check` | `schema` | Validate task data schema integrity |
364
- | `check` | `protocol` | Protocol compliance for a task (`params: { taskId, protocolType? }`) |
365
- | `check` | `task` | Validate task fields (`params: { taskId }`) |
366
- | `check` | `compliance.summary` | Overall compliance summary |
367
- | `check` | `test` | Test status or coverage (`params: { format: "status" | "coverage" }`) |
368
- | `check` | `gate.status` | Lifecycle gate status |
369
- | `pipeline` | `stage.status` | Pipeline stage for epic (`params: { epicId }`) |
370
- | `pipeline` | `stage.validate` | Validate gate before advancing |
371
- | `pipeline` | `manifest.show` | Read manifest entry (`params: { id }`) |
372
- | `pipeline` | `manifest.list` | List manifest entries (`params: { filter?: "pending" }`) |
373
- | `pipeline` | `manifest.find` | Search manifest entries (`params: { query }`) |
374
- | `nexus` | `status` | Check if nexus is initialized |
375
- | `nexus` | `list` | List registered projects |
376
- | `admin` | `config.show` | Inspect current configuration |
377
- | `admin` | `adr.find` | Search architecture decision records |
378
- | `tools` | `skill.show` | Skill details (`params: { skillId }`) |
379
- | `sticky` | `list` | List sticky notes (`params: { status?, tag? }`) |
380
- | `sticky` | `show` | Show sticky details (`params: { stickyId }`) |
381
-
382
- #### Tier-0 Write Operations — Always Available
383
-
384
- | Domain | Operation | Description |
385
- |--------|-----------|-------------|
386
- | `tasks` | `add` | Create task (`params: { title, description, parentId?, status? }`) |
387
- | `tasks` | `update` | Update task (`params: { taskId, title?, status?, notes? }`) |
388
- | `tasks` | `complete` | Mark task done (`params: { taskId }`) |
389
- | `tasks` | `start` | Start working on a task (`params: { taskId }`) |
390
- | `tasks` | `stop` | Stop working on current task |
391
- | `session` | `start` | Start session (`params: { scope }`) — scope is **required** |
392
- | `session` | `end` | End session (`params: { note? }`) |
393
- | `memory` | `observe` | Save observation to brain (`params: { text, title? }`) |
394
-
395
- #### Tier-1 Write Operations — After Session Init
396
-
397
- | Domain | Operation | Description |
398
- |--------|-----------|-------------|
399
- | `tasks` | `cancel` | Cancel task (`params: { taskId }`) |
400
- | `tasks` | `archive` | Archive completed task (`params: { taskId }`) |
401
- | `tasks` | `restore` | Restore from done/archive (`params: { taskId, from: "done" \| "archive" }`) |
402
- | `tasks` | `delete` | Hard delete — irreversible (`params: { taskId }`) |
403
- | `tasks` | `reparent` | Move to different parent (`params: { taskId, newParentId }`) |
404
- | `tasks` | `reorder` | Reorder tasks within their parent (`params: { taskId, position }`) |
405
- | `session` | `resume` | Resume a prior session (`params: { sessionId }`) |
406
- | `session` | `suspend` | Pause session without ending it |
407
- | `session` | `record.decision` | Record a session decision (`params: { text, rationale }`) |
408
- | `session` | `record.assumption` | Record a session assumption (`params: { text }`) |
409
- | `admin` | `context.inject` | Inject protocol content into context (`params: { protocolType }`) — **moved from session domain** |
410
- | `memory` | `link` | Link memory entry to task (`params: { memoryId, taskId }`) |
411
- | `memory` | `decision.store` | Store structured decision (`params: { decision, rationale, taskId, alternatives? }`) |
412
- | `memory` | `pattern.store` | Store recurring pattern (`params: { name, type, impact, success, antiPattern? }`) |
413
- | `memory` | `learning.store` | Store a learning (`params: { text, confidence, taskId? }`) |
414
- | `orchestrate` | `start` | Start orchestrating an epic (`params: { epicId }`) |
415
- | `orchestrate` | `spawn` | Spawn prep for a task (`params: { taskId, skillIds? }`) |
416
- | `orchestrate` | `spawn.execute` | Execute spawn via adapter registry (`params: { taskId }`) |
417
- | `orchestrate` | `handoff` | Hand off context to subagent (`params: { taskId, context }`) |
418
- | `orchestrate` | `validate` | Pre-spawn gate check (`params: { taskId }`) |
419
- | `orchestrate` | `parallel` | Run parallel agent wave (`params: { action: "start" \| "end", waveId? }`) |
420
- | `check` | `test.run` | Run tests |
421
- | `check` | `gate.set` | Set or reset a lifecycle gate |
422
- | `pipeline` | `stage.record` | Record pipeline stage progress |
423
- | `pipeline` | `stage.gate.pass` | Pass a pipeline gate (`params: { stageId, gateId }`) |
424
- | `pipeline` | `stage.gate.fail` | Fail a gate with reason (`params: { stageId, gateId, reason }`) |
425
- | `pipeline` | `manifest.append` | Append manifest entry (`params: { entry }`) — **MANDATORY per BASE protocol** |
426
- | `pipeline` | `phase.set` | Set pipeline phase (`params: { phaseId, action: "start" \| "complete" }`) |
427
- | `pipeline` | `release.ship` | Ship a release (`params: { step? }`) |
428
- | `admin` | `config.set` | Update configuration (`params: { key, value }`) |
429
- | `tools` | `skill.install` | Install a skill (`params: { skillId }`) |
430
- | `tools` | `skill.uninstall` | Uninstall a skill (`params: { skillId }`) |
431
- | `tools` | `skill.refresh` | Bulk update all installed skills |
432
- | `sticky` | `add` | Create sticky note (`params: { content, tags?, color?, priority? }`) |
433
- | `sticky` | `convert` | Convert to task/memory (`params: { stickyId, targetType }`) |
434
- | `sticky` | `archive` | Archive sticky (`params: { stickyId }`) |
435
- | `sticky` | `purge` | Permanently delete sticky notes (`params: { stickyId }`) |
436
-
437
- ---
438
-
439
- ### CLI Reference (Primary)
440
-
441
- Use `ct` (alias for `cleo`) as the interface. CLI is the only dispatch method.
442
-
443
- ```bash
444
- ct find "query" # Search (99% less context than list)
445
- ct find --id T1234 # Search by ID
446
- ct show T1234 # Full task details
447
- ct add "Task title" # Create task
448
- ct complete T1234 # Complete task
449
- ct start T1234 # Start working on task
450
- ct dash # Project overview (admin.dash equivalent)
451
-
452
- ct sticky add "Quick note" # Create sticky note
453
- ct sticky list # List active stickies
454
- ct sticky show SN-001 # Show sticky details
455
- ```
456
-
457
- ---
458
-
459
- ### Task Discovery (Context Efficiency)
460
-
461
- **MUST** use efficient commands — `find` for discovery, `show` for details:
462
-
463
- - `list` includes full notes arrays (huge context cost)
464
- - `find` returns minimal fields only (99% less context)
465
- - Use `show` only when you need full details for a specific task
466
-
467
- #### Context Bloat Anti-Patterns
468
-
469
- | Anti-Pattern | Token Cost | Efficient Alternative | Savings |
470
- |-------------|-----------|----------------------|---------|
471
- | `tasks.list` (no parentId filter) | 2000-5000 | `tasks.find {query: "..."}` | 80-90% |
472
- | `admin.help {tier:2}` first call | 2000+ | `admin.help` (tier 0 default) | 60-75% |
473
- | `tasks.show` for every task | 400 x N | `tasks.find` then `show` for 1-2 | 70-90% |
474
- | `memory.fetch` without `memory.find` | large | `memory.find` → filter → `memory.fetch` | 80% |
475
- | `session.list` unfiltered | 300 x N | `session.status` first, then `session.find` if needed | 90% |
476
- | Reading full epic tree | 1000-3000 | `tasks.next` for suggestions | 80% |
477
-
478
- ---
479
-
480
- ### Anti-Pattern Reference
481
-
482
- | Bad Pattern | Correct Pattern | Why |
483
- |-------------|----------------|-----|
484
- | `research.list` | `pipeline.manifest.list` | research domain is defunct |
485
- | `research.show` | `pipeline.manifest.show` | research domain is defunct |
486
- | `research.link` | `cleo memory link` | research domain is defunct |
487
- | `system.dash` | `admin.dash` | system domain is defunct |
488
- | `system.context` | `admin.context` | system domain is defunct |
489
- | `skills.list` | `tools.skill.list` | skills domain is defunct |
490
- | `skills.show` | `tools.skill.show` | skills domain is defunct |
491
- | `tasks.list` (no filter) | `tasks.find {query: "..."}` | list returns ALL tasks + notes |
492
- | `tasks.reopen` | `tasks.restore {from: "done"}` | reopen is deprecated verb |
493
- | `tasks.unarchive` | `tasks.restore {from: "archive"}` | unarchive is deprecated verb |
494
- | `tasks.promote` | `tasks.reparent {newParentId: null}` | promote is deprecated verb |
495
- | `memory.brain.search` | `memory.find` | old operation name (cutover T5241) |
496
- | `memory.brain.observe` | `memory.observe` | old operation name (cutover T5241) |
497
- | `session.context.inject` | `admin.context.inject` | operation moved domains (reads filesystem, is an admin/bootstrap op) |
498
- | `memory.fetch` without `memory.find` | `memory.find` → filter → `memory.fetch` | fetch without filter returns everything |
499
- | Completing task without manifest append | `pipeline.manifest.append` then `tasks.complete` | BASE protocol violation (exit 62) |
500
- | Skipping `session.status` at start | Always check `session.status` first | loses prior context, causes duplicate work |
501
- | `cleo observe` | `cleo memory observe` | observe is not a top-level command |
502
-
503
- ---
504
-
505
- ### Progressive Disclosure
506
-
507
- Load only what you need. Escalate tiers when the task demands it:
508
-
509
- **Stay at Tier 0** (default — 80% of work):
510
- - Single task execution (implement, fix, test)
511
- - Task discovery and status updates
512
- - Session start/end
513
-
514
- **Escalate to Tier 1** when:
515
- - Managing pipeline stages or manifest entries
516
- - Running validation/compliance checks
517
- - Working with memory (timeline, fetch, decisions, patterns)
518
- - Orchestrating multi-agent workflows
519
-
520
- **Escalate to Tier 2** when (via `admin.help {tier:2}` first):
521
- - WarpChain pipeline operations (`pipeline.chain.*`)
522
- - Behavioral grading (`check.grade`)
523
- - Cross-project nexus deep queries (`nexus.resolve`, `nexus.graph`)
524
- - Data export/import (`admin.export`, `admin.import`)
525
-
526
- ---
527
-
528
- ### Session Protocol
529
-
530
- Sessions track work context across agent interactions.
531
-
532
- #### Quick Start
533
-
534
- ```bash
535
- # 1. CHECK session state first (always)
536
- ct session status
537
-
538
- # 2. RESUME or START
539
- ct session resume <id>
540
- # OR (only if no suitable session):
541
- ct session start --scope epic:T001
542
-
543
- # 3. WORK
544
- ct current / ct next / ct complete T005 / ct start T006
545
-
546
- # 4. END (ALWAYS when stopping)
547
- ct complete <id>
548
- ct session end
549
- ```
550
-
551
- ---
552
-
553
- ### Error Handling
554
-
555
- **CRITICAL: NEVER ignore exit codes. Failed commands = tasks NOT created/updated.**
556
-
557
- After EVERY command:
558
- 1. Exit code `0` = success, `1-22` = error, `100+` = special (not error)
559
- 2. JSON `"success": false` = operation failed
560
- 3. Execute `error.fix` — copy-paste-ready fix command
561
-
562
- | Exit | Code | Fix |
563
- |:----:|------|-----|
564
- | 4 | `E_NOT_FOUND` | Use `cleo find` to verify |
565
- | 6 | `E_VALIDATION_*` | Check field lengths, escape `$` as `\$` |
566
- | 10 | `E_PARENT_NOT_FOUND` | Verify with `cleo find <parent-id>` |
567
- | 11 | `E_DEPTH_EXCEEDED` | Max depth 3 (epic->task->subtask) |
568
- | 12 | `E_SIBLING_LIMIT` | Max 7 siblings per parent |
569
- | 62 | `MANIFEST_ENTRY_MISSING` | Subagent must call `pipeline.manifest.append` before `tasks.complete` |
570
-
571
- ---
572
-
573
- ### RCASD-IVTR+C Lifecycle (LOOM)
574
-
575
- **LOOM** (Logical Order of Operations Methodology) is the systematic framework for how CLEO processes project threads through the RCASD-IVTR+C pipeline. See `docs/concepts/CLEO-VISION.md` for the complete LOOM framework.
576
-
577
- **Lifecycle**: See `references/loom-lifecycle.md` for gate enforcement and subagent architecture.
578
-
579
- ### Pipeline Awareness
580
-
581
- Epics follow the RCASD-IVTR+C lifecycle managed through pipeline stages. Use `pipeline.stage.status` to check where an epic is in its lifecycle:
582
-
583
- | Stage | Purpose |
584
- |-------|---------|
585
- | `research` | Information gathering and analysis |
586
- | `consensus` | Validate claims and decisions |
587
- | `architecture_decision` | ADR and specification |
588
- | `specification` | Formal requirements |
589
- | `decomposition` | Task breakdown |
590
- | `implementation` | Build functionality |
591
- | `validation` | Verify against criteria |
592
- | `testing` | Test coverage |
593
- | `release` | Version and publish |
594
- | `contribution` | Multi-agent consensus tracking |
595
-
596
- ---
597
-
598
- ### Time Estimates Prohibited
599
-
600
- - **MUST NOT** estimate hours, days, weeks, or temporal duration
601
- - **MUST** use relative sizing: `small` / `medium` / `large`
602
- - **SHOULD** describe scope, complexity, dependencies when asked
603
-
604
- ---
605
-
606
- ### Further Reading
607
-
608
- For detailed guidance on specific topics, see:
609
-
610
- - **Session Protocol**: `references/session-protocol.md`
611
- - **LOOM Lifecycle**: `references/loom-lifecycle.md`
612
- - **Anti-Patterns**: `references/anti-patterns.md`
613
- - **Operation Constitution**: `docs/specs/CLEO-OPERATION-CONSTITUTION.md`
614
- - **Verb Standards**: `docs/specs/VERB-STANDARDS.md`
615
- - **Decision Tree source**: `.cleo/agent-outputs/T5610-decision-tree.md`
8
+ <!-- thin-pointer: full protocol is in CLEO-INJECTION.md (T9148) -->
9
+ Full protocol content lives in `~/.cleo/templates/CLEO-INJECTION.md`.
10
+ Emit any section with: `cleo briefing inject --section <name>`
11
+
12
+ Supported sections: `session-start` · `work-loop` · `triggers` · `task-creation`
13
+ · `task-discovery` · `session-commands` · `memory` · `nexus` · `orchestration`
14
+ · `playbooks` · `documents` · `error-handling` · `pre-complete-gate`
15
+ · `spawn-tiers` · `rules` · `memory-jit` · `escalation`
16
+
17
+ ## Quick Reference
18
+
19
+ | Need | Command |
20
+ |------|---------|
21
+ | Start session | `cleo session status` → `cleo briefing` |
22
+ | Find work | `cleo next` → `cleo show <id>` |
23
+ | Search tasks | `cleo find "query"` |
24
+ | Complete task | `cleo verify T### --gate ... --evidence "..."` → `cleo complete T###` |
25
+ | Save memory | `cleo memory observe "..." --title "..."` |
26
+ | Spawn subagent | `cleo orchestrate spawn <taskId> --tier 2` |
27
+
28
+ ## Skill-Specific Extensions
29
+
30
+ (No extensions beyond CLEO-INJECTION.md canonical content as of T9148.)
31
+ For full decision trees and operation reference tables, emit sections above.
@@ -4,12 +4,9 @@
4
4
  * Asserts that all required protocol markers are present in the skill file,
5
5
  * protecting against content drift as the file evolves.
6
6
  *
7
- * Checks:
8
- * - Required section markers exist: Decision Tree, Pre-Complete Gate Ritual,
9
- * Multi-Agent Coordination, Greenfield Bootstrap
10
- * - `cleo memory observe` is used (not the deprecated bare `cleo observe`)
11
- * - `cleo orchestrate ivtr` is referenced at least once
12
- * - At least 4 distinct `cleo <verb>` command patterns exist
7
+ * After T9148 (ct-cleo thin-pointer collapse), the SKILL.md became a ~31-line
8
+ * pointer to CLEO-INJECTION.md rather than a 615-line embedded protocol.
9
+ * These tests validate the thin-pointer structure's required elements.
13
10
  *
14
11
  * @task T808
15
12
  * @skill-version SKILL-14
@@ -36,32 +33,20 @@ const skillPath = join(skillRoot, 'SKILL.md');
36
33
  const skillContent = readFileSync(skillPath, 'utf-8');
37
34
 
38
35
  // ---------------------------------------------------------------------------
39
- // Required section markers (SKILL-10 through SKILL-13)
36
+ // Required structural elements (post-T9148 thin-pointer design)
40
37
  // ---------------------------------------------------------------------------
41
38
 
42
- describe('ct-cleo SKILL.md — required section markers', () => {
43
- it('contains "Decision Tree" section', () => {
44
- expect(skillContent).toContain('Decision Tree');
39
+ describe('ct-cleo SKILL.md — thin-pointer structure (post-T9148)', () => {
40
+ it('has a Quick Reference table or section', () => {
41
+ expect(skillContent).toContain('Quick Reference');
45
42
  });
46
43
 
47
- it('contains "Pre-Complete Gate Ritual" section', () => {
48
- expect(skillContent).toContain('Pre-Complete Gate Ritual');
44
+ it('points to CLEO-INJECTION.md canonical source', () => {
45
+ expect(skillContent).toContain('CLEO-INJECTION.md');
49
46
  });
50
47
 
51
- it('contains "Multi-Agent Coordination" section', () => {
52
- expect(skillContent).toContain('Multi-Agent Coordination');
53
- });
54
-
55
- it('contains "Greenfield Bootstrap" section', () => {
56
- expect(skillContent).toContain('Greenfield Bootstrap');
57
- });
58
-
59
- it('Decision Tree is the first H2 heading', () => {
60
- // Find the position of the first H2 (## ...) after the frontmatter
61
- const afterFrontmatter = skillContent.replace(/^---[\s\S]*?---\n/, '');
62
- const firstH2Match = /^## (.+)$/m.exec(afterFrontmatter);
63
- expect(firstH2Match).not.toBeNull();
64
- expect(firstH2Match![1]).toContain('Decision Tree');
48
+ it('lists supported sections or emit command', () => {
49
+ expect(skillContent).toContain('cleo briefing');
65
50
  });
66
51
  });
67
52
 
@@ -76,19 +61,16 @@ describe('ct-cleo SKILL.md — command correctness', () => {
76
61
 
77
62
  // The bare `cleo observe` form should only appear as a deprecated anti-pattern
78
63
  // in a table row (prefixed with `| `), never as an instruction to execute.
79
- // Count bare `cleo observe` occurrences that are NOT inside table pipe columns.
80
64
  const lines = skillContent.split('\n');
81
65
  const badLines = lines.filter((line) => {
82
- // Skip table rows — those document deprecated patterns intentionally
83
66
  if (/^\s*\|/.test(line)) return false;
84
- // Skip comment-style lines and code-block lines showing anti-patterns
85
67
  return /\bcleo observe\b/.test(line);
86
68
  });
87
69
  expect(badLines).toHaveLength(0);
88
70
  });
89
71
 
90
- it('references "cleo orchestrate ivtr" at least once', () => {
91
- expect(skillContent).toMatch(/cleo orchestrate ivtr/);
72
+ it('references cleo orchestrate spawn (the canonical spawn command)', () => {
73
+ expect(skillContent).toContain('cleo orchestrate spawn');
92
74
  });
93
75
  });
94
76
 
@@ -98,7 +80,6 @@ describe('ct-cleo SKILL.md — command correctness', () => {
98
80
 
99
81
  describe('ct-cleo SKILL.md — command diversity', () => {
100
82
  it('contains at least 4 distinct "cleo <verb>" command patterns', () => {
101
- // Extract all `cleo <word>` patterns (first word after cleo)
102
83
  const verbs = new Set<string>();
103
84
  const pattern = /\bcleo\s+([a-z][a-z0-9-]*)/g;
104
85
  let match: RegExpExecArray | null;
@@ -113,27 +94,27 @@ describe('ct-cleo SKILL.md — command diversity', () => {
113
94
  });
114
95
 
115
96
  // ---------------------------------------------------------------------------
116
- // Phase mapping (SKILL-10 enhancement)
97
+ // Phase coverage — section names are emittable (post-T9148 pointer design)
117
98
  // ---------------------------------------------------------------------------
118
99
 
119
- describe('ct-cleo SKILL.md — phase mapping', () => {
120
- it('includes phase mapping for research phase', () => {
121
- expect(skillContent).toContain('research');
100
+ describe('ct-cleo SKILL.md — phase coverage via emittable sections', () => {
101
+ it('mentions pre-complete gate section (emittable via cleo briefing inject)', () => {
102
+ expect(skillContent).toContain('pre-complete-gate');
122
103
  });
123
104
 
124
- it('includes phase mapping for implement phase', () => {
125
- expect(skillContent).toMatch(/implement/i);
105
+ it('mentions session-start section (research phase entry point)', () => {
106
+ expect(skillContent).toContain('session-start');
126
107
  });
127
108
 
128
- it('includes phase mapping for validate phase', () => {
129
- expect(skillContent).toMatch(/validate|validation/i);
109
+ it('mentions orchestration section (orchestrate commands)', () => {
110
+ expect(skillContent).toContain('orchestration');
130
111
  });
131
112
 
132
- it('includes phase mapping for test phase', () => {
133
- expect(skillContent).toMatch(/\btest\b/i);
113
+ it('mentions task-creation section (task creation guidance)', () => {
114
+ expect(skillContent).toContain('task-creation');
134
115
  });
135
116
 
136
- it('includes phase mapping for release phase', () => {
137
- expect(skillContent).toContain('release');
117
+ it('mentions work-loop section (core workflow loop)', () => {
118
+ expect(skillContent).toContain('work-loop');
138
119
  });
139
120
  });