spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

The name of branch created by speckit.specify

Open sl40168 opened this issue 10 months ago • 8 comments

The pattern of branch name created by speckit.specify is SeqNo-ShortName. But looks like the SeqNo starts from 001 below the same ShortName. Thus, I could not figure out the order of features (ShortName) added.

Is it possible to make the SeqNo globally?

sl40168 avatar Jan 09 '26 02:01 sl40168

Some models seem to mess this up. I've noticed it happening with GPT 5.x and Gemini, but not with any Anthropic models.

warpedgeoid avatar Jan 09 '26 07:01 warpedgeoid

@warpedgeoid I guess it's something to do with below prompt in speckit.specify.md.

Image

Looks like these prompt mislead models, thus the command running on my compute is something like git ls-remote --heads origin | grep -E '[0-9]+-my-feature-a', in which *my-feature-a is the short name populated this time. This was observed on DeepSeek and GLM models.

So I tried to change them as below on my local and it works fine this time.

Image

Hope this is a useful information for you.

sl40168 avatar Jan 10 '26 12:01 sl40168

Some models seem to mess this up. I've noticed it happening with GPT 5.x and Gemini, but not with any Anthropic models.

I had claude 4.5 sonnet do this to me today; used '001' two times in two different /specify commands, using the prompts/agents made for and running under the copilot agent.

TBH, (and I might put in a feature request for this), I'd prefer a date/timestamp over a monotonically increasing number, but reasonable people can disagree

mcampbell avatar Jan 12 '26 02:01 mcampbell

I would prefer being able to use custom names like feat/TKT-1234, bug/TKT-2312, etc. I have been missing this capability, for now my first instruction to specify is to stay on the current branch and that seems to work ok but I fear it may cause issues down the line.

josephcrawfordSRH avatar Jan 12 '26 15:01 josephcrawfordSRH

But specify prompt explicitly fixes model to If no existing branches/directories found with this short-name, start with number 1 So duplicate spec numbers seems legit and authors of spec-kit define some other logic in spec-branch numbering.

shadz3rg avatar Jan 20 '26 09:01 shadz3rg

The instructions have additional, even more explicit statements as well, so there's no doubt this is deliberate:

  • Only match branches/directories with the exact short-name pattern

What I find odd is that Claude hasn't cared so far, it was only today it started back at 001 (after a multitude of different specify runs in the past 2 weeks).

itinsecurity avatar Jan 20 '26 20:01 itinsecurity

This issue has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Jun 20 '26 01:06 github-actions[bot]

This issue has been automatically closed due to inactivity (180 days total). If you believe this issue is still relevant, please reopen it or create a new issue.

github-actions[bot] avatar Jul 21 '26 00:07 github-actions[bot]