Writing an AGENTS.md That Actually Reduces Bugs

Most agent instruction files are a list of vibes. Here is what belongs in one, based on which rules measurably changed the output.

Writing an AGENTS.md That Actually Reduces Bugs. Abstract ai tooling illustration in orange and dark grey on debugly.dev
Instead of a rule saying Use
Never catch bare exceptions ESLint no-empty, Ruff BLE001
Always filter by tenant_id A repository layer that requires it in the type
Money is integer paise A Paise branded type
No I/O in loops A query count assertion in tests
Config must fail fast A schema validated at startup with Zod or Pydantic
Do not use this deprecated helper @deprecated plus an ESLint rule

Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud