Skip to content

docs: add a branch-management policy#97

Merged
Reefact merged 1 commit into
mainfrom
claude/branch-management-guidelines-c6zlqb
Jul 11, 2026
Merged

docs: add a branch-management policy#97
Reefact merged 1 commit into
mainfrom
claude/branch-management-guidelines-c6zlqb

Conversation

@Reefact

@Reefact Reefact commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Add a Branches section to CONTRIBUTING.md, defining how a branch is named, created, scoped, and retired. It completes the workflow the guide already documents for commits and pull request titles, so the guide now reads in order: branch → commit → request.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Analyzer / diagnostic change
  • Tests
  • Documentation
  • Build / CI / tooling

Changes

  • Add a ## Branches section to CONTRIBUTING.md, placed before ## Commit messages so the guide reads in workflow order (branch → commit → request).
  • Adopt <author>/<short-description> branch names, where <author> is the owner's GitHub handle (sylvain/…, claude/…, dependabot/…). The change type stays on the commits, where the hook and CI enforce it; a branch carries no type, so claude/ and dependabot/ are the rule, not an exception.
  • Fix the branch as the disposable workspace of one pull request: one branch ↔ one pull request, cut from a fresh origin/main, never revived once merged or closed.
  • Document staying current (rebase while private, merge once shared), the ban on rewriting a branch under review, and a pre-PR scope check (git log/git diff against origin/main).
  • Follow the existing section style — Why, the rule, the doctrine, examples, anti-patterns.

Testing

Documentation-only change; no source, build, or test target is affected, so the dotnet commands below were not run.

  • dotnet build FirstClassErrors.sln
  • dotnet test FirstClassErrors.sln
  • Analyzer tests pass (FirstClassErrors.Analyzers.UnitTests)

The commit message was validated against the repository's own linter, tools/commit-lint/lint-commit-message.sh, in both local and --ci modes.

Documentation

This PR is the documentation change (CONTRIBUTING.md, a repository-governance document). None of the boxes below apply: no public API / error documentation, README, or doc/ update is involved, and no French translation is needed — CONTRIBUTING.md is English-canonical with no French counterpart, and no user-facing library behavior changed.

  • Public API / error documentation updated
  • README / doc/ updated
  • French translation (doc/README.fr.md) updated if user-facing behavior changed
  • No documentation change required

Related issues

None — the policy was proposed and refined directly; there is no tracking issue.


🤖 Generated with Claude Code

https://claude.ai/code/session_01MAHFZWHiPnWKLfA6BiGLDK


Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cc6bfcab7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md
The guide governed commits and pull request titles but said nothing about
the branch that carries them. This adds a Branches section before Commit
messages, so the guide reads in workflow order: branch, commit, request. It
fixes the branch as the disposable workspace of one pull request, cut from a
fresh origin/main and spent on merge.

Branch names take an <author>/<description> form, not <type>/. A branch
gathers commits of several types, so a single type prefix would name one and
hide the rest, the reason a multi-intention pull request title carries no
type either. The owner is the one thing the commits do not already record,
so claude/ and dependabot/ become the rule, not an exception.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MAHFZWHiPnWKLfA6BiGLDK
@Reefact Reefact force-pushed the claude/branch-management-guidelines-c6zlqb branch from 8cc6bfc to 5585183 Compare July 11, 2026 09:53
@Reefact

Reefact commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

@codex Ok for the fix ?

@chatgpt-codex-connector

Copy link
Copy Markdown

Yes — the fix looks OK for both review comments.

Review of requested fixes

  • The Dependabot concern is addressed: the policy now explicitly allows generated branch namespaces to keep their native layout, including dependabot/nuget/Newtonsoft.Json-13.0.1, while keeping <author>/<short-description> for branches cut by a person or agent by hand. CONTRIBUTING.mdL76-L80
  • The commit-message remediation concern is addressed: the policy now permits rewriting history with git rebase -i / force-push while the branch is still the author’s own branch, including mid-review fixes for commit messages rejected by lint or review. CONTRIBUTING.mdL98-L104
  • The text still protects shared branches by forbidding history rewrites once others may have based work on the branch. CONTRIBUTING.mdL101-L104

No new changes were needed from me, so I did not create an additional commit or PR.

Checks run

  • git status --short
  • git show --stat --oneline HEAD
  • nl -ba CONTRIBUTING.md | sed -n '70,104p'

View task →

@Reefact Reefact merged commit 7f0162c into main Jul 11, 2026
11 checks passed
@Reefact Reefact deleted the claude/branch-management-guidelines-c6zlqb branch July 11, 2026 10:07
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