AID-48Recommended
Mark which changes an agent wrote
Every commit an agent wrote ends with a trailer that names the tool and the model ID. Every pull request with such a commit carries one label, such as agent-written.
How to do it
Tell the agent in the instructions file to end each commit with a trailer, such as Assisted-by: Claude Code claude-opus-5-5. The Linux kernel uses the same Assisted-by: trailer for AI tools. Name the exact model ID, not a family name, so you can tell results from two model versions apart. Many agents add their own trailer, such as Co-Authored-By, so pick one form and check for it. A CI job adds the label when any commit in the pull request has the trailer. Then link incidents and reverts back to the commits that caused them. Compare the labelled changes as Measure delivery instead of lines of code says.
Examples
Shell example
git log --since="1 month ago" --grep="^Assisted-by: " --oneline | wc -l
How to check
A CI job fails a pull request from an agent branch, such as one named agent/…, when a commit lacks the trailer. A script counts trailers in the last month, and the monthly note compares the failure rate of marked and unmarked changes.
Sources
Related rules
- ENG-54 Track the five delivery measures in Engineering
- AID-65 Cap open agent pull requests at what people can review in AI-assisted development
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/ai-assisted-development/measuring-and-improving/label-agent-changes">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.