Software Engineering

Attributing LLM-derived code in Git history

Documents LLM usage directly in Git history—sometimes via inline comments, but primarily via per-commit `Co-authored-by` trailers that record the model/provider—so teams can later identify where AI-generated code entered the codebase (useful for review, provenance, and potential legal/indemnity requirements).

Why the human is still essential here

The developer determines what was LLM-derived, records accurate attribution metadata, and maintains accountability for authorship, code review readiness, and compliance decisions.

How people use this

Git commit template with Co-authored-by trailer

Set a repository commit template that includes a `Co-authored-by:` placeholder for model/provider so contributors consistently capture AI attribution when applicable.

Git

Commit-msg hook to standardize LLM attribution

Use a commit-msg hook to prompt for the model/provider and append a standardized trailer to the commit message before it’s finalized.

Husky / Commitizen

CI enforcement of attribution trailers

Add a CI job that checks new commits for required LLM attribution trailers (when policy says they’re needed) and fails the pipeline with remediation guidance.

GitHub Actions

Need Help Implementing AI in Your Organization?

I help companies navigate AI adoption -- from strategy to production. Whether you are building your first LLM-powered feature or scaling an agentic system, I can help you get it right.

LLM Orchestration

Design and build LLM-powered products and agentic systems

AI Strategy

Go from idea to production with a clear implementation roadmap

Compliance & Safety

Build AI with human-in-the-loop in regulated environments

Related Prompts (4)

Community stories (1)

Blog

How and why I attribute LLM-derived code

I’m a cautious skeptic of AI/LLMs, but I’m trying to use them where it makes sense in my software work. As I use chat/agent tools to help implement and debug code, I make a point of clearly documenting which commits (and sometimes lines) include LLM-derived code—often using Git commit trailers like `Co-authored-by` with the model name/provider—to improve traceability for reviewers and to reduce future legal/compliance risk.

JT
Jamie TannaSoftware Engineer
Feb 25, 2026
Attributing LLM-derived code in Git history - People Use AI