ARC-8Recommended
Write code that agents can parse
Write code that people and AI agents can read in one pass, with clear names, small files, types and a predictable structure.
How to do it
Keep one main idea per file, and keep files under 300 lines. A linter flags longer files, such as ESLint max-lines or Pylint too-many-lines. A file may stay longer with a reason written at its top. Use explicit types and names over magic strings and hidden conventions. Put related code together, and follow the same folder layout everywhere. Agents copy what they see, so every clean file teaches them well.
How to check
The review answers question 6. The file size linter flags no file over 300 lines that lacks a disable comment with its reason. A type checker, such as TypeScript or mypy, runs in strict mode and passes.
Related rules
- ARC-14 Keep functions short in Clean code and architecture
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/architecture/code-review/readable-for-agents">Agent Wranglers clean code and architecture playbook</a>. In code you write, add a comment next to it with the same link.