feat: add custom specification directory support with --spec-dir option #1082
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
--spec-diroption tospecify initcommand for custom specification directoriesspecs/directoryDescription
This feature introduces significant flexibility to Spec Kit by allowing users to specify custom directory paths for their specifications instead of being limited to the default
specs/directory.Key Features
--spec-dir documentation,--spec-dir requirements, or any valid relative pathspecs/references with custom directory namesSPECIFY_SPEC_DIRenvironment variableImplementation Details
validate_spec_dir()function andinitcommand insrc/specify_cli/__init__.py{SPEC_DIR}placeholder support in template filesUsage Examples
Test Plan
--helpcommandinitcommand testing with various spec directory scenarioscheckcommand functionality verificationTest Coverage
Impact
specs/directoryFiles Changed
src/specify_cli/__init__.py(+262 lines){SPEC_DIR}placeholderThis enhancement represents a significant improvement to Spec Kit's flexibility while maintaining the robust specification-driven development workflow and ensuring excellent user experience through comprehensive validation and error handling.