How Attribution Works
Oobo uses a two-tier attribution system:1. Real-Time File-Level Attribution (Preferred)
When a commit has an associated anchor with session links:- Check if each changed file appears in the session’s
files_touchedlist - Assign attribution based on match:
- AI: File appears in
files_touched→ agent wrote/edited this file - Human: No active session touched the file → human wrote it
- Mixed: Session active but file not in
files_touched→ both contributed
- AI: File appears in
src/main.rs, src/lib.rs, README.md
Session link reports: files_touched: ["src/main.rs", "src/lib.rs"]
Attribution:
src/main.rs→ai(in files_touched)src/lib.rs→ai(in files_touched)README.md→human(not in files_touched)
Real-time attribution is accurate — it uses data captured at commit time from active AI sessions.
2. Time-Window Correlation (Fallback)
If no anchor exists for a commit, oobo falls back to correlation:- Find sessions active during commit timestamp ± buffer (5 minutes)
- Match session
project_pathto commit repo - If match found:
- All lines attributed to AI (100% AI)
- Source:
correlation:<tool>
- If no match:
- All lines attributed to human (0% AI)
- Source:
correlation:human
Per-File Attribution Data
Each anchor contains afile_changes array with per-file stats:
File path relative to repo root
Lines added in this file
Lines deleted in this file
ai, human, or mixedWhich agent modified this file (e.g.,
cursor, claude)Aggregate Attribution
Anchors also compute aggregate statistics across all files:AI Contribution
AI Contribution
Human Contribution
Human Contribution
Overall Percentage
Overall Percentage
AI contribution percentage (0.0–100.0)
AI Percentage Calculation
Theai_percentage field represents the portion of net change attributed to AI:
- AI added 40 lines
- Human added 10 lines
ai_percentage = (40 / 50) * 100 = 80.0
Deletions are tracked separately but don’t affect the percentage — only additions factor into AI%.
Attribution Sources
Thesource field in the database indicates how attribution was determined:
| Source | Method | Accuracy |
|---|---|---|
anchor:<agent> | Real-time from anchor with session link | High |
anchor:assisted | Real-time, session active but no agent identified | High |
anchor:human | Real-time, no session linked | High |
correlation:<tool> | Time-window match with session | Medium |
correlation:human | No session match in time window | Medium |
Viewing Attribution
Interactive
Agent Mode (JSON)
Multi-Agent Attribution
When multiple agents contribute to a single commit:agent field shows which specific agent touched each file.
Computing Attribution
Oobo runs attribution automatically during:Attribution Algorithm
src/analytics/attribution.rs for implementation.
Privacy
Attribution data is privacy-safe:- No conversation content included
- File names only (no file contents)
- Aggregate line counts and percentages
- Agent/model identifiers only
Even with transparency
off, attribution data travels with the repo — teammates can see AI vs human stats without reading session transcripts.Use Cases
Developer Insights
Team Analytics
Code Review
- Which agent(s) contributed
- Which files are AI vs human
- Token usage and session duration
Productivity Tracking
Related Concepts
- Anchors — Where attribution data is stored
- Sessions — How
files_touchedis determined - Transparency — Privacy controls for shared repos
