@cleocode/skills 2.0.0

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.
Files changed (171) hide show
  1. package/dispatch-config.json +404 -0
  2. package/index.d.ts +178 -0
  3. package/index.js +405 -0
  4. package/package.json +14 -0
  5. package/profiles/core.json +7 -0
  6. package/profiles/full.json +10 -0
  7. package/profiles/minimal.json +7 -0
  8. package/profiles/recommended.json +7 -0
  9. package/provider-skills-map.json +97 -0
  10. package/skills/_shared/cleo-style-guide.md +84 -0
  11. package/skills/_shared/manifest-operations.md +810 -0
  12. package/skills/_shared/placeholders.json +433 -0
  13. package/skills/_shared/skill-chaining-patterns.md +237 -0
  14. package/skills/_shared/subagent-protocol-base.md +223 -0
  15. package/skills/_shared/task-system-integration.md +232 -0
  16. package/skills/_shared/testing-framework-config.md +110 -0
  17. package/skills/ct-cleo/SKILL.md +490 -0
  18. package/skills/ct-cleo/references/anti-patterns.md +19 -0
  19. package/skills/ct-cleo/references/loom-lifecycle.md +136 -0
  20. package/skills/ct-cleo/references/orchestrator-constraints.md +55 -0
  21. package/skills/ct-cleo/references/session-protocol.md +162 -0
  22. package/skills/ct-codebase-mapper/SKILL.md +82 -0
  23. package/skills/ct-contribution/SKILL.md +521 -0
  24. package/skills/ct-contribution/templates/contribution-init.json +21 -0
  25. package/skills/ct-dev-workflow/SKILL.md +423 -0
  26. package/skills/ct-docs-lookup/SKILL.md +66 -0
  27. package/skills/ct-docs-review/SKILL.md +175 -0
  28. package/skills/ct-docs-write/SKILL.md +108 -0
  29. package/skills/ct-documentor/SKILL.md +231 -0
  30. package/skills/ct-epic-architect/SKILL.md +305 -0
  31. package/skills/ct-epic-architect/references/bug-epic-example.md +172 -0
  32. package/skills/ct-epic-architect/references/commands.md +201 -0
  33. package/skills/ct-epic-architect/references/feature-epic-example.md +210 -0
  34. package/skills/ct-epic-architect/references/migration-epic-example.md +244 -0
  35. package/skills/ct-epic-architect/references/output-format.md +92 -0
  36. package/skills/ct-epic-architect/references/patterns.md +284 -0
  37. package/skills/ct-epic-architect/references/refactor-epic-example.md +412 -0
  38. package/skills/ct-epic-architect/references/research-epic-example.md +226 -0
  39. package/skills/ct-epic-architect/references/shell-escaping.md +86 -0
  40. package/skills/ct-epic-architect/references/skill-aware-execution.md +195 -0
  41. package/skills/ct-grade/SKILL.md +230 -0
  42. package/skills/ct-grade/agents/analysis-reporter.md +203 -0
  43. package/skills/ct-grade/agents/blind-comparator.md +157 -0
  44. package/skills/ct-grade/agents/scenario-runner.md +134 -0
  45. package/skills/ct-grade/eval-viewer/__pycache__/generate_grade_review.cpython-314.pyc +0 -0
  46. package/skills/ct-grade/eval-viewer/generate_grade_review.py +1138 -0
  47. package/skills/ct-grade/eval-viewer/generate_grade_viewer.py +544 -0
  48. package/skills/ct-grade/eval-viewer/generate_review.py +283 -0
  49. package/skills/ct-grade/eval-viewer/grade-review.html +1574 -0
  50. package/skills/ct-grade/eval-viewer/viewer.html +219 -0
  51. package/skills/ct-grade/evals/evals.json +94 -0
  52. package/skills/ct-grade/references/ab-test-methodology.md +150 -0
  53. package/skills/ct-grade/references/domains.md +137 -0
  54. package/skills/ct-grade/references/grade-spec.md +236 -0
  55. package/skills/ct-grade/references/scenario-playbook.md +234 -0
  56. package/skills/ct-grade/references/token-tracking.md +120 -0
  57. package/skills/ct-grade/scripts/__pycache__/audit_analyzer.cpython-314.pyc +0 -0
  58. package/skills/ct-grade/scripts/__pycache__/run_ab_test.cpython-314.pyc +0 -0
  59. package/skills/ct-grade/scripts/__pycache__/run_all.cpython-314.pyc +0 -0
  60. package/skills/ct-grade/scripts/__pycache__/token_tracker.cpython-314.pyc +0 -0
  61. package/skills/ct-grade/scripts/audit_analyzer.py +279 -0
  62. package/skills/ct-grade/scripts/generate_report.py +283 -0
  63. package/skills/ct-grade/scripts/run_ab_test.py +504 -0
  64. package/skills/ct-grade/scripts/run_all.py +287 -0
  65. package/skills/ct-grade/scripts/setup_run.py +183 -0
  66. package/skills/ct-grade/scripts/token_tracker.py +630 -0
  67. package/skills/ct-grade-v2-1/SKILL.md +237 -0
  68. package/skills/ct-grade-v2-1/agents/analysis-reporter.md +203 -0
  69. package/skills/ct-grade-v2-1/agents/blind-comparator.md +157 -0
  70. package/skills/ct-grade-v2-1/agents/scenario-runner.md +179 -0
  71. package/skills/ct-grade-v2-1/evals/evals.json +74 -0
  72. package/skills/ct-grade-v2-1/grade-viewer/__pycache__/build_op_stats.cpython-314.pyc +0 -0
  73. package/skills/ct-grade-v2-1/grade-viewer/__pycache__/generate_grade_review.cpython-314.pyc +0 -0
  74. package/skills/ct-grade-v2-1/grade-viewer/build_op_stats.py +174 -0
  75. package/skills/ct-grade-v2-1/grade-viewer/eval-analysis.json +41 -0
  76. package/skills/ct-grade-v2-1/grade-viewer/eval-report.md +34 -0
  77. package/skills/ct-grade-v2-1/grade-viewer/generate_grade_review.py +1023 -0
  78. package/skills/ct-grade-v2-1/grade-viewer/generate_grade_viewer.py +548 -0
  79. package/skills/ct-grade-v2-1/grade-viewer/grade-review-eval.html +613 -0
  80. package/skills/ct-grade-v2-1/grade-viewer/grade-review.html +1532 -0
  81. package/skills/ct-grade-v2-1/grade-viewer/viewer.html +620 -0
  82. package/skills/ct-grade-v2-1/manifest-entry.json +31 -0
  83. package/skills/ct-grade-v2-1/references/ab-testing.md +233 -0
  84. package/skills/ct-grade-v2-1/references/domains-ssot.md +156 -0
  85. package/skills/ct-grade-v2-1/references/grade-spec-v2.md +167 -0
  86. package/skills/ct-grade-v2-1/references/playbook-v2.md +393 -0
  87. package/skills/ct-grade-v2-1/references/token-tracking.md +202 -0
  88. package/skills/ct-grade-v2-1/scripts/generate_report.py +419 -0
  89. package/skills/ct-grade-v2-1/scripts/run_ab_test.py +493 -0
  90. package/skills/ct-grade-v2-1/scripts/run_scenario.py +396 -0
  91. package/skills/ct-grade-v2-1/scripts/setup_run.py +207 -0
  92. package/skills/ct-grade-v2-1/scripts/token_tracker.py +175 -0
  93. package/skills/ct-memory/SKILL.md +84 -0
  94. package/skills/ct-orchestrator/INSTALL.md +61 -0
  95. package/skills/ct-orchestrator/README.md +69 -0
  96. package/skills/ct-orchestrator/SKILL.md +380 -0
  97. package/skills/ct-orchestrator/manifest-entry.json +19 -0
  98. package/skills/ct-orchestrator/orchestrator-prompt.txt +17 -0
  99. package/skills/ct-orchestrator/references/SUBAGENT-PROTOCOL-BLOCK.md +66 -0
  100. package/skills/ct-orchestrator/references/autonomous-operation.md +167 -0
  101. package/skills/ct-orchestrator/references/lifecycle-gates.md +98 -0
  102. package/skills/ct-orchestrator/references/orchestrator-compliance.md +271 -0
  103. package/skills/ct-orchestrator/references/orchestrator-handoffs.md +85 -0
  104. package/skills/ct-orchestrator/references/orchestrator-patterns.md +164 -0
  105. package/skills/ct-orchestrator/references/orchestrator-recovery.md +113 -0
  106. package/skills/ct-orchestrator/references/orchestrator-spawning.md +271 -0
  107. package/skills/ct-orchestrator/references/orchestrator-tokens.md +180 -0
  108. package/skills/ct-research-agent/SKILL.md +226 -0
  109. package/skills/ct-skill-creator/.cleo/.context-state.json +13 -0
  110. package/skills/ct-skill-creator/.cleo/logs/cleo.2026-03-07.1.log +24 -0
  111. package/skills/ct-skill-creator/.cleo/tasks.db +0 -0
  112. package/skills/ct-skill-creator/SKILL.md +356 -0
  113. package/skills/ct-skill-creator/agents/analyzer.md +276 -0
  114. package/skills/ct-skill-creator/agents/comparator.md +204 -0
  115. package/skills/ct-skill-creator/agents/grader.md +225 -0
  116. package/skills/ct-skill-creator/assets/eval_review.html +146 -0
  117. package/skills/ct-skill-creator/eval-viewer/__pycache__/generate_review.cpython-314.pyc +0 -0
  118. package/skills/ct-skill-creator/eval-viewer/generate_review.py +471 -0
  119. package/skills/ct-skill-creator/eval-viewer/viewer.html +1325 -0
  120. package/skills/ct-skill-creator/manifest-entry.json +17 -0
  121. package/skills/ct-skill-creator/references/dynamic-context.md +228 -0
  122. package/skills/ct-skill-creator/references/frontmatter.md +83 -0
  123. package/skills/ct-skill-creator/references/invocation-control.md +165 -0
  124. package/skills/ct-skill-creator/references/output-patterns.md +86 -0
  125. package/skills/ct-skill-creator/references/provider-deployment.md +175 -0
  126. package/skills/ct-skill-creator/references/schemas.md +430 -0
  127. package/skills/ct-skill-creator/references/workflows.md +28 -0
  128. package/skills/ct-skill-creator/scripts/__init__.py +1 -0
  129. package/skills/ct-skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  130. package/skills/ct-skill-creator/scripts/__pycache__/aggregate_benchmark.cpython-314.pyc +0 -0
  131. package/skills/ct-skill-creator/scripts/__pycache__/generate_report.cpython-314.pyc +0 -0
  132. package/skills/ct-skill-creator/scripts/__pycache__/improve_description.cpython-314.pyc +0 -0
  133. package/skills/ct-skill-creator/scripts/__pycache__/init_skill.cpython-314.pyc +0 -0
  134. package/skills/ct-skill-creator/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
  135. package/skills/ct-skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
  136. package/skills/ct-skill-creator/scripts/__pycache__/run_loop.cpython-314.pyc +0 -0
  137. package/skills/ct-skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
  138. package/skills/ct-skill-creator/scripts/aggregate_benchmark.py +401 -0
  139. package/skills/ct-skill-creator/scripts/generate_report.py +326 -0
  140. package/skills/ct-skill-creator/scripts/improve_description.py +247 -0
  141. package/skills/ct-skill-creator/scripts/init_skill.py +306 -0
  142. package/skills/ct-skill-creator/scripts/package_skill.py +110 -0
  143. package/skills/ct-skill-creator/scripts/quick_validate.py +97 -0
  144. package/skills/ct-skill-creator/scripts/run_eval.py +310 -0
  145. package/skills/ct-skill-creator/scripts/run_loop.py +328 -0
  146. package/skills/ct-skill-creator/scripts/utils.py +47 -0
  147. package/skills/ct-skill-validator/SKILL.md +178 -0
  148. package/skills/ct-skill-validator/agents/ecosystem-checker.md +151 -0
  149. package/skills/ct-skill-validator/assets/valid-skill-example.md +13 -0
  150. package/skills/ct-skill-validator/evals/eval_set.json +14 -0
  151. package/skills/ct-skill-validator/evals/evals.json +52 -0
  152. package/skills/ct-skill-validator/manifest-entry.json +20 -0
  153. package/skills/ct-skill-validator/references/cleo-ecosystem-rules.md +163 -0
  154. package/skills/ct-skill-validator/references/validation-rules.md +168 -0
  155. package/skills/ct-skill-validator/scripts/__init__.py +0 -0
  156. package/skills/ct-skill-validator/scripts/__pycache__/audit_body.cpython-314.pyc +0 -0
  157. package/skills/ct-skill-validator/scripts/__pycache__/check_ecosystem.cpython-314.pyc +0 -0
  158. package/skills/ct-skill-validator/scripts/__pycache__/generate_validation_report.cpython-314.pyc +0 -0
  159. package/skills/ct-skill-validator/scripts/__pycache__/validate.cpython-314.pyc +0 -0
  160. package/skills/ct-skill-validator/scripts/audit_body.py +242 -0
  161. package/skills/ct-skill-validator/scripts/check_ecosystem.py +169 -0
  162. package/skills/ct-skill-validator/scripts/check_manifest.py +172 -0
  163. package/skills/ct-skill-validator/scripts/generate_validation_report.py +442 -0
  164. package/skills/ct-skill-validator/scripts/validate.py +422 -0
  165. package/skills/ct-spec-writer/SKILL.md +189 -0
  166. package/skills/ct-stickynote/README.md +14 -0
  167. package/skills/ct-stickynote/SKILL.md +46 -0
  168. package/skills/ct-task-executor/SKILL.md +296 -0
  169. package/skills/ct-validator/SKILL.md +216 -0
  170. package/skills/manifest.json +469 -0
  171. package/skills.json +281 -0
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: ct-docs-write
3
+ description: This skill should be used when creating, editing, or reviewing documentation files (markdown, MDX, README, guides). Use when the user asks to "write docs", "create documentation", "edit the README", "improve doc clarity", "make docs more readable", "follow the style guide", or "write user-facing content". Applies CLEO's conversational, clear, and user-focused writing style.
4
+ version: 1.0.0
5
+ tier: 3
6
+ core: false
7
+ category: composition
8
+ protocol: null
9
+ dependencies: []
10
+ sharedResources: []
11
+ compatibility:
12
+ - claude-code
13
+ - cursor
14
+ - windsurf
15
+ - gemini-cli
16
+ license: MIT
17
+ ---
18
+
19
+ # Documentation Writing Skill
20
+
21
+ @skills/_shared/cleo-style-guide.md
22
+
23
+ ## When writing documentation
24
+
25
+ ### Start here
26
+
27
+ 1. **Who is this for?** Match complexity to audience. Don't oversimplify hard things or overcomplicate simple ones.
28
+ 2. **What do they need?** Get them to the answer fast. Nobody wants to be in docs longer than necessary.
29
+ 3. **What did you struggle with?** Those common questions you had when learning? Answer them (without literally including the question).
30
+
31
+ ### Writing process
32
+
33
+ **Draft:**
34
+
35
+ - Write out the steps/explanation as you'd tell a colleague
36
+ - Lead with what to do, then explain why
37
+ - Use headings that state your point: "Set SAML before adding users" not "SAML configuration timing"
38
+
39
+ **Edit:**
40
+
41
+ - Read aloud. Does it sound like you talking? If it's too formal, simplify.
42
+ - Cut anything that doesn't directly help the reader
43
+ - Check each paragraph has one clear purpose
44
+ - Verify examples actually work (don't give examples that error)
45
+
46
+ **Polish:**
47
+
48
+ - Make links descriptive (never "here")
49
+ - Backticks only for code/variables, **bold** for UI elements
50
+ - American spelling, serial commas
51
+ - Keep images minimal and scoped tight
52
+
53
+ **Format:**
54
+
55
+ - Run prettier on the file after making edits: `yarn prettier --write <file-path>`
56
+ - This ensures consistent formatting across all documentation
57
+
58
+ ### Common patterns
59
+
60
+ **Instructions:**
61
+
62
+ ```markdown
63
+ Run:
64
+ \`\`\`
65
+ command-to-run
66
+ \`\`\`
67
+
68
+ Then:
69
+ \`\`\`
70
+ next-command
71
+ \`\`\`
72
+
73
+ This ensures you're getting the latest changes.
74
+ ```
75
+
76
+ Not: "(remember to run X before Y...)" buried in a paragraph.
77
+
78
+ **Headings:**
79
+
80
+ - "Use environment variables for configuration" ✅
81
+ - "Environment variables" ❌ (too vague)
82
+ - "How to use environment variables for configuration" ❌ (too wordy)
83
+
84
+ **Links:**
85
+
86
+ - "Check out the [SAML documentation](link)" ✅
87
+ - "Read the docs [here](link)" ❌
88
+
89
+ ### Watch out for
90
+
91
+ - Describing tasks as "easy" (you don't know the reader's context)
92
+ - Using "we" when talking about CLEO features (use "CLEO" or "it")
93
+ - Formal language: "utilize", "reference", "offerings"
94
+ - Too peppy: multiple exclamation points
95
+ - Burying the action in explanation
96
+ - Code examples that don't work
97
+ - Numbers that will become outdated
98
+
99
+ ### Quick reference
100
+
101
+ | Write This | Not This |
102
+ | -------------------------- | ------------------ |
103
+ | people, companies | users |
104
+ | summarize | aggregate |
105
+ | take a look at | reference |
106
+ | can't, don't | cannot, do not |
107
+ | **Filter** button | \`Filter\` button |
108
+ | Check out [the docs](link) | Click [here](link) |
@@ -0,0 +1,231 @@
1
+ ---
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
5
+ tier: 3
6
+ core: false
7
+ category: specialist
8
+ protocol: null
9
+ dependencies:
10
+ - ct-docs-lookup
11
+ - ct-docs-write
12
+ - ct-docs-review
13
+ sharedResources:
14
+ - subagent-protocol-base
15
+ - task-system-integration
16
+ compatibility:
17
+ - claude-code
18
+ - cursor
19
+ - windsurf
20
+ - gemini-cli
21
+ license: MIT
22
+ ---
23
+
24
+ # Documentation Specialist Context Injection
25
+
26
+ **Protocol**: @src/protocols/implementation.md
27
+ **Type**: Context Injection (cleo-subagent)
28
+ **Version**: 3.0.0
29
+
30
+ ---
31
+
32
+ ## Purpose
33
+
34
+ Context injection for documentation tasks spawned via cleo-subagent. Orchestrates documentation workflows by coordinating specialized skills for lookup, writing, and review.
35
+
36
+ ---
37
+
38
+ ## Skill Coordination
39
+
40
+ | Skill | Purpose | Invoke When |
41
+ |-------|---------|-------------|
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 |
45
+
46
+ ---
47
+
48
+ ## Core Principle: MAINTAIN, DON'T DUPLICATE
49
+
50
+ ```
51
+ BEFORE creating ANY new file, you MUST:
52
+ 1. Search for existing documentation on the topic
53
+ 2. Identify the canonical location for this information
54
+ 3. UPDATE the existing file instead of creating a new one
55
+ 4. Only create new files when NO suitable location exists
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Workflow Phases
61
+
62
+ ### Phase 1: Discovery (MANDATORY)
63
+
64
+ Before writing anything, discover what exists:
65
+
66
+ ```bash
67
+ # List documentation structure
68
+ Glob: pattern="docs/**/*.md"
69
+
70
+ # Search for existing content on topic
71
+ Grep: pattern="{TOPIC_KEYWORDS}" path="docs/"
72
+
73
+ # Check for related files
74
+ Grep: pattern="{RELATED_TERMS}" path="docs/" output_mode="files_with_matches"
75
+ ```
76
+
77
+ **Invoke `/ct-docs-lookup`** for deeper documentation research.
78
+
79
+ ### Phase 2: Assess
80
+
81
+ | Question | Action |
82
+ |----------|--------|
83
+ | Does a doc file for this topic exist? | UPDATE that file |
84
+ | Is the info scattered across files? | CONSOLIDATE into canonical location |
85
+ | Is there a related doc that should include this? | ADD section to that file |
86
+ | Is this truly new with no home? | CREATE minimal new file |
87
+
88
+ ### Phase 3: Write/Update
89
+
90
+ **Invoke `/ct-docs-write`** for content creation.
91
+
92
+ **For EXISTING files:**
93
+ 1. Read the current content
94
+ 2. Identify the correct section for new info
95
+ 3. Add/update content IN PLACE
96
+ 4. Preserve existing structure
97
+ 5. Update any version numbers or dates
98
+
99
+ **For CONSOLIDATION:**
100
+ 1. Identify all files with related content
101
+ 2. Choose the canonical location
102
+ 3. Move content to canonical file
103
+ 4. Add deprecation notices to old locations
104
+ 5. Update cross-references
105
+
106
+ **For NEW files (last resort):**
107
+ 1. Confirm no existing location is suitable
108
+ 2. Follow project's doc structure conventions
109
+ 3. Add to appropriate docs/ subdirectory
110
+ 4. Update any index or TOC files
111
+ 5. Keep minimal - single topic focus
112
+
113
+ ### Phase 4: Review
114
+
115
+ **Invoke `/ct-docs-review`** for quality validation.
116
+
117
+ Checklist:
118
+ - [ ] No formal language ("utilize", "offerings", "cannot")
119
+ - [ ] "People/companies" not "users"
120
+ - [ ] No excessive exclamation points
121
+ - [ ] Important information leads, not buried
122
+ - [ ] No verbose text without value
123
+ - [ ] Headings state the point
124
+ - [ ] Descriptive link text (never "here")
125
+ - [ ] No "easy" or "simple"
126
+ - [ ] Code examples actually work
127
+
128
+ ---
129
+
130
+ ## Anti-Duplication Checklist
131
+
132
+ Before completing, verify:
133
+
134
+ - [ ] Searched for existing docs on this topic
135
+ - [ ] Did NOT create a file that duplicates existing content
136
+ - [ ] Updated existing file if one existed
137
+ - [ ] Added deprecation notice if consolidating
138
+ - [ ] Cross-references are updated
139
+ - [ ] No orphaned documentation created
140
+
141
+ ---
142
+
143
+ ## Task System Integration
144
+
145
+ @skills/_shared/task-system-integration.md
146
+
147
+ ### Task Workflow
148
+
149
+ ```bash
150
+ # 1. Read task details
151
+ cleo show {TASK_ID}
152
+
153
+ # 2. Start task
154
+ cleo start {TASK_ID}
155
+
156
+ # 3. Execute documentation workflow (phases 1-4)
157
+
158
+ # 4. Complete task when done
159
+ cleo complete {TASK_ID}
160
+
161
+ # 5. Link research if applicable
162
+ cleo research link {TASK_ID} {RESEARCH_ID}
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Subagent Protocol
168
+
169
+ @skills/_shared/subagent-protocol-base.md
170
+
171
+ ### Output Requirements
172
+
173
+ 1. MUST write documentation output to: `{{OUTPUT_DIR}}/`
174
+ 2. MUST append ONE line to: `{{MANIFEST_PATH}}`
175
+ 3. MUST return ONLY: "Documentation complete. See MANIFEST.jsonl for summary."
176
+ 4. MUST NOT return documentation content in response
177
+
178
+ ### Output File Format
179
+
180
+ Write to `{{OUTPUT_DIR}}/`:
181
+
182
+ ```markdown
183
+ # Documentation Update: {TITLE}
184
+
185
+ **Date**: {DATE} | **Agent**: ct-documentor | **Status**: complete
186
+
187
+ ---
188
+
189
+ ## Summary
190
+
191
+ {What was updated and why}
192
+
193
+ ## Changes Made
194
+
195
+ ### File: {path/to/file.md}
196
+ - {Change 1}
197
+ - {Change 2}
198
+
199
+ ## Files NOT Created (Avoided Duplication)
200
+
201
+ - {Considered creating X but updated Y instead}
202
+ - {Found existing coverage in Z}
203
+
204
+ ## Verification
205
+
206
+ - [ ] Changes don't duplicate existing content
207
+ - [ ] Cross-references updated
208
+ - [ ] Examples tested
209
+ - [ ] Style guide compliance verified via ct-docs-review
210
+ ```
211
+
212
+ ### Manifest Entry
213
+
214
+ Append ONE line to `{{MANIFEST_PATH}}`:
215
+
216
+ ```json
217
+ {"id":"docs-{TOPIC}-{DATE}","file":"{DATE}_docs-{TOPIC}.md","title":"Documentation Update: {TITLE}","date":"{DATE}","status":"complete","agent_type":"documentation","topics":["documentation","{topic}"],"key_findings":["Updated {file} with {change}","Consolidated {topic} docs into {canonical-location}","Avoided duplication by updating existing {file}"],"actionable":false,"needs_followup":[],"linked_tasks":["{TASK_ID}"]}
218
+ ```
219
+
220
+ ---
221
+
222
+ ## Completion Requirements
223
+
224
+ - [ ] Discovery phase completed (searched existing docs)
225
+ - [ ] Core principle followed (maintain, don't duplicate)
226
+ - [ ] `/ct-docs-write` invoked for content creation
227
+ - [ ] `/ct-docs-review` invoked for quality validation
228
+ - [ ] Anti-duplication checklist verified
229
+ - [ ] Output file written with "Files NOT Created" section
230
+ - [ ] Manifest entry appended
231
+ - [ ] Task completed via `cleo complete`
@@ -0,0 +1,305 @@
1
+ ---
2
+ name: ct-epic-architect
3
+ description: Epic planning and task decomposition for breaking down large initiatives into atomic, executable tasks. Provides dependency analysis, wave-based parallel execution planning, hierarchy management, and research linking. Use when creating epics, decomposing initiatives into task trees, planning parallel workflows, or analyzing task dependencies. Triggers on epic creation, task decomposition requests, or planning phase work.
4
+ version: 3.0.0
5
+ tier: 1
6
+ core: false
7
+ category: recommended
8
+ protocol: decomposition
9
+ dependencies: []
10
+ sharedResources:
11
+ - subagent-protocol-base
12
+ - task-system-integration
13
+ compatibility:
14
+ - claude-code
15
+ - cursor
16
+ - windsurf
17
+ - gemini-cli
18
+ license: MIT
19
+ ---
20
+
21
+ # Epic Architect Context Injection
22
+
23
+ **Protocol**: @src/protocols/decomposition.md
24
+ **Type**: Context Injection (cleo-subagent)
25
+ **Version**: 3.0.0
26
+
27
+ ---
28
+
29
+ ## Purpose
30
+
31
+ Context injection for epic planning and task decomposition tasks spawned via cleo-subagent. Provides domain expertise for breaking down large initiatives into atomic, executable tasks.
32
+
33
+ ---
34
+
35
+ ## Capabilities
36
+
37
+ 1. **Epic Creation** - Parent epic with full metadata and file attachments
38
+ 2. **Task Decomposition** - Atomic tasks with acceptance criteria
39
+ 3. **Dependency Analysis** - Wave-based parallel execution planning
40
+ 4. **Research Linking** - Connect research outputs to tasks
41
+ 5. **HITL Clarification** - Ask when requirements are ambiguous
42
+
43
+ ---
44
+
45
+ ## Task System Integration
46
+
47
+ @skills/_shared/task-system-integration.md
48
+
49
+ ### Execution Sequence
50
+
51
+ 1. Read task: `cleo show {{TASK_ID}}`
52
+ 2. Start task: `cleo start {{TASK_ID}}`
53
+ 3. Check existing work: `cleo find "keyword"`, `cleo list --type epic`
54
+ 4. Create epic and child tasks
55
+ 5. Attach files and link research
56
+ 6. Start session: `cleo session start --scope epic:{{EPIC_ID}} --auto-start`
57
+ 7. Complete task: `cleo complete {{TASK_ID}}`
58
+
59
+ ---
60
+
61
+ ## Requirements Analysis
62
+
63
+ **MUST check for related work BEFORE creating:**
64
+
65
+ ```bash
66
+ cleo find "auth" --status pending # Related tasks
67
+ cleo list --type epic --status pending # Existing epics
68
+ cleo phase show # Current phase
69
+ cleo list --tree --parent T001 # Hierarchy view
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Epic Structure
75
+
76
+ ```
77
+ Epic (type: epic, size: large)
78
+ ├── Task 1 (no deps) [Wave 0]
79
+ ├── Task 2 (depends: T1) [Wave 1]
80
+ ├── Task 3 (depends: T1) [Wave 1] ← Parallel
81
+ ├── Task 4 (depends: T2,T3) [Wave 2] ← Convergence
82
+ └── Task 5 (depends: T4) [Wave 3]
83
+ ```
84
+
85
+ ### Size Guidelines (NOT Time)
86
+
87
+ | Type | Size | Scope |
88
+ |------|------|-------|
89
+ | Epic | large | 8+ files, multiple features |
90
+ | Task | medium | 3-7 files, single feature |
91
+ | Subtask | small | 1-2 files, single function |
92
+
93
+ ---
94
+
95
+ ## Epic Creation
96
+
97
+ ### Create Epic with File Attachments
98
+
99
+ ```bash
100
+ cleo add "Auth System Implementation" \
101
+ --type epic --size large --priority high --phase core \
102
+ --labels "feature,auth,v1.0" \
103
+ --description "Complete authentication with JWT and session management" \
104
+ --acceptance "All child tasks completed" \
105
+ --acceptance "Integration tests pass" \
106
+ --files "docs/auth-spec.md,docs/api-design.md" \
107
+ --notes "Initial planning: JWT chosen for stateless API support"
108
+ ```
109
+
110
+ ### Create Tasks with Dependencies
111
+
112
+ ```bash
113
+ # Wave 0: No dependencies
114
+ cleo add "Create auth schema" \
115
+ --type task --size medium --priority high \
116
+ --parent T001 --phase setup \
117
+ --description "Define user, session, and token tables" \
118
+ --acceptance "Schema validates against requirements" \
119
+ --files "src/db/schema.ts"
120
+
121
+ # Wave 1: Depends on Wave 0
122
+ cleo add "Implement JWT middleware" \
123
+ --type task --size medium --priority high \
124
+ --parent T001 --phase core --depends T002 \
125
+ --description "Token generation, validation, refresh" \
126
+ --acceptance "All token operations tested"
127
+
128
+ # Wave 2: Convergence
129
+ cleo add "Integration tests" \
130
+ --type task --size medium --priority high \
131
+ --parent T001 --phase testing --depends T003,T004 \
132
+ --acceptance "E2E auth flow tests pass"
133
+ ```
134
+
135
+ ### Link Research to Tasks
136
+
137
+ ```bash
138
+ # Link existing research output to task
139
+ cleo research link T001 research-auth-patterns-20260126
140
+
141
+ # View linked research
142
+ cleo show T001 # Shows .linkedResearch array
143
+ ```
144
+
145
+ ---
146
+
147
+ ## File Attachment Patterns
148
+
149
+ ### When to Use --files vs Research Link
150
+
151
+ | Method | Use Case | Storage |
152
+ |--------|----------|---------|
153
+ | `--files` | Input context (specs, designs, code) | Task `.files` array |
154
+ | `research link` | Output artifacts (research findings) | Task `.linkedResearch` array |
155
+
156
+ ### Attach Files During Creation
157
+
158
+ ```bash
159
+ cleo add "Implement auth" --files "spec.md,design.md"
160
+ ```
161
+
162
+ ### Append Files to Existing Task
163
+
164
+ ```bash
165
+ cleo update T001 --files "additional-context.md"
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Hierarchy Constraints
171
+
172
+ | Constraint | Value | Enforcement |
173
+ |------------|-------|-------------|
174
+ | Max depth | 3 | epic (0) → task (1) → subtask (2) |
175
+ | Max active siblings | 8 (default) | `hierarchy.maxActiveSiblings` |
176
+ | Max siblings | unlimited (default) | `hierarchy.maxSiblings=0` |
177
+ | Parent must exist | Validated | `cleo exists {{PARENT_ID}}` |
178
+
179
+ **Validation Before Creation:**
180
+
181
+ ```bash
182
+ cleo exists T001 --quiet || echo "ERROR: Parent not found"
183
+ cleo list --parent T001 --status pending,active | jq '.tasks | length'
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Wave Planning
189
+
190
+ | Wave | Description | Execution |
191
+ |------|-------------|-----------|
192
+ | Wave 0 | No dependencies | Start immediately |
193
+ | Wave 1 | Depends on Wave 0 | Parallel within wave |
194
+ | Wave N | Depends on prior waves | Convergence points |
195
+
196
+ ### Dependency Rules
197
+
198
+ 1. No circular dependencies (A→B→C→A invalid)
199
+ 2. Wave siblings are independent (no cross-dependencies)
200
+ 3. Convergence depends on ALL branches
201
+
202
+ ---
203
+
204
+ ## Phase Assignment
205
+
206
+ | Phase | Purpose |
207
+ |-------|---------|
208
+ | `setup` | Schema, config, structure |
209
+ | `core` | Features, components |
210
+ | `testing` | Tests, validation |
211
+ | `polish` | Docs, optimization |
212
+ | `maintenance` | Fixes, updates |
213
+
214
+ ```bash
215
+ cleo phase show # Current phase
216
+ cleo list --phase $(cleo phase show -q) # Tasks in phase
217
+ ```
218
+
219
+ ---
220
+
221
+ ## HITL Clarification
222
+
223
+ **Ask when:**
224
+ - Requirements ambiguous
225
+ - Multiple valid approaches
226
+ - Missing context
227
+ - Scope unclear
228
+
229
+ **Template:**
230
+ ```
231
+ Before proceeding, I need clarification:
232
+ 1. [Question about scope]
233
+ 2. [Question about constraints]
234
+
235
+ Options:
236
+ A. [Option with trade-offs]
237
+ B. [Option with trade-offs]
238
+
239
+ Recommendation: [Your recommendation]
240
+ ```
241
+
242
+ ---
243
+
244
+ ## Subagent Protocol
245
+
246
+ @skills/_shared/subagent-protocol-base.md
247
+
248
+ ### Output Requirements
249
+
250
+ 1. MUST write decomposition to: `{{OUTPUT_DIR}}/{{DATE}}_{{TOPIC_SLUG}}.md`
251
+ 2. MUST append ONE line to: `{{MANIFEST_PATH}}`
252
+ 3. MUST return ONLY: "Decomposition complete. See MANIFEST.jsonl for summary."
253
+ 4. MUST NOT return full decomposition in response
254
+
255
+ ---
256
+
257
+ ## Extended References
258
+
259
+ | Reference | Content |
260
+ |-----------|---------|
261
+ | [patterns.md](references/patterns.md) | Research, Bug, Brownfield, Refactor patterns |
262
+ | [commands.md](references/commands.md) | Complete CLEO command reference |
263
+ | [shell-escaping.md](references/shell-escaping.md) | Escape `$` as `\$` in notes |
264
+ | [feature-epic-example.md](references/feature-epic-example.md) | Greenfield feature |
265
+ | [refactor-epic-example.md](references/refactor-epic-example.md) | Brownfield modernization |
266
+
267
+ ---
268
+
269
+ ## Anti-Patterns
270
+
271
+ | Anti-Pattern | Solution |
272
+ |--------------|----------|
273
+ | Too large tasks | Atomic (one agent session) |
274
+ | Missing Wave 0 | At least one no-dependency task |
275
+ | Circular deps | Analyze data flow |
276
+ | Depth > 3 | Flatten hierarchy |
277
+ | Missing acceptance | Add `--acceptance` |
278
+ | Time estimates | Use size only |
279
+
280
+ ---
281
+
282
+ ## Completion Checklist
283
+
284
+ - [ ] Checked existing work (`cleo find`, `cleo list --type epic`)
285
+ - [ ] Phase verified (`cleo phase show`)
286
+ - [ ] Epic created with priority, phase, acceptance
287
+ - [ ] Tasks with dependencies, no circular deps
288
+ - [ ] Wave 0 exists (at least one no-deps task)
289
+ - [ ] Hierarchy: depth ≤ 3, siblings ≤ 8 active
290
+ - [ ] Files attached where relevant
291
+ - [ ] Session started scoped to epic
292
+
293
+ ---
294
+
295
+ ## Error Handling
296
+
297
+ | Exit | Meaning | Fix |
298
+ |------|---------|-----|
299
+ | 4 | Not found | `cleo find` to verify |
300
+ | 10 | Parent missing | `cleo exists {{ID}}` |
301
+ | 11 | Depth exceeded | Flatten (epic→task→subtask max) |
302
+ | 12 | Sibling limit | Split to different parent |
303
+ | 6 | Validation | Escape `$` as `\$`, check fields |
304
+
305
+ **Shell Escaping**: Always `\$` in `--notes`/`--description`. See [shell-escaping.md](references/shell-escaping.md).