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
@@ -3,6 +3,7 @@ name: plan
3
3
  description: 5-phase planning workflow with action-planning-agent task generation, outputs IMPL_PLAN.md and task JSONs
4
4
  argument-hint: "[-y|--yes] \"text description\"|file.md"
5
5
  allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
6
+ group: workflow
6
7
  ---
7
8
 
8
9
  ## Auto Mode
@@ -115,7 +116,38 @@ CONTEXT: Existing user database schema, REST API endpoints
115
116
 
116
117
  **TodoWrite**: Mark phase 1 completed, phase 2 in_progress
117
118
 
118
- **After Phase 1**: Return to user showing Phase 1 results, then auto-continue to Phase 2
119
+ **After Phase 1**: Initialize planning-notes.md with user intent
120
+
121
+ ```javascript
122
+ // Create minimal planning notes document
123
+ const planningNotesPath = `.workflow/active/${sessionId}/planning-notes.md`
124
+ const userGoal = structuredDescription.goal
125
+ const userConstraints = structuredDescription.context || "None specified"
126
+
127
+ Write(planningNotesPath, `# Planning Notes
128
+
129
+ **Session**: ${sessionId}
130
+ **Created**: ${new Date().toISOString()}
131
+
132
+ ## User Intent (Phase 1)
133
+
134
+ - **GOAL**: ${userGoal}
135
+ - **KEY_CONSTRAINTS**: ${userConstraints}
136
+
137
+ ---
138
+
139
+ ## Context Findings (Phase 2)
140
+ (To be filled by context-gather)
141
+
142
+ ## Conflict Decisions (Phase 3)
143
+ (To be filled if conflicts detected)
144
+
145
+ ## Consolidated Constraints (Phase 4 Input)
146
+ 1. ${userConstraints}
147
+ `)
148
+ ```
149
+
150
+ Return to user showing Phase 1 results, then auto-continue to Phase 2
119
151
 
120
152
  ---
121
153
 
@@ -138,6 +170,7 @@ SlashCommand(command="/workflow:tools:context-gather --session [sessionId] \"[st
138
170
  **Validation**:
139
171
  - Context package path extracted
140
172
  - File exists and is valid JSON
173
+ - `prioritized_context` field exists
141
174
 
142
175
  <!-- TodoWrite: When context-gather executed, INSERT 3 context-gather tasks, mark first as in_progress -->
143
176
 
@@ -168,7 +201,37 @@ SlashCommand(command="/workflow:tools:context-gather --session [sessionId] \"[st
168
201
 
169
202
  **Note**: Phase 2 tasks completed and collapsed to summary.
170
203
 
171
- **After Phase 2**: Return to user showing Phase 2 results, then auto-continue to Phase 3/4 (depending on conflict_risk)
204
+ **After Phase 2**: Update planning-notes.md with context findings, then auto-continue
205
+
206
+ ```javascript
207
+ // Read context-package to extract key findings
208
+ const contextPackage = JSON.parse(Read(contextPath))
209
+ const conflictRisk = contextPackage.conflict_detection?.risk_level || 'low'
210
+ const criticalFiles = (contextPackage.exploration_results?.aggregated_insights?.critical_files || [])
211
+ .slice(0, 5).map(f => f.path)
212
+ const archPatterns = contextPackage.project_context?.architecture_patterns || []
213
+ const constraints = contextPackage.exploration_results?.aggregated_insights?.constraints || []
214
+
215
+ // Append Phase 2 findings to planning-notes.md
216
+ Edit(planningNotesPath, {
217
+ old: '## Context Findings (Phase 2)\n(To be filled by context-gather)',
218
+ new: `## Context Findings (Phase 2)
219
+
220
+ - **CRITICAL_FILES**: ${criticalFiles.join(', ') || 'None identified'}
221
+ - **ARCHITECTURE**: ${archPatterns.join(', ') || 'Not detected'}
222
+ - **CONFLICT_RISK**: ${conflictRisk}
223
+ - **CONSTRAINTS**: ${constraints.length > 0 ? constraints.join('; ') : 'None'}`
224
+ })
225
+
226
+ // Append Phase 2 constraints to consolidated list
227
+ Edit(planningNotesPath, {
228
+ old: '## Consolidated Constraints (Phase 4 Input)',
229
+ new: `## Consolidated Constraints (Phase 4 Input)
230
+ ${constraints.map((c, i) => `${i + 2}. [Context] ${c}`).join('\n')}`
231
+ })
232
+ ```
233
+
234
+ Return to user showing Phase 2 results, then auto-continue to Phase 3/4 (depending on conflict_risk)
172
235
 
173
236
  ---
174
237
 
@@ -229,7 +292,45 @@ SlashCommand(command="/workflow:tools:conflict-resolution --session [sessionId]
229
292
 
230
293
  **Note**: Phase 3 tasks completed and collapsed to summary.
231
294
 
232
- **After Phase 3**: Return to user showing conflict resolution results (if executed) and selected strategies, then auto-continue to Phase 3.5
295
+ **After Phase 3**: Update planning-notes.md with conflict decisions (if executed), then auto-continue
296
+
297
+ ```javascript
298
+ // If Phase 3 was executed, update planning-notes.md
299
+ if (conflictRisk >= 'medium') {
300
+ const conflictResPath = `.workflow/active/${sessionId}/.process/conflict-resolution.json`
301
+
302
+ if (fs.existsSync(conflictResPath)) {
303
+ const conflictRes = JSON.parse(Read(conflictResPath))
304
+ const resolved = conflictRes.resolved_conflicts || []
305
+ const modifiedArtifacts = conflictRes.modified_artifacts || []
306
+ const planningConstraints = conflictRes.planning_constraints || []
307
+
308
+ // Update Phase 3 section
309
+ Edit(planningNotesPath, {
310
+ old: '## Conflict Decisions (Phase 3)\n(To be filled if conflicts detected)',
311
+ new: `## Conflict Decisions (Phase 3)
312
+
313
+ - **RESOLVED**: ${resolved.map(r => `${r.type} → ${r.strategy}`).join('; ') || 'None'}
314
+ - **MODIFIED_ARTIFACTS**: ${modifiedArtifacts.join(', ') || 'None'}
315
+ - **CONSTRAINTS**: ${planningConstraints.join('; ') || 'None'}`
316
+ })
317
+
318
+ // Append Phase 3 constraints to consolidated list
319
+ if (planningConstraints.length > 0) {
320
+ const currentNotes = Read(planningNotesPath)
321
+ const constraintCount = (currentNotes.match(/^\d+\./gm) || []).length
322
+
323
+ Edit(planningNotesPath, {
324
+ old: '## Consolidated Constraints (Phase 4 Input)',
325
+ new: `## Consolidated Constraints (Phase 4 Input)
326
+ ${planningConstraints.map((c, i) => `${constraintCount + i + 1}. [Conflict] ${c}`).join('\n')}`
327
+ })
328
+ }
329
+ }
330
+ }
331
+ ```
332
+
333
+ Return to user showing conflict resolution results (if executed) and selected strategies, then auto-continue to Phase 3.5
233
334
 
234
335
  **Memory State Check**:
235
336
  - Evaluate current context window usage and memory state
@@ -282,7 +383,12 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]"
282
383
 
283
384
  **CLI Execution Note**: CLI tool usage is now determined semantically by action-planning-agent based on user's task description. If user specifies "use Codex/Gemini/Qwen for X", the agent embeds `command` fields in relevant `implementation_approach` steps.
284
385
 
285
- **Input**: `sessionId` from Phase 1
386
+ **Input**:
387
+ - `sessionId` from Phase 1
388
+ - **planning-notes.md**: Consolidated constraints from all phases (Phase 1-3)
389
+ - Path: `.workflow/active/[sessionId]/planning-notes.md`
390
+ - Contains: User intent, context findings, conflict decisions, consolidated constraints
391
+ - **Purpose**: Provides structured, minimal context summary to action-planning-agent
286
392
 
287
393
  **Validation**:
288
394
  - `.workflow/active/[sessionId]/IMPL_PLAN.md` exists
@@ -315,20 +421,55 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]"
315
421
 
316
422
  **Note**: Agent task completed. No collapse needed (single task).
317
423
 
318
- **Return to User**:
319
- ```
320
- Planning complete for session: [sessionId]
321
- Tasks generated: [count]
322
- Plan: .workflow/active/[sessionId]/IMPL_PLAN.md
424
+ **Step 4.2: User Decision** - Choose next action
323
425
 
324
- Recommended Next Steps:
325
- 1. /workflow:plan-verify --session [sessionId] # Verify plan quality before execution
326
- 2. /workflow:status # Review task breakdown
327
- 3. /workflow:execute # Start implementation (after verification)
426
+ After Phase 4 completes, present user with action choices:
328
427
 
329
- Quality Gate: Consider running /workflow:plan-verify to catch issues early
428
+ ```javascript
429
+ console.log(`
430
+ ✅ Planning complete for session: ${sessionId}
431
+ 📊 Tasks generated: ${taskCount}
432
+ 📋 Plan: .workflow/active/${sessionId}/IMPL_PLAN.md
433
+ `);
434
+
435
+ // Ask user for next action
436
+ const userChoice = AskUserQuestion({
437
+ questions: [{
438
+ question: "Planning complete. What would you like to do next?",
439
+ header: "Next Action",
440
+ multiSelect: false,
441
+ options: [
442
+ {
443
+ label: "Verify Plan Quality (Recommended)",
444
+ description: "Run quality verification to catch issues before execution. Checks plan structure, task dependencies, and completeness."
445
+ },
446
+ {
447
+ label: "Start Execution",
448
+ description: "Begin implementing tasks immediately. Use this if you've already reviewed the plan or want to start quickly."
449
+ },
450
+ {
451
+ label: "Review Status Only",
452
+ description: "View task breakdown and session status without taking further action. You can decide what to do next manually."
453
+ }
454
+ ]
455
+ }]
456
+ });
457
+
458
+ // Execute based on user choice
459
+ if (userChoice.answers["Next Action"] === "Verify Plan Quality (Recommended)") {
460
+ console.log("\n🔍 Starting plan verification...\n");
461
+ SlashCommand(command="/workflow:plan-verify --session " + sessionId);
462
+ } else if (userChoice.answers["Next Action"] === "Start Execution") {
463
+ console.log("\n🚀 Starting task execution...\n");
464
+ SlashCommand(command="/workflow:execute --session " + sessionId);
465
+ } else if (userChoice.answers["Next Action"] === "Review Status Only") {
466
+ console.log("\n📊 Displaying session status...\n");
467
+ SlashCommand(command="/workflow:status --session " + sessionId);
468
+ }
330
469
  ```
331
470
 
471
+ **Return to User**: Based on user's choice, execute the corresponding workflow command.
472
+
332
473
  ## TodoWrite Pattern
333
474
 
334
475
  **Core Concept**: Dynamic task attachment and collapse for real-time visibility into workflow execution.
@@ -404,26 +545,21 @@ User Input (task description)
404
545
 
405
546
  Phase 1: session:start --auto "structured-description"
406
547
  ↓ Output: sessionId
407
- Session Memory: Previous tasks, context, artifacts
548
+ Write: planning-notes.md (User Intent section)
408
549
 
409
550
  Phase 2: context-gather --session sessionId "structured-description"
410
- ↓ Input: sessionId + session memory + structured description
411
- ↓ Output: contextPath (context-package.json) + conflict_risk
551
+ ↓ Input: sessionId + structured description
552
+ ↓ Output: contextPath (context-package.json with prioritized_context) + conflict_risk
553
+ ↓ Update: planning-notes.md (Context Findings + Consolidated Constraints)
412
554
 
413
555
  Phase 3: conflict-resolution [AUTO-TRIGGERED if conflict_risk ≥ medium]
414
556
  ↓ Input: sessionId + contextPath + conflict_risk
415
- CLI-powered conflict detection (JSON output)
416
- AskUserQuestion: Present conflicts + resolution strategies
417
- ↓ User selects strategies (or skip)
418
- ↓ Apply modifications via Edit tool:
419
- ↓ - Update guidance-specification.md
420
- ↓ - Update role analyses (*.md)
421
- ↓ - Mark context-package.json as "resolved"
422
- ↓ Output: Modified brainstorm artifacts (NO report file)
557
+ Output: Modified brainstorm artifacts
558
+ Update: planning-notes.md (Conflict Decisions + Consolidated Constraints)
423
559
  ↓ Skip if conflict_risk is none/low → proceed directly to Phase 4
424
560
 
425
561
  Phase 4: task-generate-agent --session sessionId
426
- ↓ Input: sessionId + resolved brainstorm artifacts + session memory
562
+ ↓ Input: sessionId + planning-notes.md + context-package.json + brainstorm artifacts
427
563
  ↓ Output: IMPL_PLAN.md, task JSONs, TODO_LIST.md
428
564
 
429
565
  Return summary to user
@@ -113,7 +113,40 @@ const taskId = taskIdMatch?.[1]
113
113
  - List existing tasks
114
114
  - Read `IMPL_PLAN.md` and `TODO_LIST.md`
115
115
 
116
- **Output**: Session validated, context loaded, mode determined
116
+ 4. **Parse Execution Intent** (from requirements text):
117
+ ```javascript
118
+ // Dynamic tool detection from cli-tools.json
119
+ // Read enabled tools: ["gemini", "qwen", "codex", ...]
120
+ const enabledTools = loadEnabledToolsFromConfig(); // See ~/.claude/cli-tools.json
121
+
122
+ // Build dynamic patterns from enabled tools
123
+ function buildExecPatterns(tools) {
124
+ const patterns = {
125
+ agent: /改为\s*Agent\s*执行|使用\s*Agent\s*执行/i
126
+ };
127
+ tools.forEach(tool => {
128
+ // Pattern: "使用 {tool} 执行" or "改用 {tool}"
129
+ patterns[`cli_${tool}`] = new RegExp(
130
+ `使用\\s*(${tool})\\s*执行|改用\\s*(${tool})`, 'i'
131
+ );
132
+ });
133
+ return patterns;
134
+ }
135
+
136
+ const execPatterns = buildExecPatterns(enabledTools);
137
+
138
+ let executionIntent = null
139
+ for (const [key, pattern] of Object.entries(execPatterns)) {
140
+ if (pattern.test(requirements)) {
141
+ executionIntent = key.startsWith('cli_')
142
+ ? { method: 'cli', cli_tool: key.replace('cli_', '') }
143
+ : { method: 'agent', cli_tool: null }
144
+ break
145
+ }
146
+ }
147
+ ```
148
+
149
+ **Output**: Session validated, context loaded, mode determined, **executionIntent parsed**
117
150
 
118
151
  ---
119
152
 
@@ -356,7 +389,18 @@ const updated_task = {
356
389
  flow_control: {
357
390
  ...task.flow_control,
358
391
  implementation_approach: [...updated_steps]
359
- }
392
+ },
393
+ // Update execution config if intent detected
394
+ ...(executionIntent && {
395
+ meta: {
396
+ ...task.meta,
397
+ execution_config: {
398
+ method: executionIntent.method,
399
+ cli_tool: executionIntent.cli_tool,
400
+ enable_resume: executionIntent.method !== 'agent'
401
+ }
402
+ }
403
+ })
360
404
  };
361
405
 
362
406
  Write({
@@ -365,6 +409,8 @@ Write({
365
409
  });
366
410
  ```
367
411
 
412
+ **Note**: Implementation approach steps are NO LONGER modified. CLI execution is controlled by task-level `meta.execution_config` only.
413
+
368
414
  **Step 5.4: Create New Tasks** (if needed)
369
415
 
370
416
  Generate complete task JSON with all required fields:
@@ -570,3 +616,33 @@ A: 是,需要同步更新依赖任务
570
616
 
571
617
  任务重规划完成! 更新 2 个任务
572
618
  ```
619
+
620
+ ### Task Replan - Change Execution Method
621
+
622
+ ```bash
623
+ /workflow:replan IMPL-001 "改用 Codex 执行"
624
+
625
+ # Semantic parsing detects executionIntent:
626
+ # { method: 'cli', cli_tool: 'codex' }
627
+
628
+ # Execution (no interactive questions needed)
629
+ ✓ 创建备份
630
+ ✓ 更新 IMPL-001.json
631
+ - meta.execution_config = { method: 'cli', cli_tool: 'codex', enable_resume: true }
632
+
633
+ 任务执行方式已更新: Agent → CLI (codex)
634
+ ```
635
+
636
+ ```bash
637
+ /workflow:replan IMPL-002 "改为 Agent 执行"
638
+
639
+ # Semantic parsing detects executionIntent:
640
+ # { method: 'agent', cli_tool: null }
641
+
642
+ # Execution
643
+ ✓ 创建备份
644
+ ✓ 更新 IMPL-002.json
645
+ - meta.execution_config = { method: 'agent', cli_tool: null }
646
+
647
+ 任务执行方式已更新: CLI → Agent
648
+ ```
@@ -1,26 +1,26 @@
1
1
  ---
2
- name: review-fix
2
+ name: review-cycle-fix
3
3
  description: Automated fixing of code review findings with AI-powered planning and coordinated execution. Uses intelligent grouping, multi-stage timeline coordination, and test-driven verification.
4
4
  argument-hint: "<export-file|review-dir> [--resume] [--max-iterations=N]"
5
5
  allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Task(*), Edit(*), Write(*)
6
6
  ---
7
7
 
8
- # Workflow Review-Fix Command
8
+ # Workflow Review-Cycle-Fix Command
9
9
 
10
10
  ## Quick Start
11
11
 
12
12
  ```bash
13
13
  # Fix from exported findings file (session-based path)
14
- /workflow:review-fix .workflow/active/WFS-123/.review/fix-export-1706184622000.json
14
+ /workflow:review-cycle-fix .workflow/active/WFS-123/.review/fix-export-1706184622000.json
15
15
 
16
16
  # Fix from review directory (auto-discovers latest export)
17
- /workflow:review-fix .workflow/active/WFS-123/.review/
17
+ /workflow:review-cycle-fix .workflow/active/WFS-123/.review/
18
18
 
19
19
  # Resume interrupted fix session
20
- /workflow:review-fix --resume
20
+ /workflow:review-cycle-fix --resume
21
21
 
22
22
  # Custom max retry attempts per finding
23
- /workflow:review-fix .workflow/active/WFS-123/.review/ --max-iterations=5
23
+ /workflow:review-cycle-fix .workflow/active/WFS-123/.review/ --max-iterations=5
24
24
  ```
25
25
 
26
26
  **Fix Source**: Exported findings from review cycle dashboard
@@ -764,8 +764,8 @@ After completing a module review, use the generated findings JSON for automated
764
764
  /workflow:review-module-cycle src/auth/**
765
765
 
766
766
  # Step 2: Run automated fixes using dimension findings
767
- /workflow:review-fix .workflow/active/WFS-{session-id}/.review/
767
+ /workflow:review-cycle-fix .workflow/active/WFS-{session-id}/.review/
768
768
  ```
769
769
 
770
- See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
770
+ See `/workflow:review-cycle-fix` for automated fixing with smart grouping, parallel execution, and test verification.
771
771
 
@@ -775,8 +775,8 @@ After completing a review, use the generated findings JSON for automated fixing:
775
775
  /workflow:review-session-cycle
776
776
 
777
777
  # Step 2: Run automated fixes using dimension findings
778
- /workflow:review-fix .workflow/active/WFS-{session-id}/.review/
778
+ /workflow:review-cycle-fix .workflow/active/WFS-{session-id}/.review/
779
779
  ```
780
780
 
781
- See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
781
+ See `/workflow:review-cycle-fix` for automated fixing with smart grouping, parallel execution, and test verification.
782
782
 
@@ -25,10 +25,10 @@ Analyzes conflicts between implementation plans and existing codebase, **includi
25
25
  | Responsibility | Description |
26
26
  |---------------|-------------|
27
27
  | **Detect Conflicts** | Analyze plan vs existing code inconsistencies |
28
- | **Scenario Uniqueness** | **NEW**: Search and compare new modules with existing modules for functional overlaps |
28
+ | **Scenario Uniqueness** | Search and compare new modules with existing modules for functional overlaps |
29
29
  | **Generate Strategies** | Provide 2-4 resolution options per conflict |
30
- | **Iterative Clarification** | **NEW**: Ask unlimited questions until scenario boundaries are clear and unique |
31
- | **Agent Re-analysis** | **NEW**: Dynamically update strategies based on user clarifications |
30
+ | **Iterative Clarification** | Ask unlimited questions until scenario boundaries are clear and unique |
31
+ | **Agent Re-analysis** | Dynamically update strategies based on user clarifications |
32
32
  | **CLI Analysis** | Use Gemini/Qwen (Claude fallback) |
33
33
  | **User Decision** | Present options ONE BY ONE, never auto-apply |
34
34
  | **Direct Text Output** | Output questions via text directly, NEVER use bash echo/printf |
@@ -57,7 +57,7 @@ Analyzes conflicts between implementation plans and existing codebase, **includi
57
57
  - Breaking updates
58
58
 
59
59
  ### 5. Module Scenario Overlap
60
- - **NEW**: Functional overlap between new and existing modules
60
+ - Functional overlap between new and existing modules
61
61
  - Scenario boundary ambiguity
62
62
  - Duplicate responsibility detection
63
63
  - Module merge/split decisions
@@ -134,7 +134,7 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
134
134
  ### 1. Load Context
135
135
  - Read existing files from conflict_detection.existing_files
136
136
  - Load plan from .workflow/active/{session_id}/.process/context-package.json
137
- - **NEW**: Load exploration_results and use aggregated_insights for enhanced analysis
137
+ - Load exploration_results and use aggregated_insights for enhanced analysis
138
138
  - Extract role analyses and requirements
139
139
 
140
140
  ### 2. Execute CLI Analysis (Enhanced with Exploration + Scenario Uniqueness)
@@ -186,28 +186,18 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
186
186
  - modifications.old_content: 20-100 chars for unique Edit tool matching
187
187
  - modifications.new_content: preserves markdown formatting
188
188
  - modification_suggestions: 2-5 actionable suggestions for custom handling
189
- `)
190
- ```
191
189
 
192
- **Agent Internal Flow** (Enhanced):
193
- ```
194
- 1. Load context package
195
- 2. Check conflict_risk (exit if none/low)
196
- 3. Read existing files + plan artifacts
197
- 4. Run CLI analysis (Gemini→Qwen→Claude) with enhanced tasks:
198
- - Standard conflict detection (Architecture/API/Data/Dependency)
199
- - **NEW: Module scenario uniqueness detection**
200
- * Extract new module functionality from plan
201
- * Search all existing modules with similar keywords/functionality
202
- * Compare scenario coverage and responsibilities
203
- * Identify functional overlaps and boundary ambiguities
204
- * Generate ModuleOverlap conflicts with overlap_analysis
205
- 5. Parse conflict findings (including ModuleOverlap category)
206
- 6. Generate 2-4 strategies per conflict:
207
- - Include modifications for each strategy
208
- - **For ModuleOverlap**: Add clarification_needed questions for boundary definition
209
- 7. Return JSON to stdout (NOT file write)
210
- 8. Return execution log path
190
+ ### 5. Planning Notes Record (REQUIRED)
191
+ After analysis complete, append a brief execution record to planning-notes.md:
192
+
193
+ **File**: .workflow/active/{session_id}/planning-notes.md
194
+ **Location**: Under "## Conflict Decisions (Phase 3)" section
195
+ **Format**:
196
+ \`\`\`
197
+ ### [Conflict-Resolution Agent] YYYY-MM-DD
198
+ - **Note**: [智能补充:简短总结冲突类型、解决策略、关键决策等]
199
+ \`\`\`
200
+ `)
211
201
  ```
212
202
 
213
203
  ### Phase 3: User Interaction Loop