claude-code-workflow 6.3.26 → 6.3.28

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 (129) hide show
  1. package/.claude/CLAUDE.md +7 -1
  2. package/.claude/agents/action-planning-agent.md +1 -0
  3. package/.claude/agents/cli-discuss-agent.md +391 -0
  4. package/.claude/agents/cli-execution-agent.md +2 -0
  5. package/.claude/agents/cli-explore-agent.md +2 -1
  6. package/.claude/agents/cli-lite-planning-agent.md +1 -0
  7. package/.claude/agents/cli-planning-agent.md +1 -0
  8. package/.claude/agents/code-developer.md +1 -0
  9. package/.claude/agents/conceptual-planning-agent.md +2 -0
  10. package/.claude/agents/context-search-agent.md +1 -0
  11. package/.claude/agents/debug-explore-agent.md +2 -0
  12. package/.claude/agents/doc-generator.md +1 -0
  13. package/.claude/agents/issue-plan-agent.md +2 -1
  14. package/.claude/agents/issue-queue-agent.md +2 -1
  15. package/.claude/agents/memory-bridge.md +2 -0
  16. package/.claude/agents/test-context-search-agent.md +2 -0
  17. package/.claude/agents/test-fix-agent.md +1 -0
  18. package/.claude/agents/ui-design-agent.md +2 -0
  19. package/.claude/agents/universal-executor.md +1 -0
  20. package/.claude/commands/issue/execute.md +141 -163
  21. package/.claude/commands/workflow/lite-lite-lite.md +798 -0
  22. package/.claude/commands/workflow/multi-cli-plan.md +510 -0
  23. package/.claude/skills/ccw/SKILL.md +262 -372
  24. package/.claude/skills/ccw/command.json +547 -0
  25. package/.claude/skills/ccw-help/SKILL.md +46 -107
  26. package/.claude/skills/ccw-help/command.json +511 -0
  27. package/.claude/skills/skill-tuning/SKILL.md +303 -0
  28. package/.claude/skills/skill-tuning/phases/actions/action-abort.md +164 -0
  29. package/.claude/skills/skill-tuning/phases/actions/action-analyze-requirements.md +406 -0
  30. package/.claude/skills/skill-tuning/phases/actions/action-apply-fix.md +206 -0
  31. package/.claude/skills/skill-tuning/phases/actions/action-complete.md +195 -0
  32. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md +317 -0
  33. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-context.md +243 -0
  34. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-dataflow.md +318 -0
  35. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-docs.md +299 -0
  36. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-memory.md +269 -0
  37. package/.claude/skills/skill-tuning/phases/actions/action-diagnose-token-consumption.md +200 -0
  38. package/.claude/skills/skill-tuning/phases/actions/action-gemini-analysis.md +322 -0
  39. package/.claude/skills/skill-tuning/phases/actions/action-generate-report.md +228 -0
  40. package/.claude/skills/skill-tuning/phases/actions/action-init.md +149 -0
  41. package/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md +317 -0
  42. package/.claude/skills/skill-tuning/phases/actions/action-verify.md +222 -0
  43. package/.claude/skills/skill-tuning/phases/orchestrator.md +377 -0
  44. package/.claude/skills/skill-tuning/phases/state-schema.md +378 -0
  45. package/.claude/skills/skill-tuning/specs/category-mappings.json +284 -0
  46. package/.claude/skills/skill-tuning/specs/dimension-mapping.md +212 -0
  47. package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +318 -0
  48. package/.claude/skills/skill-tuning/specs/quality-gates.md +263 -0
  49. package/.claude/skills/skill-tuning/specs/skill-authoring-principles.md +189 -0
  50. package/.claude/skills/skill-tuning/specs/tuning-strategies.md +1537 -0
  51. package/.claude/skills/skill-tuning/templates/diagnosis-report.md +153 -0
  52. package/.claude/skills/skill-tuning/templates/fix-proposal.md +204 -0
  53. package/.claude/workflows/cli-templates/schemas/multi-cli-discussion-schema.json +421 -0
  54. package/.claude/workflows/cli-tools-usage.md +0 -41
  55. package/ccw/dist/core/auth/csrf-middleware.d.ts.map +1 -1
  56. package/ccw/dist/core/auth/csrf-middleware.js +3 -1
  57. package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
  58. package/ccw/dist/core/data-aggregator.d.ts +2 -0
  59. package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
  60. package/ccw/dist/core/data-aggregator.js +5 -2
  61. package/ccw/dist/core/data-aggregator.js.map +1 -1
  62. package/ccw/dist/core/lite-scanner.d.ts +2 -1
  63. package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
  64. package/ccw/dist/core/lite-scanner.js +295 -6
  65. package/ccw/dist/core/lite-scanner.js.map +1 -1
  66. package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
  67. package/ccw/dist/core/routes/codexlens/config-handlers.js +5 -5
  68. package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
  69. package/ccw/dist/core/routes/session-routes.d.ts.map +1 -1
  70. package/ccw/dist/core/routes/session-routes.js +166 -48
  71. package/ccw/dist/core/routes/session-routes.js.map +1 -1
  72. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
  73. package/ccw/dist/core/routes/system-routes.js +87 -0
  74. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  75. package/ccw/dist/core/server.js +2 -2
  76. package/ccw/dist/core/server.js.map +1 -1
  77. package/ccw/scripts/IMPLEMENTATION-SUMMARY.md +226 -0
  78. package/ccw/scripts/QUICK-REFERENCE.md +135 -0
  79. package/ccw/scripts/README-memory-embedder.md +157 -0
  80. package/ccw/scripts/__pycache__/memory_embedder.cpython-313.pyc +0 -0
  81. package/ccw/scripts/__pycache__/test_memory_embedder.cpython-313-pytest-8.4.2.pyc +0 -0
  82. package/ccw/scripts/memory-embedder-example.ts +184 -0
  83. package/ccw/scripts/memory_embedder.py +428 -0
  84. package/ccw/scripts/test_memory_embedder.py +245 -0
  85. package/ccw/src/core/auth/csrf-middleware.ts +3 -1
  86. package/ccw/src/core/data-aggregator.ts +7 -2
  87. package/ccw/src/core/lite-scanner.ts +440 -6
  88. package/ccw/src/core/routes/codexlens/config-handlers.ts +12 -9
  89. package/ccw/src/core/routes/session-routes.ts +201 -48
  90. package/ccw/src/core/routes/system-routes.ts +102 -0
  91. package/ccw/src/core/server.ts +2 -2
  92. package/ccw/src/templates/dashboard-css/01-base.css +8 -0
  93. package/ccw/src/templates/dashboard-css/02-session.css +81 -0
  94. package/ccw/src/templates/dashboard-css/04-lite-tasks.css +2442 -0
  95. package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +157 -0
  96. package/ccw/src/templates/dashboard-css/32-issue-manager.css +23 -0
  97. package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +38 -4
  98. package/ccw/src/templates/dashboard-js/components/hook-manager.js +38 -13
  99. package/ccw/src/templates/dashboard-js/components/navigation.js +24 -4
  100. package/ccw/src/templates/dashboard-js/i18n.js +194 -6
  101. package/ccw/src/templates/dashboard-js/views/api-settings.js +32 -0
  102. package/ccw/src/templates/dashboard-js/views/claude-manager.js +44 -3
  103. package/ccw/src/templates/dashboard-js/views/cli-manager.js +303 -31
  104. package/ccw/src/templates/dashboard-js/views/history.js +44 -6
  105. package/ccw/src/templates/dashboard-js/views/home.js +1 -0
  106. package/ccw/src/templates/dashboard-js/views/issue-manager.js +54 -7
  107. package/ccw/src/templates/dashboard-js/views/lite-tasks.js +1817 -4
  108. package/ccw/src/templates/dashboard.html +5 -0
  109. package/package.json +2 -1
  110. package/.claude/skills/ccw/index/command-capabilities.json +0 -127
  111. package/.claude/skills/ccw/index/intent-rules.json +0 -136
  112. package/.claude/skills/ccw/index/workflow-chains.json +0 -451
  113. package/.claude/skills/ccw/phases/actions/bugfix.md +0 -218
  114. package/.claude/skills/ccw/phases/actions/coupled.md +0 -194
  115. package/.claude/skills/ccw/phases/actions/docs.md +0 -93
  116. package/.claude/skills/ccw/phases/actions/full.md +0 -154
  117. package/.claude/skills/ccw/phases/actions/issue.md +0 -201
  118. package/.claude/skills/ccw/phases/actions/rapid.md +0 -104
  119. package/.claude/skills/ccw/phases/actions/review-fix.md +0 -84
  120. package/.claude/skills/ccw/phases/actions/tdd.md +0 -66
  121. package/.claude/skills/ccw/phases/actions/ui.md +0 -79
  122. package/.claude/skills/ccw/phases/orchestrator.md +0 -435
  123. package/.claude/skills/ccw/specs/intent-classification.md +0 -336
  124. package/.claude/skills/ccw-help/index/all-agents.json +0 -82
  125. package/.claude/skills/ccw-help/index/all-commands.json +0 -882
  126. package/.claude/skills/ccw-help/index/by-category.json +0 -914
  127. package/.claude/skills/ccw-help/index/by-use-case.json +0 -896
  128. package/.claude/skills/ccw-help/index/command-relationships.json +0 -160
  129. package/.claude/skills/ccw-help/index/essential-commands.json +0 -112
@@ -1,451 +0,0 @@
1
- {
2
- "_metadata": {
3
- "version": "1.1.0",
4
- "description": "Predefined workflow chains with CLI tool integration for CCW orchestration"
5
- },
6
- "cli_tools": {
7
- "_doc": "CLI工具是CCW的核心能力,在合适时机自动调用以获得:1)较少token获取大量上下文 2)引入不同模型视角 3)增强debug和规划能力",
8
- "gemini": {
9
- "strengths": ["超长上下文", "深度分析", "架构理解", "执行流追踪"],
10
- "triggers": ["分析", "理解", "设计", "架构", "评估", "诊断"],
11
- "mode": "analysis",
12
- "token_efficiency": "high",
13
- "use_when": [
14
- "需要理解大型代码库结构",
15
- "执行流追踪和数据流分析",
16
- "架构设计和技术方案评估",
17
- "复杂问题诊断(root cause analysis)"
18
- ]
19
- },
20
- "qwen": {
21
- "strengths": ["超长上下文", "代码模式识别", "多维度分析"],
22
- "triggers": ["评估", "对比", "验证"],
23
- "mode": "analysis",
24
- "token_efficiency": "high",
25
- "use_when": [
26
- "Gemini 不可用时作为备选",
27
- "需要第二视角验证分析结果",
28
- "代码模式识别和重复检测"
29
- ]
30
- },
31
- "codex": {
32
- "strengths": ["精确代码生成", "自主执行", "数学推理"],
33
- "triggers": ["实现", "重构", "修复", "生成", "测试"],
34
- "mode": "write",
35
- "token_efficiency": "medium",
36
- "use_when": [
37
- "需要自主完成多步骤代码修改",
38
- "复杂重构和迁移任务",
39
- "测试生成和修复循环"
40
- ]
41
- }
42
- },
43
- "cli_injection_rules": {
44
- "_doc": "隐式规则:在特定条件下自动注入CLI调用",
45
- "context_gathering": {
46
- "trigger": "file_read >= 50k chars OR module_count >= 5",
47
- "inject": "gemini --mode analysis",
48
- "reason": "大量代码上下文使用CLI可节省主会话token"
49
- },
50
- "pre_planning_analysis": {
51
- "trigger": "complexity === 'high' OR intent === 'exploration'",
52
- "inject": "gemini --mode analysis",
53
- "reason": "复杂任务先用CLI分析获取多模型视角"
54
- },
55
- "debug_diagnosis": {
56
- "trigger": "intent === 'bugfix' AND root_cause_unclear",
57
- "inject": "gemini --mode analysis",
58
- "reason": "深度诊断利用Gemini的执行流追踪能力"
59
- },
60
- "code_review": {
61
- "trigger": "step === 'review'",
62
- "inject": "gemini --mode analysis",
63
- "reason": "代码审查用CLI减少token占用"
64
- },
65
- "implementation": {
66
- "trigger": "step === 'execute' AND task_count >= 3",
67
- "inject": "codex --mode write",
68
- "reason": "多任务执行用Codex自主完成"
69
- }
70
- },
71
- "chains": {
72
- "rapid": {
73
- "name": "Rapid Iteration",
74
- "description": "多模型协作分析 + 直接执行",
75
- "complexity": ["low", "medium"],
76
- "steps": [
77
- {
78
- "command": "/workflow:lite-plan",
79
- "optional": false,
80
- "auto_continue": true,
81
- "cli_hint": {
82
- "explore_phase": { "tool": "gemini", "mode": "analysis", "trigger": "needs_exploration" },
83
- "planning_phase": { "tool": "gemini", "mode": "analysis", "trigger": "complexity >= medium" }
84
- }
85
- },
86
- {
87
- "command": "/workflow:lite-execute",
88
- "optional": false,
89
- "auto_continue": false,
90
- "cli_hint": {
91
- "execution": { "tool": "codex", "mode": "write", "trigger": "user_selects_codex OR complexity >= medium" },
92
- "review": { "tool": "gemini", "mode": "analysis", "trigger": "user_selects_review" }
93
- }
94
- }
95
- ],
96
- "total_steps": 2,
97
- "estimated_time": "15-45 min"
98
- },
99
- "full": {
100
- "name": "Full Exploration",
101
- "description": "多模型深度分析 + 头脑风暴 + 规划 + 执行",
102
- "complexity": ["medium", "high"],
103
- "steps": [
104
- {
105
- "command": "/workflow:brainstorm:auto-parallel",
106
- "optional": false,
107
- "confirm_before": true,
108
- "cli_hint": {
109
- "role_analysis": { "tool": "gemini", "mode": "analysis", "trigger": "always", "parallel": true }
110
- }
111
- },
112
- {
113
- "command": "/workflow:plan",
114
- "optional": false,
115
- "auto_continue": false,
116
- "cli_hint": {
117
- "context_gather": { "tool": "gemini", "mode": "analysis", "trigger": "always" },
118
- "task_generation": { "tool": "gemini", "mode": "analysis", "trigger": "always" }
119
- }
120
- },
121
- { "command": "/workflow:action-plan-verify", "optional": true, "auto_continue": true },
122
- {
123
- "command": "/workflow:execute",
124
- "optional": false,
125
- "auto_continue": false,
126
- "cli_hint": {
127
- "execution": { "tool": "codex", "mode": "write", "trigger": "task_count >= 3" }
128
- }
129
- }
130
- ],
131
- "total_steps": 4,
132
- "estimated_time": "1-3 hours"
133
- },
134
- "coupled": {
135
- "name": "Coupled Planning",
136
- "description": "CLI深度分析 + 完整规划 + 验证 + 执行",
137
- "complexity": ["high"],
138
- "steps": [
139
- {
140
- "command": "/workflow:plan",
141
- "optional": false,
142
- "auto_continue": false,
143
- "cli_hint": {
144
- "pre_analysis": { "tool": "gemini", "mode": "analysis", "trigger": "always", "purpose": "架构理解和依赖分析" },
145
- "conflict_detection": { "tool": "gemini", "mode": "analysis", "trigger": "always" }
146
- }
147
- },
148
- { "command": "/workflow:action-plan-verify", "optional": false, "auto_continue": true },
149
- {
150
- "command": "/workflow:execute",
151
- "optional": false,
152
- "auto_continue": false,
153
- "cli_hint": {
154
- "execution": { "tool": "codex", "mode": "write", "trigger": "always", "purpose": "自主多任务执行" }
155
- }
156
- },
157
- {
158
- "command": "/workflow:review",
159
- "optional": true,
160
- "auto_continue": false,
161
- "cli_hint": {
162
- "review": { "tool": "gemini", "mode": "analysis", "trigger": "always" }
163
- }
164
- }
165
- ],
166
- "total_steps": 4,
167
- "estimated_time": "2-4 hours"
168
- },
169
- "bugfix": {
170
- "name": "Bug Fix",
171
- "description": "CLI诊断 + 智能修复",
172
- "complexity": ["low", "medium"],
173
- "variants": {
174
- "standard": {
175
- "steps": [
176
- {
177
- "command": "/workflow:lite-fix",
178
- "optional": false,
179
- "auto_continue": true,
180
- "cli_hint": {
181
- "diagnosis": { "tool": "gemini", "mode": "analysis", "trigger": "always", "purpose": "根因分析和执行流追踪" },
182
- "fix": { "tool": "codex", "mode": "write", "trigger": "severity >= medium" }
183
- }
184
- }
185
- ]
186
- },
187
- "hotfix": {
188
- "steps": [
189
- {
190
- "command": "/workflow:lite-fix --hotfix",
191
- "optional": false,
192
- "auto_continue": true,
193
- "cli_hint": {
194
- "quick_diagnosis": { "tool": "gemini", "mode": "analysis", "trigger": "always", "timeout": "60s" }
195
- }
196
- }
197
- ]
198
- }
199
- },
200
- "total_steps": 1,
201
- "estimated_time": "10-30 min"
202
- },
203
- "issue": {
204
- "name": "Issue Batch",
205
- "description": "CLI批量分析 + 队列优化 + 并行执行",
206
- "complexity": ["medium", "high"],
207
- "steps": [
208
- {
209
- "command": "/issue:plan",
210
- "optional": false,
211
- "auto_continue": false,
212
- "cli_hint": {
213
- "solution_generation": { "tool": "gemini", "mode": "analysis", "trigger": "always", "parallel": true }
214
- }
215
- },
216
- {
217
- "command": "/issue:queue",
218
- "optional": false,
219
- "auto_continue": false,
220
- "cli_hint": {
221
- "conflict_analysis": { "tool": "gemini", "mode": "analysis", "trigger": "issue_count >= 3" }
222
- }
223
- },
224
- {
225
- "command": "/issue:execute",
226
- "optional": false,
227
- "auto_continue": false,
228
- "cli_hint": {
229
- "batch_execution": { "tool": "codex", "mode": "write", "trigger": "always", "purpose": "DAG并行执行" }
230
- }
231
- }
232
- ],
233
- "total_steps": 3,
234
- "estimated_time": "1-4 hours"
235
- },
236
- "tdd": {
237
- "name": "Test-Driven Development",
238
- "description": "TDD规划 + 执行 + CLI验证",
239
- "complexity": ["medium", "high"],
240
- "steps": [
241
- {
242
- "command": "/workflow:tdd-plan",
243
- "optional": false,
244
- "auto_continue": false,
245
- "cli_hint": {
246
- "test_strategy": { "tool": "gemini", "mode": "analysis", "trigger": "always" }
247
- }
248
- },
249
- {
250
- "command": "/workflow:execute",
251
- "optional": false,
252
- "auto_continue": false,
253
- "cli_hint": {
254
- "red_green_refactor": { "tool": "codex", "mode": "write", "trigger": "always" }
255
- }
256
- },
257
- {
258
- "command": "/workflow:tdd-verify",
259
- "optional": false,
260
- "auto_continue": false,
261
- "cli_hint": {
262
- "coverage_analysis": { "tool": "gemini", "mode": "analysis", "trigger": "always" }
263
- }
264
- }
265
- ],
266
- "total_steps": 3,
267
- "estimated_time": "1-3 hours"
268
- },
269
- "ui": {
270
- "name": "UI-First Development",
271
- "description": "UI设计 + 规划 + 执行",
272
- "complexity": ["medium", "high"],
273
- "variants": {
274
- "explore": {
275
- "steps": [
276
- { "command": "/workflow:ui-design:explore-auto", "optional": false, "auto_continue": false },
277
- { "command": "/workflow:ui-design:design-sync", "optional": false, "auto_continue": true },
278
- { "command": "/workflow:plan", "optional": false, "auto_continue": false },
279
- { "command": "/workflow:execute", "optional": false, "auto_continue": false }
280
- ]
281
- },
282
- "imitate": {
283
- "steps": [
284
- { "command": "/workflow:ui-design:imitate-auto", "optional": false, "auto_continue": false },
285
- { "command": "/workflow:ui-design:design-sync", "optional": false, "auto_continue": true },
286
- { "command": "/workflow:plan", "optional": false, "auto_continue": false },
287
- { "command": "/workflow:execute", "optional": false, "auto_continue": false }
288
- ]
289
- }
290
- },
291
- "total_steps": 4,
292
- "estimated_time": "2-4 hours"
293
- },
294
- "review-fix": {
295
- "name": "Review and Fix",
296
- "description": "CLI多维审查 + 自动修复",
297
- "complexity": ["medium"],
298
- "steps": [
299
- {
300
- "command": "/workflow:review-session-cycle",
301
- "optional": false,
302
- "auto_continue": false,
303
- "cli_hint": {
304
- "multi_dimension_review": { "tool": "gemini", "mode": "analysis", "trigger": "always", "parallel": true }
305
- }
306
- },
307
- {
308
- "command": "/workflow:review-fix",
309
- "optional": true,
310
- "auto_continue": false,
311
- "cli_hint": {
312
- "auto_fix": { "tool": "codex", "mode": "write", "trigger": "findings_count >= 3" }
313
- }
314
- }
315
- ],
316
- "total_steps": 2,
317
- "estimated_time": "30-90 min"
318
- },
319
- "docs": {
320
- "name": "Documentation",
321
- "description": "CLI批量文档生成",
322
- "complexity": ["low", "medium"],
323
- "variants": {
324
- "incremental": {
325
- "steps": [
326
- {
327
- "command": "/memory:update-related",
328
- "optional": false,
329
- "auto_continue": false,
330
- "cli_hint": {
331
- "doc_generation": { "tool": "gemini", "mode": "write", "trigger": "module_count >= 5" }
332
- }
333
- }
334
- ]
335
- },
336
- "full": {
337
- "steps": [
338
- { "command": "/memory:docs", "optional": false, "auto_continue": false },
339
- {
340
- "command": "/workflow:execute",
341
- "optional": false,
342
- "auto_continue": false,
343
- "cli_hint": {
344
- "batch_doc": { "tool": "gemini", "mode": "write", "trigger": "always" }
345
- }
346
- }
347
- ]
348
- }
349
- },
350
- "total_steps": 2,
351
- "estimated_time": "15-60 min"
352
- },
353
- "cli-analysis": {
354
- "name": "CLI Direct Analysis",
355
- "description": "直接CLI分析,获取多模型视角,节省主会话token",
356
- "complexity": ["low", "medium", "high"],
357
- "standalone": true,
358
- "steps": [
359
- {
360
- "command": "ccw cli",
361
- "tool": "gemini",
362
- "mode": "analysis",
363
- "optional": false,
364
- "auto_continue": false
365
- }
366
- ],
367
- "use_cases": [
368
- "大型代码库快速理解",
369
- "执行流追踪和数据流分析",
370
- "架构评估和技术方案对比",
371
- "性能瓶颈诊断"
372
- ],
373
- "total_steps": 1,
374
- "estimated_time": "5-15 min"
375
- },
376
- "cli-implement": {
377
- "name": "CLI Direct Implementation",
378
- "description": "直接Codex实现,自主完成多步骤任务",
379
- "complexity": ["medium", "high"],
380
- "standalone": true,
381
- "steps": [
382
- {
383
- "command": "ccw cli",
384
- "tool": "codex",
385
- "mode": "write",
386
- "optional": false,
387
- "auto_continue": false
388
- }
389
- ],
390
- "use_cases": [
391
- "明确需求的功能实现",
392
- "代码重构和迁移",
393
- "测试生成",
394
- "批量代码修改"
395
- ],
396
- "total_steps": 1,
397
- "estimated_time": "15-60 min"
398
- },
399
- "cli-debug": {
400
- "name": "CLI Debug Session",
401
- "description": "CLI调试会话,利用Gemini深度诊断能力",
402
- "complexity": ["medium", "high"],
403
- "standalone": true,
404
- "steps": [
405
- {
406
- "command": "ccw cli",
407
- "tool": "gemini",
408
- "mode": "analysis",
409
- "purpose": "hypothesis-driven debugging",
410
- "optional": false,
411
- "auto_continue": false
412
- }
413
- ],
414
- "use_cases": [
415
- "复杂bug根因分析",
416
- "执行流异常追踪",
417
- "状态机错误诊断",
418
- "并发问题排查"
419
- ],
420
- "total_steps": 1,
421
- "estimated_time": "10-30 min"
422
- }
423
- },
424
- "chain_selection_rules": {
425
- "intent_mapping": {
426
- "bugfix": ["bugfix"],
427
- "feature_simple": ["rapid"],
428
- "feature_unclear": ["full"],
429
- "feature_complex": ["coupled"],
430
- "issue_batch": ["issue"],
431
- "test_driven": ["tdd"],
432
- "ui_design": ["ui"],
433
- "code_review": ["review-fix"],
434
- "documentation": ["docs"],
435
- "analysis_only": ["cli-analysis"],
436
- "implement_only": ["cli-implement"],
437
- "debug": ["cli-debug", "bugfix"]
438
- },
439
- "complexity_fallback": {
440
- "low": "rapid",
441
- "medium": "coupled",
442
- "high": "full"
443
- },
444
- "cli_preference_rules": {
445
- "_doc": "用户语义触发CLI工具选择",
446
- "gemini_triggers": ["用 gemini", "gemini 分析", "让 gemini", "深度分析", "架构理解"],
447
- "qwen_triggers": ["用 qwen", "qwen 评估", "让 qwen", "第二视角"],
448
- "codex_triggers": ["用 codex", "codex 实现", "让 codex", "自主完成", "批量修改"]
449
- }
450
- }
451
- }
@@ -1,218 +0,0 @@
1
- # Action: Bugfix Workflow
2
-
3
- 缺陷修复工作流:智能诊断 + 影响评估 + 修复
4
-
5
- ## Pattern
6
-
7
- ```
8
- lite-fix [--hotfix]
9
- ```
10
-
11
- ## Trigger Conditions
12
-
13
- - Keywords: "fix", "bug", "error", "crash", "broken", "fail", "修复", "报错"
14
- - Problem symptoms described
15
- - Error messages present
16
-
17
- ## Execution Flow
18
-
19
- ### Standard Mode
20
-
21
- ```mermaid
22
- sequenceDiagram
23
- participant U as User
24
- participant O as CCW Orchestrator
25
- participant LF as lite-fix
26
- participant CLI as CLI Tools
27
-
28
- U->>O: Bug description
29
- O->>O: Classify: bugfix (standard)
30
- O->>LF: /workflow:lite-fix "bug"
31
-
32
- Note over LF: Phase 1: Diagnosis
33
- LF->>CLI: Root cause analysis (Gemini)
34
- CLI-->>LF: diagnosis.json
35
-
36
- Note over LF: Phase 2: Impact Assessment
37
- LF->>LF: Risk scoring (0-10)
38
- LF->>LF: Severity classification
39
- LF-->>U: Impact report
40
-
41
- Note over LF: Phase 3: Fix Strategy
42
- LF->>LF: Generate fix options
43
- LF-->>U: Present strategies
44
- U->>LF: Select strategy
45
-
46
- Note over LF: Phase 4: Verification Plan
47
- LF->>LF: Generate test plan
48
- LF-->>U: Verification approach
49
-
50
- Note over LF: Phase 5: Confirmation
51
- LF->>U: Execution method?
52
- U->>LF: Confirm
53
-
54
- Note over LF: Phase 6: Execute
55
- LF->>CLI: Execute fix (Agent/Codex)
56
- CLI-->>LF: Results
57
- LF-->>U: Fix complete
58
- ```
59
-
60
- ### Hotfix Mode
61
-
62
- ```mermaid
63
- sequenceDiagram
64
- participant U as User
65
- participant O as CCW Orchestrator
66
- participant LF as lite-fix
67
- participant CLI as CLI Tools
68
-
69
- U->>O: Urgent bug + "hotfix"
70
- O->>O: Classify: bugfix (hotfix)
71
- O->>LF: /workflow:lite-fix --hotfix "bug"
72
-
73
- Note over LF: Minimal Diagnosis
74
- LF->>CLI: Quick root cause
75
- CLI-->>LF: Known issue?
76
-
77
- Note over LF: Surgical Fix
78
- LF->>LF: Single optimal fix
79
- LF-->>U: Quick confirmation
80
- U->>LF: Proceed
81
-
82
- Note over LF: Smoke Test
83
- LF->>CLI: Minimal verification
84
- CLI-->>LF: Pass/Fail
85
-
86
- Note over LF: Follow-up Generation
87
- LF->>LF: Generate follow-up tasks
88
- LF-->>U: Fix deployed + follow-ups created
89
- ```
90
-
91
- ## When to Use
92
-
93
- ### Standard Mode (/workflow:lite-fix)
94
- ✅ **Use for**:
95
- - 已知症状的 Bug
96
- - 本地化修复(1-5 文件)
97
- - 非紧急问题
98
- - 需要完整诊断
99
-
100
- ### Hotfix Mode (/workflow:lite-fix --hotfix)
101
- ✅ **Use for**:
102
- - 生产事故
103
- - 紧急修复
104
- - 明确的单点故障
105
- - 时间敏感
106
-
107
- ❌ **Don't use** (for either mode):
108
- - 需要架构变更 → `/workflow:plan --mode bugfix`
109
- - 多个相关问题 → `/issue:plan`
110
-
111
- ## Severity Classification
112
-
113
- | Score | Severity | Response | Verification |
114
- |-------|----------|----------|--------------|
115
- | 8-10 | Critical | Immediate | Smoke test only |
116
- | 6-7.9 | High | Fast track | Integration tests |
117
- | 4-5.9 | Medium | Normal | Full test suite |
118
- | 0-3.9 | Low | Scheduled | Comprehensive |
119
-
120
- ## Configuration
121
-
122
- ```javascript
123
- const bugfixConfig = {
124
- standard: {
125
- diagnosis: {
126
- tool: 'gemini',
127
- depth: 'comprehensive',
128
- timeout: 300000 // 5 min
129
- },
130
- impact: {
131
- riskThreshold: 6.0, // High risk threshold
132
- autoEscalate: true
133
- },
134
- verification: {
135
- levels: ['smoke', 'integration', 'full'],
136
- autoSelect: true // Based on severity
137
- }
138
- },
139
-
140
- hotfix: {
141
- diagnosis: {
142
- tool: 'gemini',
143
- depth: 'minimal',
144
- timeout: 60000 // 1 min
145
- },
146
- fix: {
147
- strategy: 'single', // Single optimal fix
148
- surgical: true
149
- },
150
- followup: {
151
- generate: true,
152
- types: ['comprehensive-fix', 'post-mortem']
153
- }
154
- }
155
- }
156
- ```
157
-
158
- ## Example Invocations
159
-
160
- ```bash
161
- # Standard bug fix
162
- ccw "用户头像上传失败,返回 413 错误"
163
- → lite-fix
164
- → Diagnosis: File size limit in nginx
165
- → Impact: 6.5 (High)
166
- → Fix: Update nginx config + add client validation
167
- → Verify: Integration test
168
-
169
- # Production hotfix
170
- ccw "紧急:支付网关返回 5xx 错误,影响所有用户"
171
- → lite-fix --hotfix
172
- → Quick diagnosis: API key expired
173
- → Surgical fix: Rotate key
174
- → Smoke test: Payment flow
175
- → Follow-ups: Key rotation automation, monitoring alert
176
-
177
- # Unknown root cause
178
- ccw "购物车随机丢失商品,原因不明"
179
- → lite-fix
180
- → Deep diagnosis (auto)
181
- → Root cause: Race condition in concurrent updates
182
- → Fix: Add optimistic locking
183
- → Verify: Concurrent test suite
184
- ```
185
-
186
- ## Output Artifacts
187
-
188
- ```
189
- .workflow/.lite-fix/{bug-slug}-{timestamp}/
190
- ├── diagnosis.json # Root cause analysis
191
- ├── impact.json # Risk assessment
192
- ├── fix-plan.json # Fix strategy
193
- ├── task.json # Enhanced task for execution
194
- └── followup.json # Follow-up tasks (hotfix only)
195
- ```
196
-
197
- ## Follow-up Tasks (Hotfix Mode)
198
-
199
- ```json
200
- {
201
- "followups": [
202
- {
203
- "id": "FOLLOWUP-001",
204
- "type": "comprehensive-fix",
205
- "title": "Complete fix for payment gateway issue",
206
- "due": "3 days",
207
- "description": "Implement full solution with proper error handling"
208
- },
209
- {
210
- "id": "FOLLOWUP-002",
211
- "type": "post-mortem",
212
- "title": "Post-mortem analysis",
213
- "due": "1 week",
214
- "description": "Document incident and prevention measures"
215
- }
216
- ]
217
- }
218
- ```