# content-critical-position !!! warning "Deprecated" Deprecated since v0.18.0 and will be removed in a future release. This rule no longer runs under `enabled: auto`; set `enabled: true` explicitly to keep it during the transition. Built on the lost-in-the-middle attention research: instructions in the middle 20–80% of a long file were assumed to be the most likely to be dropped. Models still show that attention dip, but it occurs across a long context window, not within a single skill or instruction file loaded on its own. Where a line sits inside one file says little about where it lands in the context, so moving CRITICAL lines to the edges of a file was not worth the churn. Detect critical instructions in the middle of files where LLM attention is lowest | | | |---|---| | **Severity** | info (deprecated) | | **Autofix** | - | | **Since** | v0.7.0 | | **Category** | [Deprecated](deprecated.md) | ## Why LLM attention is strongest at the beginning and end of context and weakest in the middle (the "lost in the middle" effect, Liu et al. 2023). An instruction marked CRITICAL, IMPORTANT, or MUST that sits in the middle of a long file is the one most likely to be silently dropped — the emphasis signals it matters, but its position works against it. This rule only activates on files with at least `min-lines` lines (default 50); short files do not exhibit a meaningful middle. An emphasized instruction is flagged when it falls between the first 20% and the last 20% of the file. ## Examples **Bad** (line 80 of a 160-line CLAUDE.md): ```markdown **CRITICAL**: Never push directly to main. ``` **Good** (same instruction, first section of the file): ```markdown # Project rules **CRITICAL**: Never push directly to main. ``` ## How to fix Move emphasized instructions into the first or last 20% of the file — typically a "Rules" or "Critical" section at the top. If everything is marked critical, nothing is: demote emphasis on lines that are merely informative. ## Tuning Raise `min-lines` if you maintain long files deliberately and only want the rule to fire on very large ones: ```yaml rules: content-critical-position: min-lines: 100 ``` ## Configuration ```yaml rules: content-critical-position: enabled: true # true | false | auto severity: info ``` | 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:** - Liu et al., [Lost in the Middle: How Language Models Use Long Contexts](https://arxiv.org/abs/2307.03172) (arXiv:2307.03172, TACL 2024) — The foundational U-shaped attention curve paper - [Serial Position Effects of Large Language Models](https://arxiv.org/abs/2406.15981) (arXiv:2406.15981, Jun 2024) — Confirms primacy and recency biases analogous to human cognition - Chroma Research, [Context Rot: How Increasing Input Tokens Impacts LLM Performance](https://research.trychroma.com/context-rot) (Jul 2025) — Tested 18 frontier models, confirms lost-in-the-middle across all of them *Run `skillsaw explain content-critical-position` to see this documentation and the rule's effective configuration in your terminal.*