Feature branch and folder prefix should not be sequencial, it does not scale
Let's say we work in a team with 8 developers, and every day we get at least 8 features created, there is a high chance we will end up with same prefix multiple times.
The users should be able to change this behavior specifying a feature code, such as the number of the "board" feature, or spic, or GH issue, or feature request code... I think the idea is clear.
Other options would be instead of a sequencial number a kind of encoded date such as 20251017-feature-short-name, it would preserve the sequential benefit and avoid the confusion of having conflicting prefix such as 002-feature-a and 002-another-feature-not-related-to-a that causes confusion and doesn't link to any other company artifact.
Example of the caused confusion:
- "What is this 002?"
- "What is the relation between these two features as both have the same prefix 002?"
- "Does this prefix relates to any other company artifact?"
Great idea!
An alternative approach could be to have a folder where the actively developed spec resides until it's implemented/finalised. Once the spec is implemented it's renamed to "spec-00x" and moved to the specs folder just before it's merged to main. This way the sequence number is not as a big of a problem, or less likely to collide.
The typical workflow would be:
- Create spec in folder specs/active, plan, implement. (branch is created for you by spec-kit)
- Once implemented, merge main to you current branch and if there have been new specs created by other team members it will show up in your specs folder, for example specs/007-new-feature-by-team-mate.
- Run "/finalise" that will move the spec in specs/active to specs/008-add-some-function and merge to main.
Two things that could be seen as a problem with using a date instead of sequence number is:
- that the date represents when you started the spec, not when you finished it, making it sort before other specs even if it's merged to main later in time. Other specs implemented and merged to main later in time will have a higher spec date, but will be sorted after the spec that was actually implemented and merged later.
- all specs created the same day will be sorted alphabetically, so you will not know the order of specs for that day.
Maybe a combination could be used as well.
It would be quite useful to support a spec naming pattern based on feature branches, e.g. feat/124, bug/457, <jira-pbi>, <github-issue>, etc.
This would help avoid conflicts during parallel work in teams with multiple developers.
The feature branch could be passed at the moment of executing /speckit.specify. Alternatively, there could be a pre-prompt command (e.g. /speckit.feature or /speckit.preperspec) whose role would be to prepare the new spec, folder names, new branch, etc.
Another option could be to define this during the initialisation of spec kit in the project uvx --from ... specify init ...
At this point, it would be interesting to choose the spec naming pattern and select from a few possible strategies:
- the current auto-incremented spec number,
- a prefix based on the date,
- or a pattern based on the feature branch name.
This would avoid polluting the prompts/instructions with too many options and reduce ambiguities for the models.
That way, the model would always be consistent and follow the same spec naming convention.
Other options would be instead of a sequencial number a kind of encoded date such as
20251017-feature-short-name, it would preserve the sequential benefit and avoid the confusion of having conflicting prefix such as002-feature-aand002-another-feature-not-related-to-athat causes confusion and doesn't link to any other company artifact.Example of the caused confusion:
- "What is this 002?"
- "What is the relation between these two features as both have the same prefix 002?"
- "Does this prefix relates to any other company artifact?"
Agree this needs to be added.
Currently I create a branch for a ticket e.g. XYZ-39 and then let SpecKit create feature branches off it, before merging them back in to XYZ-39. That keeps it linked back to Jira. Perhaps not ideal but good enough.
You can easily customize bash (or powershell) scripts to have your own conventions.
I have my own customized branch conversions embedded in slightly modified bash scripts generated by spec kit. e.g.
but the problem is whenever I add a new agent, those bash scripts and templates are overwritten by spec kit. it's not a blocker since I can revert changes using git but there should be an option to add a new agent without touching already added bash scripts and templates
Yes, @armujahid, we completely agree with you. What you described is the workaround many of us are currently using, but this issue shouldn’t have to rely on a workaround, there should be a proper, out-of-the-box solution.
Agreed, this needs to be fixed. Thank you for saving me the trouble of writing up a ticket.
It would be nice if this were customizable, to fit a particular team's needs (were this to be used extensively in a company—something I think it's not ready for now—the \d\d\d- prefix kind of implies only 1K specs. We could easily blow past that pretty quickly.
We ran into this issue pretty early on. We modified the scripts to accept an optional work item id e.g. /speckit.specify --number 13789 Build a ....
Will be addressed as part of https://github.com/github/spec-kit/issues/407. Closing this as duplicate