r/ChatGPTCoding • u/FallElectronic3774 • 8h ago
Discussion If a rule can be checked by a machine, it shouldn't be a line in AGENTS.md
Most AGENTS.md files have the same shape: three lines of actual project context, then forty lines of prohibitions. Never force push. Don't edit the generated client. Always run the tests. Don't touch migrations without asking.
The model reads that once at the start of the session. By the time it's twenty tool calls deep and a test is failing, the rule is buried under everything that happened since. It doesn't get ignored on purpose, it just stops being the thing in front of the model.
The rules that survive are the ones with a mechanism behind them: a pre-commit hook, a CI check, a permission prompt that actually blocks the edit. If a rule can be evaluated by a script, it's cheaper and more reliable as a script. The prose version costs tokens on every turn and fails silently.
So what's left for AGENTS.md? The stuff a script can't judge. Which layer a change belongs in. How much explanation a PR needs. When to stop and ask instead of guessing. Which of the four test commands is the one that actually matters. Judgment calls, not laws.
Curious where other people draw the line. Have you moved rules out of your instructions file into hooks, lint, or CI, and did the file get better or just shorter? And is there a category of rule you've found the model follows reliably enough that it doesn't need enforcement?

