Skip to content

chore: remove agent attribution with identity enforcement#33

Merged
chaliy merged 1 commit intomainfrom
claude/remove-agent-attribution-wYgcm
Mar 21, 2026
Merged

chore: remove agent attribution with identity enforcement#33
chaliy merged 1 commit intomainfrom
claude/remove-agent-attribution-wYgcm

Conversation

@chaliy
Copy link
Copy Markdown
Owner

@chaliy chaliy commented Mar 21, 2026

What

Add multi-layered approach to prevent coding agent attribution in commits and PRs, adopting the same pattern used in everruns/bashkit.

Why

Commits and PRs should always be attributed to real human users, not to AI coding agents. The existing policy in AGENTS.md was a single line; this adds technical enforcement.

How

  • .claude/settings.json: Added gitAttribution: false and empty attribution strings to disable Claude Code's built-in attribution. Added SessionStart hook config.
  • .claude/hooks/fix-git-identity.sh: SessionStart hook that runs on every Claude Code session to detect and fix agent-like git identities.
  • scripts/lib/common.sh: Shared shell library with agent pattern detection (GIT_AGENT_IDENTITY_PATTERN), identity resolution fallback chain (git config → GIT_USER_NAME/GIT_USER_EMAIL env vars → error), and auto-configuration function.
  • AGENTS.md: Expanded attribution policy with explicit rules covering Co-authored-by trailers, merge commits, and "generated by" phrases.

Risk

  • Low
  • No code changes, only configuration and policy. Existing CI unaffected.

Checklist

  • Tests pass (no code changes, cargo test still green)
  • Backward compatibility considered (additive only)

Add multi-layered approach to prevent coding agent attribution:
- SessionStart hook to auto-fix agent-like git identities
- Shared library with agent pattern detection and identity resolution
- gitAttribution: false in Claude Code settings
- Expanded AGENTS.md policy with explicit attribution rules
@chaliy chaliy merged commit c672578 into main Mar 21, 2026
11 checks passed
@chaliy chaliy deleted the claude/remove-agent-attribution-wYgcm branch March 21, 2026 04:35
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