research
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResearch Skill
Research Skill
Quick Ref: Deep codebase exploration with multi-angle analysis. Output:.agents/research/*.md
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
CLI dependencies: ao (knowledge injection — optional). If ao is unavailable, skip prior knowledge search and proceed with direct codebase exploration.
速查参考: 多维度分析的深度代码库探索。输出文件:.agents/research/*.md
你必须执行此工作流,而非仅描述它。
CLI依赖: ao(知识注入——可选)。如果ao不可用,跳过前置知识搜索,直接进行代码库探索。
Execution Steps
执行步骤
Given :
/research <topic>当输入时:
/research <topic>Step 1: Create Output Directory
步骤1:创建输出目录
bash
mkdir -p .agents/researchbash
mkdir -p .agents/researchStep 2: Check Prior Art
步骤2:检查已有成果
First, search and inject existing knowledge (if ao available):
bash
undefined首先,搜索并注入现有知识(若ao可用):
bash
undefinedSearch knowledge base for relevant learnings, patterns, and prior research
搜索知识库,查找相关研究成果、模式和过往研究
ao search "<topic>" 2>/dev/null || echo "ao not available, skipping knowledge search"
ao search "<topic>" 2>/dev/null || echo "ao not available, skipping knowledge search"
Inject relevant context into this session
将相关上下文注入当前会话
ao inject "<topic>" 2>/dev/null || echo "ao not available, skipping knowledge injection"
**Review ao search results:** If ao returns relevant learnings or patterns, incorporate them into your research strategy. Look for:
- Prior research on this topic or related topics
- Known patterns or anti-patterns
- Lessons learned from similar investigations
**Search local research artifacts:**
```bash
ls -la .agents/research/ 2>/dev/null | grep -i "<topic>" || echo "No prior research found"Also use Grep to search for related content. Check TEMPERED learnings:
.agents/bash
ls -la .agents/learnings/ .agents/patterns/ 2>/dev/null | head -10ao inject "<topic>" 2>/dev/null || echo "ao not available, skipping knowledge injection"
**查看ao搜索结果:** 如果ao返回相关研究成果或模式,将其纳入你的研究策略。重点关注:
- 该主题或相关主题的过往研究
- 已知的模式或反模式
- 类似调查中获得的经验教训
**搜索本地研究工件:**
```bash
ls -la .agents/research/ 2>/dev/null | grep -i "<topic>" || echo "No prior research found"同时使用Grep搜索目录下的相关内容。检查TEMPERED研究成果:
.agents/bash
ls -la .agents/learnings/ .agents/patterns/ 2>/dev/null | head -10Step 3: Launch Explore Agent
步骤3:启动Explore Agent
YOU MUST USE THE TASK TOOL NOW. Call it with these exact parameters:
Tool: Task
Parameters:
subagent_type: "Explore"
description: "Research: <topic>"
prompt: |
Thoroughly investigate: <topic>
Search strategy:
1. Glob for relevant files (*.md, *.py, *.ts, *.go, etc.)
2. Grep for keywords related to <topic>
3. Read key files and understand the architecture
4. Check docs/ and .agents/ for existing documentation
Return a detailed report with:
- Key files found (with paths)
- How the system works
- Important patterns or conventions
- Any issues or concerns
Cite specific file:line references for all claims.你现在必须使用Task工具。 调用时使用以下精确参数:
Tool: Task
Parameters:
subagent_type: "Explore"
description: "Research: <topic>"
prompt: |
彻底调查:<topic>
搜索策略:
1. 匹配相关文件(*.md, *.py, *.ts, *.go等)
2. 使用Grep搜索与<topic>相关的关键词
3. 阅读关键文件并理解架构
4. 检查docs/和.agents/目录下的现有文档
返回一份详细报告,包含:
- 找到的关键文件(含路径)
- 系统工作原理
- 重要模式或约定
- 任何问题或关注点
所有结论都需标注`file:line`引用。Step 4: Validate Research Quality (Optional)
步骤4:验证研究质量(可选)
For thorough research, perform quality validation:
若要进行全面研究,执行质量验证:
4a. Coverage Validation
4a. 覆盖范围验证
Check: Did we look everywhere we should? Any unexplored areas?
- List directories/files explored
- Identify gaps in coverage
- Note areas that need deeper investigation
检查:我们是否查看了所有应检查的内容?是否有未探索的领域?
- 列出已探索的目录/文件
- 识别覆盖范围的缺口
- 标注需要深入调查的领域
4b. Depth Validation
4b. 深度验证
Check: Do we UNDERSTAND the critical parts? HOW and WHY, not just WHAT?
- Rate depth (0-4) for each critical area
- Flag areas with shallow understanding
- Identify what needs more investigation
检查:我们是否理解了关键部分?不仅要知道是什么,还要知道如何运作以及为什么?
- 为每个关键领域的深度评分(0-4分)
- 标记理解较浅的领域
- 识别需要进一步调查的内容
4c. Gap Identification
4c. 缺口识别
Check: What DON'T we know that we SHOULD know?
- List critical gaps
- Prioritize what must be filled before proceeding
- Note what can be deferred
检查:有哪些我们应该知道但不知道的内容?
- 列出关键知识缺口
- 优先排序必须填补的缺口,再继续后续工作
- 标注可延后处理的内容
4d. Assumption Challenge
4d. 假设验证
Check: What assumptions are we building on? Are they verified?
- List assumptions made
- Flag high-risk unverified assumptions
- Note what needs verification
检查:我们基于哪些假设?这些假设是否已验证?
- 列出已做出的假设
- 标记高风险未验证假设
- 标注需要验证的内容
Step 5: Synthesize Findings
步骤5:整合研究结果
After the Explore agent and validation swarm return, write findings to:
.agents/research/YYYY-MM-DD-<topic-slug>.mdUse this format:
markdown
undefined在Explore Agent和验证集群返回结果后,将研究结果写入:
.agents/research/YYYY-MM-DD-<topic-slug>.md使用以下格式:
markdown
undefinedResearch: <Topic>
Research: <Topic>
Date: YYYY-MM-DD
Scope: <what was investigated>
日期: YYYY-MM-DD
范围: <调查内容>
Summary
摘要
<2-3 sentence overview>
<2-3句话的概述>
Key Files
关键文件
| File | Purpose |
|---|---|
| path/to/file.py | Description |
| 文件 | 用途 |
|---|---|
| path/to/file.py | 描述 |
Findings
研究结果
<detailed findings with file:line citations>
<详细研究结果,含file:line引用>
Recommendations
建议
<next steps or actions>
```
<后续步骤或行动>
undefinedStep 6: Request Human Approval (Gate 1)
步骤6:请求人工批准(关卡1)
USE AskUserQuestion tool:
Tool: AskUserQuestion
Parameters:
questions:
- question: "Research complete. Approve to proceed to planning?"
header: "Gate 1"
options:
- label: "Approve"
description: "Research is sufficient, proceed to /plan"
- label: "Revise"
description: "Need deeper research on specific areas"
- label: "Abandon"
description: "Stop this line of investigation"
multiSelect: falseWait for approval before reporting completion.
使用AskUserQuestion工具:
Tool: AskUserQuestion
Parameters:
questions:
- question: "Research complete. Approve to proceed to planning?"
header: "Gate 1"
options:
- label: "Approve"
description: "Research is sufficient, proceed to /plan"
- label: "Revise"
description: "Need deeper research on specific areas"
- label: "Abandon"
description: "Stop this line of investigation"
multiSelect: false在获得批准前,不要报告完成。
Step 7: Report to User
步骤7:向用户报告
Tell the user:
- What you found
- Where the research doc is saved
- Gate 1 approval status
- Next step: to create implementation plan
/plan
告知用户:
- 你发现了什么
- 研究文档的保存位置
- 关卡1的批准状态
- 下一步:使用创建实施计划
/plan
Key Rules
核心规则
- Actually dispatch the Explore agent - don't just describe doing it
- Scope searches - use the topic to narrow file patterns
- Cite evidence - every claim needs
file:line - Write output - research must produce a artifact
.agents/research/
- 实际调用Explore Agent - 不要仅描述调用过程
- 限定搜索范围 - 使用主题缩小文件模式
- 引用证据 - 所有结论都需要引用
file:line - 生成输出文件 - 研究必须生成下的工件
.agents/research/
Thoroughness Levels
详尽程度等级
Include in your Explore agent prompt:
- "quick" - for simple questions
- "medium" - for feature exploration
- "very thorough" - for architecture/cross-cutting concerns
在你的Explore Agent提示中加入:
- "quick" - 用于简单问题
- "medium" - 用于功能探索
- "very thorough" - 用于架构/跨领域问题