Expert assistant for Dune Weaver kinetic sand table system. Helps with FastAPI backend, hardware integration, pattern management, and polar coordinate systems. Supports CSS/frontend dev, WLED integration, and hardware communication protocols.
Expert assistant for working with the Dune Weaver kinetic sand table system codebase. This skill provides comprehensive guidance for development, debugging, and enhancement of both software and hardware components.
This skill helps you work with:
The sand table uses **polar coordinates (θ, ρ)** NOT Cartesian:
- `connection/` - Serial/WebSocket hardware communication
- `core/` - Patterns, playlists, state, caching
- `led/` - WLED integration
- `mqtt/` - MQTT capabilities
- `update/` - Software update system
When working with this codebase, use these commands:
```bash
npm run dev # Watch mode for Tailwind CSS development
npm run watch-css # Alias for watch mode
npm run build-css # Build and minify for production
```
```bash
python main.py # Start FastAPI server on port 8080 (0.0.0.0:8080)
```
```bash
pip install -r requirements.txt # Install Python dependencies
npm install # Install Node dependencies
```
- Use functional programming patterns
- Implement early returns for error handling
- Use Pydantic models for validation
- Prefer async for I/O operations
- Use proper dependency injection
- Pattern files are `.thr` format (space-separated `theta rho` per line)
- Comments in patterns start with `#`
- Cached images stored in `patterns/cached_images/` as WebP
- Custom uploads go in `patterns/custom_patterns/`
- Support both Serial and WebSocket connection types
- Use thread-safe locks for connection management
- Account for mechanical coupling in motion control
- Remember crash-homing behavior (no limit switches)
- Update global state via `modules/core/state.py`
- Ensure persistence to `state.json`
- Broadcast changes via WebSocket `/ws/status`
- Check connection type (Serial vs WebSocket)
- Verify thread-safe access with locks
- Look for mechanical coupling compensation in motion code
- Check homing sequence completion
- Verify pattern file format (theta-rho pairs, valid ranges)
- Check playlist system state
- Review background task execution
- Validate coordinate transformations
- Rebuild CSS with `npm run build-css`
- Check WebSocket connection at `/ws/status`
- Verify cached pattern images exist
- Review template rendering in `templates/`
**Example 1: Adding a new pattern execution feature**
```
Read modules/core/state.py to understand current state management
Review main.py for existing pattern execution endpoints
Add new FastAPI endpoint with Pydantic validation
Update state management to track new feature
Broadcast state changes via WebSocket
Update frontend to display new feature
```
**Example 2: Debugging pattern preview generation**
```
Check patterns/cached_images/ for WebP files
Review modules/core/caching.py for image generation logic
Verify pattern file format is correct (theta rho pairs)
Test with a simple pattern first
Check file permissions on cached_images directory
```
**Example 3: Modifying hardware communication**
```
Review modules/connection/ for connection types
Ensure thread-safe access with locks
Test with both Serial and WebSocket connections
Account for mechanical coupling in motion commands
Verify crash-homing sequence still works
```
---
This skill provides expert guidance for the Dune Weaver project. Always consider the polar coordinate system, hardware constraints, and async architecture when making changes.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/dune-weaver-development-assistant-foknsv/raw