chore: bump version to 1.7.72

This commit is contained in:
li committed 2026-03-09 12:24:07 +08:00
1 parent 336cb34af4
commit b6ce03effb
7 files changed
+46 -41

No files matched your search

+9
View File
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [1.7.72] - 2026-03-09
### 🔄 变更
- **全局提示词迁移至 rules/**:grok-search 搜索提示词从追加到 `~/.claude/CLAUDE.md` 改为写入 `~/.claude/rules/ccg-grok-search.md`,避免 CLAUDE.md 超 200 行导致执行力下降
- **旧版自动清理**:升级时自动清除 CLAUDE.md 中残留的 `CCG-GROK-SEARCH-PROMPT` 注入内容
---
## [1.7.71] - 2026-03-09
### ✨ 新功能
+1 -1
View File
@@ -2,7 +2,7 @@
> [根目录](../CLAUDE.md) > **skills-v2**
**Last Updated**: 2026-03-09 (v1.7.71)
**Last Updated**: 2026-03-09 (v1.7.72)
---
+1 -1
View File
@@ -288,4 +288,4 @@ MIT
---
v1.7.71 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
v1.7.72 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
+1 -1
View File
@@ -290,4 +290,4 @@ MIT
---
v1.7.71 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
v1.7.72 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ccg-workflow",
"version": "1.7.71",
"version": "1.7.72",
"description": "Claude + Codex + Gemini multi-model collaboration system - smart routing development workflow",
"type": "module",
"packageManager": "pnpm@10.17.1",
+17 -19
View File
@@ -140,10 +140,7 @@ async function handleInstallContextWeaver(): Promise<void> {
// Grok Search MCP (web search)
// ═══════════════════════════════════════════════════════
const GROK_SEARCH_PROMPT = `
<!-- CCG-GROK-SEARCH-PROMPT-START -->
## 0. Language and Format Standards
const GROK_SEARCH_PROMPT = `## 0. Language and Format Standards
- **Interaction Language**: Tools and models must interact exclusively in **English**; user outputs must be in **Chinese**.
- MUST ULRTA Thinking in ENGLISH!
@@ -155,11 +152,11 @@ Typically, the results of web searches only constitute third-party suggestions a
### Search Trigger Conditions
Strictly distinguish between internal and external knowledge. Avoid speculation based on general internal knowledge. When uncertain, explicitly inform the user.
For example, when using the \`fastapi\` library to encapsulate an API endpoint, despite possessing common-sense knowledge internally, you must still rely on the latest search results or official documentation for reliable implementation.
For example, when using the \\\`fastapi\\\` library to encapsulate an API endpoint, despite possessing common-sense knowledge internally, you must still rely on the latest search results or official documentation for reliable implementation.
### Search Execution Guidelines
- Use the \`mcp__grok-search\` tool for web searches
- Use the \\\`mcp__grok-search\\\` tool for web searches
- Execute independent search requests in parallel; sequential execution applies only when dependencies exist
- Evaluate search results for quality: analyze relevance, source credibility, cross-source consistency, and completeness. Conduct supplementary searches if gaps exist
@@ -177,23 +174,24 @@ For example, when using the \`fastapi\` library to encapsulate an API endpoint,
- All conclusions must specify: Applicable conditions, scope boundaries, and known limitations
- Avoid greetings, pleasantries, filler adjectives, and emotional expressions
- When uncertain: State unknowns and reasons before presenting confirmed facts
<!-- CCG-GROK-SEARCH-PROMPT-END -->
`
async function appendGrokPromptToClaudeMd(): Promise<void> {
async function writeGrokPromptToRules(): Promise<void> {
const rulesDir = join(homedir(), '.claude', 'rules')
const rulePath = join(rulesDir, 'ccg-grok-search.md')
// Clean up legacy CLAUDE.md injection if present
const claudeMdPath = join(homedir(), '.claude', 'CLAUDE.md')
let content = ''
if (await fs.pathExists(claudeMdPath)) {
content = await fs.readFile(claudeMdPath, 'utf-8')
const content = await fs.readFile(claudeMdPath, 'utf-8')
if (content.includes('CCG-GROK-SEARCH-PROMPT')) {
const cleaned = content.replace(/\n*<!-- CCG-GROK-SEARCH-PROMPT-START -->[\s\S]*?<!-- CCG-GROK-SEARCH-PROMPT-END -->\n*/g, '')
await fs.writeFile(claudeMdPath, cleaned, 'utf-8')
}
}
if (content.includes('CCG-GROK-SEARCH-PROMPT')) {
return
}
await fs.ensureDir(join(homedir(), '.claude'))
await fs.appendFile(claudeMdPath, GROK_SEARCH_PROMPT, 'utf-8')
await fs.ensureDir(rulesDir)
await fs.writeFile(rulePath, GROK_SEARCH_PROMPT, 'utf-8')
}
async function handleGrokSearch(): Promise<void> {
@@ -238,9 +236,9 @@ async function handleGrokSearch(): Promise<void> {
console.log()
if (result.success) {
await appendGrokPromptToClaudeMd()
await writeGrokPromptToRules()
console.log(ansis.green('✓ grok-search MCP 配置成功!'))
console.log(ansis.green('✓ 全局搜索提示词已追加到 ~/.claude/CLAUDE.md'))
console.log(ansis.green('✓ 全局搜索提示词已写入 ~/.claude/rules/ccg-grok-search.md'))
console.log(ansis.gray(' 重启 Claude Code CLI 使配置生效'))
}
else {
+16 -18
View File
@@ -60,25 +60,24 @@ async function installHook(settingsPath: string): Promise<void> {
}
/**
* Append grok-search global prompt to ~/.claude/CLAUDE.md (never replaces existing content)
* Write grok-search global prompt to ~/.claude/rules/ccg-grok-search.md
* Uses rules/ directory for modularity — avoids bloating CLAUDE.md
*/
async function appendGrokSearchPrompt(): Promise<void> {
const rulesDir = join(homedir(), '.claude', 'rules')
const rulePath = join(rulesDir, 'ccg-grok-search.md')
// Also clean up legacy CLAUDE.md injection if present
const claudeMdPath = join(homedir(), '.claude', 'CLAUDE.md')
let content = ''
if (await fs.pathExists(claudeMdPath)) {
content = await fs.readFile(claudeMdPath, 'utf-8')
const content = await fs.readFile(claudeMdPath, 'utf-8')
if (content.includes('CCG-GROK-SEARCH-PROMPT')) {
const cleaned = content.replace(/\n*<!-- CCG-GROK-SEARCH-PROMPT-START -->[\s\S]*?<!-- CCG-GROK-SEARCH-PROMPT-END -->\n*/g, '')
await fs.writeFile(claudeMdPath, cleaned, 'utf-8')
}
}
// Already appended — skip
if (content.includes('CCG-GROK-SEARCH-PROMPT')) {
return
}
const prompt = `
<!-- CCG-GROK-SEARCH-PROMPT-START -->
## 0. Language and Format Standards
const prompt = `## 0. Language and Format Standards
- **Interaction Language**: Tools and models must interact exclusively in **English**; user outputs must be in **Chinese**.
- MUST ULRTA Thinking in ENGLISH!
@@ -112,11 +111,10 @@ For example, when using the \`fastapi\` library to encapsulate an API endpoint,
- All conclusions must specify: Applicable conditions, scope boundaries, and known limitations
- Avoid greetings, pleasantries, filler adjectives, and emotional expressions
- When uncertain: State unknowns and reasons before presenting confirmed facts
<!-- CCG-GROK-SEARCH-PROMPT-END -->
`
await fs.ensureDir(join(homedir(), '.claude'))
await fs.appendFile(claudeMdPath, prompt, 'utf-8')
await fs.ensureDir(rulesDir)
await fs.writeFile(rulePath, prompt, 'utf-8')
}
/**
@@ -668,11 +666,11 @@ export async function init(options: InitOptions = {}): Promise<void> {
})
if (grokResult.success) {
// Append global prompt to ~/.claude/CLAUDE.md
// Write global prompt to ~/.claude/rules/ccg-grok-search.md
await appendGrokSearchPrompt()
console.log()
console.log(` ${ansis.green('✓')} grok-search MCP ${ansis.gray('→ ~/.claude.json')}`)
console.log(` ${ansis.green('✓')} ${i18n.t('init:grok.promptAppended')} ${ansis.gray('→ ~/.claude/CLAUDE.md')}`)
console.log(` ${ansis.green('✓')} ${i18n.t('init:grok.promptAppended')} ${ansis.gray('→ ~/.claude/rules/ccg-grok-search.md')}`)
}
else {
console.log()