claude-code-workflow 6.3.43 → 6.3.44

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 (77) hide show
  1. package/.claude/agents/tdd-developer.md +530 -0
  2. package/.claude/commands/issue/discover-by-prompt.md +5 -1
  3. package/.claude/commands/issue/discover.md +472 -468
  4. package/.claude/commands/issue/execute.md +580 -581
  5. package/.claude/commands/issue/new.md +417 -413
  6. package/.claude/commands/issue/plan.md +5 -1
  7. package/.claude/commands/issue/queue.md +445 -441
  8. package/.claude/commands/task/breakdown.md +207 -203
  9. package/.claude/commands/task/replan.md +440 -436
  10. package/.claude/commands/workflow/action-plan-verify.md +485 -447
  11. package/.claude/commands/workflow/brainstorm/artifacts.md +457 -453
  12. package/.claude/commands/workflow/brainstorm/auto-parallel.md +5 -1
  13. package/.claude/commands/workflow/brainstorm/synthesis.md +402 -398
  14. package/.claude/commands/workflow/clean.md +67 -35
  15. package/.claude/commands/workflow/debug-with-file.md +670 -666
  16. package/.claude/commands/workflow/debug.md +331 -327
  17. package/.claude/commands/workflow/develop-with-file.md +5 -1
  18. package/.claude/commands/workflow/execute.md +546 -498
  19. package/.claude/commands/workflow/lite-execute.md +44 -26
  20. package/.claude/commands/workflow/lite-fix.md +780 -730
  21. package/.claude/commands/workflow/lite-lite-lite.md +5 -1
  22. package/.claude/commands/workflow/lite-plan.md +87 -39
  23. package/.claude/commands/workflow/multi-cli-plan.md +572 -568
  24. package/.claude/commands/workflow/plan-verify.md +527 -0
  25. package/.claude/commands/workflow/plan.md +555 -551
  26. package/.claude/commands/workflow/replan.md +572 -515
  27. package/.claude/commands/workflow/review-fix.md +608 -610
  28. package/.claude/commands/workflow/session/complete.md +37 -14
  29. package/.claude/commands/workflow/session/solidify.md +303 -299
  30. package/.claude/commands/workflow/tdd-plan.md +630 -597
  31. package/.claude/commands/workflow/tdd-verify.md +391 -206
  32. package/.claude/commands/workflow/tools/conflict-resolution.md +24 -12
  33. package/.claude/commands/workflow/tools/task-generate-agent.md +583 -563
  34. package/.claude/commands/workflow/tools/task-generate-tdd.md +749 -517
  35. package/.claude/commands/workflow/ui-design/animation-extract.md +1154 -1150
  36. package/.claude/commands/workflow/ui-design/layout-extract.md +792 -788
  37. package/.claude/commands/workflow/ui-design/style-extract.md +777 -773
  38. package/.claude/skills/ccw/command.json +4 -4
  39. package/.claude/skills/ccw-coordinator/README.md +45 -0
  40. package/.claude/skills/ccw-coordinator/SKILL.md +320 -0
  41. package/.claude/skills/ccw-coordinator/phases/actions/action-abort.md +9 -0
  42. package/.claude/skills/ccw-coordinator/phases/actions/action-command-build.md +40 -0
  43. package/.claude/skills/ccw-coordinator/phases/actions/action-command-execute.md +124 -0
  44. package/.claude/skills/ccw-coordinator/phases/actions/action-command-selection.md +48 -0
  45. package/.claude/skills/ccw-coordinator/phases/actions/action-complete.md +25 -0
  46. package/.claude/skills/ccw-coordinator/phases/actions/action-init.md +26 -0
  47. package/.claude/skills/ccw-coordinator/phases/orchestrator.md +59 -0
  48. package/.claude/skills/ccw-coordinator/phases/state-schema.md +66 -0
  49. package/.claude/skills/ccw-coordinator/skill-config.json +66 -0
  50. package/.claude/skills/ccw-coordinator/specs/command-library.md +169 -0
  51. package/.claude/skills/ccw-coordinator/specs/specs.md +362 -0
  52. package/.claude/skills/ccw-coordinator/tools/README.md +95 -0
  53. package/.claude/skills/ccw-coordinator/tools/chain-validate.cjs +320 -0
  54. package/.claude/skills/ccw-coordinator/tools/command-registry.cjs +255 -0
  55. package/.claude/skills/ccw-help/command.json +5 -5
  56. package/.claude/skills/ccw-help/scripts/analyze_commands.py +337 -337
  57. package/.claude/workflows/cli-templates/prompts/workflow-impl-plan-template.txt +1 -1
  58. package/ccw/dist/commands/issue.d.ts +4 -0
  59. package/ccw/dist/commands/issue.d.ts.map +1 -1
  60. package/ccw/dist/commands/issue.js +73 -6
  61. package/ccw/dist/commands/issue.js.map +1 -1
  62. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  63. package/ccw/dist/core/routes/cli-routes.js +32 -28
  64. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  65. package/ccw/dist/tools/claude-cli-tools.d.ts +10 -0
  66. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  67. package/ccw/dist/tools/claude-cli-tools.js +45 -0
  68. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  69. package/ccw/dist/tools/codex-lens.d.ts.map +1 -1
  70. package/ccw/dist/tools/codex-lens.js +38 -11
  71. package/ccw/dist/tools/codex-lens.js.map +1 -1
  72. package/ccw/src/commands/issue.ts +84 -6
  73. package/ccw/src/core/routes/cli-routes.ts +30 -25
  74. package/ccw/src/templates/dashboard-js/views/help.js +1 -1
  75. package/ccw/src/tools/claude-cli-tools.ts +50 -0
  76. package/ccw/src/tools/codex-lens.ts +40 -11
  77. package/package.json +1 -1
@@ -1,437 +1,441 @@
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: "task-id [\"text\"|file.md] | --batch [verification-report.md]"
5
- allowed-tools: Read(*), Write(*), Edit(*), TodoWrite(*), Glob(*), Bash(*)
6
- ---
7
-
8
- # Task Replan Command (/task:replan)
9
-
10
- > **⚠️ DEPRECATION NOTICE**: This command is maintained for backward compatibility. For new workflows, use `/workflow:replan` which provides:
11
- > - Session-level replanning with comprehensive artifact updates
12
- > - Interactive boundary clarification
13
- > - Updates to IMPL_PLAN.md, TODO_LIST.md, and session metadata
14
- > - Better integration with workflow sessions
15
- >
16
- > **Migration**: Replace `/task:replan IMPL-1 "changes"` with `/workflow:replan IMPL-1 "changes"`
17
-
18
- ## Overview
19
- Replans individual tasks or batch processes multiple tasks with change tracking and backup management.
20
-
21
- **Modes**:
22
- - **Single Task Mode**: Replan one task with specific changes
23
- - **Batch Mode**: Process multiple tasks from action-plan verification report
24
-
25
- ## Key Features
26
- - **Single/Batch Operations**: Single task or multiple tasks from verification report
27
- - **Multiple Input Sources**: Text, files, or verification report
28
- - **Backup Management**: Automatic backup of previous versions
29
- - **Change Documentation**: Track all modifications
30
- - **Progress Tracking**: TodoWrite integration for batch operations
31
-
32
- **CRITICAL**: Validates active session before replanning
33
-
34
- ## Operation Modes
35
-
36
- ### Single Task Mode
37
-
38
- #### Direct Text (Default)
39
- ```bash
40
- /task:replan IMPL-1 "Add OAuth2 authentication support"
41
- ```
42
-
43
- #### File-based Input
44
- ```bash
45
- /task:replan IMPL-1 updated-specs.md
46
- ```
47
- Supports: .md, .txt, .json, .yaml
48
-
49
- #### Interactive Mode
50
- ```bash
51
- /task:replan IMPL-1 --interactive
52
- ```
53
- Guided step-by-step modification process with validation
54
-
55
- ### Batch Mode
56
-
57
- #### From Verification Report
58
- ```bash
59
- /task:replan --batch ACTION_PLAN_VERIFICATION.md
60
- ```
61
-
62
- **Workflow**:
63
- 1. Parse verification report to extract replan recommendations
64
- 2. Create TodoWrite task list for all modifications
65
- 3. Process each task sequentially with confirmation
66
- 4. Track progress and generate summary report
67
-
68
- **Auto-detection**: If input file contains "Action Plan Verification Report" header, automatically enters batch mode
69
-
70
- ## Replanning Process
71
-
72
- ### Single Task Process
73
-
74
- 1. **Load & Validate**: Read task JSON and validate session
75
- 2. **Parse Input**: Process changes from input source
76
- 3. **Create Backup**: Save previous version to backup folder
77
- 4. **Update Task**: Modify JSON structure and relationships
78
- 5. **Save Changes**: Write updated task and increment version
79
- 6. **Update Session**: Reflect changes in workflow stats
80
-
81
- ### Batch Process
82
-
83
- 1. **Parse Verification Report**: Extract all replan recommendations
84
- 2. **Initialize TodoWrite**: Create task list for tracking
85
- 3. **For Each Task**:
86
- - Mark todo as in_progress
87
- - Load and validate task JSON
88
- - Create backup
89
- - Apply recommended changes
90
- - Save updated task
91
- - Mark todo as completed
92
- 4. **Generate Summary**: Report all changes and backup locations
93
-
94
- ## Backup Management
95
-
96
- ### Backup Tracking
97
- Tasks maintain backup history:
98
- ```json
99
- {
100
- "id": "IMPL-1",
101
- "version": "1.2",
102
- "replan_history": [
103
- {
104
- "version": "1.2",
105
- "reason": "Add OAuth2 support",
106
- "input_source": "direct_text",
107
- "backup_location": ".task/backup/IMPL-1-v1.1.json",
108
- "timestamp": "2025-10-17T10:30:00Z"
109
- }
110
- ]
111
- }
112
- ```
113
-
114
- **Complete schema**: See @~/.claude/workflows/task-core.md
115
-
116
- ### File Structure
117
- ```
118
- .task/
119
- ├── IMPL-1.json # Current version
120
- ├── backup/
121
- │ ├── IMPL-1-v1.0.json # Original version
122
- │ ├── IMPL-1-v1.1.json # Previous backup
123
- │ └── IMPL-1-v1.2.json # Latest backup
124
- └── [new subtasks as needed]
125
- ```
126
-
127
- **Backup Naming**: `{task-id}-v{version}.json`
128
-
129
- ## Implementation Updates
130
-
131
- ### Change Detection
132
- Tracks modifications to:
133
- - Files in implementation.files array
134
- - Dependencies and affected modules
135
- - Risk assessments and performance notes
136
- - Logic flows and code locations
137
-
138
- ### Analysis Triggers
139
- May require gemini re-analysis when:
140
- - New files need code extraction
141
- - Function locations change
142
- - Dependencies require re-evaluation
143
-
144
- ## Document Updates
145
-
146
- ### Planning Document
147
- May update IMPL_PLAN.md sections when task structure changes significantly
148
-
149
- ### TODO List Sync
150
- If TODO_LIST.md exists, synchronizes:
151
- - New subtasks (with [ ] checkbox)
152
- - Modified tasks (marked as updated)
153
- - Removed subtasks (deleted from list)
154
-
155
- ## Change Documentation
156
-
157
- ### Change Summary
158
- Generates brief change log with:
159
- - Version increment (1.1 → 1.2)
160
- - Input source and reason
161
- - Key modifications made
162
- - Files updated/created
163
- - Backup location
164
-
165
- ## Session Updates
166
-
167
- Updates workflow-session.json with:
168
- - Modified task tracking
169
- - Task count changes (if subtasks added/removed)
170
- - Last modification timestamps
171
-
172
- ## Rollback Support
173
-
174
- ```bash
175
- /task:replan IMPL-1 --rollback v1.1
176
-
177
- Rollback to version 1.1:
178
- - Restore task from backup/.../IMPL-1-v1.1.json
179
- - Remove new subtasks if any
180
- - Update session stats
181
-
182
- # Use AskUserQuestion for confirmation
183
- AskUserQuestion({
184
- questions: [{
185
- question: "Are you sure you want to roll back this task to a previous version?",
186
- header: "Confirm",
187
- options: [
188
- { label: "Yes, rollback", description: "Restore the task from the selected backup." },
189
- { label: "No, cancel", description: "Keep the current version of the task." }
190
- ],
191
- multiSelect: false
192
- }]
193
- })
194
-
195
- User selected: "Yes, rollback"
196
-
197
- Task rolled back to version 1.1
198
- ```
199
-
200
- ## Batch Processing with TodoWrite
201
-
202
- ### Progress Tracking
203
- When processing multiple tasks, automatically creates TodoWrite task list:
204
-
205
- ```markdown
206
- **Batch Replan Progress**:
207
- - [x] IMPL-002: Add FR-12 draft saving acceptance criteria
208
- - [x] IMPL-003: Add FR-14 history tracking acceptance criteria
209
- - [ ] IMPL-004: Add FR-09 response surface explicit coverage
210
- - [ ] IMPL-008: Add NFR performance validation steps
211
- ```
212
-
213
- ### Batch Report
214
- After completion, generates summary:
215
- ```markdown
216
- ## Batch Replan Summary
217
-
218
- **Total Tasks**: 4
219
- **Successful**: 3
220
- **Failed**: 1
221
- **Skipped**: 0
222
-
223
- ### Changes Made
224
- - IMPL-002 v1.0 → v1.1: Added FR-12 acceptance criteria
225
- - IMPL-003 v1.0 → v1.1: Added FR-14 acceptance criteria
226
- - IMPL-004 v1.0 → v1.1: Added FR-09 explicit coverage
227
-
228
- ### Backups Created
229
- - .task/backup/IMPL-002-v1.0.json
230
- - .task/backup/IMPL-003-v1.0.json
231
- - .task/backup/IMPL-004-v1.0.json
232
-
233
- ### Errors
234
- - IMPL-008: File not found (task may have been renamed)
235
- ```
236
-
237
- ## Examples
238
-
239
- ### Single Task - Text Input
240
- ```bash
241
- /task:replan IMPL-1 "Add OAuth2 authentication support"
242
-
243
- Processing changes...
244
- Proposed updates:
245
- + Add OAuth2 integration
246
- + Update authentication flow
247
-
248
- # Use AskUserQuestion for confirmation
249
- AskUserQuestion({
250
- questions: [{
251
- question: "Do you want to apply these changes to the task?",
252
- header: "Apply",
253
- options: [
254
- { label: "Yes, apply", description: "Create new version with these changes." },
255
- { label: "No, cancel", description: "Discard changes and keep current version." }
256
- ],
257
- multiSelect: false
258
- }]
259
- })
260
-
261
- User selected: "Yes, apply"
262
-
263
- Version 1.2 created
264
- Context updated
265
- Backup saved to .task/backup/IMPL-1-v1.1.json
266
- ```
267
-
268
- ### Single Task - File Input
269
- ```bash
270
- /task:replan IMPL-2 requirements.md
271
-
272
- Loading requirements.md...
273
- Applying specification changes...
274
-
275
- Task updated with new requirements
276
- Version 1.1 created
277
- Backup saved to .task/backup/IMPL-2-v1.0.json
278
- ```
279
-
280
- ### Batch Mode - From Verification Report
281
- ```bash
282
- /task:replan --batch .workflow/active/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md
283
-
284
- Parsing verification report...
285
- Found 4 tasks requiring replanning:
286
- - IMPL-002: Add FR-12 draft saving acceptance criteria
287
- - IMPL-003: Add FR-14 history tracking acceptance criteria
288
- - IMPL-004: Add FR-09 response surface explicit coverage
289
- - IMPL-008: Add NFR performance validation steps
290
-
291
- Creating task tracking list...
292
-
293
- Processing IMPL-002...
294
- Backup created: .task/backup/IMPL-002-v1.0.json
295
- Updated to v1.1
296
-
297
- Processing IMPL-003...
298
- Backup created: .task/backup/IMPL-003-v1.0.json
299
- Updated to v1.1
300
-
301
- Processing IMPL-004...
302
- Backup created: .task/backup/IMPL-004-v1.0.json
303
- Updated to v1.1
304
-
305
- Processing IMPL-008...
306
- Backup created: .task/backup/IMPL-008-v1.0.json
307
- Updated to v1.1
308
-
309
- Batch replan completed: 4/4 successful
310
- Summary report saved
311
- ```
312
-
313
- ### Batch Mode - Auto-detection
314
- ```bash
315
- # If file contains "Action Plan Verification Report", auto-enters batch mode
316
- /task:replan ACTION_PLAN_VERIFICATION.md
317
-
318
- Detected verification report format
319
- Entering batch mode...
320
- [same as above]
321
- ```
322
-
323
- ## Error Handling
324
-
325
- ### Single Task Errors
326
- ```bash
327
- # Task not found
328
- Task IMPL-5 not found
329
- Check task ID with /workflow:status
330
-
331
- # Task completed
332
- Task IMPL-1 is completed (cannot replan)
333
- Create new task for additional work
334
-
335
- # File not found
336
- File requirements.md not found
337
- Check file path
338
-
339
- # No input provided
340
- Please specify changes needed
341
- Provide text, file, or verification report
342
- ```
343
-
344
- ### Batch Mode Errors
345
- ```bash
346
- # Invalid verification report
347
- File does not contain valid verification report format
348
- Check report structure or use single task mode
349
-
350
- # Partial failures
351
- Batch completed with errors: 3/4 successful
352
- Review error details in summary report
353
-
354
- # No replan recommendations found
355
- Verification report contains no replan recommendations
356
- Check report content or use /workflow:action-plan-verify first
357
- ```
358
-
359
- ## Batch Mode Integration
360
-
361
- ### Input Format Expectations
362
- Batch mode parses verification reports looking for:
363
-
364
- 1. **Required Actions Section**: Commands like `/task:replan IMPL-X "changes"`
365
- 2. **Findings Table**: Task IDs with recommendations
366
- 3. **Next Actions Section**: Specific replan commands
367
-
368
- **Example Patterns**:
369
- ```markdown
370
- #### 1. HIGH Priority - Address FR Coverage Gaps
371
- /task:replan IMPL-004 "
372
- Add explicit acceptance criteria:
373
- - FR-09: Response surface 3D visualization
374
- "
375
-
376
- #### 2. MEDIUM Priority - Enhance NFR Coverage
377
- /task:replan IMPL-008 "
378
- Add performance testing:
379
- - NFR-01: Load test API endpoints
380
- "
381
- ```
382
-
383
- ### Extraction Logic
384
- 1. Scan for `/task:replan` commands in report
385
- 2. Extract task ID and change description
386
- 3. Group by priority (HIGH, MEDIUM, LOW)
387
- 4. Process in priority order with TodoWrite tracking
388
-
389
- ### Confirmation Behavior
390
- - **Default**: Confirm each task before applying
391
- - **With `--auto-confirm`**: Apply all changes without prompting
392
- ```bash
393
- /task:replan --batch report.md --auto-confirm
394
- ```
395
-
396
- ## Implementation Details
397
-
398
- ### Backup Management
399
- ```typescript
400
- // Backup file naming convention
401
- const backupPath = `.task/backup/${taskId}-v${previousVersion}.json`;
402
-
403
- // Backup metadata in task JSON
404
- {
405
- "replan_history": [
406
- {
407
- "version": "1.2",
408
- "timestamp": "2025-10-17T10:30:00Z",
409
- "reason": "Add FR-09 explicit coverage",
410
- "input_source": "batch_verification_report",
411
- "backup_location": ".task/backup/IMPL-004-v1.1.json"
412
- }
413
- ]
414
- }
415
- ```
416
-
417
- ### TodoWrite Integration
418
- ```typescript
419
- // Initialize tracking for batch mode
420
- TodoWrite({
421
- todos: taskList.map(task => ({
422
- content: `${task.id}: ${task.changeDescription}`,
423
- status: "pending",
424
- activeForm: `Replanning ${task.id}`
425
- }))
426
- });
427
-
428
- // Update progress during processing
429
- TodoWrite({
430
- todos: updateTaskStatus(taskId, "in_progress")
431
- });
432
-
433
- // Mark completed
434
- TodoWrite({
435
- todos: updateTaskStatus(taskId, "completed")
436
- });
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
+ });
437
441
  ```