# Context Hygiene Context hygiene is the practice of actively managing, pruning, and maintaining the quality of AI context throughout its lifecycle. It is listed as a key principle in [[Context Engineering]]: actively manage context throughout a conversation; clear, compact, or reset when context becomes bloated. Without hygiene practices, AI context inevitably suffers from [[Context Bloat]] (accumulation without pruning), [[Context Drift]] (gradual misalignment with reality), and [[AI Context Rot]] (overall quality degradation over time). Concrete hygiene practices include: - **Pruning**: regularly removing outdated, redundant, or contradictory entries from CLAUDE.md files, memory systems, and skills - **Consolidating**: merging multiple entries that say similar things into a single, authoritative statement - **Timestamping**: adding dates to context entries so staleness is visible (the [[Law of staleness]] applies directly) - **Validating**: periodically checking that referenced files, functions, tools, and conventions still exist - **Scoping**: ensuring each context entry has a clear purpose and audience; removing vague or aspirational entries - **Versioning**: keeping context in version control so changes are traceable and reversible The key insight is that context maintenance is not a one-time setup task. It's ongoing work, similar to code maintenance or [[Knowledge Management (KM)]]. The higher the [[Levels of AI Context Management|level of AI context management]], the more surface area requires hygiene. ## References - ## Related - [[Context Engineering]] - [[Context Bloat]] - [[Context Drift]] - [[AI Context Rot]] - [[Law of staleness]] - [[Token Budget]] - [[Levels of AI Context Management]] - [[Claude Code Memory]] - [[Knowledge Management (KM)]] - [[Context Anchoring]] - [[AI Instruction Drift]]