Skip to content

Commit af0e3c1

Browse files
committed
docs: add AGENTS.md for AI agent guidance
Add comprehensive AI agent instructions following Home Assistant custom component best practices. Includes project overview, code structure, development workflow, validation commands, and quality standards. Also update Python version to 3.12+ (required by Home Assistant 2025.1.4).
1 parent d7a5f28 commit af0e3c1

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml
22

3-
target-version = "py310"
3+
target-version = "py312"
44

55
lint.select = [
66
"B007", # Loop control variable {name} not used within loop body

AGENTS.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This is a Home Assistant custom component for the Israel Electric Corporation (I
1818

1919
## Tech Stack
2020

21-
- **Python**: 3.10+
21+
- **Python**: 3.12+
2222
- **Home Assistant**: 2025.1.4+
2323
- **iec-api**: 0.5.3 (Python client for IEC API)
2424
- **Linting**: ruff (with Home Assistant rules)
@@ -67,6 +67,21 @@ logger:
6767
- Terminal where `./script/develop` runs
6868
- `config/home-assistant.log`
6969

70+
## Workflow
71+
72+
### Starting New Work
73+
74+
**When starting a new task, always ask the user first:**
75+
- Should I switch to `main` branch and rebase?
76+
- Or should I work from the current branch?
77+
78+
Then checkout a new feature branch before beginning work. Never work directly on `main` or stale branches.
79+
80+
### Branch Naming Convention
81+
- Features: `feature/description`
82+
- Bug fixes: `fix/description`
83+
- Documentation: `docs/description`
84+
7085
## Code Style
7186

7287
**Python:**

0 commit comments

Comments
 (0)