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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user