PR Make Suggestion To PR
Create separate pull requests for each suggestion topic from the unstaged changes, with each PR based on the current PR branch.
Context
This command is typically used after /pr-make-suggestion-edit which leaves unstaged changes. These changes represent suggestions to improve the current PR, grouped by topic.
Process
Step 1: Analyze Unstaged Changes
- Check current branch and PR
- View all unstaged changes:
git status,git diff --stat,git diff - Analyze the changes and determine logical groupings
Step 2: Group Changes by Topic
Examples of topics:
- Formatting errors
- Type safety improvements
- Refactoring for better patterns
- Performance optimizations
- Accessibility improvements
Present the groupings to the user for confirmation.
Step 3: Create Suggestion PRs
For each topic, create a separate PR:
-
Create a new branch based on CURRENT branch (not base branch)
git checkout -b suggest/[descriptive-topic-name] $ORIGINAL_BRANCH -
Selectively stage only files for this topic
-
Create commit following project conventions
git commit -m "suggest: [clear description]" -
Push and create PR targeting the original PR branch
gh pr create --base $ORIGINAL_BRANCH --title "suggest: [title]" -
Return to original branch for next topic
Step 4: Verify and Report
List all created PRs and remaining unstaged changes.
Important Rules
Branch Strategy
- Base suggestion PRs on the CURRENT PR branch (not on main/master)
- Branch names should start with
suggest/ - This creates a chain: main <- original-pr <- suggestion-pr
Commit & PR Conventions
- PR titles MUST start with
suggest: - Follow project's commit message format
- Follow project's PR format
Process
- One topic = One PR (don't mix unrelated changes)
- Stage only relevant files for each PR
- Test that changes still work (type check if applicable)
- Provide clear URLs to all created PRs
Notes
- This command works with
/pr-make-suggestion-editas a pair - Each suggestion PR is independent and reviewable
- The base PR maintainer can choose which suggestions to merge
- After merging suggestions, they become part of the base PR
