DEV Community

Khasky
Khasky

Posted on

What Markdown Bold Actually Does in an Agent Instruction File

Rows of an instruction file where nearly every line is wrapped in green asterisks, so the emphasis no longer marks anything.

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 SKILL.md receives them as characters in a sequence, exactly like every other character in the file, and no documented path runs from "this span is emphasized" to "weight this more heavily".

The intuition comes from somewhere real. The habit is not stupid. A reader's eye lands on bold before they have chosen to read the line, and since the model reads the same file we do, it feels like it should inherit the reflex.

It does not inherit it.

The method that exists because emphasis does not carry

PASTA, from Georgia Tech, UC Berkeley and Microsoft Research, reweights a small subset of attention heads at inference so a model attends to a span the user designates, changes no parameters, and reports a 22% average accuracy improvement for LLAMA-7B.

Its abstract opens on the analogy itself:

In human-written articles, we often leverage the subtleties of
text style, such as bold and italics, to guide the attention of
readers. ... Existing methods, however, are constrained to
process plain text and do not support such a mechanism.
Enter fullscreen mode Exit fullscreen mode

What the three ecosystems document

Anthropic's Claude Code guidance is the most directly useful thing I found:

If Claude keeps skipping one instruction, add emphasis such as
"IMPORTANT" to that line alone. If you emphasize many lines,
none of them stands out.
Enter fullscreen mode Exit fullscreen mode

Two things sit in that sentence. The recommended instrument is a word rather than markup, and the failure mode is named outright by the vendor. 📄

The skills documentation supplies the constraint underneath. A loaded SKILL.md enters the conversation as one message and stays there across later turns, which makes every line a recurring cost, and the stated cap is 500 lines.

Outside Anthropic, the silence says the same thing.

Claude Code    CLAUDE.md, SKILL.md    one word, IMPORTANT, on one line
Codex          AGENTS.md              standard Markdown, no special syntax
Gemini     GEMINI.md              concatenated and sent with every prompt
Enter fullscreen mode Exit fullscreen mode

Three ecosystems, and not one of them documents emphasis as a mechanism.


Format does matter, at a different scale

The opposite overcorrection is also wrong, because prompt formatting is not inert. One study rendered identical content as plain text, Markdown, JSON and YAML and measured all four: GPT-3.5-turbo moved by up to 40% on a code translation task, and GPT-4 held much steadier on the same swap.

Look at what varied. Whole schemes. An inline marker is a far smaller perturbation of the same input, and the sensitivity shrank as the model got stronger.

Then I counted my own file

One skill of mine, four files, 253,612 characters:

SKILL.md                  91 bold spans
platform-posting.md      386
browser-interaction.md   116
post-formatting.md        42
                       -----
                         635
Enter fullscreen mode Exit fullscreen mode

Deleting every asterisk in all four saves 2,540 characters, which is about 1% of the text and a few hundred tokens across the whole skill. So the argument I assumed I would make, the one about token cost, was dead before I started writing it. What is measurable is the density: 91 spans across 264 lines is one every three lines, and at that rate the marker distinguishes nothing. Nobody has benchmarked bold against no bold on an instruction file, so there is no measured penalty to point at, and I am not going to invent one. Bold does no harm, and it does no steering either.


What the count does not license

Do not expect stripping the asterisks to change what the model does. The reason to cut them is that a marker on every third line stops distinguishing anything, for the model reading the file and for whoever has to maintain it.

When the rule keeps getting skipped anyway

The symptom is a rule the model keeps skipping however loudly it is marked. The vendor's own diagnosis is that the file is too long and the rule is getting lost in it, and the fix on the page is to prune rather than to emphasize.

For each line, ask: "Would removing this cause Claude to
make mistakes?" If not, cut it.
Enter fullscreen mode Exit fullscreen mode

A rule that survives that question has earned its line, and a rule that does not was never going to be rescued by asterisks.

What actually moves adherence

Position comes first, so the rule sits at the step where it applies rather than in a preamble, and one or two hard words per file, NEVER or MUST, stay rare enough to register when they appear. For anything that has to hold every time, I reach for a hook, a permission rule or a CI check, because prose asks and a hook decides.

Has anyone measured whether removing the bold from an instruction file changes what their agent does?

Follow me for more on AI, LLMs, and Software Development:

@khasky — LinkedIn / Patreon / GitHub / Bluesky / Mastodon

@khaskydev — X / Threads / Instagram / Pinterest / Facebook

Top comments (0)