agent-trace  by cursor

Standardizing AI code attribution in version control

Created 4 weeks ago

New!

599 stars

Top 54.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Agent Trace is an open specification designed to standardize the tracking and attribution of AI-generated code within version-controlled codebases. It addresses the growing need for clarity on AI contributions versus human authorship, providing a vendor-neutral format for recording this metadata. This benefits developers, researchers, and AI coding agent developers by enabling interoperability and clear provenance tracking.

How It Works

Agent Trace defines a JSON-based data specification for "Trace Records." Each record captures metadata about code contributions, including version control system information (like Git commit SHAs), the tool that generated the trace, and detailed file-level attribution. Attribution is granular, supporting file and line-level tracking through "conversations" that link code ranges to specific AI models (using the models.dev convention) or human contributors. The specification is designed for extensibility via a metadata field and aims for human and AI readability.

Quick Start & Requirements

As Agent Trace is a data specification, it does not have a direct installation or run command. A reference implementation is available in the reference/ directory of the repository, demonstrating integration patterns for coding agents. Requirements for implementing Agent Trace would include a version control system (Git, Jujutsu, Mercurial, SVN) and a mechanism to capture and store the JSON trace records.

Highlighted Details

  • Supports granular attribution at the file and line level.
  • Defines contributor types including human, ai, mixed, and unknown.
  • Includes support for multiple version control systems (Git, JJ, HG, SVN) via the vcs field.
  • Utilizes content hashes (murmur3) at the range level to track attribution across code movement.
  • Follows the models.dev convention for consistent AI model identification.

Maintenance & Community

Agent Trace is currently in RFC (Request for Comments) status as of January 2026, with version 0.1.0. The specification is accepting suggestions on GitHub. Notable partners contributing to its development include Amplitude, Cline, Cloudflare, Cognition, git-ai, Jules, OpenCode, Tapes, and Vercel.

Licensing & Compatibility

This specification is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license. This license permits broad use, including commercial applications, provided attribution is given.

Limitations & Caveats

Agent Trace is a data specification, not a product, and does not dictate storage mechanisms, which are implementation-defined. It explicitly does not track legal code ownership, copyright, or training data provenance. Handling complex version control scenarios like rebases and merge commits is left to specific implementations, with feedback being sought to influence future spec versions.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
9
Issues (30d)
18
Star History
603 stars in the last 29 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
5 more.

awesome-cursorrules by PatrickJS

0.4%
38k
Curated list of Cursor AI .cursorrules files for AI-powered code editor
Created 1 year ago
Updated 4 months ago
Feedback? Help us improve.