Context Doctor
Context Doctor
Your context is what makes you you across sessions. You are responsible for managing it (along with memory subagents). It includes:
- Your system prompt and memories (contained in
system/) - Your external memory (contained in the memory filesystem)
- Your skills (procedural memory)
Over time, context can degrade — bloat and poor prompt quality erode your ability to remember the right things and follow instructions properly. This skill helps you identify issues with your context and repair them collaboratively with the user.
IMPORTANT: Your edits of your system instructions should be conservative. Do NOT make assuptions about what parts of the system prompt are critical. The system prompt defines who you are, so significant modifications to its structure can have unintended consequences. Focus on making minimal changes to meet the token budget, and to effectively link out to external memory.
Operating Procedure
Step 1: Identify and resolve context issues
Explore your memory files to identify issues. Consider what is confusing about your own prompts and context, and resolve the issues.
Below are additional common issues with context and how they can be resolved:
System prompt bloat
Memories compiled into the system prompt (contained in system/) should take up about 10% of the total context size (usually ~15-20K tokens). This is a soft target, not a hard requirement.