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 +167 -116
- package/README.zh-CN.md +293 -0
- package/dist/cli.mjs +12 -12
- package/dist/index.mjs +2 -2
- package/dist/shared/{ccg-workflow.WfGXmC9N.mjs → ccg-workflow.BPzva2Np.mjs} +919 -273
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,137 +6,141 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://claude.ai/code)
|
|
8
8
|
|
|
9
|
+
[简体中文](./README.zh-CN.md) | English
|
|
10
|
+
|
|
9
11
|
</div>
|
|
10
12
|
|
|
11
|
-
Claude Code
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `/ccg:
|
|
34
|
-
| `/ccg:
|
|
35
|
-
| `/ccg:
|
|
36
|
-
| `/ccg:
|
|
37
|
-
| `/ccg:
|
|
38
|
-
| `/ccg:
|
|
39
|
-
| `/ccg:
|
|
40
|
-
| `/ccg:
|
|
41
|
-
| `/ccg:
|
|
42
|
-
| `/ccg:
|
|
43
|
-
| `/ccg:
|
|
44
|
-
| `/ccg:
|
|
45
|
-
| `/ccg:
|
|
46
|
-
| `/ccg:
|
|
47
|
-
| `/ccg:
|
|
48
|
-
| `/ccg:
|
|
49
|
-
| `/ccg:
|
|
50
|
-
| `/ccg:spec-
|
|
51
|
-
| `/ccg:
|
|
52
|
-
| `/ccg:
|
|
53
|
-
| `/ccg:
|
|
54
|
-
| `/ccg:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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` | Requirements → Constraints |
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
|
85
|
+
### Agent Teams Parallel Execution (v1.7.60+)
|
|
80
86
|
|
|
81
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
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
|
|
135
|
-
| `CODEX_TIMEOUT` | codeagent-wrapper
|
|
136
|
-
| `BASH_DEFAULT_TIMEOUT_MS` | Claude Code Bash
|
|
137
|
-
| `BASH_MAX_TIMEOUT_MS` | Claude Code Bash
|
|
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
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
155
|
-
- **
|
|
156
|
-
- **
|
|
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
|
-
|
|
159
|
-
- **Context7** -
|
|
160
|
-
- **Playwright** -
|
|
161
|
-
- **DeepWiki** -
|
|
162
|
-
- **Exa** -
|
|
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
|
-
#
|
|
166
|
-
npx ccg-workflow menu #
|
|
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** -
|
|
201
|
+
- **ccusage** - Claude Code usage analytics
|
|
202
|
+
- **CCometixLine** - Status bar tool (Git + usage tracking)
|
|
177
203
|
|
|
178
|
-
##
|
|
204
|
+
## Install Claude Code
|
|
179
205
|
|
|
180
206
|
```bash
|
|
181
|
-
npx ccg-workflow menu #
|
|
207
|
+
npx ccg-workflow menu # Select "Install Claude Code"
|
|
182
208
|
```
|
|
183
209
|
|
|
184
|
-
|
|
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
|
-
|
|
195
|
-
|
|
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
|
-
|
|
251
|
+
### 2. Codex CLI 0.80.0 process does not exit
|
|
201
252
|
|
|
202
|
-
`--json`
|
|
253
|
+
In `--json` mode, Codex does not automatically exit after output completion.
|
|
203
254
|
|
|
204
|
-
|
|
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
|
-
|
|
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.
|
|
291
|
+
v1.7.70 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
|