From 87e9d92aa8db110531308aadd52c89391a4d154d Mon Sep 17 00:00:00 2001 From: Kyle Date: Mon, 1 Sep 2025 03:47:23 +0800 Subject: [PATCH 1/2] Add GitBulter workflow rules to CLAUDE.md - Document critical Git rules for GitBulter compatibility - Add commit and pull request workflow guidelines - Ensure no branch switching during operations --- CLAUDE.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index fd11f5785..99b3f2a52 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -124,6 +124,26 @@ The Package.swift heavily uses environment variables for conditional compilation - Library evolution mode generates .swiftinterface files - Various private framework integrations can be toggled +## Git and GitHub Workflow + +**IMPORTANT: This project uses GitBulter for version control management** + +### Critical Git Rules +- **NEVER change branches** - The user manages branches through GitBulter +- **ALWAYS commit to the specific branch** the user tells you, without changing HEAD +- **ALWAYS create pull requests** using `gh pr create` with the exact branch specified by the user +- **DO NOT switch branches** when creating pull requests or commits + +### Commit Workflow +1. Make changes on the current branch as instructed +2. Commit changes only when explicitly asked by the user +3. Use the exact branch name provided by the user for commits + +### Pull Request Workflow +1. Create PR using `gh pr create` from the specified branch +2. Do not change HEAD or switch branches during PR creation +3. Target the appropriate base branch as instructed + ## Important Notes - This project uses private Apple APIs and frameworks - NOT for App Store distribution From 71e0e817648ecd0973671a4c45edb7541e4c67b4 Mon Sep 17 00:00:00 2001 From: Kyle Date: Mon, 1 Sep 2025 03:54:29 +0800 Subject: [PATCH 2/2] Update CLAUDE.md to remove git commit commands - Remove direct git commit operations from workflow - Add instructions to generate commit messages for GitBulter GUI - Clarify that commits are done by user through GitBulter - Add example of proper commit message format --- CLAUDE.md | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 99b3f2a52..a3a2bf2c8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -130,19 +130,36 @@ The Package.swift heavily uses environment variables for conditional compilation ### Critical Git Rules - **NEVER change branches** - The user manages branches through GitBulter -- **ALWAYS commit to the specific branch** the user tells you, without changing HEAD +- **NEVER run git commit commands** - The user commits through GitBulter GUI - **ALWAYS create pull requests** using `gh pr create` with the exact branch specified by the user -- **DO NOT switch branches** when creating pull requests or commits +- **DO NOT switch branches** when creating pull requests ### Commit Workflow -1. Make changes on the current branch as instructed -2. Commit changes only when explicitly asked by the user -3. Use the exact branch name provided by the user for commits +When asked to commit changes: +1. **Generate a commit message** and provide it to the user +2. **List the files to be committed** (specify if not all files) +3. **Let the user commit through GitBulter GUI** - do not run git commit commands +4. Wait for user confirmation before proceeding with any PR creation + +Example response when asked to commit: +``` +Here's the commit message for you to use in GitBulter: + +"Add feature X to improve Y + +- Implemented new functionality +- Updated tests +- Fixed related issues" + +Files to commit: +- src/feature.swift +- tests/feature_test.swift +``` ### Pull Request Workflow -1. Create PR using `gh pr create` from the specified branch -2. Do not change HEAD or switch branches during PR creation -3. Target the appropriate base branch as instructed +1. Only create PR after user confirms the commit is done +2. Use `gh pr create` from the specified branch +3. Do not change HEAD or switch branches during PR creation ## Important Notes