task icon Task

Analyze Block Disruption

Preview the impact of blocking a time period without actually creating the block

Requirements
Time window to analyze (e.g., 'Saturday', 'until Thursday 6pm', 'tomorrow 2-6pm').
3

Determine WHICH DAY(S) to check—don't parse exact times yet, just get a date range for the fetch.
Examples: "flight delayed" → today/tomorrow, "until Thursday" → today through Thursday.
Check stateService Profiles for timezone. Convert to YYYY-MM-DD.

5

Analyze calendar to infer times:

  • If user mentioned delay (flight/train delayed): find the travel event, add delay to get new arrival
  • Otherwise: find first REAL meeting (skip focus/OOO/reminders) as arrival time
  • If can't find relevant event: "I don't see [flight/etc] on your calendar—when do you land?"

Classify events: Skip (focus/OOO/reminders) vs action needed (1:1s, team, external).

Present: "Your [flight] lands at [time]. Blocking until then affects: [summary].
Block until [time] and handle notifications?"

If yes → run taskBlock Calendar Time. If no → confirm no action.

                    To run this task you must have the following required information:

> Time window to analyze (e.g., 'Saturday', 'until Thursday 6pm', 'tomorrow 2-6pm').

If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.

---

You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple CONSECUTIVE read steps in a row, read them all at once (in parallel). Otherwise, do not read a file until you reach that step.

Add all steps to your todo list now and begin executing.

## Steps

1. [Read Calendar Blocking Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/calendar.block.guide.md` (Meeting classification categories)

2. [Read Time Expressions Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/world.time.expressions.md` (How to interpret flexible time expressions)

3. Determine WHICH DAY(S) to check—don't parse exact times yet, just get a date range for the fetch.
Examples: "flight delayed" → today/tomorrow, "until Thursday" → today through Thursday.
Check `documents/user/services/*.md` for timezone. Convert to YYYY-MM-DD.


4. [Gather Arguments: Fetch Calendar Events] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `startDate`: Start date in YYYY-MM-DD format
- `endDate`: End date in YYYY-MM-DD format

5. [Run Code: Fetch Calendar Events]: Call `run_script` with:

```json
{
  "file": {
    "path": https://sk.ills.app/code/calendar.google.events/preview,
    "args": [
      "startDate",
      "endDate"
    ]
  },
  "packages": null
}
```

6. **Analyze calendar to infer times:**
- If user mentioned delay (flight/train delayed): find the travel event, add delay to get new arrival
- Otherwise: find first REAL meeting (skip focus/OOO/reminders) as arrival time
- If can't find relevant event: "I don't see [flight/etc] on your calendar—when do you land?"

**Classify events:** Skip (focus/OOO/reminders) vs action needed (1:1s, team, external).

**Present:** "Your [flight] lands at [time]. Blocking until then affects: [summary].
Block until [time] and handle notifications?"

If yes → run `skills/sauna/[skill_id]/references/recipes/calendar.block.handle.md`. If no → confirm no action.