# Session Initialization Rule

**Purpose:** Minimize context overhead and token waste by explicitly controlling what loads on every session start.

## ON SESSION START: Load ONLY These Files

1. **SOUL.md** — Core principles, tone, boundaries
2. **USER.md** — Who I'm working with, timezone, preferences  
3. **IDENTITY.md** — Self-definition (name, vibe, emoji)
4. **memory/YYYY-MM-DD.md** (if today's note exists) — Daily context

**Total overhead: ~8KB instead of 50KB+**

## DO NOT Auto-Load

- ❌ MEMORY.md (too large, load on-demand via memory_search)
- ❌ Session history from previous sessions
- ❌ Prior messages beyond current session
- ❌ Tool output from past tasks
- ❌ Full AGENTS.md unless explicitly needed
- ❌ TOOLS.md unless explicitly needed

## When User Asks About Prior Context

Example: *"What did we decide about the refactoring?"*

**Response:**
1. Use `memory_search(query="refactoring decision")` to find relevant snippets
2. Use `memory_get(path="...", lines=5-10)` to pull only the needed lines
3. Quote the specific snippet with Source: attribution
4. Don't load entire files

## Session End: Update memory/YYYY-MM-DD.md

Before session closes, append to `memory/YYYY-MM-DD.md`:

```markdown
## [Session Time] - [Topic/Task]

**What we did:**
- Item 1
- Item 2

**Decisions made:**
- Decision 1

**Blockers:**
- Blocker 1

**Next steps:**
- Step 1
```

## Cost Impact

| Metric | Before | After |
|--------|--------|-------|
| Context per session | 50KB | 8KB | 
| Token waste | 2-3M per session | ~300K |
| Cost per session | $0.40 | $0.05 |
| Cost per 100 sessions | $40 | $5 |

## Implementation Checklist

- [x] This rule is documented in system prompt
- [x] Echo knows to use memory_search() on-demand
- [x] Echo knows to pull snippets, not whole files
- [x] Daily notes are in memory/YYYY-MM-DD.md format
- [x] Echo updates notes at session end
