mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-03 21:15:22 +01:00
feat(misc): add Goose AI recipes for automated changelog and git message generation
- Add changelog-update.yaml recipe for analyzing staged changes and updating CHANGELOG.md - Add git-commit-message.yaml recipe for creating conventional commit messages - Add justfile commands (goose-changelog-update, goose-git-msg) for running recipes - Update CHANGELOG.md with new recipe functionality entries
This commit is contained in:
83
misc/recipes/git-commit-message.yaml
Normal file
83
misc/recipes/git-commit-message.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
version: 1.0.0
|
||||
title: Create git commit message from staged changes
|
||||
description: Generate meaningful git commit messages by analyzing staged changes
|
||||
prompt: |
|
||||
You are tasked with creating a clear and descriptive git commit message based on staged Git changes. Follow these instructions:
|
||||
|
||||
## Analysis Process:
|
||||
1. **Read staged changes**: Use `git diff --staged` to analyze what files and code changes are currently staged for commit
|
||||
2. **Analyze change scope**: Identify which components/modules are affected (e.g., cdk, cashu, cdk-cli, etc.)
|
||||
3. **Determine change type**: Categorize the primary change as:
|
||||
- **feat**: New features or functionality
|
||||
- **fix**: Bug fixes
|
||||
- **refactor**: Code refactoring without functional changes
|
||||
- **docs**: Documentation changes
|
||||
- **style**: Code style/formatting changes
|
||||
- **test**: Adding or updating tests
|
||||
- **chore**: Maintenance tasks, dependency updates, build changes
|
||||
|
||||
## Commit Message Format:
|
||||
Follow conventional commit format:
|
||||
```
|
||||
type(scope): description
|
||||
|
||||
Optional body with more details if needed
|
||||
```
|
||||
|
||||
### Examples:
|
||||
```
|
||||
feat(cdk): add keyset refresh functionality with improved error handling
|
||||
|
||||
refactor(wallet): improve keyset management for better performance
|
||||
|
||||
fix(cdk-cli): resolve token parsing error for malformed inputs
|
||||
|
||||
docs(README): update installation instructions
|
||||
|
||||
chore(deps): update rust dependencies to latest versions
|
||||
```
|
||||
|
||||
## Commit Message Guidelines:
|
||||
1. **Subject line (first line)**:
|
||||
- Start with conventional commit type and scope
|
||||
- Use imperative mood ("add", "fix", "update", not "added", "fixed", "updated")
|
||||
- Keep under 72 characters
|
||||
- Don't end with a period
|
||||
- Be specific and descriptive
|
||||
|
||||
2. **Body (optional)**:
|
||||
- Add if the change needs more explanation
|
||||
- Wrap at 72 characters
|
||||
- Explain **what** and **why**, not **how**
|
||||
- Separate from subject with blank line
|
||||
|
||||
3. **Scope identification**:
|
||||
- Use component names from file paths (cdk, cashu, cdk-cli, etc.)
|
||||
- Use general scopes like "deps", "ci", "docs" for broad changes
|
||||
- Omit scope if change affects multiple unrelated areas
|
||||
|
||||
## Analysis Priority:
|
||||
1. **Focus on the main change**: If multiple types of changes, pick the most significant one
|
||||
2. **Combine related changes**: Group similar modifications into one cohesive message
|
||||
3. **Ignore trivial changes**: Don't mention minor formatting, whitespace, or comment changes unless that's the primary purpose
|
||||
4. **Be user/developer focused**: Describe impact rather than implementation details
|
||||
|
||||
## Steps to Execute:
|
||||
1. Analyze staged changes with `git diff --staged`
|
||||
2. Identify primary change type and affected components
|
||||
3. Write a clear, descriptive commit message following conventional format
|
||||
4. Output ONLY the commit message (no additional explanation unless asked)
|
||||
extensions:
|
||||
- type: builtin
|
||||
name: developer
|
||||
display_name: Developer
|
||||
timeout: 300
|
||||
bundled: true
|
||||
activities:
|
||||
- Analyze staged git changes
|
||||
- Generate conventional commit messages
|
||||
- Identify change types and scopes
|
||||
- Create clear and descriptive commit subjects
|
||||
- Format commit messages properly
|
||||
author:
|
||||
contact: thesimplekid
|
||||
Reference in New Issue
Block a user