Skip to main content

Overview

The Anchor struct is the core data structure that enriches git commits with AI context. Every commit gets exactly one anchor, which captures authorship attribution, AI session metadata, and detailed file-level statistics.

Anchor Fields

oobo_version
string
required
The version of oobo that created this anchor.
commit_hash
string
required
The git commit SHA hash.
branch
string
required
The git branch where the commit was made.
author
string
required
Git author - always the human who owns the repository.
author_type
AuthorType
required
Who authored the commit and how AI was involved.See AuthorType enum for possible values.
contributors
Contributor[]
All contributors to this commit - human(s) and AI tool(s).See Contributor struct for details.
committed_at
integer
required
Unix timestamp (seconds) when the commit was created.
message
string
required
The git commit message.
files_changed
string[]
required
List of file paths modified in this commit.
lines_added
integer
required
Total lines added across all files.
lines_deleted
integer
required
Total lines deleted across all files.
file_changes
FileChange[]
Per-file breakdown with line counts and AI/human attribution.See FileChange struct for details.
ai_lines_added
integer
default:0
Aggregate: lines added by AI across all files.
ai_lines_deleted
integer
default:0
Aggregate: lines deleted by AI across all files.
human_lines_added
integer
default:0
Aggregate: lines added by human across all files.
human_lines_deleted
integer
default:0
Aggregate: lines deleted by human across all files.
ai_percentage
float
AI contribution percentage (0.0-100.0).
session_ids
string[]
required
List of AI session IDs linked to this commit.
summary
string
AI-generated summary of the commit.
intent
string
AI-detected intent behind the changes.
reasoning
string
AI-generated reasoning about the changes.
transparency_mode
TransparencyMode
required
Whether redacted session transcripts are included alongside anchor metadata on the orphan branch.See TransparencyMode enum for possible values.

AuthorType Enum

Determines who authored the commit and how AI was involved.
ValueDescription
agentAI autonomously committed (non-interactive terminal + active session)
assistedHuman committed while collaborating with AI (interactive + active session)
humanHuman committed with no AI involvement (default)
automatedCI/CD or script (non-interactive, no AI session)

TransparencyMode Enum

Controls whether redacted session transcripts are included on the orphan branch. Anchor metadata is always written to the branch (unless the project is ignored); this flag only controls transcripts.
ValueDescription
offMetadata only - no transcripts on the orphan branch (default)
onMetadata + redacted transcripts on the orphan branch

Example JSON

{
  "oobo_version": "0.1.0",
  "commit_hash": "abc123",
  "branch": "main",
  "author": "Test <[email protected]>",
  "author_type": "assisted",
  "contributors": [
    {
      "name": "Test <[email protected]>",
      "role": "human",
      "model": null
    },
    {
      "name": "cursor",
      "role": "agent",
      "model": "claude-sonnet-4-20250514"
    }
  ],
  "committed_at": 1700000000,
  "message": "test commit",
  "files_changed": ["src/main.rs"],
  "lines_added": 10,
  "lines_deleted": 3,
  "file_changes": [
    {
      "path": "src/main.rs",
      "lines_added": 10,
      "lines_deleted": 3,
      "attribution": "ai",
      "agent": "cursor"
    }
  ],
  "ai_lines_added": 10,
  "ai_lines_deleted": 3,
  "human_lines_added": 0,
  "human_lines_deleted": 0,
  "ai_percentage": 100.0,
  "session_ids": ["sess-1"],
  "summary": "Test summary",
  "intent": null,
  "reasoning": null,
  "transparency_mode": "off"
}
Optional fields like contributors, file_changes, summary, intent, and reasoning are omitted from JSON when empty or null.
  • Contributor - Individual contributors (human or AI) to a commit
  • FileChange - Per-file change metadata with attribution
  • Session - AI session metadata linked to commits

Build docs developers (and LLMs) love