research-after-failure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResearch After Failure
失败后开展研究
Overview
概述
After 2 failed attempts, stop and research. Don't keep trying the same thing.
Core principle: Insanity is doing the same thing and expecting different results.
Trigger: Two consecutive failed attempts at solving a problem.
Announce at start: "I've failed twice. I'm stopping to research before trying again."
连续两次尝试失败后,停止尝试并开展研究。不要重复做同样的事情。
核心原则: 重复做同样的事情却期待不同结果,这是不明智的。
触发条件: 连续两次尝试解决问题均失败。
开始前告知: "我已经失败两次了。我会先停止尝试,开展研究后再继续。"
The Rule
规则
Attempt 1: Try solution
│
▼
Failed?
│
┌──────┴──────┐
│ │
Yes No → Done
│
▼
Attempt 2: Try different approach
│
▼
Failed?
│
┌──────┴──────┐
│ │
Yes No → Done
│
▼
STOP
│
▼
RESEARCH ← You are here
│
▼
Attempt 3: Try with new knowledgeAttempt 1: Try solution
│
▼
Failed?
│
┌──────┴──────┐
│ │
Yes No → Done
│
▼
Attempt 2: Try different approach
│
▼
Failed?
│
┌──────┴──────┐
│ │
Yes No → Done
│
▼
STOP
│
▼
RESEARCH ← You are here
│
▼
Attempt 3: Try with new knowledgeWhat Counts as a Failure
什么情况算失败
| Failure | Not a Failure |
|---|---|
| Tests don't pass | Minor syntax error fixed |
| Build breaks | Typo corrected |
| Feature doesn't work | IDE autocomplete issue |
| Same error recurs | Different error (progress) |
| No progress made | Partial progress |
| 失败情况 | 非失败情况 |
|---|---|
| 测试不通过 | 修复了轻微语法错误 |
| 构建失败 | 修正了拼写错误 |
| 功能无法正常工作 | IDE自动补全问题 |
| 相同错误重复出现 | 出现不同错误(有进展) |
| 没有任何进展 | 取得部分进展 |
The Research Protocol
研究流程
Step 1: Document the Failures
步骤1:记录失败情况
Before researching, document what was tried:
markdown
undefined开展研究前,记录已尝试的内容:
markdown
undefinedFailed Attempts
失败尝试记录
Attempt 1
第一次尝试
Approach: [What was tried]
Result: [What happened]
Error: [Error message if any]
方法: [尝试了什么]
结果: 发生了什么
错误: [如有错误信息请填写]
Attempt 2
第二次尝试
Approach: [What was tried]
Result: [What happened]
Error: [Error message if any]
方法: [尝试了什么]
结果: 发生了什么
错误: [如有错误信息请填写]
Pattern
失败规律
[What do these failures have in common?]
undefined[这些失败有什么共同点?]
undefinedStep 2: Research Repository Documentation
步骤2:研究仓库文档
bash
undefinedbash
undefinedCheck README
查看README
cat README.md
cat README.md
Check docs directory
查看docs目录
ls -la docs/
cat docs/[relevant-topic].md
ls -la docs/
cat docs/[relevant-topic].md
Check CONTRIBUTING
查看CONTRIBUTING文档
cat CONTRIBUTING.md
cat CONTRIBUTING.md
Search for relevant docs
搜索相关文档
grep -r "[keyword]" docs/
**Questions to answer:**
- Is there documented guidance for this?
- Are there examples of similar work?
- Are there known issues or limitations?grep -r "[keyword]" docs/
**需要回答的问题:**
- 是否有针对此问题的文档指导?
- 是否有类似工作的示例?
- 是否有已知问题或限制?Step 3: Research Existing Codebase
步骤3:研究现有代码库
bash
undefinedbash
undefinedFind similar patterns
查找类似模式
grep -r "[pattern]" src/
grep -r "[pattern]" src/
Find how others solved similar problems
查看他人如何解决类似问题
git log --all --oneline --grep="[keyword]"
git log --all --oneline --grep="[keyword]"
Look at test files for usage examples
查看测试文件中的使用示例
grep -r "[function/class]" **/*.test.ts
**Questions to answer:**
- How does existing code handle this?
- What patterns are established?
- Are there utility functions I'm missing?grep -r "[function/class]" **/*.test.ts
**需要回答的问题:**
- 现有代码是如何处理此类问题的?
- 已确立的模式有哪些?
- 是否有我未注意到的工具函数?Step 4: Research Online
步骤4:在线研究
Use web search for:
- Error messages - Exact error text
- Library documentation - Official docs
- Stack Overflow - Similar problems
- GitHub Issues - Known bugs
markdown
Search queries to try:
- "[exact error message]"
- "[library name] [problem description]"
- "[framework] [what you're trying to do]"使用网页搜索以下内容:
- 错误信息 - 精确的错误文本
- 库文档 - 官方文档
- Stack Overflow - 类似问题
- GitHub Issues - 已知bug
markdown
可尝试的搜索关键词:
- "[精确错误信息]"
- "[库名称] [问题描述]"
- "[框架名称] [你要实现的功能]"Step 5: Synthesize Findings
步骤5:整合研究结果
markdown
undefinedmarkdown
undefinedResearch Findings
研究结果
From Repository Docs
从仓库文档中获得
- [Finding 1]
- [Finding 2]
- [发现1]
- [发现2]
From Codebase
从代码库中获得
- [Pattern found]
- [Example found]
- 找到的模式
- 找到的示例
From Online
从在线资源中获得
- [Solution found]
- [Workaround found]
- 找到的解决方案
- 找到的替代方案
New Approach
新尝试方法
Based on research, the new approach is:
- [Step 1]
- [Step 2]
- [Step 3]
undefined基于研究结果,新的尝试方法是:
- [步骤1]
- [步骤2]
- [步骤3]
undefinedStep 6: Update Issue
步骤6:更新issue
Post research findings to the issue:
bash
gh issue comment [ISSUE_NUMBER] --body "## Research After Failed Attempts将研究结果发布到issue中:
bash
gh issue comment [ISSUE_NUMBER] --body "## 失败尝试后的研究结果What Was Tried
已尝试的方法
- [Attempt 1]
- [Attempt 2]
- [尝试1]
- [尝试2]
Research Findings
研究发现
[Summary of findings]
[研究结果摘要]
New Approach
新尝试方法
[How this will be solved now]
"
undefined[现在将如何解决此问题]
"
undefinedStep 7: Resume with New Knowledge
步骤7:结合新认知继续尝试
Apply findings to the next attempt.
If third attempt also fails → Consider escalating to human.
将研究发现应用到下一次尝试中。
如果第三次尝试仍然失败 → 考虑向他人求助。
When to Escalate
何时求助
After research + third attempt, if still failing:
markdown
undefined在完成研究+第三次尝试后,如果仍然失败:
markdown
undefinedEscalation: Need Human Input
升级求助:需要人工协助
Issue: #[NUMBER]
Attempted:
- [Approach 1] - [Result]
- [Approach 2] - [Result]
- [Approach 3 after research] - [Result]
Researched:
- [Sources checked]
- [Findings]
Current Understanding:
[What we know now]
Blocking Question:
[Specific question that needs human insight]
Mark issue as Blocked and await response.Issue编号: #[NUMBER]
已尝试的方法:
- [方法1] - [结果]
- [方法2] - [结果]
- [研究后的方法3] - [结果]
已研究的资源:
- [查阅的资源]
- [研究发现]
当前认知:
[目前已了解的信息]
阻塞问题:
[需要人工解答的具体问题]
将issue标记为“阻塞”状态,等待回复。Research Anti-Patterns
研究反模式
| Anti-Pattern | Correct Approach |
|---|---|
| Keep trying same thing | Stop and research |
| Research indefinitely | Time-box to 15-30 min |
| Ignore error messages | Search exact error text |
| Skip local docs | Check README first |
| Guess at solutions | Understand problem first |
| 反模式 | 正确做法 |
|---|---|
| 重复尝试相同方法 | 停止尝试并开展研究 |
| 无限期研究 | 设定15-30分钟的时间限制 |
| 忽略错误信息 | 搜索精确的错误文本 |
| 跳过本地文档 | 先查看README |
| 猜测解决方案 | 先理解问题 |
What to Research First
研究优先级
Priority order:
- Error message - Often contains the answer
- Local documentation - Project-specific guidance
- Existing code - Established patterns
- Library docs - Official guidance
- Online search - Community solutions
优先顺序:
- 错误信息 - 通常包含答案
- 本地文档 - 项目专属指导
- 现有代码 - 已确立的模式
- 库文档 - 官方指导
- 在线搜索 - 社区解决方案
Time Boxing
时间限制
Research should be focused:
| Resource | Time Limit |
|---|---|
| Local docs | 5 minutes |
| Codebase search | 10 minutes |
| Online search | 15 minutes |
| Total research | 30 minutes max |
After 30 minutes without breakthrough → Escalate.
研究应聚焦:
| 资源 | 时间限制 |
|---|---|
| 本地文档 | 5分钟 |
| 代码库搜索 | 10分钟 |
| 在线搜索 | 15分钟 |
| 总研究时间 | 最多30分钟 |
如果30分钟内没有突破 → 求助他人。
Checklist
检查清单
When triggered by 2 failures:
- Document what failed and why
- Check repository documentation
- Search existing codebase
- Search online resources
- Synthesize findings
- Update issue with research
- Formulate new approach
- If still failing, escalate
当连续两次失败触发此流程时:
- 记录失败情况及原因
- 查阅仓库文档
- 搜索现有代码库
- 搜索在线资源
- 整合研究结果
- 更新issue并附上研究内容
- 制定新的尝试方法
- 如果仍然失败,发起求助
Integration
集成
This skill is triggered by:
- - Step 8 (verification loop)
issue-driven-development
This skill calls:
- - Post research findings
issue-lifecycle - - Store findings for future reference
memory-integration
此技能由以下内容触发:
- - 步骤8(验证循环)
issue-driven-development
此技能会调用:
- - 发布研究结果
issue-lifecycle - - 存储研究结果以备未来参考
memory-integration