ccg-workflow 1.7.59 → 1.7.60

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
@@ -48,6 +48,10 @@ npx ccg-workflow
48
48
  | `/ccg:spec-plan` | 约束 → 零决策计划 |
49
49
  | `/ccg:spec-impl` | 按计划执行 + 归档 |
50
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 双模型审查 |
51
55
 
52
56
  ### OPSX 规范驱动(v1.7.52+)
53
57
 
@@ -72,6 +76,28 @@ npx ccg-workflow
72
76
 
73
77
  **说明**:`/ccg:spec-*` 命令是 CCG 对 OPSX 的封装,内部调用 `/opsx:*` 命令。每阶段之间可 `/clear`,状态存在 `openspec/` 目录,不怕上下文爆。
74
78
 
79
+ ### Agent Teams 并行实施(v1.7.60+)
80
+
81
+ 利用 Claude Code Agent Teams 实验特性,spawn 多个 Builder teammates 并行写代码:
82
+
83
+ ```bash
84
+ # 1. 需求研究 → 约束集(复杂项目推荐,简单项目可跳过)
85
+ /ccg:team-research 实现实时协作看板 API
86
+
87
+ # 2. /clear 后规划 → 零决策并行计划
88
+ /ccg:team-plan kanban-api
89
+
90
+ # 3. /clear 后并行实施 → Builder teammates 并行写代码
91
+ /ccg:team-exec
92
+
93
+ # 4. /clear 后审查 → 双模型交叉审查
94
+ /ccg:team-review
95
+ ```
96
+
97
+ **前置条件**:需手动启用 Agent Teams(`settings.json` 中设置 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
98
+
99
+ **vs 传统工作流**:Team 系列每步 `/clear` 隔离上下文,通过文件传递状态。Builder 并行实施,适合可拆分为 3+ 独立模块的任务。
100
+
75
101
  ### 规划与执行分离
76
102
 
77
103
  v1.7.39 新增 `/ccg:plan` 和 `/ccg:execute` 命令,将规划与执行解耦:
@@ -211,4 +237,4 @@ MIT
211
237
 
212
238
  ---
213
239
 
214
- v1.7.57 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
240
+ v1.7.60 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
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, s as showMainMenu, i as init, E as configMcp, F as version, a as i18n } from './shared/ccg-workflow.BDEqkVoT.mjs';
4
+ import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, E as configMcp, F as version, a as i18n } from './shared/ccg-workflow.flWlQcrI.mjs';
5
5
  import 'inquirer';
6
6
  import 'node:child_process';
7
7
  import 'node:util';
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.BDEqkVoT.mjs';
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.flWlQcrI.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'node:child_process';
@@ -10,7 +10,7 @@ import i18next from 'i18next';
10
10
  import ora from 'ora';
11
11
  import { parse, stringify } from 'smol-toml';
12
12
 
13
- const version = "1.7.59";
13
+ const version = "1.7.60";
14
14
 
15
15
  function isWindows() {
16
16
  return process.platform === "win32";
@@ -411,6 +411,50 @@ const WORKFLOW_CONFIGS = [
411
411
  order: 34,
412
412
  description: "\u53CC\u6A21\u578B\u4EA4\u53C9\u5BA1\u67E5 \u2192 Critical \u5FC5\u987B\u4FEE\u590D \u2192 \u5141\u8BB8\u5F52\u6863",
413
413
  descriptionEn: "Multi-model compliance review before archiving"
414
+ },
415
+ {
416
+ id: "team-research",
417
+ name: "Agent Teams \u9700\u6C42\u7814\u7A76",
418
+ nameEn: "Agent Teams Research",
419
+ category: "development",
420
+ commands: ["team-research"],
421
+ defaultSelected: true,
422
+ order: 1.8,
423
+ description: "\u5E76\u884C\u63A2\u7D22\u4EE3\u7801\u5E93\uFF0C\u4EA7\u51FA\u7EA6\u675F\u96C6 + \u53EF\u9A8C\u8BC1\u6210\u529F\u5224\u636E",
424
+ descriptionEn: "Parallel codebase exploration, produces constraint sets + success criteria"
425
+ },
426
+ {
427
+ id: "team-plan",
428
+ name: "Agent Teams \u89C4\u5212",
429
+ nameEn: "Agent Teams Planning",
430
+ category: "development",
431
+ commands: ["team-plan"],
432
+ defaultSelected: true,
433
+ order: 2,
434
+ description: "Lead \u8C03\u7528 Codex/Gemini \u5E76\u884C\u5206\u6790\uFF0C\u4EA7\u51FA\u96F6\u51B3\u7B56\u5E76\u884C\u5B9E\u65BD\u8BA1\u5212",
435
+ descriptionEn: "Lead orchestrates Codex/Gemini analysis, produces zero-decision parallel plan"
436
+ },
437
+ {
438
+ id: "team-exec",
439
+ name: "Agent Teams \u5E76\u884C\u5B9E\u65BD",
440
+ nameEn: "Agent Teams Parallel Execution",
441
+ category: "development",
442
+ commands: ["team-exec"],
443
+ defaultSelected: true,
444
+ order: 2.5,
445
+ description: "\u8BFB\u53D6\u8BA1\u5212\u6587\u4EF6\uFF0Cspawn Builder teammates \u5E76\u884C\u5199\u4EE3\u7801\uFF0C\u9700\u542F\u7528 Agent Teams",
446
+ descriptionEn: "Read plan file, spawn Builder teammates for parallel implementation"
447
+ },
448
+ {
449
+ id: "team-review",
450
+ name: "Agent Teams \u5BA1\u67E5",
451
+ nameEn: "Agent Teams Review",
452
+ category: "development",
453
+ commands: ["team-review"],
454
+ defaultSelected: true,
455
+ order: 3,
456
+ description: "\u53CC\u6A21\u578B\u4EA4\u53C9\u5BA1\u67E5\u5E76\u884C\u5B9E\u65BD\u4EA7\u51FA\uFF0C\u5206\u7EA7\u5904\u7406 Critical/Warning/Info",
457
+ descriptionEn: "Dual-model cross-review with severity classification"
414
458
  }
415
459
  ];
416
460
  function getWorkflowConfigs() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.59",
3
+ "version": "1.7.60",
4
4
  "description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",
@@ -24,31 +24,35 @@ description: '多模型调试:Codex 后端诊断 + Gemini 前端诊断,交
24
24
  ## 多模型调用规范
25
25
 
26
26
  **工作目录**:
27
- - `{{WORKDIR}}`:替换为目标工作目录的**绝对路径**
28
27
  - 如果用户通过 `/add-dir` 添加了多个工作区,先用 Glob/Grep 确定任务相关的工作区
29
28
  - 如果无法确定,用 `AskUserQuestion` 询问用户选择目标工作区
30
- - 默认使用当前工作目录
29
+ - 默认使用当前工作目录(通过 `pwd` 命令获取)
31
30
 
32
- **调用语法**(并行用 `run_in_background: true`):
31
+ **调用示例**:
33
32
 
34
- ```
35
- Bash({
36
- command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}- \"{{WORKDIR}}\" <<'EOF'
37
- ROLE_FILE: <角色提示词路径>
33
+ **Codex 后端诊断**:
34
+ ```bash
35
+ ~/.claude/bin/codeagent-wrapper --backend codex - "$(pwd)" <<'EOF'
36
+ ROLE_FILE: ~/.claude/.ccg/prompts/codex/debugger.md
38
37
  <TASK>
39
- 需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
40
- 上下文:<错误日志、堆栈信息、复现步骤等>
38
+ 需求:<增强后的需求>
39
+ 上下文:<错误日志、堆栈信息、复现步骤>
41
40
  </TASK>
42
41
  OUTPUT: 诊断假设(按可能性排序)
43
- EOF",
44
- run_in_background: true,
45
- timeout: 3600000,
46
- description: "简短描述"
47
- })
42
+ EOF
48
43
  ```
49
44
 
50
- **模型参数说明**:
51
- - `{{GEMINI_MODEL_FLAG}}`:当使用 `--backend gemini` 时,替换为 `--gemini-model gemini-3-pro-preview `(注意末尾空格);使用 codex 时替换为空字符串
45
+ **Gemini 前端诊断**:
46
+ ```bash
47
+ ~/.claude/bin/codeagent-wrapper --backend gemini --gemini-model gemini-3-pro-preview - "$(pwd)" <<'EOF'
48
+ ROLE_FILE: ~/.claude/.ccg/prompts/gemini/debugger.md
49
+ <TASK>
50
+ 需求:<增强后的需求>
51
+ 上下文:<错误日志、堆栈信息、复现步骤>
52
+ </TASK>
53
+ OUTPUT: 诊断假设(按可能性排序)
54
+ EOF
55
+ ```
52
56
 
53
57
  **角色提示词**:
54
58
 
@@ -57,18 +61,15 @@ EOF",
57
61
  | Codex | `~/.claude/.ccg/prompts/codex/debugger.md` |
58
62
  | Gemini | `~/.claude/.ccg/prompts/gemini/debugger.md` |
59
63
 
60
- **并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
61
-
62
- **等待后台任务**(使用最大超时 600000ms = 10 分钟):
63
-
64
- ```
65
- TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
66
- ```
64
+ **并行调用**:
65
+ 1. 使用 `Bash` 工具,设置 `run_in_background: true` 和 `timeout: 600000`(10 分钟)
66
+ 2. 同时发起两个后台任务(Codex + Gemini)
67
+ 3. 使用 `TaskOutput` 等待结果:`TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })`
67
68
 
68
69
  **重要**:
69
- - 必须指定 `timeout: 600000`,否则默认只有 30 秒会导致提前超时。
70
- 如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**。
71
- - 若因等待时间过长跳过了等待 TaskOutput 结果,则**必须调用 `AskUserQuestion` 工具询问用户选择继续等待还是 Kill Task。禁止直接 Kill Task。**
70
+ - 必须指定 `timeout: 600000`,否则默认 30 秒会超时
71
+ - 如果 10 分钟后仍未完成,继续用 `TaskOutput` 轮询,**绝对不要 Kill 进程**
72
+ - 若等待时间过长,**必须用 `AskUserQuestion` 询问用户是否继续等待,禁止直接 Kill**
72
73
 
73
74
  ---
74
75