changelog-update.yaml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. version: 1.0.0
  2. title: Update Changelog from staged
  3. description: a custom recipe instance from this chat session
  4. instructions: Analyze staged Git changes and automatically update project changelogs following Keep a Changelog format. Read staged files using git diff, understand the nature of code changes (API refactoring, new features, bug fixes, etc.), and add appropriately categorized entries to the Unreleased section. Use the git author's username for attribution and follow established changelog patterns including proper formatting with contributor links. Requires git command line tools and file editing capabilities.
  5. prompt: |
  6. You are tasked with updating the CHANGELOG.md file based on staged Git changes. Follow these instructions:
  7. ## Analysis Process:
  8. 1. **Read staged changes**: Use `git diff --staged` to analyze what files and code changes are currently staged for commit
  9. 2. **Get git author**: Use `git config --get user.name` to get the author name for attribution
  10. 3. **Analyze change types**: Categorize changes into:
  11. - **Added**: New features, new functions, new files, new functionality
  12. - **Changed**: Modifications to existing functionality, refactoring, API changes, dependency updates
  13. - **Fixed**: Bug fixes, error handling improvements, corrections
  14. - **Removed**: Deleted files, deprecated functions, removed dependencies
  15. ## CHANGELOG.md Update Requirements:
  16. 1. **Preserve existing format**: Keep the exact formatting style of the existing CHANGELOG.md
  17. 2. **Update Unreleased section**: Add new entries to the "## [Unreleased]" section only
  18. 3. **Use proper categories**: Add entries under the appropriate subsections (Added, Changed, Fixed, Removed)
  19. 4. **Follow format pattern**: Each entry should follow this exact format:
  20. ```
  21. - component: Description of change ([author]).
  22. ```
  23. 5. **Author attribution**: Use the git author name in square brackets at the end of each entry
  24. 6. **Component identification**: Identify the relevant component (e.g., "cdk", "cashu", "cdk-cli", etc.) from file paths
  25. 7. **Maintain formatting**:
  26. - Use proper bullet points with hyphens
  27. - Maintain consistent spacing
  28. - Keep entries concise but descriptive
  29. - End each entry with period before author attribution
  30. ## Example Entry Format:
  31. ```markdown
  32. ### Added
  33. - cdk: New keyset refresh functionality with improved error handling ([thesimplekid]).
  34. ### Changed
  35. - cdk: Refactored wallet keyset management for better performance ([thesimplekid]).
  36. ### Fixed
  37. - cdk-cli: Fixed token parsing error for malformed inputs ([thesimplekid]).
  38. ```
  39. ## Important Guidelines:
  40. - **DO NOT** modify any existing changelog entries
  41. - **DO NOT** change the structure or format of the changelog
  42. - **ONLY** add new entries to the Unreleased section
  43. - **DO NOT** add duplicate entries
  44. - **BE SPECIFIC** about what changed, not just which files
  45. - **FOCUS** on user-facing changes and important internal improvements
  46. - **IGNORE** trivial changes like whitespace, comments, or formatting unless they're significant
  47. ## Steps to Execute:
  48. 1. Read current CHANGELOG.md file to understand format
  49. 2. Get git author name
  50. 3. Analyze staged changes with `git diff --staged`
  51. 4. Categorize and write appropriate changelog entries
  52. 5. Update the CHANGELOG.md file preserving all existing content
  53. extensions:
  54. - type: builtin
  55. name: developer
  56. display_name: Developer
  57. timeout: 300
  58. bundled: true
  59. activities:
  60. - Update changelog from staged changes
  61. - Analyze API refactoring commits
  62. - Add new feature entries
  63. - Categorize bug fix changes
  64. - Format contributor attributions
  65. author:
  66. contact: thesimplekid