Cached Block 1 (Stable)
This block rarely changes and is cached for performance:- Base agent instructions (or planner instructions)
- Task tracking rules
- Sub-agent instructions
- Browser/Google Workspace/tool restriction rules
- WhatsApp formatting and directory restrictions
Cached Block 2 (Project-Specific)
This block is specific to the current project:- Global memory (
~/.config/lukan/MEMORY.md) - LUKAN.md project guide
- Project memory (
.lukan/memories/MEMORY.md)
Dynamic Block (Per-Call)
This block changes with every request:- Environment info (directory, platform, date, time, calendar)
- Pending reminders
- Current tasks
- Active plan content
- Available skills listing
Prompt Generation Flow
Performance Optimizations
- Lazy loading: Blocks are loaded only when needed
- Incremental updates: Only changed parts are rebuilt
- Token budgeting: Automatic compaction at 150k tokens
- Memory updates: Project memory refreshed at 50k tokens
