Alignata
Daily DigestShare
A person in a teal sweater peels a forked-arrow card off a pegboard while a straight-arrow card waits below it, navy outlines, filled black hair.

Daily Digest

Write agent rules as plain commands

Plain command followed 71.6%; if-then only 35.6%.

Daily Digest · Edited by Osbel Morell

Our verdict: Partly

The problem

Most coding agents now read a project rules file at the start of every session, usually AGENTS.md or CLAUDE.md. You write "never commit secrets" or "run the linter before you finish" once, and you expect every session to follow it. Often it doesn't. The rule is in the file, the agent has read it, and it still gets skipped with no warning. Since that one file governs every task, a rule that's quietly ignored costs you on every change.

The technique

Write each rule as a plain command: "Add X to every Y." Don't wrap it in a condition like "If you change Y, add X." A reason after the command ("because our audit system uses it") is fine and sometimes helps.

A new study tested this directly (arXiv:2611.04367). The authors added one checkable rule as the last line of real project rules files across 86 coding tasks. The rule was to put a # @tracked comment under every Python function the agent added or changed. They wrote it four ways: a plain command, a command with a reason, an if-then condition, and a "never do X without Y" ban.

What we saw

On a frontier model in the study, the plain command was followed 71.6% of the time, the version with a reason 49.4%, the condition 35.6%, and the ban 17.3%. On a stronger frontier setup the gaps were smaller, from 78.0% for the command down to 64.2% for the condition. In three of the four model setups, the condition did worse than both the plain command and the command with a reason. Those are their numbers.

Our own check was much smaller: two small open models (3B and 7B), greedy decoding, a realistic rules file with six other conventions, and ten requests to write or fix Python functions. Only the last rule's wording changed. Both small models mostly failed the exact rule, which matches the paper's finding that weaker setups often ignore the file altogether: 0 to 2 of 10 replies per wording and model got the marker in the right place. The clearer signal was whether the model tried at all. With the plain command, the marker showed up in 11 of 20 replies, and the same was true with the reason added. With the ban it showed up in 5 of 20, and with the if-then condition in 2 of 20. When the models did try, they usually put the comment above the function instead of below it.

Limits

The paper used one sentence per wording style, so part of each gap may come from that exact sentence and not the style. It also tested only one kind of rule. Which of the plain command or the command with a reason wins changed from one model to another, so don't assume your best wording carries over to a different agent. Some open-model setups stayed under 21% whatever the wording. Our test is tiny: 10 requests, small models, and one run each. The "tried at all" count is a looser measure than the paper's, and we didn't test whether adding a short example fixes the misplaced comments.

Try it

Open your AGENTS.md or CLAUDE.md and find every rule that starts with "If" or "Never ... without." Rewrite each one as a direct command, and add a short reason where it helps. Pick one rule you can check by machine, like a marker, a file you shouldn't touch, or a command that must run. Then run ten real tasks with the old wording and ten with the new, and count how often the rule was followed.

Sources

Did it work for us?

Partly

Plain commands made our small models try the rule more (11 of 20 vs 2 for if-then), but they rarely got it right.

Found this useful? Send it to someone.

Share