---
title: "Rules the agent cannot break · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break
updated: 2026-10-20
licence: "All rights reserved"
---

# Rules the agent cannot break

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

> Agents forget instructions, so turn every rule that matters into a linter, test, build gate or hook that stops the work when it is broken.

**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 ai development playbook: https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break`.

## Required

- [Use strict types and linters](https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break/strict-tooling): Run the strictest type checker and linter settings the project can pass, so mistakes fail fast instead of reaching review.
- [Protect the checks themselves](https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break/protect-the-checks): Never let an agent pass a check by weakening it. Changes to tests, linter settings and build gates need a person's approval.

## Recommended

- [Block dangerous actions with hooks](https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break/blocking-hooks): Use the agent's hooks or permission rules to block actions that must never happen, instead of trusting instructions.

- Previous: [Working in small steps](https://agentwranglers.se/playbook/ai-assisted-development/working-in-small-steps)
- Next: [Reviewing agent output](https://agentwranglers.se/playbook/ai-assisted-development/reviewing-agent-output)
- [All chapters](https://agentwranglers.se/playbook/ai-assisted-development)
