ccg-workflow 2.1.16 → 3.0.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 +120 -270
- package/README.zh-CN.md +119 -269
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.CewMlBCj.mjs → ccg-workflow.81OoN8XX.mjs} +160 -34
- package/package.json +6 -30
- package/templates/commands/go.md +199 -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 +156 -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 +291 -0
- package/templates/engine/strategies/git-action.md +43 -0
- package/templates/engine/strategies/guided-develop.md +208 -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 +157 -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 +113 -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,199 @@
|
|
|
1
1
|
# CCG - Claude + Codex + Gemini 多模型协作
|
|
2
2
|
|
|
3
|
-
<div align="center">
|
|
4
|
-
|
|
5
|
-
<img src="assets/logo/ccg-logo-cropped.png" alt="CCG Workflow" width="400">
|
|
6
|
-
|
|
7
3
|
[](https://www.npmjs.com/package/ccg-workflow)
|
|
8
4
|
[](https://opensource.org/licenses/MIT)
|
|
9
|
-
[](https://claude.ai/code)
|
|
10
|
-
[]()
|
|
11
|
-
[](https://x.com/CCG_Workflow)
|
|
12
5
|
|
|
13
6
|
简体中文 | [English](./README.md)
|
|
14
7
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## ♥️ 赞助商
|
|
8
|
+
## 赞助商
|
|
18
9
|
|
|
19
|
-
[
|
|
10
|
+
[302.AI](https://share.302.ai/oUDqQ6) — 按用量付费的企业级 AI 资源平台。
|
|
20
11
|
|
|
21
|
-
[
|
|
12
|
+
[n1n.ai](https://api.n1n.ai/register?channel=c_ivgzug0w) — 一个 API Key 连接 500+ AI 模型。
|
|
22
13
|
|
|
23
14
|
---
|
|
24
15
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
Claude Code 编排 Codex + Gemini 的多模型协作开发系统。前端任务路由至 Gemini,后端任务路由至 Codex,Claude 负责编排决策和代码审核。
|
|
30
|
-
|
|
31
|
-
## 为什么选择 CCG?
|
|
32
|
-
|
|
33
|
-
- **零配置模型路由** — 前端任务自动走 Gemini,后端任务自动走 Codex,无需手动切换。
|
|
34
|
-
- **安全设计** — 外部模型无写入权限,仅返回 Patch,由 Claude 审核后应用。
|
|
35
|
-
- **29+ 个斜杠命令** — 从规划到执行、Git 工作流到代码审查,通过 `/ccg:*` 一站式访问。
|
|
36
|
-
- **规范驱动开发** — 集成 [OPSX](https://github.com/fission-ai/opsx),将模糊需求变成可验证约束,让 AI 没法自由发挥。
|
|
37
|
-
|
|
38
|
-
## 架构
|
|
16
|
+
CCG 是 Claude Code 的工作流引擎。它编排多个 AI 模型(Codex、Gemini、Claude),通过 Hook 状态追踪、自动策略选择和 Agent Teams 并行执行来完成开发任务。
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
Claude Code (编排)
|
|
42
|
-
│
|
|
43
|
-
┌───┴───┐
|
|
44
|
-
↓ ↓
|
|
45
|
-
Codex Gemini
|
|
46
|
-
(后端) (前端)
|
|
47
|
-
│ │
|
|
48
|
-
└───┬───┘
|
|
49
|
-
↓
|
|
50
|
-
Unified Patch
|
|
51
|
-
```
|
|
18
|
+
## v3.0 重大更新
|
|
52
19
|
|
|
53
|
-
|
|
20
|
+
v3.0 从底层重写。一个命令替代 29 个。
|
|
54
21
|
|
|
55
|
-
|
|
22
|
+
- `/ccg:go` — 用自然语言描述任务,引擎自动分析意图、选择策略、执行到底。
|
|
23
|
+
- **Hook 引擎** — 每轮注入任务状态,即使上下文被压缩也不丢。会话开始时注入完整项目上下文。
|
|
24
|
+
- **Task 持久化** — 中等以上复杂度任务创建 `.ccg/tasks/`,阶段门控强制 HARD STOP 检查点。
|
|
25
|
+
- **Agent Teams** — 大型任务通过 TeamCreate 并行 spawn 多个 Builder。每个 Builder 有独立文件所有权。
|
|
26
|
+
- **质量关卡** — `verify-security`、`verify-quality`、`verify-change` 作为 Skill 在策略验证阶段强制调用。
|
|
27
|
+
- **域知识 Hook** — 消息涉及安全、缓存、RAG 等关键词时,相关知识文件自动注入上下文。
|
|
56
28
|
|
|
57
29
|
## 快速开始
|
|
58
30
|
|
|
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
31
|
```bash
|
|
72
32
|
npx ccg-workflow
|
|
73
33
|
```
|
|
74
34
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### 安装 jq
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# macOS
|
|
81
|
-
brew install jq
|
|
35
|
+
需要 Node.js 20+ 和 Claude Code CLI。Codex CLI 和 Gemini CLI 可选(启用多模型功能)。
|
|
82
36
|
|
|
83
|
-
|
|
84
|
-
sudo apt install jq
|
|
37
|
+
安装器 4 步:API 配置 → 模型路由 → MCP 工具 → 性能模式。新用户有精简流程,默认值开箱即用。
|
|
85
38
|
|
|
86
|
-
|
|
87
|
-
sudo yum install jq
|
|
39
|
+
## 工作原理
|
|
88
40
|
|
|
89
|
-
# Windows
|
|
90
|
-
choco install jq # 或: scoop install jq
|
|
91
41
|
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
42
|
+
你: /ccg:go 给这个 API 加 JWT 认证
|
|
43
|
+
|
|
44
|
+
CCG 引擎:
|
|
45
|
+
1. 读取项目上下文(git、技术栈、文件结构)
|
|
46
|
+
2. 分类: feature / L 复杂度 / backend / high 风险
|
|
47
|
+
3. 选择策略: full-collaborate
|
|
48
|
+
4. 创建 .ccg/tasks/add-jwt-auth/task.json
|
|
49
|
+
5. 双模型并行分析(Codex + Gemini)
|
|
50
|
+
6. 产出计划 → HARD STOP 等你审批
|
|
51
|
+
7. spawn Agent Teams Builder 并行实施
|
|
52
|
+
8. 质量关卡 + 双模型交叉审查
|
|
53
|
+
9. 输出结果
|
|
54
|
+
|
|
55
|
+
每轮 Hook 注入:
|
|
56
|
+
<ccg-state>
|
|
57
|
+
Task: add-jwt-auth (in_progress)
|
|
58
|
+
Strategy: full-collaborate
|
|
59
|
+
Phase: 4-implementation
|
|
60
|
+
Next: Layer 1 Builders 执行中
|
|
61
|
+
</ccg-state>
|
|
97
62
|
```
|
|
98
63
|
|
|
99
|
-
|
|
64
|
+
## 策略体系
|
|
100
65
|
|
|
101
|
-
|
|
66
|
+
引擎根据任务类型和复杂度自动选择策略:
|
|
102
67
|
|
|
103
|
-
|
|
68
|
+
| 策略 | 场景 | 外部模型 | Teams |
|
|
69
|
+
|------|------|---------|-------|
|
|
70
|
+
| direct-fix | 简单 bug,单文件 | 无 | 无 |
|
|
71
|
+
| quick-implement | 小功能,范围清晰 | 无 | 无 |
|
|
72
|
+
| guided-develop | 中等功能,需要规划 | 单模型 | 无 |
|
|
73
|
+
| full-collaborate | 复杂功能,跨模块 | 双模型并行 | 强制 |
|
|
74
|
+
| debug-investigate | 复杂 bug,原因不明 | 双模型诊断 | 无 |
|
|
75
|
+
| refactor-safely | 代码重构 | 双模型审查 | 无 |
|
|
76
|
+
| deep-research | 技术研究、方案对比 | 双模型探索 | 无 |
|
|
77
|
+
| optimize-measure | 性能优化 | 可选 | 无 |
|
|
78
|
+
| review-audit | 代码审查 | 双模型交叉 | 无 |
|
|
79
|
+
| git-action | commit、rollback 等 | 无 | 无 |
|
|
104
80
|
|
|
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 |
|
|
81
|
+
简单任务零开销快速执行。复杂任务启动完整引擎。
|
|
114
82
|
|
|
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 规范驱动
|
|
83
|
+
## 命令
|
|
127
84
|
|
|
128
|
-
|
|
129
|
-
|------|------|
|
|
130
|
-
| `/ccg:spec-init` | 初始化 OPSX 环境 |
|
|
131
|
-
| `/ccg:spec-research` | 需求 → 约束集 |
|
|
132
|
-
| `/ccg:spec-plan` | 约束 → 零决策计划 |
|
|
133
|
-
| `/ccg:spec-impl` | 按计划执行 + 归档 |
|
|
134
|
-
| `/ccg:spec-review` | 双模型交叉审查 |
|
|
85
|
+
v3.0 默认安装 13 个命令。旧版模式额外安装 18 个。
|
|
135
86
|
|
|
136
|
-
###
|
|
87
|
+
### 核心
|
|
137
88
|
|
|
138
89
|
| 命令 | 说明 |
|
|
139
90
|
|------|------|
|
|
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`
|
|
91
|
+
| `/ccg:go` | 智能入口 — 描述任务,引擎自动处理 |
|
|
146
92
|
|
|
147
93
|
### Git 工具
|
|
148
94
|
|
|
149
95
|
| 命令 | 说明 |
|
|
150
96
|
|------|------|
|
|
151
|
-
| `/ccg:commit` |
|
|
97
|
+
| `/ccg:commit` | 智能 conventional commit |
|
|
152
98
|
| `/ccg:rollback` | 交互式回滚 |
|
|
153
99
|
| `/ccg:clean-branches` | 清理已合并分支 |
|
|
154
100
|
| `/ccg:worktree` | Worktree 管理 |
|
|
155
101
|
|
|
156
|
-
###
|
|
102
|
+
### 项目
|
|
157
103
|
|
|
158
104
|
| 命令 | 说明 |
|
|
159
105
|
|------|------|
|
|
160
106
|
| `/ccg:init` | 初始化项目 CLAUDE.md |
|
|
161
|
-
| `/ccg:context` |
|
|
107
|
+
| `/ccg:context` | 项目上下文管理 |
|
|
162
108
|
|
|
163
|
-
|
|
109
|
+
### OpenSpec
|
|
164
110
|
|
|
165
|
-
|
|
111
|
+
| 命令 | 说明 |
|
|
112
|
+
|------|------|
|
|
113
|
+
| `/ccg:spec-init` | 初始化 OPSX 环境 |
|
|
114
|
+
| `/ccg:spec-research` | 需求 → 约束集 |
|
|
115
|
+
| `/ccg:spec-plan` | 零决策可执行计划 |
|
|
116
|
+
| `/ccg:spec-impl` | 按规范实施 |
|
|
117
|
+
| `/ccg:spec-review` | 双模型交叉审查 |
|
|
166
118
|
|
|
167
|
-
|
|
168
|
-
# 1. 生成实施计划
|
|
169
|
-
/ccg:plan 实现用户认证功能
|
|
119
|
+
## Hook 引擎
|
|
170
120
|
|
|
171
|
-
|
|
172
|
-
# 计划保存至 .claude/plan/user-auth.md
|
|
121
|
+
CCG 在 `~/.claude/settings.json` 注册 4 个 Hook:
|
|
173
122
|
|
|
174
|
-
|
|
175
|
-
|
|
123
|
+
| Hook | 事件 | 作用 |
|
|
124
|
+
|------|------|------|
|
|
125
|
+
| workflow-state.js | UserPromptSubmit | 每轮注入任务状态面包屑 |
|
|
126
|
+
| session-start.js | SessionStart | 会话开始/压缩时注入完整项目上下文 |
|
|
127
|
+
| subagent-context.js | PreToolUse | codeagent-wrapper/Team spawn 时注入 spec + 任务上下文 |
|
|
128
|
+
| skill-router.js | UserPromptSubmit | 检测域关键词,自动注入知识文件 |
|
|
176
129
|
|
|
177
|
-
|
|
178
|
-
/ccg:codex-exec .claude/plan/user-auth.md
|
|
179
|
-
```
|
|
130
|
+
纯 JavaScript,零依赖,失败时静默退出。
|
|
180
131
|
|
|
181
|
-
|
|
132
|
+
## Task 系统
|
|
182
133
|
|
|
183
|
-
|
|
134
|
+
中等以上复杂度任务创建持久化目录:
|
|
184
135
|
|
|
185
|
-
```
|
|
186
|
-
/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
136
|
+
```
|
|
137
|
+
.ccg/tasks/add-jwt-auth/
|
|
138
|
+
├── task.json # 状态、策略、当前阶段、门控
|
|
139
|
+
├── requirements.md # 增强后的需求
|
|
140
|
+
├── plan.md # 审批后的计划
|
|
141
|
+
├── context.jsonl # 子 Agent spec 注入列表
|
|
142
|
+
├── review.md # 审查结果
|
|
143
|
+
└── research/ # 研究成果
|
|
191
144
|
```
|
|
192
145
|
|
|
193
|
-
|
|
146
|
+
workflow-state Hook 每轮读取 task.json 注入状态。上下文压缩后 session-start 重新注入。状态不会丢失。
|
|
194
147
|
|
|
195
|
-
|
|
148
|
+
## Spec 系统
|
|
196
149
|
|
|
197
|
-
|
|
150
|
+
项目级编码规范在 `.ccg/spec/`:
|
|
198
151
|
|
|
199
|
-
```
|
|
200
|
-
/
|
|
201
|
-
#
|
|
202
|
-
/
|
|
203
|
-
#
|
|
204
|
-
/ccg:team-exec # 3. Builder 并行写代码
|
|
205
|
-
# /clear
|
|
206
|
-
/ccg:team-review # 4. 双模型交叉审查
|
|
152
|
+
```
|
|
153
|
+
.ccg/spec/
|
|
154
|
+
├── backend/index.md # 后端规范
|
|
155
|
+
├── frontend/index.md # 前端规范
|
|
156
|
+
└── guides/index.md # 跨模块指南
|
|
207
157
|
```
|
|
208
158
|
|
|
209
|
-
|
|
159
|
+
subagent-context Hook 读取 `context.jsonl` 将相关 spec 文件注入到 codeagent-wrapper 调用和 Team spawn 中。子 Agent 自动遵循项目规范。
|
|
210
160
|
|
|
211
161
|
## 配置
|
|
212
162
|
|
|
213
|
-
### 目录结构
|
|
214
|
-
|
|
215
163
|
```
|
|
216
164
|
~/.claude/
|
|
217
|
-
├── commands/ccg/
|
|
218
|
-
├──
|
|
219
|
-
├──
|
|
220
|
-
├──
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
└── gemini/ # 7 个 Gemini 专家提示词
|
|
165
|
+
├── commands/ccg/ # 斜杠命令
|
|
166
|
+
├── hooks/ccg/ # Hook 脚本(4 个)
|
|
167
|
+
├── .ccg/
|
|
168
|
+
│ ├── config.toml # 模型路由、MCP、性能
|
|
169
|
+
│ ├── engine/ # 策略文件 + 模型路由器
|
|
170
|
+
│ └── prompts/ # 专家提示词
|
|
171
|
+
├── skills/ccg/ # 质量关卡 + 域知识
|
|
172
|
+
└── bin/codeagent-wrapper # 多模型执行桥
|
|
226
173
|
```
|
|
227
174
|
|
|
228
175
|
### 环境变量
|
|
229
176
|
|
|
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
|
-
```
|
|
177
|
+
在 `~/.claude/settings.json` 的 `"env"` 中设置:
|
|
299
178
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
npx ccg-workflow menu # 选择「实用工具」
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
- **ccusage** — Claude Code 用量分析
|
|
309
|
-
- **CCometixLine** — 状态栏工具(Git + 用量跟踪)
|
|
179
|
+
| 变量 | 默认值 | 说明 |
|
|
180
|
+
|------|--------|------|
|
|
181
|
+
| `CODEX_TIMEOUT` | `7200` | Wrapper 超时(秒) |
|
|
182
|
+
| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | 未设置 | 设为 `1` 启用 Agent Teams 并行 |
|
|
310
183
|
|
|
311
184
|
## 更新 / 卸载
|
|
312
185
|
|
|
313
186
|
```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 全局用户需额外执行
|
|
187
|
+
npx ccg-workflow@latest # 更新
|
|
188
|
+
npx ccg-workflow # 菜单中选"卸载"
|
|
321
189
|
```
|
|
322
190
|
|
|
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) 了解开发指南。
|
|
191
|
+
## 致谢
|
|
334
192
|
|
|
335
|
-
|
|
193
|
+
- [cexll/myclaude](https://github.com/cexll/myclaude) — codeagent-wrapper 灵感
|
|
194
|
+
- [UfoMiao/zcf](https://github.com/UfoMiao/zcf) — Git 工具参考
|
|
195
|
+
- [mindfold-ai/Trellis](https://github.com/mindfold-ai/Trellis) — Hook 工作流状态模式
|
|
196
|
+
- [ace-tool](https://linux.do/t/topic/1344562) — MCP 代码检索
|
|
336
197
|
|
|
337
198
|
## 贡献者
|
|
338
199
|
|
|
@@ -353,23 +214,12 @@ npm uninstall -g ccg-workflow # npm 全局用户需额外执行
|
|
|
353
214
|
</table>
|
|
354
215
|
<!-- readme: contributors -end -->
|
|
355
216
|
|
|
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
|
-
## 联系方式
|
|
217
|
+
## 联系
|
|
368
218
|
|
|
369
|
-
- **X (Twitter)**: [@CCG_Workflow](https://x.com/CCG_Workflow)
|
|
370
|
-
-
|
|
371
|
-
- **Issues**: [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues)
|
|
372
|
-
-
|
|
219
|
+
- **X (Twitter)**: [@CCG_Workflow](https://x.com/CCG_Workflow)
|
|
220
|
+
- **Email**: [fengshao1227@gmail.com](mailto:fengshao1227@gmail.com)
|
|
221
|
+
- **Issues**: [GitHub Issues](https://github.com/fengshao1227/ccg-workflow/issues)
|
|
222
|
+
- **社区**: [Linux.do](https://linux.do)
|
|
373
223
|
|
|
374
224
|
## License
|
|
375
225
|
|
|
@@ -377,4 +227,4 @@ MIT
|
|
|
377
227
|
|
|
378
228
|
---
|
|
379
229
|
|
|
380
|
-
|
|
230
|
+
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.81OoN8XX.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.81OoN8XX.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'ora';
|