From c7063154836790b943bde2d10e60e5a619911f9b Mon Sep 17 00:00:00 2001 From: "goodolclint-claude[bot]" <323206664+goodolclint-claude[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 13:42:10 -0500 Subject: [PATCH 1/3] chore: attribute agent commits to the bot identity Co-Authored-By: Claude Opus 5 (1M context) --- .claude/settings.json | 8 ++++++++ CLAUDE.md | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..f4d957c --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,8 @@ +{ + "env": { + "GIT_AUTHOR_NAME": "goodolclint-claude[bot]", + "GIT_AUTHOR_EMAIL": "323206664+goodolclint-claude[bot]@users.noreply.github.com", + "GIT_COMMITTER_NAME": "goodolclint-claude[bot]", + "GIT_COMMITTER_EMAIL": "323206664+goodolclint-claude[bot]@users.noreply.github.com" + } +} diff --git a/CLAUDE.md b/CLAUDE.md index d217a8a..552d192 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,6 +27,17 @@ git push -u origin feat/my-feature gh pr create ``` +### Agent commit identity + +`.claude/settings.json` sets `GIT_AUTHOR_*` / `GIT_COMMITTER_*` to +`goodolclint-claude[bot]`, so commits made from an agent session are attributed to the App +rather than to the operator. The push itself is an ordinary local `git push` over the +operator's SSH key — the env vars change authorship, not transport. No `Co-Authored-By` +trailer is needed when they are in effect. + +The env block applies at session start, so a session that predates this file still commits +as the operator. + ### Dev container (recommended) A Docker-based dev environment replicates the full CI setup locally. Works on ARM Macs From 89a5a343373cb02d50e1f604fe2d489bc93231e6 Mon Sep 17 00:00:00 2001 From: "goodolclint-claude[bot]" <323206664+goodolclint-claude[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 13:43:55 -0500 Subject: [PATCH 2/3] docs: prefer MCP push_files; git push is the unverified large-push fallback Co-Authored-By: Claude Opus 5 (1M context) --- CLAUDE.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 552d192..b587ada 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,13 +27,21 @@ git push -u origin feat/my-feature gh pr create ``` -### Agent commit identity +### Agent pushes and commit identity -`.claude/settings.json` sets `GIT_AUTHOR_*` / `GIT_COMMITTER_*` to -`goodolclint-claude[bot]`, so commits made from an agent session are attributed to the App -rather than to the operator. The push itself is an ordinary local `git push` over the -operator's SSH key — the env vars change authorship, not transport. No `Co-Authored-By` -trailer is needed when they are in effect. +**Default: the `github` MCP tools.** Agent-authored branches go up with `create_branch` + +`push_files`, which commits as the `goodolclint-claude` App and produces a **verified** +commit. `push_files` re-uploads full file contents, so byte-verify before opening the PR: +commit the identical change locally, `git fetch`, and `git diff +origin/ --` must be empty. `push_files` cannot express a removal — use +`delete_file` for deletions, and a rename is `push_files` of the new path plus +`delete_file` of the old. + +**Fallback: local `git push`, for large pushes only.** Re-uploading full contents inline +is impractical past a certain size. `.claude/settings.json` sets `GIT_AUTHOR_*` / +`GIT_COMMITTER_*` to `goodolclint-claude[bot]` so those commits are still attributed to the +App — but they are **not verified**, because the signature comes from committing through +the API, not from the author name. Use this path when needed, not by default. The env block applies at session start, so a session that predates this file still commits as the operator. From 8f9f546b7a5f82034c431ad10b7dcf70e4cd078b Mon Sep 17 00:00:00 2001 From: "goodolclint-claude[bot]" <323206664+goodolclint-claude[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 13:45:13 -0500 Subject: [PATCH 3/3] docs: env block takes effect immediately, not at next session start --- CLAUDE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b587ada..cb27fe4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,8 +43,9 @@ is impractical past a certain size. `.claude/settings.json` sets `GIT_AUTHOR_*` App — but they are **not verified**, because the signature comes from committing through the API, not from the author name. Use this path when needed, not by default. -The env block applies at session start, so a session that predates this file still commits -as the operator. +Claude Code picks the env block up immediately — the session that adds it already commits +as the bot, no restart needed. A `Co-Authored-By` trailer is redundant once it is in +effect, since the App is the commit author. ### Dev container (recommended)