-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Description
Issue: Specs Directory Created at Git Root Instead of Project Root
Date: 2025-01-27
Status: Fixed
Related: .specify/scripts/powershell/create-new-feature.ps1
Problem
When running /speckit.specify, the specs directory was being created at the git repository root (C:/Users/info/dev) instead of the project root where the .specify marker exists. I'm not sure if that makes sense.
Root Cause
The create-new-feature.ps1 script prioritized git rev-parse --show-toplevel over the .specify marker location. In repositories where the git root is a parent directory of the actual project (which has the .specify marker), this caused specs to be created in the wrong location.
Solution
Updated the script to prefer .specify marker location over git root:
- Check if current directory or any parent has a
.specifymarker - If found, use that as the project root (even if git root differs)
- Fall back to git root only if no
.specifymarker exists
Changes Made
- Modified repository root detection logic in
create-new-feature.ps1(lines 130-164) - Added explicit check for
.specifymarker before using git root - Ensures specs are created in the correct project directory
Impact
- Future specs will be created in the correct project directory
- Existing specs may need to be moved manually if created in wrong location
- Script now respects project boundaries defined by
.specifymarker
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.