- Add check for os.TempDir() and /tmp/ prefix
- Resolve symlinks to handle macOS temp directory structure
- Guide users to use 'go install' for proper installation
- Replace multiple fmt.Printf/Println calls with single fmt.Printf
- Use Go's multi-line string literal with backticks
- Cleaner and more maintainable code structure
- Add 100ms delay before reading transcript
- Ensures user prompts are captured even if transcript writing is async
- Should fix issue where user prompts weren't appearing in git notes
- Add support for message.content as direct string (not just array format)
- Handles both old and new transcript formats from Claude
- User prompts like 'I would expect cnotes show to include my user prompt' now captured correctly
- Remove misleading descriptions of hook validation features
- Clearly state that cnotes monitors git commits and captures conversation context
- Add helpful commands for using cnotes (show, list, backup/restore)
- Emphasize key features: cross-session context and activity since last commit
- Scan all .jsonl files in the transcript directory, not just current session
- Merge conversation context from all sessions since last commit
- Ensures continuity when working across multiple Claude sessions
- Each commit captures relevant context regardless of which session it came from
- Add ExtractContextSince method to filter conversation by timestamp
- Get previous commit time and only include activity since then
- Change labels to 'User prompts since last commit' and 'Tool interactions since last commit'
- Each commit now only captures its own unique conversation context
- Prevents accumulation of duplicate content across commits in same session
- Update JSONL parser to properly extract user messages
- Show last 3 user prompts in conversation excerpt
- Increase prompt length limit to 300 characters
- Remove debug logging
- Clean up test files
- Add 2-second timeout for stdin input to prevent hanging
- Update README with pronunciation guide and go install instructions
- Fix command references in documentation from ./cnotes to cnotes
- Update settings.json to use /Users/jason/go/bin/cnotes run
- Improve generated by message formatting in notes output
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
BREAKING CHANGE: Complete restructure from hooks to cnotes
Major Changes:
- Removed all hook handler code except git commit detection
- Simplified to focused git notes functionality only
- Renamed binary from 'hooks' to 'cnotes'
- Restructured CLI: cnotes (hook handler), cnotes show, cnotes install, etc.
- Updated module path to github.com/imjasonh/cnotes
- Rewrote README and CLAUDE.md for new focused scope
New Command Structure:
- cnotes # Main hook handler (receives Claude Code calls)
- cnotes show # Pretty-print conversation notes
- cnotes install # Configure Claude Code to use cnotes
- cnotes backup # Backup conversation notes
- cnotes restore # Restore notes from backup
- cnotes list # List commits with notes
This creates a much cleaner, focused tool specifically for git conversation notes.
- Added formatConversationExcerpt function to properly unescape JSON strings
- Replaced escaped newlines (\n) with actual newlines for readability
- Unescaped quotes, backslashes, tabs, and other JSON escape sequences
- Tool interactions and conversation context now display with proper formatting
- Much more readable output with proper line breaks and structure
The conversation context is now properly formatted and easy to read instead of being one long escaped string.
- Added 'hooks notes show [commit]' command that defaults to HEAD
- Formats conversation context in readable Markdown with proper sections
- Shows commit info, session details, tools used, commit context, and conversation excerpt
- Updated documentation to recommend the show command over raw git notes
- Enhanced user experience for viewing conversation context
Usage:
./hooks notes show # Show notes for latest commit
./hooks notes show abc123 # Show notes for specific commit
- Added comprehensive documentation for notes preservation during rebasing/squashing
- Updated CLAUDE.md with backup/restore command examples
- Documented best practices for preserving conversation context during destructive git operations
- Cleaned up test files
All git notes preservation features are now complete and documented.
- Added WarnAboutGitNotesLoss hook that warns before destructive git operations
- Implemented comprehensive backup/restore system for conversation notes
- Added CLI commands: hooks notes backup/restore/list
- Configured git to automatically copy notes during rebase operations
- Created backup.go with full notes backup and restoration functionality
This ensures conversation context is never lost during rebasing, squashing, or other destructive git operations.
- Added git notes integration details to CLAUDE.md architecture overview
- Updated README.md to indicate git notes feature is fully implemented and tested
- Added configuration examples and usage instructions
- Documented the conversation context structure and privacy controls
The git notes feature is now production-ready and automatically working for all commits.
- Fixed git commit detection for compound commands (using contains instead of prefix)
- Fixed ToolResponse JSON parsing to extract stdout properly
- Removed debug logging and test files
- Git notes integration is now fully functional and ready for production use
Add comprehensive documentation for the git notes functionality:
- Example usage and real-world scenarios
- Commands for viewing conversation context attached to commits
- Configuration options via .claude/notes.json
- Privacy controls and sensitive data filtering
- Team collaboration workflows for sharing git notes
- Complete JSON example showing structured conversation data
Users can now easily understand how to view and configure the
automatic conversation context attachment to their git commits.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement PostToolUse hook to detect git commit commands
- Add git notes operations package with structured conversation data
- Add conversation context extraction from transcripts
- Include privacy controls and configuration options
- Support custom git notes references for organization
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add missing hook handlers: Stop, SubagentStop, PreCompact
- Replace all string type casting with proper JSON unmarshaling
- Change ToolUseRequest.Parameters from map[string]interface{} to json.RawMessage
- Update helper methods to use json.Unmarshal directly to typed structs
- Replace speech notifications with simple logging notifications
- Update documentation to reflect all hook events and remove speech references
- Add comprehensive CLAUDE.md with architecture overview and development guidance
All hooks now use type-safe JSON handling without .(string) assertions.
Complete coverage of Claude Code events: PreToolUse, PostToolUse,
UserPromptSubmit, Notification, Stop, SubagentStop, PreCompact.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>