Skip to content

agent: add intelligent shortening to make-branch command#23

Merged
p-iknow merged 1 commit intomainfrom
i22-agent/shorten-branch-names
Oct 25, 2025
Merged

agent: add intelligent shortening to make-branch command#23
p-iknow merged 1 commit intomainfrom
i22-agent/shorten-branch-names

Conversation

@p-iknow
Copy link
Contributor

@p-iknow p-iknow commented Oct 25, 2025

Requirement

Resolves #22

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 and making them easier to type and work with in CLI environments.

Implementation

  • Updated template format: Changed from action-description_with_underscores to shortened-description with explanation about 50-character target
  • Added comprehensive "Shortening Strategy" section:
    • Length guidelines: 50-char target, 60-char maximum
    • Filler word removal list (articles, prepositions, conjunctions, etc.)
    • Guidelines on what to keep (action verbs, key nouns, critical context)
    • 6-step shortening technique process
    • Edge case handling for very short and already concise titles
  • Enhanced examples section: Organized into "Basic Examples" and "Shortening Examples" with real demonstrations showing:
    • i21-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")
  • Modified implementation steps: Added intelligent shortening as step 4 before text formatting
  • Defined shortening rules:
    • Remove filler words: the, a, an, for, to, of, with, in, on, at, by, from, that, this, using, instead, etc.
    • Truncate at word boundaries only (never mid-word)
    • Preserve action verbs and key nouns that convey core intent

Test

Manually tested the shortening logic with real issue examples:

All branch names are well under the 50-character target while preserving essential meaning.

Human Check

🤖 Generated with Claude Code

  • I reviewed it

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>
@github-actions github-actions bot added the agent Agent rules and commands label Oct 25, 2025
@p-iknow p-iknow marked this pull request as ready for review October 25, 2025 15:57
@p-iknow p-iknow merged commit d8401c9 into main Oct 25, 2025
4 checks passed
@p-iknow p-iknow deleted the i22-agent/shorten-branch-names branch October 25, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent rules and commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent: shorten branch names in make-branch command

1 participant

Comments