AGENTS.md saying "run tests after edits" works until the agent decides it knows better, or the context window gets long enough that it deprioritizes the instruction. The language you write agents in matters way less than the state layer they operate on.
Ive been using ctlsurf for this -- structured blocks agents read and write through MCP. Task checklists the agent checks off, key-value state it updates, append-only logs of what it did. The project owns that state, not the agent session. Instead of "put a rule in AGENTS.md" you have actual task state the agent queries and updates, and a human can see exactly where it is.
The whole thread is debating Go vs Rust vs Python but the language is maybe 10% of what makes an agent reliable in production. The other 90% is state management, and right now most people are doing that with flat files.
Add a single task using your project's preferred task-runner that performs all the checks you want the agent to adhere to: linting, test coverage, style checks, test, etc, and add a rule in AGENTS.md that agents should always run this tasks after edits, and fix any warnings or errors produced.
Add the same task to your version management's pre-merge checks, in case the agent (or colleague) forgets to check before pushing. This was good practice since before LLMs, but I never was a fan of having such checks to pre-commit hooks.