A ~3K-token AGENTS.md rule set to stop coding agents from going off the rails
akumaburn · reddit · 2026-10-24
A developer shared an updated generic, software-oriented AGENTS.md global rule file (3K context; the format is adopted by 60,000+ open-source projects and tools like Codex, Cursor, and Gemini CLI) aimed at curbing LLM agent misbehavior. Key sections:
- Epistemics: source-of-truth hierarchy (running system > code > everything else); verify assumptions with evidence — a screenshot is a claim, observed behavior is fact; distinguish verified facts from inference; tests must be able to fail
- Understanding before action: breadth before depth, map files/interfaces/callers before editing; assess blast radius; ask for clarification only when it materially affects correctness, architecture, or safety
- Design: follow the codebase's conventions, single responsibility, dependency inversion, interface segregation, open-closed principle
The author says it could be compacted further and offers it as a starting point for anyone tired of course-correcting their agents.
More from coding & agent
- Builder pairs Grok Bot for firmware with locally-run Hermes Agent inside a Stack-chan robot — alexcovo_eth · 2026-10-24
- 30% of Git modelled in Lean 4 with coding agents, 8,000+ theorems proven, 100+ potential bugs found — kfountou · 2026-10-24
- REA-Prompts hits 1,700+ GitHub stars in days: prompts that make coding agents reverse-engineer any software — Promptmethus · 2026-10-24
- Kimi K3.1 Pro stumbles on a real agent coding task: ordering errors sink the build — QuixiAI · 2026-10-24
- Veteran's advice: stop relying on specs alone, just talk to your LLM — MoonL88537 · 2026-10-24
- Agent orchestration tip: skip goal, use a manager agent with scheduled polling — pvncher · 2026-10-24