The ultimate multi-agent AI programming team, powered by OpenCode.
Porting Garry Tan's GStack methodology with "Best-of-Breed" model selection and advanced tool-use capabilities.
GStack for OpenCode transforms your AI from a single assistant into a Dynamic Expert Team. By leveraging OpenCode's agentic framework, it assigns specialized roles to the most suitable LLMs (Claude, Gemini, DeepSeek, Kimi), creating a workflow that outperforms single-model tools like Claude Code in complex, long-term engineering tasks.
- 🛡️ Multi-Model Mastery: Use Claude 3.5 Sonnet for logic, Gemini 1.5 Pro for architecture (2M context), and DeepSeek/Kimi for cost-effective reasoning.
- ⚔️ Advanced Tool-Use: Agents are unlocked with
bash(shell execution),webfetch(real-time research), andedit(file modification) capabilities. - 🧩 Zero Context Pollution: Each role runs in an isolated agent session, ensuring critical architectural decisions aren't diluted by implementation details.
- 🇨🇳 Domestic Ready: First-class support for DeepSeek, Kimi, and Zhipu GLM via OpenAI-compatible endpoints.
graph TD
A[CEO /plan-ceo] -->|Verify Value| B[Eng Manager /plan-eng]
B -->|Design Architecture| C[Developer Default]
C -->|Implementation| D[Reviewer /review]
D -->|Security Audit| E[Security /security]
E -->|UI/UX Review| F[Design /design]
F -->|Validation| G[QA /qa]
G -->|Documentation| H[Docs /docs]
H -->|Preparation| I[Ship /ship]
I -->|Release| J(Success)
- Context Pollution: Single-model sessions often get "confused" by previous implementation details. GStack isolates high-level architecture from low-level coding.
- High Costs: Stop using expensive Claude 3.5 for simple unit tests. Offload tasks to DeepSeek or GPT-4o mini.
- Vendor Lock-in: Claude Code is locked to Anthropic. GStack gives you the freedom to swap models mid-flow.
- Domestic Barrier: Native support for Chinese developers using DeepSeek, Kimi, and GLM without VPN hurdles.
- Specialized Intelligence: Each role uses the model that excels at that specific task (e.g., Gemini for long-context architecture).
- Autonomous Tool-Use: Agents can now run
bashto explore your codebase andwebfetchto research external documentation. - Structured Workflow: Forces a "Think-Design-Code-Verify" cycle, significantly reducing technical debt.
- Open Source & Extensible: Easily add your own roles (e.g.,
DBA,DevOps) via Markdown templates.
- Setup Overhead: Requires manual environment variable configuration for domestic models (due to OpenCode CLI bugs).
- Dependency: Performance is tied to the stability of the OpenCode CLI and chosen model's tool-calling capability.
- Learning Curve: Users need to understand the "Role-playing" concept to get the best results.
| Role | Command | Tool-set | Core Mission |
|---|---|---|---|
| CEO | /plan-ceo |
🌐 Web | Product vision, MVP scope, and business value verification. |
| Eng Manager | /plan-eng |
💻 Bash, 🌐 Web | Technical architecture, system boundaries, and tech-stack selection. |
| Reviewer | /review |
💻 Bash, 📝 Edit | Critical bug hunting, performance optimization, and logic review. |
| Security | /security |
💻 Bash, 🌐 Web | Vulnerability scanning, privacy audit, and security hardening. |
| Designer | /design |
🌐 Web | UI/UX consistency, accessibility (A11y), and user flow optimization. |
| QA | /qa |
💻 Bash, 📝 Edit | Edge-case testing, test generation, and automated bug fixing. |
| Docs | /docs |
📝 Edit, 🌐 Web | README auditing, API documentation, and technical writing. |
| Ship | /ship |
💻 Bash | Release checklists, CHANGELOG generation, and rollback planning. |
# Clone the repository
git clone https://github.com/yandong2023/gstack-opencode.git && cd gstack-opencode
# Install agents, commands and skills
make install
# Validate your environment
make validateIf you are using domestic models, we recommend the Environment Variable Workaround to bypass CLI configuration bugs:
# Add to your .zshrc or .bashrc
export OPENAI_API_KEY="your-deepseek-api-key"
export OPENAI_BASE_URL="https://api.deepseek.com/v1"Enter your project directory and start the magic:
opencode
/plan-ceo "I want to add a real-time notification system."GStack for OpenCode 将你的 AI 从单一助手转变为一支 动态专家团队。通过利用 OpenCode 的 Agent 框架,它将专门的角色分配给最适合的大模型(Claude, Gemini, DeepSeek, Kimi),创造出在处理复杂工程任务时超越 Claude Code 等单一模型工具的工作流。
- 🛡️ 多模型协作:让 Claude 3.5 Sonnet 负责逻辑,Gemini 1.5 Pro 负责架构(200万上下文),DeepSeek/Kimi 负责高性价比推理。
- ⚔️ 深度工具集成:专家角色已解锁
bash(命令行)、webfetch(联网研究)和edit(文件修改)权限。 - 🧩 零上下文污染:每个角色运行在独立的 Agent 会话中,确保架构决策不会被琐碎的实现细节干扰。
- 🇨🇳 国产模型优化:原生支持 DeepSeek、Kimi、智谱 GLM 等国内顶尖模型。
- CEO (
/plan-ceo): 负责“重构问题本质”。不再直接讨论怎么写,而是讨论“值不值得做”。 - 工程经理 (
/plan-eng): 负责“定义边界”。通过bash探索代码库,设计不带偏见的技术方案。 - QA 工程师 (
/qa): 负责“寻找失败”。通过bash运行测试,并使用edit权限自动修复 Bug。 - 安全专家 (
/security): 负责“红队演练”。审计敏感数据泄露和注入风险。
- 先沟通需求:永远从
/plan-ceo开始,AI 会帮你砍掉 30% 不必要的复杂性。 - 给 QA 权限:当 QA 要求运行
npm test时,点击允许,它能自己找到并修复报错。 - 大上下文优势:如果你有 Gemini 1.5 Pro,建议将
/plan-eng的模型设为 Gemini,它能“瞬间”理解你的整个代码库。
我们欢迎任何形式的贡献!请参阅 CONTRIBUTING.md。
本项目采用 MIT 许可证。