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,1044 +0,0 @@
1
- ---
2
- name: develop-with-file
3
- description: Multi-agent development workflow with documented progress, Gemini-guided planning, and incremental iteration support
4
- argument-hint: "[-y|--yes] \"feature description or task file.md\""
5
- allowed-tools: TodoWrite(*), Task(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*)
6
- ---
7
-
8
- ## Auto Mode
9
-
10
- When `--yes` or `-y`: Auto-confirm all decisions (exploration, planning, execution, verification), use recommended settings.
11
-
12
- # Workflow Develop-With-File Command (/workflow:develop-with-file)
13
-
14
- ## Overview
15
-
16
- Production-grade development workflow with **2-document state tracking**. Combines multi-agent parallel exploration, Gemini-assisted planning/verification, and incremental iteration in a single coherent workflow.
17
-
18
- **Core workflow**: Explore → Plan → Execute → Verify → Iterate
19
-
20
- **Key features**:
21
- - **progress.md**: Single source of truth for exploration, planning, execution timeline
22
- - **plan.json**: Current execution plan (derived from progress.md)
23
- - **Multi-agent exploration**: Parallel cli-explore-agents from multiple angles
24
- - **Multi-CLI execution**: Support gemini/codex/agent per task
25
- - **Gemini-guided planning**: Intelligent task decomposition and validation
26
- - **Gemini verification**: Post-execution review and correction
27
- - **Incremental iteration**: Resume from any phase, add new tasks dynamically
28
-
29
- ## Usage
30
-
31
- ```bash
32
- /workflow:develop-with-file [FLAGS] <TASK_DESCRIPTION>
33
-
34
- # Flags
35
- -e, --explore Force exploration phase
36
- --resume <session-id> Resume existing session
37
-
38
- # Arguments
39
- <task-description> Feature description or path to .md file (required)
40
- ```
41
-
42
- ## Execution Process
43
-
44
- ```
45
- Session Detection:
46
- ├─ Check if session exists (--resume or auto-detect)
47
- ├─ EXISTS → Continue mode (read progress.md for current phase)
48
- └─ NOT_FOUND → Explore mode
49
-
50
- Explore Mode (Multi-Agent):
51
- ├─ Assess task complexity (Low/Medium/High)
52
- ├─ Launch 1-4 parallel cli-explore-agents (angle-based)
53
- ├─ Aggregate exploration results
54
- ├─ Document in progress.md → Exploration section
55
- └─ Transition → Plan mode
56
-
57
- Plan Mode (Gemini-Guided):
58
- ├─ Read progress.md exploration findings
59
- ├─ Invoke Gemini for task decomposition
60
- ├─ Generate plan.json (2-7 tasks with dependencies)
61
- ├─ Assign executor per task (gemini/codex/agent)
62
- ├─ Document in progress.md → Planning section
63
- ├─ User confirmation (Allow/Modify/Cancel)
64
- └─ Transition → Execute mode
65
-
66
- Execute Mode (Multi-Agent/CLI):
67
- ├─ For each task in plan.json:
68
- │ ├─ Check dependencies (wait if needed)
69
- │ ├─ Execute via assigned executor (agent/gemini/codex)
70
- │ ├─ Document progress in progress.md → Execution section
71
- │ └─ Handle failures (retry/skip/abort)
72
- ├─ Aggregate execution results
73
- └─ Transition → Verify mode
74
-
75
- Verify Mode (Gemini-Assisted):
76
- ├─ Invoke Gemini CLI for code review
77
- ├─ Analyze: correctness, style, potential issues
78
- ├─ Document in progress.md → Verification section
79
- ├─ Decision:
80
- │ ├─ All passed → Complete
81
- │ ├─ Minor issues → Document corrections, iterate
82
- │ └─ Major issues → Rollback, re-plan
83
- └─ Transition → Iterate or Complete
84
-
85
- Iterate Mode (Incremental):
86
- ├─ User provides new requirements or fixes
87
- ├─ Read progress.md for current state
88
- ├─ Gemini analyzes delta (what changed?)
89
- ├─ Generate incremental tasks, append to plan.json
90
- ├─ Update progress.md → New iteration section
91
- └─ Transition → Execute mode (incremental tasks only)
92
- ```
93
-
94
- ## Implementation
95
-
96
- ### Session Setup & Mode Detection
97
-
98
- ```javascript
99
- const getUtc8ISOString = () => new Date(Date.now() + 8 * 60 * 60 * 1000).toISOString()
100
-
101
- const taskSlug = task_description.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 40)
102
- const dateStr = getUtc8ISOString().substring(0, 10)
103
-
104
- const sessionId = flags.resume || `DEV-${taskSlug}-${dateStr}`
105
- const sessionFolder = `.workflow/.develop/${sessionId}`
106
- const progressPath = `${sessionFolder}/progress.md`
107
- const planPath = `${sessionFolder}/plan.json`
108
-
109
- // Auto-detect mode
110
- const sessionExists = fs.existsSync(sessionFolder)
111
- const hasProgress = sessionExists && fs.existsSync(progressPath)
112
- const hasPlan = sessionExists && fs.existsSync(planPath)
113
-
114
- let mode = 'explore'
115
- if (hasProgress) {
116
- const progress = Read(progressPath)
117
- // Parse progress.md to determine current phase
118
- if (progress.includes('## Verification Results')) mode = 'iterate'
119
- else if (progress.includes('## Execution Timeline')) mode = 'verify'
120
- else if (progress.includes('## Planning Results')) mode = 'execute'
121
- else if (progress.includes('## Exploration Results')) mode = 'plan'
122
- }
123
-
124
- if (!sessionExists) {
125
- bash(`mkdir -p ${sessionFolder}`)
126
- }
127
-
128
- console.log(`
129
- ## Session Info
130
- - Session ID: ${sessionId}
131
- - Mode: ${mode}
132
- - Folder: ${sessionFolder}
133
- `)
134
- ```
135
-
136
- ---
137
-
138
- ### Explore Mode (Multi-Agent Parallel)
139
-
140
- **Step 1.1: Complexity Assessment**
141
-
142
- ```javascript
143
- // Analyze task complexity based on:
144
- // - Scope: How many systems/modules affected?
145
- // - Depth: Surface change vs architectural impact?
146
- // - Risk: Potential for breaking existing functionality?
147
- // - Dependencies: How interconnected is the change?
148
-
149
- const complexity = analyzeTaskComplexity(task_description)
150
- // Returns: 'Low' (1 angle) | 'Medium' (2-3 angles) | 'High' (4 angles)
151
-
152
- const ANGLE_PRESETS = {
153
- architecture: ['architecture', 'dependencies', 'modularity', 'integration-points'],
154
- feature: ['patterns', 'integration-points', 'testing', 'dependencies'],
155
- bugfix: ['error-handling', 'dataflow', 'state-management', 'edge-cases'],
156
- refactor: ['code-quality', 'patterns', 'dependencies', 'testing']
157
- }
158
-
159
- function selectAngles(taskDescription, complexity) {
160
- const text = taskDescription.toLowerCase()
161
- let preset = 'feature' // default
162
-
163
- if (/refactor|architect|restructure/.test(text)) preset = 'architecture'
164
- else if (/fix|bug|error|issue/.test(text)) preset = 'bugfix'
165
- else if (/clean|improve|simplify/.test(text)) preset = 'refactor'
166
-
167
- const count = complexity === 'High' ? 4 : (complexity === 'Medium' ? 3 : 1)
168
- return ANGLE_PRESETS[preset].slice(0, count)
169
- }
170
-
171
- const selectedAngles = selectAngles(task_description, complexity)
172
- ```
173
-
174
- **Step 1.2: Launch Parallel Explorations**
175
-
176
- ```javascript
177
- // Launch agents with pre-assigned angles
178
- const explorationTasks = selectedAngles.map((angle, index) =>
179
- Task(
180
- subagent_type="cli-explore-agent",
181
- run_in_background=false, // ⚠️ MANDATORY: Must wait for results
182
- description=`Explore: ${angle}`,
183
- prompt=`
184
- ## Task Objective
185
- Execute **${angle}** exploration for development planning context.
186
-
187
- ## Assigned Context
188
- - **Exploration Angle**: ${angle}
189
- - **Task Description**: ${task_description}
190
- - **Output File**: ${sessionFolder}/exploration-${angle}.json
191
-
192
- ## MANDATORY FIRST STEPS
193
- 1. cat ~/.claude/workflows/cli-templates/schemas/explore-json-schema.json (schema)
194
- 2. ccw tool exec get_modules_by_depth '{}' (project structure)
195
- 3. Read .workflow/project-tech.json (tech stack)
196
- 4. Read .workflow/project-guidelines.json (constraints)
197
-
198
- ## Exploration Strategy (${angle} focus)
199
-
200
- **Structural Scan** (Bash):
201
- - get_modules_by_depth.sh → modules related to ${angle}
202
- - rg -l "{keywords}" --type ts → locate relevant files
203
- - Analyze imports/dependencies from ${angle} perspective
204
-
205
- **Semantic Analysis** (Gemini CLI):
206
- - ccw cli -p "PURPOSE: Analyze ${angle} aspect for: ${task_description}
207
- TASK: • Identify ${angle} patterns • Locate integration points • List constraints
208
- MODE: analysis
209
- CONTEXT: @**/* | Task: ${task_description}
210
- EXPECTED: ${angle} findings with file:line references
211
- CONSTRAINTS: Focus on ${angle}" --tool gemini --mode analysis
212
-
213
- **Output**: ${sessionFolder}/exploration-${angle}.json (follow schema)
214
-
215
- ## Required Fields
216
- - project_structure: ${angle}-relevant modules
217
- - relevant_files: [{path, relevance (0-1), rationale}]
218
- - patterns: ${angle} patterns with code examples
219
- - integration_points: Where to integrate (file:line)
220
- - constraints: ${angle}-specific limitations
221
- - clarification_needs: [{question, context, options, recommended}]
222
- - _metadata.exploration_angle: "${angle}"
223
-
224
- ## Success Criteria
225
- - Schema validated
226
- - ≥3 relevant files with rationale
227
- - Integration points with file:line
228
- - Actionable patterns (code examples)
229
- - JSON output matches schema
230
- `
231
- )
232
- )
233
-
234
- // Execute all explorations
235
- ```
236
-
237
- **Step 1.3: Aggregate Exploration Results**
238
-
239
- ```javascript
240
- // Auto-discover exploration files
241
- const explorationFiles = bash(`find ${sessionFolder} -name "exploration-*.json" -type f`)
242
- .split('\n')
243
- .filter(f => f.trim())
244
-
245
- const explorations = explorationFiles.map(file => {
246
- const data = JSON.parse(Read(file))
247
- return {
248
- angle: data._metadata.exploration_angle,
249
- data: data
250
- }
251
- })
252
-
253
- // Aggregate clarification needs
254
- const allClarifications = []
255
- explorations.forEach(exp => {
256
- if (exp.data.clarification_needs?.length > 0) {
257
- exp.data.clarification_needs.forEach(need => {
258
- allClarifications.push({ ...need, source_angle: exp.angle })
259
- })
260
- }
261
- })
262
-
263
- // Intelligent deduplication
264
- const dedupedClarifications = intelligentMerge(allClarifications)
265
-
266
- // Multi-round clarification (max 4 questions per round)
267
- if (dedupedClarifications.length > 0) {
268
- const BATCH_SIZE = 4
269
- for (let i = 0; i < dedupedClarifications.length; i += BATCH_SIZE) {
270
- const batch = dedupedClarifications.slice(i, i + BATCH_SIZE)
271
- AskUserQuestion({
272
- questions: batch.map(need => ({
273
- question: `[${need.source_angle}] ${need.question}`,
274
- header: need.source_angle.substring(0, 12),
275
- multiSelect: false,
276
- options: need.options.map((opt, idx) => ({
277
- label: need.recommended === idx ? `${opt} ★` : opt,
278
- description: need.recommended === idx ? "Recommended" : `Use ${opt}`
279
- }))
280
- }))
281
- })
282
- }
283
- }
284
- ```
285
-
286
- **Step 1.4: Document in progress.md**
287
-
288
- Create or update `progress.md`:
289
-
290
- ```markdown
291
- # Development Progress
292
-
293
- **Session ID**: ${sessionId}
294
- **Task Description**: ${task_description}
295
- **Started**: ${getUtc8ISOString()}
296
- **Complexity**: ${complexity}
297
-
298
- ---
299
-
300
- ## Exploration Results
301
-
302
- ### Exploration Summary (${getUtc8ISOString()})
303
-
304
- **Angles Explored**: ${selectedAngles.join(', ')}
305
- **Exploration Count**: ${explorations.length}
306
-
307
- ${explorations.map(exp => `
308
- #### ${exp.angle.toUpperCase()}
309
-
310
- **Relevant Files** (top 5):
311
- ${exp.data.relevant_files.slice(0, 5).map(f =>
312
- `- ${f.path} (${(f.relevance * 100).toFixed(0)}%) - ${f.rationale}`
313
- ).join('\n')}
314
-
315
- **Integration Points**:
316
- ${exp.data.integration_points.map(p => `- ${p}`).join('\n')}
317
-
318
- **Patterns**:
319
- ${exp.data.patterns.map(p => `- ${p}`).join('\n')}
320
-
321
- **Constraints**:
322
- ${exp.data.constraints.map(c => `- ${c}`).join('\n')}
323
- `).join('\n')}
324
-
325
- ### Clarifications Collected
326
-
327
- ${dedupedClarifications.length > 0 ? dedupedClarifications.map((c, i) => `
328
- ${i+1}. **[${c.source_angle}]** ${c.question}
329
- - Answer: ${c.user_answer || 'Pending'}
330
- `).join('\n') : 'No clarifications needed'}
331
-
332
- ---
333
-
334
- ## Current State
335
-
336
- **Phase**: Exploration complete, ready for planning
337
- **Next Steps**: Invoke Gemini for task decomposition
338
- ```
339
-
340
- ---
341
-
342
- ### Plan Mode (Gemini-Guided)
343
-
344
- **Step 2.1: Gemini-Assisted Planning**
345
-
346
- ```bash
347
- ccw cli -p "
348
- PURPOSE: Generate implementation plan for: ${task_description}
349
- Success criteria: 2-7 structured tasks with clear dependencies, executor assignments
350
-
351
- TASK:
352
- • Read progress.md exploration findings (all angles)
353
- • Analyze task requirements and constraints
354
- • Decompose into 2-7 substantial tasks (15-60min each)
355
- • Assign executor per task (gemini/codex/agent) based on:
356
- - User explicit mention (\"use gemini for X\")
357
- - Task nature (analysis → gemini, implementation → agent, git-aware → codex)
358
- - Default → agent
359
- • Define true dependencies only (Task B needs Task A's output)
360
- • Group by feature/module, NOT by file
361
-
362
- MODE: analysis
363
-
364
- CONTEXT: @${progressPath} | Exploration findings in progress.md
365
-
366
- EXPECTED:
367
- - plan.json following schema (cat ~/.claude/workflows/cli-templates/schemas/plan-json-schema.json)
368
- - tasks: [{id, title, description, files, executor (gemini/codex/agent), depends_on, complexity}]
369
- - executorAssignments: {taskId: {executor, reason}}
370
- - estimated_time, complexity, summary, approach
371
-
372
- CONSTRAINTS:
373
- - Respect project-guidelines.json constraints
374
- - Prefer parallel tasks (minimal depends_on)
375
- - Group related changes into single task
376
- - Explicit executor rationale
377
- " --tool gemini --mode analysis --rule planning-breakdown-task-steps
378
- ```
379
-
380
- **Step 2.2: Parse Gemini Output → plan.json**
381
-
382
- ```javascript
383
- // Gemini returns plan structure
384
- const planFromGemini = parseGeminiOutput()
385
-
386
- const plan = {
387
- summary: planFromGemini.summary,
388
- approach: planFromGemini.approach,
389
- tasks: planFromGemini.tasks.map(t => ({
390
- id: t.id,
391
- title: t.title,
392
- description: t.description,
393
- files: t.files,
394
- executor: t.executor || 'agent', // gemini/codex/agent
395
- depends_on: t.depends_on || [],
396
- complexity: t.complexity,
397
- status: 'pending' // pending/in_progress/completed/failed
398
- })),
399
- executorAssignments: planFromGemini.executorAssignments || {},
400
- estimated_time: planFromGemini.estimated_time,
401
- complexity: complexity,
402
- _metadata: {
403
- timestamp: getUtc8ISOString(),
404
- source: 'gemini-planning',
405
- exploration_angles: selectedAngles
406
- }
407
- }
408
-
409
- Write(planPath, JSON.stringify(plan, null, 2))
410
- ```
411
-
412
- **Step 2.3: Update progress.md**
413
-
414
- Append to `progress.md`:
415
-
416
- ```markdown
417
- ## Planning Results
418
-
419
- ### Plan Generated (${getUtc8ISOString()})
420
-
421
- **Summary**: ${plan.summary}
422
- **Approach**: ${plan.approach}
423
- **Estimated Time**: ${plan.estimated_time}
424
- **Complexity**: ${plan.complexity}
425
-
426
- **Tasks** (${plan.tasks.length}):
427
-
428
- ${plan.tasks.map((t, i) => `
429
- ${i+1}. **${t.id}**: ${t.title}
430
- - Files: ${t.files.join(', ')}
431
- - Executor: ${t.executor}
432
- - Depends on: ${t.depends_on.join(', ') || 'None'}
433
- - Complexity: ${t.complexity}
434
- `).join('\n')}
435
-
436
- **Executor Assignments**:
437
- ${Object.entries(plan.executorAssignments).map(([id, assign]) =>
438
- `- ${id}: ${assign.executor} (Reason: ${assign.reason})`
439
- ).join('\n')}
440
-
441
- **Gemini Insights**:
442
- ${planFromGemini.gemini_insights || 'N/A'}
443
-
444
- ---
445
-
446
- ## Current State
447
-
448
- **Phase**: Planning complete, awaiting user confirmation
449
- **Next Steps**: User confirms → Execute tasks
450
- ```
451
-
452
- **Step 2.4: User Confirmation**
453
-
454
- ```javascript
455
- AskUserQuestion({
456
- questions: [
457
- {
458
- question: `Confirm plan? (${plan.tasks.length} tasks, ${plan.complexity})`,
459
- header: "Confirm",
460
- multiSelect: false,
461
- options: [
462
- { label: "Allow", description: "Proceed as-is" },
463
- { label: "Modify", description: "Adjust tasks/executors" },
464
- { label: "Cancel", description: "Abort workflow" }
465
- ]
466
- }
467
- ]
468
- })
469
-
470
- // If Modify → allow editing plan.json, re-confirm
471
- // If Allow → proceed to Execute mode
472
- ```
473
-
474
- ---
475
-
476
- ### Execute Mode (Multi-Agent/CLI)
477
-
478
- **Step 3.1: Task Execution Loop**
479
-
480
- ```javascript
481
- const plan = JSON.parse(Read(planPath))
482
- const completedTasks = []
483
- const failedTasks = []
484
-
485
- for (const task of plan.tasks) {
486
- // Check dependencies
487
- const depsCompleted = task.depends_on.every(depId =>
488
- completedTasks.some(t => t.id === depId)
489
- )
490
-
491
- if (!depsCompleted) {
492
- console.log(`⏸️ Task ${task.id} waiting for dependencies: ${task.depends_on.join(', ')}`)
493
- continue
494
- }
495
-
496
- console.log(`\n## Executing Task: ${task.id} (${task.executor})\n`)
497
-
498
- // Update progress.md
499
- appendToProgress(`
500
- ### Task ${task.id} - ${task.title} (${getUtc8ISOString()})
501
-
502
- **Status**: In Progress
503
- **Executor**: ${task.executor}
504
- **Files**: ${task.files.join(', ')}
505
- `)
506
-
507
- // Execute based on assigned executor
508
- try {
509
- if (task.executor === 'gemini') {
510
- // Gemini CLI execution
511
- bash(`ccw cli -p "
512
- PURPOSE: ${task.description}
513
- TASK: Implement changes in: ${task.files.join(', ')}
514
- MODE: write
515
- CONTEXT: @${task.files.join(' @')} | Memory: Task ${task.id} from ${sessionId}
516
- EXPECTED: Code implementation following project patterns
517
- CONSTRAINTS: ${task.constraints || 'Follow project-guidelines.json'}
518
- " --tool gemini --mode write --cd ${sessionFolder}`, run_in_background=true)
519
-
520
- // Wait for callback
521
-
522
- } else if (task.executor === 'codex') {
523
- // Codex CLI execution
524
- bash(`ccw cli -p "
525
- ${task.description}
526
-
527
- Files to modify: ${task.files.join(', ')}
528
- " --tool codex --mode write`, run_in_background=true)
529
-
530
- // Wait for callback
531
-
532
- } else {
533
- // Agent execution
534
- Task(
535
- subagent_type="code-developer",
536
- run_in_background=false,
537
- description=`Execute task ${task.id}`,
538
- prompt=`
539
- ## Task: ${task.title}
540
-
541
- ${task.description}
542
-
543
- ## Context from Exploration
544
- Read ${progressPath} for exploration findings relevant to:
545
- ${task.files.map(f => `- ${f}`).join('\n')}
546
-
547
- ## Files to Modify
548
- ${task.files.join('\n')}
549
-
550
- ## Constraints
551
- - Follow patterns identified in exploration
552
- - Respect project-guidelines.json
553
- - Write tests if applicable
554
-
555
- ## Success Criteria
556
- - Code compiles without errors
557
- - Tests pass (if applicable)
558
- - Follows existing code style
559
- `
560
- )
561
- }
562
-
563
- // Mark completed
564
- task.status = 'completed'
565
- completedTasks.push(task)
566
-
567
- appendToProgress(`
568
- **Status**: ✅ Completed
569
- **Output**: ${task.output || 'Code changes applied'}
570
- `)
571
-
572
- } catch (error) {
573
- task.status = 'failed'
574
- failedTasks.push(task)
575
-
576
- appendToProgress(`
577
- **Status**: ❌ Failed
578
- **Error**: ${error.message}
579
- `)
580
-
581
- // Ask user: retry/skip/abort
582
- AskUserQuestion({
583
- questions: [{
584
- question: `Task ${task.id} failed. How to proceed?`,
585
- header: "Error",
586
- multiSelect: false,
587
- options: [
588
- { label: "Retry", description: "Retry with same executor" },
589
- { label: "Skip", description: "Skip and continue" },
590
- { label: "Abort", description: "Stop workflow" }
591
- ]
592
- }]
593
- })
594
- }
595
-
596
- // Update plan.json
597
- Write(planPath, JSON.stringify(plan, null, 2))
598
- }
599
-
600
- // Final summary
601
- appendToProgress(`
602
- ---
603
-
604
- ## Execution Summary (${getUtc8ISOString()})
605
-
606
- **Total Tasks**: ${plan.tasks.length}
607
- **Completed**: ${completedTasks.length}
608
- **Failed**: ${failedTasks.length}
609
-
610
- ${failedTasks.length > 0 ? `
611
- **Failed Tasks**:
612
- ${failedTasks.map(t => `- ${t.id}: ${t.title}`).join('\n')}
613
- ` : ''}
614
-
615
- ---
616
-
617
- ## Current State
618
-
619
- **Phase**: Execution complete, ready for verification
620
- **Next Steps**: Invoke Gemini for code review
621
- `)
622
- ```
623
-
624
- ---
625
-
626
- ### Verify Mode (Gemini-Assisted)
627
-
628
- **Step 4.1: Gemini Code Review**
629
-
630
- ```bash
631
- ccw cli -p "
632
- PURPOSE: Review code changes from development session ${sessionId}
633
- Success criteria: Identify issues, validate correctness, suggest improvements
634
-
635
- TASK:
636
- • Review all modified files from execution
637
- • Check: correctness, style consistency, potential bugs, test coverage
638
- • Validate against project-guidelines.json
639
- • Provide actionable feedback with file:line references
640
-
641
- MODE: review
642
-
643
- CONTEXT: @${progressPath} | Execution results in progress.md
644
-
645
- EXPECTED:
646
- - Review report with severity levels (Critical/High/Medium/Low)
647
- - Issues with file:line references and fix suggestions
648
- - Overall quality score (1-10)
649
- - Recommendations for improvements
650
-
651
- CONSTRAINTS: Evidence-based feedback only
652
- " --tool gemini --mode review
653
- ```
654
-
655
- **Step 4.2: Parse Review Results**
656
-
657
- ```javascript
658
- const reviewResults = parseGeminiReview()
659
-
660
- const hasBlockers = reviewResults.issues.some(i => i.severity === 'Critical')
661
- const hasMajorIssues = reviewResults.issues.some(i => i.severity === 'High')
662
- ```
663
-
664
- **Step 4.3: Update progress.md**
665
-
666
- Append to `progress.md`:
667
-
668
- ```markdown
669
- ## Verification Results
670
-
671
- ### Code Review (${getUtc8ISOString()})
672
-
673
- **Reviewer**: Gemini
674
- **Quality Score**: ${reviewResults.quality_score}/10
675
-
676
- **Issues Found** (${reviewResults.issues.length}):
677
-
678
- ${reviewResults.issues.map(issue => `
679
- #### ${issue.severity}: ${issue.title}
680
- - **File**: ${issue.file}:${issue.line}
681
- - **Description**: ${issue.description}
682
- - **Suggested Fix**:
683
- \`\`\`${issue.language || 'typescript'}
684
- ${issue.suggested_fix}
685
- \`\`\`
686
- `).join('\n')}
687
-
688
- ${reviewResults.issues.length === 0 ? '✅ No issues found. Code review passed.' : ''}
689
-
690
- **Recommendations**:
691
- ${reviewResults.recommendations.map(r => `- ${r}`).join('\n')}
692
-
693
- **Gemini Analysis**:
694
- ${reviewResults.gemini_analysis}
695
-
696
- ---
697
-
698
- ## Current State
699
-
700
- **Phase**: Verification complete
701
- **Decision**: ${hasBlockers ? 'BLOCKERS FOUND - Fix required' : (hasMajorIssues ? 'Major issues - Recommend fixing' : 'PASSED - Ready to commit')}
702
- ```
703
-
704
- **Step 4.4: Decision**
705
-
706
- ```javascript
707
- if (hasBlockers) {
708
- // Critical issues → must fix before commit
709
- console.log(`
710
- ❌ Critical issues found. Transitioning to Iterate mode for fixes.
711
- `)
712
- mode = 'iterate'
713
-
714
- } else if (hasMajorIssues) {
715
- // Ask user
716
- AskUserQuestion({
717
- questions: [{
718
- question: "High severity issues found. How to proceed?",
719
- header: "Review",
720
- multiSelect: false,
721
- options: [
722
- { label: "Fix Issues", description: "Iterate to fix high severity issues" },
723
- { label: "Accept As-Is", description: "Proceed despite issues" },
724
- { label: "Manual Review", description: "Stop and review manually" }
725
- ]
726
- }]
727
- })
728
-
729
- } else {
730
- // All passed
731
- console.log(`
732
- ✅ Code review passed. Development complete.
733
-
734
- Session artifacts saved in: ${sessionFolder}
735
- - progress.md: Full development timeline
736
- - plan.json: Execution plan
737
-
738
- Run \`/workflow:develop-with-file --resume ${sessionId}\` to iterate.
739
- `)
740
- }
741
- ```
742
-
743
- ---
744
-
745
- ### Iterate Mode (Incremental)
746
-
747
- **Step 5.1: Analyze Delta**
748
-
749
- User provides new requirements or fix instructions:
750
-
751
- ```bash
752
- ccw cli -p "
753
- PURPOSE: Analyze incremental changes for session ${sessionId}
754
- Success criteria: Identify minimal tasks to address new requirements
755
-
756
- TASK:
757
- • Read progress.md for current state
758
- • Compare new requirements with existing implementation
759
- • Identify delta (what changed?)
760
- • Generate incremental tasks (append to existing plan)
761
-
762
- MODE: analysis
763
-
764
- CONTEXT:
765
- @${progressPath}
766
- @${planPath}
767
- | New requirements: ${new_requirements}
768
-
769
- EXPECTED:
770
- - Delta analysis (what's new, what needs changing)
771
- - Incremental tasks [{id, title, description, files, executor}]
772
- - Updated plan.json with new tasks
773
-
774
- CONSTRAINTS: Minimal changes, preserve existing work
775
- " --tool gemini --mode analysis --rule planning-breakdown-task-steps
776
- ```
777
-
778
- **Step 5.2: Append Incremental Tasks**
779
-
780
- ```javascript
781
- const plan = JSON.parse(Read(planPath))
782
- const incrementalTasks = parseGeminiDelta()
783
-
784
- // Assign new task IDs
785
- const maxId = Math.max(...plan.tasks.map(t => parseInt(t.id.replace('T', ''))))
786
- incrementalTasks.forEach((task, i) => {
787
- task.id = `T${maxId + i + 1}`
788
- task.status = 'pending'
789
- plan.tasks.push(task)
790
- })
791
-
792
- Write(planPath, JSON.stringify(plan, null, 2))
793
- ```
794
-
795
- **Step 5.3: Update progress.md**
796
-
797
- Append new iteration section:
798
-
799
- ```markdown
800
- ---
801
-
802
- ## Iteration ${iteration_number} (${getUtc8ISOString()})
803
-
804
- ### New Requirements
805
- ${new_requirements}
806
-
807
- ### Delta Analysis
808
- ${incrementalTasks.delta_analysis}
809
-
810
- ### Incremental Tasks
811
- ${incrementalTasks.tasks.map(t => `
812
- - **${t.id}**: ${t.title}
813
- - Files: ${t.files.join(', ')}
814
- - Executor: ${t.executor}
815
- `).join('\n')}
816
-
817
- ---
818
-
819
- ## Current State
820
-
821
- **Phase**: Iteration planning complete
822
- **Next Steps**: Execute incremental tasks
823
- ```
824
-
825
- **Step 5.4: Execute Incremental Tasks**
826
-
827
- Re-enter Execute Mode, but only process tasks with `status: 'pending'`.
828
-
829
- ---
830
-
831
- ## Session Folder Structure
832
-
833
- ```
834
- .workflow/.develop/{session-id}/
835
- ├── progress.md # Timeline: exploration → planning → execution → verification
836
- ├── plan.json # Current execution plan (tasks, statuses, executors)
837
- └── exploration-{angle}.json # Temporary exploration results (optional, can delete after planning)
838
- ```
839
-
840
- **Example**:
841
- ```
842
- .workflow/.develop/DEV-implement-jwt-refresh-2025-01-23/
843
- ├── progress.md
844
- ├── plan.json
845
- ├── exploration-architecture.json
846
- ├── exploration-patterns.json
847
- └── exploration-testing.json
848
- ```
849
-
850
- ## Progress.md Template
851
-
852
- ```markdown
853
- # Development Progress
854
-
855
- **Session ID**: DEV-xxx-2025-01-23
856
- **Task Description**: [original description]
857
- **Started**: 2025-01-23T10:00:00+08:00
858
- **Complexity**: Medium
859
-
860
- ---
861
-
862
- ## Exploration Results
863
-
864
- ### Exploration Summary (2025-01-23 10:05)
865
- ...
866
-
867
- ### Clarifications Collected
868
- ...
869
-
870
- ---
871
-
872
- ## Planning Results
873
-
874
- ### Plan Generated (2025-01-23 10:15)
875
- ...
876
-
877
- ---
878
-
879
- ## Execution Timeline
880
-
881
- ### Task T1 - ... (2025-01-23 10:20)
882
- **Status**: ✅ Completed
883
- ...
884
-
885
- ### Task T2 - ... (2025-01-23 10:35)
886
- **Status**: ✅ Completed
887
- ...
888
-
889
- ---
890
-
891
- ## Verification Results
892
-
893
- ### Code Review (2025-01-23 11:00)
894
- ...
895
-
896
- ---
897
-
898
- ## Iteration 2 (2025-01-23 14:00)
899
-
900
- ### New Requirements
901
- ...
902
-
903
- ### Delta Analysis
904
- ...
905
-
906
- ---
907
-
908
- ## Current State
909
-
910
- **Phase**: Complete
911
- **Quality Score**: 8/10
912
- **Artifacts**: progress.md, plan.json
913
- ```
914
-
915
- ## Plan.json Schema
916
-
917
- ```json
918
- {
919
- "summary": "Implementation summary",
920
- "approach": "Technical approach description",
921
- "tasks": [
922
- {
923
- "id": "T1",
924
- "title": "Task title",
925
- "description": "Detailed description",
926
- "files": ["src/file1.ts", "src/file2.ts"],
927
- "executor": "agent", // gemini/codex/agent
928
- "depends_on": [],
929
- "complexity": "Medium",
930
- "status": "completed" // pending/in_progress/completed/failed
931
- }
932
- ],
933
- "executorAssignments": {
934
- "T1": {
935
- "executor": "agent",
936
- "reason": "Standard implementation task, agent handles well"
937
- }
938
- },
939
- "estimated_time": "2-3 hours",
940
- "complexity": "Medium",
941
- "_metadata": {
942
- "timestamp": "2025-01-23T10:15:00+08:00",
943
- "source": "gemini-planning",
944
- "exploration_angles": ["architecture", "patterns", "testing"]
945
- }
946
- }
947
- ```
948
-
949
- ## Gemini Integration Points
950
-
951
- ### 1. Planning (Plan Mode)
952
-
953
- **Purpose**: Intelligent task decomposition with executor assignment
954
-
955
- **Prompt Pattern**:
956
- ```
957
- PURPOSE: Generate implementation plan + executor assignments
958
- TASK: Analyze exploration → decompose → assign executors (gemini/codex/agent)
959
- CONTEXT: @progress.md (exploration findings)
960
- EXPECTED: plan.json with tasks, executorAssignments, rationale
961
- ```
962
-
963
- ### 2. Verification (Verify Mode)
964
-
965
- **Purpose**: Post-execution code review and quality check
966
-
967
- **Prompt Pattern**:
968
- ```
969
- PURPOSE: Review code changes + validate quality
970
- TASK: Check correctness, style, bugs → severity levels → fix suggestions
971
- CONTEXT: @progress.md (execution results)
972
- EXPECTED: Review report with issues (Critical/High/Medium/Low), quality score
973
- ```
974
-
975
- ### 3. Iteration (Iterate Mode)
976
-
977
- **Purpose**: Analyze delta and generate incremental tasks
978
-
979
- **Prompt Pattern**:
980
- ```
981
- PURPOSE: Analyze incremental changes + minimal tasks
982
- TASK: Compare new requirements with current state → delta → incremental tasks
983
- CONTEXT: @progress.md @plan.json | New requirements
984
- EXPECTED: Delta analysis + incremental tasks
985
- ```
986
-
987
- ## Error Correction Mechanism
988
-
989
- ### Correction Format in progress.md
990
-
991
- When verification finds issues:
992
-
993
- ```markdown
994
- ### Corrected Understanding (Iteration 2)
995
-
996
- - ~~Assumed API returns array~~ → API returns object with data array
997
- - Why wrong: Misread API response structure
998
- - Evidence: Runtime error "map is not a function"
999
- - Fix applied: Changed `response.map` to `response.data.map`
1000
-
1001
- - ~~Thought validation was client-side~~ → Validation is server-side
1002
- - Why wrong: Only checked frontend code
1003
- - Evidence: Backend validation logic found in exploration
1004
- - Fix applied: Removed redundant client validation
1005
- ```
1006
-
1007
- ## Error Handling
1008
-
1009
- | Situation | Action |
1010
- |-----------|--------|
1011
- | Exploration agent failure | Skip angle, continue with remaining explorations |
1012
- | Gemini planning unavailable | Fallback to direct Claude planning (Low complexity mode) |
1013
- | Task execution failure | Ask user: Retry/Skip/Abort |
1014
- | Verification finds blockers | Force iteration mode, cannot proceed |
1015
- | plan.json corrupted | Regenerate from progress.md + Gemini |
1016
- | >5 iterations | Suggest breaking into sub-sessions |
1017
-
1018
- ## Comparison with /workflow:lite-plan
1019
-
1020
- | Feature | /workflow:lite-plan | /workflow:develop-with-file |
1021
- |---------|---------------------|----------------------------|
1022
- | State tracking | In-memory → lite-execute | progress.md (persistent) |
1023
- | Exploration | Multi-agent parallel | ✅ Same |
1024
- | Planning | cli-lite-planning-agent | Gemini CLI (more flexible) |
1025
- | Execution | Delegated to lite-execute | Built-in (multi-agent/CLI) |
1026
- | Verification | None | ✅ Gemini code review |
1027
- | Iteration support | ❌ | ✅ Incremental tasks |
1028
- | Document continuity | ❌ (session ends) | ✅ (progress.md timeline) |
1029
- | Executor assignment | Global only | ✅ Per-task |
1030
-
1031
- ## Usage Recommendations
1032
-
1033
- Use `/workflow:develop-with-file` when:
1034
- - Complex features requiring multiple phases (explore → plan → execute → verify)
1035
- - Need persistent progress tracking across sessions
1036
- - Want Gemini-assisted planning and verification
1037
- - Anticipate multiple iterations/refinements
1038
- - Team needs to understand development rationale
1039
-
1040
- Use `/workflow:lite-plan` when:
1041
- - Quick one-off tasks
1042
- - Simple features (Low complexity)
1043
- - Don't need verification
1044
- - Session-level documentation not needed