Skip to content

Critical Position

Rule ID: content-critical-position

Detect critical instructions in the middle of files where LLM attention is lowest

Severity info (auto)
Autofix llm
Since v0.7.0

Configuration

Parameter Description Default
min-lines Minimum file length (in lines) before the rule activates 50

Research Basis

Flags critical instructions buried in the middle of files where LLM attention is lowest.

The "lost in the middle" effect is one of the most replicated findings in LLM research. Liu et al. showed that LLM performance follows a U-shaped curve: information at the beginning and end of context is recalled reliably, while information in the middle is significantly degraded. This has been replicated across all tested model families.

The implication for instruction files is clear: if you mark something as IMPORTANT or CRITICAL, it should be at the top of the file — not buried between routine instructions at line 47.

References: