-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Description
The create-new-feature.sh script creates spec directories in the wrong location, inconsistent with the documented Spec Kit structure and other template paths in the same script.
Current Behavior
Line 133 in scripts/bash/create-new-feature.sh:
SPECS_DIR="$REPO_ROOT/specs"
mkdir -p "$SPECS_DIR"This creates spec directories at:
- ❌
specs/001-feature-name/(root level)
Expected Behavior
Should match the documented structure and be consistent with the template path (line 247):
SPECS_DIR="$REPO_ROOT/.specify/specs"
mkdir -p "$SPECS_DIR"This would create spec directories at:
- ✅
.specify/specs/001-feature-name/(within .specify directory)
Evidence of Inconsistency
Same script, line 247 correctly uses .specify/:
TEMPLATE="$REPO_ROOT/.specify/templates/spec-template.md"Documented structure shows specs under .specify/:
.specify/
├── memory/
├── specs/ ← Should be here
│ ├── 001-feature/
│ └── 002-feature/
└── templates/ ← Templates correctly use .specify/
Impact
Severity: Medium-High
- All users running
/speckit.specifycommands create specs in wrong location - Requires manual
mvto relocate specs to correct directory - Breaks project organization and tooling expectations
- Affects spec discovery and navigation
User Impact:
- Confusion about where specs should live
- Extra manual steps after every spec creation
- Inconsistent project structure across Spec Kit installations
Affected Versions
- Confirmed in v0.0.85 (latest, released 2025-11-15)
- Likely affects all recent versions (tested back to v0.0.78)
- Bug exists in upstream repo: https://github.com/github/spec-kit/blob/main/scripts/bash/create-new-feature.sh
Reproduction Steps
- Initialize Spec Kit:
specify init my-project - Create a spec:
/speckit.specify "Add user authentication" - Observe created directory:
specs/001-add-user-authentication/(wrong location) - Expected directory:
.specify/specs/001-add-user-authentication/
Proposed Fix
File: scripts/bash/create-new-feature.sh
Line: 133
- SPECS_DIR="$REPO_ROOT/specs"
+ SPECS_DIR="$REPO_ROOT/.specify/specs"This single-line change aligns the script with:
- Documented Spec Kit structure
- Template path convention in same script
- User expectations
- All other
.specify/paths
Additional Context
Discovered while using Spec Kit with Claude Code in MCP Monorepo project. The bug caused specs to be created at root level for multiple feature branches before we identified the issue.
Workaround (until fixed):
After running /speckit.specify, manually move specs:
mv specs/NNN-feature-name .specify/specs/Related
- This affects all Spec Kit templates (claude, copilot, gemini, etc.)
- Bug is present in all distributed release ZIPs
- Affects both shell script (sh) and PowerShell (ps) variants
Environment:
- Spec Kit CLI installed via:
uv tool install specify-cli - Template version: v0.0.85 (claude-sh)
- OS: macOS 15.0.1
- Shell: zsh