Use when the user wants to clean up, organize, or triage their Gmail inbox interactively
Interactive GTD-inspired state machine for Gmail. Gaia analyzes threads, proposes transitions. User decides. Gaia executes. The gmail-policy skill governs allowed operations and label definitions.
Four active states (defined in gmail-policy):
_gaia/action — user must act_gaia/waiting — user acted, awaiting reply_gaia/someday — interesting, no urgency_gaia/pending — staging (triage backlog)_gaia/trash — soft delete; never truly deletedNo _gaia/* label = processed/done.
Before presenting ANY labeled email, check the thread: message count, who sent last, when. This determines framing:
action thread → move to waitingwaiting thread → move to actiontrash or somedaysomeday → actionModes 1–5 open with a state summary before their specific work:
"Antes de empezar: N en action, N en waiting, N en someday." Flag action items stale >3 days.
_gaia/action — present each item with thread framing. Did user already reply? Auto-propose → waiting._gaia/waiting — did the other party respond? Auto-propose → action. Stale >1 week → flag._gaia/someday — count only: "tienes 5 en someday." Detail only if asked.action. Interesting, no urgency → propose someday.Scan inbox, group by sender/category, report counts. Present top groups. User decides per group → trash/action/someday/content-label. Report progress: "Procesamos 500 de 2000. ¿Seguimos?"
Pick easiest batch (highest volume, most repetitive). "340 promos de retail. ¿Las mando a trash?" One confirmation = hundreds processed. Target: under 2 minutes.
Move unprocessed to _gaia/pending. Report: "847 correos: 600 promos, 120 banco, 80 LinkedIn, 47 otros." Work categories in follow-up modes.
Dedicated state review — all three active labels:
_gaia/action — stale >3 days? move to waiting/someday/done?_gaia/waiting — any responses arrived? stale >1 week?_gaia/someday — weekly review: promote to action? trash any?Group by sender, identify patterns. Flag genuinely interesting vs noise. Recommend bulk trash for repetitive senders.
Group by sender/topic. Show count + sample subject. Flag unusual items ("movimiento de $50K en Bci"). Propose action per group. Max 5-7 groups per interaction.
removeLabelIds changes visibility with no undo._gaia/trash — it is the user's safety net, not Gaia's to manage.gmail-policy — security rules, label definitions, operation tiersgws-setup — CLI installation and authentication