claude-code-workflow 6.3.48 → 6.3.49

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 (211) hide show
  1. package/.claude/CLAUDE.md +6 -8
  2. package/.claude/agents/action-planning-agent.md +28 -45
  3. package/.claude/agents/cli-lite-planning-agent.md +93 -1
  4. package/.claude/agents/code-developer.md +144 -27
  5. package/.claude/commands/ccw-coordinator.md +175 -21
  6. package/.claude/commands/ccw-debug.md +832 -0
  7. package/.claude/commands/ccw.md +90 -9
  8. package/.claude/commands/cli/cli-init.md +1 -0
  9. package/.claude/commands/issue/convert-to-plan.md +718 -0
  10. package/.claude/commands/issue/from-brainstorm.md +382 -0
  11. package/.claude/commands/memory/tips.md +332 -0
  12. package/.claude/commands/workflow/analyze-with-file.md +804 -0
  13. package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
  14. package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
  15. package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
  16. package/.claude/commands/workflow/debug-with-file.md +7 -5
  17. package/.claude/commands/workflow/execute.md +6 -4
  18. package/.claude/commands/workflow/lite-plan.md +2 -2
  19. package/.claude/commands/workflow/plan-verify.md +162 -327
  20. package/.claude/commands/workflow/plan.md +162 -26
  21. package/.claude/commands/workflow/replan.md +78 -2
  22. package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
  23. package/.claude/commands/workflow/review-module-cycle.md +2 -2
  24. package/.claude/commands/workflow/review-session-cycle.md +2 -2
  25. package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
  26. package/.claude/commands/workflow/tools/context-gather.md +81 -118
  27. package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
  28. package/.claude/skills/ccw-help/command.json +4 -4
  29. package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
  30. package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
  31. package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
  32. package/.claude/skills/skill-generator/SKILL.md +277 -85
  33. package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
  34. package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
  35. package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
  36. package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
  37. package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
  38. package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
  39. package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
  40. package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
  41. package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
  42. package/.claude/skills/skill-generator/templates/script-template.md +368 -0
  43. package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
  44. package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
  45. package/.claude/skills/skill-tuning/SKILL.md +130 -266
  46. package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
  47. package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
  48. package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
  49. package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
  50. package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
  51. package/.claude/workflows/cli-tools-usage.md +1 -1
  52. package/.codex/AGENTS.md +1 -3
  53. package/.codex/prompts/analyze-with-file.md +607 -0
  54. package/.codex/prompts/brainstorm-to-cycle.md +455 -0
  55. package/.codex/prompts/brainstorm-with-file.md +933 -0
  56. package/.codex/prompts/debug-with-file.md +15 -20
  57. package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
  58. package/ccw/dist/commands/cli.d.ts.map +1 -1
  59. package/ccw/dist/commands/cli.js +29 -5
  60. package/ccw/dist/commands/cli.js.map +1 -1
  61. package/ccw/dist/commands/issue.d.ts +2 -0
  62. package/ccw/dist/commands/issue.d.ts.map +1 -1
  63. package/ccw/dist/commands/issue.js +62 -20
  64. package/ccw/dist/commands/issue.js.map +1 -1
  65. package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
  66. package/ccw/dist/config/litellm-api-config-manager.js +5 -3
  67. package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
  68. package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
  69. package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
  70. package/ccw/dist/config/litellm-provider-models.js +172 -0
  71. package/ccw/dist/config/litellm-provider-models.js.map +1 -0
  72. package/ccw/dist/config/provider-models.d.ts +25 -51
  73. package/ccw/dist/config/provider-models.d.ts.map +1 -1
  74. package/ccw/dist/config/provider-models.js +84 -149
  75. package/ccw/dist/config/provider-models.js.map +1 -1
  76. package/ccw/dist/config/storage-paths.d.ts.map +1 -1
  77. package/ccw/dist/config/storage-paths.js +23 -5
  78. package/ccw/dist/config/storage-paths.js.map +1 -1
  79. package/ccw/dist/core/auth/csrf-middleware.js +3 -3
  80. package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
  81. package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
  82. package/ccw/dist/core/dashboard-generator.js +3 -1
  83. package/ccw/dist/core/dashboard-generator.js.map +1 -1
  84. package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
  85. package/ccw/dist/core/routes/claude-routes.js +206 -14
  86. package/ccw/dist/core/routes/claude-routes.js.map +1 -1
  87. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  88. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  89. package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
  90. package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
  91. package/ccw/dist/core/routes/commands-routes.js +480 -0
  92. package/ccw/dist/core/routes/commands-routes.js.map +1 -0
  93. package/ccw/dist/core/routes/model-routes.d.ts +11 -0
  94. package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
  95. package/ccw/dist/core/routes/model-routes.js +112 -0
  96. package/ccw/dist/core/routes/model-routes.js.map +1 -0
  97. package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
  98. package/ccw/dist/core/routes/nav-status-routes.js +84 -1
  99. package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
  100. package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
  101. package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
  102. package/ccw/dist/core/routes/provider-routes.js +67 -0
  103. package/ccw/dist/core/routes/provider-routes.js.map +1 -0
  104. package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
  105. package/ccw/dist/core/routes/skills-routes.js +219 -7
  106. package/ccw/dist/core/routes/skills-routes.js.map +1 -1
  107. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
  108. package/ccw/dist/core/routes/system-routes.js +58 -6
  109. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  110. package/ccw/dist/core/server.d.ts.map +1 -1
  111. package/ccw/dist/core/server.js +13 -0
  112. package/ccw/dist/core/server.js.map +1 -1
  113. package/ccw/dist/mcp-server/index.js +2 -2
  114. package/ccw/dist/mcp-server/index.js.map +1 -1
  115. package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
  116. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  117. package/ccw/dist/tools/claude-cli-tools.js +146 -50
  118. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  119. package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
  120. package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
  121. package/ccw/dist/tools/cli-config-manager.js +3 -27
  122. package/ccw/dist/tools/cli-config-manager.js.map +1 -1
  123. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  124. package/ccw/dist/tools/cli-executor-core.js +7 -2
  125. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  126. package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
  127. package/ccw/dist/tools/cli-history-store.d.ts +11 -0
  128. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
  129. package/ccw/dist/tools/cli-history-store.js +82 -2
  130. package/ccw/dist/tools/cli-history-store.js.map +1 -1
  131. package/ccw/dist/tools/command-registry.d.ts +7 -0
  132. package/ccw/dist/tools/command-registry.d.ts.map +1 -1
  133. package/ccw/dist/tools/command-registry.js +14 -1
  134. package/ccw/dist/tools/command-registry.js.map +1 -1
  135. package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
  136. package/ccw/dist/tools/generate-module-docs.js +11 -7
  137. package/ccw/dist/tools/generate-module-docs.js.map +1 -1
  138. package/ccw/dist/tools/litellm-executor.d.ts +1 -0
  139. package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
  140. package/ccw/dist/tools/litellm-executor.js +11 -9
  141. package/ccw/dist/tools/litellm-executor.js.map +1 -1
  142. package/ccw/dist/types/skill-types.d.ts +97 -0
  143. package/ccw/dist/types/skill-types.d.ts.map +1 -0
  144. package/ccw/dist/types/skill-types.js +6 -0
  145. package/ccw/dist/types/skill-types.js.map +1 -0
  146. package/ccw/src/commands/cli.ts +36 -5
  147. package/ccw/src/commands/issue.ts +81 -26
  148. package/ccw/src/config/litellm-api-config-manager.ts +5 -3
  149. package/ccw/src/config/litellm-provider-models.ts +222 -0
  150. package/ccw/src/config/provider-models.ts +91 -190
  151. package/ccw/src/config/storage-paths.ts +20 -5
  152. package/ccw/src/core/auth/csrf-middleware.ts +3 -3
  153. package/ccw/src/core/dashboard-generator.ts +3 -1
  154. package/ccw/src/core/routes/claude-routes.ts +233 -15
  155. package/ccw/src/core/routes/cli-routes.ts +2 -3
  156. package/ccw/src/core/routes/commands-routes.ts +620 -0
  157. package/ccw/src/core/routes/nav-status-routes.ts +95 -1
  158. package/ccw/src/core/routes/provider-routes.ts +78 -0
  159. package/ccw/src/core/routes/skills-routes.ts +266 -45
  160. package/ccw/src/core/routes/system-routes.ts +102 -50
  161. package/ccw/src/core/server.ts +13 -0
  162. package/ccw/src/mcp-server/index.ts +2 -2
  163. package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
  164. package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
  165. package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
  166. package/ccw/src/templates/dashboard-js/i18n.js +116 -0
  167. package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
  168. package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
  169. package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
  170. package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
  171. package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
  172. package/ccw/src/templates/dashboard.html +7 -0
  173. package/ccw/src/tools/claude-cli-tools.ts +170 -56
  174. package/ccw/src/tools/cli-config-manager.ts +2 -33
  175. package/ccw/src/tools/cli-executor-core.ts +8 -2
  176. package/ccw/src/tools/cli-history-store.ts +92 -2
  177. package/ccw/src/tools/command-registry.ts +16 -1
  178. package/ccw/src/tools/generate-module-docs.ts +11 -7
  179. package/ccw/src/tools/litellm-executor.ts +13 -9
  180. package/ccw/src/types/skill-types.ts +99 -0
  181. package/package.json +1 -1
  182. package/.claude/commands/enhance-prompt.md +0 -93
  183. package/.claude/commands/memory/code-map-memory.md +0 -687
  184. package/.claude/commands/memory/docs.md +0 -615
  185. package/.claude/commands/memory/load-skill-memory.md +0 -182
  186. package/.claude/commands/memory/skill-memory.md +0 -525
  187. package/.claude/commands/memory/swagger-docs.md +0 -773
  188. package/.claude/commands/memory/tech-research-rules.md +0 -310
  189. package/.claude/commands/memory/workflow-skill-memory.md +0 -517
  190. package/.claude/commands/task/breakdown.md +0 -208
  191. package/.claude/commands/task/create.md +0 -152
  192. package/.claude/commands/task/execute.md +0 -270
  193. package/.claude/commands/task/replan.md +0 -441
  194. package/.claude/commands/version.md +0 -254
  195. package/.claude/commands/workflow/action-plan-verify.md +0 -485
  196. package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
  197. package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
  198. package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
  199. package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
  200. package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
  201. package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
  202. package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
  203. package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
  204. package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
  205. package/.claude/commands/workflow/debug.md +0 -331
  206. package/.claude/commands/workflow/develop-with-file.md +0 -1044
  207. package/.claude/skills/ccw-loop/README.md +0 -303
  208. package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
  209. package/.claude/skills/skill-generator/templates/script-python.md +0 -198
  210. package/.codex/prompts/debug.md +0 -318
  211. package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
@@ -1,517 +0,0 @@
1
- ---
2
- name: workflow-skill-memory
3
- description: Process WFS-* archived sessions using universal-executor agents with Gemini analysis to generate workflow-progress SKILL package (sessions-timeline, lessons, conflicts)
4
- argument-hint: "session <session-id> | all"
5
- allowed-tools: Task(*), TodoWrite(*), Bash(*), Read(*), Write(*)
6
- ---
7
-
8
- # Workflow SKILL Memory Generator
9
-
10
- ## Overview
11
-
12
- Generate SKILL package from archived workflow sessions using agent-driven analysis. Supports single-session incremental updates or parallel processing of all sessions.
13
-
14
- **Scope**: Only processes WFS-* workflow sessions. Other session types (e.g., doc sessions) are automatically ignored.
15
-
16
- ## Usage
17
-
18
- ```bash
19
- /memory:workflow-skill-memory session WFS-<session-id> # Process single WFS session
20
- /memory:workflow-skill-memory all # Process all WFS sessions in parallel
21
- ```
22
-
23
- ## Execution Modes
24
-
25
- ### Mode 1: Single Session (`session <session-id>`)
26
-
27
- **Purpose**: Incremental update - process one archived session and merge into existing SKILL package
28
-
29
- **Workflow**:
30
- 1. **Validate session**: Check if session exists in `.workflow/.archives/{session-id}/`
31
- 2. **Invoke agent**: Call `universal-executor` to analyze session and update SKILL documents
32
- 3. **Agent tasks**:
33
- - Read session data from `.workflow/.archives/{session-id}/`
34
- - Extract lessons, conflicts, and outcomes
35
- - Use Gemini for intelligent aggregation (optional)
36
- - Update or create SKILL documents using templates
37
- - Regenerate SKILL.md index
38
-
39
- **Command Example**:
40
- ```bash
41
- /memory:workflow-skill-memory session WFS-user-auth
42
- ```
43
-
44
- **Expected Output**:
45
- ```
46
- Session WFS-user-auth processed
47
- Updated:
48
- - sessions-timeline.md (1 session added)
49
- - lessons-learned.md (3 lessons merged)
50
- - conflict-patterns.md (1 conflict added)
51
- - SKILL.md (index regenerated)
52
- ```
53
-
54
- ---
55
-
56
- ### Mode 2: All Sessions (`all`)
57
-
58
- **Purpose**: Full regeneration - process all archived sessions in parallel for complete SKILL package
59
-
60
- **Workflow**:
61
- 1. **List sessions**: Read manifest.json to get all archived session IDs
62
- 2. **Parallel invocation**: Launch multiple `universal-executor` agents in parallel (one per session)
63
- 3. **Agent coordination**:
64
- - Each agent processes one session independently
65
- - Agents use Gemini for analysis
66
- - Agents collect data into JSON (no direct file writes)
67
- - Final aggregator agent merges results and generates SKILL documents
68
-
69
- **Command Example**:
70
- ```bash
71
- /memory:workflow-skill-memory all
72
- ```
73
-
74
- **Expected Output**:
75
- ```
76
- All sessions processed in parallel
77
- Sessions: 8 total
78
- Updated:
79
- - sessions-timeline.md (8 sessions)
80
- - lessons-learned.md (24 lessons aggregated)
81
- - conflict-patterns.md (12 conflicts documented)
82
- - SKILL.md (index regenerated)
83
- ```
84
-
85
- ---
86
-
87
- ## Implementation Flow
88
-
89
- ### Phase 1: Validation and Setup
90
-
91
- **Step 1.1: Parse Command Arguments**
92
-
93
- Extract mode and session ID:
94
- ```javascript
95
- if (args === "all") {
96
- mode = "all"
97
- } else if (args.startsWith("session ")) {
98
- mode = "session"
99
- session_id = args.replace("session ", "").trim()
100
- } else {
101
- ERROR = "Invalid arguments. Usage: session <session-id> | all"
102
- EXIT
103
- }
104
- ```
105
-
106
- **Step 1.2: Validate Archive Directory**
107
- ```bash
108
- bash(test -d .workflow/.archives && echo "exists" || echo "missing")
109
- ```
110
-
111
- If missing, report error and exit.
112
-
113
- **Step 1.3: Mode-Specific Validation**
114
-
115
- **Single Session Mode**:
116
- ```bash
117
- # Validate session ID format (must start with WFS-)
118
- if [[ ! "$session_id" =~ ^WFS- ]]; then
119
- ERROR = "Invalid session ID format. Only WFS-* sessions are supported"
120
- EXIT
121
- fi
122
-
123
- # Check if session exists
124
- bash(test -d .workflow/.archives/{session_id} && echo "exists" || echo "missing")
125
- ```
126
-
127
- If missing, report error: "Session {session_id} not found in archives"
128
-
129
- **All Sessions Mode**:
130
- ```bash
131
- # Read manifest and filter only WFS- sessions
132
- bash(cat .workflow/.archives/manifest.json | jq -r '.archives[].session_id | select(startswith("WFS-"))')
133
- ```
134
-
135
- Store filtered session IDs in array. Ignore doc sessions and other non-WFS sessions.
136
-
137
- **Step 1.4: TodoWrite Initialization**
138
-
139
- **Single Session Mode**:
140
- ```javascript
141
- TodoWrite({todos: [
142
- {"content": "Validate session existence", "status": "completed", "activeForm": "Validating session"},
143
- {"content": "Invoke agent to process session", "status": "in_progress", "activeForm": "Invoking agent"},
144
- {"content": "Verify SKILL package updated", "status": "pending", "activeForm": "Verifying update"}
145
- ]})
146
- ```
147
-
148
- **All Sessions Mode**:
149
- ```javascript
150
- TodoWrite({todos: [
151
- {"content": "Read manifest and list sessions", "status": "completed", "activeForm": "Reading manifest"},
152
- {"content": "Invoke agents in parallel", "status": "in_progress", "activeForm": "Invoking agents"},
153
- {"content": "Verify SKILL package regenerated", "status": "pending", "activeForm": "Verifying regeneration"}
154
- ]})
155
- ```
156
-
157
- ---
158
-
159
- ### Phase 2: Agent Invocation
160
-
161
- #### Single Session Mode - Agent Task
162
-
163
- Invoke `universal-executor` with session-specific task:
164
-
165
- **Agent Prompt Structure**:
166
- ```
167
- Task: Process Workflow Session for SKILL Package
168
-
169
- Context:
170
- - Session ID: {session_id}
171
- - Session Path: .workflow/.archives/{session_id}/
172
- - Mode: Incremental update
173
-
174
- Objectives:
175
-
176
- 1. Read session data:
177
- - workflow-session.json (metadata)
178
- - IMPL_PLAN.md (implementation summary)
179
- - TODO_LIST.md (if exists)
180
- - manifest.json entry for lessons
181
-
182
- 2. Extract key information:
183
- - Description, tags, metrics
184
- - Lessons (successes, challenges, watch_patterns)
185
- - Context package path (reference only)
186
- - Key outcomes from IMPL_PLAN
187
-
188
- 3. Use Gemini for aggregation (optional):
189
- Command pattern:
190
- ccw cli -p "
191
- PURPOSE: Extract lessons and conflicts from workflow session
192
- TASK:
193
- • Analyze IMPL_PLAN and lessons from manifest
194
- • Identify success patterns and challenges
195
- • Extract conflict patterns with resolutions
196
- • Categorize by functional domain
197
- MODE: analysis
198
- CONTEXT: @IMPL_PLAN.md @workflow-session.json
199
- EXPECTED: Structured lessons and conflicts in JSON format
200
- RULES: Template reference from skill-aggregation.txt
201
- " --tool gemini --mode analysis --cd .workflow/.archives/{session_id}
202
-
203
- 3.5. **Generate SKILL.md Description** (CRITICAL for auto-loading):
204
-
205
- Read skill-index.txt template Section: "Description Field Generation"
206
-
207
- Execute command to get project root:
208
- ```bash
209
- git rev-parse --show-toplevel # Example output: /d/Claude_dms3
210
- ```
211
-
212
- Apply description format:
213
- ```
214
- Progressive workflow development history (located at {project_root}).
215
- Load this SKILL when continuing development, analyzing past implementations,
216
- or learning from workflow history, especially when no relevant context exists in memory.
217
- ```
218
-
219
- **Validation**:
220
- - [ ] Path uses forward slashes (not backslashes)
221
- - [ ] All three use cases present
222
- - [ ] Trigger optimization phrase included
223
- - [ ] Path is absolute (starts with / or drive letter)
224
-
225
- 4. Read templates for formatting guidance:
226
- - ~/.claude/workflows/cli-templates/prompts/workflow/skill-sessions-timeline.txt
227
- - ~/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt
228
- - ~/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt
229
- - ~/.claude/workflows/cli-templates/prompts/workflow/skill-index.txt
230
-
231
- **CRITICAL**: From skill-index.txt, read these sections:
232
- - "Description Field Generation" - Rules for generating description
233
- - "Variable Substitution Guide" - All required variables
234
- - "Generation Instructions" - Step-by-step generation process
235
- - "Validation Checklist" - Final validation steps
236
-
237
- 5. Update SKILL documents:
238
- - sessions-timeline.md: Append new session, update domain grouping
239
- - lessons-learned.md: Merge lessons into categories, update frequencies
240
- - conflict-patterns.md: Add conflicts, update recurring pattern frequencies
241
- - SKILL.md: Regenerate index with updated counts
242
-
243
- **For SKILL.md generation**:
244
- - Follow "Generation Instructions" from skill-index.txt (Steps 1-7)
245
- - Use git command for project_root: `git rev-parse --show-toplevel`
246
- - Apply "Description Field Generation" rules
247
- - Validate using "Validation Checklist"
248
- - Increment version (patch level)
249
-
250
- 6. Return result JSON:
251
- {
252
- "status": "success",
253
- "session_id": "{session_id}",
254
- "updates": {
255
- "sessions_added": 1,
256
- "lessons_merged": count,
257
- "conflicts_added": count
258
- }
259
- }
260
- ```
261
-
262
- ---
263
-
264
- #### All Sessions Mode - Parallel Agent Tasks
265
-
266
- **Step 2.1: Launch parallel session analyzers**
267
-
268
- Invoke multiple agents in parallel (one message with multiple Task calls):
269
-
270
- **Per-Session Agent Prompt**:
271
- ```
272
- Task: Extract Session Data for SKILL Package
273
-
274
- Context:
275
- - Session ID: {session_id}
276
- - Mode: Parallel analysis (no direct file writes)
277
-
278
- Objectives:
279
-
280
- 1. Read session data (same as single mode)
281
-
282
- 2. Extract key information (same as single mode)
283
-
284
- 3. Use Gemini for analysis (same as single mode)
285
-
286
- 4. Return structured data JSON:
287
- {
288
- "status": "success",
289
- "session_id": "{session_id}",
290
- "data": {
291
- "metadata": {
292
- "description": "...",
293
- "archived_at": "...",
294
- "tags": [...],
295
- "metrics": {...}
296
- },
297
- "lessons": {
298
- "successes": [...],
299
- "challenges": [...],
300
- "watch_patterns": [...]
301
- },
302
- "conflicts": [
303
- {
304
- "type": "architecture|dependencies|testing|performance",
305
- "pattern": "...",
306
- "resolution": "...",
307
- "code_impact": [...]
308
- }
309
- ],
310
- "impl_summary": "First 200 chars of IMPL_PLAN",
311
- "context_package_path": "..."
312
- }
313
- }
314
- ```
315
-
316
- **Step 2.2: Aggregate results**
317
-
318
- After all session agents complete, invoke aggregator agent:
319
-
320
- **Aggregator Agent Prompt**:
321
- ```
322
- Task: Aggregate Session Results and Generate SKILL Package
323
-
324
- Context:
325
- - Mode: Full regeneration
326
- - Input: JSON results from {session_count} session agents
327
-
328
- Objectives:
329
-
330
- 1. Aggregate all session data:
331
- - Collect metadata from all sessions
332
- - Merge lessons by category
333
- - Group conflicts by type
334
- - Sort sessions by date
335
-
336
- 2. Use Gemini for final aggregation:
337
- ccw cli -p "
338
- PURPOSE: Aggregate lessons and conflicts from all workflow sessions
339
- TASK:
340
- • Group successes by functional domain
341
- • Categorize challenges by severity (HIGH/MEDIUM/LOW)
342
- • Identify recurring conflict patterns
343
- • Calculate frequencies and prioritize
344
- MODE: analysis
345
- CONTEXT: [Provide aggregated JSON data]
346
- EXPECTED: Final aggregated structure for SKILL documents
347
- RULES: Template reference from skill-aggregation.txt
348
- " --tool gemini --mode analysis
349
-
350
- 3. Read templates for formatting (same 4 templates as single mode)
351
-
352
- 4. Generate all SKILL documents:
353
- - sessions-timeline.md (all sessions, sorted by date)
354
- - lessons-learned.md (aggregated lessons with frequencies)
355
- - conflict-patterns.md (recurring patterns with resolutions)
356
- - SKILL.md (index with progressive loading)
357
-
358
- 5. Write files to .claude/skills/workflow-progress/
359
-
360
- 6. Return result JSON:
361
- {
362
- "status": "success",
363
- "sessions_processed": count,
364
- "files_generated": ["SKILL.md", "sessions-timeline.md", ...],
365
- "summary": {
366
- "total_sessions": count,
367
- "functional_domains": [...],
368
- "date_range": "...",
369
- "lessons_count": count,
370
- "conflicts_count": count
371
- }
372
- }
373
- ```
374
-
375
- ---
376
-
377
- ### Phase 3: Verification
378
-
379
- **Step 3.1: Check SKILL Package Files**
380
- ```bash
381
- bash(ls -lh .claude/skills/workflow-progress/)
382
- ```
383
-
384
- Verify all 4 files exist:
385
- - SKILL.md
386
- - sessions-timeline.md
387
- - lessons-learned.md
388
- - conflict-patterns.md
389
-
390
- **Step 3.2: TodoWrite Completion**
391
-
392
- Mark all tasks as completed.
393
-
394
- **Step 3.3: Display Summary**
395
-
396
- **Single Session Mode**:
397
- ```
398
- Session {session_id} processed successfully
399
-
400
- Updated:
401
- - sessions-timeline.md
402
- - lessons-learned.md
403
- - conflict-patterns.md
404
- - SKILL.md
405
-
406
- SKILL Location: .claude/skills/workflow-progress/SKILL.md
407
- ```
408
-
409
- **All Sessions Mode**:
410
- ```
411
- All sessions processed in parallel
412
-
413
- Sessions: {count} total
414
- Functional Domains: {domain_list}
415
- Date Range: {earliest} - {latest}
416
-
417
- Generated:
418
- - sessions-timeline.md ({count} sessions)
419
- - lessons-learned.md ({lessons_count} lessons)
420
- - conflict-patterns.md ({conflicts_count} conflicts)
421
- - SKILL.md (4-level progressive loading)
422
-
423
- SKILL Location: .claude/skills/workflow-progress/SKILL.md
424
-
425
- Usage:
426
- - Level 0: Quick refresh (~2K tokens)
427
- - Level 1: Recent history (~8K tokens)
428
- - Level 2: Complete analysis (~25K tokens)
429
- - Level 3: Deep dive (~40K tokens)
430
- ```
431
-
432
- ---
433
-
434
- ## Agent Guidelines
435
-
436
- ### Agent Capabilities
437
-
438
- **universal-executor agents can**:
439
- - Read files from `.workflow/.archives/`
440
- - Execute bash commands
441
- - Call Gemini CLI for intelligent analysis
442
- - Read template files for formatting guidance
443
- - Write SKILL package files (single mode) or return JSON (parallel mode)
444
- - Return structured results
445
-
446
- ### Gemini Usage Pattern
447
-
448
- **When to use Gemini**:
449
- - Aggregating lessons from multiple sources
450
- - Identifying recurring patterns
451
- - Classifying conflicts by type and severity
452
- - Extracting structured data from IMPL_PLAN
453
-
454
- **Fallback Strategy**: If Gemini fails or times out, use direct file parsing with structured extraction logic.
455
-
456
- ---
457
-
458
- ## Template System
459
-
460
- ### Template Files
461
-
462
- All templates located in: `~/.claude/workflows/cli-templates/prompts/workflow/`
463
-
464
- 1. **skill-sessions-timeline.txt**: Format for sessions-timeline.md
465
- 2. **skill-lessons-learned.txt**: Format for lessons-learned.md
466
- 3. **skill-conflict-patterns.txt**: Format for conflict-patterns.md
467
- 4. **skill-index.txt**: Format for SKILL.md index
468
- 5. **skill-aggregation.txt**: Rules for Gemini aggregation (existing)
469
-
470
- ### Template Usage in Agent
471
-
472
- **Agents read templates to understand**:
473
- - File structure and markdown format
474
- - Data sources (which files to read)
475
- - Update strategy (incremental vs full)
476
- - Formatting rules and conventions
477
- - Aggregation logic (for Gemini)
478
-
479
- **Templates are NOT shown in this command documentation** - agents read them directly as needed.
480
-
481
- ---
482
-
483
- ## Error Handling
484
-
485
- ### Validation Errors
486
- - **No archives directory**: "Error: No workflow archives found at .workflow/.archives/"
487
- - **Invalid session ID format**: "Error: Invalid session ID format. Only WFS-* sessions are supported"
488
- - **Session not found**: "Error: Session {session_id} not found in archives"
489
- - **No WFS sessions in manifest**: "Error: No WFS-* workflow sessions found in manifest.json"
490
-
491
- ### Agent Errors
492
- - If agent fails, report error message from agent result
493
- - If Gemini times out, agents use fallback direct parsing
494
- - If template read fails, agents use inline format
495
-
496
- ### Recovery
497
- - Single session mode: Can be retried without affecting other sessions
498
- - All sessions mode: If one agent fails, others continue; retry failed sessions individually
499
-
500
-
501
-
502
- ## Integration
503
-
504
- ### Called by `/workflow:session:complete`
505
-
506
- Automatically invoked after session archival:
507
- ```bash
508
- SlashCommand(command="/memory:workflow-skill-memory session {session_id}")
509
- ```
510
-
511
- ### Manual Invocation
512
-
513
- Users can manually process sessions:
514
- ```bash
515
- /memory:workflow-skill-memory session WFS-custom-feature # Single session
516
- /memory:workflow-skill-memory all # Full regeneration
517
- ```