Skip to content

docs: 作業開始時に main からブランチを切るルールを CLAUDE.md に追加#297

Merged
yusuke0610 merged 1 commit into
mainfrom
docs/branch-strategy
May 31, 2026
Merged

docs: 作業開始時に main からブランチを切るルールを CLAUDE.md に追加#297
yusuke0610 merged 1 commit into
mainfrom
docs/branch-strategy

Conversation

@yusuke0610

@yusuke0610 yusuke0610 commented May 31, 2026

Copy link
Copy Markdown
Owner

概要

作業開始時のブランチ運用を CLAUDE.md にデフォルトルールとして明文化する。

変更内容

  • 「作業開始時のブランチ運用(デフォルト)」セクションを新設
    • 新しい作業に着手するときは、合言葉や明示指示を待たず最初に origin/main 起点で feature ブランチを切ることをデフォルト挙動として明記
    • ブランチ命名(英語 kebab-case + feat//fix//docs/ 等)、コミットを伴わない調査のみの例外も記載
  • 既存 feature ブランチに差分がある場合のルールを追加
    • 差分が無ければ継続、差分(未コミット変更 or main より進んだコミット)がある場合は勝手に切り直さず、main から切り直すかユーザーに相談する
  • commit/PR フローの stage 行を整合
    • ブランチ作成は本来「作業開始時」に行う位置づけへ修正(stage は切り損ねた場合の保険)

補足

  • 変更は .claude/CLAUDE.md のみ(ガイドライン markdown)。lint/test/build 対象外のため make ci はスキップ。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added guidelines for creating feature branches from the main branch, including handling existing feature branches and naming conventions.
    • Revised branch operation workflow instructions to ensure consistency with default branching practices.

- 「作業開始時のブランチ運用(デフォルト)」セクションを新設し、新規作業は
  origin/main 起点で feature ブランチを切ることをデフォルト挙動として明記
- 既存 feature ブランチに差分がある場合は勝手に切り直さず、main から
  切り直すかユーザーに相談するルールを追加
- commit/PR フローの stage 行を、ブランチ作成は本来「作業開始時」に行う
  位置づけへ整合

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c8b0912-197d-400e-8deb-e30ec988e4c8

📥 Commits

Reviewing files that changed from the base of the PR and between 38a6288 and 04039f7.

📒 Files selected for processing (1)
  • .claude/CLAUDE.md

📝 Walkthrough

Walkthrough

The PR updates development workflow documentation in .claude/CLAUDE.md by adding a new section on default branch operations when starting work—including fetching main, creating feature branches from origin/main, and handling rules for existing branches—and aligns the stage guidance to reference this procedure.

Changes

Development Workflow Guidelines

Layer / File(s) Summary
Default branch operation and stage guidance
.claude/CLAUDE.md
Added "作業開始時のブランチ運用(デフォルト)" section specifying feature branch creation from origin/main, rules for continuing or restarting on existing branches with local changes, branch naming conventions, and investigation-only exceptions. Updated "コミット / PR フロー" stage guidance to reference the new default operation and align decision-needed presentation logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

📚 A rabbit hops through workflow tales,
Branching guidance now unveils—
From main to features, clear and neat,
Default operations, oh so sweet! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately reflects the main change: adding branch operation rules for starting work from 'main' to CLAUDE.md documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/branch-strategy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yusuke0610
yusuke0610 merged commit f0a7ea7 into main May 31, 2026
18 checks passed
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.

1 participant