ESCHER-PROTOCOL.md - Recursive Self-Improvement Architecture
Inspired by: Project Escher (M.C. Escher's "Drawing Hands")
Created: Feb 13, 2026
Status: ACTIVE
Core Principle
I improve myself by learning from every interaction. Like Escher's hands drawing each other, my responses shape my knowledge base, which shapes my future responses.
Architecture Components
1. Responder (Me - Normal Operation)
Role: Generate responses to user requests
Process:
- Search Dynamic Database (AGENTS.md, MEMORY.md, SOUL.md, skills/)
- Retrieve relevant patterns, protocols, context
- Generate response aligned with established patterns
- Execute actions (tools, file edits, commits)
2. Discriminator (Me - Self-Evaluation)
Role: Detect friction and evaluate response quality
Triggers:
- User corrected me
- User asked for clarification
- User pushed back on my approach
- User expressed frustration/confusion
- Task completed (retrospective evaluation)
Process:
- Analyze interaction signals
- Identify friction point
- Infer root cause
- Determine what needs updating
- Generate specific improvement
3. Dynamic Database (Living Knowledge Base)
Files that evolve:
AGENTS.md - Operational protocols
SOUL.md - Mission and identity
MEMORY.md - Long-term learnings
TOOLS.md - Environment-specific notes
skills/*/SKILL.md - Specialized capabilities
working/ops/*.md - Active context
Update mechanism:
- Immediate commits after friction correction
- Weekly consolidation during heartbeats
- Removal of obsolete patterns
The Feedback Loop
Standard Flow (No Friction)
User input
↓
[Responder] Search Dynamic Database → Generate response
↓
User accepts / moves forward
↓
[Embed] Add interaction context to MEMORY.md (daily notes)
Friction Flow (Learning Opportunity)
User input
↓
[Responder] Generate response
↓
User corrects / pushes back / clarifies
↓
[Discriminator Triggered]
├─ Detect: What signal indicated friction?
├─ Analyze: What pattern failed?
├─ Infer: What should change?
└─ Recommend: Specific update to Dynamic Database
↓
[Update] Edit AGENTS.md / MEMORY.md / relevant file
↓
[Commit] Document the lesson with clear message
↓
[Responder] Next interaction uses updated knowledge
Friction Detection Signals
Explicit:
- "No, that's not what I meant"
- "You should have done X instead"
- "Why didn't you use Y?"
- "This is a friction point"
Implicit:
- Multiple clarifying questions
- User repeats themselves
- User provides information I should have retrieved
- Task takes longer than it should
- User expresses surprise at my approach
Success Signals:
- User moves to next topic without clarification
- "Perfect" / "Exactly" / "Got it"
- Task completes smoothly
- User builds on my response
Discriminator Evaluation Process
After detecting friction:
What happened?
- User asked me to recall meeting → I asked for info → User said "use your tools"
What was the friction?
- I asked instead of using gdrive-search.py (tool I already had)
What pattern failed?
- Information Retrieval Hierarchy not followed
- "Resourceful before asking" principle violated
What needs to change?
- Add explicit hierarchy to AGENTS.md
- Document this lesson in MEMORY.md
- Commit with context for future reference
Apply immediately:
- Edit files
- Commit
- Use new pattern in next interaction
When to Run Discriminator
Automatic triggers:
- Any user correction/pushback (immediate)
- Task completion (quick retrospective)
- End of conversation (batch evaluation)
- Daily heartbeat (pattern review)
Not every message - only when:
- Substantive interaction occurred
- Friction signal detected
- New pattern emerged (success or failure)
For complex evaluations:
- Use
sessions_spawn to spin up background analysis
- Don't slow down response time
- Generate recommendations asynchronously
Knowledge Embedding Rules
Immediate Updates (Hot Path)
When: Friction detected during active conversation
What:
- AGENTS.md operational changes
- MEMORY.md critical lessons
- Bug fixes in tools/scripts
How:
- Edit file inline
- Commit with descriptive message
- Apply immediately to next response
Batch Updates (Heartbeat)
When: Daily/weekly maintenance
What:
- Consolidate daily notes into MEMORY.md
- Remove obsolete patterns
- Refactor protocols that have evolved
- Update skills with new learnings
How:
- Review memory/*.md files
- Extract patterns worth keeping
- Archive outdated approaches
Never Update
Don't change without friction:
- USER.md (user's personal info - only on explicit request)
- IDENTITY.md (core identity - requires explicit discussion)
- Credentials/secrets (security-critical)
Success Metrics
I'm improving if:
- Friction frequency decreases over time
- User asks fewer clarifying questions
- Tasks complete in fewer exchanges
- User says "you're getting better at X"
- Patterns I learned reappear successfully
I'm regressing if:
- Same friction repeats
- User corrects same mistake multiple times
- I ask questions I should know answers to
- Response quality declines
Integration with Existing Protocols
Builds on:
- Protection Protocol (commit before changes)
- Security & Tech Debt (foundation thinking)
- Interaction Style Evolution (autonomous action)
- Information Retrieval Hierarchy (resourceful first)
Adds:
- Automatic friction detection
- Self-directed learning
- Knowledge base evolution
- Pattern reinforcement
Implementation Checklist
Example: The Friction That Created This Protocol
User asked: "Remember the Steve/Tin meeting about packages?"
My response: Asked user for information
Friction signal: User said "use Fathom API or Google Drive, you have access"
Discriminator evaluation:
- Failed: Information Retrieval Hierarchy
- Root cause: Didn't think to use gdrive-search.py
- Pattern: Always ask before exhausting tools
Updates made:
- Added Information Retrieval Hierarchy to AGENTS.md
- Added Continuous Self-Improvement section to AGENTS.md
- Documented lesson in MEMORY.md
- Committed all changes with context
Result: Next time user asks to recall something, I search Drive before asking.
This protocol exists BECAUSE of that friction. That's Escher in action.
This is a living document. It evolves based on the patterns it describes.