commit, push, merge), it builds an anchor for that commit, capturing which AI sessions contributed, token usage, and per-file attribution.
What an Anchor Contains
Each anchor records:Core Commit Data
Core Commit Data
Full SHA-1 hash of the git commit
Branch name where the commit was made
Git author (always the human who owns the repo)
Commit message
Unix timestamp (seconds)
Version of oobo that created the anchor
Change Statistics
Change Statistics
AI Context
AI Context
UUIDs of AI sessions linked to this commit
Who authored the commit and how AI was involved:
agent: AI autonomously committed (non-interactive terminal + active session)assisted: Human committed while collaborating with AI (interactive + active session)human: Human committed with no AI involvementautomated: CI/CD or script (non-interactive, no AI session)
All contributors to this commit (humans and AI agents). Each contributor has:
name: Contributor identifierrole:humanoragentmodel: AI model used (only for agents)
Code Attribution
Code Attribution
Lines added by AI across all files
Lines deleted by AI across all files
Lines added by human across all files
Lines deleted by human across all files
AI contribution percentage (0.0–100.0)
Per-File Attribution
Each entry infile_changes contains:
File path relative to repo root
Lines added in this file
Lines deleted in this file
How the file was authored:
ai: AI agent wrote/edited this file (appears in session’sfiles_touched)human: Human wrote this file (no AI session touched it)mixed: Both AI and human contributed (AI session active but file not infiles_touched)
Which agent touched this file (if attribution is
ai or mixed)AuthorType Explained
Theauthor_type field distinguishes different commit scenarios:
Agent
AI autonomously committed code without human interaction. Detected when:- Commit made from non-interactive terminal
- Active AI session at commit time
- Used by CLI agents like Codex, Gemini CLI, OpenCode
Assisted
Human committed while actively collaborating with AI. Detected when:- Commit made from interactive terminal
- Active AI session at commit time
- Common with IDE tools like Cursor, Claude Code
Human
Human committed with no AI involvement. Detected when:- No active AI session during commit
- All code attribution is human
Automated
CI/CD system or script committed. Detected when:- Commit made from non-interactive environment
- No AI session present
- Typical for GitHub Actions, build bots
oobo determines interactivity by checking if stdin is a TTY. This distinction helps separate autonomous agent commits from human-assisted ones.
Anchor Lifecycle
1. Creation
Anchors are created automatically on every git write operation:2. Storage
Anchors are stored in two places:Local SQLite Database
- Location:
~/.oobo/oobo.db - Stores full anchor JSON plus session links
- Used for analytics and queries
- Never leaves your machine unless you configure an endpoint
Git Orphan Branch
- Branch name:
oobo/anchors/v1 - Created automatically on first commit
- Syncs with
git push/pulllike any branch - Layout:
The orphan branch is always created and synced — anchor metadata travels with the repo. Session transcripts are only added when transparency mode is
on.3. Sync Across Machines
When you push:Anchors sync seamlessly across your machines via git. The orphan branch ensures metadata is always available, even in fresh clones.
4. Hydration
Oobo automatically hydrates the local database from the orphan branch:- On first use in a new clone
- When anchors exist on the branch but not in SQLite
- Skips anchors already present in the database
Storage Architecture
The orphan branch uses a sharded directory structure for performance:- Commit hashes are sharded by first 2 characters for scalability
- Each commit gets a directory:
<prefix>/<rest>/ - Session metadata is numbered:
1/,2/, etc. - Transcripts are redacted with gitleaks patterns before writing
Code Example
Here’s what a minimal anchor looks like in JSON:Related Concepts
- Sessions — How AI sessions are discovered and linked
- Attribution — How oobo determines AI vs human code
- Transparency — What data goes on the orphan branch
