Skip to main content

Overview

The Contributor struct represents an individual contributor to a commit, whether human or AI agent. Each anchor maintains a list of contributors to provide clear attribution for collaborative work.

Contributor Fields

name
string
required
Name of the contributor.
  • For humans: Git author name and email (e.g., "Alice <[email protected]>")
  • For AI agents: Tool name (e.g., "cursor", "claude", "windsurf")
role
ContributorRole
required
Whether this contributor is a human or AI agent.See ContributorRole enum for possible values.
model
string
The AI model used (only present for AI agents).Examples: "claude-sonnet-4-20250514", "gpt-4o", "claude-opus-4"

ContributorRole Enum

ValueDescription
humanA human developer
agentAn AI agent/tool

Example JSON

{
  "name": "Alice <[email protected]>",
  "role": "human"
}
The model field is omitted from JSON when null or when the tool doesn’t report model information.

Usage Examples

Contributor vs Author

Key distinction: The author field in an Anchor is always the git author (the human who owns the repo). The contributors list provides the full picture of who actually contributed to the changes.
  • Human-only commit: contributors has 1 human
  • Assisted commit: contributors has 1+ humans and 1+ agents
  • Agent commit: contributors has only agents (but author is still the human)
  • Anchor - The parent commit structure that contains contributors
  • SessionLink - Session metadata that identifies agents and models
  • FileChange - Per-file attribution that uses contributor data

Build docs developers (and LLMs) love