Overview
TheContributor 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 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")
Whether this contributor is a human or AI agent.See ContributorRole enum for possible values.
The AI model used (only present for AI agents).Examples:
"claude-sonnet-4-20250514", "gpt-4o", "claude-opus-4"ContributorRole Enum
| Value | Description |
|---|---|
human | A human developer |
agent | An AI agent/tool |
Example JSON
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:
contributorshas 1 human - Assisted commit:
contributorshas 1+ humans and 1+ agents - Agent commit:
contributorshas only agents (butauthoris still the human)
Related Types
- Anchor - The parent commit structure that contains contributors
- SessionLink - Session metadata that identifies agents and models
- FileChange - Per-file attribution that uses contributor data
