AI code percentage

The AI code percentage report measures the share of eligible code changes in daemon-captured commits attributed to supported AI coding agents, including any manual percentage overrides. Use it to validate attribution, establish a captured-code baseline, and find teams or repositories worth investigating.

Note: AI code percentage is not an organization-wide adoption measure until daemon, repository, identity, and supported-tool coverage are credible. Code with no supported agent signal can appear as human-attributed.

When to use AI code percentage

AI code percentage answers the question: What share of the captured code changes in this cohort is attributed to AI, including manual corrections?

This report helps teams:

  • Validate instrumentation — Inspect known commits before relying on aggregated trends.
  • Establish exposure — See where AI-attributed code is landing across time, teams, groups, contributors, repositories, or attributes.
  • Compare captured and merged code — Check whether the attribution mix changes when you include only commits associated with merged PRs.
  • Choose the next investigation — Move from a difference in exposure to the PRs or sessions behind it.

Do not use the report alone to prove productivity, quality, developer adoption, or ROI.

How AI code percentage is calculated

DX calculates the report’s weighted percentage as:

Sum of (each commit’s effective AI percentage × its eligible code changes) ÷ sum of all eligible code changes

The effective percentage is the manual override when one exists; otherwise, it is the daemon-measured percentage. Commits with unmeasured attribution and no override contribute their eligible code changes at 0% AI.

For daemon versions 0.5.63 and later, eligible code changes include additions and deletions. Earlier versions use additions only because they did not track deletions reliably. The calculation weights each commit by its eligible code changes; it does not take a simple average of commit percentages.

An override changes the percentage used for a commit without changing its code-change weight or the original measured percentage.

DX returns no value when the denominator is zero. Time-series intervals with no eligible data are omitted rather than shown as 0%.

What is included

The default All code view includes daemon-reported commits in the selected date range after report filters are applied. The report supports date, team or group, attribute, repository, aggregation, interval, and comparison filters.

Select Merged code to include only captured commits associated with merged PRs. This option appears when pull_request_commits data is available.

The daemon excludes or misses changes in these cases:

  • The daemon was not running on the machine where the work occurred.
  • The repository was not imported into DX or its local remote could not be matched.
  • The coding agent was unsupported, its integration was unavailable, or the code was pasted from a browser.
  • The file was binary, vendored, generated, or matched an administrator-defined exclusion.
  • The change occurred before installation.

The report also excludes recognized merge-branch commits and source-control commit rows marked as deleted.

Understand 0%, missing data, and coverage

For an individual commit, a measured 0% AI means DX recorded no AI-attributed changes in the eligible captured denominator. It does not prove that every change was written without AI. Unsupported tools, pasted code, missed hook events, and work outside monitored scope can all lack an AI signal. A dash in the commit drilldown indicates unmeasured attribution; these commits contribute at 0% in aggregate calculations unless overridden. Values marked Edited reflect manual overrides.

A missing value means DX could not calculate a percentage for that interval or cohort, usually because no eligible code changes were present.

Use Verify deployment to check a known commit and document the following coverage before sharing an aggregate result:

  • Developers and machines in scope
  • Monitored repositories and remote-URL matching
  • Supported coding agents and installed integrations
  • Daemon versions and identity linking
  • Date when collection began

Inspect individual commits

Open a chart point or breakdown row to review the commits behind it. The drilldown includes commit message, author, total changes, AI code percentage, timestamp, commit SHA, and source-control link when available.

For a known commit, compare the reported percentage with the developer’s understanding of the accepted AI and manual changes.

Correct a commit’s AI percentage

  1. Hover over the commit row and click the pencil icon next to AI code %.
  2. Enter a percentage from 0 to 100 and click Save.

Developers can edit commits linked to their DX user. Workspace admins and Data Cloud admins can edit any commit they can access. If the edit control is missing on your own commit, ask an admin to check its Git email mapping.

The corrected percentage appears in the row with an Edited indicator and is used in the report’s weighted calculations. Click the pencil icon again to change the override.