Skip to content

"specs" directory is not created in same level as ".specify" directory when .git is on a different directory #938

Description

@leobrines

after executing specify init . and running the constitution script, the specify command creates the specs/ directory in the ../ directory. This happens because I have the .git in ../.git path but it feels unexpected because it already has a .specify directory

Example:

First, I have this initial multiproject structure:

multiproject/.git
multiproject/project1/script1.sh
multiproject/project1/README.md
multiproject/project2/README.md

Then, I run the specify init . and the constitution script, all inside the project2 directory:

multiproject/.git
multiproject/project1/script1.sh
multiproject/project1/README.md
multiproject/project2/.specify (new directory)
multiproject/project2/.cursor(new directory)
multiproject/project2/README.md

Then, when I run the specify cursor command (previously project was open in cursor using cursor project1 command), it creates the specs/ directory in an unexpected place:

multiproject/.git
multiproject/project1/script1.sh
multiproject/project1/README.md
multiproject/project2/.specify
multiproject/project2/.cursor
multiproject/project2/README.md
multiproject/specs/ (new directory)

I think because it is finding the .git directory so it thinks that is the correct place, but I think .specify should have priority over .git

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions