AI SummaryMeta-rules for managing instruction and rule files across GitHub Copilot and Cursor, establishing a dual-system architecture with shared source files and symlinks. Developers managing AI instruction systems across multiple platforms benefit from standardized file organization and maintenance guidelines.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "haeo — Cursor Rules" prompt rules to my project. Repository: https://github.com/hass-energy/haeo Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Python coding standards for HAEO
Language requirements
• Python 3.13+ required • Use modern features: • Pattern matching (match/case) • Type hints with modern union syntax: str | None not Optional[str] • f-strings (preferred over % or .format()) • Dataclasses for data containers • Walrus operator (:=) where it improves readability
Type hints
• Add type hints to ALL functions, methods, and variables • Use modern union syntax: str | None not Optional[str] • Use type aliases for complex types: `python type MyConfigEntry = ConfigEntry[MyClient] `
Typing philosophy
Type objects at boundaries as early as possible. Use TypedDict and TypeGuard to narrow types early and use throughout. Prefer the type system over runtime checks - tests should never verify things the type checker can identify. See typing philosophy for detailed patterns.
Async programming
• All external I/O must be async • Avoid await in loops - use asyncio.gather() instead: `python # ❌ Bad for item in items: await process(item) # ✅ Good await asyncio.gather(*[process(item) for item in items]) ` • Never block the event loop: • Use asyncio.sleep() not time.sleep() • Use executor for blocking I/O: await hass.async_add_executor_job(fn, args) • Use @callback decorator for event loop safe functions
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts