Skip to content

Require AI agents to attribute their GitHub comments#1567

Merged
maebeale merged 5 commits into
mainfrom
maebeale/milan-v2
Jun 6, 2026
Merged

Require AI agents to attribute their GitHub comments#1567
maebeale merged 5 commits into
mainfrom
maebeale/milan-v2

Conversation

@maebeale

@maebeale maebeale commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Closes [link an issue or remove this line]

What is the goal of this PR and why is this important?

  • gh posts comments as the authenticated user, so AI-generated PR/issue comments are indistinguishable from the human's own — this adds a rule requiring the AI agent to clearly attribute its comments.

How did you approach the change?

  • Added a matching bullet to the PRs section of both AI instruction files (CLAUDE.md and .github/copilot-instructions.md, kept in sync) requiring every GitHub comment an AI creates to start with an agent-agnostic 🤖 _From <agent>:_ prefix (e.g. 🤖 _From Claude:_, 🤖 _From Copilot:_).

UI Testing Checklist

  • N/A — documentation/instruction files only, no UI or runtime code changed.

Anything else to add?

  • Wording was made agent-agnostic in response to Copilot review feedback so the Copilot instruction file isn't hard-coded to "Claude".

gh posts comments as the authenticated user, making AI-generated
review/issue comments indistinguishable from the human's own. Requiring
a robot prefix keeps authorship transparent to reviewers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 6, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new guidance to the project’s AI instruction files to ensure AI-generated GitHub comments are clearly attributed, since gh posts as the authenticated user.

Changes:

  • Adds a new PR guideline requiring AI attribution on GitHub comments in CLAUDE.md.
  • Mirrors the same new PR guideline in .github/copilot-instructions.md to keep the instruction files in sync.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
CLAUDE.md Adds a PR guideline requiring attribution on AI-authored GitHub comments.
.github/copilot-instructions.md Duplicates the same attribution guideline for Copilot instructions (kept in sync with CLAUDE.md).

Comment thread CLAUDE.md Outdated
- **On every push**, update the PR title and content to reflect the current diff — preserve any existing images/screenshots in the description
- **On every push**, update AI instruction files if the diff adds, removes, or renames anything tracked in AGENTS.md — specifically: Stimulus controllers, services, model/controller concerns, mailers, rake tasks, and directory file counts
- **On every push**, add PR review comments on notable lines of code — decisions, trade-offs, non-obvious logic, or anything a reviewer should understand. Use `gh api` to post line comments on the diff
- **Attribute every GitHub comment to Claude** — `gh` posts as the authenticated user (maebeale), so any comment you create (PR review comments, issue/PR comments, replies) MUST start with a 🤖 emoji and state it is from Claude. Begin the comment body with `🤖 _From Claude:_` followed by the content

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: The maebeale reference is intentional, not a generic contributor guideline — this is a personal Conductor workspace where the gh CLI authenticates as that account, so AI-posted comments genuinely appear under it. The rule documents that specific fact so the attribution prefix is applied. On redundancy: the 🤖 _From Claude:_ prefix is the emoji requirement (the emoji opens the prefix), so it reads as one rule, not two. Leaving as-is.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: The maebeale reference is intentional, not a generic contributor guideline — this is a personal Conductor workspace where the gh CLI authenticates as that account, so AI-posted comments genuinely appear under it. The rule documents that specific fact so the attribution prefix is applied. On redundancy: the 🤖 _From Claude:_ prefix is the emoji requirement (the emoji opens the prefix), so it reads as one rule, not two. Leaving as-is.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Also generalized the username — the rule now reads "posts as the authenticated user" with no hard-coded account, so it holds for any contributor. Pushed in 221ca17.

Comment thread .github/copilot-instructions.md Outdated
- **On every push**, update the PR title and content to reflect the current diff — preserve any existing images/screenshots in the description
- **On every push**, update AI instruction files if the diff adds, removes, or renames anything tracked in AGENTS.md — specifically: Stimulus controllers, services, model/controller concerns, mailers, rake tasks, and directory file counts
- **On every push**, add PR review comments on notable lines of code — decisions, trade-offs, non-obvious logic, or anything a reviewer should understand. Use `gh api` to post line comments on the diff
- **Attribute every GitHub comment to Claude** — `gh` posts as the authenticated user (maebeale), so any comment you create (PR review comments, issue/PR comments, replies) MUST start with a 🤖 emoji and state it is from Claude. Begin the comment body with `🤖 _From Claude:_` followed by the content

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Fair flag, but this is deliberate. Per the project's own convention, CLAUDE.md and .github/copilot-instructions.md are kept byte-for-byte in sync, so the bullet is mirrored verbatim. The intent of the change is specifically to attribute Claude-authored comments (Claude is the agent operating in this workspace); it is not meant to be agent-agnostic. If Copilot were the one posting, the same transparency goal would call for a Copilot-specific prefix — but that is a separate decision the maintainer would make. Leaving the wording as requested.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Good call — updated. The bullet is now agent-agnostic in both files: 🤖 _From <agent>:_ (e.g. 🤖 _From Claude:_ or 🤖 _From Copilot:_), so it stays correct whichever AI authors the comment. Pushed in bdbc25b.

Per review, the Copilot-facing instruction file should not hard-code
"Claude" attribution. A generic prefix keeps both files correct for
whichever agent authors the comment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale changed the title Require Claude to attribute its GitHub comments Require AI agents to attribute their GitHub comments Jun 6, 2026
Drops the hard-coded username so the guidance reads correctly for any
contributor whose gh account posts the comment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 6, 2026 01:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

maebeale and others added 2 commits June 5, 2026 21:53
Verbose AI comments add noise to PR threads; a brevity rule keeps them
scannable and pushes longer context into the PR description.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 6, 2026 03:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@maebeale maebeale merged commit 2053f18 into main Jun 6, 2026
4 checks passed
@maebeale maebeale deleted the maebeale/milan-v2 branch June 6, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants