These instructions apply to the whole repository.
- This repository hosts a Home Assistant custom integration (HACS-compatible), not a standalone app.
- Always prefer the current Home Assistant architecture:
- Config Entries + UI config flows
- Async-first Python code
- No YAML-only setup for core behavior
- No deprecated HA APIs
- The integration must expose UI through Home Assistant (sidebar/menu panel), not an external server process.
- Python: type hints, dataclasses where useful, constants in
const.py, small focused modules. - Frontend: modern Web Components for panel UI, no legacy Polymer patterns.
- Keep provider integrations isolated and easy to extend.
- Never hardcode secrets; API keys belong in config entry options.
- For every repository change, update integration version using semantic versioning in
custom_components/lightcompanion/manifest.json. - At minimum, bump the patch version for fixes/docs/chore-level repo changes that affect delivered integration package.
- Bump minor for new functionality; bump major only on explicit owner request.
- Before finishing, verify the version bump is included in the commit.
- Treat version updates as a mandatory checklist item (do not skip it):
- Bump
custom_components/lightcompanion/manifest.json. - Confirm there is no stale older version string left in repo docs/examples.
- Ensure the PR/commit clearly mentions the version bump so HACS/Home Assistant detects a new package revision.
- Bump
- Only one LLM provider may be active at a time.
- Prompting must include available
lightentities and capabilities. - LLM output must be strict machine-readable JSON and validated before execution.
- On parse/validation errors, do not execute light service calls.
- Keep README short and practical with installation and usage.
- Document supported providers and required API keys.
- Mention that the integration controls entities in the
lightdomain. - Write repository and skill documentation in English by default.
- Localizations may provide non-English text, but fallback/source strings must remain English.
- Keep reusable Codex guidance in
skills/. - A repository skill should emphasize modern HA syntax and avoiding deprecated APIs.