What Markdown Bold Actually Does in an Agent Instruction File
A rule gets skipped, so you make it bold. It happens again with a different rule, so that one goes bold as well, then the warnings, then the thing that broke production once. I did that to my own files for months without ever checking whether the highlighting was doing anything. ๐ There is no bold channel The asterisks are tokens. A model reading your CLAUDE.md , AGENTS.md , GEMINI.md orโฆ
When a rule repeatedly gets skipped in an agent instruction file, it is marked with bold to draw attention. However, there is no explicit mechanism that causes the model to attend to the bolded span differently. Markdown bold is just another character token in the model's input sequence, without any documented path that leads to weighting it more heavily.
In fact, a study by Georgia Tech, UC Berkeley, and Microsoft Research found that reweighting a small subset of attention heads can improve accuracy by 22% for models like LLAMA-7B. Despite the intuition that bolded text should catch the reader's eye, the model's behavior does not reflect this bias.
The concept is not without merit, as human readers often use bold and italics to guide attention, but this is not accurately represented in the model. Existing methods process plain text and do not support emphasis as a mechanism. Anthropic's Claude Code guidance suggests adding emphasis like "IMPORTANT" to a line when a rule keeps getting skipped.
The skills documentation emphasizes using a single word for emphasis and warns that emphasizing multiple lines diminishes their impact. The constraint on SKILL.md is that it has a maximum of 500 lines, meaning that each line serves a purpose and bolding is not a solution for a rule being skipped.
The impact of markdown formatting on LLM performance is still unclear. While bold does no harm, it also does not steer the model's behavior. Bold spans are quite common, with an example file containing 91 bold spans out of 253,612 characters. This amounts to one bold span every three lines, making it difficult for the bolding to stand out and distinguish any particular rule. Therefore, stripping the bold markers likely does not change the model's behavior.
When a rule continues to be skipped, the recommendation is to prune unnecessary rules rather than attempt to emphasize them. Each rule should be evaluated: if removing it would cause mistakes, it should remain. Hard words like "NEVER" or "MUST" are rare enough to be noticeable when they do appear. The best approach is to place rules at the step where they apply, using concise language and avoiding unnecessary markers. A hook, permission rule, or CI check may be more effective in guiding adherence to the desired behavior.
Written by urgent.news from Dev.to's reporting โ not their text. Machine-written โ may contain errors; check the original before relying on it.