ccg-workflow 1.0.1 → 1.0.3
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/dist/cli.mjs +1 -1
- package/package.json +1 -1
- package/templates/commands/_config.md +5 -3
- package/templates/commands/dev.md +55 -8
package/dist/cli.mjs
CHANGED
package/package.json
CHANGED
|
@@ -34,12 +34,12 @@ strategy = "parallel"
|
|
|
34
34
|
|
|
35
35
|
## 调用语法模板
|
|
36
36
|
|
|
37
|
+
**⚠️ 重要**: 使用 `Bash` 工具调用 `codeagent-wrapper`,**不要**使用 `/collaborating-with-codex` 或 `/collaborating-with-gemini` 等旧的 Skill 方式!
|
|
38
|
+
|
|
37
39
|
### 基础模式
|
|
38
40
|
```bash
|
|
39
41
|
codeagent-wrapper --backend <MODEL> - $PROJECT_DIR <<'EOF'
|
|
40
|
-
|
|
41
|
-
{{读取 ~/.claude/prompts/ccg/<model>/<role>.md 注入}}
|
|
42
|
-
</ROLE>
|
|
42
|
+
ROLE_FILE: ~/.claude/prompts/ccg/<model>/<role>.md
|
|
43
43
|
|
|
44
44
|
<TASK>
|
|
45
45
|
{{任务描述}}
|
|
@@ -52,6 +52,8 @@ OUTPUT: {{输出格式}}
|
|
|
52
52
|
EOF
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
**说明**: 使用 `ROLE_FILE:` 指定提示词文件路径,让子进程自己读取,避免消耗主会话 token。
|
|
56
|
+
|
|
55
57
|
### 角色映射
|
|
56
58
|
| 任务类型 | Codex 角色 | Gemini 角色 | Claude 角色 |
|
|
57
59
|
|---------|-----------|-------------|-------------|
|
|
@@ -87,9 +87,25 @@ strategy = "parallel"
|
|
|
87
87
|
|
|
88
88
|
**根据配置并行调用模型进行分析**(使用 `run_in_background: true` 非阻塞执行):
|
|
89
89
|
|
|
90
|
+
**调用方式**: 使用 `Bash` 工具调用 `codeagent-wrapper`(不要使用 `/collaborating-with-codex` 或 `/collaborating-with-gemini`)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 后端模型分析示例
|
|
94
|
+
codeagent-wrapper --backend codex - $PROJECT_DIR <<'EOF'
|
|
95
|
+
ROLE_FILE: ~/.claude/prompts/ccg/codex/analyzer.md
|
|
96
|
+
|
|
97
|
+
<TASK>
|
|
98
|
+
分析需求: {{增强后的需求}}
|
|
99
|
+
Context: {{从 ace-tool 获取的代码上下文}}
|
|
100
|
+
</TASK>
|
|
101
|
+
|
|
102
|
+
OUTPUT: Structured analysis/diagnostic report.
|
|
103
|
+
EOF
|
|
104
|
+
```
|
|
105
|
+
|
|
90
106
|
根据 `routing.backend.models` 和 `routing.frontend.models` 动态生成调用:
|
|
91
|
-
- **后端模型**: 使用 `analyzer`
|
|
92
|
-
- **前端模型**: 使用 `analyzer`
|
|
107
|
+
- **后端模型**: 使用 Bash 调用 `codeagent-wrapper --backend codex/gemini/claude` + `analyzer` 角色
|
|
108
|
+
- **前端模型**: 使用 Bash 调用 `codeagent-wrapper --backend gemini/codex/claude` + `analyzer` 角色
|
|
93
109
|
|
|
94
110
|
然后使用 `TaskOutput` 获取所有任务的结果,交叉验证后综合方案。
|
|
95
111
|
|
|
@@ -99,10 +115,26 @@ strategy = "parallel"
|
|
|
99
115
|
|
|
100
116
|
**三模型并行生成原型**(使用 `run_in_background: true`):
|
|
101
117
|
|
|
118
|
+
**调用方式**: 使用 `Bash` 工具调用 `codeagent-wrapper`
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Codex 后端原型示例
|
|
122
|
+
codeagent-wrapper --backend codex - $PROJECT_DIR <<'EOF'
|
|
123
|
+
ROLE_FILE: ~/.claude/prompts/ccg/codex/architect.md
|
|
124
|
+
|
|
125
|
+
<TASK>
|
|
126
|
+
生成原型: {{功能需求}}
|
|
127
|
+
Context: {{相关代码}}
|
|
128
|
+
</TASK>
|
|
129
|
+
|
|
130
|
+
OUTPUT: Unified Diff Patch ONLY. Strictly prohibit any actual modifications.
|
|
131
|
+
EOF
|
|
132
|
+
```
|
|
133
|
+
|
|
102
134
|
根据 `routing.prototype.models` 配置,同时调用三个模型:
|
|
103
|
-
- **Codex
|
|
104
|
-
- **Gemini
|
|
105
|
-
- **Claude
|
|
135
|
+
- **Codex**: `codeagent-wrapper --backend codex` + `architect` 角色 → 后端架构视角的原型
|
|
136
|
+
- **Gemini**: `codeagent-wrapper --backend gemini` + `frontend` 角色 → 前端 UI 视角的原型
|
|
137
|
+
- **Claude**: `codeagent-wrapper --backend claude` + `architect` 角色 → 全栈整合视角的原型
|
|
106
138
|
|
|
107
139
|
输出: `Unified Diff Patch ONLY`
|
|
108
140
|
|
|
@@ -128,10 +160,25 @@ strategy = "parallel"
|
|
|
128
160
|
|
|
129
161
|
**三模型并行代码审查**(使用 `run_in_background: true`):
|
|
130
162
|
|
|
163
|
+
**调用方式**: 使用 `Bash` 工具调用 `codeagent-wrapper`
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Codex 代码审查示例
|
|
167
|
+
codeagent-wrapper --backend codex - $PROJECT_DIR <<'EOF'
|
|
168
|
+
ROLE_FILE: ~/.claude/prompts/ccg/codex/reviewer.md
|
|
169
|
+
|
|
170
|
+
<TASK>
|
|
171
|
+
审查代码: {{实施的代码变更}}
|
|
172
|
+
</TASK>
|
|
173
|
+
|
|
174
|
+
OUTPUT: Review comments only. No code modifications.
|
|
175
|
+
EOF
|
|
176
|
+
```
|
|
177
|
+
|
|
131
178
|
根据 `routing.review.models` 配置调用所有模型:
|
|
132
|
-
- **Codex
|
|
133
|
-
- **Gemini
|
|
134
|
-
- **Claude
|
|
179
|
+
- **Codex**: `codeagent-wrapper --backend codex` + `reviewer` 角色 → 安全性、性能、错误处理
|
|
180
|
+
- **Gemini**: `codeagent-wrapper --backend gemini` + `reviewer` 角色 → 可访问性、响应式设计、设计一致性
|
|
181
|
+
- **Claude**: `codeagent-wrapper --backend claude` + `reviewer` 角色 → 集成正确性、契约一致性、可维护性
|
|
135
182
|
|
|
136
183
|
输出: `Review comments only`
|
|
137
184
|
|