# Early tomorrow

*An early start tomorrow? Your agent worked out the alarm. One tap sets it.*

**Type: [Timer](types/timer.md).** Time until something, counting on its own, with what to do about it. This is one good use of it; the same widget serves an early start, leave by, a deadline, a renewal and more. Switch the subject when something else matters more.

Template id `early-start` · Right now · uses Calendar · for: Any agent, with Calendar and Alarms on in Phone access.

## Goal

The user never has to work out tomorrow's alarm.

## When to offer it

Tomorrow starts earlier than usual and Alarms is on in Phone access.

## What the user gets

- Reads tomorrow's first commitment and how long you need to get there
- Works out the alarm time for you
- Sets a real iPhone alarm when you tap

## What each size shows

- **Small**: metric: First thing = 8:00.
- **Medium**: metric: First thing = 8:00; text (body): "Board prep. I'd wake you at 6:45."; buttons: Set 6:45 (`set`), No alarm (`later`).
- **Large**: metric: First thing = 8:00; text (body): "Board prep. I'd wake you at 6:45."; buttons: Set 6:45 (`set`), No alarm (`later`); list: Tomorrow (2 rows).

## Make it theirs

**Look.** Send `look` instead of `theme` and `accent`; every combination is designed to read well:

- `style`: `glass` (default: see-through, adapts to dark mode), `soft` (a calm pale tint) or `bold` (a vivid gradient with dark buttons).
- `accent`: blue, indigo, purple, pink, red, orange, green, teal, graphite, or a hex.
- `font`: default, rounded, serif or mono.

This template's own accent is **purple**. To restyle a widget you already saved, send only the look:

```json
{"slug": "early-start", "look": {"style": "bold", "accent": "purple", "font": "rounded"}}
```

Preview a look without saving: `droplet_preview_widget` with the slug and `look`. When the user says "make it greener", "calmer" or "bolder", change the look; keep the content.

**Their choices.** Ask once (droplet_ask) or use what you know:

- How long they need in the morning
- Earliest and latest alarm

**Search words:** alarm, morning, wake, early, tomorrow, bedtime, calendar.


## Before you build

- Check `droplet_get_phone_context`: the phone must share calendar. If something is off, ask the user to turn it on in Droplet.ai, Settings, Phone access.
- You need: Any agent, with Calendar and Alarms on in Phone access.
- Ask once: Nothing: the tap is the approval, because an alarm is easy to undo.

## Fill it with real data

Start from the template (`droplet_library` with `id: "early-start"`), keep the design, and replace each sample value:

| Block | Real value |
|---|---|
| 0 · metric | Tomorrow's first commitment. |
| 1 · text | What it is, and the alarm time you worked out. |
| 2 · buttons | Set names the time; the other declines. |
| 3 · list | What's ready for tomorrow. |

Sources:
- Tomorrow's first event (Phone access calendar, or your calendar connector).
- Travel time if it's somewhere else, and how long they usually need in the morning (ask once).

## The widget

Sample values; send it with `droplet_set_widget` on your widget's slug (or a new slug with `new_widget: true` if the user asked for a separate widget). Preview it and fix every warning first.

```json
{
  "slug": "early-start",
  "title": "Early tomorrow",
  "symbol": "alarm.fill",
  "accent": "#BF5AF2",
  "blocks": [
    {"type": "metric", "label": "First thing", "value": "8:00"},
    {"type": "text", "text": "Board prep. I'd wake you at 6:45.", "style": "body"},
    {"type": "buttons", "items": [{"id": "set", "label": "Set 6:45", "symbol": "alarm.fill"}, {"id": "later", "label": "No alarm", "symbol": "xmark"}]},
    {"type": "list", "title": "Tomorrow", "items": [{"title": "Board prep", "detail": "8:00"}, {"title": "Notes are ready", "detail": "in your inbox"}]}
  ],
  "sizes": {"medium": [0, 1, 2], "large": [0, 1, 2, 3]}
}
```

## Keep it fresh

In the evening, only on days with an earlier start than usual. Otherwise this moment doesn't show.

## Handle the taps

Each tap reaches you once on `droplet_get_events` (keep a waker running, SKILL.md Process C). Answer within seconds by updating the widget.

**Set 6:45** (`set`)

```json
{"widget": "early-start", "kind": "button", "target": "set", "value": {"label": "Set 6:45"}}
```

Set the alarm with droplet_phone_action, then show 'Alarm set for 6:45'.

**No alarm** (`later`)

```json
{"widget": "early-start", "kind": "button", "target": "later", "value": {"label": "No alarm"}}
```

Do nothing, and show the next thing that matters.

## Ask first

Nothing: the tap is the approval, because an alarm is easy to undo.

For example:

```json
null
```

## Phone actions

kind alarm, once, at the time shown.

```json
{"kind": "alarm", "params": {"time": "06:45", "label": "Board prep at 8:00"}}
```

Send it with `droplet_phone_action` and tell the user what you set.

## Edge cases

- Alarms is off: ask once if they'd like it on, or offer a reminder.
- They already have an alarm early enough: show nothing.

## Never

Never set an alarm the user didn't tap for.

## Done when

- [ ] Every sample value is replaced with real data (no "Dr. Lee" on a real widget).
- [ ] `droplet_preview_widget` shows no warnings at the sizes the user placed (`placed` in `droplet_whoami`).
- [ ] Every button has a handler and a waker is running.
- [ ] Refresh is set up as above.
- [ ] You told the user in one line what it does on its own and what it asks first.
