spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

Proposal: Set root directory to .specify

Open jalvarezsamayoa opened this issue 1 year ago • 8 comments

In the current workflow the user configures the prompts and templates using:

# new project
uvx --from git+https://github.com/github/spec-kit.git specify init <PROJECT_NAME>

cd ~/my-existing-project
uvx --from git+https://github.com/github/spec-kit.git specify init --here

This command creates a series of directories in the ROOT of the selected directory.

ROOT/
 - memory/
 - scripts/
 - specs/
 - templates/
 - out/

For existing or future projects creating these (or other) directories in the root of the project is disruptive and confusing. I would like to suggest that instead those folders are created under a ROOT/.specify directory. In that way users can take advantage of the files without affecting their current directory structure.

ROOT
  + .specify/
     - memory/
     - scripts/
     - specs/
     - templates/
     - out/

I am happy to contribute with a PR.

jalvarezsamayoa avatar Sep 05 '25 23:09 jalvarezsamayoa

strongly support this suggestion. Adding multiple new subdirectories is not just polluting the root, but also may trump over existing flies or structures, risking overloading directory structures.

ilyavenger avatar Sep 06 '25 12:09 ilyavenger

I 100% agree with this. Having a large mono repo where each dir is a different service, adding 5 new dirs that are not services is very antithetical.

.claude. .agent-os .github .devcontainer .cursor, etc...

Having a .

seems like it is becoming the standard.

peterHoburg avatar Sep 07 '25 14:09 peterHoburg

I’ve been handling this by running specify init in a temporary folder, then copying the generated files into a .specify subdirectory. After that, I update the scripts and templates to reference this subfolder. Once that’s done, everything works smoothly.

danstis avatar Sep 08 '25 00:09 danstis

Created a PR for review: https://github.com/github/spec-kit/pull/86

I opted with a .speckit folder name, but I'm not going to die on that hill regarding naming conventions. ;)

mkellerman avatar Sep 08 '25 20:09 mkellerman

Great discussion! I love the .specify folder concept. ❤️

I'm wondering though, has anyone found a good pattern for organizing specs within a large monorepo? Keeping everything in one folder is starting to feel a bit tangled for me. 😅

Would love to hear how you all are managing it!

tiagostutz avatar Sep 10 '25 16:09 tiagostutz

Let me add that I work in many projects that have an existing templates directory, which makes it tricky to drop the spec-kit in it.

webrgp avatar Sep 10 '25 19:09 webrgp

Done - latest release should have the folder properly set!

localden avatar Sep 12 '25 07:09 localden

Hi! I'm experiencing some confusion about where the specs/ directory should live after this issue was resolved.

Current state (v0.0.90 template):

  • memory/, scripts/, and templates/ are correctly inside .specify/
  • However, the bash scripts (common.sh, create-new-feature.sh) reference $repo_root/specs (at project root, not inside .specify/)

README inconsistency: The README shows two different structures:

  • After STEP 2: .specify/specs/ (inside .specify)
  • After STEP 4: specs/ (at project root)

The original issue requested:

ROOT/
  .specify/
     - memory/
     - scripts/
     - specs/      ← inside .specify
     - templates/

What was implemented:

ROOT/
  .specify/
     - memory/
     - scripts/
     - templates/
  specs/             ← at project root

Was this intentional to keep specs more visible, or should the scripts be updated to use .specify/specs/ to match the original proposal and the first README example?

stephen-bluerocksoft avatar Jan 21 '26 21:01 stephen-bluerocksoft