Appendix G - Coding Agents¶
附录 G:编程智能体
Vibe Coding: A Starting Point¶
Vibe Coding:起点¶
"Vibe coding" has become a powerful technique for rapid innovation and creative exploration. This practice involves using LLMs to generate initial drafts, outline complex logic, or build quick prototypes, significantly reducing initial friction. It is invaluable for overcoming the "blank page" problem, enabling developers to quickly transition from a vague concept to tangible, runnable code. Vibe coding is particularly effective when exploring unfamiliar APIs or testing novel architectural patterns, as it bypasses the immediate need for perfect implementation. The generated code often acts as a creative catalyst, providing a foundation for developers to critique, refactor, and expand upon. Its primary strength lies in its ability to accelerate the initial discovery and ideation phases of the software lifecycle. However, while vibe coding excels at brainstorming, developing robust, scalable, and maintainable software demands a more structured approach, shifting from pure generation to a collaborative partnership with specialized coding agents.
“Vibe Coding”可以视为一种高效的探索式实践:借助 LLM 快速生成初稿、梳理复杂逻辑或搭建可运行原型,从而显著降低冷启动成本。面对空白文件时,它尤其有效,因为模糊想法可以迅速转化为可执行草稿。无论是摸索陌生 API 还是尝试新架构,这种方式都能帮助开发者先把握整体轮廓,再决定哪些部分值得精修。生成结果更像一种催化剂,供开发者批判、重构与扩展;其优势主要体现在软件生命周期前期的探索与发散阶段。若要交付健壮、可扩展且可长期维护的系统,则仍需更结构化的工程方法,将“随手生成”升级为与专职编程智能体的分工协作。
Agents as Team Members¶
智能体作为团队成员¶
While the initial wave focused on raw code generation—the "vibe code" perfect for ideation—the industry is now shifting towards a more integrated and powerful paradigm for production work. The most effective development teams are not merely delegating tasks to Agent; they are augmenting themselves with a suite of sophisticated coding agents. These agents act as tireless, specialized team members, amplifying human creativity and dramatically increasing a team's scalability and velocity.
第一波热度主要集中在“生成代码”本身,也就是偏重头脑风暴的 “vibe code”;而如今产业界更关注的是如何将智能体真正嵌入交付链路。顶尖团队很少只依赖单个 Agent,而是将多种编程智能体组合成完整工具体系:它们像不知疲倦的专业角色,能够放大个体创造力,也让小团队具备过去需要更大编制才能维持的迭代速度。
This evolution is reflected in statements from industry leaders. In early 2025, Alphabet CEO Sundar Pichai noted that at Google, "over 30% of new code is now assisted or generated by our Gemini models, fundamentally changing our development velocity. Microsoft made a similar claim. This industry-wide shift signals that the true frontier is not replacing developers, but empowering them. The goal is an augmented relationship where humans guide the architectural vision and creative problem-solving, while agents handle specialized, scalable tasks like testing, documentation, and review.
产业领袖的公开表态也印证了这股趋势。2025 年初,Alphabet CEO Sundar Pichai 表示,在 Google,「超过 30% 的新代码已由 Gemini 系列模型辅助或生成,从根本上改变了研发节奏。」微软高层也给出了类似判断。行业共识正逐渐清晰:下一阶段的重点并非替代工程师,而是放大工程师的能力,由人主导架构与创造性问题拆解,智能体承接测试、文档、代码评审等可规模化复制的专业工作。
This chapter presents a framework for organizing a human-agent team based on the core philosophy that human developers act as creative leads and architects, while AI agents function as force multipliers. This framework rests upon three foundational principles:
本章提出组织人机协作团队的框架:人类开发者主导创意与架构,智能体作为执行力放大器。其基础可归纳为三条原则:
- Human-Led Orchestration: The developer is the team lead and project architect. They are always in the loop, orchestrating the workflow, setting the high-level goals, and making the final decisions. The agents are powerful, but they are supportive collaborators. The developer directs which agent to engage, provides the necessary context, and, most importantly, exercises the final judgment on any Agent-generated output, ensuring it aligns with the project's quality standards and long-term vision.
- The Primacy of Context: An agent's performance is entirely dependent on the quality and completeness of its context. A powerful LLM with poor context is useless. Therefore, our framework prioritizes a meticulous, human-led approach to context curation. Automated, black-box context retrieval is avoided. The developer is responsible for assembling the perfect "briefing" for their Agent team member. This includes:
- The Complete Codebase: Providing all relevant source code so the agent understands the existing patterns and logic.
- External Knowledge: Supplying specific documentation, API definitions, or design documents.
- The Human Brief: Articulating clear goals, requirements, pull request descriptions, and style guides.
- Direct Model Access: To achieve state-of-the-art results, the agents must be powered by direct access to frontier models (e.g., Gemini 2.5 PRO, Claude Opus 4, OpenAI, DeepSeek, etc). Using less powerful models or routing requests through intermediary platforms that obscure or truncate context will degrade performance. The framework is built on creating the purest possible dialogue between the human lead and the raw capabilities of the underlying model, ensuring each agent operates at its peak potential.
- 人类主导的编排: 开发者担任技术负责人与架构师,始终参与目标拆解、优先级排序与最终拍板。智能体再强亦为协作者:由你选择调用何种智能体、提供何种上下文,并对全部产出保留否决权。
- 语境质量决定上限: 模型能力再强,若上下文缺失或失真,也难以发挥作用。应优先采用由人策展的透明上下文,而非盲目依赖黑盒式自动检索:
- 相关代码: 让模型看到真实模式,而不是猜。
- 外部资料: 官方文档、OpenAPI、设计稿一并附上。
- 任务说明: 目标、验收标准、PR 模板、代码风格写清楚。
- 直连前沿模型: 追求最佳效果时,应使智能体直接调用 Gemini 2.5 PRO、Claude Opus 4、OpenAI、DeepSeek 等前沿模型;较弱模型或经中间层截断、模糊化的上下文均会削弱表现。目标是缩短并净化“人—模型”之间的交互链路。
The framework is structured as a team of specialized agents, each designed for a core function in the development lifecycle. The human developer acts as the central orchestrator, delegating tasks and integrating the results.
实践中,可将开发生命周期映射为若干专职角色,由人类负责编排任务并整合交付物。
Core Components¶
核心组件¶
To effectively leverage a frontier Large Language Model, this framework assigns distinct development roles to a team of specialized agents. These agents are not separate applications but are conceptual personas invoked within the LLM through carefully crafted, role-specific prompts and contexts. This approach ensures that the model's vast capabilities are precisely focused on the task at hand, from writing initial code to performing a nuanced, critical review.
所谓专职智能体并非独立应用,而是在同一 LLM 中通过差异化提示与上下文切分出的工作角色,从而将模型的通用能力暂时收敛为编码、测试或评审等更窄的专业能力。
The Orchestrator: The Human Developer: In this collaborative framework, the human developer acts as the Orchestrator, serving as the central intelligence and ultimate authority over the AI agents.
编排者:人类开发者 —— 最终决策者与责任人,对智能体输出承担全部后果。
- Role: Team Lead, Architect, and final decision-maker. The orchestrator defines tasks, prepares the context, and validates all work done by the agents.
- Interface: The developer's own terminal, editor, and the native web UI of the chosen Agents.
- 职责: 制定目标、准备上下文并验收智能体交付物。
- 工作环境: 终端、编辑器及各智能体产品的原生 Web 界面。
The Context Staging Area: As the foundation for any successful agent interaction, the Context Staging Area is where the human developer meticulously prepares a complete and task-specific briefing.
上下文暂存区: 在分派任务前集中准备与该任务相关的全部材料的工作区。
- Role: A dedicated workspace for each task, ensuring agents receive a complete and accurate briefing.
- Implementation: A temporary directory (task-context/) containing markdown files for goals, code files, and relevant docs
- 作用: 为每项任务提供独立空间,避免上下文混淆。
- 实现: 通常使用临时目录
task-context/,存放简报、相关源码与参考文档。
The Specialist Agents: By using targeted prompts, we can build a team of specialist agents, each tailored for a specific development task.
专职智能体: 通过调整提示即可切换角色;以下为常见分工示例。
- The Scaffolder Agent: The Implementer
- Purpose: Writes new code, implements features, or creates boilerplate based on detailed specifications.
- Invocation Prompt: "You are a senior software engineer. Based on the requirements in 01_BRIEF.md and the existing patterns in 02_CODE/, implement the feature..."
- The Test Engineer Agent: The Quality Guard
- Purpose: Writes comprehensive unit tests, integration tests, and end-to-end tests for new or existing code.
- Invocation Prompt: "You are a quality assurance engineer. For the code provided in 02_CODE/, write a full suite of unit tests using [Testing Framework, e.g., pytest]. Cover all edge cases and adhere to the project's testing philosophy."
- The Documenter Agent: The Scribe
- Purpose: Generates clear, concise documentation for functions, classes, APIs, or entire codebases.
- Invocation Prompt: "You are a technical writer. Generate markdown documentation for the API endpoints defined in the provided code. Include request/response examples and explain each parameter."
- The Optimizer Agent: The Refactoring Partner
- Purpose: Proposes performance optimizations and code refactoring to improve readability, maintainability, and efficiency.
- Invocation Prompt: "Analyze the provided code for performance bottlenecks or areas that could be refactored for clarity. Propose specific changes with explanations for why they are an improvement."
- The Process Agent: The Code Supervisor
- Critique: The agent performs an initial pass, identifying potential bugs, style violations, and logical flaws, much like a static analysis tool.
- Reflection: The agent then analyzes its own critique. It synthesizes the findings, prioritizes the most critical issues, dismisses pedantic or low-impact suggestions, and provides a high-level, actionable summary for the human developer.
- Invocation Prompt: "You are a principal engineer conducting a code review. First, perform a detailed critique of the changes. Second, reflect on your critique to provide a concise, prioritized summary of the most important feedback."
- 脚手架智能体:实现者
- 用途: 依据规格编写新功能或搭建基础结构。
- 调用提示: "You are a senior software engineer. Based on the requirements in 01_BRIEF.md and the existing patterns in 02_CODE/, implement the feature..."
- 测试工程师智能体
- 用途: 编写单元、集成与端到端测试。
- 调用提示: "You are a quality assurance engineer. For the code provided in 02_CODE/, write a full suite of unit tests using [Testing Framework, e.g., pytest]. Cover all edge cases and adhere to the project's testing philosophy."
- 文档智能体
- 用途: 为函数、类、API 或整个仓库撰写说明文档。
- 调用提示: "You are a technical writer. Generate markdown documentation for the API endpoints defined in the provided code. Include request/response examples and explain each parameter."
- 优化智能体:重构伙伴
- 用途: 识别性能瓶颈与可读性问题,提出可执行的改进方案。
- 调用提示: "Analyze the provided code for performance bottlenecks or areas that could be refactored for clarity. Propose specific changes with explanations for why they are an improvement."
- 流程智能体:代码督导
- 批评: 先做广谱扫描,列出潜在缺陷、风格问题与逻辑风险。
- 反思: 再对批评本身去冗存精:合并重复项、剔除低影响建议,仅保留高优先级、可执行结论。
- 调用提示: "You are a principal engineer conducting a code review. First, perform a detailed critique of the changes. Second, reflect on your critique to provide a concise, prioritized summary of the most important feedback."
Ultimately, this human-led model creates a powerful synergy between the developer's strategic direction and the agents' tactical execution. As a result, developers can transcend routine tasks, focusing their expertise on the creative and architectural challenges that deliver the most value.
归根结底,只有由人把握方向与验收标准、由智能体承担战术执行,团队才能将更多精力投入真正高价值的架构设计与创新工作。
Practical Implementation¶
实践落地¶
Setup Checklist¶
设置清单¶
To effectively implement the human-agent team framework, the following setup is recommended, focusing on maintaining control while improving efficiency.
要落地上述流程,建议先完成以下四项基础配置,在可控前提下提升效率。
- Provision Access to Frontier Models Secure API keys for at least two leading large language models, such as Gemini 2.5 Pro and Claude 4 Opus. This dual-provider approach allows for comparative analysis and hedges against single-platform limitations or downtime. These credentials should be managed securely as you would any other production secret.
- Implement a Local Context Orchestrator Instead of ad-hoc scripts, use a lightweight CLI tool or a local agent runner to manage context. These tools should allow you to define a simple configuration file (e.g., context.toml) in your project root that specifies which files, directories, or even URLs to compile into a single payload for the LLM prompt. This ensures you retain full, transparent control over what the model sees on every request.
- Establish a Version-Controlled Prompt Library Create a dedicated /prompts directory within your project's Git repository. In it, store the invocation prompts for each specialist agent (e.g., reviewer.md, documenter.md, tester.md) as markdown files. Treating your prompts as code allows the entire team to collaborate on, refine, and version the instructions given to your AI agents over time.
- Integrate Agent Workflows with Git Hooks Automate your review rhythm by using local Git hooks. For instance, a pre-commit hook can be configured to automatically trigger the Reviewer Agent on your staged changes. The agent's critique-and-reflection summary can be presented directly in your terminal, providing immediate feedback before you finalize the commit and baking the quality assurance step directly into your development process.
- 双模型接入: 至少配置两家领先模型(如 Gemini 2.5 Pro 与 Claude 4 Opus),便于对比效果并降低单平台风险;API 密钥按生产密钥标准保管。
- 本地上下文编排: 使用轻量 CLI 或本地 runner,在仓库根通过
context.toml等清单声明每次请求需打包的文件、目录或 URL,使模型所见内容可审计、可复现。- 提示纳入版本控制: 在仓库中维护
/prompts,将 reviewer、documenter、tester 等系统提示存为 Markdown,与业务代码同步迭代。- 结合 Git Hooks: 例如在 pre-commit 阶段触发 Reviewer Agent,将 critique 与 reflection 摘要输出到终端,在提交前增加一道自动评审环节。

Fig. 1: Coding Specialist Examples
图 1:编程专职智能体示例
Principles for Leading the Augmented Team¶
领导增强型团队的原则¶
Successfully leading this framework requires evolving from a sole contributor into the lead of a human-AI team, guided by the following principles:
从个人贡献者转为人机协作团队的负责人时,建议遵循以下四条:
- Maintain Architectural Ownership Your role is to set the strategic direction and own the high-level architecture. You define the "what" and the "why," using the agent team to accelerate the "how." You are the final arbiter of design, ensuring every component aligns with the project's long-term vision and quality standards.
- Master the Art of the Brief The quality of an agent's output is a direct reflection of the quality of its input. Master the art of the brief by providing clear, unambiguous, and comprehensive context for every task. Think of your prompt not as a simple command, but as a complete briefing package for a new, highly capable team member.
- Act as the Ultimate Quality Gate An agent's output is always a proposal, never a command. Treat the Reviewer Agent's feedback as a powerful signal, but you are the ultimate quality gate. Apply your domain expertise and project-specific knowledge to validate, challenge, and approve all changes, acting as the final guardian of the codebase's integrity.
- Engage in Iterative Dialogue The best results emerge from conversation, not monologue. If an agent's initial output is imperfect, don't discard it—refine it. Provide corrective feedback, add clarifying context, and prompt for another attempt. This iterative dialogue is crucial, especially with the Reviewer Agent, whose "Reflection" output is designed to be the start of a collaborative discussion, not just a final report.
- 保持架构所有权: 明确阐述目标与动机(why/what),将实现路径(how)交由智能体加速探索;架构与设计取舍须由你最终确认。
- 把提示当作完整简报: 输入越接近“向资深同事交接任务”的粒度,输出越稳定。
- 智能体产出需复核: 模型与 Reviewer 的输出均属建议;是否合入代码库应由你结合领域知识独立判断。
- 坚持迭代对话: 初稿不理想时,补充上下文并再次提示即可;Reviewer 的 Reflection 旨在开启讨论,而非一次性结论。
Conclusion¶
结语¶
The future of code development has arrived, and it is augmented. The era of the lone coder has given way to a new paradigm where developers lead teams of specialized AI agents. This model doesn't diminish the human role; it elevates it by automating routine tasks, scaling individual impact, and achieving a development velocity previously unimaginable.
软件开发已进入“增强”阶段:由开发者带领多角色智能体协同完成交付。人的价值并未被削弱;相反,随着例行工作被自动化,个人影响力与迭代节奏反而显著提升。
By offloading tactical execution to Agents, developers can now dedicate their cognitive energy to what truly matters: strategic innovation, resilient architectural design, and the creative problem-solving required to build products that delight users. The fundamental relationship has been redefined; it is no longer a contest of human versus machine, but a partnership between human ingenuity and AI, working as a single, seamlessly integrated team.
当战术性实现交由智能体处理后,人类便能将更多注意力投入战略创新、韧性架构与用户体验等更高阶问题。人与 AI 的关系也将由对立竞争转向互补协作。
References¶
参考文献:以下条目保留英文与原始链接,不作逐条翻译。
- AI is responsible for generating more than 30% of the code at Google https://www.reddit.com/r/singularity/comments/1k7rxo0/ai_is_now_writing_well_over_30_of_the_code_at/
- AI is responsible for generating more than 30% of the code at Microsoft https://www.businesstoday.in/tech-today/news/story/30-of-microsofts-code-is-now-ai-generated-says-ceo-satya-nadella-474167-2025-04-30