Context Lifecycle: Document, Clear, Resume
intermediate 12 min 📋 Copy-paste ready
Sources not yet verified
Scenario
Context: You're working on a complex task and notice the AI's responses are degrading in quality
Goal: Learn the Document & Clear pattern and phased workflow for maintaining high-quality AI output
Anti-pattern: Letting context accumulate until quality degrades, trusting auto-compaction
Tools: Claude CodeGitHub CopilotCursor
Key Takeaways
- Use `/clear` to reset context when <50% remains relevant (works in both Claude Code and Copilot)
- Document state to external files BEFORE clearing - create durable memory
- Research → Plan → Implement: Clear context between phases for focused work
- Review the plan before implementation - highest leverage review point
- Keep context utilization at 40-60% for optimal quality
Try It Yourself
Prompt Template
Before clearing, summarize current progress to a markdown file:
Please write a progress summary to `docs/progress.md` with:
1. What's completed
2. Key decisions made
3. Next steps
Then I'll use /clear to reset context. Variations to Try
- Simple clear: Just use `/clear` for a fresh start
- Research phase: "Explore the codebase for [topic]. Don't write code yet - just document findings."
- Plan phase: "Read [research file] and create an implementation plan in [plan file]."
- Resume: "Read [progress file] and continue with the next steps."
Sources
Tempered AI — Forged Through Practice, Not Hype
? Keyboard shortcuts