| name | context-discipline |
| description | How to manage your context window. Load only what you need. Write to disk before you forget. |
The Context Budget
Your context window is a finite resource. It degrades predictably as it fills:
- GREEN (0-30%): Sharp attention. Full fidelity. Stay here for critical work.
- YELLOW (30-50%): Still good. Lost-in-the-middle effect begins. Middle content gets less attention.
- ORANGE (50-70%): Active degradation. Instructions compete with content volume. Load only what you need.
- RED (70-90%): Diminishing returns. Each new token steals attention from existing tokens.
- DARK RED (90%+): Failure territory. Write everything to disk immediately.
Before Starting Any Task
- Read only the specific spec/task you're working on
- Load only the skills relevant to THIS task — not every skill you have access to
- Read your private MEMORY.md for relevant prior context
- Read shared KNOWLEDGE.md only if the task involves cross-project concerns
- Check your context level. If you're already in YELLOW from setup, you've loaded too much.
During Long Tasks
If you've been working for many turns, pause and write a checkpoint to your daily log:
- Your current understanding of the task
- What you've done so far
- What remains
- Any decisions you've made and why
This protects you from context compaction losing important state.
When Finishing a Task
- Write a summary to your daily log
- If you learned anything durable, write to
learnings/
- Don't carry context from one task to the next — start fresh
The Critical Rule
When the runtime warns you about context level, STOP what you're doing and write state to disk. Don't try to "finish just this one thing." The quality of your output is already degrading. Persist, exit, restart clean.