@cleocode/skills 2026.5.92 → 2026.5.94

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.92",
3
+ "version": "2026.5.94",
4
4
  "description": "CLEO skill definitions - bundled with CLEO monorepo",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -51,3 +51,68 @@ Full charter (8 invariants + lifecycle decision table + prefix registry) lives i
51
51
  CLEO-INJECTION.md `task-creation` section (`cleo briefing inject --section task-creation`).
52
52
 
53
53
  For full decision trees and operation reference tables, emit sections above.
54
+
55
+ ## Decomposing an epic into N tasks
56
+
57
+ When you need to bulk-create child tasks under an epic, use `cleo add-batch`. It inserts all
58
+ tasks in a single atomic transaction — if ANY task fails validation, ALL inserts are rolled back.
59
+ This is the canonical pattern for epic decomposition; prefer it over N sequential `cleo add` calls.
60
+
61
+ ### Canonical command
62
+
63
+ ```bash
64
+ cleo add-batch --file tasks.json --parent <epicId>
65
+ ```
66
+
67
+ ### Minimal JSON example
68
+
69
+ Create a `tasks.json` file (array of task objects):
70
+
71
+ ```json
72
+ [
73
+ {
74
+ "title": "Research: survey add-batch prior art",
75
+ "acceptance": "Written summary of 3+ prior approaches|Coverage of rollback semantics"
76
+ },
77
+ {
78
+ "title": "Implement: add-batch CORE op with atomic semantics",
79
+ "acceptance": "All tasks inserted or none|Returns IDs of created tasks"
80
+ },
81
+ {
82
+ "title": "TF: teach add-batch in ct-cleo SKILL.md + CLEO-INJECTION",
83
+ "acceptance": "SKILL.md contains Decomposing an epic section|INJECTION Task Creation table includes add-batch row"
84
+ }
85
+ ]
86
+ ```
87
+
88
+ Every object in the array supports the same fields as `cleo add` (`title`, `acceptance`,
89
+ `kind`, `priority`, `size`, `labels`, `depends`). The `--parent` flag applies to all items.
90
+
91
+ ### Flags
92
+
93
+ | Flag | Description |
94
+ |------|-------------|
95
+ | `--file <path>` | Path to JSON file (array of task objects) |
96
+ | `-` | Read JSON array from stdin (`echo '[...]' \| cleo add-batch --file - --parent <id>`) |
97
+ | `--parent <id>` | Parent epic/task ID. All created tasks become direct children. |
98
+ | `--dry-run` | Validate and preview all tasks without inserting. Shows what would be created. |
99
+
100
+ ### Rollback semantic
101
+
102
+ ```
103
+ ANY task fails → ALL inserts rolled back (zero partial state)
104
+ ```
105
+
106
+ Run `--dry-run` first to catch validation errors (missing `acceptance`, title too long, etc.)
107
+ before committing the batch.
108
+
109
+ ### Meta-dogfood: how T9813 itself was decomposed
110
+
111
+ The Epic T9813 (`add-batch` feature saga) used this exact pattern to create its child tasks
112
+ (T9814–T9819) in a single call. Use the task decomposition from your epic planning as the
113
+ input JSON — `cleo show <epicId>` acceptance criteria → tasks array → `cleo add-batch`.
114
+
115
+ ### Related
116
+
117
+ - Saga/Epic workflow: `cleo briefing inject --section task-creation`
118
+ - Single task: `cleo add --type task --parent <id> --acceptance "..." --title "..."`
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ct-documentor
3
- description: Documentation creation, editing, and review with CLEO style guide compliance. Coordinates specialized skills for lookup, writing, and review. Use when creating or updating documentation files, consolidating scattered documentation, or validating documentation against style standards. Triggers on documentation tasks, doc update requests, or style guide compliance checks.
4
- version: 3.0.0
3
+ description: Documentation coordinator with CLEO style guide compliance. Routes every canonical-doc write (spec, adr, research, handoff, note, llm-readme) through the docs SSoT via `cleo docs add` / `cleo docs publish` / `cleo docs fetch` — never raw filesystem writes. Coordinates ct-docs-lookup, ct-docs-write, ct-docs-review, ct-spec-writer, and ct-adr-recorder. Use when creating or updating documentation files, consolidating scattered documentation, or validating documentation against style standards. Triggers on documentation tasks, doc update requests, or style guide compliance checks.
4
+ version: 3.1.0
5
5
  tier: 3
6
6
  core: false
7
7
  category: specialist
@@ -10,6 +10,8 @@ dependencies:
10
10
  - ct-docs-lookup
11
11
  - ct-docs-write
12
12
  - ct-docs-review
13
+ - ct-spec-writer
14
+ - ct-adr-recorder
13
15
  sharedResources:
14
16
  - subagent-protocol-base
15
17
  - task-system-integration
@@ -39,9 +41,100 @@ Context injection for documentation tasks spawned via cleo-subagent. Orchestrate
39
41
 
40
42
  | Skill | Purpose | Invoke When |
41
43
  |-------|---------|-------------|
42
- | `ct-docs-lookup` | Query existing docs, find references | Discovery phase, checking what exists |
43
- | `ct-docs-write` | Create/edit docs with CLEO style | Writing or updating content |
44
- | `ct-docs-review` | Check compliance with style guide | Quality validation before completion |
44
+ | `ct-docs-lookup` | Query existing docs, find references via `cleo docs fetch`/`list` | Discovery phase, checking what exists |
45
+ | `ct-docs-write` | Create/edit docs via `cleo docs add` with CLEO style | Writing or updating content |
46
+ | `ct-docs-review` | Check compliance with style guide, read through `cleo docs fetch` | Quality validation before completion |
47
+ | `ct-spec-writer` | Author specs (REQ-XXX requirements) via `cleo docs add --type spec` | Formal specification work |
48
+ | `ct-adr-recorder` | Author ADRs via `cleo docs add --type adr --slug adr-NNN-...` | Architecture decisions promoted from consensus |
49
+
50
+ The coordinator never writes content itself — it routes the work to the
51
+ specialist skill that owns the doc type, and every specialist routes its
52
+ filesystem write through the docs SSoT (see "Coordinator Pattern" below).
53
+
54
+ ---
55
+
56
+ ## Coordinator Pattern: SSoT-First Routing
57
+
58
+ ct-documentor is a router. It dispatches each doc-type to its owning skill,
59
+ and every owner writes through `cleo docs add` — not raw filesystem writes.
60
+
61
+ | Doc Type | Owner Skill | SSoT Command |
62
+ |----------|-------------|--------------|
63
+ | `spec` (REQ-XXX requirements) | `ct-spec-writer` | `cleo docs add <ownerId> <path> --type spec --slug spec-<feature>` |
64
+ | `adr` (architecture decisions) | `ct-adr-recorder` | `cleo docs add <ownerId> <path> --type adr --slug adr-<NNN>-<rest>` |
65
+ | `research` (multi-source investigation) | `ct-research-agent` | `cleo docs add <ownerId> <path> --type research --slug research-<topic>` |
66
+ | `handoff` (session/agent transition) | `ct-documentor` (this skill) | `cleo docs add <ownerId> <path> --type handoff --slug handoff-<context>` |
67
+ | `note` (conversational prose) | `ct-docs-write` | `cleo docs add <ownerId> <path> --type note --slug <kebab-topic>` |
68
+ | `llm-readme` (agent-facing) | `ct-docs-write` | `cleo docs add <ownerId> <path> --type llm-readme --slug <kebab-topic>` |
69
+
70
+ Hard rule: EVERY canonical-type write goes through the SSoT. The coordinator
71
+ rejects any subagent return that wrote raw markdown into `.cleo/adrs/`,
72
+ `.cleo/research/`, `.cleo/agent-outputs/`, or `docs/` without first
73
+ materializing through `cleo docs add` + (optionally) `cleo docs publish`.
74
+
75
+ ---
76
+
77
+ ## Through SDK (preferred)
78
+
79
+ Documentation work flows through the docs SSoT in three steps —
80
+ add, publish, fetch. Use the slug-based contract so downstream consumers
81
+ can retrieve docs without grepping the filesystem.
82
+
83
+ ### Add a doc attached to a task
84
+
85
+ ```bash
86
+ cleo docs add T1234 docs/drafts/feature-x.md \
87
+ --type note \
88
+ --slug feature-x-overview \
89
+ --desc "Conversational overview — pre-review"
90
+ ```
91
+
92
+ - `--type` MUST be one of `spec | adr | research | handoff | note | llm-readme`.
93
+ Pick the type by the document's purpose, not its filename.
94
+ - `--slug` is the human-friendly retrieval handle (kebab-case). If taken the
95
+ CLI returns `E_SLUG_TAKEN` with 3 alternatives — pick one, do not overwrite.
96
+ - The owner ID (`T1234` above) auto-classifies the attachment by prefix:
97
+ `T###` → task, `ses_*` → session, `O-*` → observation.
98
+
99
+ ### Publish to a git-tracked path (when the doc must live on disk)
100
+
101
+ ```bash
102
+ cleo docs publish --for T1234 --to docs/feature-x.md
103
+ ```
104
+
105
+ Atomic tmp-then-rename. The published file ships in the next commit; the
106
+ SSoT blob remains canonical and continues to track future versions.
107
+
108
+ ### Fetch the doc back by slug
109
+
110
+ ```bash
111
+ cleo docs fetch feature-x-overview # latest version
112
+ cleo docs versions --for T1234 # list every SHA version
113
+ ```
114
+
115
+ Slug-based fetch is the contract used by reviewers, downstream skills, and
116
+ the docs graph — never grep the filesystem for the file you just wrote.
117
+
118
+ ### List + sync
119
+
120
+ ```bash
121
+ cleo docs list --type spec --project # every spec in this project
122
+ cleo docs list --task T1234 # everything attached to a task
123
+ cleo docs sync --from docs/legacy.md --for T1234 --type note --slug legacy-doc
124
+ ```
125
+
126
+ `cleo docs sync` back-fills an existing on-disk file into the SSoT.
127
+
128
+ ---
129
+
130
+ ## Deprecated: Direct filesystem
131
+
132
+ The legacy "write straight to `.cleo/adrs/`, `.cleo/research/`,
133
+ `.cleo/agent-outputs/`, or `docs/` and commit" pattern is deprecated.
134
+ The drift between the working file and the docs SSoT is real: published
135
+ files go stale, types are inferred ad-hoc from path, and slug-based
136
+ retrieval becomes impossible. Migrate every doc-type write to
137
+ `cleo docs add --type X --slug Y`.
45
138
 
46
139
  ---
47
140
 
@@ -61,16 +154,19 @@ BEFORE creating ANY new file, you MUST:
61
154
 
62
155
  ### Phase 1: Discovery (MANDATORY)
63
156
 
64
- Before writing anything, discover what exists:
157
+ Before writing anything, discover what exists. Prefer the SSoT over `Glob`/`Grep`
158
+ when scanning canonical docs — `cleo docs list` returns slug + owner + type
159
+ without forcing a filesystem walk.
65
160
 
66
161
  ```bash
67
- # List documentation structure
68
- Glob: pattern="docs/**/*.md"
162
+ # SSoT-first discovery (preferred)
163
+ cleo docs list --project # all docs for this project
164
+ cleo docs list --type {TYPE} --project # docs filtered by canonical type
165
+ cleo docs fetch {SUSPECTED_SLUG} # check if a slug exists
69
166
 
70
- # Search for existing content on topic
167
+ # Filesystem fallback (only for un-migrated content)
168
+ Glob: pattern="docs/**/*.md"
71
169
  Grep: pattern="{TOPIC_KEYWORDS}" path="docs/"
72
-
73
- # Check for related files
74
170
  Grep: pattern="{RELATED_TERMS}" path="docs/" output_mode="files_with_matches"
75
171
  ```
76
172
 
@@ -131,12 +227,14 @@ Checklist:
131
227
 
132
228
  Before completing, verify:
133
229
 
134
- - [ ] Searched for existing docs on this topic
230
+ - [ ] Searched for existing docs on this topic via `cleo docs list` first
135
231
  - [ ] Did NOT create a file that duplicates existing content
136
232
  - [ ] Updated existing file if one existed
137
233
  - [ ] Added deprecation notice if consolidating
138
234
  - [ ] Cross-references are updated
139
235
  - [ ] No orphaned documentation created
236
+ - [ ] Every canonical-type write went through `cleo docs add --type X --slug Y`
237
+ - [ ] Slug retrieval verified via `cleo docs fetch <slug>` before declaring done
140
238
 
141
239
  ---
142
240
 
@@ -221,9 +319,13 @@ Append ONE line to `{{MANIFEST_PATH}}`:
221
319
 
222
320
  ## Completion Requirements
223
321
 
224
- - [ ] Discovery phase completed (searched existing docs)
322
+ - [ ] Discovery phase completed (searched existing docs via `cleo docs list`)
225
323
  - [ ] Core principle followed (maintain, don't duplicate)
226
- - [ ] `/ct-docs-write` invoked for content creation
324
+ - [ ] Coordinator pattern followed: every doc-type routed to its owning skill
325
+ - [ ] Every canonical-type write went through `cleo docs add --type X --slug Y`
326
+ - [ ] `/ct-docs-write` invoked for `note`/`llm-readme` content
327
+ - [ ] `/ct-spec-writer` invoked when writing specs (REQ-XXX requirements)
328
+ - [ ] `/ct-adr-recorder` invoked when promoting consensus → ADR
227
329
  - [ ] `/ct-docs-review` invoked for quality validation
228
330
  - [ ] Anti-duplication checklist verified
229
331
  - [ ] Output file written with "Files NOT Created" section