You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,27 @@ tasks.
15
15
16
16
- Use `scripts/develop` to start Home Assistant locally; it creates `config/`, sets `PYTHONPATH` so `custom_components/maint` is found, and boots HA for manual testing.
17
17
18
-
## Development Workflow
18
+
## Development
19
19
20
-
- Code is linted using ruff; run `scripts/lint` (it formats then checks/fixes) after Python changes.
21
-
- There is no JS build/lint pipeline; keep `custom_components/maint/frontend/maint-panel.js` as a plain ES module.
22
-
- When Python or JavaScript files are changed always lint them and fix problems.
23
-
- Testing: run `python -m pytest`; add/update tests in `/tests`, especially for new async HA flows.
24
-
- Strings/translations: keep `custom_components/maint/strings.json` and `custom_components/maint/translations/en.json` in sync when copy changes.
25
-
- Storage changes (`MaintTaskStore`): maintain `STORAGE_VERSION`, do not add migration logic - just change the existing code, and cover with tests.
26
20
- Review and update `README.md` for user-facing changes and refresh `custom_components/maint/quality_scale.yaml` when requirements are met.
27
-
-Include adequate debug/info logs and honor configurable log levels (`info`/`debug`).
21
+
-Lint and test changes - fix any issues.
28
22
- Consult https://developers.home-assistant.io/ for information on developing Home Assistant integrations.
29
-
-Provide type hints for all function parameters and returns.
23
+
-Prioritize readable, maintainable code. Keep changes aligned with module layout.
30
24
- Avoid packages/modules named common, utils, const etc. Instead, prefer placing constants an interfaces near the consumer where possible.
31
-
- Prioritize readable, maintainable code.
25
+
26
+
### Backend
27
+
28
+
- Provide type hints for all function parameters and returns.
29
+
- Code is linted using ruff; run `scripts/lint` (it formats then checks/fixes) after Python changes.
30
+
- Strings/translations: keep `custom_components/maint/strings.json` and `custom_components/maint/translations/en.json` in sync when copy changes.
31
+
- Include adequete debug logging.
32
+
- Testing: run `python -m pytest`; add/update tests in `/tests`, especially for new async HA flows.
33
+
34
+
### Frontend
35
+
36
+
- The frontend is written in TypeScript - always modify the TypeScript and compile down to JavaScript.
37
+
- Compile using the `./script/frontend`.
38
+
39
+
## Temporary Constraints
40
+
41
+
- Do not attempt to maintain backward compatibility. We have not released yet so backwards compatibility is unnecessary.
0 commit comments