Create the new Git branch in the planning phase
📌 Current status
The /spec command currently generates a new Git branch automatically when a specification is created.
While we aim to avoid rigid, waterfall-style workflows, it's still common and useful to define multiple specifications that are later prioritized and implemented. In this context, creating a branch immediately upon specification is often premature and can clutter the repository.
💡 Proposal
Enable developers to create the Git branch on demand, rather than automatically.
Benefits:
- Branch creation can be deferred until the planning or implementation phase.
- Specifications can be reused across multiple experimental implementations without redundant branches.
- Keeps the repository cleaner and better aligned with agile workflows.
I was going to create this issue, thanks for saving me the time! ;)
The scenario I think is very likely is that some teams will want to define more than one feature at a time in the specify phase.
A PM (or whomever defines features) would likely want to:
- use /specify in a branch, create a bunch of specs under the spec folder
- make sure they are accurate
- PR them into main
Also, it's possible that some teams want to plan for all features at once as a team, instead of separately in different branches.
I would like to understand the author's vision on how tighly coupled feature and branch is supposed to work for enterprises. I understand that by aligning the feature branch with the concept of a spec driven development feature makes it simpler to handle parallel development features/fixes and complexities in merging code/spec.
However, I would expect the feature in spec driven development to represent the target state rather than the incremental change. This will bring some complexities for parallel branches on the same feature, but we can tackle that separately.
I would like to understand, with the current implementation what does the spec directory in the repo will look like over time, and how are humans going to read "current state" spec?
If the feature is mapped to feature branch, should we consider leveraging LLM to produce "target state" spec files which is a "merge" of the incremental feature branches?
Hi @fabiodouek , My intention is to generate multiple specifications and implement each one separately—possibly in parallel or sequentially. I also plan to experiment with different implementations of a given spec (different branches for each plan) to explore various approaches.
Having the specification available in the main branch (before branching) sounds very compelling to me, as it provides a clear reference point. I'm even considering hosting the specification outside the file system entirely, perhaps in a GitHub issue or a Jira ticket, to keep things more flexible and collaborative.
Hi @AlbertoBasalo , that's interesting, thanks for sharing. Will the specification represent target state or will be incremental?
My initial thought was to make the specification represent a final state. But I find the idea of incremental specifications really interesting—it opens up more flexibility and allows for iterative development, which could be very powerful.
+1 for creating the branch in the plan or even implement step (configurable?). I also have a workflow where it is helpful to create multiple specs to represent future work. While it is not terrible to have a branch already created for that work, it can be a bit cumbersome while doing the initial planning.
+1 When I executed a specify command for the first time after establishing a constitution, a new branch was automatically checked out without committing the constitution. This is a bit confusing and might be an entry barrier.
I believe these two issues are related #935
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.
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.