Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.
Shell agent-teamsai-agentai-automationanthropicautonomous-agentawsbusiness-operationsclaudeclaude-codeclaude-code-plugindevopsecommerceinbox-zeroklaviyomarketingmcpmorning-briefingpr-automationshopifyterminal
ops-inbox: never archive todo/action-labeled emails until verified done
claude-ops contributor2378c9fdf65f
diff --git a/claude-ops/skills/ops-inbox/SKILL.md b/claude-ops/skills/ops-inbox/SKILL.mdindex 007354c3..01a1eb1d 100644--- a/claude-ops/skills/ops-inbox/SKILL.md+++ b/claude-ops/skills/ops-inbox/SKILL.md@@ -543,7 +543,14 @@ All channel credentials come from env vars or CLI auth — no hardcoded secrets.**The success metric of `/ops:ops-inbox` is an EMPTY inbox on EVERY channel — not "surfaced the NEEDS_REPLY".** Every conversation that no longer needs the user's eyes, action, or reaction MUST be archived in the same run. This is mandatory, not a nicety:-1. **Archive everything that isn't a live action item.** FYI/noise/newsletters/bot channels, concluded threads, courtesy closes, reaction-only tails — and **WAITING** (you-sent-last) too. Archiving is reversible and WhatsApp/email **auto-resurface a chat the instant a new message lands**, so archiving WAITING loses nothing. The only things left visible after a run are genuine open **NEEDS_REPLY** items — including finance, legal, and personal threads, which are handled exactly like any other thread: draft the appropriate reply or take the required action, investigate as needed, and archive once fully handled. Nothing with a live unresolved action item gets archived regardless of category. All outbound sends on any thread — including finance, legal, and personal — still require per-message approval via the outbound-comms gate (Rule 6).+> **🚫 HARD GUARDRAIL — NEVER ARCHIVE A TODO/ACTION-LABELED EMAIL UNTIL VERIFIED DONE (overrides every archive rule below).**+> An email carrying ANY of the user's todo/action labels is an open task the user is tracking — it MUST stay in the inbox until the task is verified complete, regardless of how it looks to the classifier (even if the subject reads like spam, a newsletter, or an automated notification, and even if it lands in WAITING/FYI). Treat the label as the user's explicit intent and obey it over your own classification.+> - **Protected labels** (case-insensitive, match by name): `To Respond`, `Respond`, `Reply`, `Reply Later`, `Action`, `Needs Action`, `Follow up`, `Awaiting Reply`, `To-do` / `Todo`, `Tasklet`, `Timed Actions`, and any label whose name contains `to-do`/`todo`/`task`/`action`/`respond`/`follow up`/`reply later`/`needs action`/`awaiting reply`. (Skip Gmail system labels `INBOX/SENT/DRAFT/UNREAD/IMPORTANT/STARRED/CATEGORY_*` — those are not todo markers.)+> - **Check before archiving ANY email.** Read the message's `labelIds` (`gog gmail raw <messageId>` is authoritative) and if it carries a protected label, KEEP it — do not archive, do not count it in the archive set.+> - **"Verified done"** = the protected label has been removed, OR the thread was moved to a completion label (e.g. `Actioned`), OR the user explicitly says it's handled. Only then may it be archived. Archiving a still-todo-labeled email is a defect, not cleanup — surface it as a kept actionable item instead.+> - This applies on every channel that exposes labels/flags (email today; extend to any future labeled channel). For label-less channels (WhatsApp/iMessage), the equivalent is "never archive a thread with a live unresolved action item" per rule 1.++1. **Archive everything that isn't a live action item.** FYI/noise/newsletters/bot channels, concluded threads, courtesy closes, reaction-only tails — and **WAITING** (you-sent-last) too. Archiving is reversible and WhatsApp/email **auto-resurface a chat the instant a new message lands**, so archiving WAITING loses nothing. The only things left visible after a run are genuine open **NEEDS_REPLY** items — including finance, legal, and personal threads, which are handled exactly like any other thread: draft the appropriate reply or take the required action, investigate as needed, and archive once fully handled. Nothing with a live unresolved action item gets archived regardless of category — **and per the HARD GUARDRAIL above, nothing carrying a todo/action label is archived until that task is verified done, even if it would otherwise classify as FYI/noise/WAITING.** All outbound sends on any thread — including finance, legal, and personal — still require per-message approval via the outbound-comms gate (Rule 6).2. **After you reply to anyone, IMMEDIATELY archive that chat** — reply→archive is one atomic step. Never leave a just-answered thread sitting in the list.3. **`include_context: true` is the HARD DEFAULT on every `list_messages` read.** Never pass `false` — you must always see the surrounding thread to understand what a message is about before classifying or drafting.4. **Verify the bridge is FULLY up before trusting any classification** — run `wa-inbox-fresh.sh`, confirm the systemd unit is `active` and `:8080` LISTEN, and do a real read. A stale store mis-classifies last-sender.@@ -1058,7 +1065,9 @@ def classify_thread(thread_id):- **NEEDS REPLY**: Last sender is NOT you AND no unsent draft exists AND the user has not already replied anywhere → action needed- **WAITING**: Last sender IS you (SENT label) or you already answered → waiting for response- **DRAFT**: Unsent draft exists → verify no reply already sent, then offer to send- - **FYI**: Newsletters, automated notifications, receipts → bulk archive+ - **FYI**: Newsletters, automated notifications, receipts → bulk archive — **UNLESS the message carries a protected todo/action label (see the HARD GUARDRAIL in "Core principle: INBOX ZERO"), in which case it is KEPT as an actionable item regardless of its FYI appearance.**++ **Before building the FYI/archive set, drop any message whose `labelIds` include a protected todo/action label** (`To Respond`/`Respond`/`Reply`/`Reply Later`/`Action`/`Needs Action`/`Follow up`/`Awaiting Reply`/`To-do`/`Todo`/`Tasklet`/`Timed Actions`, or any custom label name containing those terms — ignoring system labels `INBOX/SENT/DRAFT/UNREAD/IMPORTANT/STARRED/CATEGORY_*`). Those are user-tracked open tasks and must stay in the inbox until verified done.**Phase 2 — Build context for NEEDS REPLY items (run in parallel):**For each NEEDS REPLY thread, gather:@@ -1127,7 +1136,7 @@ Archive N FYI/newsletter emails?[Archive all N] [Review each] [Skip]```-Draft replies via `gog gmail send`. Archive via `gog gmail archive <messageId> [<messageId>...] --force --no-input`.+Draft replies via `gog gmail send`. Archive via `gog gmail archive <messageId> [<messageId>...] --force --no-input`. **Never include a message carrying a protected todo/action label in the archive batch — filter the archive set against `labelIds` first (HARD GUARDRAIL above).** If a todo-labeled message was archived in error, restore it with `gog gmail messages modify <messageId> --add INBOX --no-input` and keep it as an actionable item.> **Known trap — post-archive re-scan:** after archiving FYI messages, do NOT immediately re-run `gog gmail search "in:inbox"` to confirm — that search is cached/stale and will still return the archived messages, falsely suggesting archive failed. Trust the archive command's exit 0 as success. If you must verify a specific message, use `gog gmail raw <messageId>` and check that `"INBOX"` is absent from the `labelIds` array.