Scripts and automatic claude update

This commit is contained in:
2026-01-29 18:42:41 +11:00
parent f9e72a68fe
commit d9577be900
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Auto-update CLAUDE.md at end of session
CLAUDE_MD="$(git rev-parse --show-toplevel)/CLAUDE.md"
TIMESTAMP=$(date '+%Y-%m-%d %H:%M')
# Get recent git activity from this session (last hour)
RECENT_COMMITS=$(git log --oneline --since="1 hour ago" 2>/dev/null | head -5)
MODIFIED_FILES=$(git diff --name-only HEAD~1 2>/dev/null | head -10)
# Append session summary
{
echo ""
echo "### Session: $TIMESTAMP"
if [ -n "$RECENT_COMMITS" ]; then
echo "**Commits:**"
echo "\`\`\`"
echo "$RECENT_COMMITS"
echo "\`\`\`"
fi
if [ -n "$MODIFIED_FILES" ]; then
echo "**Modified files:**"
echo "$MODIFIED_FILES" | sed 's/^/- /'
fi
echo ""
} >> "$CLAUDE_MD"
echo "Updated CLAUDE.md with session summary"

23
CLAUDE.md Normal file
View File

@@ -0,0 +1,23 @@
# VictronBLE Project Context
## Project Overview
Arduino/ESP32 library for reading Victron Energy devices via Bluetooth Low Energy (BLE).
## Key Files
- `src/` - Main library source code
- `examples/` - Example sketches
- `experiment/` - Experimental code
- `library.json` / `library.properties` - PlatformIO/Arduino library config
## Build & Test
- This is an Arduino/PlatformIO library
- Test with PlatformIO: `pio run`
## Session Notes
<!-- Add learnings from each session below -->
### Session: 2026-01-29 18:41
**Modified files:**
- TODO