How Hunknote Works
- Collect Context: Gathers branch name, staged files, diff, and recent commits
- Apply Filters: Excludes lock files and build artifacts from analysis
- Check Cache: Returns cached message if changes haven't changed
- Call LLM: Sends context to your configured LLM provider
- Render Message: Formats the response according to your style profile
- Cache Result: Stores the message for reuse
Message Structure
Generated messages follow git best practices:
<Title line - imperative mood, max 72 chars>
- <Bullet point describing a change>
- <Bullet point describing another change>
- <Additional details as needed>
Example output:
Add user authentication feature
- Implement login and logout endpoints
- Add session management middleware
- Create user model with password hashing
Caching
Hunknote caches messages to avoid redundant API calls:
- Cache hit: Same staged changes → uses cached message (no API call)
- Cache miss: Different changes → generates new message
- Manual bypass: Use
--regenerateto force new generation - Auto-invalidate: Cache clears after successful commit
Cache files are stored in <repo>/.hunknote/.