
# CLAUDE.md Best Practices: 7 formatting rules for the Machine
I watched an agent ignore a rule I wrote 2 hours earlier. Not a vague rule. A specific one. "run pytest before committing." It was right there in the CLAUDE.md, paragraph two, between the project description and the linting setup. The agent read the file. I saw it in the context. It just... didn't follow it. I moved the same instruction under a ## Testing header, wrapped pytest in backticks, and added a one-line rationale. Next run, the agent followed it to the letter. The instruction didn't change. The signal strength did. In the last post , we got the agent oriented — /bootstrap loads the map, the workflows, the boundaries. But orientation and compliance are different things. You can hand someone a perfect briefing and still lose them if the briefing is a wall of text. Same with agents. The question isn't whether your instructions are loaded. It's whether the agent follows them. The comparison Here's the same instruction, two ways. Version A: When working on this project, always make
Continue reading on Dev.to
Opens in a new tab



