Skip to content

Bug: create-new-feature.sh creates specs in wrong directory (specs/ instead of .specify/specs/) #1224

@Ferneyman

Description

@Ferneyman

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.specify commands create specs in wrong location
  • Requires manual mv to 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

Reproduction Steps

  1. Initialize Spec Kit: specify init my-project
  2. Create a spec: /speckit.specify "Add user authentication"
  3. Observe created directory: specs/001-add-user-authentication/ (wrong location)
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions