---
title: "Name the principle and the fix in every · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/code-review/name-principle-code-fix
updated: 2026-10-20
licence: "All rights reserved"
---

# Name the principle and the fix in every finding

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

- Level: Required
- Chapter: [Code review](https://agentwranglers.se/playbook/architecture/code-review)
- Rule: Every finding names the broken principle, the exact file and line, and a concrete fix. "This feels messy" is not a finding.
- How: Write each finding in three parts. Name the principle, such as Single Responsibility or the Law of Demeter. Point to the file and line. Show or describe the change that fixes it.
- Check: Each finding in the review has all three parts. Findings without a file and line are removed.

Example:

```markdown
3.3 Single Responsibility
- Code: src/orders/OrderService.php:40-112, `placeOrder()` saves the order, charges the card and sends the email
- Fix: move charging to `PaymentGateway::charge()` and email to `OrderMailer::sendConfirmation()`
```

**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/name-principle-code-fix`.

- Previous: [Keep it simple to maintain](https://agentwranglers.se/playbook/architecture/code-review/simple-to-maintain)
- Next: [Stay consistent with the codebase](https://agentwranglers.se/playbook/architecture/code-review/consistent-with-the-codebase)
- [Code review](https://agentwranglers.se/playbook/architecture/code-review)
