claude-code-workflow 6.3.52 → 6.3.54

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 (43) hide show
  1. package/.claude/agents/action-planning-agent.md +26 -1
  2. package/.claude/agents/cli-lite-planning-agent.md +66 -2
  3. package/.claude/commands/codex-coordinator.md +513 -0
  4. package/.claude/commands/flow-create.md +675 -0
  5. package/.claude/commands/workflow/collaborative-plan-with-file.md +761 -0
  6. package/.claude/commands/workflow/lite-fix.md +49 -20
  7. package/.claude/commands/workflow/lite-plan.md +35 -8
  8. package/.claude/commands/workflow/plan.md +14 -1
  9. package/.claude/commands/workflow/tools/task-generate-agent.md +35 -24
  10. package/.claude/commands/workflow/unified-execute-with-file.md +101 -19
  11. package/.claude/skills/flow-coordinator/SKILL.md +394 -0
  12. package/.claude/skills/flow-coordinator/templates/analyze.json +16 -0
  13. package/.claude/skills/flow-coordinator/templates/brainstorm-to-issue.json +36 -0
  14. package/.claude/skills/flow-coordinator/templates/brainstorm.json +16 -0
  15. package/.claude/skills/flow-coordinator/templates/bugfix-hotfix.json +16 -0
  16. package/.claude/skills/flow-coordinator/templates/bugfix.json +47 -0
  17. package/.claude/skills/flow-coordinator/templates/coupled.json +71 -0
  18. package/.claude/skills/flow-coordinator/templates/debug.json +16 -0
  19. package/.claude/skills/flow-coordinator/templates/docs.json +27 -0
  20. package/.claude/skills/flow-coordinator/templates/full.json +61 -0
  21. package/.claude/skills/flow-coordinator/templates/issue.json +43 -0
  22. package/.claude/skills/flow-coordinator/templates/lite-lite-lite.json +16 -0
  23. package/.claude/skills/flow-coordinator/templates/multi-cli-plan.json +47 -0
  24. package/.claude/skills/flow-coordinator/templates/rapid-to-issue.json +46 -0
  25. package/.claude/skills/flow-coordinator/templates/rapid.json +47 -0
  26. package/.claude/skills/flow-coordinator/templates/review.json +43 -0
  27. package/.claude/skills/flow-coordinator/templates/tdd.json +34 -0
  28. package/.claude/skills/flow-coordinator/templates/test-fix.json +26 -0
  29. package/ccw/dist/tools/claude-cli-tools.d.ts +8 -0
  30. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  31. package/ccw/dist/tools/claude-cli-tools.js +13 -2
  32. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  33. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  34. package/ccw/dist/tools/cli-executor-core.js +24 -3
  35. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  36. package/ccw/src/templates/dashboard-js/components/cli-status.js +28 -0
  37. package/ccw/src/templates/dashboard-js/views/cli-manager.js +44 -0
  38. package/ccw/src/tools/claude-cli-tools.ts +20 -2
  39. package/ccw/src/tools/cli-executor-core.ts +23 -4
  40. package/package.json +92 -92
  41. package/.claude/commands/workflow/merge-plans-with-file.md +0 -807
  42. package/.claude/commands/workflow/quick-plan-with-file.md +0 -808
  43. package/.codex/prompts/quick-plan-with-file.md +0 -450
@@ -0,0 +1,675 @@
1
+ # Flow Template Generator
2
+
3
+ Generate workflow templates for meta-skill/flow-coordinator.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /meta-skill:flow-create [template-name] [--output <path>]
9
+ ```
10
+
11
+ **Examples**:
12
+ ```bash
13
+ /meta-skill:flow-create bugfix-v2
14
+ /meta-skill:flow-create my-workflow --output ~/.claude/skills/my-skill/templates/
15
+ ```
16
+
17
+ ## Execution Flow
18
+
19
+ ```
20
+ User Input → Phase 1: Template Design → Phase 2: Step Definition → Phase 3: Generate JSON
21
+ ↓ ↓ ↓
22
+ Name + Description Define workflow steps Write template file
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Phase 1: Template Design
28
+
29
+ Gather basic template information:
30
+
31
+ ```javascript
32
+ async function designTemplate(input) {
33
+ const templateName = parseTemplateName(input) || await askTemplateName();
34
+
35
+ const metadata = await AskUserQuestion({
36
+ questions: [
37
+ {
38
+ question: "What is the purpose of this workflow template?",
39
+ header: "Purpose",
40
+ options: [
41
+ { label: "Feature Development", description: "Implement new features with planning and testing" },
42
+ { label: "Bug Fix", description: "Diagnose and fix bugs with verification" },
43
+ { label: "TDD Development", description: "Test-driven development workflow" },
44
+ { label: "Code Review", description: "Review cycle with findings and fixes" },
45
+ { label: "Testing", description: "Test generation and validation" },
46
+ { label: "Issue Workflow", description: "Complete issue lifecycle (discover → plan → queue → execute)" },
47
+ { label: "With-File Workflow", description: "Documented exploration (brainstorm/debug/analyze)" },
48
+ { label: "Custom", description: "Define custom workflow purpose" }
49
+ ],
50
+ multiSelect: false
51
+ },
52
+ {
53
+ question: "What complexity level?",
54
+ header: "Level",
55
+ options: [
56
+ { label: "Level 1 (Rapid)", description: "1-2 steps, ultra-lightweight (lite-lite-lite)" },
57
+ { label: "Level 2 (Lightweight)", description: "2-4 steps, quick implementation" },
58
+ { label: "Level 3 (Standard)", description: "4-6 steps, with verification and testing" },
59
+ { label: "Level 4 (Full)", description: "6+ steps, brainstorm + full workflow" }
60
+ ],
61
+ multiSelect: false
62
+ }
63
+ ]
64
+ });
65
+
66
+ return {
67
+ name: templateName,
68
+ description: generateDescription(templateName, metadata.Purpose),
69
+ level: parseLevel(metadata.Level),
70
+ purpose: metadata.Purpose
71
+ };
72
+ }
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Phase 2: Step Definition
78
+
79
+ ### Step 2.1: Select Command Category
80
+
81
+ ```javascript
82
+ async function selectCommandCategory() {
83
+ return await AskUserQuestion({
84
+ questions: [{
85
+ question: "Select command category",
86
+ header: "Category",
87
+ options: [
88
+ { label: "Planning", description: "lite-plan, plan, multi-cli-plan, tdd-plan, quick-plan-with-file" },
89
+ { label: "Execution", description: "lite-execute, execute, unified-execute-with-file" },
90
+ { label: "Testing", description: "test-fix-gen, test-cycle-execute, test-gen, tdd-verify" },
91
+ { label: "Review", description: "review-session-cycle, review-module-cycle, review-cycle-fix" },
92
+ { label: "Bug Fix", description: "lite-fix, debug-with-file" },
93
+ { label: "Brainstorm", description: "brainstorm-with-file, brainstorm:auto-parallel" },
94
+ { label: "Analysis", description: "analyze-with-file" },
95
+ { label: "Issue", description: "discover, plan, queue, execute, from-brainstorm, convert-to-plan" },
96
+ { label: "Utility", description: "clean, init, replan, status" }
97
+ ],
98
+ multiSelect: false
99
+ }]
100
+ });
101
+ }
102
+ ```
103
+
104
+ ### Step 2.2: Select Specific Command
105
+
106
+ ```javascript
107
+ async function selectCommand(category) {
108
+ const commandOptions = {
109
+ 'Planning': [
110
+ { label: "/workflow:lite-plan", description: "Lightweight merged-mode planning" },
111
+ { label: "/workflow:plan", description: "Full planning with architecture design" },
112
+ { label: "/workflow:multi-cli-plan", description: "Multi-CLI collaborative planning (Gemini+Codex+Claude)" },
113
+ { label: "/workflow:tdd-plan", description: "TDD workflow planning with Red-Green-Refactor" },
114
+ { label: "/workflow:quick-plan-with-file", description: "Rapid planning with minimal docs" },
115
+ { label: "/workflow:plan-verify", description: "Verify plan against requirements" },
116
+ { label: "/workflow:replan", description: "Update plan and execute changes" }
117
+ ],
118
+ 'Execution': [
119
+ { label: "/workflow:lite-execute", description: "Execute from in-memory plan" },
120
+ { label: "/workflow:execute", description: "Execute from planning session" },
121
+ { label: "/workflow:unified-execute-with-file", description: "Universal execution engine" },
122
+ { label: "/workflow:lite-lite-lite", description: "Ultra-lightweight multi-tool execution" }
123
+ ],
124
+ 'Testing': [
125
+ { label: "/workflow:test-fix-gen", description: "Generate test tasks for specific issues" },
126
+ { label: "/workflow:test-cycle-execute", description: "Execute iterative test-fix cycle (>=95% pass)" },
127
+ { label: "/workflow:test-gen", description: "Generate comprehensive test suite" },
128
+ { label: "/workflow:tdd-verify", description: "Verify TDD workflow compliance" }
129
+ ],
130
+ 'Review': [
131
+ { label: "/workflow:review-session-cycle", description: "Session-based multi-dimensional code review" },
132
+ { label: "/workflow:review-module-cycle", description: "Module-focused code review" },
133
+ { label: "/workflow:review-cycle-fix", description: "Fix review findings with prioritization" },
134
+ { label: "/workflow:review", description: "Post-implementation review" }
135
+ ],
136
+ 'Bug Fix': [
137
+ { label: "/workflow:lite-fix", description: "Lightweight bug diagnosis and fix" },
138
+ { label: "/workflow:debug-with-file", description: "Hypothesis-driven debugging with documentation" }
139
+ ],
140
+ 'Brainstorm': [
141
+ { label: "/workflow:brainstorm-with-file", description: "Multi-perspective ideation with documentation" },
142
+ { label: "/workflow:brainstorm:auto-parallel", description: "Parallel multi-role brainstorming" }
143
+ ],
144
+ 'Analysis': [
145
+ { label: "/workflow:analyze-with-file", description: "Collaborative analysis with documentation" }
146
+ ],
147
+ 'Issue': [
148
+ { label: "/issue:discover", description: "Multi-perspective issue discovery" },
149
+ { label: "/issue:discover-by-prompt", description: "Prompt-based issue discovery with Gemini" },
150
+ { label: "/issue:plan", description: "Plan issue solutions" },
151
+ { label: "/issue:queue", description: "Form execution queue with conflict analysis" },
152
+ { label: "/issue:execute", description: "Execute issue queue with DAG orchestration" },
153
+ { label: "/issue:from-brainstorm", description: "Convert brainstorm to issue" },
154
+ { label: "/issue:convert-to-plan", description: "Convert planning artifacts to issue solutions" }
155
+ ],
156
+ 'Utility': [
157
+ { label: "/workflow:clean", description: "Intelligent code cleanup" },
158
+ { label: "/workflow:init", description: "Initialize project-level state" },
159
+ { label: "/workflow:replan", description: "Interactive workflow replanning" },
160
+ { label: "/workflow:status", description: "Generate workflow status views" }
161
+ ]
162
+ };
163
+
164
+ return await AskUserQuestion({
165
+ questions: [{
166
+ question: `Select ${category} command`,
167
+ header: "Command",
168
+ options: commandOptions[category] || commandOptions['Planning'],
169
+ multiSelect: false
170
+ }]
171
+ });
172
+ }
173
+ ```
174
+
175
+ ### Step 2.3: Select Execution Unit
176
+
177
+ ```javascript
178
+ async function selectExecutionUnit() {
179
+ return await AskUserQuestion({
180
+ questions: [{
181
+ question: "Select execution unit (atomic command group)",
182
+ header: "Unit",
183
+ options: [
184
+ // Planning + Execution Units
185
+ { label: "quick-implementation", description: "【lite-plan → lite-execute】" },
186
+ { label: "multi-cli-planning", description: "【multi-cli-plan → lite-execute】" },
187
+ { label: "full-planning-execution", description: "【plan → execute】" },
188
+ { label: "verified-planning-execution", description: "【plan → plan-verify → execute】" },
189
+ { label: "replanning-execution", description: "【replan → execute】" },
190
+ { label: "tdd-planning-execution", description: "【tdd-plan → execute】" },
191
+ // Testing Units
192
+ { label: "test-validation", description: "【test-fix-gen → test-cycle-execute】" },
193
+ { label: "test-generation-execution", description: "【test-gen → execute】" },
194
+ // Review Units
195
+ { label: "code-review", description: "【review-*-cycle → review-cycle-fix】" },
196
+ // Bug Fix Units
197
+ { label: "bug-fix", description: "【lite-fix → lite-execute】" },
198
+ // Issue Units
199
+ { label: "issue-workflow", description: "【discover → plan → queue → execute】" },
200
+ { label: "rapid-to-issue", description: "【lite-plan → convert-to-plan → queue → execute】" },
201
+ { label: "brainstorm-to-issue", description: "【from-brainstorm → queue → execute】" },
202
+ // With-File Units (self-contained)
203
+ { label: "brainstorm-with-file", description: "Self-contained brainstorming workflow" },
204
+ { label: "debug-with-file", description: "Self-contained debugging workflow" },
205
+ { label: "analyze-with-file", description: "Self-contained analysis workflow" },
206
+ // Standalone
207
+ { label: "standalone", description: "Single command, no atomic grouping" }
208
+ ],
209
+ multiSelect: false
210
+ }]
211
+ });
212
+ }
213
+ ```
214
+
215
+ ### Step 2.4: Select Execution Mode
216
+
217
+ ```javascript
218
+ async function selectExecutionMode() {
219
+ return await AskUserQuestion({
220
+ questions: [{
221
+ question: "Execution mode for this step?",
222
+ header: "Mode",
223
+ options: [
224
+ { label: "mainprocess", description: "Run in main process (blocking, synchronous)" },
225
+ { label: "async", description: "Run asynchronously (background, hook callbacks)" }
226
+ ],
227
+ multiSelect: false
228
+ }]
229
+ });
230
+ }
231
+ ```
232
+
233
+ ### Complete Step Definition Flow
234
+
235
+ ```javascript
236
+ async function defineSteps(templateDesign) {
237
+ // Suggest steps based on purpose
238
+ const suggestedSteps = getSuggestedSteps(templateDesign.purpose);
239
+
240
+ const customize = await AskUserQuestion({
241
+ questions: [{
242
+ question: "Use suggested steps or customize?",
243
+ header: "Steps",
244
+ options: [
245
+ { label: "Use Suggested", description: `Suggested: ${suggestedSteps.map(s => s.cmd).join(' → ')}` },
246
+ { label: "Customize", description: "Modify or add custom steps" },
247
+ { label: "Start Empty", description: "Define all steps from scratch" }
248
+ ],
249
+ multiSelect: false
250
+ }]
251
+ });
252
+
253
+ if (customize.Steps === "Use Suggested") {
254
+ return suggestedSteps;
255
+ }
256
+
257
+ // Interactive step definition
258
+ const steps = [];
259
+ let addMore = true;
260
+ while (addMore) {
261
+ const category = await selectCommandCategory();
262
+ const command = await selectCommand(category.Category);
263
+ const unit = await selectExecutionUnit();
264
+ const execMode = await selectExecutionMode();
265
+ const contextHint = await askContextHint(command.Command);
266
+
267
+ steps.push({
268
+ cmd: command.Command,
269
+ args: command.Command.includes('plan') || command.Command.includes('fix') ? '"{{goal}}"' : undefined,
270
+ unit: unit.Unit,
271
+ execution: {
272
+ type: "slash-command",
273
+ mode: execMode.Mode
274
+ },
275
+ contextHint: contextHint
276
+ });
277
+
278
+ const continueAdding = await AskUserQuestion({
279
+ questions: [{
280
+ question: `Added step ${steps.length}: ${command.Command}. Add another?`,
281
+ header: "Continue",
282
+ options: [
283
+ { label: "Add More", description: "Define another step" },
284
+ { label: "Done", description: "Finish step definition" }
285
+ ],
286
+ multiSelect: false
287
+ }]
288
+ });
289
+ addMore = continueAdding.Continue === "Add More";
290
+ }
291
+
292
+ return steps;
293
+ }
294
+ ```
295
+
296
+ ---
297
+
298
+ ## Suggested Step Templates
299
+
300
+ ### Feature Development (Level 2 - Rapid)
301
+ ```json
302
+ {
303
+ "name": "rapid",
304
+ "description": "Quick implementation with testing",
305
+ "level": 2,
306
+ "steps": [
307
+ { "cmd": "/workflow:lite-plan", "args": "\"{{goal}}\"", "unit": "quick-implementation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Create lightweight implementation plan" },
308
+ { "cmd": "/workflow:lite-execute", "args": "--in-memory", "unit": "quick-implementation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Execute implementation based on plan" },
309
+ { "cmd": "/workflow:test-fix-gen", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate test tasks" },
310
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute test-fix cycle until pass rate >= 95%" }
311
+ ]
312
+ }
313
+ ```
314
+
315
+ ### Feature Development (Level 3 - Coupled)
316
+ ```json
317
+ {
318
+ "name": "coupled",
319
+ "description": "Full workflow with verification, review, and testing",
320
+ "level": 3,
321
+ "steps": [
322
+ { "cmd": "/workflow:plan", "args": "\"{{goal}}\"", "unit": "verified-planning-execution", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Create detailed implementation plan" },
323
+ { "cmd": "/workflow:plan-verify", "unit": "verified-planning-execution", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Verify plan against requirements" },
324
+ { "cmd": "/workflow:execute", "unit": "verified-planning-execution", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute implementation" },
325
+ { "cmd": "/workflow:review-session-cycle", "unit": "code-review", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Multi-dimensional code review" },
326
+ { "cmd": "/workflow:review-cycle-fix", "unit": "code-review", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Fix review findings" },
327
+ { "cmd": "/workflow:test-fix-gen", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate test tasks" },
328
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute test-fix cycle" }
329
+ ]
330
+ }
331
+ ```
332
+
333
+ ### Bug Fix (Level 2)
334
+ ```json
335
+ {
336
+ "name": "bugfix",
337
+ "description": "Bug diagnosis and fix with testing",
338
+ "level": 2,
339
+ "steps": [
340
+ { "cmd": "/workflow:lite-fix", "args": "\"{{goal}}\"", "unit": "bug-fix", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Diagnose and plan bug fix" },
341
+ { "cmd": "/workflow:lite-execute", "args": "--in-memory", "unit": "bug-fix", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Execute bug fix" },
342
+ { "cmd": "/workflow:test-fix-gen", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate regression tests" },
343
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Verify fix with tests" }
344
+ ]
345
+ }
346
+ ```
347
+
348
+ ### Bug Fix Hotfix (Level 2)
349
+ ```json
350
+ {
351
+ "name": "bugfix-hotfix",
352
+ "description": "Urgent production bug fix (no tests)",
353
+ "level": 2,
354
+ "steps": [
355
+ { "cmd": "/workflow:lite-fix", "args": "--hotfix \"{{goal}}\"", "unit": "standalone", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Emergency hotfix mode" }
356
+ ]
357
+ }
358
+ ```
359
+
360
+ ### TDD Development (Level 3)
361
+ ```json
362
+ {
363
+ "name": "tdd",
364
+ "description": "Test-driven development with Red-Green-Refactor",
365
+ "level": 3,
366
+ "steps": [
367
+ { "cmd": "/workflow:tdd-plan", "args": "\"{{goal}}\"", "unit": "tdd-planning-execution", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Create TDD task chain" },
368
+ { "cmd": "/workflow:execute", "unit": "tdd-planning-execution", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute TDD cycle" },
369
+ { "cmd": "/workflow:tdd-verify", "unit": "standalone", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Verify TDD compliance" }
370
+ ]
371
+ }
372
+ ```
373
+
374
+ ### Code Review (Level 3)
375
+ ```json
376
+ {
377
+ "name": "review",
378
+ "description": "Code review cycle with fixes and testing",
379
+ "level": 3,
380
+ "steps": [
381
+ { "cmd": "/workflow:review-session-cycle", "unit": "code-review", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Multi-dimensional code review" },
382
+ { "cmd": "/workflow:review-cycle-fix", "unit": "code-review", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Fix review findings" },
383
+ { "cmd": "/workflow:test-fix-gen", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate tests for fixes" },
384
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Verify fixes pass tests" }
385
+ ]
386
+ }
387
+ ```
388
+
389
+ ### Test Fix (Level 3)
390
+ ```json
391
+ {
392
+ "name": "test-fix",
393
+ "description": "Fix failing tests",
394
+ "level": 3,
395
+ "steps": [
396
+ { "cmd": "/workflow:test-fix-gen", "args": "\"{{goal}}\"", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate test fix tasks" },
397
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute test-fix cycle" }
398
+ ]
399
+ }
400
+ ```
401
+
402
+ ### Issue Workflow (Level Issue)
403
+ ```json
404
+ {
405
+ "name": "issue",
406
+ "description": "Complete issue lifecycle",
407
+ "level": "Issue",
408
+ "steps": [
409
+ { "cmd": "/issue:discover", "unit": "issue-workflow", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Discover issues from codebase" },
410
+ { "cmd": "/issue:plan", "args": "--all-pending", "unit": "issue-workflow", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Plan issue solutions" },
411
+ { "cmd": "/issue:queue", "unit": "issue-workflow", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Form execution queue" },
412
+ { "cmd": "/issue:execute", "unit": "issue-workflow", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute issue queue" }
413
+ ]
414
+ }
415
+ ```
416
+
417
+ ### Rapid to Issue (Level 2.5)
418
+ ```json
419
+ {
420
+ "name": "rapid-to-issue",
421
+ "description": "Bridge lightweight planning to issue workflow",
422
+ "level": 2,
423
+ "steps": [
424
+ { "cmd": "/workflow:lite-plan", "args": "\"{{goal}}\"", "unit": "rapid-to-issue", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Create lightweight plan" },
425
+ { "cmd": "/issue:convert-to-plan", "args": "--latest-lite-plan -y", "unit": "rapid-to-issue", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Convert to issue plan" },
426
+ { "cmd": "/issue:queue", "unit": "rapid-to-issue", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Form execution queue" },
427
+ { "cmd": "/issue:execute", "args": "--queue auto", "unit": "rapid-to-issue", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute issue queue" }
428
+ ]
429
+ }
430
+ ```
431
+
432
+ ### Brainstorm to Issue (Level 4)
433
+ ```json
434
+ {
435
+ "name": "brainstorm-to-issue",
436
+ "description": "Bridge brainstorm session to issue workflow",
437
+ "level": 4,
438
+ "steps": [
439
+ { "cmd": "/issue:from-brainstorm", "args": "SESSION=\"{{session}}\" --auto", "unit": "brainstorm-to-issue", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Convert brainstorm to issue" },
440
+ { "cmd": "/issue:queue", "unit": "brainstorm-to-issue", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Form execution queue" },
441
+ { "cmd": "/issue:execute", "args": "--queue auto", "unit": "brainstorm-to-issue", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute issue queue" }
442
+ ]
443
+ }
444
+ ```
445
+
446
+ ### With-File: Brainstorm (Level 4)
447
+ ```json
448
+ {
449
+ "name": "brainstorm",
450
+ "description": "Multi-perspective ideation with documentation",
451
+ "level": 4,
452
+ "steps": [
453
+ { "cmd": "/workflow:brainstorm-with-file", "args": "\"{{goal}}\"", "unit": "brainstorm-with-file", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Multi-CLI brainstorming with documented diverge-converge cycles" }
454
+ ]
455
+ }
456
+ ```
457
+
458
+ ### With-File: Debug (Level 3)
459
+ ```json
460
+ {
461
+ "name": "debug",
462
+ "description": "Hypothesis-driven debugging with documentation",
463
+ "level": 3,
464
+ "steps": [
465
+ { "cmd": "/workflow:debug-with-file", "args": "\"{{goal}}\"", "unit": "debug-with-file", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Hypothesis-driven debugging with Gemini validation" }
466
+ ]
467
+ }
468
+ ```
469
+
470
+ ### With-File: Analyze (Level 3)
471
+ ```json
472
+ {
473
+ "name": "analyze",
474
+ "description": "Collaborative analysis with documentation",
475
+ "level": 3,
476
+ "steps": [
477
+ { "cmd": "/workflow:analyze-with-file", "args": "\"{{goal}}\"", "unit": "analyze-with-file", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Multi-round collaborative analysis with CLI exploration" }
478
+ ]
479
+ }
480
+ ```
481
+
482
+ ### Full Workflow (Level 4)
483
+ ```json
484
+ {
485
+ "name": "full",
486
+ "description": "Complete workflow: brainstorm → plan → execute → test",
487
+ "level": 4,
488
+ "steps": [
489
+ { "cmd": "/workflow:brainstorm:auto-parallel", "args": "\"{{goal}}\"", "unit": "standalone", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Parallel multi-perspective brainstorming" },
490
+ { "cmd": "/workflow:plan", "unit": "verified-planning-execution", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Create detailed plan from brainstorm" },
491
+ { "cmd": "/workflow:plan-verify", "unit": "verified-planning-execution", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Verify plan quality" },
492
+ { "cmd": "/workflow:execute", "unit": "verified-planning-execution", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute implementation" },
493
+ { "cmd": "/workflow:test-fix-gen", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate comprehensive tests" },
494
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute test cycle" }
495
+ ]
496
+ }
497
+ ```
498
+
499
+ ### Multi-CLI Planning (Level 3)
500
+ ```json
501
+ {
502
+ "name": "multi-cli-plan",
503
+ "description": "Multi-CLI collaborative planning with cross-verification",
504
+ "level": 3,
505
+ "steps": [
506
+ { "cmd": "/workflow:multi-cli-plan", "args": "\"{{goal}}\"", "unit": "multi-cli-planning", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Gemini+Codex+Claude collaborative planning" },
507
+ { "cmd": "/workflow:lite-execute", "args": "--in-memory", "unit": "multi-cli-planning", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Execute converged plan" },
508
+ { "cmd": "/workflow:test-fix-gen", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Generate tests" },
509
+ { "cmd": "/workflow:test-cycle-execute", "unit": "test-validation", "execution": { "type": "slash-command", "mode": "async" }, "contextHint": "Execute test cycle" }
510
+ ]
511
+ }
512
+ ```
513
+
514
+ ### Ultra-Lightweight (Level 1)
515
+ ```json
516
+ {
517
+ "name": "lite-lite-lite",
518
+ "description": "Ultra-lightweight multi-tool execution",
519
+ "level": 1,
520
+ "steps": [
521
+ { "cmd": "/workflow:lite-lite-lite", "args": "\"{{goal}}\"", "unit": "standalone", "execution": { "type": "slash-command", "mode": "mainprocess" }, "contextHint": "Direct execution with minimal overhead" }
522
+ ]
523
+ }
524
+ ```
525
+
526
+ ---
527
+
528
+ ## Command Port Reference
529
+
530
+ Each command has input/output ports for pipeline composition:
531
+
532
+ | Command | Input Port | Output Port | Atomic Unit |
533
+ |---------|------------|-------------|-------------|
534
+ | **Planning** |
535
+ | lite-plan | requirement | plan | quick-implementation |
536
+ | plan | requirement | detailed-plan | full-planning-execution |
537
+ | plan-verify | detailed-plan | verified-plan | verified-planning-execution |
538
+ | multi-cli-plan | requirement | multi-cli-plan | multi-cli-planning |
539
+ | tdd-plan | requirement | tdd-tasks | tdd-planning-execution |
540
+ | replan | session, feedback | replan | replanning-execution |
541
+ | **Execution** |
542
+ | lite-execute | plan, multi-cli-plan, lite-fix | code | (multiple) |
543
+ | execute | detailed-plan, verified-plan, replan, tdd-tasks | code | (multiple) |
544
+ | **Testing** |
545
+ | test-fix-gen | failing-tests, session | test-tasks | test-validation |
546
+ | test-cycle-execute | test-tasks | test-passed | test-validation |
547
+ | test-gen | code, session | test-tasks | test-generation-execution |
548
+ | tdd-verify | code | tdd-verified | standalone |
549
+ | **Review** |
550
+ | review-session-cycle | code, session | review-verified | code-review |
551
+ | review-module-cycle | module-pattern | review-verified | code-review |
552
+ | review-cycle-fix | review-findings | fixed-code | code-review |
553
+ | **Bug Fix** |
554
+ | lite-fix | bug-report | lite-fix | bug-fix |
555
+ | debug-with-file | bug-report | understanding-document | debug-with-file |
556
+ | **With-File** |
557
+ | brainstorm-with-file | exploration-topic | brainstorm-document | brainstorm-with-file |
558
+ | analyze-with-file | analysis-topic | discussion-document | analyze-with-file |
559
+ | **Issue** |
560
+ | issue:discover | codebase | pending-issues | issue-workflow |
561
+ | issue:plan | pending-issues | issue-plans | issue-workflow |
562
+ | issue:queue | issue-plans, converted-plan | execution-queue | issue-workflow |
563
+ | issue:execute | execution-queue | completed-issues | issue-workflow |
564
+ | issue:convert-to-plan | plan | converted-plan | rapid-to-issue |
565
+ | issue:from-brainstorm | brainstorm-document | converted-plan | brainstorm-to-issue |
566
+
567
+ ---
568
+
569
+ ## Minimum Execution Units (最小执行单元)
570
+
571
+ **Definition**: Commands that must execute together as an atomic group.
572
+
573
+ | Unit Name | Commands | Purpose |
574
+ |-----------|----------|---------|
575
+ | **quick-implementation** | lite-plan → lite-execute | Lightweight plan and execution |
576
+ | **multi-cli-planning** | multi-cli-plan → lite-execute | Multi-perspective planning and execution |
577
+ | **bug-fix** | lite-fix → lite-execute | Bug diagnosis and fix |
578
+ | **full-planning-execution** | plan → execute | Detailed planning and execution |
579
+ | **verified-planning-execution** | plan → plan-verify → execute | Planning with verification |
580
+ | **replanning-execution** | replan → execute | Update plan and execute |
581
+ | **tdd-planning-execution** | tdd-plan → execute | TDD planning and execution |
582
+ | **test-validation** | test-fix-gen → test-cycle-execute | Test generation and fix cycle |
583
+ | **test-generation-execution** | test-gen → execute | Generate and execute tests |
584
+ | **code-review** | review-*-cycle → review-cycle-fix | Review and fix findings |
585
+ | **issue-workflow** | discover → plan → queue → execute | Complete issue lifecycle |
586
+ | **rapid-to-issue** | lite-plan → convert-to-plan → queue → execute | Bridge to issue workflow |
587
+ | **brainstorm-to-issue** | from-brainstorm → queue → execute | Brainstorm to issue bridge |
588
+ | **brainstorm-with-file** | (self-contained) | Multi-perspective ideation |
589
+ | **debug-with-file** | (self-contained) | Hypothesis-driven debugging |
590
+ | **analyze-with-file** | (self-contained) | Collaborative analysis |
591
+
592
+ ---
593
+
594
+ ## Phase 3: Generate JSON
595
+
596
+ ```javascript
597
+ async function generateTemplate(design, steps, outputPath) {
598
+ const template = {
599
+ name: design.name,
600
+ description: design.description,
601
+ level: design.level,
602
+ steps: steps
603
+ };
604
+
605
+ const finalPath = outputPath || `~/.claude/skills/flow-coordinator/templates/${design.name}.json`;
606
+
607
+ // Write template
608
+ Write(finalPath, JSON.stringify(template, null, 2));
609
+
610
+ // Validate
611
+ const validation = validateTemplate(template);
612
+
613
+ console.log(`✅ Template created: ${finalPath}`);
614
+ console.log(` Steps: ${template.steps.length}`);
615
+ console.log(` Level: ${template.level}`);
616
+ console.log(` Units: ${[...new Set(template.steps.map(s => s.unit))].join(', ')}`);
617
+
618
+ return { path: finalPath, template, validation };
619
+ }
620
+ ```
621
+
622
+ ---
623
+
624
+ ## Output Format
625
+
626
+ ```json
627
+ {
628
+ "name": "template-name",
629
+ "description": "Template description",
630
+ "level": 2,
631
+ "steps": [
632
+ {
633
+ "cmd": "/workflow:command",
634
+ "args": "\"{{goal}}\"",
635
+ "unit": "unit-name",
636
+ "execution": {
637
+ "type": "slash-command",
638
+ "mode": "mainprocess"
639
+ },
640
+ "contextHint": "Description of what this step does"
641
+ }
642
+ ]
643
+ }
644
+ ```
645
+
646
+ ---
647
+
648
+ ## Examples
649
+
650
+ **Create a quick bugfix template**:
651
+ ```
652
+ /meta-skill:flow-create hotfix-simple
653
+
654
+ → Purpose: Bug Fix
655
+ → Level: 2 (Lightweight)
656
+ → Steps: Use Suggested
657
+ → Output: ~/.claude/skills/flow-coordinator/templates/hotfix-simple.json
658
+ ```
659
+
660
+ **Create a custom multi-stage workflow**:
661
+ ```
662
+ /meta-skill:flow-create complex-feature --output ~/.claude/skills/my-project/templates/
663
+
664
+ → Purpose: Feature Development
665
+ → Level: 3 (Standard)
666
+ → Steps: Customize
667
+ → Step 1: /workflow:brainstorm:auto-parallel (standalone, mainprocess)
668
+ → Step 2: /workflow:plan (verified-planning-execution, mainprocess)
669
+ → Step 3: /workflow:plan-verify (verified-planning-execution, mainprocess)
670
+ → Step 4: /workflow:execute (verified-planning-execution, async)
671
+ → Step 5: /workflow:review-session-cycle (code-review, mainprocess)
672
+ → Step 6: /workflow:review-cycle-fix (code-review, mainprocess)
673
+ → Done
674
+ → Output: ~/.claude/skills/my-project/templates/complex-feature.json
675
+ ```