Human vs. AI – Diff-based line-level provenance for text under agentic editing
TL;DR Highlight
Git history alone gives line-level scores for human versus agent authorship, no file markup needed
Who Should Read
A developer worried that coding agents overwrite code or README openers they wrote by hand
Core Mechanics
- A tool to keep human-written lines safe
- Text a human wrote or edited should be treated as close to sacred, and agents should be hesitant to touch it.
- Agent-made slop is fair game for edits.
- It works from version history, not markup
- Plain text such as markdown must work as is.
- It only relies on every version having an identifiable author, human or agent.
- Output is islands in a sea
- Human-authored lines are islands inside a sea of machine text.
- It tracks coherent pieces of text, not just single lines.
- Joining, splitting and dilution are handled so results do not collapse into all sea or all island.
- The CLI prints a 0 to 1 score per range
- 1.00 means fully human and 0.00 means fully agent.
- 0.46 means human-written originally but modified by agents to some degree.
- Example: us-vs-them --ours dan@eighttrigrams.net README.md
Community Reactions
- Commits often carry the human's name anyway
- One commenter said that when an agent works locally, all git commits have their authorship.
- That makes history-based separation harder.
- Who wrote it should not matter
- One view was that risky code should carry comments, regardless of how the bytes were generated.
- They understood the README opener use case.
- A team already does similar tracking
- One team also marks lines that are AI generated but human modified.
- They count any change of 1 character or more.
- Annotations work but are sometimes ignored
- One commenter uses annotations and said agents ignore them in maybe 1 of 100 cases.
- They still see enough cases to notice it.
How to Apply
- Separate agent commit authors first
- Set a different git user.email for agent work today.
- This builds history that tools like us-vs-them can use.
- Add a README opener rule to agent instructions
- Add a line to a file like CLAUDE.md telling agents not to edit the human-rewritten opener.
- Allow them to rewrite or append the lower parts.
- Gate writes with degradations
- In a Clojure project, call degradations on the agent's proposed version before writing.
- Write the file only when the result is empty.
Try It
# Prompt for Claude Code (simplified version of the us-vs-them idea)
From now on, follow these rules when editing {{file path}}.
- Use git log to check who changed each line of this file.
- Treat lines authored by {{my email}} as human-written and do not edit them without a strong reason.
- Lines by any other author may be edited freely.
- If you must change a human line, explain why first and ask for permission.
First, list the ranges of human-written lines.
Next steps: to compare with the original CLI, install bbin, run make install, then run us-vs-them --ours {{my email}} {{file path}}.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.