TL;DR
Session Memory persists discoveries, patterns, and gotchas across sessions. The AI doesn't start from scratch - previous failures inform future attempts, and discovered patterns are reused automatically.
How Session Memory Works
Every PACT workflow captures learnings that persist across sessions:
.gritflow/
├── patterns.md # Discovered patterns (reused)
├── gotchas.md # Known issues and pitfalls
├── codebase_map.json # Project structure
├── attempt_history.json # What's been tried
└── session_insights/ # Per-session learnings
├── 2025-01-15.json
├── 2025-01-16.json
└── 2025-01-17.jsonWhat Gets Remembered
Patterns
Code patterns, naming conventions, and architectural decisions discovered during development. Automatically applied to future tasks.
Gotchas
Known issues, edge cases, and pitfalls. Prevents repeating the same mistakes across sessions.
Attempt History
What has been tried before and whether it succeeded or failed. Prevents circular fixes.
Codebase Map
Project structure, file relationships, and key components. Helps AI navigate your codebase faster.
Business Value
Compound Learning
Every session makes the next one more effective. Knowledge compounds over time.
No More Circular Fixes
Attempt history prevents trying the same failed approach multiple times.
Team Knowledge
Patterns and gotchas can be shared across team members.
Faster Onboarding
New developers benefit from accumulated project knowledge immediately.