Skip to content

DOC: Define commit message attribution rules for AI-assisted contributions #6055

@hjmjohnson

Description

@hjmjohnson

Propose formal attribution rules for commit messages when AI tools assist with ITK contributions.

Core principles:

  • Co-Authored-By: is reserved for humans whose intellectual contribution materially shaped the commit
  • AI tools never receive Co-Authored-By: — the human who prompted, reviewed, and committed bears authorship responsibility
  • AI assistance is acknowledged only when substantive (root-cause analysis, non-obvious algorithm design) — never for mechanical changes
  • Reviewer Co-Authored-By: is encouraged to promote positive community interaction and recognize the real work of code review
  • External context (Discourse threads, issues, emails) that informed a PR gets prose attribution with stable links
Proposed format

Substantive AI contribution (structured trailer):

Tool-Assisted: Claude Code (claude-opus-4-6)
  Role: root-cause analysis, hypothesis testing
  Contribution: identified CCACHE_NODIRECT=1 as sole cause of 0.02%
    hit rate by comparing ARM CI with Azure DevOps pipelines.

Minor AI contribution (single-line trailer):

Assisted-by: Claude Code — cherry-pick conflict resolution and API adaptation

No mention needed: mechanical refactoring, formatting, boilerplate, applying well-known patterns the human specified.

External context (prose, not trailers):

Based on discussion in https://discourse.itk.org/t/7745 (patches for
5.4.6) and blowekamp's observation about orphaned test coverage.

Transient links: extract minimum context instead of linking. E.g., "Azure DevOps windows-2019 runner retired 2025-03-24" rather than a link to a CI build that will expire.

Community context from Discourse #7728

This proposal is informed by the discussion in AI generated pull requests overwhelming, hard to review carefully:

  • @Niels_Dekker raised the concern about "cognitive debt" — nobody truly understanding AI-generated code. Co-Authored-By: AI makes this worse by implying shared responsibility that doesn't exist. (Post #12)
  • @matt.mccormick emphasized keeping interactions "social, relational, and human-to-human, with AI as a supporting tool." Reviewer Co-Authored-By: supports this. (Post #9)
  • @dzenanz noted that for large AI-generated changes "reviewing becomes the dominant part of the work" — making reviewer attribution even more important. (Post #2)
  • @blowekamp's merged PR DOC: Add Create a Pull Request section with draft PR guidance #5975 (DOC: Add Create a Pull Request section with draft PR guidance) establishes human/agent responsibilities for PRs. Attribution rules should complement that guidance.
Decision points for discussion
  1. Should model ID be included in Tool-Assisted: for reproducibility?
  2. Threshold between structured (multi-line) vs short-form (single-line) AI mention?
  3. Should this live in Documentation/AI/git-commits.md or CONTRIBUTING.md?
  4. Interaction with the existing "no essay" commit message brevity rule — attribution must not balloon commit messages
  5. Relationship to PR DOC: Add Create a Pull Request section with draft PR guidance #5975's draft PR guidance — should attribution rules cross-reference it?

Motivated by Discourse #7728 and practical experience with attribution in PRs #6044#6057. Complements the draft PR guidelines in #5975.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions