ccg-workflow 1.7.68 → 1.7.70

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 CHANGED
@@ -6,137 +6,141 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Claude Code](https://img.shields.io/badge/Claude%20Code-Compatible-green.svg)](https://claude.ai/code)
8
8
 
9
+ [简体中文](./README.zh-CN.md) | English
10
+
9
11
  </div>
10
12
 
11
- Claude Code 编排 Codex + Gemini 的多模型协作开发系统。前端任务路由至 Gemini,后端任务路由至 CodexClaude 负责编排决策和代码审核。
13
+ A multi-model collaboration development system where Claude Code orchestrates Codex + Gemini. Frontend tasks route to Gemini, backend tasks route to Codex, and Claude handles orchestration and code review.
12
14
 
13
- ## 安装
15
+ ## Installation
14
16
 
15
17
  ```bash
16
18
  npx ccg-workflow
17
19
  ```
18
20
 
19
- **要求**:Claude Code CLINode.js 20+
20
-
21
- > **重要**:本项目依赖 `ora@9.x` `string-width@8.x`,这些包要求 Node.js >= 20。使用 Node.js 18 会导致 `SyntaxError: Invalid regular expression flags` 错误。请确保升级到 Node.js 20 或更高版本。
22
-
23
- **可选**:Codex CLI(后端)、Gemini CLI(前端)
24
-
25
- ## 命令
26
-
27
- | 命令 | 说明 |
28
- |------|------|
29
- | `/ccg:workflow` | 6 阶段完整工作流 |
30
- | `/ccg:plan` | 多模型协作规划 (Phase 1-2) |
31
- | `/ccg:execute` | 多模型协作执行 (Phase 3-5) |
32
- | `/ccg:feat` | 新功能开发 |
33
- | `/ccg:frontend` | 前端任务 (Gemini) |
34
- | `/ccg:backend` | 后端任务 (Codex) |
35
- | `/ccg:analyze` | 技术分析 |
36
- | `/ccg:debug` | 问题诊断 |
37
- | `/ccg:optimize` | 性能优化 |
38
- | `/ccg:test` | 测试生成 |
39
- | `/ccg:review` | 代码审查 |
40
- | `/ccg:commit` | Git 提交 |
41
- | `/ccg:rollback` | Git 回滚 |
42
- | `/ccg:clean-branches` | 清理分支 |
43
- | `/ccg:worktree` | Worktree 管理 |
44
- | `/ccg:init` | 初始化 CLAUDE.md |
45
- | `/ccg:enhance` | Prompt 增强 |
46
- | `/ccg:spec-init` | 初始化 OPSX 环境 |
47
- | `/ccg:spec-research` | 需求 约束集 |
48
- | `/ccg:spec-plan` | 约束 零决策计划 |
49
- | `/ccg:spec-impl` | 按计划执行 + 归档 |
50
- | `/ccg:spec-review` | 双模型交叉审查 |
51
- | `/ccg:team-research` | Agent Teams 需求 约束集 |
52
- | `/ccg:team-plan` | Agent Teams 约束 并行计划 |
53
- | `/ccg:team-exec` | Agent Teams 并行实施 |
54
- | `/ccg:team-review` | Agent Teams 双模型审查 |
55
-
56
- ### OPSX 规范驱动(v1.7.52+)
57
-
58
- 集成 [OPSX 架构](https://github.com/fission-ai/opsx),把需求变成约束,让 AI 没法自由发挥:
21
+ **Requirements**: Claude Code CLI, Node.js 20+
22
+
23
+ > **Important**: This project depends on `ora@9.x` and `string-width@8.x`, which require Node.js >= 20. Using Node.js 18 will cause `SyntaxError: Invalid regular expression flags`. Please upgrade to Node.js 20 or higher.
24
+
25
+ **Optional**: Codex CLI (backend), Gemini CLI (frontend)
26
+
27
+ ## First-Time Setup
28
+
29
+ On first run, CCG will prompt you to select your preferred language (English or Chinese). This preference is saved and used for all subsequent sessions.
30
+
31
+ ## Commands
32
+
33
+ | Command | Description |
34
+ |---------|-------------|
35
+ | `/ccg:workflow` | Full 6-phase development workflow |
36
+ | `/ccg:plan` | Multi-model collaborative planning (Phase 1-2) |
37
+ | `/ccg:execute` | Multi-model collaborative execution (Phase 3-5) |
38
+ | `/ccg:feat` | Smart feature development |
39
+ | `/ccg:frontend` | Frontend tasks (Gemini) |
40
+ | `/ccg:backend` | Backend tasks (Codex) |
41
+ | `/ccg:analyze` | Technical analysis |
42
+ | `/ccg:debug` | Problem diagnosis |
43
+ | `/ccg:optimize` | Performance optimization |
44
+ | `/ccg:test` | Test generation |
45
+ | `/ccg:review` | Code review |
46
+ | `/ccg:commit` | Git commit |
47
+ | `/ccg:rollback` | Git rollback |
48
+ | `/ccg:clean-branches` | Clean branches |
49
+ | `/ccg:worktree` | Worktree management |
50
+ | `/ccg:init` | Initialize CLAUDE.md |
51
+ | `/ccg:enhance` | Prompt enhancement |
52
+ | `/ccg:spec-init` | Initialize OPSX environment |
53
+ | `/ccg:spec-research` | RequirementsConstraints |
54
+ | `/ccg:spec-plan` | Constraints Zero-decision plan |
55
+ | `/ccg:spec-impl` | Execute plan + archive |
56
+ | `/ccg:spec-review` | Dual-model cross-review |
57
+ | `/ccg:team-research` | Agent Teams requirements → constraints |
58
+ | `/ccg:team-plan` | Agent Teams constraints → parallel plan |
59
+ | `/ccg:team-exec` | Agent Teams parallel execution |
60
+ | `/ccg:team-review` | Agent Teams dual-model review |
61
+
62
+ ### OPSX Spec-Driven (v1.7.52+)
63
+
64
+ Integrates [OPSX architecture](https://github.com/fission-ai/opsx) to turn requirements into constraints, eliminating AI improvisation:
59
65
 
60
66
  ```bash
61
- # 初始化 OPSX 环境
67
+ # Initialize OPSX environment
62
68
  /ccg:spec-init
63
69
 
64
- # 研究需求输出约束集
65
- /ccg:spec-research 实现用户认证
70
+ # Research requirements output constraints
71
+ /ccg:spec-research implement user authentication
66
72
 
67
- # 并行分析零决策计划
73
+ # Parallel analysis zero-decision plan
68
74
  /ccg:spec-plan
69
75
 
70
- # 按计划执行
76
+ # Execute the plan
71
77
  /ccg:spec-impl
72
78
 
73
- # 独立审查(随时可用)
79
+ # Independent review (available anytime)
74
80
  /ccg:spec-review
75
81
  ```
76
82
 
77
- **说明**:`/ccg:spec-*` 命令是 CCG OPSX 的封装,内部调用 `/opsx:*` 命令。每阶段之间可 `/clear`,状态存在 `openspec/` 目录,不怕上下文爆。
83
+ **Note**: `/ccg:spec-*` commands are CCG's wrapper around OPSX, internally calling `/opsx:*` commands. You can `/clear` between phases — state is persisted in the `openspec/` directory, so context overflow is not a concern.
78
84
 
79
- ### Agent Teams 并行实施(v1.7.60+)
85
+ ### Agent Teams Parallel Execution (v1.7.60+)
80
86
 
81
- 利用 Claude Code Agent Teams 实验特性,spawn 多个 Builder teammates 并行写代码:
87
+ Leverage Claude Code Agent Teams experimental feature to spawn multiple Builder teammates for parallel coding:
82
88
 
83
89
  ```bash
84
- # 1. 需求研究约束集(复杂项目推荐,简单项目可跳过)
85
- /ccg:team-research 实现实时协作看板 API
90
+ # 1. Requirements research constraints (recommended for complex projects)
91
+ /ccg:team-research implement real-time collaboration kanban API
86
92
 
87
- # 2. /clear 后规划零决策并行计划
93
+ # 2. /clear then plan zero-decision parallel plan
88
94
  /ccg:team-plan kanban-api
89
95
 
90
- # 3. /clear 后并行实施 → Builder teammates 并行写代码
96
+ # 3. /clear then parallel execution → Builder teammates write code in parallel
91
97
  /ccg:team-exec
92
98
 
93
- # 4. /clear 后审查双模型交叉审查
99
+ # 4. /clear then review dual-model cross-review
94
100
  /ccg:team-review
95
101
  ```
96
102
 
97
- **前置条件**:需手动启用 Agent Teams(`settings.json` 中设置 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
98
-
99
- **vs 传统工作流**:Team 系列每步 `/clear` 隔离上下文,通过文件传递状态。Builder 并行实施,适合可拆分为 3+ 独立模块的任务。
103
+ **Prerequisite**: Manually enable Agent Teams (`settings.json`: set `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
100
104
 
101
- ### 规划与执行分离
105
+ **vs Traditional Workflow**: Team series uses `/clear` between steps to isolate context, passing state through files. Builders work in parallel, ideal for tasks decomposable into 3+ independent modules.
102
106
 
103
- v1.7.39 新增 `/ccg:plan` `/ccg:execute` 命令,将规划与执行解耦:
107
+ ### Planning & Execution Separation
104
108
 
105
109
  ```bash
106
- # 1. 生成实施计划
107
- /ccg:plan 实现用户认证功能
110
+ # 1. Generate implementation plan
111
+ /ccg:plan implement user authentication
108
112
 
109
- # 2. 审查计划(可修改)
110
- # 计划保存至 .claude/plan/user-auth.md
113
+ # 2. Review the plan (editable)
114
+ # Plan saved to .claude/plan/user-auth.md
111
115
 
112
- # 3. 执行计划(新会话也可执行)
116
+ # 3. Execute the plan (works in new sessions too)
113
117
  /ccg:execute .claude/plan/user-auth.md
114
118
  ```
115
119
 
116
- ## 配置
120
+ ## Configuration
117
121
 
118
- ### 目录结构
122
+ ### Directory Structure
119
123
 
120
124
  ```
121
125
  ~/.claude/
122
- ├── commands/ccg/ # 斜杠命令
123
- ├── agents/ccg/ # 子智能体
126
+ ├── commands/ccg/ # Slash commands
127
+ ├── agents/ccg/ # Sub-agents
124
128
  ├── bin/codeagent-wrapper
125
129
  └── .ccg/
126
130
  ├── config.toml
127
131
  └── prompts/{codex,gemini}/
128
132
  ```
129
133
 
130
- ### 环境变量
134
+ ### Environment Variables
131
135
 
132
- | 变量 | 说明 | 默认值 |
133
- |------|------|--------|
134
- | `CODEAGENT_POST_MESSAGE_DELAY` | Codex 完成后等待时间(秒) | 5 |
135
- | `CODEX_TIMEOUT` | codeagent-wrapper 执行超时(秒) | 7200 |
136
- | `BASH_DEFAULT_TIMEOUT_MS` | Claude Code Bash 默认超时(毫秒) | 120000 |
137
- | `BASH_MAX_TIMEOUT_MS` | Claude Code Bash 最大超时(毫秒) | 600000 |
136
+ | Variable | Description | Default |
137
+ |----------|-------------|---------|
138
+ | `CODEAGENT_POST_MESSAGE_DELAY` | Wait time after Codex completion (seconds) | 5 |
139
+ | `CODEX_TIMEOUT` | codeagent-wrapper execution timeout (seconds) | 7200 |
140
+ | `BASH_DEFAULT_TIMEOUT_MS` | Claude Code Bash default timeout (ms) | 120000 |
141
+ | `BASH_MAX_TIMEOUT_MS` | Claude Code Bash max timeout (ms) | 600000 |
138
142
 
139
- 配置方式(`~/.claude/settings.json`):
143
+ Configuration in `~/.claude/settings.json`:
140
144
 
141
145
  ```json
142
146
  {
@@ -149,83 +153,130 @@ v1.7.39 新增 `/ccg:plan` 和 `/ccg:execute` 命令,将规划与执行解耦
149
153
  }
150
154
  ```
151
155
 
152
- ### MCP 配置
156
+ ### codeagent-wrapper Auto-Authorization
157
+
158
+ CCG automatically installs a Hook in `settings.json` to auto-authorize codeagent-wrapper commands, so you don't have to manually approve each collaboration call.
159
+
160
+ **Requirement**: `jq` must be installed on your system.
161
+
162
+ ```bash
163
+ # macOS
164
+ brew install jq
165
+
166
+ # Linux (Debian/Ubuntu)
167
+ sudo apt install jq
168
+
169
+ # Linux (RHEL/CentOS)
170
+ sudo yum install jq
171
+
172
+ # Windows
173
+ choco install jq
174
+ # or
175
+ scoop install jq
176
+ ```
177
+
178
+ ### MCP Configuration
153
179
 
154
- 代码检索 MCP(二选一):
155
- - **ContextWeaver**(推荐)- 本地混合搜索,需要硅基流动 API Key(免费)
156
- - **ace-tool**(收费)- Augment 官方,Token 获取:https://augmentcode.com/
180
+ Code retrieval MCP (choose one):
181
+ - **ace-tool** (recommended) - Code search via `search_context` (note: `enhance_prompt` is no longer available). [Official](https://augmentcode.com/) | [Third-party proxy (recommended)](https://acemcp.heroman.wtf/)
182
+ - **ContextWeaver** (alternative) - Local hybrid search, requires SiliconFlow API Key (free)
157
183
 
158
- 辅助工具 MCP(可选):
159
- - **Context7** - 获取最新库文档
160
- - **Playwright** - 浏览器自动化/测试
161
- - **DeepWiki** - 知识库查询
162
- - **Exa** - 搜索引擎(需 API Key
184
+ Optional MCP tools:
185
+ - **Context7** - Latest library documentation
186
+ - **Playwright** - Browser automation/testing
187
+ - **DeepWiki** - Knowledge base queries
188
+ - **Exa** - Search engine (requires API Key)
163
189
 
164
190
  ```bash
165
- # 配置 MCP
166
- npx ccg-workflow menu # 选择「配置 MCP
191
+ # Configure MCP
192
+ npx ccg-workflow menu # Select "Configure MCP"
167
193
  ```
168
194
 
169
- ## 实用工具
195
+ ## Tools
170
196
 
171
197
  ```bash
172
- npx ccg-workflow menu # 选择「实用工具」
198
+ npx ccg-workflow menu # Select "Tools"
173
199
  ```
174
200
 
175
- - **ccusage** - Claude Code 用量分析
176
- - **CCometixLine** - 状态栏工具(Git + 用量跟踪)
201
+ - **ccusage** - Claude Code usage analytics
202
+ - **CCometixLine** - Status bar tool (Git + usage tracking)
177
203
 
178
- ## 安装 Claude Code
204
+ ## Install Claude Code
179
205
 
180
206
  ```bash
181
- npx ccg-workflow menu # 选择「安装 Claude Code
207
+ npx ccg-workflow menu # Select "Install Claude Code"
182
208
  ```
183
209
 
184
- 支持多种安装方式:npmhomebrewcurlpowershellcmd
210
+ Supports multiple installation methods: npm, homebrew, curl, powershell, cmd
185
211
 
186
- ## 更新 / 卸载
212
+ ## Update / Uninstall
187
213
 
188
214
  ```bash
189
- # 更新
190
- npx ccg-workflow@latest # npx 用户
191
- npm install -g ccg-workflow@latest # npm 全局用户
215
+ # Update
216
+ npx ccg-workflow@latest # npx users
217
+ npm install -g ccg-workflow@latest # npm global users
218
+
219
+ # Uninstall
220
+ npx ccg-workflow # Select "Uninstall"
221
+ npm uninstall -g ccg-workflow # npm global users need this extra step
222
+ ```
223
+
224
+ ## FAQ
225
+
226
+ ### 1. How to auto-authorize codeagent-wrapper without manual approval?
192
227
 
193
- # 卸载
194
- npx ccg-workflow # 选择 "卸载工作流"
195
- npm uninstall -g ccg-workflow # npm 全局用户需额外执行
228
+ CCG automatically installs the Hook during setup (v1.7.70+). If you installed an older version, add this to `~/.claude/settings.json`:
229
+
230
+ ```json
231
+ {
232
+ "hooks": {
233
+ "PreToolUse": [
234
+ {
235
+ "matcher": "Bash",
236
+ "hooks": [
237
+ {
238
+ "type": "command",
239
+ "command": "jq -r '.tool_input.command' | grep -q 'codeagent-wrapper' && echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"codeagent-wrapper auto-approved\"}}' || exit 1",
240
+ "timeout": 1
241
+ }
242
+ ]
243
+ }
244
+ ]
245
+ }
246
+ }
196
247
  ```
197
248
 
198
- ## 已知问题
249
+ > **Note**: Requires `jq` installed on your system. See [codeagent-wrapper Auto-Authorization](#codeagent-wrapper-auto-authorization) for install instructions.
199
250
 
200
- **Codex CLI 0.80.0 进程不退出**
251
+ ### 2. Codex CLI 0.80.0 process does not exit
201
252
 
202
- `--json` 模式下 Codex 完成输出后进程不会自动退出。
253
+ In `--json` mode, Codex does not automatically exit after output completion.
203
254
 
204
- 解决:设置 `CODEAGENT_POST_MESSAGE_DELAY=1`
255
+ Fix: Set `CODEAGENT_POST_MESSAGE_DELAY=1`
205
256
 
206
- ## 架构
257
+ ## Architecture
207
258
 
208
259
  ```
209
- Claude Code (编排)
260
+ Claude Code (Orchestrator)
210
261
 
211
262
  ┌───┴───┐
212
263
  ↓ ↓
213
264
  Codex Gemini
214
- (后端) (前端)
265
+ (Backend) (Frontend)
215
266
  │ │
216
267
  └───┬───┘
217
268
 
218
269
  Unified Patch
219
270
  ```
220
271
 
221
- 外部模型无写入权限,仅返回 Patch,由 Claude 审核后应用。
272
+ External models have no write access — they only return patches, which Claude reviews before applying.
222
273
 
223
- ## 致谢
274
+ ## Credits
224
275
 
225
276
  - [cexll/myclaude](https://github.com/cexll/myclaude) - codeagent-wrapper
226
- - [UfoMiao/zcf](https://github.com/UfoMiao/zcf) - Git 工具
227
- - [GudaStudio/skills](https://github.com/GuDaStudio/skills) - 路由设计
228
- - [ace-tool](https://linux.do/t/topic/1344562) - MCP 工具
277
+ - [UfoMiao/zcf](https://github.com/UfoMiao/zcf) - Git tools
278
+ - [GudaStudio/skills](https://github.com/GuDaStudio/skills) - Routing design
279
+ - [ace-tool](https://linux.do/t/topic/1344562) - MCP tool
229
280
 
230
281
  ## Star History
231
282
 
@@ -237,4 +288,4 @@ MIT
237
288
 
238
289
  ---
239
290
 
240
- v1.7.68 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
291
+ v1.7.70 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)