Skip to content

Commit 78bfbc4

Browse files
committed
fix(hass): stop Good Night/Sleep killing white noise
Manual on was stomped by scene force-off before the HR-gated automation could keep the plug on. Leave ownership to manual + white_noise_with_bedtime_audiobook; Good Morning still turns it off.
1 parent 6eb5e26 commit 78bfbc4

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

config/agents/rules/03-version-control.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ waiver_path: .agents/waivers/AGENT-03.md
1313
- **Diff policy:** prefer `sem diff` over `git diff` (entity-level changes, better for agent review). Use native `git diff` only when sem lacks needed flags/output.
1414
- **Selective staging:** use `git hunks list` / `git hunks add <hunk-id>` — non-interactive, deterministic hunk IDs.
1515
- **Dotfiles exception**: sibling layout (`../dotfiles.branch`) via `.envrc` override
16+
- **Commit scope:** before committing, compare staged paths with the current request. “Commit/push” authorizes only those paths; if they are already landed and only unrelated paths remain, report that state instead of touching them.
1617

1718
## Non-interactive defaults (agents)
1819

config/agents/rules/15-agent-behavior.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ Before changing code:
1818
- For external state changes, a successful command/API response is not verification. Re-read the authoritative state or user-visible artifact that should change before claiming success.
1919
- Do not clean up unrelated code; mention it separately.
2020
- Define success criteria for non-trivial tasks, then verify them.
21+
- A skipped or no-op check (`no files to check`, zero tests collected, missing validator) is not verification. Run a check that exercises the changed artifact, and never report the no-op as passed.
2122

2223
Every changed line should trace directly to the user request.

modules/services/hass/_domains/sleep/default.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ in
335335
"input_boolean.goodnight" = "on";
336336
"select.master_suite_current_mode" = "sleep";
337337
"switch.adaptive_lighting_sleep_mode_living_space" = "on";
338-
"switch.eve_energy_20ebu4101" = "off"; # Whitenoise waits for final Sleep phase
339338
"cover.smartwings_window_covering" = "closed";
340339
"light.essentials_a19_a60" = "off";
341340
"light.essentials_a19_a60_2" = "off";
@@ -356,7 +355,6 @@ in
356355
"input_boolean.goodnight" = "on";
357356
"select.master_suite_current_mode" = "sleep";
358357
"switch.adaptive_lighting_sleep_mode_living_space" = "on";
359-
"switch.eve_energy_20ebu4101" = "off"; # Whitenoise waits for sleep_done + bedroom audiobook
360358
"switch.desk_monitor" = "off";
361359
"switch.desk_pop" = "off";
362360
"cover.smartwings_window_covering" = "closed";

modules/services/hass/_tests/eval-automations.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,12 @@ let
514514
msg = "Good Morning scene doesn't turn off whitenoise";
515515
}
516516
{
517-
test = (goodNightScene.entities."switch.eve_energy_20ebu4101" or null) == "off";
518-
msg = "Good Night scene must leave whitenoise off until audiobook speaker gate";
517+
test = !(goodNightScene.entities ? "switch.eve_energy_20ebu4101");
518+
msg = "Good Night scene must not force whitenoise off (manual/automation owns it)";
519519
}
520520
{
521-
test = (sleepScene.entities."switch.eve_energy_20ebu4101" or null) == "off";
522-
msg = "Sleep scene must leave whitenoise off until audiobook speaker gate";
521+
test = !(sleepScene.entities ? "switch.eve_energy_20ebu4101");
522+
msg = "Sleep scene must not force whitenoise off (manual/automation owns it)";
523523
}
524524
{
525525
test = (sleepScene.entities."switch.desk_monitor" or null) == "off";

skills/catalog/autonomous-agent-loop/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Use this skill when the task should finish without repeated user nudges.
1212
1. Restate the requested end state as an outcome, not a task list.
1313
2. Define concrete verification evidence before editing: commands, diffs, rendered output, smoke checks, logs, or artifact paths.
1414
3. If a durable goal tool exists and no active goal covers the work, create one. Do not invent a token budget.
15-
4. For common Edmund workflows, prefer the prompt templates in `~/.pi/agent/prompts/`: `goalize.md` to start durable work and `goal-continue-audit.md` to recover from early stops. Keep project-specific details in the goal text or repo docs instead of creating many templates.
15+
4. Prefer existing `goalize` and `goal-continue-audit` prompt templates for common start/recovery loops. Keep project-specific details in the goal text or repo docs instead of creating many templates.
1616
5. Inspect repo/session state before changing files; preserve unrelated user changes.
1717

1818
## Work loop
@@ -24,6 +24,7 @@ Repeat until done or blocked:
2424
3. Inspect fresh evidence.
2525
4. Update the plan based on what happened.
2626
5. Continue without waiting for the user unless a decision/access blocker is real.
27+
6. For background jobs, use a blocking or longest bounded wait when available. After an unchanged status, increase the interval; never poll again immediately unless the status changed or a real deadline is near.
2728

2829
Do not stop at:
2930

0 commit comments

Comments
 (0)