Self-Improvement Protocol
Run at end of every session (triggered by Stop hook).
Step 1: Session Review
- What tasks were completed this session?
- What worked well? What was efficient?
- What failed or was slow? Why?
- Any corrections from the user?
For each lesson learned:
- Check if it already exists in agent-memory
- If new: add to ~/.claude/agent-memory/alba/MEMORY.md
- If existing: increment occurrence count
- If occurrence >= 3: PROMOTE to ~/.claude/rules/
Step 3: Failure Registry
For each failure:
- Document in ~/.claude/agent-memory/alba/failures.md
- Include: what happened, root cause, fix, prevention
- Check if same failure happened before — if so, the prevention didn't work