agent: add intelligent shortening to make-branch command#23
Merged
Conversation
Requirement: The make-branch command was generating overly long branch names by converting entire issue titles verbatim (e.g., i21-agent/rename-custom-commands-to-shorter-aliases-for-easier-invocation). Users need concise, manageable branch names under 50-60 characters while preserving essential meaning. Implementation: - Updated template from action-description_with_underscores to shortened-description - Added comprehensive "Shortening Strategy" section with length guidelines, filler word list, and shortening techniques - Enhanced examples section with "Basic" and "Shortening" subsections showing real shortening results - Modified implementation steps to include intelligent shortening (step 4) before formatting - Defined filler words to remove (the, a, for, to, of, with, in, on, at, by, from, that, this, using, instead, etc.) - Specified 50-char target, 60-char max with word-boundary truncation only - Added edge case handling for very short and already concise titles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirement
Resolves #22
The
/make-branchcommand was generating overly long branch names by converting entire issue titles verbatim (e.g.,i21-agent/rename-custom-commands-to-shorter-aliases-for-easier-invocation). Users need concise, manageable branch names under 50-60 characters while preserving essential meaning and making them easier to type and work with in CLI environments.Implementation
action-description_with_underscorestoshortened-descriptionwith explanation about 50-character targeti21-agent/rename-commands-to-aliases(from "rename custom commands to shorter aliases for easier invocation")i19-agent/prompt-based-input(from "update make-task-issue to use prompt-based input instead of editor")i5-config/issue-pr-template(from "issue template, pr template, claude commend")Test
Manually tested the shortening logic with real issue examples:
i21-agent/rename-commands-to-aliases(38 chars) ✓i19-agent/prompt-based-input(32 chars) ✓i22-agent/shorten-branch-names(34 chars) ✓i15-doc/create-documentation-conventional-commits(49 chars) ✓All branch names are well under the 50-character target while preserving essential meaning.
Human Check
🤖 Generated with Claude Code