Skip to content

Optional: a dedicated bot account for agent commit attribution (and a free link back to this repo) #71

Description

@Wirasm

Context

Agent-authored commits are now labelled. A block in ~/.zshrc (agent shells run zsh; the interactive shell is fish) detects the harness and sets:

GIT_AUTHOR_NAME="Wirasm's PRP Agent (Claude Code | Pi | Codex)"
GIT_AUTHOR_EMAIL="<maintainer's GitHub noreply>"

Only GIT_AUTHOR_* is set — the committer stays the human, so the record reads "an agent wrote this, a human let it through".

What that does not do: GitHub attributes commits by email, and the email is the maintainer's own noreply. So agent commits still resolve to the maintainer's profile, still carry their avatar, and still count toward their contribution graph. The label is honest; the attribution is unchanged.

That is a deliberate "simple for now" choice, not an oversight. This issue records the fuller option in case it is ever wanted.

The option: a dedicated bot account

Create a GitHub account for the agent identity and use its noreply address instead. Two things follow automatically:

  1. Attribution separates. Agent commits resolve to the bot's profile, not the maintainer's. Agent work stops inflating a human's contribution graph, and "who actually wrote this" becomes answerable from the commit alone — which matters most on commits pushed onto contributors' branches, where getting attribution wrong assigns responsibility for modifying someone else's work to a person who may not have made the decision.

  2. You get a link to this repo for free, on every commit. GitHub renders the account's avatar and profile link on every commit it authored. Putting the PRP repo URL in that profile gives a real, clickable pointer on every agent commit with no per-commit machinery.

That second point is why this beats the alternatives. A URL in the author name is unreadable — it appears in every git log --oneline and every blame line. A commit trailer is the textbook answer but needs a prepare-commit-msg hook, and any repo that sets core.hooksPath (husky, for instance) silently overrides a global hook — so the trailer would vanish in exactly the repos that use tooling.

Cost and caveats

  • One account to create and keep alive. It needs no permissions and no token — the email alone drives attribution, since pushes authenticate as the human.
  • Commits become unverified unless the bot's key is registered. Worth deciding rather than discovering.
  • On a first-time contributor's PR, a maintainer fix arriving from "a bot" reads less personally than one from a named maintainer. Arguably an argument for keeping the human identity on contributor branches specifically, and using the bot elsewhere.
  • The current setup already delivers most of the value. This is a refinement, not a fix.

Acceptance

  • Agent-authored commits resolve to an identity that is not the maintainer's personal account.
  • That identity's profile points at this repository.
  • The human remains the committer, so accountability for merging is unchanged.

Not urgent

Filed so the decision exists in writing rather than in a chat log. The labelled-but-self-attributed setup is live and working today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions