# Synthetic time drill: rule windows and one counted term

Package `demo.handbook.time_terms` carries two rules with adjacent
`effective` windows over one question and one 30-calendar-day term with a
pinned synthetic calendar. Not a formalization of any act.

## Run

Tool `law` 0.1.0, semantics law.core/0.2 (published build):

```sh
$ law test docs/handbook/files/fixtures/time-terms
law test demo.handbook.time_terms: world demo.handbook.time_terms
  ok   [demo.handbook.time_terms#authored] tests/window.lawtest / inside the old window
  ok   [demo.handbook.time_terms#authored] tests/window.lawtest / inside the new window
  ok   [demo.handbook.time_terms#authored] tests/window.lawtest / before every window stays silent
  ok   [demo.handbook.time_terms#authored] tests/window.lawtest / decision moment does not select the law
  ok   [demo.handbook.time_terms#authored] tests/deadline.lawtest / thirty calendar days from filing
  ok   [demo.handbook.time_terms#authored] tests/deadline.lawtest / function form counts one day later (TIME-F1, observed)
  ok   [demo.handbook.time_terms#authored] tests/deadline.lawtest / no policy means no counted date
total: 7 checked, 7 passed, 0 failed, 0 not run; code 0
```

## What each scene shows

- Old window: legal_time 2024-06-01 → TRUE_ONLY, `OldTerm` applied,
  `NewTerm` excluded. The `applied` expectations pin which rule fired, not
  just the answer.
- New window: legal_time 2025-06-01 → TRUE_ONLY with the rules swapped.
- Before every window: legal_time 2023-06-01 → NEITHER, neither rule
  applied. The lower boundary pair is (2023 silence, 2024 answer).
- Decision moment: legal_time 2024-06-01 with a 2026 decision_time →
  TRUE_ONLY via `OldTerm`. The answer moment never selects the law.
- Term: filed 2026-02-01, policy `next_day / include_end / no_roll` →
  2026-03-03, derived by hand (counting starts 2026-02-02; February 2026
  has 28 days). The term refuses to count without a pinned calendar
  (`MISSING_INPUT` observed on the way here); the calendar below is what
  lets it speak.
- Function form (TIME-F1, observed): `add_calendar_period` over the same
  inputs answers 2026-03-04 — one day later than the term. No reading of
  the policy text yields that date, and pinning the calendar changes
  nothing for the function form (probed both ways). Recorded as observed
  behavior with an open finding, not as a derived expectation.
- No policy: the same term question without `deadline_policy` ends in
  `MISSING_POLICY`. The deadline is not guessed.

## The calendar pin

`resources/demo-calendar-2026.json` is a synthetic Mon–Fri calendar,
pinned by hash in the package and in `law.lock` (lockVersion 0.2,
`resources` entry). Neither the pinned tool nor the local 0.1.1 build
writes resource entries — `law engine lock . --write` produces a 0.1 lock
without them — so the entry was added by hand following the schema the
tool enforces at read time. The enforcement is real: flipping one byte of
the resource copy makes the run refuse before evaluation with a
`contentHash ... diverges` message naming both hashes (probed on a
scratch copy, whole suite SKIP, code 2).
