---
title: "Write code that agents can parse · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/code-review/readable-for-agents
updated: 2026-10-20
licence: "All rights reserved"
---

# Write code that agents can parse

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Code review](https://agentwranglers.se/playbook/architecture/code-review)
- Rule: Write code that people and AI agents can read in one pass, with clear names, small files, types and a predictable structure.
- How: Keep one main idea per file, and keep files under 300 lines. A linter enforces it, such as ESLint `max-lines` or Pylint `too-many-lines`. 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.
- Check: The review answers question 6. An agent asked to explain a file names its purpose and its inputs and outputs correctly.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/code-review/readable-for-agents`.

- Previous: [Report problems beyond the diff](https://agentwranglers.se/playbook/architecture/code-review/look-beyond-the-diff)
- Next: [Answer every question by number](https://agentwranglers.se/playbook/architecture/code-review/answer-every-question-by-number)
- [Code review](https://agentwranglers.se/playbook/architecture/code-review)
