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
@@ -0,0 +1,547 @@
1
+ {
2
+ "_metadata": {
3
+ "version": "2.0.0",
4
+ "description": "Unified CCW command index with capabilities, flows, and intent rules"
5
+ },
6
+
7
+ "capabilities": {
8
+ "explore": {
9
+ "description": "Codebase exploration and context gathering",
10
+ "commands": ["/workflow:init", "/workflow:tools:gather", "/memory:load"],
11
+ "agents": ["cli-explore-agent", "context-search-agent"]
12
+ },
13
+ "brainstorm": {
14
+ "description": "Multi-perspective analysis and ideation",
15
+ "commands": ["/workflow:brainstorm:auto-parallel", "/workflow:brainstorm:artifacts", "/workflow:brainstorm:synthesis"],
16
+ "roles": ["product-manager", "system-architect", "ux-expert", "data-architect", "api-designer"]
17
+ },
18
+ "plan": {
19
+ "description": "Task planning and decomposition",
20
+ "commands": ["/workflow:lite-plan", "/workflow:plan", "/workflow:tdd-plan", "/task:create", "/task:breakdown"],
21
+ "agents": ["cli-lite-planning-agent", "action-planning-agent"]
22
+ },
23
+ "verify": {
24
+ "description": "Plan and quality verification",
25
+ "commands": ["/workflow:action-plan-verify", "/workflow:tdd-verify"]
26
+ },
27
+ "execute": {
28
+ "description": "Task execution and implementation",
29
+ "commands": ["/workflow:lite-execute", "/workflow:execute", "/task:execute"],
30
+ "agents": ["code-developer", "cli-execution-agent", "universal-executor"]
31
+ },
32
+ "bugfix": {
33
+ "description": "Bug diagnosis and fixing",
34
+ "commands": ["/workflow:lite-fix"],
35
+ "agents": ["code-developer"]
36
+ },
37
+ "test": {
38
+ "description": "Test generation and execution",
39
+ "commands": ["/workflow:test-gen", "/workflow:test-fix-gen", "/workflow:test-cycle-execute"],
40
+ "agents": ["test-fix-agent"]
41
+ },
42
+ "review": {
43
+ "description": "Code review and quality analysis",
44
+ "commands": ["/workflow:review-session-cycle", "/workflow:review-module-cycle", "/workflow:review", "/workflow:review-fix"]
45
+ },
46
+ "issue": {
47
+ "description": "Issue lifecycle management - discover, accumulate, batch resolve",
48
+ "commands": ["/issue:new", "/issue:discover", "/issue:discover-by-prompt", "/issue:plan", "/issue:queue", "/issue:execute", "/issue:manage"],
49
+ "agents": ["issue-plan-agent", "issue-queue-agent", "cli-explore-agent"],
50
+ "lifecycle": {
51
+ "accumulation": {
52
+ "description": "任务完成后进行需求扩展、bug分析、测试发现",
53
+ "triggers": ["post-task review", "code review findings", "test failures"],
54
+ "commands": ["/issue:discover", "/issue:discover-by-prompt", "/issue:new"]
55
+ },
56
+ "batch_resolution": {
57
+ "description": "积累的issue集中规划和并行执行",
58
+ "flow": ["plan", "queue", "execute"],
59
+ "commands": ["/issue:plan --all-pending", "/issue:queue", "/issue:execute"]
60
+ }
61
+ }
62
+ },
63
+ "ui-design": {
64
+ "description": "UI design and prototyping",
65
+ "commands": ["/workflow:ui-design:explore-auto", "/workflow:ui-design:imitate-auto", "/workflow:ui-design:design-sync"],
66
+ "agents": ["ui-design-agent"]
67
+ },
68
+ "memory": {
69
+ "description": "Documentation and knowledge management",
70
+ "commands": ["/memory:docs", "/memory:update-related", "/memory:update-full", "/memory:skill-memory"],
71
+ "agents": ["doc-generator", "memory-bridge"]
72
+ }
73
+ },
74
+
75
+ "flows": {
76
+ "rapid": {
77
+ "name": "Rapid Iteration",
78
+ "description": "多模型协作分析 + 直接执行",
79
+ "complexity": ["low", "medium"],
80
+ "steps": [
81
+ { "command": "/workflow:lite-plan", "optional": false, "auto_continue": true },
82
+ { "command": "/workflow:lite-execute", "optional": false }
83
+ ],
84
+ "cli_hints": {
85
+ "explore_phase": { "tool": "gemini", "mode": "analysis", "trigger": "needs_exploration" },
86
+ "execution": { "tool": "codex", "mode": "write", "trigger": "complexity >= medium" }
87
+ },
88
+ "estimated_time": "15-45 min"
89
+ },
90
+ "full": {
91
+ "name": "Full Exploration",
92
+ "description": "头脑风暴 + 规划 + 执行",
93
+ "complexity": ["medium", "high"],
94
+ "steps": [
95
+ { "command": "/workflow:brainstorm:auto-parallel", "optional": false, "confirm_before": true },
96
+ { "command": "/workflow:plan", "optional": false },
97
+ { "command": "/workflow:action-plan-verify", "optional": true, "auto_continue": true },
98
+ { "command": "/workflow:execute", "optional": false }
99
+ ],
100
+ "cli_hints": {
101
+ "role_analysis": { "tool": "gemini", "mode": "analysis", "trigger": "always", "parallel": true },
102
+ "execution": { "tool": "codex", "mode": "write", "trigger": "task_count >= 3" }
103
+ },
104
+ "estimated_time": "1-3 hours"
105
+ },
106
+ "coupled": {
107
+ "name": "Coupled Planning",
108
+ "description": "完整规划 + 验证 + 执行",
109
+ "complexity": ["high"],
110
+ "steps": [
111
+ { "command": "/workflow:plan", "optional": false },
112
+ { "command": "/workflow:action-plan-verify", "optional": false, "auto_continue": true },
113
+ { "command": "/workflow:execute", "optional": false },
114
+ { "command": "/workflow:review", "optional": true }
115
+ ],
116
+ "cli_hints": {
117
+ "pre_analysis": { "tool": "gemini", "mode": "analysis", "trigger": "always" },
118
+ "execution": { "tool": "codex", "mode": "write", "trigger": "always" }
119
+ },
120
+ "estimated_time": "2-4 hours"
121
+ },
122
+ "bugfix": {
123
+ "name": "Bug Fix",
124
+ "description": "智能诊断 + 修复",
125
+ "complexity": ["low", "medium"],
126
+ "variants": {
127
+ "standard": [{ "command": "/workflow:lite-fix", "optional": false }],
128
+ "hotfix": [{ "command": "/workflow:lite-fix --hotfix", "optional": false }]
129
+ },
130
+ "cli_hints": {
131
+ "diagnosis": { "tool": "gemini", "mode": "analysis", "trigger": "always" },
132
+ "fix": { "tool": "codex", "mode": "write", "trigger": "severity >= medium" }
133
+ },
134
+ "estimated_time": "10-30 min"
135
+ },
136
+ "issue": {
137
+ "name": "Issue Lifecycle",
138
+ "description": "发现积累 → 批量规划 → 队列优化 → 并行执行",
139
+ "complexity": ["medium", "high"],
140
+ "phases": {
141
+ "accumulation": {
142
+ "description": "项目迭代中持续发现和积累issue",
143
+ "commands": ["/issue:discover", "/issue:new"],
144
+ "trigger": "post-task, code-review, test-failure"
145
+ },
146
+ "resolution": {
147
+ "description": "集中规划和执行积累的issue",
148
+ "steps": [
149
+ { "command": "/issue:plan --all-pending", "optional": false },
150
+ { "command": "/issue:queue", "optional": false },
151
+ { "command": "/issue:execute", "optional": false }
152
+ ]
153
+ }
154
+ },
155
+ "cli_hints": {
156
+ "discovery": { "tool": "gemini", "mode": "analysis", "trigger": "perspective_analysis", "parallel": true },
157
+ "solution_generation": { "tool": "gemini", "mode": "analysis", "trigger": "always", "parallel": true },
158
+ "batch_execution": { "tool": "codex", "mode": "write", "trigger": "always" }
159
+ },
160
+ "estimated_time": "1-4 hours"
161
+ },
162
+ "lite-lite-lite": {
163
+ "name": "Ultra-Lite Multi-CLI",
164
+ "description": "零文件 + 自动CLI选择 + 语义描述 + 直接执行",
165
+ "complexity": ["low", "medium"],
166
+ "steps": [
167
+ { "phase": "clarify", "description": "需求澄清 (AskUser if needed)" },
168
+ { "phase": "auto-select", "description": "任务分析 → 自动选择CLI组合" },
169
+ { "phase": "multi-cli", "description": "并行多CLI分析" },
170
+ { "phase": "decision", "description": "展示结果 → AskUser决策" },
171
+ { "phase": "execute", "description": "直接执行 (无中间文件)" }
172
+ ],
173
+ "vs_multi_cli_plan": {
174
+ "artifacts": "None vs IMPL_PLAN.md + plan.json + synthesis.json",
175
+ "session": "Stateless vs Persistent",
176
+ "cli_selection": "Auto-select based on task analysis vs Config-driven",
177
+ "iteration": "Via AskUser vs Via rounds/synthesis",
178
+ "execution": "Direct vs Via lite-execute",
179
+ "best_for": "Quick fixes, simple features vs Complex multi-step implementations"
180
+ },
181
+ "cli_hints": {
182
+ "analysis": { "tool": "auto", "mode": "analysis", "parallel": true },
183
+ "execution": { "tool": "auto", "mode": "write" }
184
+ },
185
+ "estimated_time": "10-30 min"
186
+ },
187
+ "multi-cli-plan": {
188
+ "name": "Multi-CLI Collaborative Planning",
189
+ "description": "ACE上下文 + 多CLI协作分析 + 迭代收敛 + 计划生成",
190
+ "complexity": ["medium", "high"],
191
+ "steps": [
192
+ { "command": "/workflow:multi-cli-plan", "optional": false, "phases": [
193
+ "context_gathering: ACE语义搜索",
194
+ "multi_cli_discussion: cli-discuss-agent多轮分析",
195
+ "present_options: 展示解决方案",
196
+ "user_decision: 用户选择",
197
+ "plan_generation: cli-lite-planning-agent生成计划"
198
+ ]},
199
+ { "command": "/workflow:lite-execute", "optional": false }
200
+ ],
201
+ "vs_lite_plan": {
202
+ "context": "ACE semantic search vs Manual file patterns",
203
+ "analysis": "Multi-CLI cross-verification vs Single-pass planning",
204
+ "iteration": "Multiple rounds until convergence vs Single round",
205
+ "confidence": "High (consensus-based) vs Medium (single perspective)",
206
+ "best_for": "Complex tasks needing multiple perspectives vs Straightforward implementations"
207
+ },
208
+ "agents": ["cli-discuss-agent", "cli-lite-planning-agent"],
209
+ "cli_hints": {
210
+ "discussion": { "tools": ["gemini", "codex", "claude"], "mode": "analysis", "parallel": true },
211
+ "planning": { "tool": "gemini", "mode": "analysis" }
212
+ },
213
+ "output": ".workflow/.multi-cli-plan/{session-id}/",
214
+ "estimated_time": "30-90 min"
215
+ },
216
+ "tdd": {
217
+ "name": "Test-Driven Development",
218
+ "description": "TDD规划 + 执行 + 验证",
219
+ "complexity": ["medium", "high"],
220
+ "steps": [
221
+ { "command": "/workflow:tdd-plan", "optional": false },
222
+ { "command": "/workflow:execute", "optional": false },
223
+ { "command": "/workflow:tdd-verify", "optional": false }
224
+ ],
225
+ "cli_hints": {
226
+ "test_strategy": { "tool": "gemini", "mode": "analysis", "trigger": "always" },
227
+ "red_green_refactor": { "tool": "codex", "mode": "write", "trigger": "always" }
228
+ },
229
+ "estimated_time": "1-3 hours"
230
+ },
231
+ "ui": {
232
+ "name": "UI-First Development",
233
+ "description": "UI设计 + 规划 + 执行",
234
+ "complexity": ["medium", "high"],
235
+ "variants": {
236
+ "explore": [
237
+ { "command": "/workflow:ui-design:explore-auto", "optional": false },
238
+ { "command": "/workflow:ui-design:design-sync", "optional": false, "auto_continue": true },
239
+ { "command": "/workflow:plan", "optional": false },
240
+ { "command": "/workflow:execute", "optional": false }
241
+ ],
242
+ "imitate": [
243
+ { "command": "/workflow:ui-design:imitate-auto", "optional": false },
244
+ { "command": "/workflow:ui-design:design-sync", "optional": false, "auto_continue": true },
245
+ { "command": "/workflow:plan", "optional": false },
246
+ { "command": "/workflow:execute", "optional": false }
247
+ ]
248
+ },
249
+ "estimated_time": "2-4 hours"
250
+ },
251
+ "review-fix": {
252
+ "name": "Review and Fix",
253
+ "description": "多维审查 + 自动修复",
254
+ "complexity": ["medium"],
255
+ "steps": [
256
+ { "command": "/workflow:review-session-cycle", "optional": false },
257
+ { "command": "/workflow:review-fix", "optional": true }
258
+ ],
259
+ "cli_hints": {
260
+ "multi_dimension_review": { "tool": "gemini", "mode": "analysis", "trigger": "always", "parallel": true },
261
+ "auto_fix": { "tool": "codex", "mode": "write", "trigger": "findings_count >= 3" }
262
+ },
263
+ "estimated_time": "30-90 min"
264
+ },
265
+ "docs": {
266
+ "name": "Documentation",
267
+ "description": "批量文档生成",
268
+ "complexity": ["low", "medium"],
269
+ "variants": {
270
+ "incremental": [{ "command": "/memory:update-related", "optional": false }],
271
+ "full": [
272
+ { "command": "/memory:docs", "optional": false },
273
+ { "command": "/workflow:execute", "optional": false }
274
+ ]
275
+ },
276
+ "estimated_time": "15-60 min"
277
+ }
278
+ },
279
+
280
+ "intent_rules": {
281
+ "bugfix": {
282
+ "priority": 1,
283
+ "variants": {
284
+ "hotfix": {
285
+ "patterns": ["hotfix", "urgent", "production", "critical", "emergency", "紧急", "生产环境", "线上"],
286
+ "flow": "bugfix.hotfix"
287
+ },
288
+ "standard": {
289
+ "patterns": ["fix", "bug", "error", "issue", "crash", "broken", "fail", "wrong", "修复", "错误", "崩溃"],
290
+ "flow": "bugfix.standard"
291
+ }
292
+ }
293
+ },
294
+ "issue_batch": {
295
+ "priority": 2,
296
+ "patterns": {
297
+ "batch": ["issues", "batch", "queue", "多个", "批量"],
298
+ "action": ["fix", "resolve", "处理", "解决"]
299
+ },
300
+ "require_both": true,
301
+ "flow": "issue"
302
+ },
303
+ "exploration": {
304
+ "priority": 3,
305
+ "patterns": ["不确定", "不知道", "explore", "研究", "分析一下", "怎么做", "what if", "探索"],
306
+ "flow": "full"
307
+ },
308
+ "ui_design": {
309
+ "priority": 4,
310
+ "patterns": ["ui", "界面", "design", "设计", "component", "组件", "style", "样式", "layout", "布局"],
311
+ "variants": {
312
+ "imitate": { "triggers": ["参考", "模仿", "像", "类似"], "flow": "ui.imitate" },
313
+ "explore": { "triggers": [], "flow": "ui.explore" }
314
+ }
315
+ },
316
+ "tdd": {
317
+ "priority": 5,
318
+ "patterns": ["tdd", "test-driven", "测试驱动", "先写测试", "test first"],
319
+ "flow": "tdd"
320
+ },
321
+ "review": {
322
+ "priority": 6,
323
+ "patterns": ["review", "审查", "检查代码", "code review", "质量检查"],
324
+ "flow": "review-fix"
325
+ },
326
+ "documentation": {
327
+ "priority": 7,
328
+ "patterns": ["文档", "documentation", "docs", "readme"],
329
+ "variants": {
330
+ "incremental": { "triggers": ["更新", "增量"], "flow": "docs.incremental" },
331
+ "full": { "triggers": ["全部", "完整"], "flow": "docs.full" }
332
+ }
333
+ },
334
+ "feature": {
335
+ "priority": 99,
336
+ "complexity_map": {
337
+ "high": "coupled",
338
+ "medium": "rapid",
339
+ "low": "rapid"
340
+ }
341
+ }
342
+ },
343
+
344
+ "complexity_indicators": {
345
+ "high": {
346
+ "threshold": 4,
347
+ "patterns": {
348
+ "architecture": { "keywords": ["refactor", "重构", "migrate", "迁移", "architect", "架构", "system", "系统"], "weight": 2 },
349
+ "multi_module": { "keywords": ["multiple", "多个", "across", "跨", "all", "所有", "entire", "整个"], "weight": 2 },
350
+ "integration": { "keywords": ["integrate", "集成", "api", "database", "数据库"], "weight": 1 },
351
+ "quality": { "keywords": ["security", "安全", "performance", "性能", "scale", "扩展"], "weight": 1 }
352
+ }
353
+ },
354
+ "medium": { "threshold": 2 },
355
+ "low": { "threshold": 0 }
356
+ },
357
+
358
+ "cli_tools": {
359
+ "gemini": {
360
+ "strengths": ["超长上下文", "深度分析", "架构理解", "执行流追踪"],
361
+ "triggers": ["分析", "理解", "设计", "架构", "诊断"],
362
+ "mode": "analysis"
363
+ },
364
+ "qwen": {
365
+ "strengths": ["代码模式识别", "多维度分析"],
366
+ "triggers": ["评估", "对比", "验证"],
367
+ "mode": "analysis"
368
+ },
369
+ "codex": {
370
+ "strengths": ["精确代码生成", "自主执行"],
371
+ "triggers": ["实现", "重构", "修复", "生成"],
372
+ "mode": "write"
373
+ }
374
+ },
375
+
376
+ "cli_injection_rules": {
377
+ "context_gathering": { "trigger": "file_read >= 50k OR module_count >= 5", "inject": "gemini --mode analysis" },
378
+ "pre_planning_analysis": { "trigger": "complexity === high", "inject": "gemini --mode analysis" },
379
+ "debug_diagnosis": { "trigger": "intent === bugfix AND root_cause_unclear", "inject": "gemini --mode analysis" },
380
+ "code_review": { "trigger": "step === review", "inject": "gemini --mode analysis" },
381
+ "implementation": { "trigger": "step === execute AND task_count >= 3", "inject": "codex --mode write" }
382
+ },
383
+
384
+ "artifact_flow": {
385
+ "_description": "定义工作流产出的格式、意图提取和流转规则",
386
+
387
+ "outputs": {
388
+ "/workflow:lite-plan": {
389
+ "artifact": "memory://plan",
390
+ "format": "structured_plan",
391
+ "fields": ["tasks", "files", "dependencies", "approach"]
392
+ },
393
+ "/workflow:plan": {
394
+ "artifact": ".workflow/{session}/IMPL_PLAN.md",
395
+ "format": "markdown_plan",
396
+ "fields": ["phases", "tasks", "dependencies", "risks", "test_strategy"]
397
+ },
398
+ "/workflow:multi-cli-plan": {
399
+ "artifact": ".workflow/.multi-cli-plan/{session}/",
400
+ "format": "multi_file",
401
+ "files": ["IMPL_PLAN.md", "plan.json", "synthesis.json"],
402
+ "fields": ["consensus", "divergences", "recommended_approach", "tasks"]
403
+ },
404
+ "/workflow:lite-execute": {
405
+ "artifact": "git_changes",
406
+ "format": "code_diff",
407
+ "fields": ["modified_files", "added_files", "deleted_files", "build_status"]
408
+ },
409
+ "/workflow:execute": {
410
+ "artifact": ".workflow/{session}/execution_log.json",
411
+ "format": "execution_report",
412
+ "fields": ["completed_tasks", "pending_tasks", "errors", "warnings"]
413
+ },
414
+ "/workflow:test-cycle-execute": {
415
+ "artifact": ".workflow/{session}/test_results.json",
416
+ "format": "test_report",
417
+ "fields": ["pass_rate", "failures", "coverage", "duration"]
418
+ },
419
+ "/workflow:review-session-cycle": {
420
+ "artifact": ".workflow/{session}/review_report.md",
421
+ "format": "review_report",
422
+ "fields": ["findings", "severity_counts", "recommendations"]
423
+ },
424
+ "/workflow:lite-fix": {
425
+ "artifact": "git_changes",
426
+ "format": "fix_report",
427
+ "fields": ["root_cause", "fix_applied", "files_modified", "verification_status"]
428
+ }
429
+ },
430
+
431
+ "intent_extraction": {
432
+ "plan_to_execute": {
433
+ "from": ["lite-plan", "plan", "multi-cli-plan"],
434
+ "to": ["lite-execute", "execute"],
435
+ "extract": {
436
+ "tasks": "$.tasks[] | filter(status != 'completed')",
437
+ "priority_order": "$.tasks | sort_by(priority)",
438
+ "files_to_modify": "$.tasks[].files | flatten | unique",
439
+ "dependencies": "$.dependencies",
440
+ "context_summary": "$.approach OR $.recommended_approach"
441
+ }
442
+ },
443
+ "execute_to_test": {
444
+ "from": ["lite-execute", "execute"],
445
+ "to": ["test-cycle-execute", "test-fix-gen"],
446
+ "extract": {
447
+ "modified_files": "$.modified_files",
448
+ "test_scope": "infer_from($.modified_files)",
449
+ "build_status": "$.build_status",
450
+ "pending_verification": "$.completed_tasks | needs_test"
451
+ }
452
+ },
453
+ "test_to_fix": {
454
+ "from": ["test-cycle-execute"],
455
+ "to": ["lite-fix", "review-fix"],
456
+ "condition": "$.pass_rate < 0.95",
457
+ "extract": {
458
+ "failures": "$.failures",
459
+ "error_messages": "$.failures[].message",
460
+ "affected_files": "$.failures[].file",
461
+ "suggested_fixes": "$.failures[].suggested_fix"
462
+ }
463
+ },
464
+ "review_to_fix": {
465
+ "from": ["review-session-cycle", "review-module-cycle"],
466
+ "to": ["review-fix"],
467
+ "condition": "$.severity_counts.critical > 0 OR $.severity_counts.high > 3",
468
+ "extract": {
469
+ "findings": "$.findings | filter(severity in ['critical', 'high'])",
470
+ "fix_priority": "$.findings | group_by(category) | sort_by(severity)",
471
+ "affected_files": "$.findings[].file | unique"
472
+ }
473
+ }
474
+ },
475
+
476
+ "completion_criteria": {
477
+ "plan": {
478
+ "required": ["has_tasks", "has_files"],
479
+ "optional": ["has_tests", "no_blocking_risks"],
480
+ "threshold": 0.8,
481
+ "routing": {
482
+ "complete": "proceed_to_execute",
483
+ "incomplete": "clarify_requirements"
484
+ }
485
+ },
486
+ "execute": {
487
+ "required": ["all_tasks_attempted", "no_critical_errors"],
488
+ "optional": ["build_passes", "lint_passes"],
489
+ "threshold": 1.0,
490
+ "routing": {
491
+ "complete": "proceed_to_test_or_review",
492
+ "partial": "continue_execution",
493
+ "failed": "diagnose_and_retry"
494
+ }
495
+ },
496
+ "test": {
497
+ "metrics": {
498
+ "pass_rate": { "target": 0.95, "minimum": 0.80 },
499
+ "coverage": { "target": 0.80, "minimum": 0.60 }
500
+ },
501
+ "routing": {
502
+ "pass_rate >= 0.95 AND coverage >= 0.80": "complete",
503
+ "pass_rate >= 0.95 AND coverage < 0.80": "add_more_tests",
504
+ "pass_rate >= 0.80": "fix_failures_then_continue",
505
+ "pass_rate < 0.80": "major_fix_required"
506
+ }
507
+ },
508
+ "review": {
509
+ "metrics": {
510
+ "critical_findings": { "target": 0, "maximum": 0 },
511
+ "high_findings": { "target": 0, "maximum": 3 }
512
+ },
513
+ "routing": {
514
+ "critical == 0 AND high <= 3": "complete_or_optional_fix",
515
+ "critical > 0": "mandatory_fix",
516
+ "high > 3": "recommended_fix"
517
+ }
518
+ }
519
+ },
520
+
521
+ "flow_decisions": {
522
+ "_description": "根据产出完成度决定下一步",
523
+ "patterns": {
524
+ "plan_execute_test": {
525
+ "sequence": ["plan", "execute", "test"],
526
+ "on_test_fail": {
527
+ "action": "extract_failures_and_fix",
528
+ "max_iterations": 3,
529
+ "fallback": "manual_intervention"
530
+ }
531
+ },
532
+ "plan_execute_review": {
533
+ "sequence": ["plan", "execute", "review"],
534
+ "on_review_issues": {
535
+ "action": "prioritize_and_fix",
536
+ "auto_fix_threshold": "severity < high"
537
+ }
538
+ },
539
+ "iterative_improvement": {
540
+ "sequence": ["execute", "test", "fix"],
541
+ "loop_until": "pass_rate >= 0.95 OR iterations >= 3",
542
+ "on_loop_exit": "report_status"
543
+ }
544
+ }
545
+ }
546
+ }
547
+ }