From b396a8e57568134b1e71bd37c9434dc01ca64ac5 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Sun, 1 Mar 2026 19:22:34 +0000 Subject: [PATCH] add inbox triage opencode command --- profiles/opencode/command/inbox-triage.md | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 profiles/opencode/command/inbox-triage.md diff --git a/profiles/opencode/command/inbox-triage.md b/profiles/opencode/command/inbox-triage.md new file mode 100644 index 0000000..973ce8f --- /dev/null +++ b/profiles/opencode/command/inbox-triage.md @@ -0,0 +1,55 @@ +--- +description: Triage inbox one message at a time with himalaya only +--- + +Process email with strict manual triage using Himalaya only. + +Hard requirements: +- Use `himalaya` for every mailbox interaction (folders, listing, reading, moving, deleting, attachments). +- Process exactly one message at a time. Never run bulk actions on multiple IDs. +- Do not use pattern-matching commands or searches (`grep`, `rg`, `awk`, `sed`, `himalaya envelope list` query filters, etc.). +- Always inspect current folders first, then triage. + +Workflow: +1. Run `himalaya folder list` first and use those folders as the primary taxonomy. +2. Use this existing folder set as defaults when it fits: + - `INBOX` + - `Orders and Invoices` + - `Einlieferungen` + - `Newsletters and Marketing` + - `Junk` + - `Deleted Messages` +3. `Archive` is deprecated legacy storage: + - Do not move new messages to `Archive`. + - Do not create new workflows that route mail to `Archive`. + - Existing messages already in `Archive` may remain there unchanged. +4. Determine source folder: + - If `$ARGUMENTS` contains a folder name, use that as source. + - Otherwise use `INBOX`. +5. List envelopes from the source folder without search filters and walk them sequentially. +6. For each single envelope ID, do all checks before any move/delete: + - Read the message (`himalaya message read -f "" `). + - If needed for classification, inspect attachments with Himalaya (`himalaya attachment download -f "" `), then reason from the attachment names/content. +7. Classify and act for that one ID: + - Ephemeral communication from automated/system senders (alerts, bot/status updates, auth/login codes, OTP/2FA verification emails, password-reset codes, no archival value): delete it. + - Communication from actual people: do not delete, do not move, and do not auto-triage; leave untouched in the current folder (typically `INBOX`). + - Orders/invoices: move only real order/invoice/business records to `Orders and Invoices`. + - Shipping-only notifications: do not move to `Orders and Invoices` unless there is actual invoice/receipt/order-document value (for example, invoice attached or embedded billing document). + - Marketing/newsletters: move to `Newsletters and Marketing`. + - Delivery/submission confirmations (`Einlieferungen`) when appropriate. + - Long-term but uncategorized messages: create a new folder and move there. +8. Folder creation rule: + - If none of the existing folders fit but the message should be kept, create a concise new folder with `himalaya folder add ""`, then move the message there. +9. Continue until all messages in source folder are processed. + +Execution rules: +- Never perform bulk operations. One message ID per `read`, `move`, `delete`, and attachment command. +- Never skip reading message content before deciding. +- Keep decisions conservative: delete only clearly ephemeral automated/system messages. +- Never move or delete human communications via automation. +- Never route new messages to `Archive`; treat it as deprecated legacy-only. +- Report a compact action log at the end: per-folder counts, created folders, and a short rationale for non-obvious classifications. + + +$ARGUMENTS +