Universal Inbox — Core of RAIA (Real estate Artificial Intelligence Agent) Operations, Labels SSOT, Audience & Chip Palette (ADR-273/280/285/286)
The Universal Inbox is the front desk of the whole company. Every message that arrives — email, portal alert, e-sign completion — is turned into a plain, safe note by a simple recipe (never by a guessing robot), sorted by a points system into "definitely ours", "probably ours", or "not sure", and only then does a human (or an approved robot draft) answer it. Gmail keeps the fancy original letter forever; the inbox keeps the working note and the buttons that get work done.
The Universal Inbox is the front desk of the whole company. Every message that arrives — email, portal alert, e-sign completion — is turned into a plain, safe note by a simple recipe (never by a guessing robot), sorted by a points system into "definitely ours", "probably ours", or "not sure", and only then does a human (or an approved robot draft) answer it. Gmail keeps the fancy original letter forever; the inbox keeps the working note and the buttons that get work done.
The ops work surface where every inbound message is ingested, deterministically distilled, mechanically triaged, confidence-banded, and turned into linked actions/jobs — with AI restricted to sandbox reply composition and HITL catching everything uncertain.
Section A Why the Inbox Is the Core of Operations
Every working day at an estate agency starts the same way: a pile of messages. A tenant reporting a leak, a landlord asking about rent, a portal sending a new enquiry, an e-sign service saying a contract was signed. In most agencies that pile lives inside an email program, and the work — creating a maintenance job, chasing a deposit, updating a tenancy record — happens somewhere else, by hand, when somebody remembers.
The Universal Inbox deletes that gap. It is not an email client; it is the ops work surface where messages become work. A message arrives, is reduced to a safe plain-text note with a few trusted clickable links, is scored by a mechanical points system, and lands in front of the right person already linked to the tenant, the property, and the open actions it touches. One click creates the job. Nothing is re-typed. Nothing is lost in someone's personal mailbox.
Three locked doctrine points make this safe (ADR-273):
- The body is a deterministic extract, never an AI rewrite. The same email always produces the same note — so it can be tested, diffed, and audited. No robot paraphrases what the customer "really meant".
- No HTML email is ever stored or rendered. The full-fidelity original — formatting, images, attachments — stays in Gmail, one deep link away on every message. This removes the entire XSS/tracking/phishing attack surface instead of trying to tame it.
- AI only drafts replies in a sandbox, and only when needed. A human approves every draft before it sends. AI never decides what a message says; it only helps answer it.
The Pipeline Shape
The mission of the pipeline, in one line: Ingest → deterministic distill → mechanical triage (90%+) → confidence bands → AI sandbox reply only when needed → HITL "Not sure" → create/link actions and jobs.
-
1Ingest — Gmail filters first
Server-side Gmail labels (
RAIA/INBOX,RAIA/NOTIFY) decide what is even allowed in. Junk never crosses the door. RAIA (Real estate Artificial Intelligence Agent) reads labels; it never writes them. -
2Distill — one pure function
MIME walk → prefer plain text → normalize whitespace/quotes → unwrap tracking redirects. Byte-stable output for a given source message, versioned by
distill_version. -
3Triage — mechanical rules handle 90%+
Sender resolution, portal detection, junk rules: the deterministic ruleset routes almost every message with zero AI. The full ruleset lives in § 3.30 Universal Inbox Triage Rules — this page defines the doctrine they run on, not the rules themselves.
-
4Confidence — three bands plus a shadow reject
A mechanical score (0–100, no LLM) routes high/medium to the normal queue, low to the "Not sure" HITL queue, and would-be rejects to "Not sure" too until the golden set proves 100% reject precision.
-
5Reply — AI sandbox only when needed
Most messages need an action, not an essay. When a written reply is warranted, AI composes a draft that a human approves before send. The draft never replaces the message.
-
6Act — create and link actions/jobs/tasks
Every created entity stores the originating
conversation_id/message_idback-reference. The inbox is the entry point into the EstateAigents OS loop, not a dead end.
Section B Working a Message (Ops Workflow)
Staff open the inbox to a queue of plain-text message bubbles, WhatsApp-style. Each bubble shows the distilled body, the linked person and property in the right panel, a handful of clickable trusted links (e-sign, payments, portals, our own app), and a View in Gmail link for the full original.
- Read the distilled plain-text body — safe by construction
- Click allowlisted action links (https only)
- Approve, edit, or discard the AI sandbox draft reply
- Create an action/job/task from the message — one click
- Open the full original in Gmail (deep link on every message)
- Render HTML email, images, or remote content in the body
- Show an AI summary as the message (secondary panel only, labelled)
- Auto-send any reply — every draft is human-approved
- Auto-reject a message (shadow-only until golden-set gate passes)
- Duplicate a message across mailboxes — mailboxes are tags
The "Not Sure" HITL Queue
Low-confidence messages are not a failure mode — they are the designed pressure-release valve. The "Not sure" queue asks a human one of a small set of mechanical questions:
- Confirm person — is this really the tenant/landlord we resolved to?
- Confirm asset — which property does this message concern?
- Confirm inbox membership — does this belong in the ops queue at all, or is it junk/marketing?
Verdicts are recorded deterministically and feed the rules, never a hidden model: two junk verdicts on the same sender add it to the org blocklist (scoring input I7); recurring misroutes go into the weekly rules-tuning review. No implicit ML, no automatic weight mutation.
Until the golden-set suite proves 100% reject precision (zero false rejects on real, human-labelled messages) in CI, every would-be reject is parked in "Not sure" with reason shadow-reject. Nothing is silently dropped from the staff work queue.
The Gmail Escape Hatch
Gmail remains the full-fidelity archive: all MIME parts, headers, attachments, and threading, exactly as received. Every message row carries a gmail_url — computed at render time from the Gmail thread ID, never stored — that opens the exact original in Gmail web. Staff use it for anything the distill intentionally drops: layout, branding, images, signatures, quoted history in full fidelity, and attachments (which surface as document links per ADR-155, never inline).
Section C Deterministic Distill — Contract
The stored content is produced by a pure function of the Gmail message. Normative algorithm order (appendix spec: docs/planning/universal-inbox-distill-confidence-spec.md):
distillBody(gmailMessage: GmailMessageRaw, distillVersion: int) -> DistillResult
DistillResult = {
content: string # plain text, UTF-8, \n line endings
extracted_urls: UrlHit[] # every URL found, with allowlist verdict
warnings: string[] # e.g. "html-only source", "truncated"
}
UrlHit = { url: string, allowlisted: bool, scheme: string }
| # | Step | Rule |
|---|---|---|
| 1 | MIME walk | Depth-first, first text/plain wins; html-only → deterministic tag-strip + warning |
| 2 | Decode | Quoted-printable / base64 per part headers; charset → UTF-8 (replace on errors) |
| 3 | Line endings | \r\n, \r → \n |
| 4 | Tracking unwrap | Deterministic decoders only; unknown wrappers left as-is; no heuristic guessing |
| 5 | Whitespace | 3+ blank lines → 1; trailing spaces stripped |
| 6 | Quoted history | Preserved in content; machine-readable marker computed so UI can collapse |
| 7 | URL extraction | Regex over final text; classify against allowlist; text itself unchanged |
- Pure: same input + same
distill_version→ byte-identical output. No clock, no randomness, no network, no LLM. - Total: never throws on malformed MIME; falls back to Gmail
snippetwith a warning. - Bounded: 20,000-char cap; truncation appends
\n… [truncated — view in Gmail]plus a warning. - Versioned: any change to steps 1–7 increments
distill_versionand ships with a re-distill backfill script.
Rendering Contract (WhatsApp-Style)
- Body renders as plain text,
whitespace-pre-line, nodangerouslySetInnerHTML. - Linkify at render: only
allowlisted == trueURLs become<a target="_blank" rel="noopener noreferrer">. Everything else is plain text. - Allowlist v0 (admin-editable config, org-scoped, audited):
*.docusign.net,*.hellosign.com,*.dropbox.com/sign,*.gocardless.com,*.stripe.com,*.rightmove.co.uk,*.zoopla.co.uk,*.estateaigents.com.https:only. - Every bubble carries "View in Gmail" using the computed
gmail_url. - AI summaries, if present, render in the right panel only — never in the bubble.
Confidence Score — Inputs, Weights, Bands
Every ingested message gets a deterministic score (no LLM): score = clamp(sum(inputs), 0, 100). The mechanical triage rules (ADR-267/269) handle 90%+ of routing upstream; this score governs the residual confidence bands. Full triage ruleset: § 3.30 Universal Inbox Triage Rules.
| # | Input | Signal | Points |
|---|---|---|---|
| I1 | Sender resolved via tbl_persons_channels.channel_value to a person_id in this org | exact match | +40 |
| I2 | Resolved person has live link: tbl_tenancies_persons (tenant) or asset ownership (landlord) | role known | +20 |
| I3 | Gmail label = RAIA/INBOX | pre-filtered human-relevant | +20 |
| I4 | Gmail label = RAIA/NOTIFY | automated but expected | +5 |
| I5 | Asset disambiguation: asset_id set, or exactly one address token match | unambiguous property | +15 |
| I6 | Sender domain matches org's own domain | internal | +10 |
| I7 | Sender on org blocklist (≥2 HITL junk verdicts) | known-bad | −50 |
| I8 | No RAIA/* label at all | unfiltered | −20 |
| I9 | List-Unsubscribe header AND no person resolution | probable marketing | −15 |
| I10 | Person links to multiple assets, no subject/body match | disambiguation failed | −10 |
| Band | Score | Route |
|---|---|---|
| High | ≥ 70 | Universal Inbox, normal queue |
| Medium | 40–69 | Universal Inbox, normal queue (low-confidence context flag in UI) |
| Low | 10–39 | "Not sure" HITL queue |
| Reject | < 10 | Gmail only — shadow-only until golden-set gate passes (D9) |
The versioned corpus (tests/inbox/golden/) of anonymized real messages with human verdicts (inbox, not_sure, reject) runs in CI on every rules/weights change. Promotion criterion: reject precision = 100%. Weights and bands are config, not code — a config change that fails the golden set does not deploy. Same gate philosophy as ADR-177 transform gates.
Data Contract — Field List
| Field | Status | Purpose |
|---|---|---|
external_message_id | Existing | Gmail message ID; dedup key across mailboxes (D7) |
external_thread_id | New | Gmail thread ID; one logical thread across mailboxes |
gmail_url | New | Deep link — computed at render: https://mail.google.com/mail/u/0/#all/<thread_id>; zero storage |
inbound_mailboxes[] | New | Mailbox tag array — tags, never copies (D7) |
content | Existing | Deterministic distilled extract only; HTML never stored |
content_html | Rejected | ADR-272 D2 superseded — no HTML storage anywhere in the pipeline; V272 migration must not run |
confidence_score | New | SMALLINT 0–100, mechanical score (D8) |
confidence_band | New | high / medium / low / reject |
gmail_labels | New | Label snapshot at ingest for audit + rules debugging |
distill_version | New | Version of the distill function; enables unambiguous re-distill migrations |
Every field marked New requires a DDL migration dispatched to Programmer only after Eugin's explicit approval. No new actions/jobs/tasks linkage schema may be invented without flagging Eugin — interface points use existing tables (tbl_conversations, tbl_actions); any gap is raised as a question, not silently migrated.
Phased Build (Programmer Dispatch Order)
| Phase | Scope | Gate |
|---|---|---|
| 0 — Guard | Confirm V272 content_html not applied to live; hold all ADR-272 HTML-render work | — |
| 1 — Distill core | distillBody() + unit tests, WhatsApp-style render + allowlist linkify, computed gmail_url, golden-set harness scaffold | No schema change; determinism tests byte-stable |
| 2 — Identity + confidence | Migration (6 new fields), mechanical scorer I1–I10, three-band routing, mailbox tag dedup | Eugin-approved migration; band-boundary unit tests (9/10, 39/40, 69/70) |
| 3 — Gmail contract + HITL | Filter/label runbook finalized, "Not sure" queue UI, verdict feedback into rules tuning, shadow-reject routing verified | Golden-set 100% reject precision before live reject (D9) |
| 4 — Actions loop | Message → action/job/task creation wired to tbl_actions, back-references stored, Outstanding Actions surfacing | API curl verification on staging (standing rule); O3-DB dependency |
Dispatch mechanics follow standing Programmer rules: parallel fix/<slug> branches, PA merges, no PRs, kanban_complete with SHA + API curl proof.
Non-negotiables Checklist
| Rule | Check |
|---|---|
| No LLM in the body-storage path | D3 — deterministic distill only |
| No HTML stored or rendered in inbox bodies | D5 — content_html rejected; ADR-272 D2/D3/D6 superseded |
| Gmail deep link on every message | D2 — computed at render, always correct |
| Mailboxes as tags, never copies | D7 — dedup on external_message_id |
| Reject rules gated on golden-set 100% precision | D9 — shadow-reject until proven |
| No new schema without flagging Eugin | D10 + Data Contract table |
| Gmail label writes forbidden | D6 — RAIA (Real estate Artificial Intelligence Agent) reads labels; ops maintains filters in Gmail |
| KISS | One distill function, one scorer, three bands |
The canonical doctrine record is 03_technology/architecture/decisions/ADR-273-universal-inbox-distill-doctrine.md; the implementable mechanical spec is 03_technology/architecture/briefs/universal-inbox-distill-confidence-spec.md; the live Gmail filter HITL pack is 03_technology/architecture/briefs/HITL-gmail-filters-enquiries-2026-07-26.md. The labels + audience model canonical records are ADR-280, ADR-285, ADR-286 (as amended) with migrations V307/V309 — see Section D. This page is the human-readable companion; where they differ, the ADR wins. The triage ruleset itself lives at § 3.30 Universal Inbox Triage Rules — linked, not duplicated.
Section D Labels, Audience & Chip Palette — Content SSOT, System Audience Flag, and Chip Colour SSOT
Cutover applied to production 2026-08-01. This section is the canonical human-readable reference for the live label + audience model, the Universal Inbox vs Chat product boundary, and the chip colour single source of truth. It replaces the retired 16-value conversation_type content mix. Sources: ADR-280 (mechanical labels), ADR-285 (labels SSOT + phased retirement), ADR-286 as amended (repurpose not drop), V307 (CHECK hardening), V309 (internal|external).
Every conversation in the Universal Inbox now shows two independent chips and carries one audience flag:
- Channel chip — how the message arrived (Email, WhatsApp, Telegram, Phone). This is the transport. It never tells you what the message is about.
- Category chip(s) — what the message is about (Enquiries, Maintenance, Accounts, IT, Compliance, Legal, HR, Marketing, Junk). A conversation can have several category chips. These come only from
tbl_conversation_labels. - Audience flag — who the conversation is for:
internal(staff / contractor product thread for that org) orexternal(tenant, landlord, supplier, portal, prospect — everyone else). This istbl_conversations.conversation_type, repurposed 2026-07-31.
The old behaviour — one field trying to be both "what it is about" and "who it is for" — is gone. Content lives in labels; audience lives in conversation_type; transport lives in channel. Three axes, three homes, no overlap.
One product consequence: the Universal Inbox (left-nav Inbox) shows external threads only. Staff conversations (Telegram, aigent DMs, internal product threads) live in the separate left-nav Chat surface. The audience flag is what keeps them apart — but the UI never shows "Internal" or "External" as a pill. It is a system filter, not a user badge.
The Three-Axis Model (Eugin Lock 2026-07-31)
| Axis | Column / Table | Values | Who cares |
|---|---|---|---|
| Audience | tbl_conversations.conversation_type | internal | external | Product visibility — staff threads vs customer threads |
| Routing | tbl_conversations.thread_kind | customer | staff_bot | system | Code path — telegram webhook, staff DM, AI session exclusion |
| Content | tbl_conversation_labels | Enquiries, Maintenance, Accounts, Compliance, Legal, HR, IT, Marketing, Junk | Human triage + sidebar counts + stats |
| Transport | tbl_conversations.channel | email, phone, whatsapp, aigent_telegram, … | Channel chip in the UI |
- Content chips SSOT =
tbl_conversation_labelsonly. No other table or column stores "what this conversation is about." conversation_type= audience only. It is not a content category. Never writeenquiry,maintenance,general,agent_aigentinto it — V309 dropped those values.- Enquiries = sales + lettings only. It is not a catch-all for "anything at the enquiries@ mailbox." Portal tech alerts →
IT; newsletters / Gumtree / saved-search digests →Junk. - Invalid multi-label: Enquiries+IT, Enquiries+Compliance. When Enquiries fires, all other candidate labels are dropped by the engine.
- Channel chip ≠ category chip. "Email" is transport; "Enquiries" is content. They are rendered as separate chips.
inbound_address= RECEIVED AT telemetry (right panel). It is not a label and not a mailbox verdict — the mailbox prior is only a weak input signal to the label engine, never its output.- Mechanical-first labels; AI residual only. ADR-280 DA1 Option A: no heuristic band. Rules miss → AI fallback or HITL. Manual labels (
assigned_by='manual') are never overwritten. - Org RLS is separate from internal/external.
organisation_idscoping is unchanged; the audience flag does not replace RLS.
Universal Inbox vs Chat — The Audience Boundary
The Universal Inbox and the left-nav Chat surface are two different products serving two different audiences. They are separated by the conversation_type audience flag, not by user-facing filters or pills.
| Universal Inbox | Chat (left-nav) | |
|---|---|---|
| Audience | external — customer threads only | internal — staff / contractor product threads |
| Channels | Email, WhatsApp, Phone, Web Chat, Social, AI Agents (A2A) | Telegram, aigent DMs, internal system threads |
| API filter | GET /api/inbox/conversations → .neq('conversation_type', 'internal') | GET /api/webhooks/telegram / /api/ai/chat/sessions → .eq('conversation_type', 'internal') |
| User sees | Customer queue, triage labels, confidence bands, action creation | Staff DM list, AI session history, internal notes |
| ADR | ADR-273 (distill doctrine), ADR-280/285/286 (labels + audience) | ADR-286 V309 (staff-thread cutover to conversation_type='internal') |
The conversation_type value is a system audience flag, not a user-facing category. It must never appear as a chip, pill, or filter option in the Universal Inbox UI. The separation between Inbox and Chat is architectural — enforced at the API layer — not a visual badge the user toggles. If you need to explain why a conversation is missing from the Inbox, the answer is "it is an internal staff thread; look in Chat" — not "click the Internal pill."
conversation_type — System Audience Flag (internal | external)
tbl_conversations.conversation_type is a database-level audience discriminator. It is written at ingest time by the channel-specific webhook or cron route, and it is consumed by API queries to decide which product surface (Inbox vs Chat) serves the conversation. It is not editable by users, not displayed in the UI, and not a label.
| Value | Meaning | Written by | Read by |
|---|---|---|---|
external | Customer-facing thread — tenant, landlord, supplier, portal, prospect | /api/cron/gmail-sync, /api/webhooks/voice/*, /api/webhooks/timelines, /api/channels/conversations, /api/conversations/webchat/ingest, /api/ai/chat/sessions | GET /api/inbox/conversations (excludes internal), asset view, AI session list |
internal | Staff / contractor product thread — Telegram DM, aigent session, internal note | /api/webhooks/telegram (staff DM path) | /api/webhooks/telegram (staff routing), /api/ai/chat/sessions (excludes internal) |
The schema comment on conversation_type (V309) reads: "Audience flag: internal = staff/contractor product thread; external = customer thread. Not a content category. Content lives in tbl_conversation_labels." The UI never surfaces this value. There is no "Internal" or "External" chip, no filter dropdown, and no settings toggle. The value exists purely so the backend can route the conversation to the correct product surface.
Chip Colour Single Source of Truth (chip-tokens.ts)
All chip colours in the Universal Inbox are defined in portal/src/lib/ui/chip-tokens.ts. No component may hardcode a chip colour. The palette is designed to be theme-stable (fixed hex values that do not flip with light/dark mode) and semantically unambiguous (channel and category chips never share the same hue).
| Chip Type | Colour Rule | Example | Why |
|---|---|---|---|
| Channel chip | Neutral slate — fixed #f1f5f9 bg, #334155 text, #cbd5e1 border | Email, WhatsApp, Phone, Telegram | Reads as "how this arrived" metadata; visually subordinate to category chips |
| Category chip | Distinct fixed hues per label — see palette below | Enquiries (indigo), Maintenance (amber), Accounts (emerald) | Reads as "what this is about" signal; scannable across the list |
Category Chip Palette (Fixed Hex Values)
| Label | Hex | Tailwind Reference | Usage |
|---|---|---|---|
| Enquiries | #4f46e5 | indigo-600 | Sales + lettings portal leads, genuine customer intent |
| Maintenance | #d97706 | amber-600 | Repairs, boiler, leak, urgent property issues |
| Accounts | #059669 | emerald-600 | Invoices, rent, payments, financial |
| Compliance | #7c3aed | violet-600 | Regulatory, licensing, safety certificates |
| Legal | #6366f1 | indigo-500 | Contracts, disputes, solicitor correspondence |
| HR | #db2777 | pink-600 | Staff scheduling, payroll, internal HR |
| IT | #0891b2 | cyan-600 | Portal tech alerts, system errors, listing sync |
| Marketing | #e11d48 | rose-600 | Newsletters, campaigns, bulk senders |
| Junk | #334155 | slate-700 | Spam, bulk mail, low-priority |
| Unknown / fallback | #64748b | slate-500 | Any label not in the palette above |
Chip colours do not change with light/dark mode. A user learns "Enquiries = indigo" once and recognises it in any theme. The 12% opacity tint background (1f suffix) and 25% opacity border (40 suffix) provide subtle visual weight without relying on theme variables. All combos target ≥ 4.5:1 contrast on white. Do not add theme-dependent chip colours — if a new label needs a colour, add it to chip-tokens.ts as a fixed hex value.
Data Flow — Email Ingest → Label Engine → tbl_conversation_labels
-
1Gmail-sync ingest
Message arrives via
/api/cron/gmail-sync. Distill produces plain text.conversation_typeis set to'external'(customer email thread) — V309 default. -
2Label engine evaluates
evaluateLabel(envelope, rules)insrc/lib/email/label-engine.tsruns Layer 1 (jurisdiction) then Layer 2 (universal) rules fromtbl_triage_rules. First match wins. Enquiries exclusivity drops other candidates. -
3Label row written
Verdict upserts into
tbl_conversation_labelswithassigned_by='rule'(confidence 1.0, zero tokens) orassigned_by='ai'(residue). No match →hitl_needed, no row written, conversation routes to "Not sure" queue. -
4UI renders chips + counts
List rows show category chips from
tbl_conversation_labels. Sidebar counts callGET /api/inbox/label/bulk?org_id=…. Channel chip comes fromchannel. Audience flag filters staff vs customer views at the API layer — never shown as a pill.
Figure: Three-axis model — content, audience, and transport are stored separately. The audience flag routes to Inbox (external) or Chat (internal) at the API layer; it is never rendered as a user pill.
Enquiries Scope Lock — Sales + Lettings Only
ADR-286 D1/D2 locks the Enquiries label to genuine sales/lettings intent. The mailbox prior (enquiries@, lettings@) is demoted from verdict to weak signal — it no longer independently applies the label.
| Scenario | Label | Why |
|---|---|---|
| dominant listing aggregator / incumbent property portal / alternative listings channel / SpareRoom / OpenRent enquiry, viewing, application, offer | Enquiries | Genuine sales/lettings intent |
| Portal tech alert — "photos not uploading", "system error", "listing alert" | IT | Portal system notification, not a customer enquiry |
| Gumtree ad, newsletter, saved-search digest arriving at enquiries@ | Junk | Negative rule priority 4 catches bulk/marketing |
| Enquiries + any back-office label (IT, Compliance, Legal, HR, Marketing) | Invalid | Engine drops all other candidates when Enquiries wins |
Re-running the Label Backfill (Staff API)
The one-shot backfill route populates labels for historical email conversations that have none. It uses the same mechanical engine as live ingest — no Gmail re-download, no AI spend on the mechanical slice.
POST /api/admin/inbox/label-backfill
Content-Type: application/json
Authorization: *** session>
{
"org_id": "optional — omit for all orgs",
"limit": 500
}
→ Response: { processed: N, labelled: N, skipped_hitl: N, skipped_already: N }
- Max 500 conversations per call; rate-limited to prevent runaway writes.
- Skips conversations that already have at least one label.
- Never overwrites
assigned_by='manual'rows (M1 immutability). hitl_neededverdicts are silently skipped — no row written.- Gate: T1 golden-set CI gate (170-row fixture) must pass before production backfill writes.
Migration Timeline — V307 + V309
| Migration | Date | Change | ADR |
|---|---|---|---|
V286 | 2026-07-30 | tbl_conversation_labels created (zero rows initially) | ADR-280 |
V307 | 2026-07-31 | CHECK hardening: assigned_by gains 'rule'; label CHECK gains 'Junk'; covering index (label, conversation_id) | ADR-285 |
V308a | 2026-07-31 | thread_kind column added (routing axis) | ADR-286 |
V309 | 2026-08-01 | conversation_type repurposed: old 16 values → internal | external; COMMENT ON COLUMN; partial index | ADR-286 (amended) |
- ADR-273 — Universal Inbox distill doctrine (parent)
- ADR-267 — Jurisdiction-aware triage rules (rules engine shape)
- ADR-280 — Mechanical content labels + org email migration (DA1–DA4 delta)
- ADR-285 — Conversation label SSOT phased retirement (amended: repurpose not drop)
- ADR-286 — Enquiries scope lock +
thread_kind(amended: V309 repurpose) - Briefs:
architect-mechanical-labels-org-email-migration-2026-07-30.md,architect-inbox-label-ssot-schema-2026-07-31.md,architect-conversation-type-internal-external-2026-07-31.md,architect-mechanical-labels-DA1-DA4-delta-2026-07-31.md - Migrations:
V307__conversation_labels_ssot_hardening.sql,V309__conversation_type_internal_external.sql - Code:
portal/src/lib/email/label-engine.ts,portal/src/app/api/cron/gmail-sync/route.ts,portal/src/app/api/inbox/label/bulk/route.ts,portal/src/app/api/admin/inbox/label-backfill/route.ts,portal/src/lib/ui/chip-tokens.ts
References
- Ng — workflow/topology framing for the confidence fan-out (chain → bands); conceptual footnote only, not deployable
- Kopadze — deterministic gates over probabilistic display paths
- wandermist — golden-set evaluation methodology for gated automation
- leopardracer — HITL queue patterns for uncertain classification