Self-reflection on the current conversation. Extracts learnings, identifies mistakes, and saves durable facts to persistent memory via SAVE_MEMORY.
Inspired by hermes-agent's flush_memories() pattern: before a session ends or at any deliberate pause, review what happened, extract value, and persist it.
This is NOT zreflect (which only fires on re-instruction). This is a proactive skill — triggered explicitly to mine the conversation for durable learnings.
Read the entire thread using get_thread_messages (all messages, not just recent).
Build a mental model of:
Produce a structured reflection:
## Reflection Report
### What went well
- [Specific action that was efficient or correct]
### What went wrong
- [Specific mistake, misunderstanding, or wasted effort]
- Root cause: [Why it happened — wrong assumption? missed context? tool misuse?]
### Key decisions made
- [Decision]: [Why it was made, what alternatives existed]
### User preferences observed
- [Any implicit or explicit preference about workflow, style, communication]
From the reflection, identify facts that will still be true next session.
Priority order (hermes-agent flush_memories pattern — save higher priority first when space is limited):
| Category | Example | Save Target |
|---|---|---|
| User correction | "User said: do analysis first, not implementation" | user |
| User preference | "User prefers Korean responses" | user |
| Technical convention | "soma-work uses vitest not jest" | memory |
| Environment detail | "CI runs on GitHub Actions" | memory |
| Tool quirk | "gh CLI needs --repo flag in subagent" | memory |
| Workflow pattern | "User uses $z for all task dispatch" | user |
Do NOT save:
GET_MEMORY to read current memory state.SAVE_MEMORY with action: "add", appropriate targetSAVE_MEMORY with action: "replace"SAVE_MEMORY with action: "remove"Report to the user:
## Learn Summary
**Conversation reviewed**: [message count] messages
**Reflection**: [1-2 sentence summary of what was learned]
**Memory changes**:
- Added: [count] entries
- Updated: [count] entries
- Removed: [count] entries
**Memory usage**: [X]% ([chars]/[limit])