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.
- package/.claude/CLAUDE.md +7 -1
- package/.claude/agents/action-planning-agent.md +1 -0
- package/.claude/agents/cli-discuss-agent.md +391 -0
- package/.claude/agents/cli-execution-agent.md +2 -0
- package/.claude/agents/cli-explore-agent.md +2 -1
- package/.claude/agents/cli-lite-planning-agent.md +1 -0
- package/.claude/agents/cli-planning-agent.md +1 -0
- package/.claude/agents/code-developer.md +1 -0
- package/.claude/agents/conceptual-planning-agent.md +2 -0
- package/.claude/agents/context-search-agent.md +1 -0
- package/.claude/agents/debug-explore-agent.md +2 -0
- package/.claude/agents/doc-generator.md +1 -0
- package/.claude/agents/issue-plan-agent.md +2 -1
- package/.claude/agents/issue-queue-agent.md +2 -1
- package/.claude/agents/memory-bridge.md +2 -0
- package/.claude/agents/test-context-search-agent.md +2 -0
- package/.claude/agents/test-fix-agent.md +1 -0
- package/.claude/agents/ui-design-agent.md +2 -0
- package/.claude/agents/universal-executor.md +1 -0
- package/.claude/commands/issue/execute.md +141 -163
- package/.claude/commands/workflow/lite-lite-lite.md +798 -0
- package/.claude/commands/workflow/multi-cli-plan.md +510 -0
- package/.claude/skills/ccw/SKILL.md +262 -372
- package/.claude/skills/ccw/command.json +547 -0
- package/.claude/skills/ccw-help/SKILL.md +46 -107
- package/.claude/skills/ccw-help/command.json +511 -0
- package/.claude/skills/skill-tuning/SKILL.md +303 -0
- package/.claude/skills/skill-tuning/phases/actions/action-abort.md +164 -0
- package/.claude/skills/skill-tuning/phases/actions/action-analyze-requirements.md +406 -0
- package/.claude/skills/skill-tuning/phases/actions/action-apply-fix.md +206 -0
- package/.claude/skills/skill-tuning/phases/actions/action-complete.md +195 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md +317 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-context.md +243 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-dataflow.md +318 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-docs.md +299 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-memory.md +269 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-token-consumption.md +200 -0
- package/.claude/skills/skill-tuning/phases/actions/action-gemini-analysis.md +322 -0
- package/.claude/skills/skill-tuning/phases/actions/action-generate-report.md +228 -0
- package/.claude/skills/skill-tuning/phases/actions/action-init.md +149 -0
- package/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md +317 -0
- package/.claude/skills/skill-tuning/phases/actions/action-verify.md +222 -0
- package/.claude/skills/skill-tuning/phases/orchestrator.md +377 -0
- package/.claude/skills/skill-tuning/phases/state-schema.md +378 -0
- package/.claude/skills/skill-tuning/specs/category-mappings.json +284 -0
- package/.claude/skills/skill-tuning/specs/dimension-mapping.md +212 -0
- package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +318 -0
- package/.claude/skills/skill-tuning/specs/quality-gates.md +263 -0
- package/.claude/skills/skill-tuning/specs/skill-authoring-principles.md +189 -0
- package/.claude/skills/skill-tuning/specs/tuning-strategies.md +1537 -0
- package/.claude/skills/skill-tuning/templates/diagnosis-report.md +153 -0
- package/.claude/skills/skill-tuning/templates/fix-proposal.md +204 -0
- package/.claude/workflows/cli-templates/schemas/multi-cli-discussion-schema.json +421 -0
- package/.claude/workflows/cli-tools-usage.md +0 -41
- package/ccw/dist/core/auth/csrf-middleware.d.ts.map +1 -1
- package/ccw/dist/core/auth/csrf-middleware.js +3 -1
- package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
- package/ccw/dist/core/data-aggregator.d.ts +2 -0
- package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
- package/ccw/dist/core/data-aggregator.js +5 -2
- package/ccw/dist/core/data-aggregator.js.map +1 -1
- package/ccw/dist/core/lite-scanner.d.ts +2 -1
- package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner.js +295 -6
- package/ccw/dist/core/lite-scanner.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.js +5 -5
- package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
- package/ccw/dist/core/routes/session-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/session-routes.js +166 -48
- package/ccw/dist/core/routes/session-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +87 -0
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.js +2 -2
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/scripts/IMPLEMENTATION-SUMMARY.md +226 -0
- package/ccw/scripts/QUICK-REFERENCE.md +135 -0
- package/ccw/scripts/README-memory-embedder.md +157 -0
- package/ccw/scripts/__pycache__/memory_embedder.cpython-313.pyc +0 -0
- package/ccw/scripts/__pycache__/test_memory_embedder.cpython-313-pytest-8.4.2.pyc +0 -0
- package/ccw/scripts/memory-embedder-example.ts +184 -0
- package/ccw/scripts/memory_embedder.py +428 -0
- package/ccw/scripts/test_memory_embedder.py +245 -0
- package/ccw/src/core/auth/csrf-middleware.ts +3 -1
- package/ccw/src/core/data-aggregator.ts +7 -2
- package/ccw/src/core/lite-scanner.ts +440 -6
- package/ccw/src/core/routes/codexlens/config-handlers.ts +12 -9
- package/ccw/src/core/routes/session-routes.ts +201 -48
- package/ccw/src/core/routes/system-routes.ts +102 -0
- package/ccw/src/core/server.ts +2 -2
- package/ccw/src/templates/dashboard-css/01-base.css +8 -0
- package/ccw/src/templates/dashboard-css/02-session.css +81 -0
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +2442 -0
- package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +157 -0
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +23 -0
- package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +38 -4
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +38 -13
- package/ccw/src/templates/dashboard-js/components/navigation.js +24 -4
- package/ccw/src/templates/dashboard-js/i18n.js +194 -6
- package/ccw/src/templates/dashboard-js/views/api-settings.js +32 -0
- package/ccw/src/templates/dashboard-js/views/claude-manager.js +44 -3
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +303 -31
- package/ccw/src/templates/dashboard-js/views/history.js +44 -6
- package/ccw/src/templates/dashboard-js/views/home.js +1 -0
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +54 -7
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +1817 -4
- package/ccw/src/templates/dashboard.html +5 -0
- package/package.json +2 -1
- package/.claude/skills/ccw/index/command-capabilities.json +0 -127
- package/.claude/skills/ccw/index/intent-rules.json +0 -136
- package/.claude/skills/ccw/index/workflow-chains.json +0 -451
- package/.claude/skills/ccw/phases/actions/bugfix.md +0 -218
- package/.claude/skills/ccw/phases/actions/coupled.md +0 -194
- package/.claude/skills/ccw/phases/actions/docs.md +0 -93
- package/.claude/skills/ccw/phases/actions/full.md +0 -154
- package/.claude/skills/ccw/phases/actions/issue.md +0 -201
- package/.claude/skills/ccw/phases/actions/rapid.md +0 -104
- package/.claude/skills/ccw/phases/actions/review-fix.md +0 -84
- package/.claude/skills/ccw/phases/actions/tdd.md +0 -66
- package/.claude/skills/ccw/phases/actions/ui.md +0 -79
- package/.claude/skills/ccw/phases/orchestrator.md +0 -435
- package/.claude/skills/ccw/specs/intent-classification.md +0 -336
- package/.claude/skills/ccw-help/index/all-agents.json +0 -82
- package/.claude/skills/ccw-help/index/all-commands.json +0 -882
- package/.claude/skills/ccw-help/index/by-category.json +0 -914
- package/.claude/skills/ccw-help/index/by-use-case.json +0 -896
- package/.claude/skills/ccw-help/index/command-relationships.json +0 -160
- package/.claude/skills/ccw-help/index/essential-commands.json +0 -112
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
# Intent Classification Specification
|
|
2
|
-
|
|
3
|
-
CCW 意图分类规范:定义如何从用户输入识别任务意图并选择最优工作流。
|
|
4
|
-
|
|
5
|
-
## Classification Hierarchy
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Intent Classification
|
|
9
|
-
├── Priority 1: Explicit Commands
|
|
10
|
-
│ └── /workflow:*, /issue:*, /memory:*, /task:*
|
|
11
|
-
├── Priority 2: Bug Keywords
|
|
12
|
-
│ ├── Hotfix: urgent + bug keywords
|
|
13
|
-
│ └── Standard: bug keywords only
|
|
14
|
-
├── Priority 3: Issue Batch
|
|
15
|
-
│ └── Multiple + fix keywords
|
|
16
|
-
├── Priority 4: Exploration
|
|
17
|
-
│ └── Uncertainty keywords
|
|
18
|
-
├── Priority 5: UI/Design
|
|
19
|
-
│ └── Visual/component keywords
|
|
20
|
-
└── Priority 6: Complexity Fallback
|
|
21
|
-
├── High → Coupled
|
|
22
|
-
├── Medium → Rapid
|
|
23
|
-
└── Low → Rapid
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Keyword Patterns
|
|
27
|
-
|
|
28
|
-
### Bug Detection
|
|
29
|
-
|
|
30
|
-
```javascript
|
|
31
|
-
const BUG_PATTERNS = {
|
|
32
|
-
core: /\b(fix|bug|error|issue|crash|broken|fail|wrong|incorrect|修复|报错|错误|问题|异常|崩溃|失败)\b/i,
|
|
33
|
-
|
|
34
|
-
urgency: /\b(hotfix|urgent|production|critical|emergency|asap|immediately|紧急|生产|线上|马上|立即)\b/i,
|
|
35
|
-
|
|
36
|
-
symptoms: /\b(not working|doesn't work|can't|cannot|won't|stopped|stopped working|无法|不能|不工作)\b/i,
|
|
37
|
-
|
|
38
|
-
errors: /\b(\d{3}\s*error|exception|stack\s*trace|undefined|null\s*pointer|timeout)\b/i
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function detectBug(text) {
|
|
42
|
-
const isBug = BUG_PATTERNS.core.test(text) || BUG_PATTERNS.symptoms.test(text)
|
|
43
|
-
const isUrgent = BUG_PATTERNS.urgency.test(text)
|
|
44
|
-
const hasError = BUG_PATTERNS.errors.test(text)
|
|
45
|
-
|
|
46
|
-
if (!isBug && !hasError) return null
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
type: 'bugfix',
|
|
50
|
-
mode: isUrgent ? 'hotfix' : 'standard',
|
|
51
|
-
confidence: (isBug && hasError) ? 'high' : 'medium'
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Issue Batch Detection
|
|
57
|
-
|
|
58
|
-
```javascript
|
|
59
|
-
const ISSUE_PATTERNS = {
|
|
60
|
-
batch: /\b(issues?|batch|queue|multiple|several|all|多个|批量|一系列|所有|这些)\b/i,
|
|
61
|
-
action: /\b(fix|resolve|handle|process|处理|解决|修复)\b/i,
|
|
62
|
-
source: /\b(github|jira|linear|backlog|todo|待办)\b/i
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function detectIssueBatch(text) {
|
|
66
|
-
const hasBatch = ISSUE_PATTERNS.batch.test(text)
|
|
67
|
-
const hasAction = ISSUE_PATTERNS.action.test(text)
|
|
68
|
-
const hasSource = ISSUE_PATTERNS.source.test(text)
|
|
69
|
-
|
|
70
|
-
if (hasBatch && hasAction) {
|
|
71
|
-
return {
|
|
72
|
-
type: 'issue',
|
|
73
|
-
confidence: hasSource ? 'high' : 'medium'
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return null
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Exploration Detection
|
|
81
|
-
|
|
82
|
-
```javascript
|
|
83
|
-
const EXPLORATION_PATTERNS = {
|
|
84
|
-
uncertainty: /\b(不确定|不知道|not sure|unsure|how to|怎么|如何|what if|should i|could i|是否应该)\b/i,
|
|
85
|
-
|
|
86
|
-
exploration: /\b(explore|research|investigate|分析|研究|调研|评估|探索|了解)\b/i,
|
|
87
|
-
|
|
88
|
-
options: /\b(options|alternatives|approaches|方案|选择|方向|可能性)\b/i,
|
|
89
|
-
|
|
90
|
-
questions: /\b(what|which|how|why|什么|哪个|怎样|为什么)\b.*\?/i
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function detectExploration(text) {
|
|
94
|
-
const hasUncertainty = EXPLORATION_PATTERNS.uncertainty.test(text)
|
|
95
|
-
const hasExploration = EXPLORATION_PATTERNS.exploration.test(text)
|
|
96
|
-
const hasOptions = EXPLORATION_PATTERNS.options.test(text)
|
|
97
|
-
const hasQuestion = EXPLORATION_PATTERNS.questions.test(text)
|
|
98
|
-
|
|
99
|
-
const score = [hasUncertainty, hasExploration, hasOptions, hasQuestion].filter(Boolean).length
|
|
100
|
-
|
|
101
|
-
if (score >= 2 || hasUncertainty) {
|
|
102
|
-
return {
|
|
103
|
-
type: 'exploration',
|
|
104
|
-
confidence: score >= 3 ? 'high' : 'medium'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return null
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### UI/Design Detection
|
|
112
|
-
|
|
113
|
-
```javascript
|
|
114
|
-
const UI_PATTERNS = {
|
|
115
|
-
components: /\b(ui|界面|component|组件|button|按钮|form|表单|modal|弹窗|dialog|对话框)\b/i,
|
|
116
|
-
|
|
117
|
-
design: /\b(design|设计|style|样式|layout|布局|theme|主题|color|颜色)\b/i,
|
|
118
|
-
|
|
119
|
-
visual: /\b(visual|视觉|animation|动画|responsive|响应式|mobile|移动端)\b/i,
|
|
120
|
-
|
|
121
|
-
frontend: /\b(frontend|前端|react|vue|angular|css|html|page|页面)\b/i
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function detectUI(text) {
|
|
125
|
-
const hasComponents = UI_PATTERNS.components.test(text)
|
|
126
|
-
const hasDesign = UI_PATTERNS.design.test(text)
|
|
127
|
-
const hasVisual = UI_PATTERNS.visual.test(text)
|
|
128
|
-
const hasFrontend = UI_PATTERNS.frontend.test(text)
|
|
129
|
-
|
|
130
|
-
const score = [hasComponents, hasDesign, hasVisual, hasFrontend].filter(Boolean).length
|
|
131
|
-
|
|
132
|
-
if (score >= 2) {
|
|
133
|
-
return {
|
|
134
|
-
type: 'ui',
|
|
135
|
-
hasReference: /参考|reference|based on|像|like|模仿|imitate/.test(text),
|
|
136
|
-
confidence: score >= 3 ? 'high' : 'medium'
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return null
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Complexity Assessment
|
|
144
|
-
|
|
145
|
-
### Indicators
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
const COMPLEXITY_INDICATORS = {
|
|
149
|
-
high: {
|
|
150
|
-
patterns: [
|
|
151
|
-
/\b(refactor|重构|restructure|重新组织)\b/i,
|
|
152
|
-
/\b(migrate|迁移|upgrade|升级|convert|转换)\b/i,
|
|
153
|
-
/\b(architect|架构|system|系统|infrastructure|基础设施)\b/i,
|
|
154
|
-
/\b(entire|整个|complete|完整|all\s+modules?|所有模块)\b/i,
|
|
155
|
-
/\b(security|安全|scale|扩展|performance\s+critical|性能关键)\b/i,
|
|
156
|
-
/\b(distributed|分布式|microservice|微服务|cluster|集群)\b/i
|
|
157
|
-
],
|
|
158
|
-
weight: 2
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
medium: {
|
|
162
|
-
patterns: [
|
|
163
|
-
/\b(integrate|集成|connect|连接|link|链接)\b/i,
|
|
164
|
-
/\b(api|database|数据库|service|服务|endpoint|接口)\b/i,
|
|
165
|
-
/\b(test|测试|validate|验证|coverage|覆盖)\b/i,
|
|
166
|
-
/\b(multiple\s+files?|多个文件|several\s+components?|几个组件)\b/i,
|
|
167
|
-
/\b(authentication|认证|authorization|授权)\b/i
|
|
168
|
-
],
|
|
169
|
-
weight: 1
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
low: {
|
|
173
|
-
patterns: [
|
|
174
|
-
/\b(add|添加|create|创建|simple|简单)\b/i,
|
|
175
|
-
/\b(update|更新|modify|修改|change|改变)\b/i,
|
|
176
|
-
/\b(single|单个|one|一个|small|小)\b/i,
|
|
177
|
-
/\b(comment|注释|log|日志|print|打印)\b/i
|
|
178
|
-
],
|
|
179
|
-
weight: -1
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function assessComplexity(text) {
|
|
184
|
-
let score = 0
|
|
185
|
-
|
|
186
|
-
for (const [level, config] of Object.entries(COMPLEXITY_INDICATORS)) {
|
|
187
|
-
for (const pattern of config.patterns) {
|
|
188
|
-
if (pattern.test(text)) {
|
|
189
|
-
score += config.weight
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// File count indicator
|
|
195
|
-
const fileMatches = text.match(/\b\d+\s*(files?|文件)/i)
|
|
196
|
-
if (fileMatches) {
|
|
197
|
-
const count = parseInt(fileMatches[0])
|
|
198
|
-
if (count > 10) score += 2
|
|
199
|
-
else if (count > 5) score += 1
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Module count indicator
|
|
203
|
-
const moduleMatches = text.match(/\b\d+\s*(modules?|模块)/i)
|
|
204
|
-
if (moduleMatches) {
|
|
205
|
-
const count = parseInt(moduleMatches[0])
|
|
206
|
-
if (count > 3) score += 2
|
|
207
|
-
else if (count > 1) score += 1
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (score >= 4) return 'high'
|
|
211
|
-
if (score >= 2) return 'medium'
|
|
212
|
-
return 'low'
|
|
213
|
-
}
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
## Workflow Selection Matrix
|
|
217
|
-
|
|
218
|
-
| Intent | Complexity | Workflow | Commands |
|
|
219
|
-
|--------|------------|----------|----------|
|
|
220
|
-
| bugfix (hotfix) | * | bugfix | `lite-fix --hotfix` |
|
|
221
|
-
| bugfix (standard) | * | bugfix | `lite-fix` |
|
|
222
|
-
| issue | * | issue | `issue:plan → queue → execute` |
|
|
223
|
-
| exploration | * | full | `brainstorm → plan → execute` |
|
|
224
|
-
| ui (reference) | * | ui | `ui-design:imitate-auto → plan` |
|
|
225
|
-
| ui (explore) | * | ui | `ui-design:explore-auto → plan` |
|
|
226
|
-
| feature | high | coupled | `plan → verify → execute` |
|
|
227
|
-
| feature | medium | rapid | `lite-plan → lite-execute` |
|
|
228
|
-
| feature | low | rapid | `lite-plan → lite-execute` |
|
|
229
|
-
|
|
230
|
-
## Confidence Levels
|
|
231
|
-
|
|
232
|
-
| Level | Description | Action |
|
|
233
|
-
|-------|-------------|--------|
|
|
234
|
-
| **high** | Multiple strong indicators match | Direct dispatch |
|
|
235
|
-
| **medium** | Some indicators match | Confirm with user |
|
|
236
|
-
| **low** | Fallback classification | Always confirm |
|
|
237
|
-
|
|
238
|
-
## Tool Preference Detection
|
|
239
|
-
|
|
240
|
-
```javascript
|
|
241
|
-
const TOOL_PREFERENCES = {
|
|
242
|
-
gemini: {
|
|
243
|
-
pattern: /用\s*gemini|gemini\s*(分析|理解|设计)|让\s*gemini/i,
|
|
244
|
-
capability: 'analysis'
|
|
245
|
-
},
|
|
246
|
-
qwen: {
|
|
247
|
-
pattern: /用\s*qwen|qwen\s*(分析|评估)|让\s*qwen/i,
|
|
248
|
-
capability: 'analysis'
|
|
249
|
-
},
|
|
250
|
-
codex: {
|
|
251
|
-
pattern: /用\s*codex|codex\s*(实现|重构|修复)|让\s*codex/i,
|
|
252
|
-
capability: 'implementation'
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
function detectToolPreference(text) {
|
|
257
|
-
for (const [tool, config] of Object.entries(TOOL_PREFERENCES)) {
|
|
258
|
-
if (config.pattern.test(text)) {
|
|
259
|
-
return { tool, capability: config.capability }
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return null
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Multi-Tool Collaboration Detection
|
|
267
|
-
|
|
268
|
-
```javascript
|
|
269
|
-
const COLLABORATION_PATTERNS = {
|
|
270
|
-
sequential: /先.*(分析|理解).*然后.*(实现|重构)|分析.*后.*实现/i,
|
|
271
|
-
parallel: /(同时|并行).*(分析|实现)|一边.*一边/i,
|
|
272
|
-
hybrid: /(分析|设计).*和.*(实现|测试).*分开/i
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function detectCollaboration(text) {
|
|
276
|
-
if (COLLABORATION_PATTERNS.sequential.test(text)) {
|
|
277
|
-
return { mode: 'sequential', description: 'Analysis first, then implementation' }
|
|
278
|
-
}
|
|
279
|
-
if (COLLABORATION_PATTERNS.parallel.test(text)) {
|
|
280
|
-
return { mode: 'parallel', description: 'Concurrent analysis and implementation' }
|
|
281
|
-
}
|
|
282
|
-
if (COLLABORATION_PATTERNS.hybrid.test(text)) {
|
|
283
|
-
return { mode: 'hybrid', description: 'Mixed parallel and sequential' }
|
|
284
|
-
}
|
|
285
|
-
return null
|
|
286
|
-
}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
## Classification Pipeline
|
|
290
|
-
|
|
291
|
-
```javascript
|
|
292
|
-
function classify(userInput) {
|
|
293
|
-
const text = userInput.trim()
|
|
294
|
-
|
|
295
|
-
// Step 1: Check explicit commands
|
|
296
|
-
if (/^\/(?:workflow|issue|memory|task):/.test(text)) {
|
|
297
|
-
return { type: 'explicit', command: text }
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// Step 2: Priority-based classification
|
|
301
|
-
const bugResult = detectBug(text)
|
|
302
|
-
if (bugResult) return bugResult
|
|
303
|
-
|
|
304
|
-
const issueResult = detectIssueBatch(text)
|
|
305
|
-
if (issueResult) return issueResult
|
|
306
|
-
|
|
307
|
-
const explorationResult = detectExploration(text)
|
|
308
|
-
if (explorationResult) return explorationResult
|
|
309
|
-
|
|
310
|
-
const uiResult = detectUI(text)
|
|
311
|
-
if (uiResult) return uiResult
|
|
312
|
-
|
|
313
|
-
// Step 3: Complexity-based fallback
|
|
314
|
-
const complexity = assessComplexity(text)
|
|
315
|
-
return {
|
|
316
|
-
type: 'feature',
|
|
317
|
-
complexity,
|
|
318
|
-
workflow: complexity === 'high' ? 'coupled' : 'rapid',
|
|
319
|
-
confidence: 'low'
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
## Examples
|
|
325
|
-
|
|
326
|
-
### Input → Classification
|
|
327
|
-
|
|
328
|
-
| Input | Classification | Workflow |
|
|
329
|
-
|-------|----------------|----------|
|
|
330
|
-
| "用户登录失败,401错误" | bugfix/standard | lite-fix |
|
|
331
|
-
| "紧急:支付网关挂了" | bugfix/hotfix | lite-fix --hotfix |
|
|
332
|
-
| "批量处理这些 GitHub issues" | issue | issue:plan → queue |
|
|
333
|
-
| "不确定要怎么设计缓存系统" | exploration | brainstorm → plan |
|
|
334
|
-
| "添加一个深色模式切换按钮" | ui | ui-design → plan |
|
|
335
|
-
| "重构整个认证模块" | feature/high | plan → verify |
|
|
336
|
-
| "添加用户头像功能" | feature/low | lite-plan |
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "action-planning-agent",
|
|
4
|
-
"description": "|",
|
|
5
|
-
"source": "../../../agents/action-planning-agent.md"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "cli-execution-agent",
|
|
9
|
-
"description": "|",
|
|
10
|
-
"source": "../../../agents/cli-execution-agent.md"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "cli-explore-agent",
|
|
14
|
-
"description": "|",
|
|
15
|
-
"source": "../../../agents/cli-explore-agent.md"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "cli-lite-planning-agent",
|
|
19
|
-
"description": "|",
|
|
20
|
-
"source": "../../../agents/cli-lite-planning-agent.md"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"name": "cli-planning-agent",
|
|
24
|
-
"description": "|",
|
|
25
|
-
"source": "../../../agents/cli-planning-agent.md"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "code-developer",
|
|
29
|
-
"description": "|",
|
|
30
|
-
"source": "../../../agents/code-developer.md"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "conceptual-planning-agent",
|
|
34
|
-
"description": "|",
|
|
35
|
-
"source": "../../../agents/conceptual-planning-agent.md"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "context-search-agent",
|
|
39
|
-
"description": "|",
|
|
40
|
-
"source": "../../../agents/context-search-agent.md"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "doc-generator",
|
|
44
|
-
"description": "|",
|
|
45
|
-
"source": "../../../agents/doc-generator.md"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "issue-plan-agent",
|
|
49
|
-
"description": "|",
|
|
50
|
-
"source": "../../../agents/issue-plan-agent.md"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"name": "issue-queue-agent",
|
|
54
|
-
"description": "|",
|
|
55
|
-
"source": "../../../agents/issue-queue-agent.md"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "memory-bridge",
|
|
59
|
-
"description": "Execute complex project documentation updates using script coordination",
|
|
60
|
-
"source": "../../../agents/memory-bridge.md"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "test-context-search-agent",
|
|
64
|
-
"description": "|",
|
|
65
|
-
"source": "../../../agents/test-context-search-agent.md"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "test-fix-agent",
|
|
69
|
-
"description": "|",
|
|
70
|
-
"source": "../../../agents/test-fix-agent.md"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "ui-design-agent",
|
|
74
|
-
"description": "|",
|
|
75
|
-
"source": "../../../agents/ui-design-agent.md"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "universal-executor",
|
|
79
|
-
"description": "|",
|
|
80
|
-
"source": "../../../agents/universal-executor.md"
|
|
81
|
-
}
|
|
82
|
-
]
|