# scheduled-router.example.yaml — annotated example for pi-scheduled-router
#
# Copy to one of:
#   ~/.pi/scheduled-router.yaml          (agent-wide default)
#   <project>/.pi/scheduled-router.yaml  (project override; wins when present)
#
# Full field reference: docs/configuration.md

version: 1

# IANA timezone used when matching slots (optional).
# Omit to use the system local clock.
timezone: "Asia/Tokyo"

# Required fallback when no slot matches the current time.
default:
  provider: deepseek
  model: deepseek-v4-pro

# Slots are evaluated top-to-bottom; the first matching slot wins.
# Times use HH:MM with from inclusive and to exclusive.
slots:
  # Normal same-day range: active from 10:00 up to (but not including) 15:00.
  - from: "10:00"
    to: "15:00"
    provider: cursor
    model: composer-2.5

  # Another normal range covering the afternoon and early evening.
  - from: "15:00"
    to: "22:00"
    provider: openai-codex
    model: gpt-5.4

  # Day-spanning range: 22:00 through midnight into 02:00 the next calendar day.
  - from: "22:00"
    to: "02:00"
    provider: anthropic
    model: claude-opus-4

# ── Validation examples ──
# Keep these snippets commented out; they show what validation accepts or rejects.
#
# Valid boundary value: "24:00" may be used only as an end-of-day boundary.
#   to: "24:00"
#
# Invalid time values:
#   from: "24:30"  # hour 24 must use minute 00
#   to: "10:60"    # minutes must be 00-59
#
# Invalid zero-duration slot:
#   from: "10:00"
#   to: "10:00"
#
# Invalid top-level key:
#   route_name: "work-hours"  # only version, timezone, default, and slots are allowed
#
# Warning-only overlap: a later 13:00-15:00 slot after an earlier 09:00-17:00
# slot validates, but is fully masked because slots are first-match-wins.
