Skip to content

[Bug]: git extension drops non-Latin feature descriptions, creating branches named 001- #5553

Backlog

Description

@ckr-git

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

  1. specify init demo --integration claude --extension git
  2. bash .specify/extensions/git/scripts/bash/create-new-feature-branch.sh --json "添加待办事项"
  3. 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, then 002- for the next feature, while the core script creates specs/001-添加待办事项/.
  • --short-name "待办事项" gives the same empty suffix.
  • On Windows PowerShell 5.1, create-new-feature-branch.ps1 throws ArgumentNullException from [string]::Join and creates no branch (the core script already guards this with @(...)).
  • Accented Latin input is stripped too: Ünïcödé café becomes 001-caf in 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.ps1

Additional 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions