Skip to content

Fix attribution for deletion-only agent work #121

@jcleira

Description

@jcleira

Description

When an AI agent performs a deletion-only change (removes dead code, cleans up files), there are no added lines. The current binary attribution logic incorrectly attributes this as 0% agent work because it relies on detecting added lines.

Fix

Update internal/attribution/ so that any diff (additions OR deletions OR both) is treated as agent work when the agent was active during the commit:

  • Agent detected + any diff present → 100% agent attribution
  • Agent not detected → 0% agent attribution

The binary model stays the same; only the detection of "work was done" needs to include deletions.

Why this matters

Refactoring commits that only delete code (removing dead functions, cleaning up imports) are attributed as human work today. When an AI agent performs this work, the session and reasoning should be captured in the checkpoint.

Source

Inspired by entireio/cli PR#814 (changelog 0.5.2): Fix attribution for deletion-only agent work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions