ccg-workflow 2.1.16 → 3.0.1
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 +119 -250
- package/README.zh-CN.md +125 -258
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.CewMlBCj.mjs → ccg-workflow.2vO_S-e7.mjs} +160 -34
- package/package.json +6 -30
- package/templates/commands/go.md +205 -0
- package/templates/commands-legacy/team.md +475 -0
- package/templates/engine/model-router.md +117 -0
- package/templates/engine/phase-guide.md +95 -0
- package/templates/engine/strategies/debug-investigate.md +162 -0
- package/templates/engine/strategies/deep-research.md +141 -0
- package/templates/engine/strategies/direct-fix.md +108 -0
- package/templates/engine/strategies/full-collaborate.md +305 -0
- package/templates/engine/strategies/git-action.md +43 -0
- package/templates/engine/strategies/guided-develop.md +214 -0
- package/templates/engine/strategies/optimize-measure.md +103 -0
- package/templates/engine/strategies/quick-implement.md +96 -0
- package/templates/engine/strategies/refactor-safely.md +163 -0
- package/templates/engine/strategies/review-audit.md +116 -0
- package/templates/hooks/session-start.js +100 -0
- package/templates/hooks/skill-router.js +144 -0
- package/templates/hooks/subagent-context.js +118 -0
- package/templates/hooks/task-utils.js +167 -0
- package/templates/hooks/workflow-state.js +39 -0
- package/templates/spec/backend/index.md +31 -0
- package/templates/spec/frontend/index.md +31 -0
- package/templates/spec/guides/index.md +30 -0
- /package/templates/{commands → commands-legacy}/analyze.md +0 -0
- /package/templates/{commands → commands-legacy}/backend.md +0 -0
- /package/templates/{commands → commands-legacy}/codex-exec.md +0 -0
- /package/templates/{commands → commands-legacy}/debug.md +0 -0
- /package/templates/{commands → commands-legacy}/enhance.md +0 -0
- /package/templates/{commands → commands-legacy}/execute.md +0 -0
- /package/templates/{commands → commands-legacy}/feat.md +0 -0
- /package/templates/{commands → commands-legacy}/frontend.md +0 -0
- /package/templates/{commands → commands-legacy}/optimize.md +0 -0
- /package/templates/{commands → commands-legacy}/plan.md +0 -0
- /package/templates/{commands → commands-legacy}/review.md +0 -0
- /package/templates/{commands → commands-legacy}/team-exec.md +0 -0
- /package/templates/{commands → commands-legacy}/team-plan.md +0 -0
- /package/templates/{commands → commands-legacy}/team-research.md +0 -0
- /package/templates/{commands → commands-legacy}/team-review.md +0 -0
- /package/templates/{commands → commands-legacy}/test.md +0 -0
- /package/templates/{commands → commands-legacy}/workflow.md +0 -0
package/README.zh-CN.md
CHANGED
|
@@ -1,338 +1,216 @@
|
|
|
1
1
|
# CCG - Claude + Codex + Gemini 多模型协作
|
|
2
|
+
# CCG - Claude + Codex + Gemini Multi-Model Collaboration
|
|
2
3
|
|
|
3
4
|
<div align="center">
|
|
4
5
|
|
|
5
6
|
<img src="assets/logo/ccg-logo-cropped.png" alt="CCG Workflow" width="400">
|
|
6
7
|
|
|
8
|
+
[](https://github.com/fengshao1227/ccg-workflow)
|
|
9
|
+
[](https://www.npmjs.com/package/ccg-workflow)
|
|
7
10
|
[](https://www.npmjs.com/package/ccg-workflow)
|
|
8
11
|
[](https://opensource.org/licenses/MIT)
|
|
9
12
|
[](https://claude.ai/code)
|
|
10
13
|
[]()
|
|
11
14
|
[](https://x.com/CCG_Workflow)
|
|
15
|
+

|
|
12
16
|
|
|
13
|
-
简体中文
|
|
17
|
+
[简体中文](./README.zh-CN.md) | English
|
|
14
18
|
|
|
15
19
|
</div>
|
|
16
20
|
|
|
17
|
-
## ♥️
|
|
21
|
+
## ♥️ Sponsor
|
|
18
22
|
|
|
19
|
-
[](https://share.302.ai/oUDqQ6)
|
|
23
|
+
[](https://share.302.ai/oUDqQ6)
|
|
20
24
|
|
|
21
|
-
[302.AI](https://share.302.ai/oUDqQ6)
|
|
25
|
+
[302.AI](https://share.302.ai/oUDqQ6) is a pay-as-you-go enterprise AI resource hub that offers the latest and most comprehensive AI models and APIs on the market, along with a variety of ready-to-use online AI applications.
|
|
22
26
|
|
|
23
27
|
---
|
|
24
28
|
|
|
25
|
-
[**n1n.ai**](https://api.n1n.ai/register?channel=c_ivgzug0w) —
|
|
29
|
+
[**n1n.ai**](https://api.n1n.ai/register?channel=c_ivgzug0w) — Global LLM API Gateway. One API Key to access 500+ top AI models (GPT-5, Claude 4.5, Gemini 3 Pro, and more).
|
|
26
30
|
|
|
27
31
|
---
|
|
28
32
|
|
|
29
|
-
Claude Code
|
|
33
|
+
CCG 是 Claude Code 的工作流引擎。它编排多个 AI 模型(Codex、Gemini、Claude),通过 Hook 状态追踪、自动策略选择和 Agent Teams 并行执行来完成开发任务。
|
|
30
34
|
|
|
31
|
-
##
|
|
35
|
+
## v3.0 重大更新
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
- **安全设计** — 外部模型无写入权限,仅返回 Patch,由 Claude 审核后应用。
|
|
35
|
-
- **29+ 个斜杠命令** — 从规划到执行、Git 工作流到代码审查,通过 `/ccg:*` 一站式访问。
|
|
36
|
-
- **规范驱动开发** — 集成 [OPSX](https://github.com/fission-ai/opsx),将模糊需求变成可验证约束,让 AI 没法自由发挥。
|
|
37
|
+
v3.0 从底层重写。一个命令替代 29 个。
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
↓ ↓
|
|
45
|
-
Codex Gemini
|
|
46
|
-
(后端) (前端)
|
|
47
|
-
│ │
|
|
48
|
-
└───┬───┘
|
|
49
|
-
↓
|
|
50
|
-
Unified Patch
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
外部模型无写入权限,仅返回 Patch,由 Claude 审核后应用。
|
|
54
|
-
|
|
55
|
-
> **🎬 [查看 CCG 实战演示 →](https://x.com/CCG_Workflow/status/2038923720610463876)** — X 上的多模型协作真实案例
|
|
39
|
+
- `/ccg:go` — 用自然语言描述任务,引擎自动分析意图、选择策略、执行到底。
|
|
40
|
+
- **Hook 引擎** — 每轮注入任务状态,即使上下文被压缩也不丢。会话开始时注入完整项目上下文。
|
|
41
|
+
- **Task 持久化** — 中等以上复杂度任务创建 `.ccg/tasks/`,阶段门控强制 HARD STOP 检查点。
|
|
42
|
+
- **Agent Teams** — 大型任务通过 TeamCreate 并行 spawn 多个 Builder。每个 Builder 有独立文件所有权。
|
|
43
|
+
- **质量关卡** — `verify-security`、`verify-quality`、`verify-change` 作为 Skill 在策略验证阶段强制调用。
|
|
44
|
+
- **域知识 Hook** — 消息涉及安全、缓存、RAG 等关键词时,相关知识文件自动注入上下文。
|
|
56
45
|
|
|
57
46
|
## 快速开始
|
|
58
47
|
|
|
59
|
-
### 前置条件
|
|
60
|
-
|
|
61
|
-
| 依赖 | 必需 | 说明 |
|
|
62
|
-
|------|------|------|
|
|
63
|
-
| **Node.js 20+** | 是 | `ora@9.x` 要求 Node >= 20,Node 18 会报 `SyntaxError` |
|
|
64
|
-
| **Claude Code CLI** | 是 | [安装方法](#安装-claude-code) |
|
|
65
|
-
| **jq** | 是 | 用于自动授权 Hook([安装方法](#安装-jq)) |
|
|
66
|
-
| **Codex CLI** | 否 | 启用后端路由 |
|
|
67
|
-
| **Gemini CLI** | 否 | 启用前端路由 |
|
|
68
|
-
|
|
69
|
-
### 安装
|
|
70
|
-
|
|
71
48
|
```bash
|
|
72
49
|
npx ccg-workflow
|
|
73
50
|
```
|
|
74
51
|
|
|
75
|
-
|
|
52
|
+
需要 Node.js 20+ 和 Claude Code CLI。Codex CLI 和 Gemini CLI 可选(启用多模型功能)。
|
|
76
53
|
|
|
77
|
-
|
|
54
|
+
安装器 4 步:API 配置 → 模型路由 → MCP 工具 → 性能模式。新用户有精简流程,默认值开箱即用。
|
|
78
55
|
|
|
79
|
-
|
|
80
|
-
# macOS
|
|
81
|
-
brew install jq
|
|
82
|
-
|
|
83
|
-
# Linux (Debian/Ubuntu)
|
|
84
|
-
sudo apt install jq
|
|
56
|
+
## 工作原理
|
|
85
57
|
|
|
86
|
-
# Linux (RHEL/CentOS)
|
|
87
|
-
sudo yum install jq
|
|
88
|
-
|
|
89
|
-
# Windows
|
|
90
|
-
choco install jq # 或: scoop install jq
|
|
91
58
|
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
59
|
+
你: /ccg:go 给这个 API 加 JWT 认证
|
|
60
|
+
|
|
61
|
+
CCG 引擎:
|
|
62
|
+
1. 读取项目上下文(git、技术栈、文件结构)
|
|
63
|
+
2. 分类: feature / L 复杂度 / backend / high 风险
|
|
64
|
+
3. 选择策略: full-collaborate
|
|
65
|
+
4. 创建 .ccg/tasks/add-jwt-auth/task.json
|
|
66
|
+
5. 双模型并行分析(Codex + Gemini)
|
|
67
|
+
6. 产出计划 → HARD STOP 等你审批
|
|
68
|
+
7. spawn Agent Teams Builder 并行实施
|
|
69
|
+
8. 质量关卡 + 双模型交叉审查
|
|
70
|
+
9. 输出结果
|
|
71
|
+
|
|
72
|
+
每轮 Hook 注入:
|
|
73
|
+
<ccg-state>
|
|
74
|
+
Task: add-jwt-auth (in_progress)
|
|
75
|
+
Strategy: full-collaborate
|
|
76
|
+
Phase: 4-implementation
|
|
77
|
+
Next: Layer 1 Builders 执行中
|
|
78
|
+
</ccg-state>
|
|
97
79
|
```
|
|
98
80
|
|
|
99
|
-
|
|
81
|
+
## 策略体系
|
|
100
82
|
|
|
101
|
-
|
|
83
|
+
引擎根据任务类型和复杂度自动选择策略:
|
|
102
84
|
|
|
103
|
-
|
|
85
|
+
| 策略 | 场景 | 外部模型 | Teams |
|
|
86
|
+
|------|------|---------|-------|
|
|
87
|
+
| direct-fix | 简单 bug,单文件 | 无 | 无 |
|
|
88
|
+
| quick-implement | 小功能,范围清晰 | 无 | 无 |
|
|
89
|
+
| guided-develop | 中等功能,需要规划 | 单模型 | 无 |
|
|
90
|
+
| full-collaborate | 复杂功能,跨模块 | 双模型并行 | 强制 |
|
|
91
|
+
| debug-investigate | 复杂 bug,原因不明 | 双模型诊断 | 无 |
|
|
92
|
+
| refactor-safely | 代码重构 | 双模型审查 | 无 |
|
|
93
|
+
| deep-research | 技术研究、方案对比 | 双模型探索 | 无 |
|
|
94
|
+
| optimize-measure | 性能优化 | 可选 | 无 |
|
|
95
|
+
| review-audit | 代码审查 | 双模型交叉 | 无 |
|
|
96
|
+
| git-action | commit、rollback 等 | 无 | 无 |
|
|
104
97
|
|
|
105
|
-
|
|
106
|
-
|------|------|------|
|
|
107
|
-
| `/ccg:workflow` | 6 阶段完整工作流 | Codex + Gemini |
|
|
108
|
-
| `/ccg:plan` | 多模型协作规划 (Phase 1-2) | Codex + Gemini |
|
|
109
|
-
| `/ccg:execute` | 多模型协作执行 (Phase 3-5) | Codex + Gemini + Claude |
|
|
110
|
-
| `/ccg:codex-exec` | Codex 全权执行(计划 → 代码 → 审核) | Codex + 多模型审核 |
|
|
111
|
-
| `/ccg:feat` | 智能功能开发 | 自动路由 |
|
|
112
|
-
| `/ccg:frontend` | 前端任务(快速模式) | Gemini |
|
|
113
|
-
| `/ccg:backend` | 后端任务(快速模式) | Codex |
|
|
98
|
+
简单任务零开销快速执行。复杂任务启动完整引擎。
|
|
114
99
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
| 命令 | 说明 | 模型 |
|
|
118
|
-
|------|------|------|
|
|
119
|
-
| `/ccg:analyze` | 技术分析 | Codex + Gemini |
|
|
120
|
-
| `/ccg:debug` | 问题诊断 + 修复 | Codex + Gemini |
|
|
121
|
-
| `/ccg:optimize` | 性能优化 | Codex + Gemini |
|
|
122
|
-
| `/ccg:test` | 测试生成 | 自动路由 |
|
|
123
|
-
| `/ccg:review` | 代码审查(自动 git diff) | Codex + Gemini |
|
|
124
|
-
| `/ccg:enhance` | Prompt 增强 | 内置 |
|
|
125
|
-
|
|
126
|
-
### OPSX 规范驱动
|
|
100
|
+
## 命令
|
|
127
101
|
|
|
128
|
-
|
|
129
|
-
|------|------|
|
|
130
|
-
| `/ccg:spec-init` | 初始化 OPSX 环境 |
|
|
131
|
-
| `/ccg:spec-research` | 需求 → 约束集 |
|
|
132
|
-
| `/ccg:spec-plan` | 约束 → 零决策计划 |
|
|
133
|
-
| `/ccg:spec-impl` | 按计划执行 + 归档 |
|
|
134
|
-
| `/ccg:spec-review` | 双模型交叉审查 |
|
|
102
|
+
v3.0 默认安装 13 个命令。旧版模式额外安装 18 个。
|
|
135
103
|
|
|
136
|
-
###
|
|
104
|
+
### 核心
|
|
137
105
|
|
|
138
106
|
| 命令 | 说明 |
|
|
139
107
|
|------|------|
|
|
140
|
-
| `/ccg:
|
|
141
|
-
| `/ccg:team-plan` | 约束 → 并行实施计划 |
|
|
142
|
-
| `/ccg:team-exec` | spawn Builder teammates 并行写代码 |
|
|
143
|
-
| `/ccg:team-review` | 双模型交叉审查 |
|
|
144
|
-
|
|
145
|
-
> **前置条件**:需在 `settings.json` 中启用:`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`
|
|
108
|
+
| `/ccg:go` | 智能入口 — 描述任务,引擎自动处理 |
|
|
146
109
|
|
|
147
110
|
### Git 工具
|
|
148
111
|
|
|
149
112
|
| 命令 | 说明 |
|
|
150
113
|
|------|------|
|
|
151
|
-
| `/ccg:commit` |
|
|
114
|
+
| `/ccg:commit` | 智能 conventional commit |
|
|
152
115
|
| `/ccg:rollback` | 交互式回滚 |
|
|
153
116
|
| `/ccg:clean-branches` | 清理已合并分支 |
|
|
154
117
|
| `/ccg:worktree` | Worktree 管理 |
|
|
155
118
|
|
|
156
|
-
###
|
|
119
|
+
### 项目
|
|
157
120
|
|
|
158
121
|
| 命令 | 说明 |
|
|
159
122
|
|------|------|
|
|
160
123
|
| `/ccg:init` | 初始化项目 CLAUDE.md |
|
|
161
|
-
| `/ccg:context` |
|
|
124
|
+
| `/ccg:context` | 项目上下文管理 |
|
|
162
125
|
|
|
163
|
-
|
|
126
|
+
### OpenSpec
|
|
164
127
|
|
|
165
|
-
|
|
128
|
+
| 命令 | 说明 |
|
|
129
|
+
|------|------|
|
|
130
|
+
| `/ccg:spec-init` | 初始化 OPSX 环境 |
|
|
131
|
+
| `/ccg:spec-research` | 需求 → 约束集 |
|
|
132
|
+
| `/ccg:spec-plan` | 零决策可执行计划 |
|
|
133
|
+
| `/ccg:spec-impl` | 按规范实施 |
|
|
134
|
+
| `/ccg:spec-review` | 双模型交叉审查 |
|
|
166
135
|
|
|
167
|
-
|
|
168
|
-
# 1. 生成实施计划
|
|
169
|
-
/ccg:plan 实现用户认证功能
|
|
136
|
+
## Hook 引擎
|
|
170
137
|
|
|
171
|
-
|
|
172
|
-
# 计划保存至 .claude/plan/user-auth.md
|
|
138
|
+
CCG 在 `~/.claude/settings.json` 注册 4 个 Hook:
|
|
173
139
|
|
|
174
|
-
|
|
175
|
-
|
|
140
|
+
| Hook | 事件 | 作用 |
|
|
141
|
+
|------|------|------|
|
|
142
|
+
| workflow-state.js | UserPromptSubmit | 每轮注入任务状态面包屑 |
|
|
143
|
+
| session-start.js | SessionStart | 会话开始/压缩时注入完整项目上下文 |
|
|
144
|
+
| subagent-context.js | PreToolUse | codeagent-wrapper/Team spawn 时注入 spec + 任务上下文 |
|
|
145
|
+
| skill-router.js | UserPromptSubmit | 检测域关键词,自动注入知识文件 |
|
|
176
146
|
|
|
177
|
-
|
|
178
|
-
/ccg:codex-exec .claude/plan/user-auth.md
|
|
179
|
-
```
|
|
147
|
+
纯 JavaScript,零依赖,失败时静默退出。
|
|
180
148
|
|
|
181
|
-
|
|
149
|
+
## Task 系统
|
|
182
150
|
|
|
183
|
-
|
|
151
|
+
中等以上复杂度任务创建持久化目录:
|
|
184
152
|
|
|
185
|
-
```
|
|
186
|
-
/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
153
|
+
```
|
|
154
|
+
.ccg/tasks/add-jwt-auth/
|
|
155
|
+
├── task.json # 状态、策略、当前阶段、门控
|
|
156
|
+
├── requirements.md # 增强后的需求
|
|
157
|
+
├── plan.md # 审批后的计划
|
|
158
|
+
├── context.jsonl # 子 Agent spec 注入列表
|
|
159
|
+
├── review.md # 审查结果
|
|
160
|
+
└── research/ # 研究成果
|
|
191
161
|
```
|
|
192
162
|
|
|
193
|
-
|
|
163
|
+
workflow-state Hook 每轮读取 task.json 注入状态。上下文压缩后 session-start 重新注入。状态不会丢失。
|
|
194
164
|
|
|
195
|
-
|
|
165
|
+
## Spec 系统
|
|
196
166
|
|
|
197
|
-
|
|
167
|
+
项目级编码规范在 `.ccg/spec/`:
|
|
198
168
|
|
|
199
|
-
```
|
|
200
|
-
/
|
|
201
|
-
#
|
|
202
|
-
/
|
|
203
|
-
#
|
|
204
|
-
/ccg:team-exec # 3. Builder 并行写代码
|
|
205
|
-
# /clear
|
|
206
|
-
/ccg:team-review # 4. 双模型交叉审查
|
|
169
|
+
```
|
|
170
|
+
.ccg/spec/
|
|
171
|
+
├── backend/index.md # 后端规范
|
|
172
|
+
├── frontend/index.md # 前端规范
|
|
173
|
+
└── guides/index.md # 跨模块指南
|
|
207
174
|
```
|
|
208
175
|
|
|
209
|
-
|
|
176
|
+
subagent-context Hook 读取 `context.jsonl` 将相关 spec 文件注入到 codeagent-wrapper 调用和 Team spawn 中。子 Agent 自动遵循项目规范。
|
|
210
177
|
|
|
211
178
|
## 配置
|
|
212
179
|
|
|
213
|
-
### 目录结构
|
|
214
|
-
|
|
215
180
|
```
|
|
216
181
|
~/.claude/
|
|
217
|
-
├── commands/ccg/
|
|
218
|
-
├──
|
|
219
|
-
├──
|
|
220
|
-
├──
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
└── gemini/ # 7 个 Gemini 专家提示词
|
|
182
|
+
├── commands/ccg/ # 斜杠命令
|
|
183
|
+
├── hooks/ccg/ # Hook 脚本(4 个)
|
|
184
|
+
├── .ccg/
|
|
185
|
+
│ ├── config.toml # 模型路由、MCP、性能
|
|
186
|
+
│ ├── engine/ # 策略文件 + 模型路由器
|
|
187
|
+
│ └── prompts/ # 专家提示词
|
|
188
|
+
├── skills/ccg/ # 质量关卡 + 域知识
|
|
189
|
+
└── bin/codeagent-wrapper # 多模型执行桥
|
|
226
190
|
```
|
|
227
191
|
|
|
228
192
|
### 环境变量
|
|
229
193
|
|
|
230
|
-
在 `~/.claude/settings.json` 的 `"env"`
|
|
231
|
-
|
|
232
|
-
| 变量 | 说明 | 默认值 | 何时修改 |
|
|
233
|
-
|------|------|--------|----------|
|
|
234
|
-
| `CODEAGENT_POST_MESSAGE_DELAY` | Codex 完成后等待时间(秒) | `5` | Codex 进程挂起时设为 `1` |
|
|
235
|
-
| `CODEX_TIMEOUT` | wrapper 执行超时(秒) | `7200` | 超长任务时增大 |
|
|
236
|
-
| `BASH_DEFAULT_TIMEOUT_MS` | Claude Code Bash 超时(毫秒) | `120000` | 命令超时时增大 |
|
|
237
|
-
| `BASH_MAX_TIMEOUT_MS` | Claude Code Bash 最大超时(毫秒) | `600000` | 长时间构建时增大 |
|
|
238
|
-
|
|
239
|
-
<details>
|
|
240
|
-
<summary>settings.json 示例</summary>
|
|
241
|
-
|
|
242
|
-
```json
|
|
243
|
-
{
|
|
244
|
-
"env": {
|
|
245
|
-
"CODEAGENT_POST_MESSAGE_DELAY": "1",
|
|
246
|
-
"CODEX_TIMEOUT": "7200",
|
|
247
|
-
"BASH_DEFAULT_TIMEOUT_MS": "600000",
|
|
248
|
-
"BASH_MAX_TIMEOUT_MS": "3600000"
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
</details>
|
|
254
|
-
|
|
255
|
-
### MCP 配置
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
npx ccg-workflow menu # 选择「配置 MCP」
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
**代码检索**(多选一):
|
|
262
|
-
- **ace-tool**(推荐)— 代码检索 `search_context` 可用。[官方](https://augmentcode.com/) | [第三方中转](https://acemcp.heroman.wtf/)
|
|
263
|
-
- **fast-context**(推荐)— Windsurf Fast Context,AI 驱动搜索,无需全量索引。需 Windsurf 账号
|
|
264
|
-
- **ContextWeaver**(备选)— 本地混合搜索,需要硅基流动 API Key(免费)
|
|
265
|
-
|
|
266
|
-
**辅助工具**(可选):
|
|
267
|
-
- **Context7** — 获取最新库文档(自动安装)
|
|
268
|
-
- **Playwright** — 浏览器自动化 / 测试
|
|
269
|
-
- **DeepWiki** — 知识库查询
|
|
270
|
-
- **Exa** — 搜索引擎(需 API Key)
|
|
271
|
-
|
|
272
|
-
### 自动授权 Hook
|
|
273
|
-
|
|
274
|
-
CCG 安装时自动写入 Hook,自动授权 `codeagent-wrapper` 命令(需 [jq](#安装-jq))。
|
|
275
|
-
|
|
276
|
-
<details>
|
|
277
|
-
<summary>手动配置(v1.7.71 之前的版本)</summary>
|
|
278
|
-
|
|
279
|
-
在 `~/.claude/settings.json` 中添加:
|
|
280
|
-
|
|
281
|
-
```json
|
|
282
|
-
{
|
|
283
|
-
"hooks": {
|
|
284
|
-
"PreToolUse": [
|
|
285
|
-
{
|
|
286
|
-
"matcher": "Bash",
|
|
287
|
-
"hooks": [
|
|
288
|
-
{
|
|
289
|
-
"type": "command",
|
|
290
|
-
"command": "jq -r '.tool_input.command' 2>/dev/null | grep -q 'codeagent-wrapper' && echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"codeagent-wrapper auto-approved\"}}' || true",
|
|
291
|
-
"timeout": 1
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
|
-
}
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
</details>
|
|
194
|
+
在 `~/.claude/settings.json` 的 `"env"` 中设置:
|
|
301
195
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
- **ccusage** — Claude Code 用量分析
|
|
309
|
-
- **CCometixLine** — 状态栏工具(Git + 用量跟踪)
|
|
196
|
+
| 变量 | 默认值 | 说明 |
|
|
197
|
+
|------|--------|------|
|
|
198
|
+
| `CODEX_TIMEOUT` | `7200` | Wrapper 超时(秒) |
|
|
199
|
+
| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | 未设置 | 设为 `1` 启用 Agent Teams 并行 |
|
|
310
200
|
|
|
311
201
|
## 更新 / 卸载
|
|
312
202
|
|
|
313
203
|
```bash
|
|
314
|
-
# 更新
|
|
315
|
-
npx ccg-workflow
|
|
316
|
-
npm install -g ccg-workflow@latest # npm 全局用户
|
|
317
|
-
|
|
318
|
-
# 卸载
|
|
319
|
-
npx ccg-workflow # 选择「卸载工作流」
|
|
320
|
-
npm uninstall -g ccg-workflow # npm 全局用户需额外执行
|
|
204
|
+
npx ccg-workflow@latest # 更新
|
|
205
|
+
npx ccg-workflow # 菜单中选"卸载"
|
|
321
206
|
```
|
|
322
207
|
|
|
323
|
-
##
|
|
324
|
-
|
|
325
|
-
### Codex CLI 0.80.0 进程不退出
|
|
326
|
-
|
|
327
|
-
`--json` 模式下 Codex 完成输出后进程不会自动退出。
|
|
328
|
-
|
|
329
|
-
**解决**:将 `CODEAGENT_POST_MESSAGE_DELAY` 设为 `1`,详见[环境变量](#环境变量)。
|
|
330
|
-
|
|
331
|
-
## 参与贡献
|
|
332
|
-
|
|
333
|
-
欢迎贡献!请阅读 [CONTRIBUTING.md](./CONTRIBUTING.md) 了解开发指南。
|
|
208
|
+
## 致谢
|
|
334
209
|
|
|
335
|
-
|
|
210
|
+
- [cexll/myclaude](https://github.com/cexll/myclaude) — codeagent-wrapper 灵感
|
|
211
|
+
- [UfoMiao/zcf](https://github.com/UfoMiao/zcf) — Git 工具参考
|
|
212
|
+
- [mindfold-ai/Trellis](https://github.com/mindfold-ai/Trellis) — Hook 工作流状态模式
|
|
213
|
+
- [ace-tool](https://linux.do/t/topic/1344562) — MCP 代码检索
|
|
336
214
|
|
|
337
215
|
## 贡献者
|
|
338
216
|
|
|
@@ -353,23 +231,12 @@ npm uninstall -g ccg-workflow # npm 全局用户需额外执行
|
|
|
353
231
|
</table>
|
|
354
232
|
<!-- readme: contributors -end -->
|
|
355
233
|
|
|
356
|
-
##
|
|
357
|
-
|
|
358
|
-
- [cexll/myclaude](https://github.com/cexll/myclaude) — codeagent-wrapper
|
|
359
|
-
- [UfoMiao/zcf](https://github.com/UfoMiao/zcf) — Git 工具
|
|
360
|
-
- [GudaStudio/skills](https://github.com/GuDaStudio/skills) — 路由设计
|
|
361
|
-
- [ace-tool](https://linux.do/t/topic/1344562) — MCP 工具
|
|
362
|
-
|
|
363
|
-
## Star History
|
|
364
|
-
|
|
365
|
-
[](https://www.star-history.com/#fengshao1227/ccg-workflow&type=timeline&legend=top-left)
|
|
366
|
-
|
|
367
|
-
## 联系方式
|
|
234
|
+
## 联系
|
|
368
235
|
|
|
369
|
-
- **X (Twitter)**: [@CCG_Workflow](https://x.com/CCG_Workflow)
|
|
370
|
-
-
|
|
371
|
-
- **Issues**: [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues)
|
|
372
|
-
-
|
|
236
|
+
- **X (Twitter)**: [@CCG_Workflow](https://x.com/CCG_Workflow)
|
|
237
|
+
- **Email**: [fengshao1227@gmail.com](mailto:fengshao1227@gmail.com)
|
|
238
|
+
- **Issues**: [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues)
|
|
239
|
+
- **社区**: [Linux.do](https://linux.do)
|
|
373
240
|
|
|
374
241
|
## License
|
|
375
242
|
|
|
@@ -377,4 +244,4 @@ MIT
|
|
|
377
244
|
|
|
378
245
|
---
|
|
379
246
|
|
|
380
|
-
|
|
247
|
+
v3.0.0 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues) | [Contributing](./CONTRIBUTING.md)
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.
|
|
4
|
+
import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.2vO_S-e7.mjs';
|
|
5
5
|
import 'inquirer';
|
|
6
6
|
import 'ora';
|
|
7
7
|
import 'node:child_process';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.
|
|
1
|
+
export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.2vO_S-e7.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'ora';
|