feat(calendar): implement visual color-coding, conflict-guard, and prep checklists
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
---
|
||||
name: google-calendar
|
||||
description: Read, search, create, update, and delete Google Calendar events across the Family Calendar and Regensburg & more Calendar. Use when the user asks about upcoming appointments ("Was steht an?", "Termine diese Woche", "Wann ist der nächste Arzttermin?"), wants to add appointments or family events, check for scheduling conflicts, or track city events in Regensburg.
|
||||
description: Read, search, create, update, and delete Google Calendar events across the Family Calendar and Regensburg & more Calendar. Supports visual color-coding (Arzt=Rot, Mila=Gelb, Moritz=Blau, Amelie=Grün, Familie=Orange), conflict & travel-buffer checking, address locations, and packing checklists.
|
||||
---
|
||||
|
||||
# 📅 Google Calendar (Familie & Regensburg)
|
||||
|
||||
Full two-way Google Calendar integration for Moritz and family, managing two distinct calendars via a dedicated GCP Service Account:
|
||||
Full two-way Google Calendar integration for Moritz, Amelie, and family, managing two distinct calendars via a dedicated GCP Service Account:
|
||||
|
||||
1. 👨👩👧 **Familienkalender (`family`)**:
|
||||
- Primary personal & family schedule: doctor visits, daycare/kindergarten, birthdays, visits, work trips, family outings, shared commitments.
|
||||
@@ -16,57 +16,74 @@ Full two-way Google Calendar integration for Moritz and family, managing two dis
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Farbleitsystem (Visual Color Coding)
|
||||
|
||||
OpenClaw assigns Google Calendar colors automatically based on event titles or explicit categories:
|
||||
|
||||
| Farbe | `colorId` | Kategorie / Person | Typische Stichwörter |
|
||||
| :--- | :---: | :--- | :--- |
|
||||
| 🔴 **Rot (Tomate)** | `11` | **Arzt & Gesundheit** | Arzt, Kinderarzt, Zahnarzt, U1..U9, Impfung, Klinik, Physio, Blutabnahme |
|
||||
| 🟡 **Gelb (Banane)** | `5` | **Mila & Kinder** | Mila, Kita, Kindergarten, Krabbelgruppe, Spielplatz, Babyschwimmen, Kinderturnen |
|
||||
| 🔵 **Blau (Heidelbeere)** | `9` | **Moritz** | Moritz, Arbeit, Büro, Job, Dienstreise |
|
||||
| 🟢 **Grün (Salbei)** | `2` | **Amelie** | Amelie, Amy |
|
||||
| 🟠 **Orange (Mandarine)** | `6` | **Familie & Feiern** | Familie, Ausflug, Urlaub, Feier, Party, Geburtstag, Besuch, Oma, Opa, Essen |
|
||||
| ⚪ **Grau (Graphit)** | `8` | **Haushalt & Wartung** | Haushalt, Auto, TÜV, Werkstatt, Müll, Handwerker |
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ MCP Tools
|
||||
|
||||
You have access to 5 dedicated calendar tools:
|
||||
You have access to 6 dedicated calendar tools:
|
||||
|
||||
1. `calendar_list_events(calendar="family"|"regensburg", time_min=None, time_max=None, query=None, max_results=25)`:
|
||||
- Lists appointments within a timeframe.
|
||||
- Lists appointments within a timeframe including start/end, color name, location, and description.
|
||||
- `time_min` / `time_max`: ISO format (e.g. `2026-09-20` or `2026-09-20T08:00:00`). Defaults to start of today until 30 days ahead.
|
||||
- `query`: Text filter to search summaries and descriptions.
|
||||
|
||||
2. `calendar_create_event(calendar="family"|"regensburg", summary, start_time, end_time=None, description=None, location=None, all_day=False)`:
|
||||
- Adds a new appointment.
|
||||
2. `calendar_check_conflicts(calendar="family"|"regensburg", start_time, end_time=None, buffer_minutes=15)`:
|
||||
- Proactively checks if a proposed slot conflicts with existing events or leaves less than `buffer_minutes` travel buffer.
|
||||
- Returns `has_conflict`, `direct_conflicts`, `has_buffer_warning`, and `buffer_warnings`.
|
||||
|
||||
3. `calendar_create_event(calendar="family"|"regensburg", summary, start_time, end_time=None, category=None, color_id=None, description=None, location=None, all_day=False, check_conflicts=True)`:
|
||||
- Adds a new appointment with automatic color coding and overlap detection.
|
||||
- If conflicts or tight buffers are detected, a warning is returned in `conflict_warning`.
|
||||
- For timed events: pass ISO datetime (e.g. `2026-09-20T14:30:00`). If `end_time` is omitted, defaults to 1 hour after start.
|
||||
- For all-day events: set `all_day=True` and provide date `YYYY-MM-DD`.
|
||||
|
||||
3. `calendar_update_event(calendar="family"|"regensburg", event_id, summary=None, start_time=None, end_time=None, description=None, location=None)`:
|
||||
- Updates fields on an existing event.
|
||||
4. `calendar_update_event(calendar="family"|"regensburg", event_id, summary=None, start_time=None, end_time=None, category=None, color_id=None, description=None, location=None)`:
|
||||
- Updates fields or recolors an existing event.
|
||||
|
||||
4. `calendar_delete_event(calendar="family"|"regensburg", event_id)`:
|
||||
5. `calendar_delete_event(calendar="family"|"regensburg", event_id)`:
|
||||
- Deletes an event.
|
||||
|
||||
5. `calendar_get_event(calendar="family"|"regensburg", event_id)`:
|
||||
6. `calendar_get_event(calendar="family"|"regensburg", event_id)`:
|
||||
- Retrieves full event metadata.
|
||||
|
||||
---
|
||||
|
||||
## 🧭 Routing & Operational Rules
|
||||
## 🧭 Routing & Best Practices for OpenClaw
|
||||
|
||||
### 1. Calendar Routing
|
||||
- **Default to `family`**: Any request like *"Erinnere mich an..."*, *"Trage Zahnarzt am Dienstag um 10 Uhr ein"*, *"Wann haben wir diese Woche Zeit?"* always targets the **family** calendar.
|
||||
- **Route to `regensburg`**: Events concerning the city, public festivals, concerts, or cultural events in Regensburg (e.g. *"Trage die Herbstdult ein"*, *"Wann ist das Bürgerfest?"*) belong in the **regensburg** calendar.
|
||||
### 1. Conflict Guard (Terminkonflikte & Puffer)
|
||||
- When a user asks to add an event, check `calendar_check_conflicts` or inspect the `conflict_warning` from `calendar_create_event`.
|
||||
- If an overlap or tight buffer (< 15 Min.) exists, explicitly warn the user:
|
||||
> *„⚠️ Achtung: Am Freitag um 17:30 Uhr hat Moritz schon 'Moritz Gartenparty Arbeit' (17:30 - 18:30). Dein Termin 'Spielplatz' würde sich damit überschneiden. Soll ich ihn trotzdem eintragen?“*
|
||||
|
||||
### 2. Timezone & DateTime Precision
|
||||
### 2. Smart Location & Google Maps Integration
|
||||
- If a place or venue is mentioned (e.g. *"Dr. Müller in Prüfening"*, *"Westbad"*):
|
||||
- Resolve the full address or ask the user, and store it in `location`.
|
||||
- This activates Google Maps departure alerts on their smartphone (*„Aufbruch in 15 Min. wegen Verkehr“*).
|
||||
|
||||
### 3. Proaktive Rückfragen & Checklisten (Mental Load Entlastung)
|
||||
- When booking medical/baby appointments (e.g. *Kinderarzt*, *U-Untersuchungen*, *Zahnarzt*):
|
||||
- Auto-generate or suggest a helpful checklist in `description`:
|
||||
```text
|
||||
📋 Mitnehmen:
|
||||
- U-Heft & Impfpass
|
||||
- Versichertenkarte
|
||||
- 2x Wickelzeug & Schnuller
|
||||
```
|
||||
- Ask proactively in Telegram:
|
||||
> *„Termin eingetragen! 🏥 Soll ich noch eine Notiz oder Packliste (U-Heft, Impfpass, Wechselsachen) im Termin hinterlegen?“*
|
||||
|
||||
### 4. Timezone & DateTime Precision
|
||||
- All dates and times operate in **Europe/Berlin** (`CET`/`CEST`).
|
||||
- Always specify concrete dates and times when confirming actions.
|
||||
|
||||
### 3. Safety & Confirmations
|
||||
- **Conflict awareness**: When adding an appointment, check whether there is already a conflicting event at that time and politely point it out if relevant.
|
||||
- **Deletions require care**: If deleting or overwriting an existing event, confirm the title and date clearly.
|
||||
|
||||
---
|
||||
|
||||
## 📱 Telegram Presentation Style
|
||||
|
||||
Format calendar overviews cleanly for mobile viewing:
|
||||
|
||||
```markdown
|
||||
📅 **Termine diese Woche (Familie)**:
|
||||
• **Mo, 16.09. 09:00 - 10:00**: Kinderarzt U6 🏥
|
||||
• **Mi, 18.09. Ganztägig**: Oma zu Besuch 👵
|
||||
• **Fr, 20.09. 15:30 - 17:00**: Spielplatz-Treffen 🛝
|
||||
|
||||
🏛️ **Regensburg Highlights**:
|
||||
• **Sa, 21.09. ab 18:00**: Jazz-Konzert im Thon-Dittmer-Palais 🎷
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user