claude-code-workflow 7.2.30 → 7.3.0

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 (183) hide show
  1. package/.claude/commands/workflow-skill.md +130 -0
  2. package/.claude/skills/ccw-chain/SKILL.md +44 -71
  3. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +13 -3
  4. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +33 -22
  5. package/.claude/skills/ccw-chain/chains/ccw-issue.json +23 -12
  6. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +23 -9
  7. package/.claude/skills/ccw-chain/chains/ccw-main.json +15 -2
  8. package/.claude/skills/ccw-chain/chains/ccw-standard.json +28 -16
  9. package/.claude/skills/ccw-chain/chains/ccw-team.json +7 -2
  10. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +25 -9
  11. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -53
  12. package/.claude/skills/chain-loader/specs/chain-schema.md +30 -3
  13. package/.claude/skills/chain-loader/templates/chain-json.md +63 -63
  14. package/.claude/skills/workflow-plan/SKILL.md +1 -0
  15. package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
  16. package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
  17. package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
  18. package/.codex/skills/analyze-with-file/SKILL.md +383 -134
  19. package/.codex/skills/brainstorm/SKILL.md +3 -3
  20. package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
  21. package/.codex/skills/clean/SKILL.md +1 -1
  22. package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
  23. package/.codex/skills/investigate/orchestrator.md +24 -0
  24. package/.codex/skills/issue-discover/SKILL.md +374 -361
  25. package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
  26. package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
  27. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
  28. package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
  29. package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
  30. package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
  31. package/.codex/skills/review-cycle/SKILL.md +31 -12
  32. package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
  33. package/.codex/skills/security-audit/orchestrator.md +29 -0
  34. package/.codex/skills/session-sync/SKILL.md +1 -1
  35. package/.codex/skills/ship/orchestrator.md +24 -0
  36. package/.codex/skills/spec-add/SKILL.md +5 -5
  37. package/.codex/skills/spec-generator/SKILL.md +33 -2
  38. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
  39. package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
  40. package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
  41. package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
  42. package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
  43. package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
  44. package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
  45. package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
  46. package/.codex/skills/spec-setup/SKILL.md +669 -669
  47. package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
  48. package/.codex/skills/team-brainstorm/SKILL.md +259 -259
  49. package/.codex/skills/team-coordinate/SKILL.md +359 -359
  50. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
  51. package/.codex/skills/team-designer/SKILL.md +27 -1
  52. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
  53. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  54. package/.codex/skills/team-designer/phases/04-validation.md +1 -1
  55. package/.codex/skills/team-executor/SKILL.md +218 -218
  56. package/.codex/skills/team-frontend/SKILL.md +227 -227
  57. package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
  58. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
  59. package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
  60. package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
  61. package/.codex/skills/team-issue/SKILL.md +269 -269
  62. package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
  63. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
  64. package/.codex/skills/team-motion-design/SKILL.md +222 -222
  65. package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
  66. package/.codex/skills/team-perf-opt/SKILL.md +258 -258
  67. package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
  68. package/.codex/skills/team-planex/SKILL.md +216 -216
  69. package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
  70. package/.codex/skills/team-review/SKILL.md +227 -227
  71. package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
  72. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
  73. package/.codex/skills/team-tech-debt/SKILL.md +206 -206
  74. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  75. package/.codex/skills/team-testing/SKILL.md +237 -237
  76. package/.codex/skills/team-ui-polish/SKILL.md +218 -218
  77. package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
  78. package/.codex/skills/team-uidesign/SKILL.md +219 -219
  79. package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
  80. package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
  81. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
  82. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
  83. package/.codex/skills/team-ux-improve/SKILL.md +227 -227
  84. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
  85. package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
  86. package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
  87. package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
  88. package/.codex/skills/workflow-execute/SKILL.md +5 -5
  89. package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
  90. package/.codex/skills/workflow-plan/SKILL.md +3 -3
  91. package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
  92. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
  93. package/ccw/dist/cli.d.ts.map +1 -1
  94. package/ccw/dist/cli.js +16 -0
  95. package/ccw/dist/cli.js.map +1 -1
  96. package/ccw/dist/commands/chain-loader.d.ts +2 -0
  97. package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
  98. package/ccw/dist/commands/chain-loader.js +11 -0
  99. package/ccw/dist/commands/chain-loader.js.map +1 -0
  100. package/ccw/dist/commands/install.d.ts.map +1 -1
  101. package/ccw/dist/commands/install.js +52 -1
  102. package/ccw/dist/commands/install.js.map +1 -1
  103. package/ccw/dist/commands/launcher.d.ts +2 -0
  104. package/ccw/dist/commands/launcher.d.ts.map +1 -0
  105. package/ccw/dist/commands/launcher.js +434 -0
  106. package/ccw/dist/commands/launcher.js.map +1 -0
  107. package/ccw/dist/tools/chain-loader.d.ts.map +1 -1
  108. package/ccw/dist/tools/chain-loader.js +457 -45
  109. package/ccw/dist/tools/chain-loader.js.map +1 -1
  110. package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
  111. package/ccw/dist/tools/skill-context-loader.js +12 -26
  112. package/ccw/dist/tools/skill-context-loader.js.map +1 -1
  113. package/ccw/dist/types/chain-types.d.ts +41 -1
  114. package/ccw/dist/types/chain-types.d.ts.map +1 -1
  115. package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
  116. package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
  117. package/ccw/dist/utils/chain-visualizer.js +164 -0
  118. package/ccw/dist/utils/chain-visualizer.js.map +1 -0
  119. package/package.json +1 -1
  120. package/.claude/commands/cli/cli-init.md +0 -441
  121. package/.claude/commands/cli/codex-review.md +0 -361
  122. package/.claude/commands/flow-create.md +0 -663
  123. package/.claude/skills/ccw-chain/phases/analyze-with-file.md +0 -788
  124. package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +0 -408
  125. package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +0 -207
  126. package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +0 -567
  127. package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +0 -748
  128. package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +0 -827
  129. package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +0 -482
  130. package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +0 -639
  131. package/.claude/skills/ccw-chain/phases/debug-with-file.md +0 -656
  132. package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +0 -936
  133. package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +0 -720
  134. package/.claude/skills/ccw-chain/phases/issue-discover.md +0 -483
  135. package/.claude/skills/ccw-chain/phases/issue-execute.md +0 -629
  136. package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +0 -382
  137. package/.claude/skills/ccw-chain/phases/issue-plan.md +0 -343
  138. package/.claude/skills/ccw-chain/phases/issue-queue.md +0 -464
  139. package/.claude/skills/ccw-chain/phases/refactor-cycle.md +0 -852
  140. package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +0 -132
  141. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +0 -760
  142. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +0 -764
  143. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +0 -775
  144. package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +0 -544
  145. package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +0 -338
  146. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +0 -404
  147. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +0 -257
  148. package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +0 -274
  149. package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +0 -184
  150. package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +0 -248
  151. package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +0 -178
  152. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +0 -144
  153. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +0 -480
  154. package/.claude/skills/ccw-chain/phases/team-planex.md +0 -123
  155. package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +0 -678
  156. package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +0 -870
  157. package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +0 -625
  158. package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +0 -215
  159. package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +0 -616
  160. package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +0 -424
  161. package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +0 -466
  162. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +0 -99
  163. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +0 -338
  164. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +0 -422
  165. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +0 -440
  166. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +0 -395
  167. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +0 -594
  168. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +0 -527
  169. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +0 -57
  170. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +0 -407
  171. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +0 -172
  172. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +0 -426
  173. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +0 -473
  174. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +0 -189
  175. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +0 -635
  176. package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +0 -482
  177. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +0 -60
  178. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +0 -493
  179. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +0 -150
  180. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +0 -346
  181. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +0 -538
  182. package/.claude/skills/ccw-chain/specs/intent-patterns.md +0 -60
  183. package/.claude/skills/team-edict.zip +0 -0
@@ -1,424 +0,0 @@
1
- ---
2
- name: workflow-multi-cli-plan
3
- description: Multi-CLI collaborative planning with codebase context gathering, iterative cross-verification, and execution handoff.
4
- allowed-tools: Skill, Agent, AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Glob, Grep
5
- ---
6
-
7
- # Multi-CLI Collaborative Planning
8
-
9
- ## Auto Mode
10
-
11
- When `workflowPreferences.autoYes` is true: Auto-approve plan, use recommended solution and execution method (Agent, Skip review).
12
-
13
- **Context Source**: ACE semantic search + Multi-CLI analysis
14
- **Output Directory**: `.workflow/.multi-cli-plan/{session-id}/`
15
- **Default Max Rounds**: 3 (convergence may complete earlier)
16
- **CLI Tools**: @cli-discuss-agent (analysis), @cli-lite-planning-agent (plan generation)
17
- **Execution**: Auto-hands off to workflow-lite-execute after plan approval
18
-
19
- ### Orchestrator Boundary (CRITICAL)
20
-
21
- - **ONLY command** for multi-CLI collaborative planning
22
- - Manages: Session state, user decisions, agent delegation, phase transitions
23
- - Delegates: CLI execution to @cli-discuss-agent, plan generation to @cli-lite-planning-agent
24
-
25
- ### Execution Flow
26
-
27
- ```
28
- Phase 1: Context Gathering
29
- └─ ACE semantic search, extract keywords, build context package
30
-
31
- Phase 2: Multi-CLI Discussion (Iterative, via @cli-discuss-agent)
32
- ├─ Round N: Agent executes Gemini + Codex + Claude
33
- ├─ Cross-verify findings, synthesize solutions
34
- ├─ Write synthesis.json to rounds/{N}/
35
- └─ Loop until convergence or max rounds
36
-
37
- Phase 3: Present Options
38
- └─ Display solutions with trade-offs from agent output
39
-
40
- Phase 4: User Decision
41
- ├─ Select solution approach
42
- ├─ Select execution method (Agent/Codex/Auto)
43
- ├─ Select code review tool (Skip/Gemini/Codex/Agent)
44
- └─ Route:
45
- ├─ Approve → Phase 5
46
- ├─ Need More Analysis → Return to Phase 2
47
- └─ Cancel → Save session
48
-
49
- Phase 5: Plan Generation & Execution Handoff
50
- ├─ Generate plan.json + .task/*.json (via @cli-lite-planning-agent, two-layer output)
51
- ├─ Build executionContext with user selections and taskFiles
52
- └─ Execute via workflow-lite-execute
53
- ```
54
-
55
- ### Agent Roles
56
-
57
- | Agent | Responsibility |
58
- |-------|---------------|
59
- | **Orchestrator** | Session management, ACE context, user decisions, phase transitions, executionContext assembly |
60
- | **@cli-discuss-agent** | Multi-CLI execution (Gemini/Codex/Claude), cross-verification, solution synthesis, synthesis.json output |
61
- | **@cli-lite-planning-agent** | Task decomposition, two-layer output: plan.json (overview with task_ids[]) + .task/*.json (task files) |
62
-
63
- ## Core Responsibilities
64
-
65
- ### Phase 1: Context Gathering
66
-
67
- **Session Initialization**:
68
- ```javascript
69
- const sessionId = `MCP-${taskSlug}-${date}`
70
- const sessionFolder = `.workflow/.multi-cli-plan/${sessionId}`
71
- Bash(`mkdir -p ${sessionFolder}/rounds`)
72
- ```
73
-
74
- **ACE Context Queries**:
75
- ```javascript
76
- const aceQueries = [
77
- `Project architecture related to ${keywords}`,
78
- `Existing implementations of ${keywords[0]}`,
79
- `Code patterns for ${keywords} features`,
80
- `Integration points for ${keywords[0]}`
81
- ]
82
- // Execute via mcp__ace-tool__search_context
83
- ```
84
-
85
- **Context Package** (passed to agent):
86
- - `relevant_files[]` - Files identified by ACE
87
- - `detected_patterns[]` - Code patterns found
88
- - `architecture_insights` - Structure understanding
89
-
90
- ### Phase 2: Agent Delegation
91
-
92
- **Core Principle**: Orchestrator only delegates and reads output — NO direct CLI execution. CLI calls MUST use `Bash` with `run_in_background: true`, wait for hook callback, do NOT use `TaskOutput` polling.
93
-
94
- **Agent Invocation**:
95
- ```javascript
96
- Agent({
97
- subagent_type: "cli-discuss-agent",
98
- run_in_background: false,
99
- description: `Discussion round ${currentRound}`,
100
- prompt: `
101
- ## Input Context
102
- - task_description: ${taskDescription}
103
- - round_number: ${currentRound}
104
- - session: { id: "${sessionId}", folder: "${sessionFolder}" }
105
- - ace_context: ${JSON.stringify(contextPackage)}
106
- - previous_rounds: ${JSON.stringify(analysisResults)}
107
- - user_feedback: ${userFeedback || 'None'}
108
- - cli_config: { tools: ["gemini", "codex"], mode: "parallel", fallback_chain: ["gemini", "codex", "claude"] }
109
-
110
- ## Execution Process
111
- 1. Parse input context (handle JSON strings)
112
- 2. Check if ACE supplementary search needed
113
- 3. Build CLI prompts with context
114
- 4. Execute CLIs (parallel or serial per cli_config.mode)
115
- 5. Parse CLI outputs, handle failures with fallback
116
- 6. Perform cross-verification between CLI results
117
- 7. Synthesize solutions, calculate scores
118
- 8. Calculate convergence, generate clarification questions
119
- 9. Write synthesis.json
120
-
121
- ## Output
122
- Write: ${sessionFolder}/rounds/${currentRound}/synthesis.json
123
-
124
- ## Completion Checklist
125
- - [ ] All configured CLI tools executed (or fallback triggered)
126
- - [ ] Cross-verification completed with agreements/disagreements
127
- - [ ] 2-3 solutions generated with file:line references
128
- - [ ] Convergence score calculated (0.0-1.0)
129
- - [ ] synthesis.json written with all Primary Fields
130
- `
131
- })
132
- ```
133
-
134
- **Read Agent Output**:
135
- ```javascript
136
- const synthesis = JSON.parse(Read(`${sessionFolder}/rounds/${round}/synthesis.json`))
137
- // Access top-level fields: solutions, convergence, cross_verification, clarification_questions
138
- ```
139
-
140
- **Convergence Decision**:
141
- ```javascript
142
- if (synthesis.convergence.recommendation === 'converged') {
143
- // Proceed to Phase 3
144
- } else if (synthesis.convergence.recommendation === 'user_input_needed') {
145
- // Collect user feedback, return to Phase 2
146
- } else {
147
- // Continue to next round if new_insights && round < maxRounds
148
- }
149
- ```
150
-
151
- ### Phase 3: Present Options
152
-
153
- Display solutions from `synthesis.solutions[]` showing: name, source CLIs, effort/risk, pros/cons, affected files (`file:line`). Also show cross-verification agreements/disagreements count.
154
-
155
- ### Phase 4: User Decision
156
-
157
- ```javascript
158
- AskUserQuestion({
159
- questions: [
160
- {
161
- question: "Which solution approach?",
162
- header: "Solution",
163
- multiSelect: false,
164
- options: solutions.map((s, i) => ({
165
- label: `Option ${i+1}: ${s.name}`,
166
- description: `${s.effort} effort, ${s.risk} risk`
167
- })).concat([
168
- { label: "Need More Analysis", description: "Return to Phase 2" }
169
- ])
170
- },
171
- {
172
- question: "Execution method:",
173
- header: "Execution",
174
- multiSelect: false,
175
- options: [
176
- { label: "Agent", description: "@code-developer agent" },
177
- { label: "Codex", description: "codex CLI tool" },
178
- { label: "Auto", description: "Auto-select based on complexity" }
179
- ]
180
- },
181
- {
182
- question: "Code review after execution?",
183
- header: "Review",
184
- multiSelect: false,
185
- options: [
186
- { label: "Skip", description: "No review" },
187
- { label: "Gemini Review", description: "Gemini CLI tool" },
188
- { label: "Codex Review", description: "codex review --uncommitted" },
189
- { label: "Agent Review", description: "Current agent review" }
190
- ]
191
- }
192
- ]
193
- })
194
- ```
195
-
196
- **Routing**:
197
- - Approve + execution method → Phase 5
198
- - Need More Analysis → Phase 2 with feedback
199
- - Cancel → Save session for resumption
200
-
201
- **TodoWrite Update (Phase 4 Decision)**:
202
- ```javascript
203
- const executionLabel = userSelection.execution_method // "Agent" / "Codex" / "Auto"
204
-
205
- TodoWrite({ todos: [
206
- { content: "Phase 1: Context Gathering", status: "completed", activeForm: "Gathering context" },
207
- { content: "Phase 2: Multi-CLI Discussion", status: "completed", activeForm: "Running discussion" },
208
- { content: "Phase 3: Present Options", status: "completed", activeForm: "Presenting options" },
209
- { content: `Phase 4: User Decision [${executionLabel}]`, status: "completed", activeForm: "Decision recorded" },
210
- { content: `Phase 5: Plan Generation [${executionLabel}]`, status: "in_progress", activeForm: `Generating plan [${executionLabel}]` }
211
- ]})
212
- ```
213
-
214
- ### Phase 5: Plan Generation & Execution Handoff
215
-
216
- **Step 1: Build Context-Package** (Orchestrator responsibility):
217
- ```javascript
218
- const contextPackage = {
219
- solution: {
220
- name: selectedSolution.name,
221
- source_cli: selectedSolution.source_cli,
222
- feasibility: selectedSolution.feasibility,
223
- effort: selectedSolution.effort,
224
- risk: selectedSolution.risk,
225
- summary: selectedSolution.summary
226
- },
227
- implementation_plan: selectedSolution.implementation_plan,
228
- dependencies: selectedSolution.dependencies || { internal: [], external: [] },
229
- technical_concerns: selectedSolution.technical_concerns || [],
230
- consensus: {
231
- agreements: synthesis.cross_verification.agreements,
232
- resolved_conflicts: synthesis.cross_verification.resolution
233
- },
234
- constraints: userConstraints || [],
235
- task_description: taskDescription,
236
- session_id: sessionId
237
- }
238
- Write(`${sessionFolder}/context-package.json`, JSON.stringify(contextPackage, null, 2))
239
- ```
240
-
241
- **Step 2: Invoke Planning Agent**:
242
- ```javascript
243
- Agent({
244
- subagent_type: "cli-lite-planning-agent",
245
- run_in_background: false,
246
- description: "Generate implementation plan",
247
- prompt: `
248
- ## Schema Reference
249
- Execute: ccw tool exec json_builder '{"cmd":"info","schema":"plan"}'
250
- Execute: ccw tool exec json_builder '{"cmd":"info","schema":"task"}'
251
-
252
- ## Output Format: Two-Layer Structure
253
- - plan.json: Overview with task_ids[] referencing .task/ files (NO tasks[] array)
254
- - .task/TASK-*.json: Independent task files following task-schema.json
255
-
256
- plan.json required: summary, approach, task_ids, task_count, _metadata (with plan_type)
257
- Task files required: id, title, description, depends_on, convergence (with criteria[])
258
- Task fields: files[].change (not modification_points), convergence.criteria (not acceptance), test (not verification)
259
-
260
- ## Context-Package (from orchestrator)
261
- ${JSON.stringify(contextPackage, null, 2)}
262
-
263
- ## Execution Process
264
- 1. Read plan-overview-base-schema.json + task-schema.json for output structure
265
- 2. Read project-tech.json and specs/*.md
266
- 3. Parse context-package fields:
267
- - solution: name, feasibility, summary
268
- - implementation_plan: tasks[], execution_flow, milestones
269
- - dependencies: internal[], external[]
270
- - technical_concerns: risks/blockers
271
- - consensus: agreements, resolved_conflicts
272
- - constraints: user requirements
273
- 4. Use implementation_plan.tasks[] as task foundation
274
- 5. Preserve task dependencies (depends_on) and execution_flow
275
- 6. Expand tasks with convergence.criteria (testable completion conditions)
276
- 7. Create .task/ directory and write individual TASK-*.json files
277
- 8. Generate plan.json with task_ids[] referencing .task/ files
278
-
279
- ## Output
280
- - ${sessionFolder}/plan.json (overview with task_ids[])
281
- - ${sessionFolder}/.task/TASK-*.json (independent task files)
282
-
283
- ## Completion Checklist
284
- - [ ] plan.json has task_ids[] and task_count (NO embedded tasks[])
285
- - [ ] .task/*.json files preserve task dependencies from implementation_plan
286
- - [ ] Task execution order follows execution_flow
287
- - [ ] Key_points reflected in task descriptions
288
- - [ ] User constraints applied to implementation
289
- - [ ] convergence.criteria are testable
290
- - [ ] plan.json follows plan-overview-base-schema.json
291
- - [ ] Task files follow task-schema.json
292
- `
293
- })
294
- ```
295
-
296
- **Step 3: Build executionContext**:
297
- ```javascript
298
- const plan = JSON.parse(Read(`${sessionFolder}/plan.json`))
299
- const taskFiles = plan.task_ids.map(id => `${sessionFolder}/.task/${id}.json`)
300
-
301
- // Build executionContext (same structure as lite-plan)
302
- executionContext = {
303
- planObject: plan,
304
- taskFiles: taskFiles, // Paths to .task/*.json files (two-layer format)
305
- explorationsContext: null, // Multi-CLI doesn't use exploration files
306
- explorationAngles: [],
307
- explorationManifest: null,
308
- clarificationContext: null, // Store user feedback from Phase 2 if exists
309
- executionMethod: userSelection.execution_method, // From Phase 4
310
- codeReviewTool: userSelection.code_review_tool, // From Phase 4
311
- originalUserInput: taskDescription,
312
- executorAssignments: null,
313
- session: {
314
- id: sessionId,
315
- folder: sessionFolder,
316
- artifacts: {
317
- explorations: [], // No explorations in multi-CLI workflow
318
- explorations_manifest: null,
319
- plan: `${sessionFolder}/plan.json`,
320
- task_dir: plan.task_ids ? `${sessionFolder}/.task/` : null,
321
- synthesis_rounds: Array.from({length: currentRound}, (_, i) =>
322
- `${sessionFolder}/rounds/${i+1}/synthesis.json`
323
- ),
324
- context_package: `${sessionFolder}/context-package.json`
325
- }
326
- }
327
- }
328
- ```
329
-
330
- **Step 4: Hand off to Execution**:
331
- ```javascript
332
- Skill({
333
- skill: "workflow-lite-execute",
334
- args: "--in-memory"
335
- })
336
- // executionContext is passed via global variable to workflow-lite-execute (Mode 1: In-Memory Plan)
337
- ```
338
-
339
- ## synthesis.json Schema
340
-
341
- ```json
342
- {
343
- "round": 1,
344
- "solutions": [{
345
- "name": "Solution Name",
346
- "source_cli": ["gemini", "codex"],
347
- "feasibility": 0.85,
348
- "effort": "low|medium|high",
349
- "risk": "low|medium|high",
350
- "summary": "Brief analysis summary",
351
- "implementation_plan": {
352
- "approach": "High-level technical approach",
353
- "tasks": [
354
- {"id": "T1", "name": "Task", "depends_on": [], "files": [], "key_point": "..."}
355
- ],
356
- "execution_flow": "T1 → T2 → T3",
357
- "milestones": ["Checkpoint 1", "Checkpoint 2"]
358
- },
359
- "dependencies": {"internal": [], "external": []},
360
- "technical_concerns": ["Risk 1", "Blocker 2"]
361
- }],
362
- "convergence": {
363
- "score": 0.85,
364
- "new_insights": false,
365
- "recommendation": "converged|continue|user_input_needed"
366
- },
367
- "cross_verification": {
368
- "agreements": [],
369
- "disagreements": [],
370
- "resolution": "..."
371
- },
372
- "clarification_questions": []
373
- }
374
- ```
375
-
376
- ## TodoWrite Pattern
377
-
378
- **Initialization** (Phase 1 start):
379
- ```javascript
380
- TodoWrite({ todos: [
381
- { content: "Phase 1: Context Gathering", status: "in_progress", activeForm: "Gathering context" },
382
- { content: "Phase 2: Multi-CLI Discussion", status: "pending", activeForm: "Running discussion" },
383
- { content: "Phase 3: Present Options", status: "pending", activeForm: "Presenting options" },
384
- { content: "Phase 4: User Decision", status: "pending", activeForm: "Awaiting decision" },
385
- { content: "Phase 5: Plan Generation", status: "pending", activeForm: "Generating plan" }
386
- ]})
387
- ```
388
-
389
- ## Output File Structure
390
-
391
- ```
392
- .workflow/.multi-cli-plan/{MCP-task-slug-YYYY-MM-DD}/
393
- ├── session-state.json # Session tracking (orchestrator)
394
- ├── rounds/
395
- │ ├── 1/synthesis.json # Round 1 analysis (cli-discuss-agent)
396
- │ ├── 2/synthesis.json # Round 2 analysis (cli-discuss-agent)
397
- │ └── .../
398
- ├── context-package.json # Extracted context for planning (orchestrator)
399
- ├── plan.json # Plan overview with task_ids[] (NO embedded tasks[])
400
- └── .task/ # Independent task files
401
- ├── TASK-001.json # Task file following task-schema.json
402
- ├── TASK-002.json
403
- └── ...
404
- ```
405
-
406
- ## Error Handling
407
-
408
- | Error | Resolution |
409
- |-------|------------|
410
- | ACE search fails | Fall back to Glob/Grep for file discovery |
411
- | Agent fails | Retry once, then present partial results |
412
- | CLI timeout (in agent) | Agent uses fallback: gemini → codex → claude |
413
- | No convergence | Present best options, flag uncertainty |
414
- | synthesis.json parse error | Request agent retry |
415
- | User cancels | Save session for later resumption |
416
-
417
- ## Configuration
418
-
419
- | Flag | Default | Description |
420
- |------|---------|-------------|
421
- | `--max-rounds` | 3 | Maximum discussion rounds |
422
- | `--tools` | gemini,codex | CLI tools for analysis |
423
- | `--mode` | parallel | Execution mode: parallel or serial |
424
- | `--auto-execute` | false | Auto-execute after approval |