new_feature.md
Create a new feature specification with automatic branch creation and numbering.
Given the feature description "$ARGUMENTS", I need you to:
- Find the repository root using
git rev-parse --show-toplevel - Examine the
specs/directory to find the highest numbered feature (e.g., if you see001-chatand002-test-cleanup, the highest is 002) - Generate the next feature number by incrementing by 1 with zero-padding (e.g., 002 → 003)
- Transform the feature description into a branch name by:
- Converting to lowercase
- Replacing spaces and special characters with hyphens
- Limiting to 2-3 meaningful words
- Combining with feature number:
003-meaningful-name
- Create and switch to the new git branch
- Create the feature directory:
specs/[branch-name]/ - Copy the template from
templates/feature-spec-template.mdtospecs/[branch-name]/feature-spec.md - Replace these placeholders in the template:
[FEATURE NAME]with the feature description[###-feature-name]with the branch name[DATE]with current date (YYYY-MM-DD format)[feature name]with the feature description
- Confirm creation with branch name and file path
Use absolute paths with the repository root for all file operations to avoid path issues.