- Rename "WLED Grab" to "LED Grab" across all files (title, logs, locales) - Merge Devices and Targets into a single Targets tab with WLED sub-tab containing Devices and Targets sections (like Sources tab pattern) - Make target card source name label full-width - Render engine template config as two-column key-value grid - Update CLAUDE.md: no server restart needed for frontend-only changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.4 KiB
Claude Instructions for WLED Screen Controller
CRITICAL: Git Commit and Push Policy
🚨 NEVER CREATE COMMITS WITHOUT EXPLICIT USER APPROVAL 🚨
🚨 NEVER PUSH TO REMOTE WITHOUT EXPLICIT USER APPROVAL 🚨
Strict Rules
- DO NOT create commits automatically after making changes
- DO NOT commit without being explicitly instructed by the user
- DO NOT push to remote repository without explicit instruction
- ALWAYS WAIT for the user to review changes and ask you to commit
- ALWAYS ASK if you're unsure whether to commit
Workflow
- Make code changes as requested
- STOP - Inform user that changes are complete
- WAIT - User reviews the changes
- ONLY IF user explicitly says "commit" or "create a commit":
- Stage the files with
git add - Create the commit with a descriptive message
- STOP - Do NOT push
- Stage the files with
- ONLY IF user explicitly says "push" or "commit and push":
- Push to remote repository
What Counts as Explicit Approval
✅ YES - These mean you can commit:
- "commit"
- "create a commit"
- "commit these changes"
- "git commit"
✅ YES - These mean you can push:
- "push"
- "commit and push"
- "push to remote"
- "git push"
❌ NO - These do NOT mean you should commit:
- "that looks good"
- "thanks"
- "perfect"
- User silence after you make changes
- Completing a feature/fix
Example Bad Behavior (DON'T DO THIS)
❌ User: "Fix the MSS engine test issue"
❌ Claude: [fixes the issue]
❌ Claude: [automatically commits without asking] <-- WRONG!
Example Good Behavior (DO THIS)
✅ User: "Fix the MSS engine test issue"
✅ Claude: [fixes the issue]
✅ Claude: "I've fixed the MSS engine test issue by adding auto-initialization..."
✅ [WAITS FOR USER]
✅ User: "Looks good, commit it"
✅ Claude: [now creates the commit]
IMPORTANT: Auto-Restart Server on Code Changes
Whenever server-side Python code is modified (any file under /server/src/ excluding /server/src/wled_controller/static/), automatically restart the server so the changes take effect immediately. Do NOT wait for the user to ask for a restart.
No restart needed for frontend-only changes. Files under /server/src/wled_controller/static/ (HTML, JS, CSS, JSON locale files) are served directly by FastAPI's static file handler — changes take effect on the next browser page refresh without restarting the server.
Restart procedure
- Stop the running Python process:
powershell -Command "Get-Process -Name python -ErrorAction SilentlyContinue | Stop-Process -Force" - Start the server:
powershell -Command "Set-Location 'c:\Users\Alexei\Documents\wled-screen-controller\server'; python -m wled_controller.main"(run in background) - Wait 3 seconds and check startup logs to confirm it's running
Project Structure
This is a monorepo containing:
/server- Python FastAPI backend (seeserver/CLAUDE.mdfor detailed instructions)/client- Future frontend client (if applicable)
Working with Server
For detailed server-specific instructions (restart policy, testing, etc.), see:
server/CLAUDE.md
General Guidelines
- Always test changes before marking as complete
- Follow existing code style and patterns
- Update documentation when changing behavior
- Write clear, descriptive commit messages when explicitly instructed
- Never make commits or pushes without explicit user approval