Two weeks ago, I started learning “vibe coding” and began attempting to build my own Agentic Coding Team.
This article shares some of my takeaways from these past two weeks, hoping to provide some inspiration to interested friends.
Tool Selection
Model: Zhipu GLM 4.7
I believe that during the introductory phase, two things waste a lot of energy:
- Spending time finding VPNs/proxies (“airports”), playing hide-and-seek with official blocks, and dealing with connection stability.
- Frequently switching and trying different models, attempting to find the optimal solution.
Therefore, although Zhipu has obvious shortcomings compared to the first tier of closed-source models in terms of coding ability, I found it meets the basic requirements of Agentic Coding after using it.
Moreover, its Coding Plan offers a generous quota. I purchased the highest tier membership, which costs just over 2,000 RMB for the first year. Currently, my usage rate has reached at most 3%, so there is absolutely no pressure consuming tokens by the hundreds of millions.
CLI: OpenCode
Similarly, to focus on learning, I did not choose Claude Code but chose OpenCode.
The reason is that OpenCode is completely open source. I directly deleted its system prompts and added logs for the LLM interface.
This allows me to see the entire “vibe coding” process very clearly, as well as the impact of my various experiments.
Additionally, I use Ghostty as my Terminal. It has good performance, high aesthetic value, and excellent Chinese font rendering.
Directory Structure
I adopted a monorepo structure based on git submodule.
The top-level directories are documents and projects.
documents points to my Obsidian knowledge base repo.
projects contains submodules for various projects, including an opencode fork repo and an opencode plugin repo.
Design Philosophy
First, I feel that under the concept of Agentic Coding, the orchestration of Agents is a first-class citizen.
The core of orchestration consists of two parts: prompts and plugins.
In my directory structure, these correspond to documents and projects/opencode-plugin respectively.
The principle for placing prompts is: if it can be placed in a plugin, put it in the plugin; otherwise, put it in documents.
Major Advantages
- Agent orchestration does not pollute any project under
projects. - The same orchestration can be flexibly applied to all projects or specific projects.
- Each specific project can also have its own independent orchestration.
- The entire project is equivalent to Tesla’s Gigafactory, while specific projects are just different car models.
My current implementation method involves deleting the default OpenCode prompts, and then the AGENTS.md in the root directory acts as a router.
Major Modifications to OpenCode
Full Retention of Raw LLM Logs
This is crucial for debugging Agent orchestration. I automatically serialize and save every Request and Response from the LLM to the project’s logs folder.
This not only allows me to review OpenCode’s thinking process but also enables the AI to read its own logs, reflect on itself, and propose optimization plans.
Unlocking Recursive Sub-Agent Calls
In the Agentic Coding Team I am currently building, there are some support roles, such as technical researchers who can research technical experiences online and similar code snippets on GitHub.
Whether it is architecture design or code writing, these support roles might be used.
OpenCode natively hard-coded a prohibition on Sub Agents calling other Sub Agents (using tasks) to prevent infinite loops.
However, since I have my own orchestration mechanism to prevent this from happening, I removed this restriction in OpenCode.
Main Functions of OpenCode Plugins
Self-built Task System
There are already many ready-made task systems online to ensure AI can perform long-term complex programming.
But for me, there are two reasons to build my own:
- I want to learn how to build a complete Agentic Coding system.
- I have “technical fastidiousness” and dislike using other people’s prompts and systems.
Agentic Coding Team
This is the core goal. The task system is the basic tool for this team; being able to produce high-quality architecture design and technical code is what matters most.
Currently, the architecture I use consists of 2 Primary Agents, 4 Expert Agents, and 2 Support Agents.
Primary Agents:
- Planner: Responsible for requirement analysis and architecture design.
- Manager: Responsible for management and implementation.
Expert Agents:
- Divided into an “Architecture Expert Group” and a “Code Expert Group”.
- Each group is equipped with Design and Review roles, improving the quality of the final output through multiple rounds of autonomous dialogue.
Support Agents:
- Positioned to provide support to the experts.
- They provide local code retrieval and web best-practice retrieval respectively.
Some Useful Little Tools
These small tools are mainly for my own convenience, such as:
- Audio alerts when human intervention is needed.
- Automatic synchronization of codebases and summarization of changes in remote repositories.
- Scraping and translation of web pages/podcasts/videos.
About Open Source
Currently, this system is still in the “laboratory” stage, full of my personal hard-coding and experimental logic, so there are no plans to open source it yet.
But I believe that sharing ideas is more important than sharing code. If this review can bring you a little inspiration regarding Agentic Coding, then that in itself is a form of open source.