Skip to content

Commit 031f973

Browse files
committed
Submit initial instruction files
1 parent 578e0d6 commit 031f973

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copilot instructions for `ha-victron-mqtt`
2+
3+
This is a Home Assistant custom integration that wraps the `victron_mqtt` library.
4+
5+
## Workflow — things NOT to do
6+
7+
- **Never commit or push before the user reviews.** Do not run `git commit`, `git push`,
8+
create tags, or open PRs unless the user has explicitly reviewed the change and asked you to.
9+
Make the edits and stop so they can review.
10+
- **Do not skip verification checks** (`--no-verify`, `commit skip checks`, etc.) unless the
11+
user explicitly asks for it.
12+
- **Do not perform hard-to-reverse git actions** (force-push, `reset --hard`, amending pushed
13+
commits, deleting branches/tags) without explicit confirmation.
14+
15+
## Vendored `victron_mqtt` library
16+
17+
- Code under `custom_components/victron_mqtt/_vendor/` is a **vendored copy** of the upstream
18+
`victron_mqtt` repo. **Do not make functional changes here.**
19+
- Fixes and features for that library belong in the **source `victron_mqtt` repository**, then
20+
get re-vendored/synced into this repo (typically via an "Update victron_mqtt to X" commit).
21+
- Only touch integration code **outside** `_vendor/` to adapt to the library.
22+
- (A scoped rule in `.github/instructions/vendored-victron-mqtt.instructions.md` enforces this
23+
when editing files under `_vendor/`.)
24+
25+
## Tests
26+
27+
- **Tests only run on Linux or in the devcontainer**, where the Home Assistant dependencies can
28+
be installed. **When working from Windows, skip running the tests** — the HA dependencies
29+
cannot be installed there. Do not attempt to run the suite on Windows.
30+
- **Do not reintroduce snapshot tests.** Snapshots were intentionally removed because they keep
31+
breaking with Home Assistant core changes. Prefer behavior-based tests.
32+
- On Linux/devcontainer, run the test suite and make sure it passes before declaring work done,
33+
but still do not commit without review.
34+
35+
## Versioning & releases
36+
37+
- The integration version lives in `custom_components/victron_mqtt/manifest.json` and follows a
38+
calendar pattern (`YYYY.M.P`, e.g. `2026.7.3`).
39+
- Version bumps are a **separate, user-initiated step** ("Bump version to ...") — do not bump the
40+
version as part of unrelated changes unless asked.
41+
42+
## Deployment
43+
44+
- Deploying to a live Home Assistant instance is done via the provided VS Code tasks
45+
("Deploy to Home Assistant to container" / "...to test environment", which `scp` the
46+
`custom_components/victron_mqtt/` folder). Do not invent alternative deploy mechanisms.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
applyTo: "custom_components/victron_mqtt/_vendor/**"
3+
---
4+
5+
# Vendored `victron_mqtt` library — do NOT edit here
6+
7+
The code under `custom_components/victron_mqtt/_vendor/` is a **vendored copy** of the
8+
upstream `victron_mqtt` library. It is imported/synced into this repository, not authored here.
9+
10+
## Rules
11+
12+
- Do **NOT** make functional changes, bug fixes, or feature additions to any file under
13+
`custom_components/victron_mqtt/_vendor/`.
14+
- Any change to the vendored library must be made in the **source `victron_mqtt` repository**,
15+
then re-vendored/synced into this repo.
16+
- If a problem appears to originate in the vendored code, do not patch it here. Instead:
17+
1. Point out that the fix belongs in the upstream `victron_mqtt` repo.
18+
2. Describe the change that would be needed upstream.
19+
3. Only touch files **outside** `_vendor/` (the Home Assistant integration code) to work
20+
around or adapt to the vendored library if strictly necessary.
21+
- The only acceptable edits inside `_vendor/` are automated re-sync/vendoring updates that
22+
replace the directory with a newer upstream snapshot — not hand edits.

0 commit comments

Comments
 (0)