Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7c0f0a4
Consolidate scripts
localden Sep 20, 2025
64171ec
Use proper line endings
localden Sep 20, 2025
aa08257
Cleanup the setup for generated packages
localden Sep 20, 2025
e83e1cd
Update script delegation from GitHub Action
localden Sep 20, 2025
826c3a6
Update scripts/powershell/check-prerequisites.ps1
localden Sep 20, 2025
0bebcf9
Update scripts/bash/check-prerequisites.sh
localden Sep 20, 2025
505b956
Script cleanup
localden Sep 20, 2025
3f67cf2
Fix script path
localden Sep 20, 2025
2c1e168
Update scripts/bash/check-prerequisites.sh
localden Sep 20, 2025
84ec461
Update scripts/powershell/check-prerequisites.ps1
localden Sep 20, 2025
2d242b4
Update config
localden Sep 20, 2025
f04e01d
Merge branch 'consolidate-scripts' of https://github.com/github/spec-…
localden Sep 20, 2025
1a71b03
Script and template tweaks
localden Sep 20, 2025
406521c
Simplification
localden Sep 20, 2025
8d52959
Update scripts/powershell/create-new-feature.ps1
localden Sep 21, 2025
4cc15ba
Update scripts/bash/update-agent-context.sh
localden Sep 21, 2025
0e5f7ce
Update templates/plan-template.md
localden Sep 21, 2025
3bdb1d9
Root detection logic
localden Sep 21, 2025
ee9f839
Update contribution guidelines.
localden Sep 21, 2025
5eccac5
Update CONTRIBUTING.md
localden Sep 21, 2025
7c2fd50
Update CONTRIBUTING.md
localden Sep 21, 2025
f4b1608
Update CONTRIBUTING.md
localden Sep 21, 2025
f9c9cd3
Update CONTRIBUTING.md
localden Sep 21, 2025
d92d6f5
Update CONTRIBUTING.md
localden Sep 21, 2025
90f0652
Update update-agent-context.ps1
localden Sep 21, 2025
895bcbe
Update prompts
localden Sep 21, 2025
d682f5a
Clarification
localden Sep 21, 2025
0672bfc
Update scripts/powershell/update-agent-context.ps1
localden Sep 21, 2025
84b61bc
Update scripts/powershell/update-agent-context.ps1
localden Sep 21, 2025
da60d35
Update scripts/bash/common.sh
localden Sep 21, 2025
93e4156
Fix script config
localden Sep 21, 2025
0e49e79
Update scripts/bash/update-agent-context.sh
localden Sep 21, 2025
5243137
Update changelog
localden Sep 21, 2025
a810b1b
Update CHANGELOG.md
localden Sep 21, 2025
2d89075
Update CHANGELOG.md
localden Sep 21, 2025
b03bba3
Update scripts/powershell/check-prerequisites.ps1
localden Sep 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 10 additions & 98 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,13 @@ jobs:
- name: Get latest tag
id: get_tag
run: |
# Get the latest tag, or use v0.0.0 if no tags exist
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT

# Extract version number and increment
VERSION=$(echo $LATEST_TAG | sed 's/v//')
IFS='.' read -ra VERSION_PARTS <<< "$VERSION"
MAJOR=${VERSION_PARTS[0]:-0}
MINOR=${VERSION_PARTS[1]:-0}
PATCH=${VERSION_PARTS[2]:-0}

# Increment patch version
PATCH=$((PATCH + 1))
NEW_VERSION="v$MAJOR.$MINOR.$PATCH"

echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "New version will be: $NEW_VERSION"
chmod +x .github/workflows/scripts/get-next-version.sh
.github/workflows/scripts/get-next-version.sh
- name: Check if release already exists
id: check_release
run: |
if gh release view ${{ steps.get_tag.outputs.new_version }} >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Release ${{ steps.get_tag.outputs.new_version }} already exists, skipping..."
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Release ${{ steps.get_tag.outputs.new_version }} does not exist, proceeding..."
fi
chmod +x .github/workflows/scripts/check-release-exists.sh
.github/workflows/scripts/check-release-exists.sh ${{ steps.get_tag.outputs.new_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release package variants
Expand All @@ -63,85 +43,17 @@ jobs:
if: steps.check_release.outputs.exists == 'false'
id: release_notes
run: |
# Get commits since last tag
LAST_TAG=${{ steps.get_tag.outputs.latest_tag }}
if [ "$LAST_TAG" = "v0.0.0" ]; then
# Check how many commits we have and use that as the limit
COMMIT_COUNT=$(git rev-list --count HEAD)
if [ "$COMMIT_COUNT" -gt 10 ]; then
COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~10..HEAD)
else
COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~$COMMIT_COUNT..HEAD 2>/dev/null || git log --oneline --pretty=format:"- %s")
fi
else
COMMITS=$(git log --oneline --pretty=format:"- %s" $LAST_TAG..HEAD)
fi

# Create release notes
cat > release_notes.md << EOF
Template release ${{ steps.get_tag.outputs.new_version }}

Updated specification-driven development templates for GitHub Copilot, Claude Code, Gemini CLI, Cursor, Qwen, opencode, Windsurf, and Codex.

Now includes per-script variants for POSIX shell (sh) and PowerShell (ps).

Download the template for your preferred AI assistant + script type:
- spec-kit-template-copilot-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-copilot-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-claude-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-claude-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-gemini-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-gemini-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-cursor-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-cursor-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-opencode-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-opencode-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-qwen-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-qwen-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-windsurf-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-windsurf-ps-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-codex-sh-${{ steps.get_tag.outputs.new_version }}.zip
- spec-kit-template-codex-ps-${{ steps.get_tag.outputs.new_version }}.zip
EOF

echo "Generated release notes:"
cat release_notes.md
chmod +x .github/workflows/scripts/generate-release-notes.sh
.github/workflows/scripts/generate-release-notes.sh ${{ steps.get_tag.outputs.new_version }} ${{ steps.get_tag.outputs.latest_tag }}
- name: Create GitHub Release
if: steps.check_release.outputs.exists == 'false'
run: |
# Remove 'v' prefix from version for release title
VERSION_NO_V=${{ steps.get_tag.outputs.new_version }}
VERSION_NO_V=${VERSION_NO_V#v}

gh release create ${{ steps.get_tag.outputs.new_version }} \
spec-kit-template-copilot-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-copilot-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-claude-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-claude-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-gemini-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-gemini-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-cursor-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-cursor-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-opencode-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-opencode-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-qwen-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-qwen-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-windsurf-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-windsurf-ps-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-codex-sh-${{ steps.get_tag.outputs.new_version }}.zip \
spec-kit-template-codex-ps-${{ steps.get_tag.outputs.new_version }}.zip \
--title "Spec Kit Templates - $VERSION_NO_V" \
--notes-file release_notes.md
chmod +x .github/workflows/scripts/create-github-release.sh
.github/workflows/scripts/create-github-release.sh ${{ steps.get_tag.outputs.new_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update version in pyproject.toml (for release artifacts only)
if: steps.check_release.outputs.exists == 'false'
run: |
# Update version in pyproject.toml (remove 'v' prefix for Python versioning)
VERSION=${{ steps.get_tag.outputs.new_version }}
PYTHON_VERSION=${VERSION#v}

if [ -f "pyproject.toml" ]; then
sed -i "s/version = \".*\"/version = \"$PYTHON_VERSION\"/" pyproject.toml
echo "Updated pyproject.toml version to $PYTHON_VERSION (for release artifacts only)"
fi
chmod +x .github/workflows/scripts/update-version.sh
.github/workflows/scripts/update-version.sh ${{ steps.get_tag.outputs.new_version }}
21 changes: 21 additions & 0 deletions .github/workflows/scripts/check-release-exists.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail

# check-release-exists.sh
# Check if a GitHub release already exists for the given version
# Usage: check-release-exists.sh <version>

if [[ $# -ne 1 ]]; then
echo "Usage: $0 <version>" >&2
exit 1
fi

VERSION="$1"

if gh release view "$VERSION" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Release $VERSION already exists, skipping..."
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Release $VERSION does not exist, proceeding..."
fi
36 changes: 36 additions & 0 deletions .github/workflows/scripts/create-github-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail

# create-github-release.sh
# Create a GitHub release with all template zip files
# Usage: create-github-release.sh <version>

if [[ $# -ne 1 ]]; then
echo "Usage: $0 <version>" >&2
exit 1
fi

VERSION="$1"

# Remove 'v' prefix from version for release title
VERSION_NO_V=${VERSION#v}

gh release create "$VERSION" \
.genreleases/spec-kit-template-copilot-sh-"$VERSION".zip \
.genreleases/spec-kit-template-copilot-ps-"$VERSION".zip \
.genreleases/spec-kit-template-claude-sh-"$VERSION".zip \
.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-opencode-sh-"$VERSION".zip \
.genreleases/spec-kit-template-opencode-ps-"$VERSION".zip \
.genreleases/spec-kit-template-qwen-sh-"$VERSION".zip \
.genreleases/spec-kit-template-qwen-ps-"$VERSION".zip \
.genreleases/spec-kit-template-windsurf-sh-"$VERSION".zip \
.genreleases/spec-kit-template-windsurf-ps-"$VERSION".zip \
.genreleases/spec-kit-template-codex-sh-"$VERSION".zip \
.genreleases/spec-kit-template-codex-ps-"$VERSION".zip \
--title "Spec Kit Templates - $VERSION_NO_V" \
--notes-file release_notes.md
17 changes: 10 additions & 7 deletions .github/workflows/scripts/create-release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ fi

echo "Building release packages for $NEW_VERSION"

rm -rf sdd-package-base* sdd-*-package-* spec-kit-template-*-"${NEW_VERSION}".zip || true
# Create and use .genreleases directory for all build artifacts
GENRELEASES_DIR=".genreleases"
mkdir -p "$GENRELEASES_DIR"
rm -rf "$GENRELEASES_DIR"/* || true
Comment thread
localden marked this conversation as resolved.

rewrite_paths() {
sed -E \
Expand Down Expand Up @@ -82,7 +85,7 @@ generate_commands() {

build_variant() {
local agent=$1 script=$2
local base_dir="sdd-${agent}-package-${script}"
local base_dir="$GENRELEASES_DIR/sdd-${agent}-package-${script}"
echo "Building $agent ($script) package..."
mkdir -p "$base_dir"

Expand Down Expand Up @@ -158,11 +161,11 @@ build_variant() {
mkdir -p "$base_dir/.windsurf/workflows"
generate_commands windsurf md "\$ARGUMENTS" "$base_dir/.windsurf/workflows" "$script" ;;
codex)

Copilot AI Sep 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The path change from '.codex/commands' to '.codex/prompts' should be documented in the commit message or comments, as this represents a breaking change for existing Codex integrations.

Suggested change
codex)
codex)
# BREAKING CHANGE: Codex integration path changed from '.codex/commands' to '.codex/prompts'.
# Existing Codex integrations expecting '.codex/commands' will need to be updated.

Copilot uses AI. Check for mistakes.
mkdir -p "$base_dir/.codex/commands"
generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/commands" "$script" ;;
mkdir -p "$base_dir/.codex/prompts"
generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/prompts" "$script" ;;
Comment thread
localden marked this conversation as resolved.
esac
Comment on lines +164 to 166

Copilot AI Sep 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The directory structure for Codex has changed from .codex/commands to .codex/prompts but this change should be documented or commented to explain why the directory structure differs from other agents.

Suggested change
mkdir -p "$base_dir/.codex/prompts"
generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/prompts" "$script" ;;
esac
# Note: Codex uses `.codex/prompts` instead of `.codex/commands` to match its expected directory structure.
# This differs from other agents, which use a `commands` subdirectory. See Codex integration docs for details.
mkdir -p "$base_dir/.codex/prompts"
generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/prompts" "$script" ;;

Copilot uses AI. Check for mistakes.
( cd "$base_dir" && zip -r "../spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip" . )
echo "Created spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip"
echo "Created $GENRELEASES_DIR/spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip"
}

# Determine agent list
Expand Down Expand Up @@ -212,5 +215,5 @@ for agent in "${AGENT_LIST[@]}"; do
done
done

echo "Archives:"
ls -1 spec-kit-template-*-"${NEW_VERSION}".zip
echo "Archives in $GENRELEASES_DIR:"
ls -1 "$GENRELEASES_DIR"/spec-kit-template-*-"${NEW_VERSION}".zip
57 changes: 57 additions & 0 deletions .github/workflows/scripts/generate-release-notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
set -euo pipefail

# generate-release-notes.sh
# Generate release notes from git history
# Usage: generate-release-notes.sh <new_version> <last_tag>

if [[ $# -ne 2 ]]; then
echo "Usage: $0 <new_version> <last_tag>" >&2
exit 1
fi

NEW_VERSION="$1"
LAST_TAG="$2"

# Get commits since last tag
if [ "$LAST_TAG" = "v0.0.0" ]; then
# Check how many commits we have and use that as the limit
COMMIT_COUNT=$(git rev-list --count HEAD)
if [ "$COMMIT_COUNT" -gt 10 ]; then
COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~10..HEAD)
else
COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~$COMMIT_COUNT..HEAD 2>/dev/null || git log --oneline --pretty=format:"- %s")
fi
Comment thread
localden marked this conversation as resolved.
else
COMMITS=$(git log --oneline --pretty=format:"- %s" $LAST_TAG..HEAD)
fi

# Create release notes
cat > release_notes.md << EOF
Template release $NEW_VERSION

Updated specification-driven development templates for GitHub Copilot, Claude Code, Gemini CLI, Cursor, Qwen, opencode, Windsurf, and Codex.

Now includes per-script variants for POSIX shell (sh) and PowerShell (ps).

Download the template for your preferred AI assistant + script type:
- spec-kit-template-copilot-sh-$NEW_VERSION.zip
- spec-kit-template-copilot-ps-$NEW_VERSION.zip
- spec-kit-template-claude-sh-$NEW_VERSION.zip
- spec-kit-template-claude-ps-$NEW_VERSION.zip
- spec-kit-template-gemini-sh-$NEW_VERSION.zip
- spec-kit-template-gemini-ps-$NEW_VERSION.zip
- spec-kit-template-cursor-sh-$NEW_VERSION.zip
- spec-kit-template-cursor-ps-$NEW_VERSION.zip
- spec-kit-template-opencode-sh-$NEW_VERSION.zip
- spec-kit-template-opencode-ps-$NEW_VERSION.zip
- spec-kit-template-qwen-sh-$NEW_VERSION.zip
- spec-kit-template-qwen-ps-$NEW_VERSION.zip
- spec-kit-template-windsurf-sh-$NEW_VERSION.zip
- spec-kit-template-windsurf-ps-$NEW_VERSION.zip
- spec-kit-template-codex-sh-$NEW_VERSION.zip
- spec-kit-template-codex-ps-$NEW_VERSION.zip
EOF

echo "Generated release notes:"
cat release_notes.md
24 changes: 24 additions & 0 deletions .github/workflows/scripts/get-next-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail

# get-next-version.sh
# Calculate the next version based on the latest git tag and output GitHub Actions variables
# Usage: get-next-version.sh

# Get the latest tag, or use v0.0.0 if no tags exist
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT

# Extract version number and increment
VERSION=$(echo $LATEST_TAG | sed 's/v//')
IFS='.' read -ra VERSION_PARTS <<< "$VERSION"
MAJOR=${VERSION_PARTS[0]:-0}
MINOR=${VERSION_PARTS[1]:-0}
PATCH=${VERSION_PARTS[2]:-0}

# Increment patch version
PATCH=$((PATCH + 1))
NEW_VERSION="v$MAJOR.$MINOR.$PATCH"

echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "New version will be: $NEW_VERSION"
23 changes: 23 additions & 0 deletions .github/workflows/scripts/update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail

# update-version.sh
# Update version in pyproject.toml (for release artifacts only)
# Usage: update-version.sh <version>

if [[ $# -ne 1 ]]; then
echo "Usage: $0 <version>" >&2
exit 1
fi

VERSION="$1"

# Remove 'v' prefix for Python versioning
PYTHON_VERSION=${VERSION#v}

if [ -f "pyproject.toml" ]; then
sed -i "s/version = \".*\"/version = \"$PYTHON_VERSION\"/" pyproject.toml
echo "Updated pyproject.toml version to $PYTHON_VERSION (for release artifacts only)"
else
echo "Warning: pyproject.toml not found, skipping version update"
fi
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ env/
.env
.env.local
*.lock

# Spec Kit-specific files
.genreleases/
*.zip
sdd-*/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to the Specify CLI will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.12] - 2025-09-21

### Changed

- Added additional context for OpenAI Codex users - they need to set an additional environment variable, as described in [#417](https://github.com/github/spec-kit/issues/417).

## [0.0.11] - 2025-09-20

### Added
Expand Down
Loading