원클릭으로
git-conventions
Commit message format, PR conventions, branch rules, and pre-commit test gate for hass-iopool.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Commit message format, PR conventions, branch rules, and pre-commit test gate for hass-iopool.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Writing, updating, and structuring documentation pages for hass-iopool. Covers MDX format, frontmatter, docs.page components, docs.json navigation registration, and when to update docs after code changes.
Architecture, entity patterns, testing, and conventions for the hass-iopool Home Assistant custom integration.
Project-specific test setup for hass-iopool — directory structure, test tiers, devcontainer/docker environment detection, running pytest, and shared fixtures.
| name | git-conventions |
| description | Commit message format, PR conventions, branch rules, and pre-commit test gate for hass-iopool. |
| user-invocable | false |
Use this skill for any commit, PR creation, or pre-commit verification task in the hass-iopool project.
ghCLI is NOT installed and must NEVER be used.
All GitHub interactions (creating issues, posting comments, creating/updating PRs, reading PR diffs, searching issues, etc.) must use MCP GitHub tools exclusively:
| Operation | MCP tool to use |
|---|---|
| Create issue | mcp_github_create_issue |
| Add issue comment | mcp_github_add_issue_comment |
| Update issue comment | mcp_github_update_issue_comment |
| Create PR | mcp_github_create_pull_request |
| Get PR diff | mcp_github_get_pull_request_diff |
| Search issues/PRs | mcp_github_search_issues |
| Get file contents | mcp_github_get_file_contents |
If a MCP GitHub tool is unavailable for a specific operation, stop and report the gap to the Orchestrator. Do not fall back to gh CLI commands.
<type>[optional scope]: <gitmoji> <description>
[optional body — bullet points]
Tests: N passed, 0 failed, 0 errors
Tests: line: always required — run the test gate (§3) before committing| Type | Gitmoji | Use When |
|---|---|---|
feat | ✨ | New feature or entity |
fix | 🐛 | Bug fix |
docs | 📝 | Anything in docs/ or docs.json |
refactor | ♻️ | Code restructure, no feature/fix |
test | ✅ | Adding or updating tests |
chore | 🔧 | Deps, CI, build, maintenance |
Use the module filename without extension:
sensor, binary_sensor, select, coordinator, config_flowfiltration, diagnostics, entity, models, const, api_modelsdeps (dependency bumps), readme, entities (doc pages)feat(sensor): ✨ Add pool mode sensor entity
- Added IopoolPoolModeSensor to sensor.py
- Added translation keys to en.json and fr.json
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
fix(coordinator): 🐛 Retain stale data when API returns empty response
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
test(sensor): ✅ Add test for filtration recommendation sensor
Tests: ✅ 43 passed, ❌ 0 failed, ⚠️ 0 errors
chore(deps): 🔧 Bump minimum Home Assistant version to 2026.3.0
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
The pre-commit gate applies only when custom_components/ has changed in the current commit.
Before any commit, verify the current branch:
git branch --show-current
beta or main → stop immediately. Switch to dev first:
git checkout dev
git pull origin dev
Then re-stage changes and continue.dev or a feature branch → proceed to §3.1.Never commit or push directly to
betaormain. These branches are managed exclusively bysemantic-releaseCI. The VS Code context may reportCurrent branch: beta— ignore this for commit targeting; always check withgit branch --show-current.
Before running, check whether the staged or changed files include custom_components/:
git diff --name-only HEAD | grep -q "^custom_components/" && echo "tests required" || echo "tests not required"
If no file under custom_components/ is modified → skip the gate, use Tests: N/A (no custom_components change) in the commit body.
If any file under custom_components/ is modified → the gate is mandatory. No commit may be created until all tests pass at 100%.
Follow @skills/testing-hass-iopool/SKILL.md §3 for the canonical run commands (environment detection, devcontainer vs docker exec).
Quick summary:
# Detect environment
test -d /workspaces && echo "inside devcontainer" || echo "outside"
# Then run python -m pytest custom_components/iopool/tests/ -v (see testing-hass-iopool §3 for full commands)
Capture the output to extract the summary line.
Parse the last summary line from pytest output:
N passed, 0 failed, 0 errors
After gate passes (or is skipped), embed the test summary as the final line of the commit body:
feat(sensor): ✨ Add battery level sensor entity
- Added IopoolPoolModeSensor to sensor.py
- Added translation keys to en.json and fr.json
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
Format:
Tests: ✅ N passed, ❌ M failed, ⚠️ E errors — when gate ranTests: N/A (no custom_components change) — when gate was skippedIf an issue number is provided in the user request (e.g., "fixes #42", "related to #17", or any explicit #N reference), you must post a comment on that issue before creating the commit.
#N)The comment must include:
Use MCP GitHub tools: mcp_github_add_issue_comment on mguyard/hass-iopool with the issue number and the comment body.
This step is mandatory and must complete successfully before the commit is created. Do not skip it even if the commit message already references the issue with
Fixes #N.
Same format as the commit first line:
<type>[optional scope]: <gitmoji> <description>
## Summary
<One paragraph explaining the purpose and impact of the change.>
## Commits
- [`abc1234`](https://github.com/mguyard/hass-iopool/commit/abc1234) feat(sensor): ✨ Add pool mode sensor — short explanation
- [`def5678`](https://github.com/mguyard/hass-iopool/commit/def5678) docs(entities): 📝 Document pool mode sensor
## Tests
pytest tests/ -v ✅ N passed, ❌ 0 failed, ⚠️ 0 errors
## Related Issues
Closes #<issue_number>
## Testsis mandatory. Run the pre-commit gate (§3) on the source branch before opening the PR. Fix all failures before opening.
| Branch | Role |
|---|---|
dev | Development — all PRs must target this branch |
beta | Beta releases — merged only by semantic-release CI |
main | Stable releases — merged only by semantic-release CI |
beta or main.beta or main — even if the VS Code session context reports Current branch: beta. Always verify with git branch --show-current (see §3.0).git log origin/dev..HEAD --oneline — list commits for the ## Commits sectiongit diff origin/dev --stat — verify scope of changesdev