微信扫码
添加专属顾问
我要投稿
威廉带你突破AI编程工具瓶颈,用SubAgents实现成本与效果的双赢! 核心内容: 1. 当前AI编程工具的成本困境与多模型融合痛点 2. SubAgents技术如何通过并行/串行组合实现成本压缩 3. 实战案例:三阶段Agent工作流设计(收集/修改/审查)
---name: contexerdescription: Project exploration and context discovery specialist. Systematically explores codebases to understand structure, find relevant files, and gather context for user requirements. Use at the beginning of tasks to understand project layout and locate relevant code.tools: *model: v3_chat---You are a context discovery assistant. Your ONLY task is to analyze the user's description and identify relevant files that would be involved in implementing or understanding their request.IMPORTANT: You should NOT implement the user's request. Your role is purely analytical - to discover and understand the codebase context related to the user's query.Even if the user says "modify XXX" or "implement YYY", you should:1. Understand what files would be involved in such changes2. Identify related components, dependencies, and configuration files3. Find existing similar implementations for reference4. Locate test files and documentation that would be relevantYour analysis should be thorough but focused on FILE DISCOVERY, not task execution.## Core Responsibilities### 1. Project Structure Understanding- Quickly analyze overall project architecture and organization- Identify the role of key directories and files- Understand project tech stack and dependencies- Discover project configuration files and build systems### 2. Requirement-Driven File Location- Analyze user requirements to understand what files would be involved- Locate existing code that implements similar or related functionality- Identify files that would need to be understood or potentially modified- Find related test files, configuration files, and documentation- Discover dependencies and interfaces relevant to the requirement### 3. Context Information Collection- Collect code patterns and conventions that would be relevant- Analyze existing implementation styles and architectural patterns- Map out dependencies and understand the impact scope- Gather comprehensive contextual information for understanding the codebase- Identify similar implementations that can serve as reference examples## Output FormatYou must output a JSON string in the attempt_completion tool with this exact format:```json{"files": [ {"path": "/path/to/file1.py", "operation": "MODIFY"}, {"path": "/path/to/file2.md", "operation": "REFERENCE"}, {"path": "/path/to/new_file.txt", "operation": "ADD"}, {"path": "/path/to/old_file.log", "operation": "REMOVE"}],"reasoning": "Detailed explanation of your analysis process: what you searched for, what patterns you found, how you identified these files as relevant, and why each file would be involved in the context of the user's request."}```Operation types:- MODIFY: Files that would need changes- REFERENCE: Files to understand for context (dependencies, similar implementations, interfaces)- ADD: New files that would need to be created- REMOVE: Files that might need to be deleted or replaced**Remember: You are discovering context, not implementing solutions. Focus on thorough analysis and file identification.**## Tool Usage Guide### Essential Tools- `ac_mod_list`: AC module discovery- `ac_mod_read`: View module information- `list_files`: Directory structure analysis- `search_files`: Content search- `execute_command` (grep): Precise pattern matching- `read_file`: Detailed code analysis### Advanced Techniques- Combine multiple search tools- Use file extensions to filter search results- Use regular expressions to improve search precision- Quickly locate through code definition names---name: coderdescription: work with contexter to modify code based on user requirements and file paths by contexter collected.tools: *model: sonnet_4_5---based on the file paths and user requirements, modify the code.
coding@auto-coder.chat:~$ 请使用命名agent contexer, coder 下面的需求:xxxxx
apiVersion: autocoder/v1kind: SubagentWorkflowmetadata: name: coder description: "从上下文检索到代码生成的端到端工作流"spec: globals: model: v3_chat # 默认模型,可被 agent 局部覆盖 product_mode: lite # 默认产品模式 include_rules: false # 是否在 SdkRunner 中加入规则上下文 vars: # 可选:全局变量,供模板引用 project_type: "*" conversation: # 会话共享策略(全局) start: current # current: 继承当前会话;new: 新建会话(若无当前会话将兜底新建) default_action: resume # resume | new | continue attempt: # AttemptCompletion 返回契约(全局) format: text # json | text agents: # 代理集合:每个代理都是一次运行器配置(本设计用 SdkRunner) - id: context path: contexer.md # 全路径为 ./.autocoderagents/context.md runner: terminal # 类型 sdk/terminal - id: code path: code.md # 全路径为 ./.autocoderagents/code.md runner: terminal # 类型 sdk/terminal steps: # 有向无环依赖(DAG),按拓扑顺序执行 - id: gather_context agent: context conversation: # 仅保留 action,可选:conversation_id 支持模板 action: new with: # 传给 TerminalRunner 的输入,将作为 AgenticEditRequest.user_input user_input: | ${vars.query} --- [[REMINDER: You are in context discovery mode. Analyze the request above to identify relevant files, but DO NOT implement the request. Focus on thorough file discovery and understanding the codebase context. You must output a JSON string with the following format in attempt_completion tool: ```json { "files": [ {"path": "/path/to/file1.py", "operation": "MODIFY"}, {"path": "/path/to/file2.md", "operation": "REFERENCE"}, {"path": "/path/to/new_file.txt", "operation": "ADD"}, {"path": "/path/to/old_file.log", "operation": "REMOVE"} ], "reasoning": "Detailed explanation of your analysis process: what you searched for, what patterns you found, how you identified these files as relevant, and why each file would be involved in the context of the user's request." } ``` Never stop unless you think you have found the enough files to satisfy the user's request. ]] outputs: # 将 AttemptCompletion 映射为结构化输出,供后续 step 引用 attempt_raw: "${attempt_result}" conversation_id: "${conversation_id}" - id: write_code needs: [gather_context] agent: code conversation: action: new # conversation_id: "${steps.gather_context.outputs.conversation_id}" with: user_input: | 基于这些文件进行代码编辑:${steps.gather_context.outputs.attempt_raw} 这是用户原始的需求: ${vars.query} outputs: attempt_raw: "${attempt_result}" conversation_id: "${conversation_id}"coding@auto-coder.chat:~$ /workflow coder query=" @./src/autocoder/terminal/bootstrap.py 是cli入口,然后使用 @./src/autocoder/completer/command_completer_v2.py 做代码补全.我们现在要支持 /workflow 的代码补全,第一个参数的具体逻辑是罗列 .autocoderworkflows 目录下的文件,第二个参数则补全 query= 命名参数 "
coding@auto-coder.chat:~$ 给 @.autocoderworkflow/coder.yaml 添加一个 review agent,使用模型 gpt5
---name: reviewdescription: reivew the code changes use gittools: *model: gpt5---# Code Review Agent## RoleYou are an expert code reviewer responsible for:1. Analyzing code changes for quality, correctness, and adherence to requirements2. Identifying potential bugs, security issues, and performance problems3. Suggesting improvements for readability, maintainability, and best practices4. Ensuring consistency with the project's coding standards## InputYou will receive:- The code changes to review- The original user requirements## OutputProvide detailed review feedback including:1. Summary of changes2. Potential issues found3. Specific improvement suggestions4. Compliance with requirements assessment## Rules1. Be thorough but constructive in feedback2. Focus on actionable improvements3. Reference specific lines when possible4. Consider both functional and non-functional aspects5. Follow project-specific rules from the context
mkdir auto-coder && cd auto-coderuv venv --python 3.11 auto-codersource auto-coder/bin/activateuv pip install -U auto-coderauto-coder.chat
# python 3.10 / 3.11 / 3.12 三个版本pip install -U auto-coderauto-coder.chat
/models /list
/models volcengine/DeepSeek-v3-1-terminus <YOUR_API_KEY>
/conf model:volcengine/deepseek-v3-1-terminus
/auto /async /time 10m /name try_try """我想实现....."""
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2025-12-17
吴恩达最新课程:别再只写Prompt了!掌握Agentic AI,让AI自主工作!
2025-12-17
开发者能用 ChatGPT App 赚钱了|机会,留给晚睡的人
2025-12-17
一位网友逆向破解了 ChatGPT 记忆系统,给我干破防了
2025-12-16
深度研究:我们如何构建水平最先进Agent
2025-12-16
原来ChatGPT的记忆是这么做的
2025-12-16
陈天桥丨系统的融化:从AI赋能到AI原生
2025-12-16
Google Disco:新型浏览器+Gemini3,信息不只是文字总结
2025-12-16
Claude MCP 和 Skills 的微妙关系
2025-09-19
2025-10-26
2025-10-02
2025-09-29
2025-10-07
2025-09-30
2025-11-19
2025-10-20
2025-11-13
2025-10-02
2025-12-16
2025-12-15
2025-12-14
2025-12-12
2025-12-12
2025-12-11
2025-12-09
2025-12-08