ccg-workflow 1.7.5 → 1.7.7
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/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.B7LrdmRN.mjs → ccg-workflow.CHCXUNCV.mjs} +18 -2
- package/package.json +1 -1
- package/templates/commands/backend.md +19 -3
- package/templates/commands/feat.md +18 -2
- package/templates/commands/frontend.md +19 -3
- package/templates/commands/workflow.md +20 -4
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 { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, D as configMcp, E as version, a as i18n } from './shared/ccg-workflow.
|
|
4
|
+
import { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, D as configMcp, E as version, a as i18n } from './shared/ccg-workflow.CHCXUNCV.mjs';
|
|
5
5
|
import 'inquirer';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'pathe';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.
|
|
1
|
+
export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.CHCXUNCV.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'node:os';
|
|
@@ -10,7 +10,7 @@ import { parse, stringify } from 'smol-toml';
|
|
|
10
10
|
import { exec } from 'node:child_process';
|
|
11
11
|
import { promisify } from 'node:util';
|
|
12
12
|
|
|
13
|
-
const version = "1.7.
|
|
13
|
+
const version = "1.7.7";
|
|
14
14
|
|
|
15
15
|
function isWindows() {
|
|
16
16
|
return process.platform === "win32";
|
|
@@ -699,6 +699,17 @@ async function installAceTool(config) {
|
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
+
const installer = {
|
|
703
|
+
__proto__: null,
|
|
704
|
+
getAllCommandIds: getAllCommandIds,
|
|
705
|
+
getWorkflowById: getWorkflowById,
|
|
706
|
+
getWorkflowConfigs: getWorkflowConfigs,
|
|
707
|
+
installAceTool: installAceTool,
|
|
708
|
+
installWorkflows: installWorkflows,
|
|
709
|
+
uninstallAceTool: uninstallAceTool,
|
|
710
|
+
uninstallWorkflows: uninstallWorkflows
|
|
711
|
+
};
|
|
712
|
+
|
|
702
713
|
async function configMcp() {
|
|
703
714
|
console.log();
|
|
704
715
|
console.log(ansis.cyan.bold(` \u914D\u7F6E ace-tool MCP`));
|
|
@@ -1702,7 +1713,8 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
1702
1713
|
const config = await readCcgConfig();
|
|
1703
1714
|
spinner = ora("\u6B63\u5728\u66F4\u65B0\u5DE5\u4F5C\u6D41\u548C codeagent-wrapper \u4E8C\u8FDB\u5236...").start();
|
|
1704
1715
|
try {
|
|
1705
|
-
const
|
|
1716
|
+
const { getAllCommandIds } = await Promise.resolve().then(function () { return installer; });
|
|
1717
|
+
const workflows = getAllCommandIds();
|
|
1706
1718
|
const installDir = join(homedir(), ".claude");
|
|
1707
1719
|
const result = await installWorkflows(workflows, installDir, true, {
|
|
1708
1720
|
routing: config?.routing
|
|
@@ -1717,6 +1729,10 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
1717
1729
|
}
|
|
1718
1730
|
if (config) {
|
|
1719
1731
|
config.general.version = toVersion;
|
|
1732
|
+
config.workflows = {
|
|
1733
|
+
installed: workflows
|
|
1734
|
+
// Update to include all current commands
|
|
1735
|
+
};
|
|
1720
1736
|
await writeCcgConfig(config);
|
|
1721
1737
|
}
|
|
1722
1738
|
} else {
|
package/package.json
CHANGED
|
@@ -32,8 +32,24 @@ description: '后端专项工作流(研究→构思→计划→执行→优化
|
|
|
32
32
|
**调用语法**:
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
+
# 新会话调用
|
|
35
36
|
Bash({
|
|
36
|
-
command: "~/.claude/bin/codeagent-wrapper --backend codex
|
|
37
|
+
command: "~/.claude/bin/codeagent-wrapper --backend codex - \"$PWD\" <<'EOF'
|
|
38
|
+
ROLE_FILE: <角色提示词路径>
|
|
39
|
+
<TASK>
|
|
40
|
+
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
41
|
+
上下文:<前序阶段收集的项目上下文、分析结果等>
|
|
42
|
+
</TASK>
|
|
43
|
+
OUTPUT: 期望输出格式
|
|
44
|
+
EOF",
|
|
45
|
+
run_in_background: false,
|
|
46
|
+
timeout: 3600000,
|
|
47
|
+
description: "简短描述"
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
# 复用会话调用
|
|
51
|
+
Bash({
|
|
52
|
+
command: "~/.claude/bin/codeagent-wrapper --backend codex resume <SESSION_ID> - \"$PWD\" <<'EOF'
|
|
37
53
|
ROLE_FILE: <角色提示词路径>
|
|
38
54
|
<TASK>
|
|
39
55
|
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
@@ -55,7 +71,7 @@ EOF",
|
|
|
55
71
|
| 规划 | `~/.claude/.ccg/prompts/codex/architect.md` |
|
|
56
72
|
| 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` |
|
|
57
73
|
|
|
58
|
-
**会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用
|
|
74
|
+
**会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `CODEX_SESSION`,阶段 3 和 5 使用 `resume` 复用。
|
|
59
75
|
|
|
60
76
|
---
|
|
61
77
|
|
|
@@ -93,7 +109,7 @@ EOF",
|
|
|
93
109
|
|
|
94
110
|
`[模式:计划]` - Codex 主导规划
|
|
95
111
|
|
|
96
|
-
调用 Codex
|
|
112
|
+
调用 Codex(`resume $CODEX_SESSION`),使用规划提示词,输出文件结构、函数/类设计、依赖。
|
|
97
113
|
|
|
98
114
|
Claude 综合规划,请求用户批准后存入 `.claude/plan/任务名.md`
|
|
99
115
|
|
|
@@ -13,8 +13,24 @@ $ARGUMENTS
|
|
|
13
13
|
**调用语法**(并行用 `run_in_background: true`,串行用 `false`):
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
+
# 新会话调用
|
|
16
17
|
Bash({
|
|
17
|
-
command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini>
|
|
18
|
+
command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> - \"$PWD\" <<'EOF'
|
|
19
|
+
ROLE_FILE: <角色提示词路径>
|
|
20
|
+
<TASK>
|
|
21
|
+
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
22
|
+
上下文:<前序阶段收集的项目上下文、计划文件内容等>
|
|
23
|
+
</TASK>
|
|
24
|
+
OUTPUT: 期望输出格式
|
|
25
|
+
EOF",
|
|
26
|
+
run_in_background: true,
|
|
27
|
+
timeout: 3600000,
|
|
28
|
+
description: "简短描述"
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
# 复用会话调用
|
|
32
|
+
Bash({
|
|
33
|
+
command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> resume <SESSION_ID> - \"$PWD\" <<'EOF'
|
|
18
34
|
ROLE_FILE: <角色提示词路径>
|
|
19
35
|
<TASK>
|
|
20
36
|
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
@@ -37,7 +53,7 @@ EOF",
|
|
|
37
53
|
| 实施 | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/gemini/frontend.md` |
|
|
38
54
|
| 审查 | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
|
|
39
55
|
|
|
40
|
-
**会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用
|
|
56
|
+
**会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。
|
|
41
57
|
|
|
42
58
|
**并行调用**:使用 `run_in_background: true` 启动,用 `TaskOutput` 等待结果。**必须等所有模型返回后才能进入下一阶段**。
|
|
43
59
|
|
|
@@ -32,8 +32,24 @@ description: '前端专项工作流(研究→构思→计划→执行→优化
|
|
|
32
32
|
**调用语法**:
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
+
# 新会话调用
|
|
35
36
|
Bash({
|
|
36
|
-
command: "~/.claude/bin/codeagent-wrapper --backend gemini
|
|
37
|
+
command: "~/.claude/bin/codeagent-wrapper --backend gemini - \"$PWD\" <<'EOF'
|
|
38
|
+
ROLE_FILE: <角色提示词路径>
|
|
39
|
+
<TASK>
|
|
40
|
+
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
41
|
+
上下文:<前序阶段收集的项目上下文、分析结果等>
|
|
42
|
+
</TASK>
|
|
43
|
+
OUTPUT: 期望输出格式
|
|
44
|
+
EOF",
|
|
45
|
+
run_in_background: false,
|
|
46
|
+
timeout: 3600000,
|
|
47
|
+
description: "简短描述"
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
# 复用会话调用
|
|
51
|
+
Bash({
|
|
52
|
+
command: "~/.claude/bin/codeagent-wrapper --backend gemini resume <SESSION_ID> - \"$PWD\" <<'EOF'
|
|
37
53
|
ROLE_FILE: <角色提示词路径>
|
|
38
54
|
<TASK>
|
|
39
55
|
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
@@ -55,7 +71,7 @@ EOF",
|
|
|
55
71
|
| 规划 | `~/.claude/.ccg/prompts/gemini/architect.md` |
|
|
56
72
|
| 审查 | `~/.claude/.ccg/prompts/gemini/reviewer.md` |
|
|
57
73
|
|
|
58
|
-
**会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用
|
|
74
|
+
**会话复用**:每次调用返回 `SESSION_ID: xxx`,后续阶段用 `resume xxx` 复用上下文。阶段 2 保存 `GEMINI_SESSION`,阶段 3 和 5 使用 `resume` 复用。
|
|
59
75
|
|
|
60
76
|
---
|
|
61
77
|
|
|
@@ -93,7 +109,7 @@ EOF",
|
|
|
93
109
|
|
|
94
110
|
`[模式:计划]` - Gemini 主导规划
|
|
95
111
|
|
|
96
|
-
调用 Gemini
|
|
112
|
+
调用 Gemini(`resume $GEMINI_SESSION`),使用规划提示词,输出组件结构、UI流程、样式方案。
|
|
97
113
|
|
|
98
114
|
Claude 综合规划,请求用户批准后存入 `.claude/plan/任务名.md`
|
|
99
115
|
|
|
@@ -36,8 +36,24 @@ description: '多模型协作开发工作流(研究→构思→计划→执行
|
|
|
36
36
|
**调用语法**(并行用 `run_in_background: true`,串行用 `false`):
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
+
# 新会话调用
|
|
39
40
|
Bash({
|
|
40
|
-
command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini>
|
|
41
|
+
command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> - \"$PWD\" <<'EOF'
|
|
42
|
+
ROLE_FILE: <角色提示词路径>
|
|
43
|
+
<TASK>
|
|
44
|
+
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
45
|
+
上下文:<前序阶段收集的项目上下文、分析结果等>
|
|
46
|
+
</TASK>
|
|
47
|
+
OUTPUT: 期望输出格式
|
|
48
|
+
EOF",
|
|
49
|
+
run_in_background: true,
|
|
50
|
+
timeout: 3600000,
|
|
51
|
+
description: "简短描述"
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
# 复用会话调用
|
|
55
|
+
Bash({
|
|
56
|
+
command: "~/.claude/bin/codeagent-wrapper --backend <codex|gemini> resume <SESSION_ID> - \"$PWD\" <<'EOF'
|
|
41
57
|
ROLE_FILE: <角色提示词路径>
|
|
42
58
|
<TASK>
|
|
43
59
|
需求:<增强后的需求(如未增强则用 $ARGUMENTS)>
|
|
@@ -104,9 +120,9 @@ EOF",
|
|
|
104
120
|
|
|
105
121
|
`[模式:计划]` - 多模型协作规划:
|
|
106
122
|
|
|
107
|
-
**并行调用**(复用会话
|
|
108
|
-
- Codex:使用规划提示词 +
|
|
109
|
-
- Gemini:使用规划提示词 +
|
|
123
|
+
**并行调用**(复用会话 `resume <SESSION_ID>`):
|
|
124
|
+
- Codex:使用规划提示词 + `resume $CODEX_SESSION`,输出后端架构
|
|
125
|
+
- Gemini:使用规划提示词 + `resume $GEMINI_SESSION`,输出前端架构
|
|
110
126
|
|
|
111
127
|
用 `TaskOutput` 等待结果。
|
|
112
128
|
|