Skip to content

feat: allow custom specs directory via --specs-dir; default to specs/ - #12

Closed
gotalab wants to merge 1 commit into
github:mainfrom
gotalab:feat/change-specs-dir
Closed

feat: allow custom specs directory via --specs-dir; default to specs/#12
gotalab wants to merge 1 commit into
github:mainfrom
gotalab:feat/change-specs-dir

Conversation

@gotalab

@gotalab gotalab commented Sep 3, 2025

Copy link
Copy Markdown

Summary

  • Adds --specs-dir to specify init and saves it to git config (spec-kit.specsDir).
  • Scripts resolve the specs base directory from git config; default remains specs/.

Motivation

  • Make it easier to align with project documentation structures (e.g., docs/specs) while keeping backwards compatibility.

Changes

  • src/specify_cli/init.py: add --specs-dir to init; persist to git config when repo exists.
  • scripts/common.sh: get_feature_dir() reads spec-kit.specsDir (fallback to specs).
  • scripts/update-agent-context.sh: FEATURE_DIR resolves via spec-kit.specsDir.
  • scripts/create-new-feature.sh: SPECS_DIR resolves via spec-kit.specsDir.
  • README.md: minimal usage examples and optional post-copy note.

Usage

Compatibility

  • No breaking changes; defaults to specs/ if unset.

Testing

  • Verified end-to-end with the Spec-Driven Development workflow on Claude Code, Gemini CLI and GitHub Copilot
  • To test script functionality, the following command executed:
uvx --from path/to/spec-kit/ specify init --here --specs-dir docs/specs \
&& rsync -a --delete path/to/spec-kit/scripts/ ./scripts/ \
&& chmod +x ./scripts/*.sh

@gotalab
gotalab requested a review from localden as a code owner September 3, 2025 19:55
@peterHoburg

peterHoburg commented Sep 7, 2025

Copy link
Copy Markdown

IMO it should be .speckit . Many tools are using . dirs now.
.claude .cursor .github .venv .agent-os etc...

Related to #38

@mkellerman

Copy link
Copy Markdown

Please see my implementation here: #86

@gotalab

gotalab commented Sep 9, 2025

Copy link
Copy Markdown
Author

I agree. .speckit feels consistent with the other tools.
Close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants