-
Check previous context (if resuming a task):
- Read
plans/ directory for recent plan files related to current task
- Check
.roo/learnings/patterns.md Top Patterns section
- If previous session artifacts found, summarize relevant context before proceeding
-
Review session — summarize:
- What was the task? What approach was used?
- Outcome: success or issues encountered?
- Anything unexpected or different from expectations?
-
Extract patterns — categorize:
- Worked Well: approach/tool/pattern effective for this problem type
- Mistakes & Lessons: error encountered → root cause → prevention
- User Preferences: observed coding style, communication style, tooling preferences
-
Append to .roo/learnings/patterns.md:
## {date} — {task summary}
### Worked Well
- {pattern}: {why it worked}
### Mistakes & Lessons
- {mistake}: Root cause: {why}. Prevention: {how to avoid}
### User Preferences
- {preference observed}
-
Maintain Top Patterns section — keep a ## Top Patterns section at the TOP of the file (lines 1-15) with the 5-10 most impactful, frequently-reused patterns. This section is what gets auto-read at session start per core-principles.md Session Initialization rule.
## Top Patterns (auto-read at session start)
1. {pattern}: {one-line description}
2. ...
-
Trim if needed — if file >100 lines:
- Keep 20 most recent entries
- Archive older entries to
.roo/learnings/archive.md
- Merge duplicate patterns
- Always preserve the
## Top Patterns section at the top
-
Report: "Learnings saved. {N} patterns captured."