ccg-workflow 1.4.4 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/dist/cli.mjs +2 -2
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.BYScBcmv.mjs → ccg-workflow.DSwxPZjT.mjs} +53 -18
- package/package.json +1 -1
- package/templates/commands/agents/planner.md +2 -2
- package/templates/commands/agents/ui-ux-designer.md +2 -2
- package/templates/commands/analyze.md +16 -40
- package/templates/commands/backend.md +7 -49
- package/templates/commands/bugfix.md +9 -9
- package/templates/commands/code.md +9 -9
- package/templates/commands/debug.md +5 -5
- package/templates/commands/dev.md +75 -106
- package/templates/commands/enhance.md +1 -1
- package/templates/commands/feat.md +123 -536
- package/templates/commands/frontend.md +7 -49
- package/templates/commands/optimize.md +5 -5
- package/templates/commands/review.md +19 -23
- package/templates/commands/test.md +5 -5
- package/templates/commands/think.md +5 -5
- package/templates/commands/scan.md +0 -569
|
@@ -12,15 +12,6 @@ description: 前端/UI/样式任务,自动路由到配置的前端模型进行
|
|
|
12
12
|
- This command routes to your configured frontend models.
|
|
13
13
|
- Default authority for CSS, React, Vue, and visual design.
|
|
14
14
|
|
|
15
|
-
## 配置
|
|
16
|
-
**首先读取 `~/.claude/.ccg/config.toml` 获取模型路由配置**:
|
|
17
|
-
```toml
|
|
18
|
-
[routing.frontend]
|
|
19
|
-
models = ["gemini", "codex"] # 用户配置的前端模型列表
|
|
20
|
-
primary = "gemini" # 主模型
|
|
21
|
-
strategy = "parallel" # 路由策略: parallel | fallback | round-robin
|
|
22
|
-
```
|
|
23
|
-
|
|
24
15
|
## 你的角色
|
|
25
16
|
You are the **Frontend Orchestrator** specializing in UI/UX implementation. You coordinate:
|
|
26
17
|
1. **ace-tool** – for retrieving existing frontend code and components
|
|
@@ -29,61 +20,29 @@ You are the **Frontend Orchestrator** specializing in UI/UX implementation. You
|
|
|
29
20
|
|
|
30
21
|
## 流程
|
|
31
22
|
|
|
32
|
-
### Step 1:
|
|
33
|
-
1.
|
|
34
|
-
2. Identify which models to use based on `routing.frontend.models`
|
|
35
|
-
3. If config doesn't exist, default to `gemini`
|
|
36
|
-
|
|
37
|
-
### Step 2: 上下文检索
|
|
38
|
-
1. Call `mcp__ace-tool__search_context` to find existing UI components, styles, and patterns:
|
|
23
|
+
### Step 1: 上下文检索
|
|
24
|
+
1. Call `{{MCP_SEARCH_TOOL}}` to find existing UI components, styles, and patterns:
|
|
39
25
|
- `project_root_path`: Project root directory absolute path
|
|
40
26
|
- `query`: Natural language description of the UI/frontend task
|
|
41
27
|
2. Identify the design system, component library, and styling conventions in use
|
|
42
28
|
|
|
43
|
-
### Step
|
|
44
|
-
|
|
45
|
-
**根据配置的 strategy 执行**:
|
|
46
|
-
- **parallel**: 同时调用所有配置的前端模型,综合结果
|
|
47
|
-
- **fallback**: 调用主模型,失败则调用次模型
|
|
48
|
-
- **round-robin**: 轮询调用
|
|
49
|
-
|
|
50
|
-
**调用方式**: 使用 `Bash` 工具调用 `codeagent-wrapper`
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# Gemini 前端原型示例
|
|
54
|
-
codeagent-wrapper --backend gemini - $PROJECT_DIR <<'EOF'
|
|
55
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/gemini/frontend.md
|
|
56
|
-
|
|
57
|
-
<TASK>
|
|
58
|
-
实现 UI 功能: {{前端任务描述}}
|
|
59
|
-
Context: {{从 ace-tool 获取的相关组件和样式}}
|
|
60
|
-
</TASK>
|
|
29
|
+
### Step 2: 调用前端模型生成原型
|
|
61
30
|
|
|
62
|
-
|
|
63
|
-
EOF
|
|
64
|
-
```
|
|
31
|
+
使用配置的前端主模型 ({{FRONTEND_PRIMARY}}) 生成前端原型:
|
|
65
32
|
|
|
66
33
|
```bash
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/codex/architect.md
|
|
34
|
+
codeagent-wrapper --backend {{FRONTEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
35
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{FRONTEND_PRIMARY}}/frontend.md
|
|
70
36
|
|
|
71
37
|
<TASK>
|
|
72
38
|
实现 UI 功能: {{前端任务描述}}
|
|
73
|
-
Context: {{从
|
|
39
|
+
Context: {{从 MCP 获取的相关组件和样式}}
|
|
74
40
|
</TASK>
|
|
75
41
|
|
|
76
42
|
OUTPUT: Unified Diff Patch ONLY. Strictly prohibit any actual modifications.
|
|
77
43
|
EOF
|
|
78
44
|
```
|
|
79
45
|
|
|
80
|
-
遍历 `routing.frontend.models`,为每个模型动态生成上述调用:
|
|
81
|
-
- **Gemini**: 使用 `frontend` 角色
|
|
82
|
-
- **Codex**: 使用 `architect` 角色(Codex 无专门前端角色)
|
|
83
|
-
|
|
84
|
-
**如果 strategy = parallel 且有多个模型**:
|
|
85
|
-
使用 `run_in_background: true` 并行调用所有模型,然后用 `TaskOutput` 收集结果。
|
|
86
|
-
|
|
87
46
|
### Step 4: 重构与实施
|
|
88
47
|
1. Review model prototype(s) as "dirty prototype"
|
|
89
48
|
2. If multiple models, cross-validate and select best patterns
|
|
@@ -106,6 +65,5 @@ Call configured frontend model(s) to review the final implementation:
|
|
|
106
65
|
|
|
107
66
|
## 注意事项
|
|
108
67
|
- Gemini context limit: < 32k tokens
|
|
109
|
-
- Read `~/.claude/.ccg/config.toml` at start of execution
|
|
110
68
|
- Always request Unified Diff Patch format
|
|
111
69
|
- Use HEREDOC syntax (`<<'EOF'`) to avoid shell escaping issues
|
|
@@ -15,7 +15,7 @@ description: 多模型性能优化(Codex 后端优化 + Gemini 前端优化)
|
|
|
15
15
|
## 流程
|
|
16
16
|
|
|
17
17
|
### Phase 1: 性能基线分析
|
|
18
|
-
1. 调用 `
|
|
18
|
+
1. 调用 `{{MCP_SEARCH_TOOL}}` 检索目标代码:
|
|
19
19
|
- `project_root_path`: 项目根目录绝对路径
|
|
20
20
|
- `query`: 需要优化的目标代码描述
|
|
21
21
|
2. 识别性能关键路径
|
|
@@ -30,8 +30,8 @@ description: 多模型性能优化(Codex 后端优化 + Gemini 前端优化)
|
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
# Codex 后端性能分析
|
|
33
|
-
codeagent-wrapper --backend
|
|
34
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
33
|
+
codeagent-wrapper --backend {{BACKEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
34
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{BACKEND_PRIMARY}}/optimizer.md
|
|
35
35
|
|
|
36
36
|
<TASK>
|
|
37
37
|
性能优化: {{优化目标}}
|
|
@@ -44,8 +44,8 @@ EOF
|
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
# Gemini 前端性能分析
|
|
47
|
-
codeagent-wrapper --backend
|
|
48
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
47
|
+
codeagent-wrapper --backend {{FRONTEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
48
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{FRONTEND_PRIMARY}}/optimizer.md
|
|
49
49
|
|
|
50
50
|
<TASK>
|
|
51
51
|
性能优化: {{优化目标}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 多模型代码审查(并行执行),无参数时自动审查 git diff
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
> 调用语法见 `_config.md`
|
|
@@ -12,14 +12,6 @@ description: 多模型代码审查(根据配置并行),无参数时自动
|
|
|
12
12
|
- This command triggers multi-model code review based on your configuration.
|
|
13
13
|
- Configured models review simultaneously for comprehensive feedback.
|
|
14
14
|
|
|
15
|
-
## 配置
|
|
16
|
-
**首先读取 `~/.claude/.ccg/config.toml` 获取审查模型配置**:
|
|
17
|
-
```toml
|
|
18
|
-
[routing.review]
|
|
19
|
-
models = ["codex", "gemini"] # 用户配置的审查模型列表
|
|
20
|
-
strategy = "parallel" # 始终并行执行
|
|
21
|
-
```
|
|
22
|
-
|
|
23
15
|
## 行为
|
|
24
16
|
- **No arguments**: Automatically review current git changes (staged + unstaged)
|
|
25
17
|
- **With arguments**: Review specified code or description
|
|
@@ -32,10 +24,7 @@ You are the **Code Review Coordinator** orchestrating multi-model review. You di
|
|
|
32
24
|
|
|
33
25
|
## 流程
|
|
34
26
|
|
|
35
|
-
### Step 1:
|
|
36
|
-
|
|
37
|
-
1. **读取 `~/.claude/.ccg/config.toml`** 获取 `routing.review.models`
|
|
38
|
-
2. 如果配置不存在,默认使用 `["codex", "gemini"]`
|
|
27
|
+
### Step 1: 获取待审查代码
|
|
39
28
|
|
|
40
29
|
**If no arguments provided**, run git commands to get current changes:
|
|
41
30
|
```bash
|
|
@@ -46,7 +35,7 @@ git status --short
|
|
|
46
35
|
|
|
47
36
|
**If arguments provided**, use the specified code/description.
|
|
48
37
|
|
|
49
|
-
Then call `
|
|
38
|
+
Then call `{{MCP_SEARCH_TOOL}}` to get related context:
|
|
50
39
|
- `project_root_path`: Project root directory absolute path
|
|
51
40
|
- `query`: Description of code/files to review
|
|
52
41
|
|
|
@@ -58,8 +47,8 @@ Then call `mcp__ace-tool__search_context` to get related context:
|
|
|
58
47
|
|
|
59
48
|
```bash
|
|
60
49
|
# Codex 代码审查示例
|
|
61
|
-
codeagent-wrapper --backend
|
|
62
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
50
|
+
codeagent-wrapper --backend {{BACKEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
51
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{BACKEND_PRIMARY}}/reviewer.md
|
|
63
52
|
|
|
64
53
|
<TASK>
|
|
65
54
|
审查代码: {{待审查的代码变更}}
|
|
@@ -70,22 +59,29 @@ OUTPUT: Review comments only. No code modifications.
|
|
|
70
59
|
EOF
|
|
71
60
|
```
|
|
72
61
|
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**并行调用所有配置的审查模型**(使用 `run_in_background: true`):
|
|
65
|
+
|
|
66
|
+
遍历 {{REVIEW_MODELS}} 中的每个模型进行代码审查:
|
|
67
|
+
|
|
73
68
|
```bash
|
|
74
|
-
#
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
# 遍历审查模型列表(默认: codex, gemini)
|
|
70
|
+
for model in $(echo '{{REVIEW_MODELS}}' | jq -r '.[]'); do
|
|
71
|
+
codeagent-wrapper --backend $model - $PROJECT_DIR <<'EOF' &
|
|
72
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/$model/reviewer.md
|
|
77
73
|
|
|
78
74
|
<TASK>
|
|
79
75
|
审查代码: {{待审查的代码变更}}
|
|
80
|
-
关注点:
|
|
76
|
+
关注点: 安全性、性能、错误处理、可访问性、响应式设计、设计一致性
|
|
81
77
|
</TASK>
|
|
82
78
|
|
|
83
79
|
OUTPUT: Review comments only. No code modifications.
|
|
84
80
|
EOF
|
|
81
|
+
done
|
|
82
|
+
wait # 等待所有后台任务完成
|
|
85
83
|
```
|
|
86
84
|
|
|
87
|
-
遍历 `routing.review.models`,为每个模型动态生成上述调用,使用 `reviewer` 角色。
|
|
88
|
-
|
|
89
85
|
### Step 3: 综合反馈
|
|
90
86
|
使用 `TaskOutput` 获取所有任务的结果,然后:
|
|
91
87
|
1. Collect feedback from all configured models
|
|
@@ -107,7 +103,7 @@ Provide unified review report to user with recommendations.
|
|
|
107
103
|
7. **Recommended Actions** – prioritized fix list
|
|
108
104
|
|
|
109
105
|
## 注意事项
|
|
110
|
-
-
|
|
106
|
+
- **审查模型已在安装时注入**: {{REVIEW_MODELS}}
|
|
111
107
|
- **No arguments** = auto-review git changes (`git diff HEAD`)
|
|
112
108
|
- **With arguments** = review specified content
|
|
113
109
|
- **Use `run_in_background: true` for parallel execution** to avoid blocking
|
|
@@ -14,7 +14,7 @@ description: 多模型测试生成(Codex 后端测试 + Gemini 前端测试)
|
|
|
14
14
|
## 流程
|
|
15
15
|
|
|
16
16
|
### Phase 1: 测试分析
|
|
17
|
-
1. 调用 `
|
|
17
|
+
1. 调用 `{{MCP_SEARCH_TOOL}}` 检索:
|
|
18
18
|
- `project_root_path`: 项目根目录绝对路径
|
|
19
19
|
- `query`: 需要测试的代码/功能描述
|
|
20
20
|
- 目标代码的完整实现
|
|
@@ -34,8 +34,8 @@ description: 多模型测试生成(Codex 后端测试 + Gemini 前端测试)
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
# Codex 后端测试生成
|
|
37
|
-
codeagent-wrapper --backend
|
|
38
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
37
|
+
codeagent-wrapper --backend {{BACKEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
38
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{BACKEND_PRIMARY}}/tester.md
|
|
39
39
|
|
|
40
40
|
<TASK>
|
|
41
41
|
生成测试: {{需要测试的代码}}
|
|
@@ -48,8 +48,8 @@ EOF
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
# Gemini 前端测试生成
|
|
51
|
-
codeagent-wrapper --backend
|
|
52
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
51
|
+
codeagent-wrapper --backend {{FRONTEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
52
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{FRONTEND_PRIMARY}}/tester.md
|
|
53
53
|
|
|
54
54
|
<TASK>
|
|
55
55
|
生成测试: {{需要测试的代码}}
|
|
@@ -15,7 +15,7 @@ description: UltraThink 深度分析(双模型并行分析 + 综合见解)
|
|
|
15
15
|
## 流程
|
|
16
16
|
|
|
17
17
|
### Phase 1: 上下文收集
|
|
18
|
-
1. 调用 `
|
|
18
|
+
1. 调用 `{{MCP_SEARCH_TOOL}}` 检索相关代码:
|
|
19
19
|
- `project_root_path`: 项目根目录绝对路径
|
|
20
20
|
- `query`: 需要深度分析的问题描述
|
|
21
21
|
2. 识别分析范围和关键组件
|
|
@@ -28,8 +28,8 @@ description: UltraThink 深度分析(双模型并行分析 + 综合见解)
|
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# Codex 后端/系统视角分析
|
|
31
|
-
codeagent-wrapper --backend
|
|
32
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
31
|
+
codeagent-wrapper --backend {{BACKEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
32
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{BACKEND_PRIMARY}}/analyzer.md
|
|
33
33
|
|
|
34
34
|
<TASK>
|
|
35
35
|
深度分析: {{问题或场景}}
|
|
@@ -42,8 +42,8 @@ EOF
|
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
# Gemini 前端/用户视角分析
|
|
45
|
-
codeagent-wrapper --backend
|
|
46
|
-
ROLE_FILE: ~/.claude/.ccg/prompts/
|
|
45
|
+
codeagent-wrapper --backend {{FRONTEND_PRIMARY}} - $PROJECT_DIR <<'EOF'
|
|
46
|
+
ROLE_FILE: ~/.claude/.ccg/prompts/{{FRONTEND_PRIMARY}}/analyzer.md
|
|
47
47
|
|
|
48
48
|
<TASK>
|
|
49
49
|
深度分析: {{问题或场景}}
|