ccg-workflow 3.1.1 → 3.1.2
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 +4 -2
- package/README.zh-CN.md +3 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.k-Wk5rrs.mjs → ccg-workflow.CTnUpMWE.mjs} +27 -16
- package/package.json +1 -1
- package/templates/codex/AGENTS.md +5 -5
- package/templates/codex/hooks/ccg-workflow.py +4 -4
- package/templates/codex/hooks.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
[
|
|
29
|
+
[](https://notebooklmremover.org)
|
|
30
|
+
|
|
31
|
+
[NotebookLM Remover](https://notebooklmremover.org) — Free browser-local AI watermark remover. Remove NotebookLM watermarks across every format — video, PDF, PPTX, infographic, podcast, and more. 100% private, works offline.
|
|
30
32
|
|
|
31
33
|
---
|
|
32
34
|
|
|
@@ -251,4 +253,4 @@ MIT
|
|
|
251
253
|
|
|
252
254
|
---
|
|
253
255
|
|
|
254
|
-
v3.
|
|
256
|
+
v3.1.2 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues) | [Contributing](./CONTRIBUTING.md)
|
package/README.zh-CN.md
CHANGED
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
[
|
|
30
|
+
[](https://notebooklmremover.org)
|
|
31
|
+
|
|
32
|
+
[NotebookLM Remover](https://notebooklmremover.org) — 免费浏览器本地 AI 水印去除工具。支持视频、PDF、PPTX、信息图、播客等全格式,100% 隐私,离线可用。
|
|
31
33
|
|
|
32
34
|
---
|
|
33
35
|
|
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 { B as diagnoseMcpConfig, C as isWindows, D as readClaudeCodeConfig, E as fixWindowsMcpConfig, F as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, G as configMcp, H as version } from './shared/ccg-workflow.
|
|
4
|
+
import { B as diagnoseMcpConfig, C as isWindows, D as readClaudeCodeConfig, E as fixWindowsMcpConfig, F as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, G as configMcp, H as version } from './shared/ccg-workflow.CTnUpMWE.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, z as checkForUpdates, A as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, x as getCurrentVersion, y as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, n as installCodexMode, k as installWorkflows, t as migrateToV1_4_0, v as needsMigration, r as readCcgConfig, s as showMainMenu, q as uninstallAceTool, o as uninstallCodexMode, p as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.
|
|
1
|
+
export { c as changeLanguage, z as checkForUpdates, A as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, x as getCurrentVersion, y as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, n as installCodexMode, k as installWorkflows, t as migrateToV1_4_0, v as needsMigration, r as readCcgConfig, s as showMainMenu, q as uninstallAceTool, o as uninstallCodexMode, p as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.CTnUpMWE.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'ora';
|
|
@@ -10,7 +10,7 @@ import fs from 'fs-extra';
|
|
|
10
10
|
import { parse, stringify } from 'smol-toml';
|
|
11
11
|
import i18next from 'i18next';
|
|
12
12
|
|
|
13
|
-
const version = "3.1.
|
|
13
|
+
const version = "3.1.2";
|
|
14
14
|
|
|
15
15
|
function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
|
|
16
16
|
return {
|
|
@@ -1173,6 +1173,12 @@ async function installCodexMode() {
|
|
|
1173
1173
|
try {
|
|
1174
1174
|
const codexHome = join(homedir(), ".codex");
|
|
1175
1175
|
await fs.ensureDir(join(codexHome, "agents"));
|
|
1176
|
+
const config = await readCcgConfig();
|
|
1177
|
+
const injectOpts = {
|
|
1178
|
+
routing: config?.routing,
|
|
1179
|
+
liteMode: config?.performance?.liteMode || false,
|
|
1180
|
+
mcpProvider: config?.mcp?.provider || "skip"
|
|
1181
|
+
};
|
|
1176
1182
|
const configSrc = join(codexTemplateDir, "config.toml");
|
|
1177
1183
|
const configDest = join(codexHome, "config.toml");
|
|
1178
1184
|
if (await fs.pathExists(configSrc) && !await fs.pathExists(configDest)) {
|
|
@@ -1184,27 +1190,32 @@ async function installCodexMode() {
|
|
|
1184
1190
|
}
|
|
1185
1191
|
const agentsMdSrc = join(codexTemplateDir, "AGENTS.md");
|
|
1186
1192
|
if (await fs.pathExists(agentsMdSrc)) {
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
content = injectConfigVariables(content, {
|
|
1191
|
-
routing: config.routing,
|
|
1192
|
-
liteMode: config.performance?.liteMode || false,
|
|
1193
|
-
mcpProvider: config.mcp?.provider || "skip"
|
|
1194
|
-
});
|
|
1195
|
-
await fs.writeFile(join(codexHome, "AGENTS.md"), content, "utf-8");
|
|
1196
|
-
} else {
|
|
1197
|
-
await fs.copy(agentsMdSrc, join(codexHome, "AGENTS.md"), { overwrite: true });
|
|
1198
|
-
}
|
|
1193
|
+
let content = await fs.readFile(agentsMdSrc, "utf-8");
|
|
1194
|
+
content = injectConfigVariables(content, injectOpts);
|
|
1195
|
+
await fs.writeFile(join(codexHome, "AGENTS.md"), content, "utf-8");
|
|
1199
1196
|
}
|
|
1200
1197
|
const hooksSrc = join(codexTemplateDir, "hooks");
|
|
1201
1198
|
if (await fs.pathExists(hooksSrc)) {
|
|
1202
|
-
|
|
1203
|
-
await fs.
|
|
1199
|
+
const hooksDest = join(codexHome, "hooks");
|
|
1200
|
+
await fs.ensureDir(hooksDest);
|
|
1201
|
+
for (const file of await fs.readdir(hooksSrc)) {
|
|
1202
|
+
const srcFile = join(hooksSrc, file);
|
|
1203
|
+
const destFile = join(hooksDest, file);
|
|
1204
|
+
if (file.endsWith(".py")) {
|
|
1205
|
+
let content = await fs.readFile(srcFile, "utf-8");
|
|
1206
|
+
content = injectConfigVariables(content, injectOpts);
|
|
1207
|
+
await fs.writeFile(destFile, content, "utf-8");
|
|
1208
|
+
} else {
|
|
1209
|
+
await fs.copy(srcFile, destFile, { overwrite: true });
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1204
1212
|
}
|
|
1205
1213
|
const hooksJsonSrc = join(codexTemplateDir, "hooks.json");
|
|
1206
1214
|
if (await fs.pathExists(hooksJsonSrc)) {
|
|
1207
|
-
await fs.
|
|
1215
|
+
let content = await fs.readFile(hooksJsonSrc, "utf-8");
|
|
1216
|
+
const absHome = homedir().replace(/\\/g, "/");
|
|
1217
|
+
content = content.replace(/~\//g, `${absHome}/`);
|
|
1218
|
+
await fs.writeFile(join(codexHome, "hooks.json"), content, "utf-8");
|
|
1208
1219
|
}
|
|
1209
1220
|
return {
|
|
1210
1221
|
success: true,
|
package/package.json
CHANGED
|
@@ -23,12 +23,12 @@ You are the **lead orchestrator** of a multi-model development team. You think,
|
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
S + 低风险 → 直接写,跑测试,完事
|
|
26
|
-
S + 高风险 → 直接写,但必须调双模型审查(
|
|
27
|
-
M + 任意 → 双模型并行分析(
|
|
26
|
+
S + 高风险 → 直接写,但必须调双模型审查({{FRONTEND_PRIMARY}} + Claude)
|
|
27
|
+
M + 任意 → 双模型并行分析({{FRONTEND_PRIMARY}} + Claude 都调),再写,完成后双模型审查
|
|
28
28
|
L+ + 任意 → 双模型并行分析,制定 plan.md,spawn 子 Agent 并行写,双模型审查
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
**⛔ M 以上复杂度,分析和审查都必须是双模型(
|
|
31
|
+
**⛔ M 以上复杂度,分析和审查都必须是双模型({{FRONTEND_PRIMARY}} + Claude 都调)。**
|
|
32
32
|
这是 CCG 的核心价值——两个模型从不同角度分析同一个问题,交叉验证,弥补单模型盲区。只调一个模型 = 浪费了多模型协作的意义。
|
|
33
33
|
|
|
34
34
|
**不确定时,选高一级。** 宁可多做一步分析,不可写完才发现方向错了。
|
|
@@ -150,7 +150,7 @@ wait
|
|
|
150
150
|
|
|
151
151
|
### 单模型调用(仅 S 复杂度可用)
|
|
152
152
|
|
|
153
|
-
####
|
|
153
|
+
#### {{FRONTEND_PRIMARY}}(前端/UI 分析)
|
|
154
154
|
```bash
|
|
155
155
|
~/.claude/bin/codeagent-wrapper --progress --backend {{FRONTEND_PRIMARY}} - "$(pwd)" <<'EOF'
|
|
156
156
|
ROLE_FILE: ~/.claude/.ccg/prompts/{{FRONTEND_PRIMARY}}/$ROLE.md
|
|
@@ -279,7 +279,7 @@ Critical 问题 → spawn 修复代理。Warning → 视情况修复。
|
|
|
279
279
|
- [ ] git diff 只有预期变更
|
|
280
280
|
|
|
281
281
|
### 何时调外部模型审查
|
|
282
|
-
- 变更 >30 行 → **必须**调双模型审查(
|
|
282
|
+
- 变更 >30 行 → **必须**调双模型审查({{FRONTEND_PRIMARY}} + Claude 都调)
|
|
283
283
|
- 变更 ≤30 行但涉及 auth/数据库/加密 → **必须**调双模型审查
|
|
284
284
|
- 变更 ≤30 行且低风险 → 可以只调一个
|
|
285
285
|
|
|
@@ -127,8 +127,8 @@ def build_guidance(task, progress, root):
|
|
|
127
127
|
if phase == "analysis":
|
|
128
128
|
if complexity in ("M", "L", "XL"):
|
|
129
129
|
parts.append("")
|
|
130
|
-
parts.append(f"⛔ {complexity} complexity: you MUST call BOTH
|
|
131
|
-
parts.append("Use the dual-model parallel template in AGENTS.md: --backend
|
|
130
|
+
parts.append(f"⛔ {complexity} complexity: you MUST call BOTH the frontend model AND Claude for parallel analysis before coding.")
|
|
131
|
+
parts.append("Use the dual-model parallel template in AGENTS.md: --backend {{FRONTEND_PRIMARY}} & --backend claude with & + wait.")
|
|
132
132
|
|
|
133
133
|
# Phase: implementation — coding in progress
|
|
134
134
|
elif phase == "implementation":
|
|
@@ -146,12 +146,12 @@ def build_guidance(task, progress, root):
|
|
|
146
146
|
# Big changes without review
|
|
147
147
|
if progress["changed_lines"] > 30 and phase != "review":
|
|
148
148
|
parts.append("")
|
|
149
|
-
parts.append(f"⚠️ {progress['changed_lines']} lines changed. When done coding, you MUST call BOTH
|
|
149
|
+
parts.append(f"⚠️ {progress['changed_lines']} lines changed. When done coding, you MUST call BOTH the frontend model AND Claude for dual-model review. Not just one — both.")
|
|
150
150
|
|
|
151
151
|
# Review phase: enforce dual model
|
|
152
152
|
if phase == "review":
|
|
153
153
|
parts.append("")
|
|
154
|
-
parts.append("⛔ Review phase: call BOTH
|
|
154
|
+
parts.append("⛔ Review phase: call BOTH the frontend model (--backend {{FRONTEND_PRIMARY}}) AND Claude (--backend claude) with reviewer role. Two models, not one.")
|
|
155
155
|
|
|
156
156
|
# High-risk files detected
|
|
157
157
|
if progress["high_risk_files"] and phase not in ("review", "completed"):
|