From d09552fc6389bbec2136113440369996202324f1 Mon Sep 17 00:00:00 2001 From: Ben Greene Date: Fri, 10 Oct 2025 20:43:20 -0400 Subject: [PATCH] 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 |