---
title: "Keep change history out of comments · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/comments/no-journal-comments
updated: 2026-10-20
licence: "All rights reserved"
---

# Keep change history out of comments

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

- Level: Recommended
- Chapter: [Comments](https://agentwranglers.se/playbook/architecture/comments)
- Rule: Keep change logs, author names, dates and ticket histories out of the code. Version control records who changed what and why.
- How: Write the reason in the commit message and link the ticket there. Use `git blame` or `git log` to find the author and the history of a line. Remove file headers that only list authors and edits.
- Check: A script or linter rule fails on comments such as `@author`, `Changed by`, `Modified on` or a date at the start of a comment.

Example:

```js
// Bad
// 2026-03-02 (Anna): fixed rounding for EUR
// 2026-04-11 (Ben): added SEK, see ticket SHOP-412
function roundPrice(amount, currency) { /* ... */ }

// Good: the history is in git, the code shows the rule
function roundPrice(amount, currency) { /* ... */ }
```

```sh
grep -rnE '(@author|Changed by|Modified (on|by)|//\s*[0-9]{4}-[0-9]{2}-[0-9]{2})' src/ && exit 1 || exit 0
```

```python
# Bad
# 2026-03-02 (Anna): fixed rounding for EUR
def round_price(amount, currency): ...

# Good: the history is in git, the code shows the rule
def round_price(amount, currency): ...
```

**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/comments/no-journal-comments`.

- Previous: [Delete commented-out code](https://agentwranglers.se/playbook/architecture/comments/no-commented-out-code)
- Next: [Say why, not what](https://agentwranglers.se/playbook/architecture/comments/comments-say-why)
- [Comments](https://agentwranglers.se/playbook/architecture/comments)
