rowboat/apps/x/packages/core
arkml 7cfc2200ba
Merge pull request #750 from rowboatlabs/email_improvements
feat(x): unified email classifier with labels, triage sections, and user instructions

Replace the two disjoint email classification systems (inline importance
classifier + batch labeling agent) with a single LLM pass that emits
importance, category, knowledge verdict, summary, and a pre-drafted reply.

Classification:
- classify_thread.ts now returns {importance, category, knowledge}; the
  category enum and prompt are built at call time from a label registry
  (7 built-ins named after Superhuman's vocabulary — Direct, Calendar,
  News, Marketing, Pitch, Notification, Receipt — plus up to 12 custom)
- Users create labels in plain text via the new "Email agent instructions"
  dialog; an extraction pass syncs them into config/email_labels.json.
  Instructions are also injected into every classify/draft call and the
  composer's Write-with-AI bar (seeded: Investor / Candidate / Customer)
- Per-thread category corrections are sticky and feed few-shot learning
  (email_category_feedback.ts), same pattern as importance corrections

Knowledge graph:
- Delete the labeling agent pipeline (label_emails, labeling_agent,
  labeling_state); admission is now the stamped `knowledge: extract|skip`
  frontmatter, with legacy noise-tag fallback and a budgeted sweep that
  backfills unclassified markdown (build_graph holds unstamped files)
- Guardrails: user-participated threads always extract; user importance
  flips never touch the knowledge verdict; classify failures stamp nothing

Inbox UI:
- Sections become Needs you / Waiting on them / Everything else; waiting
  state is derived per render (user sent last, others participated), never
  stored, so it can't go stale
- Category chips on rows (Direct stays chipless), filter pills with counts,
  one-click bulk archive per category, "Reply ready" indicator
- Fix: Everything else section could never load/render under sustained
  sync writes (fetch was chained on hasReachedEnd, which live reloads reset)
2026-07-14 11:54:44 +05:30
..
docs fix(x): cancellation no longer requires live dependency materialization 2026-07-11 10:59:42 +05:30
scripts Code mode: make packaged builds work via managed engine provisioning (#625) 2026-06-17 21:53:15 +05:30
src Merge pull request #750 from rowboatlabs/email_improvements 2026-07-14 11:54:44 +05:30
.gitignore bootstrap new electron app 2026-01-16 12:05:33 +05:30
package.json chore(x): migrate to AI SDK 7 2026-07-13 16:22:36 +05:30
tsconfig.build.json Refactor builtin file tools beyond workspace scope 2026-05-25 16:21:51 +05:30
tsconfig.json feat: extract presentation generator into executable code with builtin tool 2026-01-30 13:30:06 +05:30
vitest.config.ts Refactor builtin file tools beyond workspace scope 2026-05-25 16:21:51 +05:30