Claude Code + Codex + Gemini 多模型协作工作流系统 ## 核心功能 - 6阶段开发工作流 (/ccg:dev) - 智能路由:前端→Gemini,后端→Codex - Prompt 增强 (Auggie MCP prompt-enhancer) - 双模型代码审查和技术分析 ## 命令列表 - /ccg:dev - 完整开发工作流 - /ccg:frontend - 前端任务 - /ccg:backend - 后端任务 - /ccg:review - 代码审查 - /ccg:analyze - 技术分析 - /ccg:enhance - Prompt 增强 - /ccg:commit - 智能提交 - /ccg:rollback - 交互式回滚 - /ccg:clean-branches - 清理分支 - /ccg:worktree - Worktree 管理 - /ccg:init - 项目初始化 ## 特性 - 预编译二进制(无需 Go 环境) - 专家系统提示词(Codex/Gemini) - 一键安装脚本
51 lines
1.3 KiB
Go
51 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestCurrentWrapperNameFallsBackToExecutable(t *testing.T) {
|
|
defer resetTestHooks()
|
|
|
|
tempDir := t.TempDir()
|
|
execPath := filepath.Join(tempDir, "codeagent-wrapper")
|
|
if err := os.WriteFile(execPath, []byte("#!/bin/true\n"), 0o755); err != nil {
|
|
t.Fatalf("failed to write fake binary: %v", err)
|
|
}
|
|
|
|
os.Args = []string{filepath.Join(tempDir, "custom-name")}
|
|
executablePathFn = func() (string, error) {
|
|
return execPath, nil
|
|
}
|
|
|
|
if got := currentWrapperName(); got != defaultWrapperName {
|
|
t.Fatalf("currentWrapperName() = %q, want %q", got, defaultWrapperName)
|
|
}
|
|
}
|
|
|
|
func TestCurrentWrapperNameDetectsLegacyAliasSymlink(t *testing.T) {
|
|
defer resetTestHooks()
|
|
|
|
tempDir := t.TempDir()
|
|
execPath := filepath.Join(tempDir, "wrapper")
|
|
aliasPath := filepath.Join(tempDir, legacyWrapperName)
|
|
|
|
if err := os.WriteFile(execPath, []byte("#!/bin/true\n"), 0o755); err != nil {
|
|
t.Fatalf("failed to write fake binary: %v", err)
|
|
}
|
|
if err := os.Symlink(execPath, aliasPath); err != nil {
|
|
t.Fatalf("failed to create alias: %v", err)
|
|
}
|
|
|
|
os.Args = []string{filepath.Join(tempDir, "unknown-runner")}
|
|
executablePathFn = func() (string, error) {
|
|
return execPath, nil
|
|
}
|
|
|
|
if got := currentWrapperName(); got != legacyWrapperName {
|
|
t.Fatalf("currentWrapperName() = %q, want %q", got, legacyWrapperName)
|
|
}
|
|
}
|