Skip to content

· Shipped

Email Janitor

Tiered inbox filter that labels first, audits, then promotes — never deletes

Metric
Zero-delete guarantee — labels during probation, archive-only after promotion, every action audited

The problem

Work inbox drift: newsletters, notifications, and low-signal threads bury the replies that actually matter. Manual triage is slow, and any autonomous tool that could archive or delete felt too risky to trust without a long audit trail.

The approach

Built a three-tier pipeline. Whitelist first — any sender Kevin has replied to bypasses filtering. Rules second — list-unsubscribe headers and known-spam patterns get labeled `Auto/Archive-candidate` without an LLM call. Claude Haiku 4.5 (temp 0.0) classifies only the ambiguous remainder into keep/review/archive. Every action writes to a SQLite audit log with the message ID and model reasoning.

The result

Runs on Cloud Run in probation mode — only labels, never archives, until a 2-week accuracy review passes. A weekly `/digest` page surfaces each labeled message for validation before `PROMOTE_AUTO_ARCHIVE=true` flips the switch. Even after promotion, delete is never allowed; archive only, and the whitelist always wins.