---
name: undominated-time-window
description: Refuse an off-peak rate that is being published as the all-day rate.
license: MIT
metadata:
  author: Undominated.ai
  version: "1.0.0"
---

# Time-window rate

Use when a headline uses one window's rate as if it applied all day.

1. A window rate applies only inside its named window.
2. The all-day rate is a separate field. Do not copy the off-peak rate into it.
3. A missing all-day rate stays missing. It is not the off-peak rate and not zero.
4. Windows are caller-supplied. Do not invent a clock.

## Run the local check

```sh
python3 scripts/check.py examples/synthetic.json
python3 scripts/check.py /absolute/path/to/your-input.json
```

The bundled example is **synthetic**, not a market measurement. The script reads one local JSON file, prints JSON, and writes nothing. Python 3.10+; no dependencies.

Exit codes: `0` the supplied claim matches the rule; `1` review required; `2` invalid input. A pass is not publication permission.

## Input contract

`currency` is three uppercase letters. `window` is non-empty text. `windowRate` and `allDayRate` are decimal strings or null. `claimUses` is `window` or `all-day`.

## Deliverable and limits

Return which rate the claim used, and whether an off-peak rate filled a missing all-day rate.

The user retains control over external actions. This skill does not install dependencies, spend API credits, modify production settings, or publish anything.
