- Popup-based extension that works on GitHub commit pages
- Shows badge with note count when commits have notes
- Displays all available git notes refs in tabbed interface
- Supports cnotes format with special formatting
- Works with any public GitHub repository (no auth required)
- Includes caching to minimize API calls (60 req/hour limit)
- Create examples/pre-push-hook.sh with working pre-push hook
- Add documentation to README about automatic notes pushing
- Hook prevents infinite recursion with environment variable flag
- Test with latest stable Go version
- Run tests with race detector
- Check go mod tidy
- Run go vet and golangci-lint
- Add test status badge to README
- fetch-github-notes.sh: Fetch specific note for a commit
- fetch-all-github-notes.sh: List all commits with notes
- list-commit-notes.sh: Find all notes attached to a commit
- README documenting usage and GitHub API approach
These scripts demonstrate that git notes are fully accessible via
GitHub's API despite not being shown in the web interface.
- Use DefaultNotesConfig() values instead of hard-coding defaults
- Update tests to reference default config instead of hard-coded values
- Implement table-driven test for TestDefaultNotesConfig
- Follow DRY principle by eliminating duplicate default values
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove project-specific notes configuration file, allowing the tool
to use default settings or user-specified configuration.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Increase default MaxPrompts from 100 to 400 for more conversation context
- Format .claude/notes.json for better readability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Only register PostToolUse hook events instead of all event types
- Add comprehensive test coverage for all major components
- Refactor git_notes.go to use GitExecutor interface for testability
- Mock git operations in tests to avoid real git commands
- Add tests for:
- Git notes operations with mocked git executor
- Backup/restore functionality
- Configuration handling and settings management
- Context extraction and sanitization
- Hook installation and uninstallation
- Fix settings initialization to properly handle empty Hooks map
- Fix timestamp comparison in tests using Unix() precision
- Format all code with goimports
- All tests pass including race condition detection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Since cnotes only handles PostToolUse events (and ignores all others),
update the installation to only register for that specific event rather
than all available hook events. This reduces unnecessary hook calls.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Block installation when executable contains 'go-build' in path
- Clean up .claude/settings.json to only include properly installed cnotes
- Remove changelog line from README as requested
- 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.