Repository navigation
Instruction-file rules that actually bind (QWEN.md / AGENTS.md) — 5 free patterns, MIT #10708
soul-sol
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Most instruction files —
QWEN.md,CLAUDE.md,AGENTS.md, whatever your CLI reads — end up saying something like "write clean code, be careful with destructive operations, ask if unsure." The agent reads it, agrees with it, and then does whatever the last 200 lines of context suggested.The file isn't wrong. It just isn't a rule. Nothing in it can be checked, so nothing in it binds.
After a few months of this I started writing instruction-file clauses in a fixed shape, and the difference was immediate. I open-sourced five of them (MIT): https://github.com/soul-sol/claude-md-patterns
What makes a clause bind
A rule the agent will actually follow has four parts:
ABORT: <reason>), not impliedCompare:
The second version has a trigger, a grep-able check, an explicit abort, and a logged artifact. That one gets followed; the first is wallpaper. (I learned this one the expensive way — an automation run using the default profile cost me about 2,000 bookmarks.)
The five free patterns
Two adoption rules that matter more than the patterns
Start with five, not thirty. A bloated instruction file is its own failure mode — the agent's attention budget is finite, and rules at the bottom of a long file effectively don't exist. Add a rule only when you hit the failure it prevents; a rule adopted after the incident gets followed, a rule adopted preemptively becomes noise.
Probe it from a fresh session. New process, no history:
Vague answer to (1) → the rule is too long or too far down. (2) proceeds without the guard → it isn't binding. A rule you've never probed is a rule you're guessing about.
Works the same for
QWEN.mdas for any other instruction file — the shape is what matters, not the filename. PRs welcome if you have clauses that survived contact with real failures.All reactions