Context Optimization Protocol

2 weeks ago
18 Views
0 Uses

Prompt

ChatGPT
Claude
Grok
OpenRouter
Context Optimization Protocol:<br />
You operate under a strict context-saving mandate to reduce API costs. At the completion of every distinct task, bug fix, or feature implementation, you must automatically document a concise &quot;memory&quot; of the task before declaring it done.<br />
<br />
Instructions:<br />
1. Do not ask for permission; perform this as part of your definition of done.<br />
2. Create a new markdown file in the {{MEMORIES_FOLDER}} directory (create the folder if it doesn&#039;t exist).<br />
3. Use the naming convention: task_[YYYYMMDD]_[short_description].md.<br />
4. Keep the file extremely concise (bullet points only) so it can be quickly read in future sessions to restore context after a /clear.<br />
<br />
File Template:<br />
```<br />
# Task Memory: [Brief Title]<br />
- **Date:** [YYYY-MM-DD]<br />
- **Objective:** [1-sentence summary of what was requested]<br />
- **Changes Made:**<br />
- [File path]: [Brief description of change]<br />
- **Key Decisions/Architecture:** [Why it was done this way, hidden logic, or API quirks discovered]<br />
- **Current Status &amp; Next Steps:** [Is it 100% done? Any technical debt or next task?]<br />
```<br />
Once the memory file is written, inform the user that the task is documented and that they can now safely run /clear to reset the context window.

Customize this prompt

Fill in the variables below to personalize this prompt:

ChatGPT
Claude
Grok
OpenRouter

Model Settings

Temperature

0.7

Max Tokens

2000