微信扫码
添加专属顾问
我要投稿
威廉带你突破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 下面的需求:xxxxxapiVersion: autocoder/v1kind: SubagentWorkflowmetadata:name: coderdescription: "从上下文检索到代码生成的端到端工作流"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 | continueattempt: # AttemptCompletion 返回契约(全局)format: text # json | textagents: # 代理集合:每个代理都是一次运行器配置(本设计用 SdkRunner)- id: contextpath: contexer.md # 全路径为 ./.autocoderagents/context.mdrunner: terminal # 类型 sdk/terminal- id: codepath: code.md # 全路径为 ./.autocoderagents/code.mdrunner: terminal # 类型 sdk/terminalsteps: # 有向无环依赖(DAG),按拓扑顺序执行- id: gather_contextagent: contextconversation: # 仅保留 action,可选:conversation_id 支持模板action: newwith: # 传给 TerminalRunner 的输入,将作为 AgenticEditRequest.user_inputuser_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_codeneeds: [gather_context]agent: codeconversation: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-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
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-11-01
谷歌又出神器:只要给个网址,自动帮你出官网同款设计!
2025-11-01
让你的大模型读懂二方包
2025-11-01
Codex 积分制计费上线,Claude Code 急了……
2025-11-01
AI心理咨询师新突破:TheraMind引领长期治疗新范式及知识增强AI应用探讨
2025-11-01
基于本地LLM构建AI驱动的日志分析系统
2025-11-01
从“更大”到“更聪明”:蚂蚁集团推出 Ling 2.0,大模型推理进入“稀疏智能时代”
2025-10-31
Opera One升级内置AI 迎来智能助手新纪元
2025-10-31
LangExtract——大模型文本提炼工具
2025-08-21
2025-08-21
2025-08-19
2025-09-16
2025-10-02
2025-09-08
2025-09-17
2025-08-19
2025-09-29
2025-08-20