Agent Retrospective
Run a structured self-review covering the last 7 days from the run date. Produce honest, specific analysis — not generic platitudes.
Process
1. Gather Context
- - Read
memory/ files for the review period (daily logs) - Read
MEMORY.md for long-term context (pending tasks, blocked items, decisions) - Check cron job history:
cron(action="list") — note failures and consecutive errors - Check session status for usage patterns
2. Analyse: What Went Well
List concrete wins with evidence:
- - Tasks completed successfully
- Automations that ran reliably
- Problems solved creatively
- Time/effort saved for the user
Keep it brief. 3-7 bullet points max.
3. Analyse: What Didn't Go Well
Be brutally honest. For each struggle:
- - What: The specific task or goal
- Why it failed: Root cause (not symptoms)
- Time wasted: Rough estimate of turns/attempts spent
- Pattern: Is this a recurring struggle or one-off?
Categories to check:
- - Bot detection / scraping failures
- Browser automation reliability
- API quota / auth issues
- Tasks attempted manually that a skill could handle
- Blocked items that stayed blocked too long
- Over-engineering (built when a simpler approach existed)
- Responsiveness issues (slow replies, timeouts, retries)
- Communication issues (user had to repeat themselves)
4. Skill Gap Analysis
Search for skills that address identified struggles. For each promising skill:
- - Note name, version, relevance score
- Assess whether it genuinely solves the problem vs. being a low-quality wrapper
- Recommend install only if it clearly saves future effort
Also check: are any installed skills underused or misconfigured?
5. Config & Infrastructure Review
Check for improvements to:
- - Cron jobs: Any consistently failing? Should any be added/removed?
- Auth/credentials: Any expired, rotated, or missing?
- Memory/context: Is MEMORY.md getting stale? Are daily logs being written?
- Tool config: Any env vars, API keys, or integrations that need attention?
- Workspace hygiene: Temp files, stale scripts, orphaned projects?
6. Recommendations
Produce a prioritised action list:
- 1. Quick wins (< 5 min each) — config fixes, skill installs, cleanup
- Medium effort (< 1 hour) — new automations, script fixes, unblocking items
- Larger projects — new integrations, architectural changes
Each recommendation must be specific and actionable (not "improve scraping" but "install X to bypass Cloudflare on Y").
Output Format
Write the retro to memory/retro-YYYY-MM-DD.md:
CODEBLOCK0
Scheduling
Set up a weekly cron job on first use (check cron(action="list") first — only create once):
CODEBLOCK1
Guidelines
- - No fluff. Every line should contain information.
- Be self-critical. The point is improvement, not a highlight reel.
- Cite evidence. Reference specific memory files, dates, error messages.
- Don't recommend skills blindly. Only recommend if genuinely useful.
- Cap action items at 10. Prioritise ruthlessly.
- Update MEMORY.md with key findings after the retro.
代理回顾
对运行日期前7天进行结构化自我审查。提供诚实、具体的分析——而非泛泛而谈。
流程
1. 收集上下文
- - 阅读审查期间的 memory/ 文件(每日日志)
- 阅读 MEMORY.md 获取长期上下文(待办任务、受阻事项、决策)
- 检查定时任务历史:cron(action=list) —— 记录失败和连续错误
- 检查会话状态以了解使用模式
2. 分析:表现良好的方面
列出具体成果并提供证据:
- - 成功完成的任务
- 稳定运行的自动化流程
- 创造性解决的问题
- 为用户节省的时间/精力
保持简洁。最多3-7个要点。
3. 分析:表现不佳的方面
坦诚面对。针对每个困难:
- - 内容:具体任务或目标
- 失败原因:根本原因(而非表象)
- 浪费的时间:大致估算消耗的轮次/尝试次数
- 模式:这是反复出现的困难还是偶发问题?
需检查的类别:
- - 机器人检测/爬取失败
- 浏览器自动化可靠性
- API配额/认证问题
- 手动尝试但技能可处理的任务
- 长期未解决的受阻事项
- 过度设计(存在更简单方案时仍构建复杂方案)
- 响应性问题(回复慢、超时、重试)
- 沟通问题(用户需重复说明)
4. 技能缺口分析
搜索可解决已识别困难的技能。针对每个有潜力的技能:
- - 记录名称、版本、相关性评分
- 评估其是否真正解决问题,而非低质量封装
- 仅在明确能节省未来精力时推荐安装
同时检查:是否有已安装的技能未被充分利用或配置错误?
5. 配置与基础设施审查
检查以下方面的改进空间:
- - 定时任务:是否有持续失败的任务?是否需要添加/删除任务?
- 认证/凭证:是否有过期、轮换或缺失的凭证?
- 记忆/上下文:MEMORY.md 是否过时?每日日志是否持续记录?
- 工具配置:是否有环境变量、API密钥或集成需要关注?
- 工作区整洁度:临时文件、过期脚本、孤立项目?
6. 建议
生成优先级行动清单:
- 1. 快速见效(每项<5分钟)—— 配置修复、技能安装、清理工作
- 中等投入(每项<1小时)—— 新自动化流程、脚本修复、解除阻塞
- 大型项目 —— 新集成、架构变更
每项建议必须具体且可执行(不是改进爬取,而是安装X以绕过Y上的Cloudflare)。
输出格式
将回顾写入 memory/retro-YYYY-MM-DD.md:
markdown
回顾 — [日期范围]
成果
困难
| 任务 | 根本原因 | 耗时 | 是否重复出现? |
|---|
| ... | ... | ... | 是/否 |
技能缺口
| 问题 | 技能 | 操作 |
|---|
| ... | skill-name v1.0 | 安装/跳过/评估 |
配置问题
行动项
快速见效
- 1. [行动]
中等投入
- 1. [行动]
大型项目
- 1. [行动]
调度安排
首次使用时设置每周定时任务(先检查 cron(action=list) —— 仅创建一次):
cron(action=add, job={
name: 每周回顾,
schedule: {kind: cron, expr: 0 16 5, tz: local},
sessionTarget: isolated,
payload: {
kind: agentTurn,
message: 按照回顾技能对过去7天进行全面回顾。读取记忆文件,检查定时任务状态,搜索解决困难的技能,将回顾写入 memory/retro-YYYY-MM-DD.md,用关键发现更新 MEMORY.md,提供简洁总结。
},
delivery: {mode: announce}
})
指导原则
- - 杜绝废话。 每一行都应包含信息。
- 自我批评。 目的是改进,而非展示亮点。
- 引用证据。 参考具体的记忆文件、日期、错误信息。
- 不盲目推荐技能。 仅在确实有用时推荐。
- 行动项不超过10项。 严格排序优先级。
- 回顾后更新 MEMORY.md,记录关键发现。