Description
Add Cursor commands to automate git tag creation, GitHub release workflow, and intelligent version bumping during PR creation.
Motivation
Currently requires manual steps:
- Version bumping: Manual decision on major/minor/patch and running
make bump-*
- Tag and release: Manual git commands and GitHub release creation
This should be streamlined with intelligent Cursor commands.
Proposed Commands
1. /tag-and-release
Automates the complete tag and release workflow:
Validation Steps:
- ✅ Verify on main branch with clean working directory
- ✅ Get current version using
make version (reads from pyproject.toml)
- ✅ Confirm version is consecutive to existing git tag (X.Y.Z format)
- ✅ Validate CHANGELOG.md follows Keep a Changelog format:
- Version format:
## [X.Y.Z] - YYYY-MM-DD
- Required sections: Added, Changed, Deprecated, Removed, Fixed, Security
- Most recent version at top
- Entries under current version
Actions:
- Creates annotated git tag with release notes from CHANGELOG.md
- Pushes tag to remote
- Creates GitHub release with formatted notes from CHANGELOG
Usage:
2. /create-pr (Enhanced)
Update existing PR command to include intelligent version bumping:
Version Analysis:
- Examine git tag/version history
- Analyze changes in the branch
- Suggest appropriate version bump following Semantic Versioning:
- MAJOR (X.0.0): Breaking changes (incompatible API changes)
- MINOR (0.X.0): New features (backward compatible)
- PATCH (0.0.X): Bug fixes (backward compatible)
Version Bump Workflow:
- Present suggestion: "Based on changes, suggest: PATCH bump (0.3.3 → 0.3.4)"
- Confirm with user
- Execute appropriate command:
make bump-patch (0.3.3 → 0.3.4)
make bump-minor (0.3.3 → 0.4.0)
make bump-major (0.3.3 → 1.0.0)
- Prompt user to update CHANGELOG.md with actual changes
- Commit version bump
- Create PR with updated version
Requirements
/tag-and-release Requirements
/create-pr Enhancement Requirements
Keep a Changelog Format
Version entries must follow:
## [X.Y.Z] - YYYY-MM-DD
### Added
- New features
### Changed
- Changes to existing functionality
### Deprecated
- Soon-to-be removed features
### Removed
- Removed features
### Fixed
- Bug fixes
### Security
- Security fixes
Semantic Versioning Rules
Given version MAJOR.MINOR.PATCH (e.g., 1.4.2):
- MAJOR: Increment for incompatible API changes (breaking changes)
- MINOR: Increment for new functionality (backward compatible)
- PATCH: Increment for bug fixes (backward compatible)
- Never reuse version numbers
- Start at 0.1.0 for initial development
Integration with Version Management
Complete workflow:
- Work on feature branch
/create-pr → Analyzes changes, suggests version bump, updates version
- PR review and merge
/tag-and-release → Validates and creates tag + GitHub release
Implementation Location
- New command:
.cursor/commands/tag-and-release.md
- Update existing:
.cursor/commands/create-pr.md
Reference existing:
.cursor/commands/git-commit.md
docs/VERSION_MANAGEMENT.md
Benefits
- ✅ Automated version bump suggestions based on changes
- ✅ Enforces Keep a Changelog format
- ✅ Enforces Semantic Versioning rules
- ✅ Validates version continuity
- ✅ Streamlines release workflow
- ✅ Reduces manual steps and potential errors
- ✅ Consistent release notes formatting
- ✅ Faster, safer releases
Description
Add Cursor commands to automate git tag creation, GitHub release workflow, and intelligent version bumping during PR creation.
Motivation
Currently requires manual steps:
make bump-*This should be streamlined with intelligent Cursor commands.
Proposed Commands
1.
/tag-and-releaseAutomates the complete tag and release workflow:
Validation Steps:
make version(reads from pyproject.toml)## [X.Y.Z] - YYYY-MM-DDActions:
Usage:
2.
/create-pr(Enhanced)Update existing PR command to include intelligent version bumping:
Version Analysis:
Version Bump Workflow:
make bump-patch(0.3.3 → 0.3.4)make bump-minor(0.3.3 → 0.4.0)make bump-major(0.3.3 → 1.0.0)Requirements
/tag-and-releaseRequirementsmake versionto get current version from pyproject.toml## [X.Y.Z] - YYYY-MM-DD/create-prEnhancement Requirementsgit tag -l | sort -V)make version)feat:commits)fix:commits)make bump-patch/bump-minor/bump-majorKeep a Changelog Format
Version entries must follow:
Semantic Versioning Rules
Given version MAJOR.MINOR.PATCH (e.g., 1.4.2):
Integration with Version Management
Complete workflow:
/create-pr→ Analyzes changes, suggests version bump, updates version/tag-and-release→ Validates and creates tag + GitHub releaseImplementation Location
.cursor/commands/tag-and-release.md.cursor/commands/create-pr.mdReference existing:
.cursor/commands/git-commit.mddocs/VERSION_MANAGEMENT.mdBenefits