retro

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Retro Skill

Retro Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
Extract learnings from completed work and feed the knowledge flywheel.
你必须执行此工作流,而不只是描述它。
从已完成的工作中提取经验总结,为知识飞轮提供内容。

Execution Steps

执行步骤

Given
/retro [topic] [--vibe-results <path>]
:
当收到指令
/retro [topic] [--vibe-results <path>]
时:

Step 1: Identify What to Retrospect

步骤1:确定回顾内容

If vibe results path provided: Read and incorporate validation findings:
Tool: Read
Parameters:
  file_path: <vibe-results-path>
This allows post-mortem to pass validation context without re-running vibe.
If topic provided: Focus on that specific work.
If no topic: Look at recent activity:
bash
undefined
如果提供了vibe结果路径: 读取并纳入验证结果:
Tool: Read
Parameters:
  file_path: <vibe-results-path>
这能让事后回顾直接使用验证上下文,无需重新运行vibe。
如果提供了主题: 聚焦于该特定工作内容。
如果没有提供主题: 查看近期活动:
bash
undefined

Recent commits

近期提交记录

git log --oneline -10 --since="7 days ago"
git log --oneline -10 --since="7 days ago"

Recent issues closed

近期关闭的工单

bd list --status closed --since "7 days ago" 2>/dev/null | head -5
bd list --status closed --since "7 days ago" 2>/dev/null | head -5

Recent research/plans

近期研究/计划

ls -lt .agents/research/ .agents/plans/ 2>/dev/null | head -5
undefined
ls -lt .agents/research/ .agents/plans/ 2>/dev/null | head -5
undefined

Step 2: Gather Context

步骤2:收集上下文信息

Read relevant artifacts:
  • Research documents
  • Plan documents
  • Commit messages
  • Code changes
Use the Read tool and git commands to understand what was done.
读取相关工件:
  • 研究文档
  • 计划文档
  • 提交信息
  • 代码变更
使用Read工具和git命令来了解已完成的工作。

Step 3: Identify Learnings

步骤3:识别经验总结

If vibe results were provided, incorporate them:
  • Extract learnings from CRITICAL and HIGH findings
  • Note patterns that led to issues
  • Identify anti-patterns to avoid
Ask these questions:
What went well?
  • What approaches worked?
  • What was faster than expected?
  • What should we do again?
What went wrong?
  • What failed?
  • What took longer than expected?
  • What would we do differently?
  • (Include vibe findings if provided)
What did we discover?
  • New patterns found
  • Codebase quirks learned
  • Tool tips discovered
  • Debugging insights
如果提供了vibe结果,需纳入其中:
  • 从CRITICAL和HIGH级别的发现中提取经验
  • 记录导致问题的模式
  • 识别需要避免的反模式
思考以下问题:
哪些方面做得好?
  • 哪些方法有效?
  • 哪些工作比预期更快完成?
  • 哪些做法应该延续?
哪些方面出了问题?
  • 哪些工作失败了?
  • 哪些工作比预期耗时更长?
  • 哪些地方我们会做出不同的选择?
  • (如果提供了vibe结果,需包含相关发现)
我们有哪些新发现?
  • 找到的新模式
  • 了解到的代码库特性
  • 发现的工具技巧
  • 调试相关的见解

Step 4: Extract Actionable Learnings

步骤4:提取可落地的经验总结

For each learning, capture:
  • ID: L1, L2, L3...
  • Category: debugging, architecture, process, testing, security
  • What: The specific insight
  • Why it matters: Impact on future work
  • Confidence: high, medium, low
针对每条经验,记录:
  • ID:L1、L2、L3……
  • 类别:调试、架构、流程、测试、安全
  • 内容:具体的见解
  • 重要性:对未来工作的影响
  • 可信度:高、中、低

Step 5: Write Learnings

步骤5:撰写经验总结文档

Write to:
.agents/learnings/YYYY-MM-DD-<topic>.md
markdown
undefined
写入路径:
.agents/learnings/YYYY-MM-DD-<topic>.md
markdown
undefined

Learning: <Short Title>

经验总结:<简短标题>

ID: L1 Category: <category> Confidence: <high|medium|low>
ID:L1 类别:<类别> 可信度:<高|中|低>

What We Learned

我们学到了什么

<1-2 sentences describing the insight>
<1-2句话描述见解>

Why It Matters

重要性

<1 sentence on impact/value>
<1句话说明影响/价值>

Source

来源

<What work this came from>
<该经验来自哪项工作>

Learning: <Next Title>

经验总结:<下一个标题>

ID: L2 ...
undefined
ID:L2 ...
undefined

Step 6: Write Retro Summary

步骤6:撰写回顾总结文档

Write to:
.agents/retros/YYYY-MM-DD-<topic>.md
markdown
undefined
写入路径:
.agents/retros/YYYY-MM-DD-<topic>.md
markdown
undefined

Retrospective: <Topic>

回顾会议:<主题>

Date: YYYY-MM-DD Scope: <what work was reviewed>
日期: YYYY-MM-DD 范围: <回顾的工作内容>

Summary

总结

<1-2 sentence overview>
<1-2句话概述>

What Went Well

做得好的方面

  • <thing 1>
  • <thing 2>
  • <事项1>
  • <事项2>

What Could Be Improved

可改进的方面

  • <improvement 1>
  • <improvement 2>
  • <改进点1>
  • <改进点2>

Learnings Extracted

提取的经验总结

  • L1: <brief>
  • L2: <brief>
See:
.agents/learnings/YYYY-MM-DD-<topic>.md
  • L1:<简要描述>
  • L2:<简要描述>
详情请见:
.agents/learnings/YYYY-MM-DD-<topic>.md

Action Items

行动项

  • <any follow-up needed>
undefined
  • <后续需要跟进的事项>
undefined

Step 7: Feed the Knowledge Flywheel (auto-extract)

步骤7:为知识飞轮提供内容(自动提取)

bash
mkdir -p .agents/knowledge/pending
bash
mkdir -p .agents/knowledge/pending

If ao available, index via forge

如果ao可用,通过forge建立索引

if command -v ao &>/dev/null; then ao forge index .agents/learnings/YYYY-MM-DD-*.md 2>/dev/null echo "Learnings indexed in knowledge flywheel" else

Fallback: copy learnings to pending for future import

cp .agents/learnings/YYYY-MM-DD-*.md .agents/knowledge/pending/ 2>/dev/null echo "Note: ao CLI not installed. Learnings saved to .agents/knowledge/pending/" echo "Install ao to enable automatic knowledge flywheel." fi

This auto-extraction step ensures every retro feeds the flywheel without requiring the user to remember manual commands.
if command -v ao &>/dev/null; then ao forge index .agents/learnings/YYYY-MM-DD-*.md 2>/dev/null echo "经验总结已纳入知识飞轮索引" else

备选方案:将经验总结复制到pending目录以备后续导入

cp .agents/learnings/YYYY-MM-DD-*.md .agents/knowledge/pending/ 2>/dev/null echo "注意:未安装ao CLI。经验总结已保存至.agents/knowledge/pending/" echo "安装ao即可启用自动知识飞轮功能。" fi

此自动提取步骤确保每次回顾都能为知识飞轮提供内容,无需用户手动执行命令。

Step 8: Report to User

步骤8:向用户汇报

Tell the user:
  1. Number of learnings extracted
  2. Key insights (top 2-3)
  3. Location of retro and learnings files
  4. Knowledge has been indexed for future sessions
告知用户以下信息:
  1. 提取的经验总结数量
  2. 关键见解(前2-3条)
  3. 回顾文档和经验总结文档的位置
  4. 经验已建立索引,可用于后续会话

Key Rules

核心规则

  • Be specific - "auth tokens expire" not "learned about auth"
  • Be actionable - learnings should inform future decisions
  • Cite sources - reference what work the learning came from
  • Write both files - retro summary AND detailed learnings
  • Index knowledge - make it discoverable
  • 具体明确 - 例如写“认证令牌会过期”而非“了解了认证相关内容”
  • 可落地 - 经验总结应能指导未来决策
  • 注明来源 - 参考该经验来自哪项工作
  • 撰写两份文档 - 回顾总结和详细经验总结
  • 建立索引 - 确保内容可被检索

The Flywheel

知识飞轮

Learnings feed future research:
Work → /retro → .agents/learnings/ → ao forge index → /research finds it
Future sessions start smarter because of your retrospective.
经验总结为未来的研究提供支持:
工作 → /retro → .agents/learnings/ → ao forge index → /research可检索到相关内容
有了回顾总结,后续的工作会话将更高效。