Technical Specification — v1.0

Lifeline

A conversation-intelligence system that extracts commitments, follow-ups, and reminders from personal conversations, ranks them with a learned importance model, auto-detects completion via external signals, and surfaces them in an adaptive iOS app.

1. Problem Statement

The user maintains ongoing conversations with a small set of important people (spouse, close friends, family) across iMessage, WhatsApp, and email. These threads contain implicit commitments, promises, purchase requests, reading recommendations, and event reminders that get buried in message history and are frequently forgotten.

No existing system does all of the following:

  1. Extracts these items automatically from casual conversation — not formal task language
  2. Learns what actually matters to this specific user, rather than applying static rules
  3. Detects when an item has already been resolved using external data (email, calendar) without requiring manual check-off
  4. Presents the result in a UI that adapts to context rather than a fixed dashboard layout

2. Scope

3. Data Sources & Access

SourcePurposeAccess MethodiOS Constraint
iMessage Primary extraction source Local Messages DB export or manual sync No public API — requires on-device parsing or user-driven export
WhatsApp Extraction source Business API or chat export No native read API on iOS
Gmail (full inbox) Extraction, context, and completion signals — not receipts-only Gmail API, OAuth 2.0 read-only User authorization required; primary integration point
Google Calendar Event/deadline context, RSVP status, birthdays Calendar API, OAuth 2.0 Treated as first-class source — user's life runs through Google
Contacts Relationship metadata, name resolution iOS Contacts framework Available
Call log Detect "call so-and-so" completions CallKit / CoreTelephony Heavily restricted — v2, manual fallback for MVP
Location / Photos / Screen Time Considered Blocked by Apple privacy model — excluded from MVP
Design principle: Gmail is not "receipts only." Every email is a candidate for extraction and completion-signal matching. The importance-ranking engine (Section 6) filters signal from noise — this is not solved by scoping the data source down, it's solved by scoping the model up.

4. System Architecture

┌─────────────────────────────────────────────────────────────┐ │ INGESTION │ │ iMessage export · WhatsApp export · Gmail API · GCal API │ └──────────────────────────┬────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────┐ │ EXTRACTION LAYER (LLM-based classification) │ │ → structured items: {type, sender, text, entities, dates} │ └──────────────────────────┬────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────┐ │ IMPORTANCE / LEARNING ENGINE │ │ → scores each item; assigns interruption level │ │ → detects avoidance vs. deprioritization patterns │ └──────────────────────────┬────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────┐ │ COMPLETION DETECTION ENGINE │ │ → watches Gmail/Calendar for signals matching open items │ │ → auto-closes high-confidence matches, flags fuzzy ones │ └──────────────────────────┬────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────┐ │ LOCAL STORE (on-device database) │ └──────────────────────────┬────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────┐ │ iOS APP (adaptive presentation layer) │ └─────────────────────────────────────────────────────────────┘

5. Extraction Pipeline

Input: raw message/email text plus metadata (sender, timestamp, thread ID).

Classification Taxonomy

TypeExampleNotes
purchase"I want that bag"Entity = product/item name
event"Grandma's 80th is in 3 weeks"Entity = date; requires relative → absolute normalization
promise"I'll get the hoop for his birthday"Entity = commitment, implied deadline
followup"Did you look at that paper I sent?"Links back to earlier extracted item if possible
reading"Found this article, you'd love it"Entity = link/title if present
questionAnything requiring a direct replyLowest complexity, highest frequency

Output Schema Per Item

{
  "id": "uuid",
  "source": "imessage|whatsapp|gmail",
  "thread_id": "string",
  "person": "string",
  "timestamp": "ISO-8601",
  "type": "purchase|event|promise|followup|reading|question",
  "raw_text": "string",
  "entities": { "item": "string|null", "date": "ISO-8601|null", "link": "string|null" },
  "suggested_action": "string (LLM-generated, e.g. 'Buy the bag by Friday')",
  "suggested_reply": "string|null (LLM-drafted response, optional per user config)",
  "status": "pending|completed|snoozed|dismissed",
  "created_at": "ISO-8601"
}

Re-extraction should run incrementally on new messages only — not re-process full history each time.

6. Importance Ranking / Learning Engine

This is the core differentiator and should be treated as first-class, not a stretch feature.

6.1 Interruption Levels

Modeled on Apple's notification framework:

6.2 Signals Feeding the Importance Score

A weighted, multi-signal model — not a single rule:

6.3 Avoidance vs. Deprioritization

The system must distinguish "the user is avoiding this" from "the user genuinely doesn't care," because they require opposite responses — surface more insistently, versus stop surfacing entirely.

SignalReads as AvoidanceReads as Deprioritization
View countOpened repeatedly (3+), no actionOpened once, never revisited
Deadline proximity effectAction clusters right before deadline (anxiety-driven relief-seeking)No deadline effect — never acted on, regardless of timing
Cross-context comparisonUser acts quickly on other items from the same sender, stalls specifically on this oneUser consistently ignores this type of item regardless of sender
Task emotional weightItem requires confrontation, a call, or a decision with social stakesItem is low-stakes but simply not relevant right now
Tone matters: when avoidance is detected, escalate visibility gently — do not spam, and do not assume failure. When deprioritization is detected, decay that sender/type's weight for future ranking — this is the actual learning step.

6.4 Time-of-Day Awareness

Circadian/attention research indicates people are more accurate on analytical, novel tasks in mid-morning — and morning check-in is the user's stated primary usage window. Weight the morning briefing toward decision-requiring items (Time-Sensitive, Active); hold Passive items for whenever the user has idle time.

7. Completion Detection Engine

Goal: close the loop without requiring manual mark-done, using Gmail and Calendar as primary evidence.

  1. Background job polls Gmail/Calendar for new data
  2. For each pending item, attempt to match new data against it (entity match: item name, person, date, amount)
  3. High-confidence match (exact product name in a receipt, calendar event confirmed past with no cancellation) → auto-close, notify with a positive message, log which signal closed it
  4. Low-confidence match (fuzzy name, ambiguous timing) → do not auto-close; surface as "possible match, confirm?"
  5. No signal found → item remains in its current state, subject to re-ranking over time

Manual override is always available. A manual close also feeds the learning engine — it tells the system this item type doesn't reliably produce an external signal, and future similar items should weight manual-confirmation patterns accordingly.

8. UI/UX Requirements

8.1 Presentation Philosophy — Adaptive, Not Fixed

Per Contextual Adaptive Visualization Environment (CAVE) research (Bai, White & Sundaram, 2012): the interface should sense and respond to changes in problem, purpose, and user context rather than presenting one static dashboard layout.

8.2 Core Views

8.3 Interaction Requirements

8.4 Notification Model

Modeled on Apple's own approach: interruption levels map directly to push urgency (Time-Sensitive can break through Focus/DND-equivalent states; Passive items never push, they only appear in-app). Batch Passive items into a single periodic summary notification rather than one-per-item.

9. Tech Stack Recommendation

10. Build Milestones

Dependency-ordered, not time-boxed. Each milestone should be independently testable against real (or realistic sample) data before moving to the next.

1Data model + local store — schema from Section 5, on-device DB.
2Extraction pipeline — ingest sample exports (iMessage/WhatsApp/Gmail), run LLM classification, produce structured items.
3Gmail + Calendar OAuth integration — read access, polling.
4Importance ranking engine v1 — rule-weighted scoring per Section 6.2, static weights, no learning loop yet.
5Completion detection v1 — high-confidence auto-match only; fuzzy matching deferred.
6iOS app v1 — Today/Threads/History views, adaptive grouping per Section 8.
7Learning loop — feed behavior (response latency, view counts, manual overrides) back into ranking weights; implement avoidance-vs-deprioritization heuristics from Section 6.3.
8Fuzzy completion matching — confirm-to-close flow.
9Notification system — interruption-level-based push, Passive batching.

11. Open Decisions

12. Privacy & Security