Repository navigation
Description
Bug Description
The bundled extensions/git branch scripts (bash, PowerShell, Python) still sanitize names with [^a-z0-9]. #4780 fixed this for the core create-new-feature scripts under the UTF-8 naming policy from #4574, but its description notes that extensions/git was out of scope.
With the git extension installed, the mandatory before_specify hook (speckit.git.feature) creates a branch with an empty suffix, while the core script creates a Unicode spec directory, so the branch and the specs/ directory no longer match.
Steps to Reproduce
specify init demo --integration claude --extension gitbash .specify/extensions/git/scripts/bash/create-new-feature-branch.sh --json "添加待办事项"bash .specify/scripts/bash/create-new-feature.sh --json --allow-existing-branch "添加待办事项"
Expected Behavior
Branch 001-添加待办事项, matching specs/001-添加待办事项/, as the core scripts already do since #4780.
Actual Behavior
- Branch
001-is created, then002-for the next feature, while the core script createsspecs/001-添加待办事项/. --short-name "待办事项"gives the same empty suffix.- On Windows PowerShell 5.1,
create-new-feature-branch.ps1throwsArgumentNullExceptionfrom[string]::Joinand creates no branch (the core script already guards this with@(...)). - Accented Latin input is stripped too:
Ünïcödé cafébecomes001-cafin all three twins.
| Description | ps | py | sh |
|---|---|---|---|
添加待办事项 |
error | 001- |
001- |
支持 OAuth2 登录 |
001-oauth2 |
001-oauth2 |
001-oauth2 |
Ünïcödé café |
001-caf |
001-caf |
001-caf |
Specify CLI Version
1.4.5.dev0 (main @ e59953dd)
AI Agent
Claude Code
Operating System
Windows 11 zh-CN (code page 936)
Python Version
Python 3.12.10
Error Logs
$ bash .specify/extensions/git/scripts/bash/create-new-feature-branch.sh --json "添加待办事项"
# To persist: export SPECIFY_FEATURE=001-
{"BRANCH_NAME":"001-","FEATURE_NUM":"001"}
$ bash .specify/scripts/bash/create-new-feature.sh --json --allow-existing-branch "添加待办事项"
{"BRANCH_NAME":"001-添加待办事项","SPEC_FILE":".../specs/001-添加待办事项/spec.md","FEATURE_NUM":"001"}
$ git branch
001-
002-
* main
PS> .\create-new-feature-branch.ps1 -Json "添加待办事项"
# (zh-CN message translated to English)
create-new-feature-branch.ps1 : Exception calling "Join" with "2" argument(s): "Value cannot be null.
Parameter name: values"
+ FullyQualifiedErrorId : ArgumentNullException,create-new-feature-branch.ps1Additional Context
The fix would port the core scripts' Unicode word extraction from #4780 to the three git extension twins and extend the existing parity tests in tests/extensions/git/. I plan to open a PR for it.
AI Disclosure
Found and reproduced with Claude Code (model: Claude Opus 5.5, human-supervised). All commands above were run on the reporter's machine; the reporter reviewed this report before filing.


Activity