Schedule Management
When to Use
- Use for "予定入れて", "予定を変更", "予定をずらして", "カレンダーに追加", "空いている時間", "新幹線", "ホテル", "予約", "Outlook", "Google Calendar", "TimeTree", or "同期".
- Use for both new events and updates to existing events.
- Do not use for booking a third-party service, replying to an invitation, or creating a Teams meeting unless the user explicitly requests that action.
Core Rules
- Treat calendar content as private. Confirm the target calendar and visibility before writing sensitive personal, medical, financial, relationship, or travel details to a shared calendar.
- Never infer that a write reached the intended account or calendar from a single backend result. Identify the account and calendar, then read the saved event back from every requested destination. If the client display is delayed, say it is pending visual sync rather than claiming it is visible.
- Use a stable source key or idempotency identifier when an API supports it so retries update the same event instead of creating duplicates.
- When a private event has no requested destination, register it in every configured calendar integration with a supported write route. Report any route blocked by authentication or configuration; do not silently omit it.
- Before updating an event, read its complete current state. Write the complete intended state for title, start, end, time zone, location, notes, categories or labels, availability, and visibility. Do not perform a location-only or notes-only update that can discard other fields.
- Put the official facility name and postal-code address in both the location field and the event notes. Never write an address or postal code from memory: confirm it on the facility's official page (search the raw HTML when the text view omits it) and use the official URL. If it cannot be confirmed, leave it out and flag it as unverified.
- Keep a user-selected source of truth for every event. Prefer the official Google Calendar API for Google writes; recover the existing connection below before proposing setup. Browser fallback requires explicit approval. TimeTree requires its own visible-UI write unless a supported integration is verified. A Google calendar named "TimeTree sync" is not evidence of automatic syncing; distinguish separate copies, external-calendar display, and verified sync. Never rename or delete a misleadingly named calendar without approval.
- A closed browser-control target does not prove logout. Do not use its stale DOM; when browser reopening is authorized, re-establish a clean target and verify the signed-in calendar before requesting login. Authenticate only after an actual login state, then re-read the target calendar and check duplicates.
- When holds come from a shared availability sheet, confirm which row is the
user's if names are close, block only the stated available window for a
conditional mark, and keep work holds in the work calendar until the user
approves copying them elsewhere (see
references/portability.md). - When creating an event that belongs to an existing series (for example numbered preparation blocks), read a sibling event first and set its colour category in the same write; a new event does not inherit it, and an uncoloured one is a defect. Read the category back. With no sibling, choose the category by
references/labels.md. - A natural-language calendar answer can silently omit entries (it may state a result cap). For free-time or conflict decisions, read the date range directly with selected fields and a page size, narrow the range if it caps, and treat an unread range as unverified; never infer missing items from titles.
- If an image or message does not establish a time, duration, location, target calendar, or whether the event is confirmed, ask only for the missing detail.
- Check OOF first; exclude full-day OOF dates unless an explicit exception is permitted. Holiday OOF titles do not establish personal availability or cancel recurring work meetings. Clarify their scope and ask whether tentative or unaccepted blocks should count as busy or available.
- For a meeting reschedule, verify the proposed slot against every required attendee. Preserve the original attendees, organizer, online-meeting link, location, category, and visibility when changing the time.
- Before sending a meeting update, preview its recipient, new time, and exact message. Use a concise generic explanation; do not disclose private calendar details in the update or a follow-up chat.
- Adding attendees to an event (UI or API update) sends invitations immediately. Save the event without attendees first, add only user-approved recipients, keep the Teams meeting off unless requested (Outlook on the web turns it on once an attendee is added), then read back the event and the sent item.
- To offer time candidates for an external meeting whose length is flexible, read the user's calendar for the target dates and split events into fixed (others invited) and movable (user-only prep, follow-up, learning or personal blocks). Offer windows longer than the meeting so the invitee picks a start inside one, order them by fewest moves, and list the movable blocks each window would displace. Move nothing until a window is chosen. State what is unverified (invitee availability; multi-day assignment notices that free/busy does not show) and keep internal block titles out of the invitee-facing message. If every attendee's availability is readable or the invitee requires a fixed length, offer fixed-length slots instead.
Recover an Existing Google API Connection
- If the user reports prior setup, trace the successful operation in earlier
session history and its helper/configuration references, not only recent turns.
Inspect those locations before a bounded search of user configuration folders;
filename searches for "Google" or "Calendar" miss
service-account.json. - Distinguish service-account credentials, dedicated user OAuth, and gcloud ADC. An ADC scope error or logged-out browser says nothing about another route. Reuse the established identity and calendar; do not overwrite unrelated ADC credentials, broaden scopes, or repeat a blocked default-client login.
- Load credentials only into the official authentication client; never print keys/tokens or copy them into artifacts. Read calendar metadata and ACLs to confirm the intended calendar, user access, and sharing before writing. Report failures per route, not as proof that no integration exists.
Key References
| Need | File |
|---|---|
| Google upsert (service account, idempotent key) | scripts/google_calendar_upsert.py |
| TimeTree create and readback (dedicated CDP browser) | scripts/start-calendar-browser.ps1, scripts/timetree_create_event.py |
| Environment variables, secrets, TimeTree gotchas, availability sheets, migration to another harness | references/portability.md |
| Which category or label to give an event (by purpose and color) | references/labels.md |
| Flight, leave and overlapping all-day banner patterns | references/event-patterns.md |
Workflow
- Extract the event's title, actual time, duration, place, notes, confirmation status, privacy level, and requested destinations from the user message, attachment, or source event.
- Inspect every affected calendar for duplicates, conflicts, full-day OOF, and
tentative holds before offering date/time choices or recommendations. Include
travel margins and flag unknown store hours. Resolve ambiguous holds, then
offer viable alternatives; wait for the user's selection before moving events.
A provisional hold for the same occasion (e.g. 【仮】 / [候補]) in any
destination is updated in place, not duplicated.
Setting
showAs=freeor transparency never resolves a real booking conflict. - Resolve missing facility addresses and format a shared location string as
施設名|〒郵便番号 住所. Copy it into the notes as場所and住所. - Apply the appropriate event pattern:
- Travel: block in 30-minute increments beginning at least 15 minutes
before the actual departure. Use
HH:MM発|移動(出発駅 → 到着駅/新幹線)as the title and record carrier, service number, and actual departure/arrival in notes. Apply the purple travel category in Outlook (references/labels.md) and theSoft violetlabel in TimeTree. - Hotel: use a one-hour check-in block. Put the check-in time in the title
as
HH:MM チェックイン|ホテル名, apply the same purple travel label, and include hotel name, address, check-in, and check-out in notes. - Appointment: when a travel buffer is requested, block the requested buffer while keeping the confirmed appointment time in notes. Mark an unconfirmed appointment as provisional.
- Flight: the Travel title with airline and flight number, starting at the
user's stated airport lead time; departure in the departure airport's local
time, with the JST conversion in notes (
references/event-patterns.md). - Leave: an all-day out-of-office block titled
年休予定 | <purpose>with no category; its end date is the day after the last day in Google and Outlook. Keep one all-day banner per purpose (references/event-patterns.md).
- Travel: block in 30-minute increments beginning at least 15 minutes
before the actual departure. Use
- Update existing event IDs in every approved destination; create only missing copies. For TimeTree, use visible UI and the requested label, not an undocumented API; the bundled script does this and reads the event back. After any TimeTree timeout or partial failure, count same-title events before retrying; a blind retry creates duplicates. Match screenshots to their service/calendar before diagnosing missing events. If one service is down (e.g. Graph 5xx), finish the others, retry the failed one later, and report each destination's state separately.
- Read back title, start/end, location, notes, privacy, reminders, and category or label from each destination; confirm the old slot no longer contains the moved event. Restore missing fields before reporting completion. Name each service/calendar and its saved, visibly confirmed, or blocked state; never describe an API readback as proof of client display or another service's synchronization.
- For a rescheduled meeting, confirm that the update notification was sent. If the user approves a Teams follow-up, send a separate concise message only after the meeting update succeeds.
Privacy Routing
- For a private event, set the requested privacy level in each private calendar.
- For a provisional hold that may be visible to others and whose purpose is personal or sensitive, use a neutral title such
as
調整中(仮)and leave the location blank; record its purpose only in an approved event body or comment. Set Outlook sensitivity tonormalonly when the user has confirmed that their sharing settings expose titles and locations but not the detailed body. - For a provisional hold on a work calendar (for example candidate windows for a
work meeting), use a descriptive title prefixed
【仮】(purpose and window), sensitivitynormal,showAs=tentativeand no attendees; a neutral title or private flag only hides what the user needs to see. Outlook colours come from categories, not fromshowAs, so apply an existing colour category when the user asks for a colour (list the master categories first; do not rename or create one without approval, and say which was used; the owner's scheme is inreferences/labels.md). - Edit-capable or token URLs (for example a Forms collaborator link) go into an event body only with the owner's explicit OK and only on an event with no attendees; warn that adding attendees or sharing the calendar later exposes them.
- For a shared calendar, use a generic blocker without names or notes only when the user explicitly asks for a dummy event. Add its location only when the user explicitly requests it.
- Always set a TimeTree dummy event to
Soft violetunless the user explicitly chooses another label; never retain the label of an event being converted into a dummy. - Keep detailed information out of destinations the user has not approved.
Done Criteria
- Every requested calendar contains exactly one intended event.
- The displayed account and calendar match the requested destination.
- Time, location, notes, visibility, and category or label are present after readback.
- Travel and hotel events use their standardized title and purple category or label.
- Updates retain required existing information unless the user explicitly removed it.