@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,172 @@
1
+ # Bug Epic Example: Data Corruption in User Sessions
2
+
3
+ This example demonstrates a bug fix epic with severity mapping and root cause analysis.
4
+
5
+ ---
6
+
7
+ ## Scenario
8
+
9
+ Users report intermittent data loss when switching between tabs. Investigation reveals:
10
+ - Session data corrupted when concurrent requests occur
11
+ - Race condition in session update logic
12
+ - Affects ~5% of users during peak hours
13
+
14
+ **Severity**: High (core feature broken, workaround difficult)
15
+
16
+ ---
17
+
18
+ ## Step 1: Create the Bug Epic
19
+
20
+ ```bash
21
+ {{TASK_ADD_CMD}} "Fix: Session Data Corruption on Concurrent Requests" \
22
+ --type epic \
23
+ --size medium \
24
+ --priority high \
25
+ --phase maintenance \
26
+ --labels "bug,severity:high,session,race-condition" \
27
+ --description "Fix race condition causing session data corruption when multiple requests occur simultaneously. Root cause: non-atomic session updates. Impact: ~5% of users during peak hours experiencing data loss." \
28
+ --acceptance "Race condition eliminated" \
29
+ --acceptance "Session updates atomic" \
30
+ --acceptance "Regression tests added" \
31
+ --acceptance "No data corruption in stress test" \
32
+ --notes "Bug report: SUPPORT-1234. First reported 2026-01-15."
33
+ ```
34
+
35
+ **Annotation**: Priority `high` maps from severity `high`. Labels include `severity:high` for filtering. Phase is `maintenance` for bug fixes.
36
+
37
+ ---
38
+
39
+ ## Step 2: Create Tasks
40
+
41
+ ### Wave 0: Investigation
42
+
43
+ ```bash
44
+ # T1: Root cause analysis (Wave 0)
45
+ {{TASK_ADD_CMD}} "Investigate session corruption root cause" \
46
+ --type task \
47
+ --size medium \
48
+ --priority high \
49
+ --parent {{EPIC_ID}} \
50
+ --phase maintenance \
51
+ --labels "investigation,root-cause" \
52
+ --description "Analyze session handling code, identify race condition triggers, document reproduction steps." \
53
+ --acceptance "Race condition identified in code" \
54
+ --acceptance "Reproduction steps documented" \
55
+ --acceptance "Affected code paths mapped" \
56
+ --files "src/lib/session/manager.ts,src/lib/session/store.ts"
57
+ ```
58
+
59
+ **Annotation**: Bug epics ALWAYS start with investigation. Never jump to fixing without understanding root cause.
60
+
61
+ ### Wave 1: Fix Implementation
62
+
63
+ ```bash
64
+ # T2: Implement atomic session updates (Wave 1 - depends on T1)
65
+ {{TASK_ADD_CMD}} "Implement atomic session update mechanism" \
66
+ --type task \
67
+ --size medium \
68
+ --priority high \
69
+ --parent {{EPIC_ID}} \
70
+ --phase maintenance \
71
+ --depends {{T1_ID}} \
72
+ --labels "fix,atomic,session" \
73
+ --description "Replace non-atomic session updates with transaction-based approach using optimistic locking or mutex." \
74
+ --acceptance "Session updates use transactions" \
75
+ --acceptance "Concurrent writes handled correctly" \
76
+ --acceptance "No deadlock scenarios" \
77
+ --files "src/lib/session/manager.ts,src/lib/session/lock.ts"
78
+
79
+ # T3: Add session versioning (Wave 1 - depends on T1, parallel with T2)
80
+ {{TASK_ADD_CMD}} "Add session version tracking" \
81
+ --type task \
82
+ --size small \
83
+ --priority medium \
84
+ --parent {{EPIC_ID}} \
85
+ --phase maintenance \
86
+ --depends {{T1_ID}} \
87
+ --labels "versioning,session,integrity" \
88
+ --description "Add version field to session schema to detect and reject stale updates." \
89
+ --acceptance "Version field added to session" \
90
+ --acceptance "Stale updates rejected with retry hint" \
91
+ --acceptance "Version increment on each update" \
92
+ --files "src/lib/session/schema.ts,src/lib/session/manager.ts"
93
+ ```
94
+
95
+ ### Wave 2: Regression Testing
96
+
97
+ ```bash
98
+ # T4: Add concurrency regression tests (Wave 2 - depends on T2, T3)
99
+ {{TASK_ADD_CMD}} "Write concurrency regression tests" \
100
+ --type task \
101
+ --size medium \
102
+ --priority high \
103
+ --parent {{EPIC_ID}} \
104
+ --phase testing \
105
+ --depends {{T2_ID}},{{T3_ID}} \
106
+ --labels "testing,regression,concurrency" \
107
+ --description "Write tests that reproduce the original bug and verify fix under concurrent load." \
108
+ --acceptance "Test reproduces original race condition" \
109
+ --acceptance "Test passes with fix applied" \
110
+ --acceptance "Stress test with 100 concurrent requests" \
111
+ --files "tests/session-concurrency.test.ts"
112
+
113
+ # T5: Update documentation (Wave 2 - depends on T2, parallel with T4)
114
+ {{TASK_ADD_CMD}} "Document session handling changes" \
115
+ --type task \
116
+ --size small \
117
+ --priority low \
118
+ --parent {{EPIC_ID}} \
119
+ --phase polish \
120
+ --depends {{T2_ID}} \
121
+ --labels "docs,session" \
122
+ --description "Update session handling documentation with new atomic update patterns and versioning." \
123
+ --acceptance "README updated" \
124
+ --acceptance "Code comments added" \
125
+ --files "docs/SESSION.md,src/lib/session/README.md"
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Step 3: Start Session
131
+
132
+ ```bash
133
+ {{TASK_SESSION_START_CMD}} \
134
+ --scope epic:{{EPIC_ID}} \
135
+ --name "Session Bug Fix" \
136
+ --agent ct-epic-architect \
137
+ --auto-start
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Dependency Graph
143
+
144
+ ```
145
+ T1 (Investigation)
146
+ ├──> T2 (Atomic Updates)
147
+ │ ├──> T4 (Regression Tests)
148
+ │ └──> T5 (Documentation)
149
+ └──> T3 (Versioning)
150
+ └──> T4 (Regression Tests)
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Wave Analysis
156
+
157
+ | Wave | Tasks | Purpose |
158
+ |------|-------|---------|
159
+ | 0 | T1 | Root cause analysis |
160
+ | 1 | T2, T3 | Fix implementation (parallel) |
161
+ | 2 | T4, T5 | Verification and docs (parallel) |
162
+
163
+ ---
164
+
165
+ ## Bug Severity Mapping Reference
166
+
167
+ | Severity | Priority | Indicators |
168
+ |----------|----------|------------|
169
+ | Critical | critical | Data loss, security breach, system down |
170
+ | High | high | Core feature broken, workaround difficult |
171
+ | Medium | medium | Feature degraded, workaround exists |
172
+ | Low | low | Cosmetic, edge case, annoyance |
@@ -0,0 +1,201 @@
1
+ # Epic Architect Commands Reference
2
+
3
+ Complete reference of task system commands for epic creation and management.
4
+
5
+ ---
6
+
7
+ ## Core Task Commands
8
+
9
+ ```bash
10
+ # Create epic
11
+ {{TASK_ADD_CMD}} "Epic Title" --type epic --size large --priority high --phase core \
12
+ --labels "feature,auth" --description "..." --acceptance "..."
13
+
14
+ # Create tasks under epic
15
+ {{TASK_ADD_CMD}} "Task Title" --type task --parent {{EPIC_ID}} --depends {{DEP_IDS}} \
16
+ --priority medium --phase core --description "..." --acceptance "..."
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Session Lifecycle
22
+
23
+ ```bash
24
+ # Start session scoped to epic
25
+ {{TASK_SESSION_START_CMD}} --scope epic:{{EPIC_ID}} --name "Epic Development" --agent ct-epic-architect --auto-start
26
+
27
+ # Suspend session (waiting for external dependency)
28
+ {{TASK_SESSION_SUSPEND_CMD}} --note "Waiting for external dependency"
29
+
30
+ # Resume session
31
+ {{TASK_SESSION_RESUME_CMD}} {{SESSION_ID}}
32
+
33
+ # End session (work complete for now)
34
+ {{TASK_SESSION_END_CMD}} --note "Epic completed"
35
+
36
+ # Close session permanently (all tasks must be done)
37
+ {{TASK_SESSION_CLOSE_CMD}} {{SESSION_ID}}
38
+
39
+ # List active sessions
40
+ {{TASK_SESSION_LIST_CMD}} --status active
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Task Lifecycle (Start/Stop/Current)
46
+
47
+ ```bash
48
+ # Start working on task
49
+ {{TASK_START_CMD}} {{TASK_ID}}
50
+
51
+ # Show current task
52
+ {{TASK_CURRENT_CMD}}
53
+
54
+ # Add session progress note
55
+ {{TASK_NOTE_CMD}} "Progress: ..."
56
+
57
+ # Stop working on task
58
+ {{TASK_STOP_CMD}}
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Verification Gates Workflow
64
+
65
+ After task completion, verification gates track quality:
66
+
67
+ ```bash
68
+ # When coder completes implementation
69
+ {{TASK_COMPLETE_CMD}} {{TASK_ID}} # Auto-sets gates.implemented
70
+
71
+ # After testing passes
72
+ {{TASK_VERIFY_CMD}} {{TASK_ID}} --gate testsPassed
73
+
74
+ # After QA review
75
+ {{TASK_VERIFY_CMD}} {{TASK_ID}} --gate qaPassed
76
+
77
+ # After security scan
78
+ {{TASK_VERIFY_CMD}} {{TASK_ID}} --gate securityPassed
79
+
80
+ # After documentation
81
+ {{TASK_VERIFY_CMD}} {{TASK_ID}} --gate documented
82
+
83
+ # After cleanup/tech debt addressed (optional, excluded from required by default)
84
+ {{TASK_VERIFY_CMD}} {{TASK_ID}} --gate cleanupDone
85
+
86
+ # Set all required gates at once
87
+ {{TASK_VERIFY_CMD}} {{TASK_ID}} --all
88
+ ```
89
+
90
+ **Verification Gates Reference:**
91
+ | Gate | Purpose | Auto-set |
92
+ |------|---------|----------|
93
+ | `implemented` | Code complete | Yes (on `complete`) |
94
+ | `testsPassed` | Tests pass | No |
95
+ | `qaPassed` | QA review done | No |
96
+ | `securityPassed` | Security scan clear | No |
97
+ | `documented` | Documentation complete | No |
98
+ | `cleanupDone` | Cleanup/tech debt addressed | No (optional) |
99
+
100
+ **Epic Lifecycle States** (available in schema 2.6.1+):
101
+ - States: `backlog` -> `planning` -> `active` -> `review` -> `released` -> `archived`
102
+ - Use `--epic-lifecycle` flag when creating/updating epics with `type: epic`
103
+ - Example: `{{TASK_ADD_CMD}} "Epic Title" --type epic --epic-lifecycle planning`
104
+
105
+ ---
106
+
107
+ ## Query Commands
108
+
109
+ ```bash
110
+ # Find related work
111
+ {{TASK_FIND_CMD}} "{{KEYWORDS}}" --status pending
112
+
113
+ # Link research to epic
114
+ {{TASK_LINK_CMD}} {{EPIC_ID}} {{RESEARCH_ID}}
115
+
116
+ # Verify existence before operations
117
+ {{TASK_EXISTS_CMD}} {{ID}} --quiet
118
+
119
+ # Check phase context
120
+ {{TASK_PHASE_CMD}}
121
+
122
+ # Task triage and planning
123
+ {{TASK_ANALYZE_CMD}} # Task triage with leverage scoring
124
+ {{TASK_ANALYZE_CMD}} --parent {{EPIC_ID}} # Analyze specific epic's tasks
125
+
126
+ # Visualize hierarchy
127
+ cleo list --tree --parent {{EPIC_ID}} # Show epic subtree
128
+
129
+ # Archive completed work
130
+ {{TASK_ARCHIVE_CMD}} # Archive all completed tasks (done status)
131
+ {{TASK_ARCHIVE_CMD}} --include-epic # Include completed epics
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Token Reference
137
+
138
+ ### Task Lifecycle Tokens (CLEO defaults)
139
+
140
+ | Token | CLEO Default |
141
+ |-------|--------------|
142
+ | `{{TASK_SHOW_CMD}}` | `cleo show` |
143
+ | `{{TASK_START_CMD}}` | `cleo start` |
144
+ | `{{TASK_COMPLETE_CMD}}` | `cleo complete` |
145
+ | `{{TASK_LINK_CMD}}` | `cleo research link` |
146
+ | `{{TASK_LIST_CMD}}` | `cleo list` |
147
+ | `{{TASK_FIND_CMD}}` | `cleo find` |
148
+ | `{{TASK_ADD_CMD}}` | `cleo add` |
149
+
150
+ ### Epic-Specific Tokens
151
+
152
+ | Token | CLEO Default |
153
+ |-------|--------------|
154
+ | `{{TASK_EXISTS_CMD}}` | `cleo exists` |
155
+ | `{{TASK_PHASE_CMD}}` | `cleo phase show` |
156
+ | `{{TASK_TREE_CMD}}` | `cleo list --tree` |
157
+ | `{{TASK_ANALYZE_CMD}}` | `cleo analyze` |
158
+ | `{{TASK_ARCHIVE_CMD}}` | `cleo archive` |
159
+ | `{{TASK_VALIDATE_CMD}}` | `cleo validate` |
160
+
161
+ ### Session Tokens
162
+
163
+ | Token | CLEO Default |
164
+ |-------|--------------|
165
+ | `{{TASK_SESSION_START_CMD}}` | `cleo session start` |
166
+ | `{{TASK_SESSION_END_CMD}}` | `cleo session end` |
167
+ | `{{TASK_SESSION_SUSPEND_CMD}}` | `cleo session suspend` |
168
+ | `{{TASK_SESSION_RESUME_CMD}}` | `cleo session resume` |
169
+ | `{{TASK_SESSION_CLOSE_CMD}}` | `cleo session close` |
170
+ | `{{TASK_SESSION_LIST_CMD}}` | `cleo session list` |
171
+
172
+ ### Start/Stop/Current Tokens
173
+
174
+ | Token | CLEO Default |
175
+ |-------|--------------|
176
+ | `{{TASK_CURRENT_CMD}}` | `cleo current` |
177
+ | `{{TASK_NOTE_CMD}}` | `cleo note` |
178
+ | `{{TASK_STOP_CMD}}` | `cleo stop` |
179
+
180
+ ### Verification Tokens
181
+
182
+ | Token | CLEO Default |
183
+ |-------|--------------|
184
+ | `{{TASK_VERIFY_CMD}}` | `cleo verify` |
185
+
186
+ ### Research Tokens
187
+
188
+ | Token | CLEO Default |
189
+ |-------|--------------|
190
+ | `{{TASK_RESEARCH_INIT_CMD}}` | `cleo research init` |
191
+ | `{{TASK_RESEARCH_LIST_CMD}}` | `cleo research list` |
192
+ | `{{TASK_RESEARCH_SHOW_CMD}}` | `cleo research show` |
193
+ | `{{TASK_RESEARCH_PENDING_CMD}}` | `cleo research pending` |
194
+ | `{{TASK_RESEARCH_INJECT_CMD}}` | `cleo research inject` |
195
+
196
+ ### Output Tokens
197
+
198
+ | Token | Default |
199
+ |-------|---------|
200
+ | `{{OUTPUT_DIR}}` | `claudedocs/agent-outputs` |
201
+ | `{{MANIFEST_PATH}}` | `{{OUTPUT_DIR}}/MANIFEST.jsonl` |
@@ -0,0 +1,210 @@
1
+ # Feature Epic Example: User Authentication System
2
+
3
+ This example demonstrates a greenfield feature epic for implementing a new authentication system.
4
+
5
+ ---
6
+
7
+ ## Scenario
8
+
9
+ A SvelteKit application needs user authentication with:
10
+ - Email/password login
11
+ - JWT token management
12
+ - Protected routes middleware
13
+ - User session handling
14
+
15
+ ---
16
+
17
+ ## Step 1: Create the Epic
18
+
19
+ ```bash
20
+ {{TASK_ADD_CMD}} "EPIC: User Authentication System" \
21
+ --type epic \
22
+ --size large \
23
+ --priority high \
24
+ --phase core \
25
+ --labels "feature,auth,security,v1.0" \
26
+ --description "Implement complete user authentication with email/password login, JWT tokens, protected routes, and session management. Greenfield implementation following security best practices." \
27
+ --acceptance "All auth endpoints functional" \
28
+ --acceptance "JWT tokens generated and validated" \
29
+ --acceptance "Protected routes middleware working" \
30
+ --acceptance "Integration tests passing" \
31
+ --notes "Initial planning: Authentication system for SvelteKit app"
32
+ ```
33
+
34
+ **Annotation**: Epic is `large` because it spans multiple systems (API, middleware, frontend). Phase is `core` because this is primary feature work.
35
+
36
+ ---
37
+
38
+ ## Step 2: Create Tasks with Dependencies
39
+
40
+ ### Wave 0: Foundation (No Dependencies)
41
+
42
+ ```bash
43
+ # T1: Schema and types (Wave 0 - no deps)
44
+ {{TASK_ADD_CMD}} "Define auth schema and types" \
45
+ --type task \
46
+ --size medium \
47
+ --priority high \
48
+ --parent {{EPIC_ID}} \
49
+ --phase setup \
50
+ --labels "schema,types,foundation" \
51
+ --description "Create database schema for users, sessions, and tokens. Define TypeScript types for auth payloads." \
52
+ --acceptance "User table schema defined" \
53
+ --acceptance "Session/token types exported" \
54
+ --acceptance "Zod validation schemas created" \
55
+ --files "src/lib/db/schema/users.ts,src/lib/types/auth.ts"
56
+ ```
57
+
58
+ **Annotation**: First task has NO dependencies, enabling immediate start. Wave 0 tasks are "entry points" into the epic.
59
+
60
+ ### Wave 1: Core Implementation (Depends on T1)
61
+
62
+ ```bash
63
+ # T2: JWT utilities (Wave 1 - depends on T1)
64
+ {{TASK_ADD_CMD}} "Implement JWT token utilities" \
65
+ --type task \
66
+ --size medium \
67
+ --priority high \
68
+ --parent {{EPIC_ID}} \
69
+ --phase core \
70
+ --depends {{T1_ID}} \
71
+ --labels "jwt,tokens,security" \
72
+ --description "Create JWT generation, validation, and refresh functions using jose library." \
73
+ --acceptance "Token generation function works" \
74
+ --acceptance "Token validation with expiry check" \
75
+ --acceptance "Refresh token rotation implemented" \
76
+ --files "src/lib/auth/jwt.ts,src/lib/auth/tokens.ts"
77
+
78
+ # T3: Password hashing (Wave 1 - depends on T1, parallel with T2)
79
+ {{TASK_ADD_CMD}} "Implement password hashing" \
80
+ --type task \
81
+ --size small \
82
+ --priority high \
83
+ --parent {{EPIC_ID}} \
84
+ --phase core \
85
+ --depends {{T1_ID}} \
86
+ --labels "password,security,bcrypt" \
87
+ --description "Implement secure password hashing using bcrypt with configurable salt rounds." \
88
+ --acceptance "Hash function produces valid bcrypt hash" \
89
+ --acceptance "Verify function compares correctly" \
90
+ --acceptance "Timing-safe comparison used" \
91
+ --files "src/lib/auth/password.ts"
92
+ ```
93
+
94
+ **Annotation**: T2 and T3 both depend only on T1, so they can run in PARALLEL. This is a "parallel fork" pattern.
95
+
96
+ ### Wave 2: API Layer (Depends on T2 and T3)
97
+
98
+ ```bash
99
+ # T4: Auth API endpoints (Wave 2 - depends on T2, T3)
100
+ {{TASK_ADD_CMD}} "Create auth API endpoints" \
101
+ --type task \
102
+ --size medium \
103
+ --priority high \
104
+ --parent {{EPIC_ID}} \
105
+ --phase core \
106
+ --depends {{T2_ID}},{{T3_ID}} \
107
+ --labels "api,endpoints,auth" \
108
+ --description "Implement /api/auth/register, /api/auth/login, /api/auth/logout, /api/auth/refresh endpoints." \
109
+ --acceptance "Register endpoint creates user" \
110
+ --acceptance "Login endpoint returns JWT" \
111
+ --acceptance "Logout invalidates session" \
112
+ --acceptance "Refresh endpoint rotates token" \
113
+ --files "src/routes/api/auth/+server.ts,src/routes/api/auth/[action]/+server.ts"
114
+ ```
115
+
116
+ **Annotation**: T4 is a "convergence point" - it depends on BOTH parallel branches (T2 AND T3). Must wait for both to complete.
117
+
118
+ ### Wave 3: Middleware (Depends on T4)
119
+
120
+ ```bash
121
+ # T5: Protected routes middleware (Wave 3 - depends on T4)
122
+ {{TASK_ADD_CMD}} "Implement protected routes middleware" \
123
+ --type task \
124
+ --size medium \
125
+ --priority medium \
126
+ --parent {{EPIC_ID}} \
127
+ --phase core \
128
+ --depends {{T4_ID}} \
129
+ --labels "middleware,routes,protection" \
130
+ --description "Create hooks.server.ts middleware to validate JWT on protected routes and inject user into locals." \
131
+ --acceptance "Middleware validates JWT" \
132
+ --acceptance "Unauthenticated requests redirected" \
133
+ --acceptance "User available in locals" \
134
+ --files "src/hooks.server.ts,src/lib/auth/middleware.ts"
135
+ ```
136
+
137
+ ### Wave 4: Testing (Depends on T5)
138
+
139
+ ```bash
140
+ # T6: Integration tests (Wave 4 - depends on T5)
141
+ {{TASK_ADD_CMD}} "Write auth integration tests" \
142
+ --type task \
143
+ --size medium \
144
+ --priority medium \
145
+ --parent {{EPIC_ID}} \
146
+ --phase testing \
147
+ --depends {{T5_ID}} \
148
+ --labels "testing,integration,auth" \
149
+ --description "Write integration tests for complete auth flow: register, login, protected access, logout." \
150
+ --acceptance "Registration flow test passes" \
151
+ --acceptance "Login/logout flow test passes" \
152
+ --acceptance "Protected route test passes" \
153
+ --acceptance "Token refresh test passes" \
154
+ --files "tests/auth.test.ts"
155
+ ```
156
+
157
+ ---
158
+
159
+ ## Step 3: Start Session
160
+
161
+ ```bash
162
+ {{TASK_SESSION_START_CMD}} \
163
+ --scope epic:{{EPIC_ID}} \
164
+ --name "Auth System - Development" \
165
+ --agent ct-epic-architect \
166
+ --auto-start
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Dependency Graph
172
+
173
+ ```
174
+ T1 (Schema)
175
+ ├──> T2 (JWT)
176
+ │ └──> T4 (API)
177
+ └──> T3 (Password)
178
+ └──> T4 (API)
179
+ └──> T5 (Middleware)
180
+ └──> T6 (Tests)
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Wave Analysis
186
+
187
+ | Wave | Tasks | Parallel? | Notes |
188
+ |------|-------|-----------|-------|
189
+ | 0 | T1 | - | Entry point |
190
+ | 1 | T2, T3 | Yes | Both depend only on T1 |
191
+ | 2 | T4 | No | Convergence point |
192
+ | 3 | T5 | No | Sequential |
193
+ | 4 | T6 | No | Final validation |
194
+
195
+ ---
196
+
197
+ ## Critical Path
198
+
199
+ T1 → T2 → T4 → T5 → T6
200
+
201
+ (T3 runs parallel to T2, both converge at T4)
202
+
203
+ ---
204
+
205
+ ## Key Design Decisions
206
+
207
+ 1. **Schema First**: T1 defines types before implementation - prevents refactoring
208
+ 2. **Parallel Security**: JWT (T2) and password (T3) are independent modules
209
+ 3. **API Convergence**: Endpoints (T4) need BOTH modules complete
210
+ 4. **Test Last**: Integration tests (T6) run after all implementation done