@zackees/fastled-wasm
ACursor Rules for FastLED WASM Project
Install
agr install @zackees/fastled-wasm --target cursorWrites 1 file into .cursor/rules/, pinned to git-ae794180.
- .cursorrules
Document
Cursor Rules for FastLED WASM Project
CRITICAL: Python Command Usage
ALWAYS use uv to run Python code, NOT python or python3!
Command Guidelines:
- ✅ Use:
uv run <script.py> - ✅ Use:
uv run -m <module> - ✅ Use:
uv run python <script.py>(if explicitly needed) - ❌ NEVER use:
python <script.py> - ❌ NEVER use:
python3 <script.py>
Examples:
- Instead of
python src/fastled/cli.py, useuv run src/fastled/cli.py - Instead of
python -m pytest, useuv run -m pytest - Instead of
python3 build_exe.py, useuv run build_exe.py
Rationale:
- This project uses
uvfor Python package and environment management - Using
pythonorpython3directly may use the wrong Python version or miss dependencies uvensures consistent execution with the project's specified Python version and dependencies
Testing:
- Follow the user rule: run unit tests with
bash test - For manual testing, use
uv runprefix for any Python commands
Development Workflow:
- Use
uvfor all Python execution - Ensure virtual environment is managed by
uv - Install dependencies with
uv add <package> - Run scripts with
uv run <script>
Emoji/Emoticon Usage
ALWAYS use the EMO() function for emojis, NEVER hardcode emojis directly!
Guidelines:
- ✅ Use:
from fastled.emoji_util import EMOthenEMO('⚠️', 'WARNING:') - ✅ Use:
from fastled.emoji_util import safe_printfor Unicode-safe printing - ❌ NEVER use: hardcoded emojis like
print("⚠️ Warning") - ❌ NEVER use: raw Unicode without fallback handling
Common Patterns:
- Warning messages:
EMO('⚠️', 'WARNING:') - Success messages:
EMO('✅', 'SUCCESS:') - Error messages:
EMO('❌', 'ERROR:') - Info messages:
EMO('ℹ️', 'INFO:') - Playwright/browser:
EMO('🎭', '*') - Package/install:
EMO('📦', '*')
Rationale:
- Windows cmd.exe has poor Unicode support and will crash on raw emojis
- The
EMO()function provides fallback text for systems that don't support emojis - Ensures consistent behavior across all platforms (Windows, macOS, Linux)
- Prevents application crashes due to encoding issues
Examples:
# Good - with EMO function
from fastled.emoji_util import EMO
print(f"{EMO('⚠️', 'WARNING:')} Debug mode detected with Playwright installed")
# Bad - hardcoded emoji
print("⚠️ Debug mode detected with Playwright installed")
Additional Rules:
- When suggesting Python commands, always prefix with
uv run - When creating scripts that execute Python, use
uv runin the script - When documenting Python usage, emphasize
uv runsyntax - Update any existing scripts that use
pythonorpython3to useuv run - When adding user-facing messages with emojis, always use the
EMO()function
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-ae794180cfd22026-08-06