← Files AI PsychiatryARCHIVED FILE
.ai/guides/context-starvation.md
2.35 KB · Oct 4, 2026 · 12:30 UTC
# Context Starvation and Context Balance Context efficiency means loading the smallest context sufficient for reliable execution. It does not mean minimizing context at any cost. Both overload and starvation degrade decisions. ## Observable signals Starvation appears as repeated unsupported assumptions, edits inconsistent with established architecture, missed repository conventions, duplicated functionality, guessed dependency behavior, forgotten user requirements, missing security constraints, or summaries that omit blockers and proof. Overload appears when broad repository reads, raw logs, obsolete hypotheses, or unrelated documentation obscure the current decision and consume attention without reducing uncertainty. Memory starvation is related: stable, validated, reusable, expensive-to-rediscover knowledge is repeatedly re-derived because nothing durable is preserved. Memory pollution is the opposite: speculation or temporary debugging becomes durable truth. ## Intervention Before compression preserve the objective, Definition of Done, explicit requirements, architecture constraints, security constraints, important evidence, decisions, blockers, and remaining work. Remove repetition, abandoned hypotheses, obsolete speculation, and verbose raw output. Validate the required-field set after compression. When starvation triggers, stop execution temporarily. Name the missing knowledge precisely. Load only its smallest authoritative source: a direct implementation file, caller, test, configuration, repository instruction, or architecture record. Update current understanding and continue. Do not load the whole repository. Before promoting memory, verify its source, confidence, stability, and reuse value. Repository evidence always overrides memory. Mark obsolete or contradicted records so they cannot silently guide later tasks. ## Recovery Restore missing required meaning from authoritative evidence. Correct any edit or assumption made under starvation. For overload, compress redundancy and route future reads through the context index. Promote only stable validated facts that would otherwise be expensive to rediscover. ## Stop condition Stop loading context when the current decision is reliable, critical unknowns are resolved, and additional sources are unlikely to change it. Stop compressing when all required fields are preserved and the summary is usable.
SHA-256: 40b6fd3e8f64ba06dd9e57190eecbf980ae5fcff9056141a2c4bd17a8c64a7ac