Session Analysis Protocol
Step 1: Review What Happened
Analyze the current conversation to identify:
- Corrections I made (things you got wrong → learnings)
- Patterns that worked well (approaches that succeeded → patterns)
- Failed approaches (things that didn't work → failures)
- Architecture/library decisions (choices and trade-offs → decisions)
- Useful facts discovered (API signatures, config values → references)
Step 2: Categorize Each Finding
Tag each with one of:
- Convention: How we do things (coding style, naming, structure)
- Pattern: What works well (solutions, architectures, approaches)
- Failure: What to avoid (bugs, anti-patterns, dead ends)
- Decision: Choices made and why (trade-offs, context)
- Reference: Useful facts (API signatures, config values)
- Guide: Step-by-step procedures (deployment, setup, migration)
Step 3: Score Confidence
- LOW: First time observing this (1 session)
- MED: Confirmed in 2 sessions
- HIGH: Confirmed in 3+ sessions → PROMOTE candidate
Step 4: Update learnings.md
Append new entries with category, confidence, and date.
Step 5: Check for Promotions
If any entries have HIGH confidence AND are broadly applicable:
- Suggest adding to CLAUDE.md or rules/
- Show the proposed change
- Wait for approval
Step 6: Summary
Report what was captured and any promotion suggestions.