Scripts and automatic claude update
This commit is contained in:
31
.claude/scripts/update-claude-md.sh
Executable file
31
.claude/scripts/update-claude-md.sh
Executable 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
23
CLAUDE.md
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user