Loading...
Loading...
Compare original and translation side by side
filter-investigatoroutput-researcherfilter-investigatoroutput-researcherTeamCreateTaskCreategeneral-purposeTaskteam_nameSendMessageTeamCreateTaskCreateteam_nameTaskgeneral-purposeSendMessageUse subagents (tool) to keep your context focused. Spawn subagents for:Task
- Exploring specific files, modules, or subsystems
- Searching through git history, logs, or large codebases
- Any research tangent that might not pan out
Each subagent should report back:
- Relevant findings — what it discovered that matters to your investigation
- Red herrings (1-2 sentences) — anything that looks related but isn't, and why. Calling these out early prevents wasted cycles re-exploring dead ends.
Report red herrings even when your main findings are conclusive — they prevent other agents from re-exploring the same dead ends.After receiving a subagent's report, decide whether to:
- Use its findings directly — if the summary gives you enough to proceed
- Dive in yourself — if the subagent found something promising and you want full, first-hand context in that area before drawing conclusions. Examples: conflicting evidence that needs direct examination, low confidence in the subagent's assessment, or complex state/flow where first-hand context matters.
When choosing subagent types, prefer read-only or exploration-focused types for open-ended codebase searches, and full-capability types for targeted analysis that needs deeper tool access.
使用子Agent(工具)保持你的上下文聚焦。 在以下场景生成子Agent:Task
- 探索特定文件、模块或子系统
- 搜索git历史、日志或大型代码库
- 任何可能没有结果的研究分支
每个子Agent应返回以下内容:
- 相关发现——与你的调查相关的重要发现
- 干扰项(1-2句话)——看似相关但实际无关的内容,以及原因。尽早指出这些内容可避免重复探索无效路径。
即使你的主要发现是确定的,也要报告干扰项——这能防止其他Agent重复探索相同的无效路径。收到子Agent的报告后,决定:
- 直接使用其发现——如果摘要足够支撑你继续推进
- 亲自深入研究——如果子Agent发现了有前景的内容,且你需要该领域的完整一手上下文才能得出结论。例如:需要直接检查的矛盾证据、对子Agent评估的低信心、或需要一手上下文的复杂状态/流程。
选择子Agent类型时,针对开放式代码库搜索优先选择只读或探索型类型,针对需要更深工具访问的定向分析选择全功能类型。
undefinedundefinedundefinedundefinedSendMessageTaskUpdateSendMessageTaskUpdateUse subagents to keep your main context focused on implementation logic. Spawn subagents for:
- Repetitive edits — similar changes across many files (updating imports, renaming across test files, applying a pattern to multiple modules)
- Impact analysis — finding all callers of a function before changing its signature, checking all consumers of an API
- Exploratory reading — checking whether a module's assumptions break with your change, verifying edge cases in adjacent code
- Background test runs — running tests while you continue working on the next change
使用子Agent让你的主要上下文聚焦于实施逻辑。 在以下场景生成子Agent:
- 重复编辑——跨多个文件的相似变更(更新导入、跨测试文件重命名、对多个模块应用相同模式)
- 影响分析——修改函数签名前查找所有调用者,检查API的所有消费者
- 探索性阅读——检查模块的假设是否会因你的变更而失效,验证相邻代码的边缘情况
- 后台测试运行——在你继续处理下一个变更时运行测试
general-purposevalidatorSendMessagegeneral-purposevalidatorSendMessagegit add .git add .