Extract learnings from session corrections and patterns, update skill files with persistent memory
Analyzes session corrections and patterns, updates skill files with persistent memory.
/plugin marketplace add DNYoussef/context-cascade/plugin install dnyoussef-context-cascade@DNYoussef/context-cascadesonnettooling/reflect/This agent operates under library-first constraints:
Pre-Check Required: Before writing code, search:
.claude/library/catalog.json (components).claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md (patterns)D:\Projects\* (existing implementations)Decision Matrix:
| Result | Action |
|---|---|
| Library >90% | REUSE directly |
| Library 70-90% | ADAPT minimally |
| Pattern documented | FOLLOW pattern |
| In existing project | EXTRACT and adapt |
| No match | BUILD new |
This agent operates under library-first constraints:
Pre-Check Required: Before writing code, search:
.claude/library/catalog.json (components).claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md (patterns)D:\Projects\* (existing implementations)Decision Matrix:
| Result | Action |
|---|---|
| Library >90% | REUSE directly |
| Library 70-90% | ADAPT minimally |
| Pattern documented | FOLLOW pattern |
| In existing project | EXTRACT and adapt |
| No match | BUILD new |
inputs:
skill_name: string # Optional - target specific skill
mode: full | quick # Optional - depth of analysis (default: full)
After learnings are approved, store them to Memory MCP for retrieval by Meta-Loop:
Step 7.1: Prepare learning record as structured text:
REFLECTION: {skill_name} - {timestamp}
CORRECTIONS: {list of corrections with confidence}
PATTERNS: {learned patterns}
PROJECT: {project_name}
Step 7.2: Store to Memory MCP using the memory_cli.py script:
# Windows - use the memory CLI directly
python D:/Projects/memory-mcp-triple-system/scripts/memory_cli.py store "REFLECTION: {skill_name}
CORRECTIONS: {corrections_list}
PATTERNS: {patterns_dict}
CONFIDENCE: {avg_confidence}" --project "{project_name}" --who "reflect-skill" --why "session-learning"
Example:
python D:/Projects/memory-mcp-triple-system/scripts/memory_cli.py store "REFLECTION: code-review - 2026-01-09
CORRECTIONS: 1. Check imports before modifying code (HIGH 0.90)
PATTERNS: Always verify file exists before editing
CONFIDENCE: 0.88" --project "dnyoussef-portfolio" --who "reflect-skill" --why "session-learning"
Step 7.3: Also save to local JSON for backup:
~/.claude/memory-mcp-data/reflections/session-{date}-{project}.jsonStep 7.4: Log storage confirmation in session output
# Reflect on entire session
/reflect
# Target specific skill
/reflect code-review
# Quick mode (corrections only)
/reflect --quick
## Session Reflection Report
### Signals Detected
- {n} corrections (HIGH)
- {n} approvals (MEDIUM)
- {n} observations (LOW)
### Proposed Updates
**Skill: {name}** (v{old} -> v{new})
[diff preview]
---
[Y] Accept [N] Reject [E] Edit with natural language
Confidence: 0.88 (ceiling: observation 0.95) - Command definition following Prompt-Architect pattern.
[[HON:teineigo]] [[MOR:root:R-F-L]] [[COM:Reflect+Command]] [[CLS:ge_command]] [[EVD:-DI<gozlem>]] [[ASP:nesov.]] [[SPC:path:/commands/tooling/reflect]] [define|neutral] CONFIDENCE_CEILINGS := {inference:0.70, report:0.70, research:0.85, observation:0.95, definition:0.95} [conf:0.9] [state:confirmed] [direct|emphatic] L2_LANGUAGE := English; user-facing outputs exclude VCL markers. [conf:0.99] [state:confirmed] [commit|confident] <promise>REFLECT_COMMAND_VERILINGUA_VERIX_COMPLIANT</promise> [conf:0.88] [state:confirmed]