Skip to content

docs: add merge-strategy philosophy#11

Draft
amcheste-ai-agent[bot] wants to merge 1 commit intodevelopfrom
docs/philosophy-merge-strategy
Draft

docs: add merge-strategy philosophy#11
amcheste-ai-agent[bot] wants to merge 1 commit intodevelopfrom
docs/philosophy-merge-strategy

Conversation

@amcheste-ai-agent
Copy link
Copy Markdown
Contributor

Summary

Adds a new philosophy doc — docs/philosophies/merge-strategy.md — sibling to branching-strategy.md. Captures why PRs land via rebase merge, why squash is disabled at the repo level, and how that protects the bot/human authorship audit trail introduced in claude-bot-account.md.

Why now

This was triggered by today's incident on pokemon-red-ai: PRs #25 and #26 were squash-merged via the GitHub UI, which silently:

  1. Replaced amcheste-ai-agent (bot user account, id 278991699) with amcheste-ai-agent[bot] (App identity, id 279003175) as primary author of the squash commit.
  2. Dropped the Co-Authored-By: amcheste trailer entirely.

Net: zero contribution-graph credit for @amcheste, and git blame on those lines now points at the App bot rather than the human-bot user account. The whole point of the dual-identity model collapsed.

The fix has two layers, both already in place:

  • Mechanical — squash disabled at the repo level on all 18 active repos (15 amcheste/* + 3 amcheste-ai-agent/*); future repos get the same treatment via mac-dev-setup#76.
  • Documentary — this PR. The philosophy doc is the why the mechanical change exists; future-me should be able to read it and understand the policy without re-deriving it from the incident.

Structure

Mirrors branching-strategy.md:

  1. Authorship is data, not metadata
  2. Default to rebase merge for PRs into develop
  3. CLI --no-ff for develop → main (cross-references branching-strategy §5)
  4. Never squash in repos where authorship matters
  5. Linear history is the default; merge bubbles are the exception
  6. What this philosophy is not

Cross-linked from README.md between Branching Strategy and Release Cadence.

Why this is a draft

  • The image at docs/images/merge-strategy.png doesn't exist yet — the file reference is a placeholder. Alan is generating it tonight; will be added in a follow-up commit before this is marked ready.
  • Once the image lands, mark ready for review and merge to develop.

Test plan

  • merge-strategy.md renders correctly in GitHub preview
  • Cross-links to branching-strategy.md, claude-bot-account.md, and branching-and-releases.md resolve
  • README.md TOC shows the new doc between Branching Strategy and Release Cadence
  • Image generated and committed
  • Image alt text matches the diagram content

Related

  • mac-dev-setup#76setup-repo skill update enforcing the same policy on new repos
  • 18 existing repos updated out-of-band today: allow_squash_merge=false, allow_rebase_merge=true, allow_merge_commit=true

A new sibling to branching-strategy.md that captures why I rebase-merge
PRs and disable squash at the repo level. The motivation is the
authorship problem: in repos where AI agents commit alongside humans,
the merge style determines whether the bot's primary authorship and
the human's Co-Authored-By trailer survive the merge.

Squash-merge silently drops both. Rebase-merge preserves both.
--no-ff for develop -> main is unchanged (already in branching-strategy
section 5) — the merge node carries information there, so it stays.

Adds a placeholder image reference at docs/images/merge-strategy.png;
image will be added in a follow-up commit before merge.

Cross-linked from README.md philosophies list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: amcheste <13696614+amcheste@users.noreply.github.com>
@github-actions github-actions Bot added the docs label Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant