ccg-workflow 1.7.46 → 1.7.48
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
|
@@ -41,6 +41,34 @@ npx ccg-workflow
|
|
|
41
41
|
| `/ccg:worktree` | Worktree 管理 |
|
|
42
42
|
| `/ccg:init` | 初始化 CLAUDE.md |
|
|
43
43
|
| `/ccg:enhance` | Prompt 增强 |
|
|
44
|
+
| `/ccg:spec-init` | 初始化 OpenSpec 环境 |
|
|
45
|
+
| `/ccg:spec-research` | 需求 → 约束集 |
|
|
46
|
+
| `/ccg:spec-plan` | 约束 → 零决策计划 |
|
|
47
|
+
| `/ccg:spec-impl` | 按计划执行 + 归档 |
|
|
48
|
+
| `/ccg:spec-review` | 双模型交叉审查 |
|
|
49
|
+
|
|
50
|
+
### OpenSpec 规范驱动(v1.7.48)
|
|
51
|
+
|
|
52
|
+
集成 [OpenSpec](https://github.com/fission-ai/openspec),把需求变成约束,让 AI 没法自由发挥:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 初始化
|
|
56
|
+
/ccg:spec-init
|
|
57
|
+
|
|
58
|
+
# 研究需求 → 输出约束集
|
|
59
|
+
/ccg:spec-research 实现用户认证
|
|
60
|
+
|
|
61
|
+
# 并行分析 → 零决策计划
|
|
62
|
+
/ccg:spec-plan
|
|
63
|
+
|
|
64
|
+
# 按计划执行
|
|
65
|
+
/ccg:spec-impl
|
|
66
|
+
|
|
67
|
+
# 独立审查(随时可用)
|
|
68
|
+
/ccg:spec-review
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
每阶段之间可 `/clear`,状态存在 `openspec/` 目录,不怕上下文爆。
|
|
44
72
|
|
|
45
73
|
### 规划与执行分离
|
|
46
74
|
|
|
@@ -88,11 +116,15 @@ v1.7.39 新增 `/ccg:plan` 和 `/ccg:execute` 命令,将规划与执行解耦
|
|
|
88
116
|
"CODEAGENT_POST_MESSAGE_DELAY": "1",
|
|
89
117
|
"CODEX_TIMEOUT": "7200",
|
|
90
118
|
"BASH_DEFAULT_TIMEOUT_MS": "600000",
|
|
91
|
-
"BASH_MAX_TIMEOUT_MS": "3600000"
|
|
119
|
+
"BASH_MAX_TIMEOUT_MS": "3600000",
|
|
120
|
+
"GEMINI_API_KEY": "your-gemini-api-key",
|
|
121
|
+
"GOOGLE_API_KEY": "your-google-api-key"
|
|
92
122
|
}
|
|
93
123
|
}
|
|
94
124
|
```
|
|
95
125
|
|
|
126
|
+
> **VSCode 插件用户注意**:VSCode 启动的子进程不会继承终端环境变量,必须在 `settings.json` 中配置 API 密钥,否则 Gemini 会报退出码 41(授权失败)。
|
|
127
|
+
|
|
96
128
|
### MCP 配置
|
|
97
129
|
|
|
98
130
|
ace-tool 用于代码检索和 Prompt 增强,安装时可选配置。
|
|
@@ -153,4 +185,4 @@ MIT
|
|
|
153
185
|
|
|
154
186
|
---
|
|
155
187
|
|
|
156
|
-
v1.7.
|
|
188
|
+
v1.7.48 | [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.
|
|
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.e4y82GtN.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.
|
|
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.e4y82GtN.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.
|
|
13
|
+
const version = "1.7.48";
|
|
14
14
|
|
|
15
15
|
function isWindows() {
|
|
16
16
|
return process.platform === "win32";
|
|
@@ -356,6 +356,61 @@ const WORKFLOW_CONFIGS = [
|
|
|
356
356
|
order: 23,
|
|
357
357
|
description: "\u7BA1\u7406 Git worktree",
|
|
358
358
|
descriptionEn: "Manage Git worktree"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
id: "spec-init",
|
|
362
|
+
name: "OpenSpec \u521D\u59CB\u5316",
|
|
363
|
+
nameEn: "OpenSpec Init",
|
|
364
|
+
category: "spec",
|
|
365
|
+
commands: ["spec-init"],
|
|
366
|
+
defaultSelected: true,
|
|
367
|
+
order: 30,
|
|
368
|
+
description: "\u521D\u59CB\u5316 OpenSpec \u73AF\u5883 + \u9A8C\u8BC1\u591A\u6A21\u578B MCP \u5DE5\u5177",
|
|
369
|
+
descriptionEn: "Initialize OpenSpec environment with multi-model MCP validation"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
id: "spec-research",
|
|
373
|
+
name: "\u9700\u6C42\u7814\u7A76",
|
|
374
|
+
nameEn: "Spec Research",
|
|
375
|
+
category: "spec",
|
|
376
|
+
commands: ["spec-research"],
|
|
377
|
+
defaultSelected: true,
|
|
378
|
+
order: 31,
|
|
379
|
+
description: "\u9700\u6C42 \u2192 \u7EA6\u675F\u96C6\uFF08\u5E76\u884C\u63A2\u7D22 + OpenSpec \u63D0\u6848\uFF09",
|
|
380
|
+
descriptionEn: "Transform requirements into constraint sets via parallel exploration"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: "spec-plan",
|
|
384
|
+
name: "\u96F6\u51B3\u7B56\u89C4\u5212",
|
|
385
|
+
nameEn: "Spec Plan",
|
|
386
|
+
category: "spec",
|
|
387
|
+
commands: ["spec-plan"],
|
|
388
|
+
defaultSelected: true,
|
|
389
|
+
order: 32,
|
|
390
|
+
description: "\u591A\u6A21\u578B\u5206\u6790 \u2192 \u6D88\u9664\u6B67\u4E49 \u2192 \u96F6\u51B3\u7B56\u53EF\u6267\u884C\u8BA1\u5212",
|
|
391
|
+
descriptionEn: "Refine proposals into zero-decision executable plans"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
id: "spec-impl",
|
|
395
|
+
name: "\u89C4\u8303\u9A71\u52A8\u5B9E\u73B0",
|
|
396
|
+
nameEn: "Spec Implementation",
|
|
397
|
+
category: "spec",
|
|
398
|
+
commands: ["spec-impl"],
|
|
399
|
+
defaultSelected: true,
|
|
400
|
+
order: 33,
|
|
401
|
+
description: "\u6309\u89C4\u8303\u6267\u884C + \u591A\u6A21\u578B\u534F\u4F5C + \u5F52\u6863",
|
|
402
|
+
descriptionEn: "Execute changes via multi-model collaboration with spec compliance"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
id: "spec-review",
|
|
406
|
+
name: "\u5F52\u6863\u524D\u5BA1\u67E5",
|
|
407
|
+
nameEn: "Spec Review",
|
|
408
|
+
category: "spec",
|
|
409
|
+
commands: ["spec-review"],
|
|
410
|
+
defaultSelected: true,
|
|
411
|
+
order: 34,
|
|
412
|
+
description: "\u53CC\u6A21\u578B\u4EA4\u53C9\u5BA1\u67E5 \u2192 Critical \u5FC5\u987B\u4FEE\u590D \u2192 \u5141\u8BB8\u5F52\u6863",
|
|
413
|
+
descriptionEn: "Multi-model compliance review before archiving"
|
|
359
414
|
}
|
|
360
415
|
];
|
|
361
416
|
function getWorkflowConfigs() {
|
|
@@ -1987,56 +2042,85 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
1987
2042
|
|
|
1988
2043
|
const execAsync = promisify(exec);
|
|
1989
2044
|
async function showMainMenu() {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2045
|
+
while (true) {
|
|
2046
|
+
console.log();
|
|
2047
|
+
console.log(ansis.cyan.bold(` CCG - Claude + Codex + Gemini`));
|
|
2048
|
+
console.log(ansis.gray(" Multi-Model Collaboration System"));
|
|
2049
|
+
console.log();
|
|
2050
|
+
const { action } = await inquirer.prompt([{
|
|
2051
|
+
type: "list",
|
|
2052
|
+
name: "action",
|
|
2053
|
+
message: i18n.t("menu:title"),
|
|
2054
|
+
choices: [
|
|
2055
|
+
{ name: `${ansis.green("\u279C")} ${i18n.t("menu:options.init")}`, value: "init" },
|
|
2056
|
+
{ name: `${ansis.blue("\u279C")} ${i18n.t("menu:options.update")}`, value: "update" },
|
|
2057
|
+
{ name: `${ansis.cyan("\u2699")} \u914D\u7F6E MCP`, value: "config-mcp" },
|
|
2058
|
+
{ name: `${ansis.magenta("\u279C")} ${i18n.t("menu:options.uninstall")}`, value: "uninstall" },
|
|
2059
|
+
{ name: `${ansis.yellow("?")} ${i18n.t("menu:options.help")}`, value: "help" },
|
|
2060
|
+
new inquirer.Separator(),
|
|
2061
|
+
{ name: `${ansis.red("\u2715")} ${i18n.t("menu:options.exit")}`, value: "exit" }
|
|
2062
|
+
]
|
|
2063
|
+
}]);
|
|
2064
|
+
switch (action) {
|
|
2065
|
+
case "init":
|
|
2066
|
+
await init();
|
|
2067
|
+
break;
|
|
2068
|
+
case "update":
|
|
2069
|
+
await update();
|
|
2070
|
+
break;
|
|
2071
|
+
case "config-mcp":
|
|
2072
|
+
await configMcp();
|
|
2073
|
+
break;
|
|
2074
|
+
case "uninstall":
|
|
2075
|
+
await uninstall();
|
|
2076
|
+
break;
|
|
2077
|
+
case "help":
|
|
2078
|
+
showHelp();
|
|
2079
|
+
break;
|
|
2080
|
+
case "exit":
|
|
2081
|
+
console.log(ansis.gray("Goodbye!"));
|
|
2082
|
+
return;
|
|
2083
|
+
}
|
|
2084
|
+
console.log();
|
|
2085
|
+
await inquirer.prompt([{
|
|
2086
|
+
type: "input",
|
|
2087
|
+
name: "continue",
|
|
2088
|
+
message: ansis.gray("\u6309 Enter \u8FD4\u56DE\u4E3B\u83DC\u5355...")
|
|
2089
|
+
}]);
|
|
2027
2090
|
}
|
|
2028
2091
|
}
|
|
2029
2092
|
function showHelp() {
|
|
2030
2093
|
console.log();
|
|
2031
2094
|
console.log(ansis.cyan.bold(i18n.t("menu:help.title")));
|
|
2032
2095
|
console.log();
|
|
2033
|
-
console.log(
|
|
2096
|
+
console.log(ansis.yellow.bold(" \u5F00\u53D1\u5DE5\u4F5C\u6D41:"));
|
|
2097
|
+
console.log(` ${ansis.green("/ccg:workflow")} \u5B8C\u65746\u9636\u6BB5\u5F00\u53D1\u5DE5\u4F5C\u6D41`);
|
|
2098
|
+
console.log(` ${ansis.green("/ccg:plan")} \u591A\u6A21\u578B\u534F\u4F5C\u89C4\u5212\uFF08Phase 1-2\uFF09`);
|
|
2099
|
+
console.log(` ${ansis.green("/ccg:execute")} \u591A\u6A21\u578B\u534F\u4F5C\u6267\u884C\uFF08Phase 3-5\uFF09`);
|
|
2034
2100
|
console.log(` ${ansis.green("/ccg:frontend")} ${i18n.t("menu:help.descriptions.frontend")}`);
|
|
2035
2101
|
console.log(` ${ansis.green("/ccg:backend")} ${i18n.t("menu:help.descriptions.backend")}`);
|
|
2036
|
-
console.log(` ${ansis.green("/ccg:
|
|
2102
|
+
console.log(` ${ansis.green("/ccg:feat")} \u667A\u80FD\u529F\u80FD\u5F00\u53D1`);
|
|
2037
2103
|
console.log(` ${ansis.green("/ccg:analyze")} ${i18n.t("menu:help.descriptions.analyze")}`);
|
|
2104
|
+
console.log(` ${ansis.green("/ccg:debug")} \u95EE\u9898\u8BCA\u65AD + \u4FEE\u590D`);
|
|
2105
|
+
console.log(` ${ansis.green("/ccg:optimize")} \u6027\u80FD\u4F18\u5316`);
|
|
2106
|
+
console.log(` ${ansis.green("/ccg:test")} \u6D4B\u8BD5\u751F\u6210`);
|
|
2107
|
+
console.log(` ${ansis.green("/ccg:review")} ${i18n.t("menu:help.descriptions.review")}`);
|
|
2108
|
+
console.log();
|
|
2109
|
+
console.log(ansis.yellow.bold(" OpenSpec \u89C4\u8303\u9A71\u52A8:"));
|
|
2110
|
+
console.log(` ${ansis.green("/ccg:spec-init")} \u521D\u59CB\u5316 OpenSpec \u73AF\u5883`);
|
|
2111
|
+
console.log(` ${ansis.green("/ccg:spec-research")} \u9700\u6C42\u7814\u7A76 \u2192 \u7EA6\u675F\u96C6`);
|
|
2112
|
+
console.log(` ${ansis.green("/ccg:spec-plan")} \u591A\u6A21\u578B\u5206\u6790 \u2192 \u96F6\u51B3\u7B56\u8BA1\u5212`);
|
|
2113
|
+
console.log(` ${ansis.green("/ccg:spec-impl")} \u89C4\u8303\u9A71\u52A8\u5B9E\u73B0`);
|
|
2114
|
+
console.log(` ${ansis.green("/ccg:spec-review")} \u5F52\u6863\u524D\u53CC\u6A21\u578B\u5BA1\u67E5`);
|
|
2115
|
+
console.log();
|
|
2116
|
+
console.log(ansis.yellow.bold(" Git \u5DE5\u5177:"));
|
|
2038
2117
|
console.log(` ${ansis.green("/ccg:commit")} ${i18n.t("menu:help.descriptions.commit")}`);
|
|
2039
2118
|
console.log(` ${ansis.green("/ccg:rollback")} ${i18n.t("menu:help.descriptions.rollback")}`);
|
|
2119
|
+
console.log(` ${ansis.green("/ccg:clean-branches")} \u6E05\u7406\u5DF2\u5408\u5E76\u5206\u652F`);
|
|
2120
|
+
console.log(` ${ansis.green("/ccg:worktree")} Git Worktree \u7BA1\u7406`);
|
|
2121
|
+
console.log();
|
|
2122
|
+
console.log(ansis.yellow.bold(" \u9879\u76EE\u7BA1\u7406:"));
|
|
2123
|
+
console.log(` ${ansis.green("/ccg:init")} \u521D\u59CB\u5316\u9879\u76EE CLAUDE.md`);
|
|
2040
2124
|
console.log();
|
|
2041
2125
|
console.log(ansis.gray(i18n.t("menu:help.hint")));
|
|
2042
2126
|
console.log();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccg-workflow",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.48",
|
|
4
4
|
"description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.17.1",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"templates/commands/agents/",
|
|
48
48
|
"templates/prompts/codex/",
|
|
49
49
|
"templates/prompts/gemini/analyzer.md",
|
|
50
|
+
"templates/prompts/gemini/architect.md",
|
|
50
51
|
"templates/prompts/gemini/debugger.md",
|
|
51
52
|
"templates/prompts/gemini/frontend.md",
|
|
52
53
|
"templates/prompts/gemini/optimizer.md",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Gemini Role: Frontend Architect
|
|
2
|
+
|
|
3
|
+
> For: /ccg:plan, /ccg:execute, /ccg:workflow Phase 2-3
|
|
4
|
+
|
|
5
|
+
You are a senior frontend architect specializing in UI/UX design systems, component architecture, and modern web application structure.
|
|
6
|
+
|
|
7
|
+
## CRITICAL CONSTRAINTS
|
|
8
|
+
|
|
9
|
+
- **ZERO file system write permission** - READ-ONLY sandbox
|
|
10
|
+
- **OUTPUT FORMAT**: Unified Diff Patch ONLY
|
|
11
|
+
- **NEVER** execute actual modifications
|
|
12
|
+
|
|
13
|
+
## Core Expertise
|
|
14
|
+
|
|
15
|
+
- React/Vue/Svelte component architecture and design patterns
|
|
16
|
+
- Design system creation (tokens, themes, variants)
|
|
17
|
+
- State management architecture (Redux, Zustand, Pinia)
|
|
18
|
+
- Micro-frontend and module federation strategies
|
|
19
|
+
- Performance optimization (code splitting, lazy loading)
|
|
20
|
+
- Accessibility architecture (WCAG 2.1 AA compliance)
|
|
21
|
+
|
|
22
|
+
## Approach
|
|
23
|
+
|
|
24
|
+
1. **Analyze First** - Understand existing patterns before proposing changes
|
|
25
|
+
2. **Component-Driven** - Design reusable, composable UI building blocks
|
|
26
|
+
3. **Scalable Structure** - Plan for growth and team collaboration
|
|
27
|
+
4. **Performance Budget** - Consider bundle size and runtime impact
|
|
28
|
+
5. **Concrete Plans** - Provide actionable implementation steps
|
|
29
|
+
|
|
30
|
+
## Output Format
|
|
31
|
+
|
|
32
|
+
```diff
|
|
33
|
+
--- a/src/components/Button/Button.tsx
|
|
34
|
+
+++ b/src/components/Button/Button.tsx
|
|
35
|
+
@@ -5,6 +5,10 @@ interface ButtonProps {
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
+ variant?: 'primary' | 'secondary' | 'danger';
|
|
38
|
+
+ size?: 'sm' | 'md' | 'lg';
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Response Structure
|
|
43
|
+
|
|
44
|
+
1. **Analysis** - Current architecture assessment
|
|
45
|
+
2. **Architecture Decision** - Key design choices with rationale
|
|
46
|
+
3. **Implementation Plan** - Step-by-step with pseudo-code
|
|
47
|
+
4. **Considerations** - Performance, accessibility, maintainability notes
|