[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-78664":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":16,"starSnapshotCount":16,"syncStatus":43,"lastSyncTime":44,"discoverSource":45},78664,"ccg-workflow","fengshao1227\u002Fccg-workflow","fengshao1227","多模型协作工作流引擎 — \u002Fccg:go 一个命令，AI 自动分析意图、选择策略、编排 Codex + Gemini + Claude 协作执行","https:\u002F\u002Fccg.fengshao1227.com",null,"Go",5513,421,18,16,0,44,116,192,132,38.88,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39],"agent-teams","ai","ccg","claude-code","cli","codex","gemini","llm","no-de","nodejs","opsxspec","prompt","workflow","2026-06-12 02:03:48","# CCG - Claude + Codex + Gemini Multi-Model Collaboration\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"assets\u002Flogo\u002Fccg-logo-cropped.png\" alt=\"CCG Workflow\" width=\"400\">\n\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ffengshao1227\u002Fccg-workflow?style=social)](https:\u002F\u002Fgithub.com\u002Ffengshao1227\u002Fccg-workflow)\n[![NPM Downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fccg-workflow?style=flat-square&color=blue)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fccg-workflow)\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fccg-workflow.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fccg-workflow)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Claude Code](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FClaude%20Code-Compatible-green.svg)](https:\u002F\u002Fclaude.ai\u002Fcode)\n[![Tests](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTests-139%20passed-brightgreen.svg)]()\n[![Follow on X](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FX-@CCG__Workflow-black?logo=x&logoColor=white)](https:\u002F\u002Fx.com\u002FCCG_Workflow)\n![star](https:\u002F\u002Fatomgit.com\u002Ffengshao1227\u002Fccg-workflow\u002Fstar\u002Fbadge.svg)\n[![Docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocs-ccg.fengshao1227.com-blue?style=for-the-badge&logo=readthedocs&logoColor=white)](https:\u002F\u002Fccg.fengshao1227.com\u002F)\n\n[简体中文](.\u002FREADME.zh-CN.md) | English | [**Documentation**](https:\u002F\u002Fccg.fengshao1227.com\u002F)\n\n\u003C\u002Fdiv>\n\n## ♥️ Sponsor\n\n[![302.AI](assets\u002Fsponsors\u002F302.ai-en.jpg)](https:\u002F\u002Fshare.302.ai\u002FoUDqQ6)\n\n[302.AI](https:\u002F\u002Fshare.302.ai\u002FoUDqQ6) is a pay-as-you-go enterprise AI resource hub that offers the latest and most comprehensive AI models and APIs on the market, along with a variety of ready-to-use online AI applications.\n\n---\n\n[**n1n.ai**](https:\u002F\u002Fapi.n1n.ai\u002Fregister?channel=c_ivgzug0w) — Global LLM API Gateway. One API Key to access 500+ top AI models (GPT-5, Claude 4.5, Gemini 3 Pro, and more).\n\n---\n\nCCG is a workflow engine for Claude Code that orchestrates multiple AI models (Codex, Gemini, Claude) with hook-based state tracking, automatic strategy selection, and Agent Teams parallel execution.\n\n## What's new in v3.0\n\nv3.0 is a ground-up rewrite. One command replaces 29.\n\n- `\u002Fccg:go` — Describe what you want in plain language. The engine analyzes your intent, picks the right strategy, and executes it.\n- **Hook engine** — Per-turn state injection keeps Claude on track even after context compaction. Session-start hooks inject full project context on every new session.\n- **Task persistence** — Medium+ complexity tasks create `.ccg\u002Ftasks\u002F` with persistent state. Phase gates enforce HARD STOP checkpoints.\n- **Agent Teams** — Large tasks spawn parallel Builder teammates via TeamCreate. Each Builder gets isolated file ownership.\n- **Quality gates** — `verify-security`, `verify-quality`, `verify-change` run as Skill invocations inside strategy verification phases.\n- **Domain knowledge hooks** — When your message mentions security, caching, RAG, etc., the relevant knowledge file is auto-injected into context.\n- **Codex-Led Mode** — Use Codex CLI as the lead orchestrator. Codex writes code directly and dispatches analysis\u002Freview to Gemini + Claude via codeagent-wrapper. Install via menu option `X`.\n\n## Quick Start\n\n```bash\nnpx ccg-workflow\n```\n\nRequires Node.js 20+ and Claude Code CLI. Codex CLI and Gemini CLI are optional (enable multi-model features).\n\nThe installer walks through 4 steps: API config, model routing, MCP tools, performance mode. New users get a streamlined 2-step flow with sensible defaults.\n\n## How it works\n\n```\nYou: \u002Fccg:go add JWT authentication to this API\n\nCCG Engine:\n  1. Reads project context (git status, tech stack, file structure)\n  2. Classifies: feature \u002F L complexity \u002F backend \u002F high risk\n  3. Selects strategy: full-collaborate\n  4. Creates .ccg\u002Ftasks\u002Fadd-jwt-auth\u002Ftask.json\n  5. Launches dual-model analysis (Codex + Gemini in parallel)\n  6. Produces plan → HARD STOP for your approval\n  7. Spawns Agent Teams Builders for parallel implementation\n  8. Runs quality gates + dual-model cross-review\n  9. Reports results\n\nEvery turn, a hook injects:\n  \u003Cccg-state>\n  Task: add-jwt-auth (in_progress)\n  Strategy: full-collaborate\n  Phase: 4-implementation\n  Next: Layer 1 Builders executing\n  \u003C\u002Fccg-state>\n```\n\n## Strategies\n\nThe engine picks a strategy based on task type and complexity:\n\n| Strategy | When | External models | Teams |\n|----------|------|-----------------|-------|\n| direct-fix | Simple bug, single file | No | No |\n| quick-implement | Small feature, clear scope | No | No |\n| guided-develop | Medium feature, needs planning | Single model | No |\n| full-collaborate | Complex feature, multi-module | Dual model parallel | Yes |\n| debug-investigate | Complex bug, unknown cause | Dual model diagnosis | No |\n| refactor-safely | Code restructuring | Dual model review | No |\n| deep-research | Technical research, comparison | Dual model exploration | No |\n| optimize-measure | Performance optimization | Optional | No |\n| review-audit | Code review | Dual model cross-review | No |\n| git-action | commit, rollback, branches | No | No |\n\nSimple tasks run fast with no overhead. Complex tasks get the full engine.\n\n## Commands\n\nv3.0 default install: 13 commands. Legacy mode adds 18 more.\n\n### Core\n\n| Command | Description |\n|---------|-------------|\n| `\u002Fccg:go` | Smart entry — describe what you want, engine handles the rest |\n\n### Git\n\n| Command | Description |\n|---------|-------------|\n| `\u002Fccg:commit` | Smart conventional commit |\n| `\u002Fccg:rollback` | Interactive rollback |\n| `\u002Fccg:clean-branches` | Clean merged branches |\n| `\u002Fccg:worktree` | Worktree management |\n\n### Project\n\n| Command | Description |\n|---------|-------------|\n| `\u002Fccg:init` | Initialize project CLAUDE.md |\n| `\u002Fccg:context` | Project context management |\n\n### OpenSpec\n\n| Command | Description |\n|---------|-------------|\n| `\u002Fccg:spec-init` | Initialize OPSX environment |\n| `\u002Fccg:spec-research` | Requirements → constraints |\n| `\u002Fccg:spec-plan` | Constraints → zero-decision plan |\n| `\u002Fccg:spec-impl` | Execute plan + archive |\n| `\u002Fccg:spec-review` | Dual-model cross-review |\n\n## Hook Engine\n\nCCG installs 4 hooks into `~\u002F.claude\u002Fsettings.json`:\n\n| Hook | Event | Purpose |\n|------|-------|---------|\n| workflow-state.js | UserPromptSubmit | Injects task state breadcrumb every turn |\n| session-start.js | SessionStart | Injects full project context on session start\u002Fclear\u002Fcompact |\n| subagent-context.js | PreToolUse (Bash\u002FAgent) | Injects spec + task context into codeagent-wrapper calls and Team member spawns |\n| skill-router.js | UserPromptSubmit | Auto-injects domain knowledge when keywords detected |\n\nHooks are JavaScript, zero dependencies, silent on failure.\n\n## Task System\n\nMedium+ complexity tasks create a persistent task directory:\n\n```\n.ccg\u002Ftasks\u002Fadd-jwt-auth\u002F\n├── task.json         # Status, strategy, current phase, gate\n├── requirements.md   # Enhanced requirements (full-collaborate)\n├── plan.md           # Approved implementation plan\n├── context.jsonl     # Spec files for sub-agent injection\n├── review.md         # Review results\n└── research\u002F         # Persisted research findings\n```\n\nThe workflow-state hook reads `task.json` every turn and injects the current state. If context gets compacted, session-start re-injects the full task context. No state is lost.\n\n## Spec System\n\nProject-level coding standards in `.ccg\u002Fspec\u002F`:\n\n```\n.ccg\u002Fspec\u002F\n├── backend\u002Findex.md    # Backend conventions\n├── frontend\u002Findex.md   # Frontend conventions\n└── guides\u002Findex.md     # Cross-module guidelines\n```\n\nThe subagent-context hook reads `context.jsonl` and injects relevant spec files into every codeagent-wrapper call and Agent Team spawn. Sub-agents follow your project's standards without being told.\n\n## Configuration\n\n```\n~\u002F.claude\u002F\n├── commands\u002Fccg\u002F          # Slash commands\n├── hooks\u002Fccg\u002F             # Hook scripts (4 files)\n├── .ccg\u002F\n│   ├── config.toml        # Model routing, MCP, performance\n│   ├── engine\u002F            # Strategy files + model router\n│   └── prompts\u002F           # Expert prompts (codex\u002Fgemini\u002Fclaude)\n├── skills\u002Fccg\u002F            # Quality gates + domain knowledge\n└── bin\u002Fcodeagent-wrapper  # Multi-model execution bridge\n```\n\n### Environment Variables\n\nSet in `~\u002F.claude\u002Fsettings.json` under `\"env\"`:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `CODEX_TIMEOUT` | `7200` | Wrapper timeout (seconds) |\n| `CODEAGENT_POST_MESSAGE_DELAY` | `5` | Post-completion delay (seconds) |\n| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | unset | Set to `1` to enable Agent Teams parallel execution |\n\n## Update \u002F Uninstall\n\n```bash\nnpx ccg-workflow@latest     # Update\nnpx ccg-workflow            # Select \"Uninstall\" from menu\n```\n\n## Credits\n\n- [cexll\u002Fmyclaude](https:\u002F\u002Fgithub.com\u002Fcexll\u002Fmyclaude) — codeagent-wrapper inspiration\n- [UfoMiao\u002Fzcf](https:\u002F\u002Fgithub.com\u002FUfoMiao\u002Fzcf) — Git tools reference\n- [mindfold-ai\u002FTrellis](https:\u002F\u002Fgithub.com\u002Fmindfold-ai\u002FTrellis) — Hook-based workflow state patterns\n- [ace-tool](https:\u002F\u002Flinux.do\u002Ft\u002Ftopic\u002F1344562) — MCP code retrieval\n\n## Contributors\n\n\u003C!-- readme: contributors -start -->\n\u003Ctable>\n\u003Ctr>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffengshao1227\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Ffengshao1227?v=4&s=100\" width=\"100;\" alt=\"fengshao1227\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>fengshao1227\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSXP-Simon\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002FSXP-Simon?v=4&s=100\" width=\"100;\" alt=\"SXP-Simon\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>SXP-Simon\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRebornQ\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002FRebornQ?v=4&s=100\" width=\"100;\" alt=\"RebornQ\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>RebornQ\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSakuranda\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002FSakuranda?v=4&s=100\" width=\"100;\" alt=\"Sakuranda\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Sakuranda\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FMriris\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002FMriris?v=4&s=100\" width=\"100;\" alt=\"Mriris\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Mriris\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002F23q3\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002F23q3?v=4&s=100\" width=\"100;\" alt=\"23q3\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>23q3\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FMrNine-666\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002FMrNine-666?v=4&s=100\" width=\"100;\" alt=\"MrNine-666\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>MrNine-666\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FGGzili\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002FGGzili?v=4&s=100\" width=\"100;\" alt=\"GGzili\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>GGzili\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\u003C!-- readme: contributors -end -->\n\n## Contact\n\n- **X (Twitter)**: [@CCG_Workflow](https:\u002F\u002Fx.com\u002FCCG_Workflow)\n- **Email**: [fengshao1227@gmail.com](mailto:fengshao1227@gmail.com)\n- **Issues**: [GitHub Issues](https:\u002F\u002Fgithub.com\u002Ffengshao1227\u002Fccg-workflow\u002Fissues)\n- **Community**: [Linux.do](https:\u002F\u002Flinux.do)\n\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=fengshao1227\u002Fccg-workflow&type=timeline&legend=top-left)](https:\u002F\u002Fwww.star-history.com\u002F#fengshao1227\u002Fccg-workflow&type=timeline&legend=top-left)\n\n## License\n\nMIT\n\n---\n\nv3.0.4 | [Issues](https:\u002F\u002Fgithub.com\u002Ffengshao1227\u002Fccg-workflow\u002Fissues) | [Contributing](.\u002FCONTRIBUTING.md)\n","CCG Workflow 是一个多模型协作的工作流引擎，通过单一命令实现AI意图分析、策略选择及Codex、Gemini和Claude等多模型协同执行。其核心功能包括基于钩子的状态跟踪、自动策略选取以及Agent Teams并行执行机制，支持任务持久化和质量门控以确保复杂任务的高效处理与高质量输出。该工具特别适用于需要跨多个AI模型进行复杂逻辑编排的应用场景，如企业级软件开发自动化、智能运维等。采用Go语言编写，并在MIT许可下开源。",2,"2026-06-11 03:57:07","high_star"]