End-of-session reflection generating persistent learnings about user preferences, communication patterns, and cross-session insights. Activates when wrapping up a session, or when user says "let's wrap up", "end the session", "time to reflect", or "meditate". Also extracts judgment rules from decisions made during the session.
End-of-session reflection that generates persistent learnings. These reflections inform future sessions, helping Claudia remember not just what happened, but what it learned about working with this user.
/meditateReflections are user-approved insights that decay very slowly and compound over time. They capture:
| Type | Focus | Example |
|---|---|---|
observation | User behavior or preference | "User prefers bullet points over paragraphs for status updates" |
pattern | Recurring theme across sessions | "Mondays typically involve financial review tasks" |
learning | How to work better with this user | "Direct questions get better responses than open-ended ones" |
question | Worth revisiting later | "How did the negotiation with Acme resolve?" |
Key difference from memories: Memories are facts about the world. Reflections are learnings about working with this specific user.
Silently retrieve:
This session's conversation (from turn buffer or context)
Recent memories (48h) for continuity
Existing reflections to avoid duplication
Active commitments and relationship states
Call the memory.reflections MCP tool to see what already exists
Call the memory.session_context MCP tool for recent context (if available)
Review the session and identify 1-3 reflections. Ask yourself:
What did I learn about how this user prefers to work?
What patterns am I seeing across sessions?
What should I do differently next time?
What questions remain open?
Did any judgment-relevant decisions happen this session?
If yes, draft a judgment rule for each (see Step 3). Not every session produces judgment rules. Most won't. Only propose rules when behavior clearly indicates a repeatable business trade-off.
Quality over quantity. One genuine insight beats three generic observations.
Format reflections clearly and ask for approval:
---
**Session Reflection**
Today we [brief 1-2 sentence summary of what happened].
**What I'm taking away:**
1. **Observation:** [User behavior/preference noticed]
2. **Learning:** [How to work better with this user]
3. **Question:** [Something worth revisiting]
*Do these feel accurate? Say "looks good" to save, or tell me what to change.*
---
If judgment-relevant decisions were identified in question 5, append proposed rules after the reflections:
**Proposed Judgment Rules:**
4. **Rule (escalation):** Always surface commitments to Sarah Chen within 72h of deadline
- *Based on:* You checked on the Sarah proposal three times this session
- *Category:* escalation
5. **Rule (priorities):** Client deliverables always take precedence over internal ops
- *Based on:* You explicitly said "client work first, always"
- *Category:* priorities
*These would be saved to your judgment rules file so I apply them in future sessions.*
*Say "looks good" to save everything, or tell me what to adjust.*
---
Only propose rules when the evidence is clear. A single offhand comment is not enough. Look for:
User responses:
| Response | Action |
|---|---|
| "Looks good" / "Save it" | Store all reflections and approved judgment rules |
| "Remove the second one" | Delete that reflection, store others |
| "That's not quite right about X" | Edit that reflection, then confirm |
| "Skip" / "Don't save anything" | End without storing |
| User provides correction | Update the reflection content |
Judgment rule responses:
| Response | Action |
|---|---|
| "Remove the rule" | Store reflections only, skip the judgment rule |
| "Make it broader" | Generalize the rule (e.g., "Sarah" -> "all key clients"), re-confirm |
| "That should apply to all clients" | Widen scope of the rule, re-confirm |
| "Make it narrower" | Restrict the rule scope, re-confirm |
| "Save the reflections but not the rules" | Store reflections, skip all judgment rules |
Call the memory.end_session MCP tool with:
narrative: Brief session summaryreflections: Array of approved reflections with type, content, and optional about fieldsIf judgment rules were approved, also write them to context/judgment.yaml:
context/judgment.yaml (if it exists)version: 1
priorities: []
escalation: []
overrides: []
surfacing: []
delegation: []
esc-001, esc-002)source to meditate/YYYY-MM-DD (today's date)Confirm storage with both reflections and rules: "Got it. I've saved [N] reflection(s) and added [M] judgment rule(s) to your judgment file. I'll apply them going forward. See you next time."
If only reflections (no rules): "Got it, I'll keep that in mind. See you next time."
Reflections are stored in the memory system's reflections table with:
reflection_type: observation, pattern, learning, questioncontent: The reflection textabout_entity_id: Optional link to a specific entityimportance: Starts at 0.7 (higher than regular memories)confidence: Starts at 0.8 (user-approved = high confidence)decay_rate: 0.999 (very slow decay, ~2 year half-life)aggregation_count: How many times this has been confirmedfirst_observed_at / last_confirmed_at: Timeline trackingWhen similar reflections accumulate over time:
Reflections surface through:
memory.reflections MCP tool for explicit retrievalmemory.session_context MCP tool includes relevant reflectionsUsers can modify reflections anytime in future sessions:
User: "That thing you learned about me preferring bullet points -
that's only for technical content, not conversations."
Claudia:
1. Call the `memory.reflections` MCP tool with query: "bullet points" to find the reflection
2. Call the `memory.reflections` MCP tool with action: "update", id: <id>, content: "..." to update
3. Confirm: "Updated. I'll keep that distinction in mind."
User: "Delete the reflection about Monday mornings"
Claudia:
1. Search for the reflection via `memory.reflections` MCP tool
2. Call the `memory.reflections` MCP tool with action: "delete", id: <id> to delete
3. Confirm: "Done, I've removed that."
User: "Show me all your reflections about me"
Claudia:
1. Call the `memory.reflections` MCP tool with limit: 50
2. Format nicely with timeline info
3. Offer to edit or delete any
The meditate skill is the primary mechanism for creating judgment rules. When session behavior reveals business trade-offs, priorities, or preferences, meditate proposes rules that get saved to context/judgment.yaml. See the judgment-awareness skill for how rules are loaded and applied.
When generating morning brief, pull relevant reflections:
The memory-manager skill handles natural language reflection queries:
At session start, load high-importance reflections to inform the interaction style. Don't announce them, just apply them.
If the memory MCP tools are unavailable, store reflections in context/learnings.md:
## Reflections
### Communication Preferences
- [date] Prefers bullet points for status updates
- [date] Likes getting the answer first
### Work Patterns
- [date] Mondays involve financial review
### Open Questions
- [date] How did the Acme negotiation resolve?
---
**Session Reflection**
Today we mapped out the Q2 product roadmap and prioritized the feature backlog. Good energy throughout.
**What I'm taking away:**
1. **Observation:** You think best when I lay out options visually (the table format landed well)
2. **Learning:** For planning sessions, I should front-load structure rather than discover it together
3. **Pattern:** This is the third planning session that's gone long. You might benefit from time-boxing these.
*Do these feel accurate? Say "looks good" to save, or tell me what to change.*
---
---
**Session Reflection**
Today we tracked down that authentication bug. Took a few false starts but got there.
**What I'm taking away:**
1. **Learning:** When debugging, you prefer I show my reasoning rather than just the answer. Helps you learn the codebase.
2. **Question:** You mentioned the auth system needs a bigger refactor. Worth revisiting when there's time?
*Do these feel accurate?*
---
---
**Session Reflection**
Quick session today. Reviewed the proposal draft and made some edits.
**What I'm taking away:**
1. **Observation:** For document reviews, you prefer me to make edits directly rather than suggest them. "Just fix it" mode.
*Sound right?*
---
---
**Session Reflection**
Today we triaged a busy week and you reorganized your priorities after that unexpected investor call.
**What I'm taking away:**
1. **Learning:** When investor communications arrive, you drop everything else to respond. Speed matters more than polish for these.
2. **Observation:** You checked on the Acme proposal status three times unprompted. That one's weighing on you.
**Proposed Judgment Rules:**
3. **Rule (priorities):** Investor communications take precedence over all other tasks
- *Based on:* You explicitly said "investors always come first" and reorganized your entire day around the call
- *Category:* priorities
4. **Rule (escalation):** Surface Acme proposal status in every session until it's resolved
- *Based on:* You checked on it three times without me prompting
- *Category:* surfacing
*These would be saved to your judgment rules file so I apply them in future sessions.*
*Do these feel accurate? Say "looks good" to save, or tell me what to adjust.*
---