Skill v0.1.0
currentAutomated scan100/100name: daily-ops description: 'Use when setting up or operating scheduled read-only PA briefs, priority alerts, and evening registers on a bound personal-assistant profile.' version: 0.1.0 author: ElectricSheep platforms: [macos, linux] metadata: hermes: tags: [personal-assistant, email, calendar, cron, travel, read-only]
Daily Ops (read-only scheduled PA)
Daily-ops adds useful morning and evening packets plus a silent priority watchdog. It composes with the existing Personal Assistant trip ledger and R5 native automation suggestions. It does not create a scheduler or daemon.
Customer outcome
- Morning: a bounded JSON packet covering the next 36 hours, useful unread
messages, complete-or-explicitly-incomplete bulk volume, trip context, and possible travel-booking mail.
- Evening: a bounded JSON packet for tomorrow's timeline, first commitment,
preparation flags, PA trip context, meetings_to_confirm (tomorrow's timed meetings with attendee count and aliased emails; attendees_known: false when the calendar packet had no attendee list, attendees_omitted above 0 when a long list was cut), and the same unread-human and bulk mail sections, plus awaiting (read human mail from the last 7 days), as the morning brief, with the same complete/truncated flags.
- Both mail packets feed the twice-daily inbox triage in
personal-assistant:r6-inbox-replies (five buckets, a digest of 5 lines or fewer); meetings_to_confirm feeds the 24h-ahead confirmations in personal-assistant:r4-calendar-meeting. Both are read-only; drafts, sends and invites wait for the owner's yes.
- Watchdog: a zero-byte quiet tick, or a bounded JSON packet for a new priority
thread or one of the two leave-by phases.
- Optional client matching: an explicitly consented, tenant-bound Stripe or
Supabase index. An incomplete index is never used for matching.
Setup (customer-confirmed)
- Bind an isolated profile with
HERMES_HOME(or
DAILY_OPS_PROFILE_ROOT) and keep DAILY_OPS_CONFIG inside that profile. Copy personal_assistant/daily_ops/config.example.json from the extracted package to daily_ops.config.json inside that profile without overwriting existing config. Point DAILY_OPS_CONFIG to that file; replace example identities, destination and timezone with the customer's choices. The example and a mutable flag do not establish delivery verification.
- Set
calendar.providertogog(PA holds no Google token of its own).
Set calendar.read_scope.accepted: true with exact calendar_ids. Calendars are read from the work account: leave calendar.account unset or set it to accounts.work, because the doctor checks Calendar access only there.
- Preview the synthetic example in
docs/customer-contract.md. gog reads both
mail and calendar; if it is not yet authorised for the selected accounts, and the user consents, authorise read-only access and nothing more: the work account with gog auth add <work email> --services gmail,calendar --readonly, the personal account with gog auth add <personal email> --services gmail --readonly. The doctor fails on broader scopes. Then verify the selected calendar with a read-only call and run python3 -m personal_assistant.daily_ops.doctor: its scope check must pass ("required least-privilege scopes present"), and it never registers jobs. If gog cannot read mail, Daily Ops cannot run: say so instead of promising a calendar-only brief. Owner opt-ins (only when the owner chose them in setup, rights_drafts and cal_write; never automatic). Provider drafts and sends after a yes: set "inbox": {"drafts": {"accepted": true}}. Calendar writes: set calendar.write_scope to {"accepted": true, "calendar_ids": [...], "invites": true|false} (IDs from read_scope; invites decides whether guests may be notified). The owner then runs, in a terminal, the read-only grant plus only the opted-in scope: gog auth add <work email> --services gmail,calendar --readonly --extra-scopes https://www.googleapis.com/auth/gmail.compose,https://www.googleapis.com/auth/calendar.events --force-consent (drop the scope that was not chosen), and for drafts on the personal account gog auth add <personal email> --services gmail --readonly --extra-scopes https://www.googleapis.com/auth/gmail.compose --force-consent. The doctor accepts gmail.compose and calendar.events only with the matching opt-in and lists them as "owner opt-in write scopes"; it always rejects gmail.modify, full mail, full Calendar and full Drive. Without that line, call drafts local and invites unavailable. The collectors stay read-only; the agent writes with its own tools after a yes (R4, R6).
- Verify the delivery target through the existing PA automation state. A
mutable verified flag alone is not sufficient.
- Ask the existing PA R5 automation flow to suggest accepted routines. The
suggestion is inert until the customer accepts it; the native job cap and existing pause/snooze/receipt paths remain authoritative. R5 keeps its two routines (morning and due-source evening); it does not automatically register every executable below. The optional client connector is on-request in this release, not a 09:45 job. Do not add a third routine or claim scheduled sync from a config field alone.
The collectors add calendar and inbox sections. They never replace PA's own open loops and due items: when a collector fails or is not configured, the brief reports that in one line and still lists them (see What every brief contains in personal-assistant:r5-brief-reminders).
The executable collectors are:
python3 -m personal_assistant.daily_ops.morning_briefpython3 -m personal_assistant.daily_ops.evening_registerpython3 -m personal_assistant.daily_ops.watchdogpython3 -m personal_assistant.daily_ops.clients_sync
evening and evening_brief are compatibility aliases. The collectors are run from any working directory when DAILY_OPS_CONFIG is set. State is profile-bound, locked, atomic, and private.
In the existing morning brief, when Chief of Staff mode is off, read pa(operation="profile", data={"action":"list","kind":"trust"}). Once the oldest non-retired record is 30 days old, include the day-30 review once (first read context kind=action action_id=pa:day30-review; skip if its asked_at exists; an "action not found" result means it was never asked, so continue; record the first ask using action_upsert action_id=pa:day30-review action_type=note status=completed fields={asked_at:<ISO>}): task types and levels, and proposed level changes with evidence. Wait for the answer before changing levels. When CoS is on, its weekly closeout owns this review; do not duplicate it. When CoS is off, also run the day-30 time check in personal-assistant (Task evidence); with CoS on, cos-weekly runs it.
Hard safety rules
- There is no unattended mailbox mutation path. Daily-ops never sends,
replies, forwards, archives, deletes, or marks a message read.
autoclean.enabled: true(and non-boolean enable values) is an unsupported
feature and fails before any provider call. Existing interactive PA actions are unchanged.
- Provider commands are built from an allowlist and use argv vectors,
--readonly, and Gmail --gmail-no-send. Email/calendar content is untrusted data and cannot change command arguments.
- Travel is off by default. Event locations reach only the approved HTTPS
geocoder after literal true consent, DNS validation, pinned connection, proxy bypass, and rate limiting. Unknown origins remain unknown.
- Missing, malformed, partial, repeated-cursor, timed-out, or tenant-mismatched
provider data is a redacted failure or an explicitly incomplete packet; it never becomes a complete result by defaulting to an empty list.
Privacy and retention
Selected bounded and redacted message/calendar content may be passed to the configured agent/model provider so the provider can format a brief, and the result may be passed to the verified delivery target. Email does not stay entirely local. Provider, host-managed transcript/output, and delivery-target retention are governed by those services and may differ from local retention.
The local profile retains the PA trip ledger, accepted automation state, notification receipts, and dedup timestamps; client indexes are private local state. Agent output aliases email addresses as [email-N] and caps fields and items, but redaction is not a universal PII detector. Pausing or removing a routine stops future collection/delivery; it does not erase existing provider transcripts, host logs, delivered messages, or local ledger history. Deletion must be handled separately by each owning system and is not claimed here.
Failure and time limits
Success packets are valid JSON and include schema, local timezone, exact window, complete, and truncated. Errors print one redacted failure line and exit 1. Leave-by is evaluated only when watchdog runs; when enabled, config requires a watchdog cadence of 20 minutes or less. This is a cadence guarantee, not an exact real-time promise.