A new open-source project called us-vs-them tracks which lines in a file were written by a human and which by an AI — using diff history, not inline annotations.
The core ideas:
- Diff-based attribution: provenance derived from change history, not metadata tags or inline markers
- Line-level granularity: authorship tracked per line, not per file or per function
- Built for agentic editing: designed for workflows where AI agents and humans both modify the same files
When Cursor, Claude Code, or Copilot agents rewrite parts of a file, human-authored and AI-generated lines coexist. Without provenance, you lose track of which is which — and that matters for code review, accountability, and debugging AI-introduced changes.
| Approach | How it works | Trade-off |
|---|---|---|
| Annotations | Inline tags mark authorship per edit | Requires discipline; every edit must be tagged |
| Diff-based (us-vs-them) | Derives authorship from git change history | Passive but fragile under merges and refactors |
The HN commenter gritzko noted they already use annotations for this. Annotations are explicit but require every edit to be tagged — miss one and the trail breaks. Diff-based provenance is passive: it falls out of the version control history you already have.
NOTE
The repo is at github.com/eighttrigrams/us-vs-them — early stage, 24 points on HN, worth tracking if you’re building audit trails for agentic coding workflows.