Conventions used across this repository for files, directories, and identifiers.
| Thing | Case | Example |
|---|---|---|
| Filenames (slugs, scripts, templates, YAML) | lowercase_snake_case |
vacuum_job_manager.yaml |
README prefix |
UPPERCASE | README.md, README_witb_plus_v4.md |
CHANGELOG prefix |
UPPERCASE | CHANGELOG_witb_plus.md |
| Version directories | lowercase v<N> |
v1/, v4/ |
| Workflow files | lowercase_snake_case |
docs-blueprint-check.yml (hyphens ok for workflows only) |
A slug is a safe identifier derived from a human-readable name. All slugs must be valid Home Assistant entity ID segments.
Rules (applied in order):
- Lowercase the entire string.
- Replace
&withand. - Replace spaces and hyphens with
_. - Strip any character that is not
[a-z0-9_](ASCII only — no accented or Unicode characters). - Collapse consecutive underscores to one.
- Strip leading and trailing underscores.
Examples:
| Input | Slug |
|---|---|
Master Bathroom Toilet |
master_bathroom_toilet |
Office |
office |
Half Bathroom |
half_bathroom |
Lights & Fan |
lights_and_fan |
- Use
_to separate words. No hyphens in file or directory names (exception: GitHub Actions workflow files, where hyphens are conventional). - No spaces anywhere in names.
- No dots except the file extension.
- ASCII only — no accented or Unicode characters.
- Version directories use
v<major>only (e.g.,v1,v2,v4). Minor versions are tracked in the blueprint metadata and changelog, not in the directory name. - Create a new version directory only for breaking changes or major rewrites. Minor and patch changes stay in the existing version directory.
- Docs page filenames do not include version numbers — the compatibility matrix in
docs/blueprints/README.mdtracks the current version for each doc page.
When two files form a logical pair (e.g., ON and OFF hooks), use a directional qualifier:
_on_/_off_in individual filenames.- Drop the qualifier in shared files that cover both (changelog, combined docs page, package template).
blueprints/automation/<blueprint_name>/<version>/<blueprint_slug>.yaml
Examples:
blueprints/automation/witb_plus/v4/witb_plus.yamlblueprints/automation/vacuum_job_manager/v1/vacuum_job_manager.yamlblueprints/automation/bathroom_fan_from_humidity/v1/bathroom_fan_from_humidity_delta.yaml
blueprints/script/<blueprint_family>/<version>/<blueprint_slug>.yaml
Examples:
blueprints/script/witb_switch_light_profiles/v1/witb_lights_on_hook_vzw31sn.yamlblueprints/script/witb_switch_light_profiles/v1/witb_lights_off_hook_vzw31sn.yaml
CHANGELOG_<blueprint_slug>.md
CHANGELOG_prefix is uppercase.<blueprint_slug>matches the blueprint's main YAML filename (without.yaml).- One changelog per blueprint. If a version folder covers multiple related scripts (e.g., ON + OFF hooks), use a shared slug that describes the family.
- Placed in the same versioned directory as the blueprint YAML.
Examples:
CHANGELOG_witb_plus.mdCHANGELOG_witb_plus_actions_lights_fan.mdCHANGELOG_bathroom_fan_from_humidity_delta.mdCHANGELOG_vacuum_job_manager.mdCHANGELOG_witb_plus_bed_force_occupied.mdCHANGELOG_witb_lights_hooks_vzw31sn.md
Two tiers:
Used at folder levels that GitHub renders automatically when browsing:
- Repo root
blueprints/,blueprints/automation/,blueprints/script/docs/,docs/blueprints/,examples/,references/,tools/,.github/workflows/- Blueprint family folders:
blueprints/automation/<blueprint_name>/,blueprints/script/<family>/ - Example folders:
examples/<blueprint_short_name>/ - Package output folders:
*/packages/
Used inside versioned directories (v1/, v2/, v4/). Named to be unambiguous when multiple version READMEs are open in an editor.
README_<blueprint_slug>_v<N>.md
Examples:
blueprints/automation/witb_plus/v4/README_witb_plus_v4.mdblueprints/automation/witb_plus_actions_lights_fan/v2/README_witb_plus_actions_lights_fan_v2.mdblueprints/automation/bathroom_fan_from_humidity/v1/README_bathroom_fan_from_humidity_delta_v1.mdblueprints/automation/vacuum_job_manager/v1/README_vacuum_job_manager_v1.mdblueprints/automation/witb_transit_room/v1/README_witb_transit_room_v1.mdblueprints/automation/witb_plus_bed_sensor/v1/README_witb_plus_bed_force_occupied_v1.mdblueprints/script/witb_switch_light_profiles/v1/README_witb_lights_hooks_vzw31sn_v1.md
Blueprints may include supplementary documentation files for rules and use cases. These follow the same <prefix>_<blueprint_slug>.md pattern so they are unambiguous when multiple blueprints share a directory.
rules_<blueprint_slug>.md
Documents the behavioral rules governing the blueprint — trigger conditions, gate logic, ordering rules, and invariants.
Examples:
rules_car_tag.mdrules_vacuum_job_manager.md
use_cases_<blueprint_slug>.md
Documents the supported use cases with expected pass/fail outcomes for each branch and race condition.
Examples:
use_cases_car_tag.mduse_cases_vacuum_job_manager.md
Both files are placed in the same versioned directory as the blueprint YAML.
<descriptive_slug>_package_template.yaml
- Suffix is always
_package_template.yaml(not.template.yamlor_template.yaml). - Placed in the same versioned directory as the blueprint.
Examples:
witb_plus_package_template.yamlroom_witb_actions_package_template.yamlroom_humidity_baseline_delta_package_template.yamltransit_helpers_package_template.yaml
<room_slug>.yaml
- Output of the generator script.
- Filename is the room slug only (e.g.,
office.yaml,hallway.yaml). - Placed in the
packages/subdirectory of the versioned blueprint folder.
docs/blueprints/<blueprint_slug>.md
- No version suffix in the filename. The current version is tracked in the compatibility matrix in
docs/blueprints/README.md. - One doc page per blueprint (or logical grouping like ON+OFF hooks).
Examples:
docs/blueprints/witb_plus.mddocs/blueprints/witb_plus_actions_lights_fan.mddocs/blueprints/bathroom_fan_from_humidity_delta.mddocs/blueprints/vacuum_job_manager.mddocs/blueprints/witb_lights_hooks.md
examples/<blueprint_short_name>/<room_slug>_automation.yaml
If the automation type needs disambiguation, insert a qualifier before _automation:
examples/<blueprint_short_name>/<room_slug>_<qualifier>_automation.yaml
Examples:
examples/witb_plus/office_automation.yamlexamples/witb_plus_actions_lights_fan/office_actions_automation.yamlexamples/vacuum_job_manager/roomba_vacjob_automation.yamlexamples/witb_transit_room/hallway_automation.yaml
examples/<blueprint_short_name>/packages/<room_slug>.yaml
If multiple blueprint types share a packages folder, append a qualifier:
examples/<blueprint_short_name>/packages/<room_slug>_<qualifier>.yaml
Examples:
examples/witb_plus/packages/office.yamlexamples/witb_plus_actions_lights_fan/packages/office_witb_actions.yamlexamples/vacuum_job_manager/packages/roomba_vacjob.yaml
examples/<blueprint_short_name>/<room_slug>_scripts.yaml
blueprints/generate_witb_packages_templated.py
- A single shared generator handles all package template types by accepting
--templateas an argument. - No per-blueprint copies of the generator should be created.
Scripts and tools that live outside a versioned blueprint directory may have companion docs colocated with the script file, following the same prefix conventions:
README_<script_slug>.md
CHANGELOG_<script_slug>.md
README_andCHANGELOG_prefixes are uppercase, matching the blueprint conventions.<script_slug>matches the script filename without the extension.- These files are placed in the same directory as the script (e.g.,
blueprints/for repo-level generators).
Examples:
blueprints/README_generate_witb_packages_templated.mdblueprints/CHANGELOG_generate_witb_packages_templated.md
blueprints/
automation/
<blueprint_name>/ # family folder
README.md # GitHub-rendered landing page
<version>/ # e.g., v1, v2, v4
README_<blueprint_slug>_v<N>.md # descriptive version doc
<blueprint_slug>.yaml
CHANGELOG_<blueprint_slug>.md
rules_<blueprint_slug>.md # behavioral rules
use_cases_<blueprint_slug>.md # supported use cases
<descriptive>_package_template.yaml
packages/
README.md
<room_slug>.yaml # generated output
script/
<blueprint_family>/
README.md
<version>/
README_<slug>_v<N>.md
<blueprint_slug>.yaml
CHANGELOG_<slug>.md
rules_<slug>.md # behavioral rules (if applicable)
use_cases_<slug>.md # supported use cases (if applicable)
<descriptive>_package_template.yaml (if applicable)
generate_witb_packages_templated.py # single shared generator
docs/
blueprints/
README.md # compatibility matrix + links
<blueprint_slug>.md # per-blueprint implementation docs
examples/
<blueprint_short_name>/
README.md
<room_slug>_automation.yaml
packages/
README.md
<room_slug>.yaml
tools/
<script_name>.py
.github/
workflows/
<workflow-name>.yml # hyphens ok here