You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Specify methodology documentation does not clearly specify when to create feature branches during the planning process, leading to confusion about whether planning work should occur on main or on a dedicated feature branch. This resulted in an AI assistant creating planning artifacts (plan.md) directly on main branch instead of following the expected pattern of working on a feature-specific branch.
The ambiguity affects both human contributors and AI assistants implementing the Specify workflow, potentially leading to branch management inconsistencies and merge conflicts.
Note: most of this issue is copilot generated, minor tweaks by the human author
Environment snapshot
System
OS: Windows (PowerShell default, GitHub shell for Windows)
Working repository has existing spec branches (002-hash-comparison, 003-onedrive-compat-the)
spec.md already exists on main for spec 004-generalize-file-support
AI assistant was asked to implement the spec and proceeded with planning on main
Repository main branch is currently unprotected (no branch protection rules)
Problem description
Expected behavior
Based on observation of existing branches in the repository:
Create feature branch named after spec (e.g., 004-generalize-file-support)
Perform all planning work (plan.md, research.md, design artifacts) on feature branch
Complete implementation on feature branch
Merge feature branch back to main when complete
Actual behavior
✅ spec.md created on main (appears correct)
❌ plan.md created directly on main branch
❌ Planning process started without branch creation
❌ Plan header shows Branch: main instead of feature branch name
Root cause
The Specify methodology documentation does not explicitly state:
When to create the feature branch (before planning? during /plan command?)
Whether planning artifacts belong on main or feature branch
The branching strategy expectations for the workflow
Commands to reproduce
Have a spec.md on main branch
User asks AI to "implement this spec" or "how do we do that"
AI assistant follows available Specify documentation
Results in planning work on main instead of feature branch
# Current state (incorrect)
$ git branch
* main
$ ls specs/004-generalize-file-support/
plan.md spec.md # plan.md created on main# Expected state
$ git branch
004-generalize-file-support
* main
$ git checkout 004-generalize-file-support
$ ls specs/004-generalize-file-support/
plan.md spec.md # plan.md created on feature branch
Evidence files
specs/004-generalize-file-support/plan.md (created on main, header shows wrong branch)
Potential merge conflicts when multiple specs are worked on simultaneously
Frequency: Likely to occur on every new spec implementation until clarified
Suggested solutions (prioritized)
Option 1: Update methodology documentation (Low effort, high impact)
Add explicit branching guidance to Specify docs:
## Branching Strategy
Before beginning Phase 0 planning:
1. Create feature branch: git checkout -b {spec-number}-{spec-name}
2. All planning artifacts (plan.md, research.md, etc.) go on feature branch
3. Implementation occurs on feature branch
4. Merge to main when complete
Note: This aligns with the direction of Issue #299 discussion, which suggests moving toward automated branch creation rather than manual coordination.
Option 2: Integrate branch creation into /plan command (Medium effort, high impact)
Modify /plan command to:
Automatically create feature branch if it doesn't exist
Switch to feature branch before creating planning artifacts
Update plan.md header with correct branch name
Note: This directly addresses the solution direction emerging from Issue #299, which favors tooling automation over process documentation.
Option 3: Add branch validation to planning tools (Low effort, medium impact)
Add warnings when planning artifacts are created on main:
Warning: Creating plan.md on main branch. Consider creating feature branch first.
Suggested: git checkout -b 004-generalize-file-support
Option 4: Document sub-feature branching strategy (Low effort, medium impact)
Add guidance for managing bug fixes and sub-features during spec development:
## Sub-feature Branching Strategy
For bug fixes or sub-features during spec development:
1. Create sub-feature branch from spec branch: git checkout -b {spec-branch}-{sub-feature}
2. Example: 004-generalize-file-support-config-validation
3. Merge sub-feature back to spec branch when complete
4. Continue spec development on main spec branch
5. Final merge: spec branch → main when entire spec is complete
Note: This addresses real-world development scenarios where bugs or additional features are discovered during spec implementation, providing clear guidance for branch hierarchy management.
Additional Consideration: With branch protection enabled on main, this issue would become more critical as direct commits to main would be blocked, making the branching strategy documentation gap a workflow blocker rather than just a best practice concern.
Immediate workaround
For current situation with 004-generalize-file-support:
This issue is related to Issue #299 "Specify, Plan, and Task phases are too coupled" in the github/spec-kit repository, which confirms that "the specify step creating a branch" is the expected behavior. However, Issue #299 focuses on team-based multi-spec workflows, while this issue addresses the more fundamental problem in single-developer environments where the branching strategy documentation gap affects both humans and AI assistants.
Key differences and comparison
Issue #299 Focus: Team coordination and multi-spec workflows
Problem: Teams working on multiple specs simultaneously face branch isolation challenges
Environment: Multi-developer teams with parallel spec development
Solution Direction: Automated tooling to reduce coordination overhead
This Issue Focus: Individual workflow clarity and AI assistant guidance
Problem: Lack of clear documentation about when and where to create branches affects single developers and AI assistants
Environment: Single-developer or AI-assisted development scenarios
Solution Direction: Documentation clarity first, with optional tooling automation
The solutions are compatible: documentation improvements help individual users, automation helps teams
Triage priority
Priority: High (affects methodology adoption and consistency) Effort: Low (documentation update) to Medium (tooling integration) Risk: Low (no data loss, process improvement only)
The fix should clarify the branching strategy in documentation and potentially integrate branch management into the planning toolchain.
Bug report: Specify methodology lacks clear branching strategy guidance
Summary
The Specify methodology documentation does not clearly specify when to create feature branches during the planning process, leading to confusion about whether planning work should occur on
mainor on a dedicated feature branch. This resulted in an AI assistant creating planning artifacts (plan.md) directly onmainbranch instead of following the expected pattern of working on a feature-specific branch.Related Issue: This issue may be related to Issue #299 "Specify, Plan, and Task phases are too coupled" in the github/spec-kit repository, which discusses branching strategy in team environments. While I'm working solo, I think that moving branch creation to /plan time might help a lot.
The ambiguity affects both human contributors and AI assistants implementing the Specify workflow, potentially leading to branch management inconsistencies and merge conflicts.
Note: most of this issue is copilot generated, minor tweaks by the human author
Environment snapshot
System
Context
Problem description
Expected behavior
Based on observation of existing branches in the repository:
004-generalize-file-support)plan.md,research.md, design artifacts) on feature branchmainwhen completeActual behavior
maininstead of feature branch nameRoot cause
The Specify methodology documentation does not explicitly state:
/plancommand?)Commands to reproduce
spec.mdon main branchEvidence files
specs/004-generalize-file-support/plan.md(created on main, header shows wrong branch)User impact
High: Process confusion affects:
Frequency: Likely to occur on every new spec implementation until clarified
Suggested solutions (prioritized)
Option 1: Update methodology documentation (Low effort, high impact)
Add explicit branching guidance to Specify docs:
Note: This aligns with the direction of Issue #299 discussion, which suggests moving toward automated branch creation rather than manual coordination.
Option 2: Integrate branch creation into
/plancommand (Medium effort, high impact)Modify
/plancommand to:Note: This directly addresses the solution direction emerging from Issue #299, which favors tooling automation over process documentation.
Option 3: Add branch validation to planning tools (Low effort, medium impact)
Add warnings when planning artifacts are created on main:
Option 4: Document sub-feature branching strategy (Low effort, medium impact)
Add guidance for managing bug fixes and sub-features during spec development:
Note: This addresses real-world development scenarios where bugs or additional features are discovered during spec implementation, providing clear guidance for branch hierarchy management.
Additional Consideration: With branch protection enabled on
main, this issue would become more critical as direct commits tomainwould be blocked, making the branching strategy documentation gap a workflow blocker rather than just a best practice concern.Immediate workaround
For current situation with 004-generalize-file-support:
git checkout -b 004-generalize-file-supportRelated discussions
Connection to Issue #299
This issue is related to Issue #299 "Specify, Plan, and Task phases are too coupled" in the github/spec-kit repository, which confirms that "the specify step creating a branch" is the expected behavior. However, Issue #299 focuses on team-based multi-spec workflows, while this issue addresses the more fundamental problem in single-developer environments where the branching strategy documentation gap affects both humans and AI assistants.
Key differences and comparison
Issue #299 Focus: Team coordination and multi-spec workflows
This Issue Focus: Individual workflow clarity and AI assistant guidance
Complementary Relationship:
Timing Overlap:
/planphase may part of the solution.Triage priority
Priority: High (affects methodology adoption and consistency)
Effort: Low (documentation update) to Medium (tooling integration)
Risk: Low (no data loss, process improvement only)
The fix should clarify the branching strategy in documentation and potentially integrate branch management into the planning toolchain.