-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Updates to templates and scripts #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
36383b4
97df98b
6474516
b61f04c
defb187
36ff7e6
4522fb4
a945077
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * text=auto eol=lf |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| # Global code owner | ||
| * @localden | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,3 +65,4 @@ jobs: | |
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,3 +237,4 @@ done | |
|
|
||
| echo "Archives in $GENRELEASES_DIR:" | ||
| ls -1 "$GENRELEASES_DIR"/spec-kit-template-*-"${NEW_VERSION}".zip | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,4 +42,4 @@ env/ | |
| # Spec Kit-specific files | ||
| .genreleases/ | ||
| *.zip | ||
| sdd-*/ | ||
| sdd-*/ | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |||||
| </div> | ||||||
|
|
||||||
| <p align="center"> | ||||||
| <strong>An effort to allow organizations to focus on product scenarios rather than writing undifferentiated code with the help of Spec-Driven Development.</strong> | ||||||
| <strong>An open source toolkit that allows you to focus on product scenarios and predictable outcomes instead of vibe coding every piece from scratch.</strong> | ||||||
|
||||||
| <strong>An open source toolkit that allows you to focus on product scenarios and predictable outcomes instead of vibe coding every piece from scratch.</strong> | |
| <strong>An open source toolkit that allows you to focus on product scenarios and predictable outcomes instead of ad-hoc coding every piece from scratch.</strong> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ obj/ | |
| # Temporary files | ||
| *.tmp | ||
| *.log | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,3 +68,4 @@ | |
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,3 +86,4 @@ git config --global credential.helper manager | |
| echo "Cleaning up..." | ||
| rm gcm-linux_amd64.2.6.1.deb | ||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,3 +15,4 @@ | |
| items: | ||
| - name: Local Development | ||
| href: local-development.md | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -163,4 +163,4 @@ else | |
| if $INCLUDE_TASKS; then | ||
| check_file "$TASKS" "tasks.md" | ||
| fi | ||
| fi | ||
| fi | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,18 +3,46 @@ | |||||||||
| set -e | ||||||||||
|
|
||||||||||
| JSON_MODE=false | ||||||||||
| SHORT_NAME="" | ||||||||||
| ARGS=() | ||||||||||
| for arg in "$@"; do | ||||||||||
| i=0 | ||||||||||
| while [ $i -lt $# ]; do | ||||||||||
| arg="${!i}" | ||||||||||
|
Comment on lines
+9
to
+10
|
||||||||||
| case "$arg" in | ||||||||||
| --json) JSON_MODE=true ;; | ||||||||||
| --help|-h) echo "Usage: $0 [--json] <feature_description>"; exit 0 ;; | ||||||||||
| *) ARGS+=("$arg") ;; | ||||||||||
| --json) | ||||||||||
| JSON_MODE=true | ||||||||||
| ;; | ||||||||||
| --short-name) | ||||||||||
localden marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| if [ $((i + 1)) -ge $# ]; then | ||||||||||
| echo 'Error: --short-name requires a value' >&2 | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
| i=$((i + 1)) | ||||||||||
| SHORT_NAME="${!i}" | ||||||||||
| ;; | ||||||||||
| --help|-h) | ||||||||||
| echo "Usage: $0 [--json] [--short-name <name>] <feature_description>" | ||||||||||
| echo "" | ||||||||||
| echo "Options:" | ||||||||||
| echo " --json Output in JSON format" | ||||||||||
| echo " --short-name <name> Provide a custom short name (2-4 words) for the branch" | ||||||||||
| echo " --help, -h Show this help message" | ||||||||||
| echo "" | ||||||||||
| echo "Examples:" | ||||||||||
| echo " $0 'Add user authentication system' --short-name 'user-auth'" | ||||||||||
| echo " $0 'Implement OAuth2 integration for API'" | ||||||||||
| exit 0 | ||||||||||
| ;; | ||||||||||
| *) | ||||||||||
| ARGS+=("$arg") | ||||||||||
| ;; | ||||||||||
| esac | ||||||||||
| i=$((i + 1)) | ||||||||||
| done | ||||||||||
|
|
||||||||||
| FEATURE_DESCRIPTION="${ARGS[*]}" | ||||||||||
| if [ -z "$FEATURE_DESCRIPTION" ]; then | ||||||||||
| echo "Usage: $0 [--json] <feature_description>" >&2 | ||||||||||
| echo "Usage: $0 [--json] [--short-name <name>] <feature_description>" >&2 | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
|
|
@@ -67,9 +95,84 @@ fi | |||||||||
| NEXT=$((HIGHEST + 1)) | ||||||||||
| FEATURE_NUM=$(printf "%03d" "$NEXT") | ||||||||||
|
|
||||||||||
| BRANCH_NAME=$(echo "$FEATURE_DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/-\+/-/g' | sed 's/^-//' | sed 's/-$//') | ||||||||||
| WORDS=$(echo "$BRANCH_NAME" | tr '-' '\n' | grep -v '^$' | head -3 | tr '\n' '-' | sed 's/-$//') | ||||||||||
| BRANCH_NAME="${FEATURE_NUM}-${WORDS}" | ||||||||||
| # Function to generate branch name with stop word filtering and length filtering | ||||||||||
| generate_branch_name() { | ||||||||||
| local description="$1" | ||||||||||
|
|
||||||||||
| # Common stop words to filter out | ||||||||||
| local stop_words="^(i|a|an|the|to|for|of|in|on|at|by|with|from|is|are|was|were|be|been|being|have|has|had|do|does|did|will|would|should|could|can|may|might|must|shall|this|that|these|those|my|your|our|their|want|need|add|get|set)$" | ||||||||||
|
|
||||||||||
| # Convert to lowercase and split into words | ||||||||||
| local clean_name=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/ /g') | ||||||||||
|
|
||||||||||
| # Filter words: remove stop words and words shorter than 3 chars (unless they're uppercase acronyms in original) | ||||||||||
| local meaningful_words=() | ||||||||||
| for word in $clean_name; do | ||||||||||
| # Skip empty words | ||||||||||
| [ -z "$word" ] && continue | ||||||||||
|
|
||||||||||
| # Keep words that are NOT stop words AND (length >= 3 OR are potential acronyms) | ||||||||||
| if ! echo "$word" | grep -qiE "$stop_words"; then | ||||||||||
| if [ ${#word} -ge 3 ]; then | ||||||||||
| meaningful_words+=("$word") | ||||||||||
| elif echo "$description" | grep -q "\b${word^^}\b"; then | ||||||||||
|
||||||||||
| elif echo "$description" | grep -q "\b${word^^}\b"; then | |
| elif echo "$description" | grep -q "\b$(echo "$word" | tr '[:lower:]' '[:upper:]')\b"; then |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ${word^^} syntax for uppercasing is not POSIX compliant and may fail on some shells. Consider using $(echo "$word" | tr '[:lower:]' '[:upper:]') for better compatibility.
| elif echo "$description" | grep -q "\b${word^^}\b"; then | |
| elif echo "$description" | grep -q "\b$(echo "$word" | tr '[:lower:]' '[:upper:]')\b"; then |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,3 +58,4 @@ else | |
| echo "BRANCH: $CURRENT_BRANCH" | ||
| echo "HAS_GIT: $HAS_GIT" | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -736,3 +736,4 @@ main() { | |
| if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then | ||
| main "$@" | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,4 +145,4 @@ if ($Json) { | |
| if ($IncludeTasks) { | ||
| Test-FileExists -Path $paths.TASKS -Description 'tasks.md' | Out-Null | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,3 +134,4 @@ function Test-DirHasFiles { | |
| return $false | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.