From d09552fc6389bbec2136113440369996202324f1 Mon Sep 17 00:00:00 2001 From: Ben Greene Date: Fri, 10 Oct 2025 20:43:20 -0400 Subject: [PATCH 1/2] fix: align Cursor agent naming to use 'cursor-agent' consistently The Python CLI was configured to use "cursor-agent" as the agent key in AGENT_CONFIG, causing it to search for release packages with the pattern "spec-kit-template-cursor-agent-sh-*.zip". However, the release build scripts were generating packages named "spec-kit-template-cursor-sh-*.zip", resulting in a mismatch that prevented successful template downloads. This commit updates the release scripts to use "cursor-agent" consistently throughout, aligning with the AGENT_CONFIG key and the documented best practice of using actual CLI tool names as dictionary keys. Changes: - Update ALL_AGENTS array in create-release-packages.sh - Update case statement for cursor-agent in build_variant() - Update release asset paths in create-github-release.sh - Update documentation in README.md and AGENTS.md to reflect correct usage This ensures that `specify init --ai cursor-agent` correctly finds and downloads the matching release package from GitHub. Fixes the bug where cursor-agent initialization would fail with "No matching release asset found" error. **Written with the help of a cursor agent** --- .github/workflows/scripts/create-github-release.sh | 4 ++-- .github/workflows/scripts/create-release-packages.sh | 10 +++++----- AGENTS.md | 2 +- README.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/scripts/create-github-release.sh b/.github/workflows/scripts/create-github-release.sh index 3c12dff7..f67ee3df 100644 --- a/.github/workflows/scripts/create-github-release.sh +++ b/.github/workflows/scripts/create-github-release.sh @@ -22,8 +22,8 @@ gh release create "$VERSION" \ .genreleases/spec-kit-template-claude-ps-"$VERSION".zip \ .genreleases/spec-kit-template-gemini-sh-"$VERSION".zip \ .genreleases/spec-kit-template-gemini-ps-"$VERSION".zip \ - .genreleases/spec-kit-template-cursor-sh-"$VERSION".zip \ - .genreleases/spec-kit-template-cursor-ps-"$VERSION".zip \ + .genreleases/spec-kit-template-cursor-agent-sh-"$VERSION".zip \ + .genreleases/spec-kit-template-cursor-agent-ps-"$VERSION".zip \ .genreleases/spec-kit-template-opencode-sh-"$VERSION".zip \ .genreleases/spec-kit-template-opencode-ps-"$VERSION".zip \ .genreleases/spec-kit-template-qwen-sh-"$VERSION".zip \ diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index 155b8322..3e7211ec 100644 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -6,7 +6,7 @@ set -euo pipefail # Usage: .github/workflows/scripts/create-release-packages.sh # Version argument should include leading 'v'. # Optionally set AGENTS and/or SCRIPTS env vars to limit what gets built. -# AGENTS : space or comma separated subset of: claude gemini copilot cursor qwen opencode windsurf codex (default: all) +# AGENTS : space or comma separated subset of: claude gemini copilot cursor-agent qwen opencode windsurf codex (default: all) # SCRIPTS : space or comma separated subset of: sh ps (default: both) # Examples: # AGENTS=claude SCRIPTS=sh $0 v0.2.0 @@ -133,7 +133,7 @@ build_variant() { [[ -d templates ]] && { mkdir -p "$SPEC_DIR/templates"; find templates -type f -not -path "templates/commands/*" -not -name "vscode-settings.json" -exec cp --parents {} "$SPEC_DIR"/ \; ; echo "Copied templates -> .specify/templates"; } # NOTE: We substitute {ARGS} internally. Outward tokens differ intentionally: - # * Markdown/prompt (claude, copilot, cursor, opencode): $ARGUMENTS + # * Markdown/prompt (claude, copilot, cursor-agent, opencode): $ARGUMENTS # * TOML (gemini, qwen): {{args}} # This keeps formats readable without extra abstraction. @@ -152,9 +152,9 @@ build_variant() { mkdir -p "$base_dir/.vscode" [[ -f templates/vscode-settings.json ]] && cp templates/vscode-settings.json "$base_dir/.vscode/settings.json" ;; - cursor) + cursor-agent) mkdir -p "$base_dir/.cursor/commands" - generate_commands cursor md "\$ARGUMENTS" "$base_dir/.cursor/commands" "$script" ;; + generate_commands cursor-agent md "\$ARGUMENTS" "$base_dir/.cursor/commands" "$script" ;; qwen) mkdir -p "$base_dir/.qwen/commands" generate_commands qwen toml "{{args}}" "$base_dir/.qwen/commands" "$script" @@ -190,7 +190,7 @@ build_variant() { } # Determine agent list -ALL_AGENTS=(claude gemini copilot cursor qwen opencode windsurf codex kilocode auggie roo codebuddy q) +ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy q) ALL_SCRIPTS=(sh ps) norm_list() { diff --git a/AGENTS.md b/AGENTS.md index db88e3d3..3a29e253 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -104,7 +104,7 @@ Modify `.github/workflows/scripts/create-release-packages.sh`: ##### Add to ALL_AGENTS array: ```bash -ALL_AGENTS=(claude gemini copilot cursor qwen opencode windsurf q) +ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf q) ``` ##### Add case statement for directory structure: diff --git a/README.md b/README.md index a9bfb4b0..34798eb3 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ The `specify` command supports the following options: | Argument/Option | Type | Description | |------------------------|----------|------------------------------------------------------------------------------| | `` | Argument | Name for your new project directory (optional if using `--here`, or use `.` for current directory) | -| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, or `q` | +| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, or `q` | | `--script` | Option | Script variant to use: `sh` (bash/zsh) or `ps` (PowerShell) | | `--ignore-agent-tools` | Flag | Skip checks for AI agent tools like Claude Code | | `--no-git` | Flag | Skip git repository initialization | From f7ae5781b73c28865a25acff84ef6074cf1dc376 Mon Sep 17 00:00:00 2001 From: Ben Greene Date: Fri, 10 Oct 2025 21:12:06 -0400 Subject: [PATCH 2/2] A few more places to update from code review --- scripts/bash/update-agent-context.sh | 8 ++++---- scripts/powershell/update-agent-context.ps1 | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index 1ad88293..1610c740 100644 --- a/scripts/bash/update-agent-context.sh +++ b/scripts/bash/update-agent-context.sh @@ -35,7 +35,7 @@ # - Creates default Claude file if no agent files exist # # Usage: ./update-agent-context.sh [agent_type] -# Agent types: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|q +# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|q # Leave empty to update all existing agent files set -e @@ -558,7 +558,7 @@ update_specific_agent() { copilot) update_agent_file "$COPILOT_FILE" "GitHub Copilot" ;; - cursor) + cursor-agent) update_agent_file "$CURSOR_FILE" "Cursor IDE" ;; qwen) @@ -590,7 +590,7 @@ update_specific_agent() { ;; *) log_error "Unknown agent type '$agent_type'" - log_error "Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|q" + log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|q" exit 1 ;; esac @@ -684,7 +684,7 @@ print_summary() { echo - log_info "Usage: $0 [claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|codebuddy|q]" + log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|codebuddy|q]" } #============================================================================== diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1 index baf586e4..64650833 100644 --- a/scripts/powershell/update-agent-context.ps1 +++ b/scripts/powershell/update-agent-context.ps1 @@ -9,7 +9,7 @@ Mirrors the behavior of scripts/bash/update-agent-context.sh: 2. Plan Data Extraction 3. Agent File Management (create from template or update existing) 4. Content Generation (technology stack, recent changes, timestamp) - 5. Multi-Agent Support (claude, gemini, copilot, cursor, qwen, opencode, codex, windsurf, kilocode, auggie, roo, q) + 5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, q) .PARAMETER AgentType Optional agent key to update a single agent. If omitted, updates all existing agent files (creating a default Claude file if none exist). @@ -25,7 +25,7 @@ Relies on common helper functions in common.ps1 #> param( [Parameter(Position=0)] - [ValidateSet('claude','gemini','copilot','cursor','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','q')] + [ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','q')] [string]$AgentType ) @@ -370,7 +370,7 @@ function Update-SpecificAgent { 'claude' { Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code' } 'gemini' { Update-AgentFile -TargetFile $GEMINI_FILE -AgentName 'Gemini CLI' } 'copilot' { Update-AgentFile -TargetFile $COPILOT_FILE -AgentName 'GitHub Copilot' } - 'cursor' { Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE' } + 'cursor-agent' { Update-AgentFile -TargetFile $CURSOR_FILE -AgentName 'Cursor IDE' } 'qwen' { Update-AgentFile -TargetFile $QWEN_FILE -AgentName 'Qwen Code' } 'opencode' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'opencode' } 'codex' { Update-AgentFile -TargetFile $AGENTS_FILE -AgentName 'Codex CLI' } @@ -380,7 +380,7 @@ function Update-SpecificAgent { 'roo' { Update-AgentFile -TargetFile $ROO_FILE -AgentName 'Roo Code' } 'codebuddy' { Update-AgentFile -TargetFile $CODEBUDDY_FILE -AgentName 'CodeBuddy' } 'q' { Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI' } - default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|q'; return $false } + default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|q'; return $false } } } @@ -413,7 +413,7 @@ function Print-Summary { if ($NEW_FRAMEWORK) { Write-Host " - Added framework: $NEW_FRAMEWORK" } if ($NEW_DB -and $NEW_DB -ne 'N/A') { Write-Host " - Added database: $NEW_DB" } Write-Host '' - Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|q]' + Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|q]' } function Main {