github / github/spec-kit

[Feature]: Make branch creation configurable

Đang mở
#1,921 4 bình luận 3 reaction 0 người được giao Xem trên GitHub
enhancement stale
Ngôn ngữ chính
Python
Star
137k
Fork
12.3k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
159

Mô tả

### Problem Statement

Hi all,

Thanks for the work on this toolkit, it’s been really useful to structure spec-driven workflows.

I’d like to suggest making the automatic branch creation optional or configurable.

Right now, creating a new branch for each spec is the default behavior. This works well for teams using a branch-per-initiative model, but it can add friction for teams already using trunk-based development or custom branching strategies.

## Proposal

It would be helpful to support something like:

- On first run, the `specify` command could ask whether the user wants to use automatic branch creation or not
- Persist this choice in a config file, for example `.spec-kit.json`
- A setting such as `"branchStrategy": "auto" | "none" | "manual"`
- Optional CLI flags like `--no-branch` to override behavior per execution

## Why this matters

This would allow teams to adopt the spec structure without being tied to a specific Git workflow, making the toolkit more flexible and easier to integrate into existing engineering practices.

Happy to help or contribute if this direction makes sense.

### Proposed Solution

It would be great to make the automatic branch creation optional and configurable.

On the first run, the `specify` command could prompt the user to choose whether to use automatic branch creation or not. This would allow teams to align the tool with their existing Git workflow from the start.

This preference could then be persisted in a config file, for example `.spec-kit.json`, with a setting like:

- `"branchStrategy": "auto" | "none" | "manual"`

Additionally, CLI flags such as `--no-branch` could be used to override the behavior per execution when needed.

This approach keeps the current behavior for teams that rely on it, while allowing more flexibility for teams using trunk-based development or custom branching strategies.

### Alternatives Considered

_No response_

### Component

Specify CLI (initialization, commands)

### AI Agent (if applicable)

None

### Use Cases

_No response_

### Acceptance Criteria

_No response_

### Additional Context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.