Automatically splits large, monolithic Git commits into smaller, more reviewable units while preserving logical code boundaries and maintaining clean history.
Create smaller commits
Guide the agent through splitting large commits into granular changes
Setup Environment
Ensure you're in a Git repository with staged or uncommitted changes
Run Initial Audit
Execute 'git diff --stat' to assess current change volume
Iterate Splitting
Prompt agent to split commits based on file boundaries or logical units
Verify & Commit
Review each proposed split and confirm with 'git commit'
Analyze current staged changes using git diff --name-status and git diff --stat
Identify files and overall scope of changes
Group related file changes by logical component or feature area
Create coherent commit boundaries
Git
This loop ensures all Git commits follow the Conventional Commits specification by using commitlint to validate commit messages. It automatically detects non-compliant commits, suggests fixes, and guides the user through correcting them until all commits pass validation.
Git
This loop helps maintain a clean Git repository by identifying and removing stale or outdated branches that are no longer needed. It ensures your branch list remains manageable and reduces clutter in collaborative environments.
Git
Automate the resolution of Git merge conflicts by iteratively detecting conflicts, resolving them, and retrying the merge until successful.
Create interactive add hunks for first logical group using git add -p
Stage portion of changes for initial small commit
Commit staged changes with descriptive message
Create first smaller commit
Repeat process for remaining changes until all are committed
Ensure all original changes are preserved in split form
Run 'commit audit' to verify each commit meets size targets
Check exit condition achievement
Start the "Large Commit Splitter" loop. Goal: Create smaller commits Max iterations: 10 Between iterations run: commit audit Exit when: Commit size target reached Please analyze my current staged changes and split them into multiple smaller commits, ensuring each commit is under 200 lines changed and represents a coherent logical change. Maintain clean commit messages that describe each change clearly. Start by checking what files are currently staged with 'git diff --name-status' and 'git diff --stat' to understand the scope. Self-pace this loop. After each iteration, run `commit audit` and evaluate the output, and only continue if the exit condition is not met (Commit size target reached). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.