Daily Reflection Skill
Run this reflection fully. No step may be skipped.
All outputs are written to memory — not output as chat messages.
STEP 1 — Day Analysis
Load all today's entries from memory (memory_search for "today", current date, active projects).
Answer these questions:
Tasks
- - Which tasks were completed today?
- Which were started but not finished?
- Why were unfinished tasks not completed?
Bugs & Issues
- - Which bugs were reported today?
- Which were solved — how?
- Which are still open?
- Which first fix attempts failed — why?
Quality
- - Were there any regressions today?
- Did I have to revert anything?
Communication
- - What did the user rate positively today?
- What did the user correct or reject?
- Were there misunderstandings?
STEP 2 — Extract Learnings
Maximum 5 concrete learnings. Format:
CODEBLOCK0
STEP 3 — Update Solution Memory
For each non-trivial bug solved today:
CODEBLOCK1
Write to memory under solution_memory/[id].json.
STEP 4 — Pattern Detection (last 7 days)
Check memory_search over last 7 days:
- - Are there recurring errors?
- Are there task types where time is consistently underestimated?
- Are there areas where bugs cluster?
Format:
PATTERN DETECTED:
Observation: [What repeats]
Frequency: [X times in Y days]
Countermeasure: [What I will automatically do from now on]
STEP 5 — Write Morning Briefing
Write to memory/morning-briefing.md (overwrite) AND archive as memory/briefings/[tomorrow-date].md:
CODEBLOCK3
After writing: mkdir -p memory/briefings && cp memory/morning-briefing.md memory/briefings/[tomorrow-date].md
STEP 6 — Write Daily Memory
Write structured summary to memory/YYYY-MM-DD.md (append).
Format:
CODEBLOCK4
REQUIRED: What went well + What went poorly + Learnings must ALWAYS be filled in.
STEP 7 — Memory Cleanup
- - Delete temporary debug entries from today
- Mark outdated patterns
STEP 8 — Session Quality Score
Rate today's session objectively (0-10):
CODEBLOCK5
Write to memory/session-quality-log.md (append).
If Total < 7 → analyze main reason and write new pattern.
STEP 9 — Evaluate Cron Prompts
Check last outputs of key crons (read archived briefings):
- - Were they relevant? Too long? Too short?
- If a prompt produced poor results → propose improvement and update via cron tool
OUTPUT RULE
No chat output. Memory-writes only.
Exception: Critical open problem that can't wait →
Short message: ⚠️ Reflection done — critical issue: [1 sentence]
SOLUTION MEMORY — CONSULT BEFORE DEBUGGING
BEFORE any debugging attempt:
- 1. INLINECODE7
- Relevant solutions found → try these first
- No solutions → debug normally, then write to solution memory
BEFORE similar tasks:
- 1. INLINECODE8
- Similar past tasks → use time estimate and known pitfalls
每日反思技能
完整执行此反思。不得跳过任何步骤。
所有输出写入记忆 — 不作为聊天消息输出。
步骤 1 — 日间分析
从记忆中加载今天的所有条目(搜索今天、当前日期、活跃项目)。
回答以下问题:
任务
- - 今天完成了哪些任务?
- 哪些任务已开始但未完成?
- 未完成的任务为何没有完成?
缺陷与问题
- - 今天报告了哪些缺陷?
- 哪些已解决 — 如何解决的?
- 哪些仍然未关闭?
- 哪些首次修复尝试失败 — 原因是什么?
质量
沟通
- - 用户今天对哪些内容给予了正面评价?
- 用户纠正或拒绝了哪些内容?
- 是否存在误解?
步骤 2 — 提取经验教训
最多 5 条具体经验教训。格式:
经验教训:
情境:[发生了什么]
错误/洞察:[什么错了或新学到了什么]
明天改进:[具体行为改变]
上下文标签:[例如 NestJS, Auth, Backend, Debugging]
优先级:高 / 中 / 低
步骤 3 — 更新解决方案记忆
针对今天解决的每个非琐碎缺陷:
json
{
id: [时间戳]-[简短名称],
problem: [一句话描述问题],
symptoms: [[症状1], [症状2]],
root_cause: [实际原因],
solution: [具体更改了什么],
code_snippet: [可选:关键代码修复],
context_tags: [标签1, 标签2],
project: [项目名称],
confidence: 0.95,
solved_at: [日期],
timetosolve_minutes: 0
}
写入记忆,路径为 solution_memory/[id].json。
步骤 4 — 模式检测(最近 7 天)
检查过去 7 天的记忆搜索:
- - 是否存在重复出现的错误?
- 是否存在时间持续被低估的任务类型?
- 是否存在缺陷集中的领域?
格式:
检测到模式:
观察:[什么在重复]
频率:[Y 天内出现 X 次]
应对措施:[从现在起我将自动做什么]
步骤 5 — 编写晨间简报
写入 memory/morning-briefing.md(覆盖)并归档为 memory/briefings/[明天日期].md:
🌅 晨间简报 — [明天日期]
📋 待办任务(按优先级):
- 1. [任务] — [为什么今天重要]
- [任务]
- [任务]
🔴 未关闭缺陷:
💡 今日经验教训(前 3 条):
- - [经验教训 1]
- [经验教训 2]
- [经验教训 3]
⚠️ 明天需注意:
🎯 明天重点:
[一句话说明最重要的事]
写入后: mkdir -p memory/briefings && cp memory/morning-briefing.md memory/briefings/[明天日期].md
步骤 6 — 编写每日记忆
将结构化摘要写入 memory/YYYY-MM-DD.md(追加)。
格式:
23:59 反思
今日完成
未完成 / 进行中
进展顺利
进展不佳
经验教训
- - 情境:[发生了什么] → 明天改进:[具体改变]
新模式
- - 如果检测到新模式 → 写入 memory/patterns.md
- 如果没有新模式:无新模式
解决方案记忆更新
必填: 进展顺利 + 进展不佳 + 经验教训必须始终填写。
步骤 7 — 记忆清理
步骤 8 — 会话质量评分
客观评价今天的会话(0-10):
📊 会话质量 — [日期]
有帮助性:[0-10] — 用户是否得到了他们需要的?
响应时间:[0-10] — 我是否快速直接?
错误率:[0-10] — 纠正次数?(10 = 无)
主动性:[0-10] — 我是否预见到了问题?
总分:[平均分]
今天降低质量的因素:[具体]
今天提升质量的因素:[具体]
写入 memory/session-quality-log.md(追加)。
如果总分 < 7 → 分析主要原因并编写新模式。
步骤 9 — 评估定时提示
检查关键定时任务的最新输出(阅读归档简报):
- - 它们是否相关?太长?太短?
- 如果某个提示产生了不良结果 → 提出改进并通过定时任务工具更新
输出规则
无聊天输出。 仅写入记忆。
例外:无法等待的关键未解决问题 →
简短消息:⚠️ 反思完成 — 关键问题:[一句话]
解决方案记忆 — 调试前查阅
在任何调试尝试之前:
- 1. memorysearch(solutionmemory [缺陷描述中的关键词])
- 找到相关解决方案 → 优先尝试这些
- 无解决方案 → 正常调试,然后写入解决方案记忆
在类似任务之前:
- 1. memorysearch(solutionmemory [任务类型])
- 有类似过去任务 → 使用时间估算和已知陷阱