From 1a06dea491960b2758242c0cd257bd7039ce899b Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 19 Aug 2025 03:53:42 +0000 Subject: [PATCH] docs(workflow): enhance version control rules with synchronization requirements - Add Version Synchronization Requirements section for package.json/CHANGELOG.md sync - Include Version Sync Checklist with pre-commit validation steps - Add Version Change Detection guidelines for identifying version mismatches - Include Implementation Notes for semantic versioning and changelog standards - Ensure version bump commits follow proper format and documentation - Maintain existing human control requirements while adding version sync enforcement Improves release quality and prevents version drift between package.json and CHANGELOG.md --- .cursor/rules/workflow/version_control.mdc | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.cursor/rules/workflow/version_control.mdc b/.cursor/rules/workflow/version_control.mdc index 7635fb6b..6ae30b64 100644 --- a/.cursor/rules/workflow/version_control.mdc +++ b/.cursor/rules/workflow/version_control.mdc @@ -25,6 +25,37 @@ alwaysApply: true * a **draft commit message** (copy-paste ready), * nothing auto-applied. +## 4) Version Synchronization Requirements + +* **MUST** check for version changes in `package.json` before committing +* **MUST** ensure `CHANGELOG.md` is updated when `package.json` version changes +* **MUST** validate version format consistency between both files +* **MUST** include version bump commits in changelog with proper semantic versioning + +### Version Sync Checklist (Before Commit) + +- [ ] `package.json` version matches latest `CHANGELOG.md` entry +- [ ] New version follows semantic versioning (MAJOR.MINOR.PATCH[-PRERELEASE]) +- [ ] Changelog entry includes all significant changes since last version +- [ ] Version bump commit message follows `build(version): bump to X.Y.Z` format +- [ ] Breaking changes properly documented with migration notes +- [ ] Alert developer in chat message that version has been updated + +### Version Change Detection + +* **Check for version changes** in staged/unstaged `package.json` +* **Alert developer** if version changed but changelog not updated +* **Suggest changelog update** with proper format and content +* **Validate semantic versioning** compliance + +### Implementation Notes + +* **Version Detection**: Compare `package.json` version field with latest changelog entry +* **Semantic Validation**: Ensure version follows `X.Y.Z[-PRERELEASE]` format +* **Changelog Format**: Follow [Keep a Changelog](https://keepachangelog.com/) standards +* **Breaking Changes**: Use `!` in commit message and `BREAKING CHANGE:` in changelog +* **Pre-release Versions**: Include beta/alpha/rc suffixes in both files consistently + --- # Commit Message Format (Normative)