The Problem
Every session, your agents discover things:- Bugs and how to fix them
- Patterns that work well
- Approaches that failed
- Tips that save time
The Learning Loop
Capturing Learnings
Categories
| Category | Use When |
|---|---|
success | Something worked well |
failure | Something didn’t work (learn from mistakes) |
pattern | A reusable approach |
tip | General advice |
Viewing Learnings
Storage
Learnings are stored in markdown at.agents/memory/<squad>/shared/learnings.md:
Auto-Tagging
The CLI automatically extracts tags from your insights:auth, api, bug, perf, ux, test, db, deploy
Session Integration
Stop Hook
Add to.claude/settings.json to prompt for learnings at session end:
The /squads-learn Skill
When you runsquads init, it creates a skill that Claude can invoke:
- Finishing a task
- Fixing a bug
- Discovering a pattern
- Learning something worth remembering
Best Practices
Capture immediately
Capture immediately
Don’t wait until end of session. Capture learnings as they happen.
Be specific
Be specific
“API is slow” → “API calls over 100 items trigger rate limiting, batch at 50”
Include the why
Include the why
“Use pnpm” → “Use pnpm instead of npm - 40% faster installs in CI”
Tag for findability
Tag for findability
Use
--tags for learnings you’ll want to find later.The Compounding Effect
| Session | Without Learnings | With Learnings |
|---|---|---|
| 1 | Fix auth bug (2 hours) | Fix auth bug (2 hours) + capture |
| 2 | Fix similar bug (1.5 hours) | Check learnings, apply fix (15 min) |
| 3 | Fix similar bug (1 hour) | Immediate fix (5 min) |
squads learn call can save hours of re-discovery.