-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Description
Problem Statement
I really appreciate Spec Kit's well-thought-out design for Spec-Driven Development. The automatic branch creation with numbered prefixes (###-feature-name) and AI-generated feature names is a clever approach that ensures organization and traceability throughout the development process. This design aligns with the SDD philosophy of treating specifications as the primary artifact with clear versioning and isolation.
However, our team's actual workflow differs from the assumed pattern in one key aspect:
In current workflow, we normally create development branches through our CI/CD platform, with a core concept workitem, where:
- One or more work items/tickets are associated
- One or more code repositories are selected
- One or more new branches are created, or existing branches are selected, from the main branch
- Developers then check out and work on this branch
This is a standard enterprise CI/CD pattern where branch creation is a formal, tracked operation external to the development workflow.
The Mismatch
When we check out an existing branch and run /speckit.plan, Spec Kit's current behavior creates friction:
Current expectation: Spec Kit expects you to run create-new-feature which will:
- Auto-detect or prompt for a feature description
- Generate a new branch name with pattern ###-feature-name
- Create a new branch (via git checkout -b)
- Set up the spec directory
Our reality: The branch already exists, created through our CI/CD platform with associated work items. We cannot create a new branch because:
- The branch already exists with CI/CD associations
- We want to work on the existing branch, not create a new one
- The branch name may not follow the ###-xxx pattern
Thank you for considering this request. I'm happy to contribute a PR if this aligns with Spec Kit's vision.
Proposed Solution
Add a flag (e.g., --use-current-branch) to create-new-feature.sh that:
- Uses the current branch name (from
git branch --show-current) as the feature identifier - Skips git checkout -b branch creation (since branch already exists)
- Sets SPECIFY_FEATURE environment variable appropriately
- Validates/creates the specs/[branch-name]/ directory structure
- Generates the spec template file
Design considerations
I understand this somewhat deviates from the original SDD workflow design where:
- Specifications are primary artifacts
- Each feature gets isolated branch/number
- Formal feature creation is a deliberate step
The proposed change doesn't abandon this philosophy—it simply adds flexibility for teams that have formalized branch creation as part of their CI/CD governance. The spec directory structure and all subsequent SDD workflows would remain unchanged.
Alternatives Considered
The documentation mentions SPECIFY_FEATURE environment variable as a way to override feature detection:
export SPECIFY_FEATURE="my-existing-branch-name"
This has several limitations according to my understanding of the code:
- Manual setup required: Must be set before each session or in shell profile, easy to break
- No spec directory setup: Doesn't create the specs/ directory structure automatically
- No validation: No signal that the spec directory actually exists or is valid
Component
CI/CD workflows
AI Agent (if applicable)
All agents
Use Cases
No response
Acceptance Criteria
No response
Additional Context
No response