Write Release Notes
Instructions
Generate professional release notes and changelog entries for software releases. Analyze project changes, git history, and version information to create comprehensive release documentation.
Step 1: Gather Release Information
Determine version information:
- Read
package.json, pyproject.toml, Cargo.toml, or other version files
- Check for version bumps or new version numbers
- Identify if this is a major, minor, or patch release (semantic versioning)
- Use
bash_command to check version files: cat package.json | grep version
Analyze git history:
- Use
bash_command to get recent commits: git log --oneline --since="2 weeks ago" or git log --oneline -20
- Use
bash_command to get diff stats: git diff --stat HEAD~10..HEAD
- Use
bash_command to compare versions: git log v1.0.0..HEAD --oneline (if previous tag exists)
- Look for conventional commit messages (feat:, fix:, docs:, etc.)
Check for changelog files:
- Read existing
CHANGELOG.md, CHANGES.md, or RELEASE_NOTES.md if they exist
- Maintain consistency with existing format
- Check for
CHANGELOG or HISTORY files in project root
Identify project type:
- Check for package managers:
package.json (npm), pyproject.toml (Python), Cargo.toml (Rust)
- This helps determine version format and release conventions
Step 2: Categorize Changes
Organize changes into standard release note categories:
Added (Features):
- New features, functionality, or capabilities
- Look for:
feat:, "add", "new", "introduce" in commit messages
- Major new components or modules
Changed (Improvements):
- Improvements to existing features
- API changes (non-breaking)
- Performance improvements
- Look for: "improve", "enhance", "update", "refactor" in commits
Fixed (Bug Fixes):
- Bug fixes and issue resolutions
- Look for:
fix:, "bug", "issue", "correct" in commit messages
- Security fixes
Deprecated:
- Features marked for removal
- Look for: "deprecate", "deprecated" in commits or code comments
Removed:
- Features or APIs removed
- Look for: "remove", "delete", "drop" in commits
Security:
- Security vulnerabilities fixed
- Look for: "security", "CVE", "vulnerability" in commits
Step 3: Analyze Commits and Changes
Parse commit messages:
- Use
bash_command: git log --pretty=format:"%h - %s (%an, %ar)" -20
- Group by type using conventional commits or patterns
- Extract meaningful descriptions
Review code changes:
- Use
bash_command: git diff --stat HEAD~10..HEAD to see file changes
- Use
bash_command: git log --name-status --pretty=format:"" HEAD~10..HEAD for changed files
- Look at PR titles or commit descriptions for context
Identify breaking changes:
- Look for:
BREAKING CHANGE:, "breaking", "major", "incompatible" in commits
- Check API changes in code
- Review migration guides if they exist
Step 4: Generate Release Notes Structure
Create a well-formatted release notes document with this structure:
# Release Notes - Version X.Y.Z
**Release Date**: [Current date]
**Full Changelog**: [Link to full changelog if applicable]
## Summary
Brief 2-3 sentence summary of this release highlighting the most important changes.
## 🎉 Added
- [Feature description with context]
- [Another feature]
## ✨ Changed
- [Improvement description]
- [API change with migration notes if applicable]
## 🐛 Fixed
- [Bug fix description with issue reference if available]
- [Another fix]
## 🔒 Security
- [Security fix description]
## ⚠️ Breaking Changes
- [Breaking change description]
- [Migration guide reference or steps]
## 📚 Documentation
- [Documentation improvements]
## ⚙️ Internal
- [Internal improvements, refactoring, build changes]
## Contributors
Thank you to all contributors: [List of contributors if available from git log]
## Upgrade Instructions
[If applicable, provide upgrade/installation instructions]
Step 5: Write Professional Release Notes
Use clear, user-facing language:
- Avoid technical jargon where possible
- Explain what changed and why it matters
- Include examples or use cases for major features
Be specific and actionable:
- "Fixed memory leak in data processing" not just "Fixed bugs"
- "Added support for Python 3.12" not just "Updated Python support"
- Include issue numbers or PR references if available
Group related changes:
- Combine similar fixes or features
- Use sub-bullets for detailed changes
- Keep each category organized
Include migration notes:
- For breaking changes, provide clear upgrade paths
- Reference migration guides if they exist
- Show before/after examples for API changes
Add context:
- Link to relevant documentation
- Reference related issues or PRs
- Include contributor credits if appropriate
Step 6: Format and Style
Use markdown formatting:
- Headers for version and date
- Bullet points for lists
- Code blocks for examples
- Links for references
Consistent style:
- Start each item with a verb (Added, Fixed, Changed)
- Use present tense or past tense consistently
- Keep line lengths reasonable (80-100 chars)
Emoji usage (optional but helpful):
- 🎉 for new features
- ✨ for improvements
- 🐛 for bug fixes
- 🔒 for security
- ⚠️ for breaking changes
- 📚 for documentation
Version format:
- Follow semantic versioning:
MAJOR.MINOR.PATCH
- Use consistent format:
v1.2.3 or 1.2.3
- Match project's existing versioning style
Step 7: Handle Different Scenarios
First Release:
- Focus on initial features and setup
- Explain what the project does
- Include installation/setup instructions
Patch Release:
- Focus on bug fixes
- May not need full structure
- Quick summary format
Major Release:
- Include migration guide
- Highlight breaking changes prominently
- Provide upgrade checklist
No Git History:
- Use file changes detected via
list_directory and read_file
- Analyze code modifications
- Create notes from current state vs expected state
Step 8: Verify and Complete
Check completeness:
- All significant changes included
- No placeholder text remaining
- Version number is correct
- Date is current
Validate format:
- Markdown renders correctly
- Links work (if any)
- Consistent style throughout
Save appropriately:
- Save as
RELEASE_NOTES.md or CHANGELOG.md
- Or append to existing
CHANGELOG.md
- Follow project conventions
Examples
Example 1: Semantic Versioning Project
User: "Write release notes for version 2.1.0"
- Check
package.json or pyproject.toml for version
- Analyze git commits since last tag
- Categorize into Added/Changed/Fixed
- Generate formatted release notes
Example 2: Update Existing Changelog
User: "Update the changelog"
- Read existing
CHANGELOG.md
- Get recent commits since last entry
- Add new entry at top
- Maintain existing format style
Example 3: First Release
User: "Create release notes for the initial release"
- Analyze current project state
- List initial features from codebase
- Create comprehensive first-release notes
- Include installation instructions
Best Practices
- Be accurate: Only include changes that actually happened
- Be user-focused: Write for end users, not just developers
- Be complete: Include all significant changes
- Be concise: Don't list every single commit, group intelligently
- Be helpful: Provide context and upgrade instructions
- Follow conventions: Match existing project style and format
Tools to Use
bash_command: Run git commands to analyze history
read_file: Read version files and existing changelogs
list_directory: Explore project structure
grep_search: Find version numbers or change indicators in files
Notes
- If git history is not available, focus on analyzing current code state
- Respect existing changelog format if one exists
- When unsure about a change, err on the side of inclusion
- Major releases should always include migration guides for breaking changes
- Security fixes should be clearly highlighted
1---2name: writing-release-notes3description: Generate release notes and changelog entries from git history and project changes. Use when the user asks to write release notes, create changelog, document version changes, or generate release documentation.4---5
6# Write Release Notes
7
8## Instructions
9
10Generate professional release notes and changelog entries for software releases. Analyze project changes, git history, and version information to create comprehensive release documentation.
11
12### Step 1: Gather Release Information
13
141. **Determine version information**:
15 - Read `package.json`, `pyproject.toml`, `Cargo.toml`, or other version files
16 - Check for version bumps or new version numbers
17 - Identify if this is a major, minor, or patch release (semantic versioning)
18 - Use `bash_command` to check version files: `cat package.json | grep version`
19
202. **Analyze git history**:
21 - Use `bash_command` to get recent commits: `git log --oneline --since="2 weeks ago"` or `git log --oneline -20`
22 - Use `bash_command` to get diff stats: `git diff --stat HEAD~10..HEAD`
23 - Use `bash_command` to compare versions: `git log v1.0.0..HEAD --oneline` (if previous tag exists)
24 - Look for conventional commit messages (feat:, fix:, docs:, etc.)
25
263. **Check for changelog files**:
27 - Read existing `CHANGELOG.md`, `CHANGES.md`, or `RELEASE_NOTES.md` if they exist
28 - Maintain consistency with existing format
29 - Check for `CHANGELOG` or `HISTORY` files in project root
30
314. **Identify project type**:
32 - Check for package managers: `package.json` (npm), `pyproject.toml` (Python), `Cargo.toml` (Rust)
33 - This helps determine version format and release conventions
34
35### Step 2: Categorize Changes
36
37Organize changes into standard release note categories:
38
391. **Added** (Features):
40 - New features, functionality, or capabilities
41 - Look for: `feat:`, "add", "new", "introduce" in commit messages
42 - Major new components or modules
43
442. **Changed** (Improvements):
45 - Improvements to existing features
46 - API changes (non-breaking)
47 - Performance improvements
48 - Look for: "improve", "enhance", "update", "refactor" in commits
49
503. **Fixed** (Bug Fixes):
51 - Bug fixes and issue resolutions
52 - Look for: `fix:`, "bug", "issue", "correct" in commit messages
53 - Security fixes
54
554. **Deprecated**:
56 - Features marked for removal
57 - Look for: "deprecate", "deprecated" in commits or code comments
58
595. **Removed**:
60 - Features or APIs removed
61 - Look for: "remove", "delete", "drop" in commits
62
636. **Security**:
64 - Security vulnerabilities fixed
65 - Look for: "security", "CVE", "vulnerability" in commits
66
67### Step 3: Analyze Commits and Changes
68
691. **Parse commit messages**:
70 - Use `bash_command`: `git log --pretty=format:"%h - %s (%an, %ar)" -20`
71 - Group by type using conventional commits or patterns
72 - Extract meaningful descriptions
73
742. **Review code changes**:
75 - Use `bash_command`: `git diff --stat HEAD~10..HEAD` to see file changes
76 - Use `bash_command`: `git log --name-status --pretty=format:"" HEAD~10..HEAD` for changed files
77 - Look at PR titles or commit descriptions for context
78
793. **Identify breaking changes**:
80 - Look for: `BREAKING CHANGE:`, "breaking", "major", "incompatible" in commits
81 - Check API changes in code
82 - Review migration guides if they exist
83
84### Step 4: Generate Release Notes Structure
85
86Create a well-formatted release notes document with this structure:
87
88```markdown
89# Release Notes - Version X.Y.Z
90
91**Release Date**: [Current date]
92**Full Changelog**: [Link to full changelog if applicable]
93
94## Summary
95
96Brief 2-3 sentence summary of this release highlighting the most important changes.
97
98## 🎉 Added
99
100- [Feature description with context]
101- [Another feature]
102
103## ✨ Changed
104
105- [Improvement description]
106- [API change with migration notes if applicable]
107
108## 🐛 Fixed
109
110- [Bug fix description with issue reference if available]
111- [Another fix]
112
113## 🔒 Security
114
115- [Security fix description]
116
117## ⚠️ Breaking Changes
118
119- [Breaking change description]
120- [Migration guide reference or steps]
121
122## 📚 Documentation
123
124- [Documentation improvements]
125
126## ⚙️ Internal
127
128- [Internal improvements, refactoring, build changes]
129
130## Contributors
131
132Thank you to all contributors: [List of contributors if available from git log]
133
134## Upgrade Instructions
135
136[If applicable, provide upgrade/installation instructions]
137```
138
139### Step 5: Write Professional Release Notes
140
1411. **Use clear, user-facing language**:
142 - Avoid technical jargon where possible
143 - Explain what changed and why it matters
144 - Include examples or use cases for major features
145
1462. **Be specific and actionable**:
147 - "Fixed memory leak in data processing" not just "Fixed bugs"
148 - "Added support for Python 3.12" not just "Updated Python support"
149 - Include issue numbers or PR references if available
150
1513. **Group related changes**:
152 - Combine similar fixes or features
153 - Use sub-bullets for detailed changes
154 - Keep each category organized
155
1564. **Include migration notes**:
157 - For breaking changes, provide clear upgrade paths
158 - Reference migration guides if they exist
159 - Show before/after examples for API changes
160
1615. **Add context**:
162 - Link to relevant documentation
163 - Reference related issues or PRs
164 - Include contributor credits if appropriate
165
166### Step 6: Format and Style
167
1681. **Use markdown formatting**:
169 - Headers for version and date
170 - Bullet points for lists
171 - Code blocks for examples
172 - Links for references
173
1742. **Consistent style**:
175 - Start each item with a verb (Added, Fixed, Changed)
176 - Use present tense or past tense consistently
177 - Keep line lengths reasonable (80-100 chars)
178
1793. **Emoji usage** (optional but helpful):
180 - 🎉 for new features
181 - ✨ for improvements
182 - 🐛 for bug fixes
183 - 🔒 for security
184 - ⚠️ for breaking changes
185 - 📚 for documentation
186
1874. **Version format**:
188 - Follow semantic versioning: `MAJOR.MINOR.PATCH`
189 - Use consistent format: `v1.2.3` or `1.2.3`
190 - Match project's existing versioning style
191
192### Step 7: Handle Different Scenarios
193
194#### First Release:
195- Focus on initial features and setup
196- Explain what the project does
197- Include installation/setup instructions
198
199#### Patch Release:
200- Focus on bug fixes
201- May not need full structure
202- Quick summary format
203
204#### Major Release:
205- Include migration guide
206- Highlight breaking changes prominently
207- Provide upgrade checklist
208
209#### No Git History:
210- Use file changes detected via `list_directory` and `read_file`
211- Analyze code modifications
212- Create notes from current state vs expected state
213
214### Step 8: Verify and Complete
215
2161. **Check completeness**:
217 - All significant changes included
218 - No placeholder text remaining
219 - Version number is correct
220 - Date is current
221
2222. **Validate format**:
223 - Markdown renders correctly
224 - Links work (if any)
225 - Consistent style throughout
226
2273. **Save appropriately**:
228 - Save as `RELEASE_NOTES.md` or `CHANGELOG.md`
229 - Or append to existing `CHANGELOG.md`
230 - Follow project conventions
231
232## Examples
233
234### Example 1: Semantic Versioning Project
235User: "Write release notes for version 2.1.0"
236- Check `package.json` or `pyproject.toml` for version
237- Analyze git commits since last tag
238- Categorize into Added/Changed/Fixed
239- Generate formatted release notes
240
241### Example 2: Update Existing Changelog
242User: "Update the changelog"
243- Read existing `CHANGELOG.md`
244- Get recent commits since last entry
245- Add new entry at top
246- Maintain existing format style
247
248### Example 3: First Release
249User: "Create release notes for the initial release"
250- Analyze current project state
251- List initial features from codebase
252- Create comprehensive first-release notes
253- Include installation instructions
254
255## Best Practices
256
2571. **Be accurate**: Only include changes that actually happened
2582. **Be user-focused**: Write for end users, not just developers
2593. **Be complete**: Include all significant changes
2604. **Be concise**: Don't list every single commit, group intelligently
2615. **Be helpful**: Provide context and upgrade instructions
2626. **Follow conventions**: Match existing project style and format
263
264## Tools to Use
265
266- `bash_command`: Run git commands to analyze history
267- `read_file`: Read version files and existing changelogs
268- `list_directory`: Explore project structure
269- `grep_search`: Find version numbers or change indicators in files
270
271## Notes
272
273- If git history is not available, focus on analyzing current code state
274- Respect existing changelog format if one exists
275- When unsure about a change, err on the side of inclusion
276- Major releases should always include migration guides for breaking changes
277- Security fixes should be clearly highlighted
278