Skip to content

Commit 256a1f6

Browse files
committed
Stage 6: Complete migration — remove legacy scaffold path (#1924)
Remove the legacy GitHub download and offline scaffold code paths. All 26 agents now use the integration system exclusively. Code removal (~1073 lines from __init__.py): - download_template_from_github(), download_and_extract_template() - scaffold_from_core_pack(), _locate_release_script() - install_ai_skills(), _get_skills_dir (restored slim version for presets) - _has_bundled_skills(), _migrate_legacy_kimi_dotted_skills() - AGENT_SKILLS_MIGRATIONS, _handle_agent_skills_migration() - _parse_rate_limit_headers(), _format_rate_limit_error() - Three-way branch in init() collapsed to integration-only Config derivation (single source of truth): - AGENT_CONFIG derived from INTEGRATION_REGISTRY (replaced 180-line dict) - CommandRegistrar.AGENT_CONFIGS derived from INTEGRATION_REGISTRY (replaced 160-line dict) - Backward-compat constants kept for presets/extensions: SKILL_DESCRIPTIONS, NATIVE_SKILLS_AGENTS, DEFAULT_SKILLS_DIR Release pipeline cleanup: - Deleted create-release-packages.sh/.ps1 (948 lines of ZIP packaging) - Deleted create-github-release.sh, generate-release-notes.sh - Deleted simulate-release.sh, get-next-version.sh, update-version.sh - Removed .github/workflows/scripts/ directory entirely - release.yml is now self-contained: check, notes, release all inlined - Install instructions use uv tool install with version tag Test cleanup: - Deleted test_ai_skills.py (tested removed functions) - Deleted test_core_pack_scaffold.py (tested removed scaffold) - Cleaned test_agent_config_consistency.py (removed 19 release-script tests) - Fixed test_branch_numbering.py (removed dead monkeypatches) - Updated auto-promote tests (verify files created, not tip messages) 1089 tests pass, 0 failures, ruff clean.
1 parent a858c1d commit 256a1f6

23 files changed

+185
-4670
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,63 @@ jobs:
2727
- name: Check if release already exists
2828
id: check_release
2929
run: |
30-
chmod +x .github/workflows/scripts/check-release-exists.sh
31-
.github/workflows/scripts/check-release-exists.sh ${{ steps.version.outputs.tag }}
30+
VERSION="${{ steps.version.outputs.tag }}"
31+
if gh release view "$VERSION" >/dev/null 2>&1; then
32+
echo "exists=true" >> $GITHUB_OUTPUT
33+
echo "Release $VERSION already exists, skipping..."
34+
else
35+
echo "exists=false" >> $GITHUB_OUTPUT
36+
echo "Release $VERSION does not exist, proceeding..."
37+
fi
3238
env:
3339
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3440

35-
- name: Create release package variants
36-
if: steps.check_release.outputs.exists == 'false'
37-
run: |
38-
chmod +x .github/workflows/scripts/create-release-packages.sh
39-
.github/workflows/scripts/create-release-packages.sh ${{ steps.version.outputs.tag }}
40-
4141
- name: Generate release notes
4242
if: steps.check_release.outputs.exists == 'false'
43-
id: release_notes
4443
run: |
45-
chmod +x .github/workflows/scripts/generate-release-notes.sh
46-
# Get the previous tag for changelog generation
47-
PREVIOUS_TAG=$(git describe --tags --abbrev=0 ${{ steps.version.outputs.tag }}^ 2>/dev/null || echo "")
48-
# Default to v0.0.0 if no previous tag is found (e.g., first release)
44+
VERSION="${{ steps.version.outputs.tag }}"
45+
VERSION_NO_V=${VERSION#v}
46+
47+
# Find previous tag
48+
PREVIOUS_TAG=$(git tag -l 'v*' --sort=-version:refname | grep -v "^${VERSION}$" | head -n 1)
49+
if [ -z "$PREVIOUS_TAG" ]; then
50+
PREVIOUS_TAG=""
51+
fi
52+
53+
# Get commits since previous tag
4954
if [ -z "$PREVIOUS_TAG" ]; then
50-
PREVIOUS_TAG="v0.0.0"
55+
COMMIT_COUNT=$(git rev-list --count HEAD)
56+
if [ "$COMMIT_COUNT" -gt 20 ]; then
57+
COMMITS=$(git log --oneline --pretty=format:"- %s" --no-merges HEAD~20..HEAD)
58+
else
59+
COMMITS=$(git log --oneline --pretty=format:"- %s" --no-merges)
60+
fi
61+
else
62+
COMMITS=$(git log --oneline --pretty=format:"- %s" --no-merges "$PREVIOUS_TAG"..HEAD)
5163
fi
52-
.github/workflows/scripts/generate-release-notes.sh ${{ steps.version.outputs.tag }} "$PREVIOUS_TAG"
64+
65+
cat > release_notes.md << NOTES_EOF
66+
## Install
67+
68+
\`\`\`bash
69+
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git@${VERSION}
70+
specify init my-project
71+
\`\`\`
72+
73+
NOTES_EOF
74+
75+
echo "## What's Changed" >> release_notes.md
76+
echo "" >> release_notes.md
77+
echo "$COMMITS" >> release_notes.md
5378
5479
- name: Create GitHub Release
5580
if: steps.check_release.outputs.exists == 'false'
5681
run: |
57-
chmod +x .github/workflows/scripts/create-github-release.sh
58-
.github/workflows/scripts/create-github-release.sh ${{ steps.version.outputs.tag }}
82+
VERSION="${{ steps.version.outputs.tag }}"
83+
VERSION_NO_V=${VERSION#v}
84+
gh release create "$VERSION" \
85+
--title "Spec Kit - $VERSION_NO_V" \
86+
--notes-file release_notes.md
5987
env:
6088
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6189

.github/workflows/scripts/check-release-exists.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/scripts/create-github-release.sh

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)