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,441 +0,0 @@
1
- ---
2
- name: replan
3
- description: Update task JSON with new requirements or batch-update multiple tasks from verification report, tracks changes in task-changes.json
4
- argument-hint: "[-y|--yes] task-id [\"text\"|file.md] | --batch [verification-report.md]"
5
- allowed-tools: Read(*), Write(*), Edit(*), TodoWrite(*), Glob(*), Bash(*)
6
- ---
7
-
8
- ## Auto Mode
9
-
10
- When `--yes` or `-y`: Auto-confirm updates, use recommended changes.
11
-
12
- # Task Replan Command (/task:replan)
13
-
14
- > **⚠️ DEPRECATION NOTICE**: This command is maintained for backward compatibility. For new workflows, use `/workflow:replan` which provides:
15
- > - Session-level replanning with comprehensive artifact updates
16
- > - Interactive boundary clarification
17
- > - Updates to IMPL_PLAN.md, TODO_LIST.md, and session metadata
18
- > - Better integration with workflow sessions
19
- >
20
- > **Migration**: Replace `/task:replan IMPL-1 "changes"` with `/workflow:replan IMPL-1 "changes"`
21
-
22
- ## Overview
23
- Replans individual tasks or batch processes multiple tasks with change tracking and backup management.
24
-
25
- **Modes**:
26
- - **Single Task Mode**: Replan one task with specific changes
27
- - **Batch Mode**: Process multiple tasks from action-plan verification report
28
-
29
- ## Key Features
30
- - **Single/Batch Operations**: Single task or multiple tasks from verification report
31
- - **Multiple Input Sources**: Text, files, or verification report
32
- - **Backup Management**: Automatic backup of previous versions
33
- - **Change Documentation**: Track all modifications
34
- - **Progress Tracking**: TodoWrite integration for batch operations
35
-
36
- **CRITICAL**: Validates active session before replanning
37
-
38
- ## Operation Modes
39
-
40
- ### Single Task Mode
41
-
42
- #### Direct Text (Default)
43
- ```bash
44
- /task:replan IMPL-1 "Add OAuth2 authentication support"
45
- ```
46
-
47
- #### File-based Input
48
- ```bash
49
- /task:replan IMPL-1 updated-specs.md
50
- ```
51
- Supports: .md, .txt, .json, .yaml
52
-
53
- #### Interactive Mode
54
- ```bash
55
- /task:replan IMPL-1 --interactive
56
- ```
57
- Guided step-by-step modification process with validation
58
-
59
- ### Batch Mode
60
-
61
- #### From Verification Report
62
- ```bash
63
- /task:replan --batch ACTION_PLAN_VERIFICATION.md
64
- ```
65
-
66
- **Workflow**:
67
- 1. Parse verification report to extract replan recommendations
68
- 2. Create TodoWrite task list for all modifications
69
- 3. Process each task sequentially with confirmation
70
- 4. Track progress and generate summary report
71
-
72
- **Auto-detection**: If input file contains "Action Plan Verification Report" header, automatically enters batch mode
73
-
74
- ## Replanning Process
75
-
76
- ### Single Task Process
77
-
78
- 1. **Load & Validate**: Read task JSON and validate session
79
- 2. **Parse Input**: Process changes from input source
80
- 3. **Create Backup**: Save previous version to backup folder
81
- 4. **Update Task**: Modify JSON structure and relationships
82
- 5. **Save Changes**: Write updated task and increment version
83
- 6. **Update Session**: Reflect changes in workflow stats
84
-
85
- ### Batch Process
86
-
87
- 1. **Parse Verification Report**: Extract all replan recommendations
88
- 2. **Initialize TodoWrite**: Create task list for tracking
89
- 3. **For Each Task**:
90
- - Mark todo as in_progress
91
- - Load and validate task JSON
92
- - Create backup
93
- - Apply recommended changes
94
- - Save updated task
95
- - Mark todo as completed
96
- 4. **Generate Summary**: Report all changes and backup locations
97
-
98
- ## Backup Management
99
-
100
- ### Backup Tracking
101
- Tasks maintain backup history:
102
- ```json
103
- {
104
- "id": "IMPL-1",
105
- "version": "1.2",
106
- "replan_history": [
107
- {
108
- "version": "1.2",
109
- "reason": "Add OAuth2 support",
110
- "input_source": "direct_text",
111
- "backup_location": ".task/backup/IMPL-1-v1.1.json",
112
- "timestamp": "2025-10-17T10:30:00Z"
113
- }
114
- ]
115
- }
116
- ```
117
-
118
- **Complete schema**: See @~/.claude/workflows/task-core.md
119
-
120
- ### File Structure
121
- ```
122
- .task/
123
- ├── IMPL-1.json # Current version
124
- ├── backup/
125
- │ ├── IMPL-1-v1.0.json # Original version
126
- │ ├── IMPL-1-v1.1.json # Previous backup
127
- │ └── IMPL-1-v1.2.json # Latest backup
128
- └── [new subtasks as needed]
129
- ```
130
-
131
- **Backup Naming**: `{task-id}-v{version}.json`
132
-
133
- ## Implementation Updates
134
-
135
- ### Change Detection
136
- Tracks modifications to:
137
- - Files in implementation.files array
138
- - Dependencies and affected modules
139
- - Risk assessments and performance notes
140
- - Logic flows and code locations
141
-
142
- ### Analysis Triggers
143
- May require gemini re-analysis when:
144
- - New files need code extraction
145
- - Function locations change
146
- - Dependencies require re-evaluation
147
-
148
- ## Document Updates
149
-
150
- ### Planning Document
151
- May update IMPL_PLAN.md sections when task structure changes significantly
152
-
153
- ### TODO List Sync
154
- If TODO_LIST.md exists, synchronizes:
155
- - New subtasks (with [ ] checkbox)
156
- - Modified tasks (marked as updated)
157
- - Removed subtasks (deleted from list)
158
-
159
- ## Change Documentation
160
-
161
- ### Change Summary
162
- Generates brief change log with:
163
- - Version increment (1.1 → 1.2)
164
- - Input source and reason
165
- - Key modifications made
166
- - Files updated/created
167
- - Backup location
168
-
169
- ## Session Updates
170
-
171
- Updates workflow-session.json with:
172
- - Modified task tracking
173
- - Task count changes (if subtasks added/removed)
174
- - Last modification timestamps
175
-
176
- ## Rollback Support
177
-
178
- ```bash
179
- /task:replan IMPL-1 --rollback v1.1
180
-
181
- Rollback to version 1.1:
182
- - Restore task from backup/.../IMPL-1-v1.1.json
183
- - Remove new subtasks if any
184
- - Update session stats
185
-
186
- # Use AskUserQuestion for confirmation
187
- AskUserQuestion({
188
- questions: [{
189
- question: "Are you sure you want to roll back this task to a previous version?",
190
- header: "Confirm",
191
- options: [
192
- { label: "Yes, rollback", description: "Restore the task from the selected backup." },
193
- { label: "No, cancel", description: "Keep the current version of the task." }
194
- ],
195
- multiSelect: false
196
- }]
197
- })
198
-
199
- User selected: "Yes, rollback"
200
-
201
- Task rolled back to version 1.1
202
- ```
203
-
204
- ## Batch Processing with TodoWrite
205
-
206
- ### Progress Tracking
207
- When processing multiple tasks, automatically creates TodoWrite task list:
208
-
209
- ```markdown
210
- **Batch Replan Progress**:
211
- - [x] IMPL-002: Add FR-12 draft saving acceptance criteria
212
- - [x] IMPL-003: Add FR-14 history tracking acceptance criteria
213
- - [ ] IMPL-004: Add FR-09 response surface explicit coverage
214
- - [ ] IMPL-008: Add NFR performance validation steps
215
- ```
216
-
217
- ### Batch Report
218
- After completion, generates summary:
219
- ```markdown
220
- ## Batch Replan Summary
221
-
222
- **Total Tasks**: 4
223
- **Successful**: 3
224
- **Failed**: 1
225
- **Skipped**: 0
226
-
227
- ### Changes Made
228
- - IMPL-002 v1.0 → v1.1: Added FR-12 acceptance criteria
229
- - IMPL-003 v1.0 → v1.1: Added FR-14 acceptance criteria
230
- - IMPL-004 v1.0 → v1.1: Added FR-09 explicit coverage
231
-
232
- ### Backups Created
233
- - .task/backup/IMPL-002-v1.0.json
234
- - .task/backup/IMPL-003-v1.0.json
235
- - .task/backup/IMPL-004-v1.0.json
236
-
237
- ### Errors
238
- - IMPL-008: File not found (task may have been renamed)
239
- ```
240
-
241
- ## Examples
242
-
243
- ### Single Task - Text Input
244
- ```bash
245
- /task:replan IMPL-1 "Add OAuth2 authentication support"
246
-
247
- Processing changes...
248
- Proposed updates:
249
- + Add OAuth2 integration
250
- + Update authentication flow
251
-
252
- # Use AskUserQuestion for confirmation
253
- AskUserQuestion({
254
- questions: [{
255
- question: "Do you want to apply these changes to the task?",
256
- header: "Apply",
257
- options: [
258
- { label: "Yes, apply", description: "Create new version with these changes." },
259
- { label: "No, cancel", description: "Discard changes and keep current version." }
260
- ],
261
- multiSelect: false
262
- }]
263
- })
264
-
265
- User selected: "Yes, apply"
266
-
267
- Version 1.2 created
268
- Context updated
269
- Backup saved to .task/backup/IMPL-1-v1.1.json
270
- ```
271
-
272
- ### Single Task - File Input
273
- ```bash
274
- /task:replan IMPL-2 requirements.md
275
-
276
- Loading requirements.md...
277
- Applying specification changes...
278
-
279
- Task updated with new requirements
280
- Version 1.1 created
281
- Backup saved to .task/backup/IMPL-2-v1.0.json
282
- ```
283
-
284
- ### Batch Mode - From Verification Report
285
- ```bash
286
- /task:replan --batch .workflow/active/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md
287
-
288
- Parsing verification report...
289
- Found 4 tasks requiring replanning:
290
- - IMPL-002: Add FR-12 draft saving acceptance criteria
291
- - IMPL-003: Add FR-14 history tracking acceptance criteria
292
- - IMPL-004: Add FR-09 response surface explicit coverage
293
- - IMPL-008: Add NFR performance validation steps
294
-
295
- Creating task tracking list...
296
-
297
- Processing IMPL-002...
298
- Backup created: .task/backup/IMPL-002-v1.0.json
299
- Updated to v1.1
300
-
301
- Processing IMPL-003...
302
- Backup created: .task/backup/IMPL-003-v1.0.json
303
- Updated to v1.1
304
-
305
- Processing IMPL-004...
306
- Backup created: .task/backup/IMPL-004-v1.0.json
307
- Updated to v1.1
308
-
309
- Processing IMPL-008...
310
- Backup created: .task/backup/IMPL-008-v1.0.json
311
- Updated to v1.1
312
-
313
- Batch replan completed: 4/4 successful
314
- Summary report saved
315
- ```
316
-
317
- ### Batch Mode - Auto-detection
318
- ```bash
319
- # If file contains "Action Plan Verification Report", auto-enters batch mode
320
- /task:replan ACTION_PLAN_VERIFICATION.md
321
-
322
- Detected verification report format
323
- Entering batch mode...
324
- [same as above]
325
- ```
326
-
327
- ## Error Handling
328
-
329
- ### Single Task Errors
330
- ```bash
331
- # Task not found
332
- Task IMPL-5 not found
333
- Check task ID with /workflow:status
334
-
335
- # Task completed
336
- Task IMPL-1 is completed (cannot replan)
337
- Create new task for additional work
338
-
339
- # File not found
340
- File requirements.md not found
341
- Check file path
342
-
343
- # No input provided
344
- Please specify changes needed
345
- Provide text, file, or verification report
346
- ```
347
-
348
- ### Batch Mode Errors
349
- ```bash
350
- # Invalid verification report
351
- File does not contain valid verification report format
352
- Check report structure or use single task mode
353
-
354
- # Partial failures
355
- Batch completed with errors: 3/4 successful
356
- Review error details in summary report
357
-
358
- # No replan recommendations found
359
- Verification report contains no replan recommendations
360
- Check report content or use /workflow:plan-verify first
361
- ```
362
-
363
- ## Batch Mode Integration
364
-
365
- ### Input Format Expectations
366
- Batch mode parses verification reports looking for:
367
-
368
- 1. **Required Actions Section**: Commands like `/task:replan IMPL-X "changes"`
369
- 2. **Findings Table**: Task IDs with recommendations
370
- 3. **Next Actions Section**: Specific replan commands
371
-
372
- **Example Patterns**:
373
- ```markdown
374
- #### 1. HIGH Priority - Address FR Coverage Gaps
375
- /task:replan IMPL-004 "
376
- Add explicit acceptance criteria:
377
- - FR-09: Response surface 3D visualization
378
- "
379
-
380
- #### 2. MEDIUM Priority - Enhance NFR Coverage
381
- /task:replan IMPL-008 "
382
- Add performance testing:
383
- - NFR-01: Load test API endpoints
384
- "
385
- ```
386
-
387
- ### Extraction Logic
388
- 1. Scan for `/task:replan` commands in report
389
- 2. Extract task ID and change description
390
- 3. Group by priority (HIGH, MEDIUM, LOW)
391
- 4. Process in priority order with TodoWrite tracking
392
-
393
- ### Confirmation Behavior
394
- - **Default**: Confirm each task before applying
395
- - **With `--auto-confirm`**: Apply all changes without prompting
396
- ```bash
397
- /task:replan --batch report.md --auto-confirm
398
- ```
399
-
400
- ## Implementation Details
401
-
402
- ### Backup Management
403
- ```typescript
404
- // Backup file naming convention
405
- const backupPath = `.task/backup/${taskId}-v${previousVersion}.json`;
406
-
407
- // Backup metadata in task JSON
408
- {
409
- "replan_history": [
410
- {
411
- "version": "1.2",
412
- "timestamp": "2025-10-17T10:30:00Z",
413
- "reason": "Add FR-09 explicit coverage",
414
- "input_source": "batch_verification_report",
415
- "backup_location": ".task/backup/IMPL-004-v1.1.json"
416
- }
417
- ]
418
- }
419
- ```
420
-
421
- ### TodoWrite Integration
422
- ```typescript
423
- // Initialize tracking for batch mode
424
- TodoWrite({
425
- todos: taskList.map(task => ({
426
- content: `${task.id}: ${task.changeDescription}`,
427
- status: "pending",
428
- activeForm: `Replanning ${task.id}`
429
- }))
430
- });
431
-
432
- // Update progress during processing
433
- TodoWrite({
434
- todos: updateTaskStatus(taskId, "in_progress")
435
- });
436
-
437
- // Mark completed
438
- TodoWrite({
439
- todos: updateTaskStatus(taskId, "completed")
440
- });
441
- ```
@@ -1,254 +0,0 @@
1
- ---
2
- name: version
3
- description: Display Claude Code version information and check for updates
4
- allowed-tools: Bash(*)
5
- ---
6
-
7
- # Version Command (/version)
8
-
9
- ## Purpose
10
- Display local and global installation versions, check for the latest updates from GitHub, and provide upgrade recommendations.
11
-
12
- ## Execution Flow
13
- 1. **Local Version Check**: Read version information from `./.claude/version.json` if it exists.
14
- 2. **Global Version Check**: Read version information from `~/.claude/version.json` if it exists.
15
- 3. **Fetch Remote Versions**: Use GitHub API to get the latest stable release tag and the latest commit hash from the main branch.
16
- 4. **Compare & Suggest**: Compare installed versions with the latest remote versions and provide upgrade suggestions if applicable.
17
-
18
- ## Step 1: Check Local Version
19
-
20
- ### Check if local version.json exists
21
- ```bash
22
- bash(test -f ./.claude/version.json && echo "found" || echo "not_found")
23
- ```
24
-
25
- ### Read local version (if exists)
26
- ```bash
27
- bash(cat ./.claude/version.json)
28
- ```
29
-
30
- ### Extract version with jq (preferred)
31
- ```bash
32
- bash(cat ./.claude/version.json | grep -o '"version": *"[^"]*"' | cut -d'"' -f4)
33
- ```
34
-
35
- ### Extract installation date
36
- ```bash
37
- bash(cat ./.claude/version.json | grep -o '"installation_date_utc": *"[^"]*"' | cut -d'"' -f4)
38
- ```
39
-
40
- **Output Format**:
41
- ```
42
- Local Version: 3.2.1
43
- Installed: 2025-10-03T12:00:00Z
44
- ```
45
-
46
- ## Step 2: Check Global Version
47
-
48
- ### Check if global version.json exists
49
- ```bash
50
- bash(test -f ~/.claude/version.json && echo "found" || echo "not_found")
51
- ```
52
-
53
- ### Read global version
54
- ```bash
55
- bash(cat ~/.claude/version.json)
56
- ```
57
-
58
- ### Extract version
59
- ```bash
60
- bash(cat ~/.claude/version.json | grep -o '"version": *"[^"]*"' | cut -d'"' -f4)
61
- ```
62
-
63
- ### Extract installation date
64
- ```bash
65
- bash(cat ~/.claude/version.json | grep -o '"installation_date_utc": *"[^"]*"' | cut -d'"' -f4)
66
- ```
67
-
68
- **Output Format**:
69
- ```
70
- Global Version: 3.2.1
71
- Installed: 2025-10-03T12:00:00Z
72
- ```
73
-
74
- ## Step 3: Fetch Latest Stable Release
75
-
76
- ### Call GitHub API for latest release (with timeout)
77
- ```bash
78
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null, timeout: 30000)
79
- ```
80
-
81
- ### Extract tag name (version)
82
- ```bash
83
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"tag_name": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
84
- ```
85
-
86
- ### Extract release name
87
- ```bash
88
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"name": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
89
- ```
90
-
91
- ### Extract published date
92
- ```bash
93
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"published_at": *"[^"]*"' | cut -d'"' -f4, timeout: 30000)
94
- ```
95
-
96
- **Output Format**:
97
- ```
98
- Latest Stable: v3.2.2
99
- Release: v3.2.2: Independent Test-Gen Workflow with Cross-Session Context
100
- Published: 2025-10-03T04:10:08Z
101
- ```
102
-
103
- ## Step 4: Fetch Latest Main Branch
104
-
105
- ### Call GitHub API for latest commit on main (with timeout)
106
- ```bash
107
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null, timeout: 30000)
108
- ```
109
-
110
- ### Extract commit SHA (short)
111
- ```bash
112
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep -o '"sha": *"[^"]*"' | head -1 | cut -d'"' -f4 | cut -c1-7, timeout: 30000)
113
- ```
114
-
115
- ### Extract commit message (first line only)
116
- ```bash
117
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep '"message":' | cut -d'"' -f4 | cut -d'\' -f1, timeout: 30000)
118
- ```
119
-
120
- ### Extract commit date
121
- ```bash
122
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep -o '"date": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
123
- ```
124
-
125
- **Output Format**:
126
- ```
127
- Latest Dev: a03415b
128
- Message: feat: Add version tracking and upgrade check system
129
- Date: 2025-10-03T04:46:44Z
130
- ```
131
-
132
- ## Step 5: Compare Versions and Suggest Upgrade
133
-
134
- ### Normalize versions (remove 'v' prefix)
135
- ```bash
136
- bash(echo "v3.2.1" | sed 's/^v//')
137
- ```
138
-
139
- ### Compare two versions
140
- ```bash
141
- bash(printf "%s\n%s" "3.2.1" "3.2.2" | sort -V | tail -n 1)
142
- ```
143
-
144
- ### Check if versions are equal
145
- ```bash
146
- # If equal: Up to date
147
- # If remote newer: Upgrade available
148
- # If local newer: Development version
149
- ```
150
-
151
- **Output Scenarios**:
152
-
153
- **Scenario 1: Up to date**
154
- ```
155
- You are on the latest stable version (3.2.1)
156
- ```
157
-
158
- **Scenario 2: Upgrade available**
159
- ```
160
- A newer stable version is available: v3.2.2
161
- Your version: 3.2.1
162
-
163
- To upgrade:
164
- PowerShell: iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
165
- Bash: bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
166
- ```
167
-
168
- **Scenario 3: Development version**
169
- ```
170
- You are running a development version (3.4.0-dev)
171
- This is newer than the latest stable release (v3.3.0)
172
- ```
173
-
174
- ## Simple Bash Commands
175
-
176
- ### Basic Operations
177
- ```bash
178
- # Check local version file
179
- bash(test -f ./.claude/version.json && cat ./.claude/version.json)
180
-
181
- # Check global version file
182
- bash(test -f ~/.claude/version.json && cat ~/.claude/version.json)
183
-
184
- # Extract version from JSON
185
- bash(cat version.json | grep -o '"version": *"[^"]*"' | cut -d'"' -f4)
186
-
187
- # Extract date from JSON
188
- bash(cat version.json | grep -o '"installation_date_utc": *"[^"]*"' | cut -d'"' -f4)
189
-
190
- # Fetch latest release (with timeout)
191
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null, timeout: 30000)
192
-
193
- # Extract tag name
194
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4, timeout: 30000)
195
-
196
- # Extract release name
197
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"name": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
198
-
199
- # Fetch latest commit (with timeout)
200
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null, timeout: 30000)
201
-
202
- # Extract commit SHA
203
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep -o '"sha": *"[^"]*"' | head -1 | cut -d'"' -f4 | cut -c1-7, timeout: 30000)
204
-
205
- # Extract commit message (first line)
206
- bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep '"message":' | cut -d'"' -f4 | cut -d'\' -f1, timeout: 30000)
207
-
208
- # Compare versions
209
- bash(printf "%s\n%s" "3.2.1" "3.2.2" | sort -V | tail -n 1)
210
-
211
- # Remove 'v' prefix
212
- bash(echo "v3.2.1" | sed 's/^v//')
213
- ```
214
-
215
- ## Error Handling
216
-
217
- ### No installation found
218
- ```
219
- WARNING: Claude Code Workflow not installed
220
- Install using:
221
- PowerShell: iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
222
- ```
223
-
224
- ### Network error
225
- ```
226
- ERROR: Could not fetch latest version from GitHub
227
- Check your network connection
228
- ```
229
-
230
- ### Invalid version.json
231
- ```
232
- ERROR: version.json is invalid or corrupted
233
- ```
234
-
235
- ## Design Notes
236
-
237
- - Uses simple, direct bash commands instead of complex functions
238
- - Each step is independent and can be executed separately
239
- - Fallback to grep/sed for JSON parsing (no jq dependency required)
240
- - Network calls use curl with error suppression and 30-second timeout
241
- - Version comparison uses `sort -V` for accurate semantic versioning
242
- - Use `/commits/main` API instead of `/branches/main` for more reliable commit info
243
- - Extract first line of commit message using `cut -d'\' -f1` to handle JSON escape sequences
244
-
245
- ## API Endpoints
246
-
247
- ### GitHub API Used
248
- - **Latest Release**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest`
249
- - Fields: `tag_name`, `name`, `published_at`
250
- - **Latest Commit**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main`
251
- - Fields: `sha`, `commit.message`, `commit.author.date`
252
-
253
- ### Timeout Configuration
254
- All network calls should use `timeout: 30000` (30 seconds) to handle slow connections.