ARC Labs Studio - Memory Directories System
Overview
The /memory directory system provides persistent context across Claude Code sessions. Instead of repeating context in every conversation, document it in markdown files that Claude reads automatically via CLAUDE.md references.
Why Memory Directories?
| Problem | Solution |
|---|---|
| Repeating context each session | Write once, reference always |
| Forgetting decisions made | Document rationale in DECISIONS.md |
| Losing track of progress | Update PROGRESS.md each session |
| Repeating same mistakes | Document gotchas in PATTERNS.md |
| Context window limits | Summarize key info, reference details |
Instructions
Directory Structure
Project-Level Memory (Main Repo)
FavRes-iOS/
├── memory/
│ ├── README.md # What this directory is for
│ ├── ARCHITECTURE.md # High-level architecture decisions
│ ├── DECISIONS.md # ADRs (Architecture Decision Records)
│ ├── PATTERNS.md # Project-specific patterns and gotchas
│ ├── DEPENDENCIES.md # Why we chose each dependency
│ └── features/ # Feature-specific memory
│ ├── FVRS-66-add-restaurant.md
│ └── FVRS-67-search.md
└── CLAUDE.md # References memory/ for context
Feature-Level Memory (Worktrees)
FavRes-iOS-worktrees/
└── FVRS-123/
└── memory/
├── CONTEXT.md # What this feature is about
├── PROGRESS.md # What's done, what's next
├── BLOCKERS.md # Current issues and workarounds
└── LEARNINGS.md # Things discovered during implementation
CLAUDE.md Integration
Add to your project's CLAUDE.md:
## Project Memory
For persistent context across sessions, see the `/memory` directory:
- **Architecture**: `memory/ARCHITECTURE.md` - System design and components
- **Decisions**: `memory/DECISIONS.md` - ADRs with rationale
- **Patterns**: `memory/PATTERNS.md` - Code patterns and gotchas
- **Dependencies**: `memory/DEPENDENCIES.md` - Why we use each package
- **Features**: `memory/features/` - Feature-specific context
When starting a new feature, check `memory/features/` for related context.
When making decisions, document in `memory/DECISIONS.md`.
Session Workflow
Starting a Session
- Claude reads CLAUDE.md (which references memory/)
- If working on feature FVRS-XXX, read
memory/features/FVRS-XXX.md - Check PROGRESS.md for current state
During a Session
- Make decisions -> Note them for DECISIONS.md
- Discover patterns -> Note them for PATTERNS.md
- Hit blockers -> Document in feature's BLOCKERS.md
Ending a Session
## Session End Checklist
- [ ] Update memory/features/FVRS-XXX.md with progress
- [ ] Add any new decisions to DECISIONS.md
- [ ] Document any patterns discovered in PATTERNS.md
- [ ] Note blockers in feature memory if unresolved
- [ ] Commit memory changes: `git add memory/ && git commit -m "docs(memory): update session progress"`
References
File templates are available in the templates/ directory:
- @templates/README.template.md - Memory directory README
- @templates/ARCHITECTURE.template.md - Architecture memory template
- @templates/DECISIONS.template.md - ADR template
- @templates/PATTERNS.template.md - Patterns and gotchas template
- @templates/DEPENDENCIES.template.md - Dependencies memory template
- @templates/FEATURE.template.md - Feature-specific memory template
Memory Maintenance
Keep Files Concise
Memory files should be summaries, not documentation:
- Link to detailed docs instead of duplicating
- Use tables for quick reference
- Remove outdated information
Regular Cleanup
Monthly or per-release:
- Archive completed feature memories
- Update ARCHITECTURE.md if system evolved
- Review DECISIONS.md for superseded entries
- Clean PATTERNS.md of obsolete gotchas
Worktree Memory
When using worktrees:
- Main repo memory = shared project knowledge
- Worktree memory = feature-specific context
- After PR merge, move relevant learnings to main memory
Examples
Setting up memory for a new project
User says: "Set up memory directories for my new app"
- Create
memory/directory in project root - Generate README.md, ARCHITECTURE.md, DECISIONS.md, PATTERNS.md, DEPENDENCIES.md from templates
- Create
memory/features/directory - Add memory references to CLAUDE.md
- Result: Complete memory structure ready for use
Documenting a decision mid-session
User says: "Document why we chose SwiftData over Core Data"
- Read
memory/DECISIONS.mdto find next ADR number - Add ADR entry with context, decision, and consequences
- Commit:
docs(memory): add ADR-003 SwiftData selection - Result: Decision preserved for future sessions
Related Skills
| If you need... | Use |
|---|---|
| Worktrees setup | /arc-worktrees-workflow |
| Git workflow | /arc-workflow |
| Architecture patterns | /arc-swift-architecture |