Design docs: engine spec and decision record - #1
Conversation
pytest, hassfest and the HACS action skip while the tree does not yet contain tests or a manifest, so the stacked bring-up PRs stay green. No-ops on a complete tree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ENGINE_SPEC.md is the normative contract (numbered rules, cited by code and tests). DECISION.md records why: plant-day budget over rolling 24h, one unified visibility model (the legacy weekday morning/arrival clauses were provably redundant; the weekend latch is dropped deliberately), refuge zones instead of workday-calendar guessing, greedy scheduling with hysteresis, fail-safe toward light-off, truth-based accounting. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Momentary movement signals (bedroom door contact) whose transitions pulse the viewer-activity clock without sustaining it. Instant cut on door-open during sleep, normal relight after clear_hold — while a door left open all day can never block the schedule, unlike a viewer zone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Added rule 1.3b (trigger entities) to the spec: momentary movement signals (the bedroom door contact) whose transitions pulse the viewer-activity clock without sustaining it — instant cut on door-open during sleep, normal clear-hold relight, and a door left open can never block the schedule (its level is never read). |
Owner decision (DECISION.md 8): during confirmed refuge, continuity beats absolute invisibility. Viewer activity cuts only once sustained for exposure_grace (300 s); shorter episodes and trigger pulses neither cut nor impose a hold. Confirmed refuge persists across evidence gaps up to refuge_hold (600 s), so office-sensor decay during a coffee run does not release it. Asleep/away contexts unchanged: instant cut. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Second refinement (owner decision, now DECISION.md §8): refuge continuity over absolute invisibility. Rule 1.3c — during confirmed refuge, viewer activity cuts only once continuously active for |
What
The normative contract for the new integration, before any code:
is_morning_routineandarrival_cutoffclauses were redundant — awake+home already forced off), why the weekend after-wake latch is deliberately dropped, refuge zones instead of workday-calendar guessing, greedy scheduling with hysteresis only, fail-safe direction unknown ⇒ observed ⇒ light off, and truth-based budget accounting.Review focus
The behavioral deltas vs. the live templates are all in DECISION.md §2–§3: no weekend latch, away schedule = anchor+budget instead of the fixed 22:00–14:00 window, workday/vacation inputs dropped. If any of those should be preserved instead, this is the PR to say so.
Part 1 of 3 (docs → core → adapter).
🤖 Generated with Claude Code