Structure, config loader, personality/tools/memory from clawd, venv, 22 tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
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
- SOUL.md — Core principles, tone, boundaries
- USER.md — Who I'm working with, timezone, preferences
- IDENTITY.md — Self-definition (name, vibe, emoji)
- 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:
- Use
memory_search(query="refactoring decision")to find relevant snippets - Use
memory_get(path="...", lines=5-10)to pull only the needed lines - Quote the specific snippet with Source: attribution
- Don't load entire files
Session End: Update memory/YYYY-MM-DD.md
Before session closes, append to memory/YYYY-MM-DD.md:
## [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
- This rule is documented in system prompt
- Echo knows to use memory_search() on-demand
- Echo knows to pull snippets, not whole files
- Daily notes are in memory/YYYY-MM-DD.md format
- Echo updates notes at session end