06 / UNDER THE HOOD
One Record, Many Views: Wawa's Work-Item Model
Wawa turns WhatsApp conversations into work items. The code is on GitHub. The decision gate post covers when analysis runs. This one covers what the analysis produces.
Early on everything was a task with a done tick. That shape doesn’t fit much of what’s in a chat. A status screenshot isn’t work. A question someone asks me is finished when I answer it, not when I do something. A meeting isn’t finished at all, it just happens. And a question I ask someone else isn’t a question I owe anyone an answer to.
Each of these looked like a reason to add a type. I didn’t want a “Waiting task” type, a “Dated task” type and a “Someday task” type, so I wrote down which facts are actually separate.
Six facts, one record
The design doc borrows from GTD (workflow map, key definitions), but the categories are mine. Its core rule is that kind, state and view are different things:
- Kind is what the outcome is: task, action, question, reminder, event or reference.
- Lifecycle is whether that outcome is open, resolved, dismissed or cancelled. The wording depends on kind: a question is answered, a task or action is completed, a reminder is dismissed.
- Readiness is why open work can or can’t move now: ready, needs clarification, waiting for someone, or deferred. “Waiting does not mean done.”
- Commitment is active or Someday/Maybe. “An uncommitted idea is not an overdue task.” A committed task deferred to a known date is still a commitment.
- Time is a property, not a kind. An action, question, reminder or event can all have a date.
- Grouping is project, area and recurrence. A project groups related outcomes. An area is an ongoing responsibility that never finishes. Recurrence belongs to an action or task, and finishing this week’s occurrence doesn’t finish next week’s.
The doc’s own example: “an open task can be waiting for an answer, have a due date, and belong to a project. Those facts do not make it four tasks.”
The kinds are a closed enum in the shared schema:
export const ItemKindSchema = z.enum([
'task', 'action', 'question', 'reminder', 'event', 'reference',
]);
Everything else hangs off the item as properties. Commitment, project, area, times and recurrence live in one gtd object:
export const GtdSchema = z.object({
commitment: z.enum(['active', 'someday']).default('active'),
project: z.string().trim().min(1).max(200).nullable().default(null),
area: z.string().trim().min(1).max(200).nullable().default(null),
times: z.array(z.object({
kind: z.enum(['due', 'scheduled', 'revisit']),
text: z.string().trim().min(1).max(200),
date: z.iso.date().nullable(),
})).max(6).default([]),
recurrence: z.object({ ... }).nullable().default(null),
});
A time keeps its original text next to a nullable date. The rule is to keep what the source said, at a time, by a deadline, on a date, or revisit after a date, and never invent an hour, year, timezone or deadline. “Meeting Tuesday at 10” with no known timezone stays as those words until I add a date myself.
Views are queries, not copies
Upcoming, Someday/Maybe, Projects and Areas are ways of looking at the same item records. Waiting For shows separate wait records, and Review can show both items and waits. An active item can show up in Upcoming because it has a time entry or recurrence, without creating a second item. Totals don’t count it twice.
Upcoming is a small function over the record:
export function isUpcoming(item: Pick<Task, 'kind' | 'gtd'>, today = localDate()) {
if (item.gtd.commitment !== 'active') return false;
if (item.gtd.recurrence) return true;
return item.gtd.times.some(
(time) => item.kind !== 'event' || time.date === null || time.date >= today,
);
}
Someday items never appear there. An event whose dated times are all in the past drops out of Upcoming unless it has recurrence or an undated time; it isn’t archived, and a date passing never marks anything done. Review isn’t a kind either. It’s where uncertain evidence waits for me.
Waiting For is its own record
Waits are the exception: they’re stored separately, with an optional link to an item. A wait has its own small lifecycle:
export const WaitStateSchema = z.enum(['waiting', 'received', 'dismissed']);
Three rules make it work.
A model-proposed wait needs my outgoing request as evidence. The triage prompt says so, and the store enforces it for proposals. A manually created wait can have no source messages. A proposed wait whose sources don’t include an outgoing message from one conversation is rejected:
!sources.some((source) => source?.direction === 'outgoing')
// -> 'A proposed wait needs an outgoing request in one conversation'
An incoming request to me is an action or question, not a wait. An outgoing message alone also isn’t enough: the doc notes it “does not establish that every recipient owes a response”.
Receiving the reply does not complete the linked task. The doc’s illustrative case: I’m investigating something, I asked a colleague for a PDF, and the colleague sends it. The wait becomes received. The investigation stays open, and maybe now has a next action. Automatic receipt is narrow too. It only fires for an incoming, non-empty message that is a WhatsApp reply to my original request, and only when the wait has no manual state and isn’t already under review. Anything looser goes to Review. Rejected replies are remembered so the same message isn’t suggested again.
Questions I asked other people are waits, not Questions. The Questions view is only for things I need to answer. If I ask someone something and it’s clearly outstanding, it goes in Waiting For. If it’s already answered, no wait is created.
How the model fills it
The triage model gets the conversation, screenshot readings and existing items, and returns two arrays: changes (items) and waits. Each change carries a kind, source_ids, and a triage_state of ready, needs_info, waiting or reported_done.
The prompt’s rules come down to four:
- One item per outcome. A message can produce zero, one or several items, and several messages can support one item. The doc’s illustrative case is a project-status screenshot with a status update and a separate question: potentially a reminder and a question, with the question’s recipient confirmed, not assumed.
- Source links on everything. Every item cites exact message IDs. An AI-written title or action list never counts as proof that anyone asked for the work.
- Text in a screenshot isn’t addressed to me by default. “You” in a forwarded report may mean its original reader.
- Owner corrections win. Kinds live in their own table with a
manualflag. A later category review can change a kind the model chose, but the update is guarded byWHERE item_kinds.manual=0, so it can’t overwrite a kind I set by hand. Automatic completion refuses reminders, events and references, recurring or Someday items, and items with a pending category suggestion. Merged items keep their old IDs as redirects, so the model can’t bring back a task I folded into another.
That last part came from two earlier commits, “Add stable TODO references and persistent task links” and “Add manual TODO merges with evidence and link preservation”. Every item gets a TODO-123 style reference that survives reclassification and merges. That made “correct it, don’t recreate it” possible.
What’s implemented and what isn’t
The doc has an “Implementation and limits” section, and the model is ahead of the code in places.
| Concept | Intended | Implemented now |
|---|---|---|
| Lifecycle | open / resolved / dismissed / cancelled | one done flag, labelled per kind (Completed, Answered, Dismissed) |
| Readiness | ready, needs clarification, waiting, deferred | triage_state: ready, needs_info, waiting, reported_done |
| Time | at / by / on / revisit after | due, scheduled, revisit; source dates stay in the note, I add structured dates |
| Projects, areas | groupings | plain name strings, no hierarchy |
| Wait follow-up | optional owner-set date | not yet |
| Action under task | next step of a task | no direct parent link yet |
There’s no external calendar, no notifications, and Wawa never sends a message. The decision connection checks proposed kinds, waits, replies and completion evidence, and uncertain results go to Review. Its scores aren’t calibrated, and I haven’t evaluated accuracy against a labelled set. The doc says to do that before making any accuracy claims, so I’m not making any.
Trade-offs
- More fields, more ways to be wrong. The model now picks a kind and a readiness. Each is a separate place to make a mistake, but each mistake is smaller and I can fix it without touching the others.
- Waits are a second table. Linking a wait to an item is an extra join and another state machine. In return, receiving a document can’t silently tick off an investigation.
- Keeping the source’s wording costs convenience. “Friday” stays “Friday” in the note until I set a date. Upcoming shows less than it could. What it does show is real.
- Done is still one boolean. Kind-specific labels cover most of the gap, and there is no separate stored “cancelled” lifecycle state.
The rule I’d keep: if a label describes when, why or where, it’s a property or a view. A new kind is only for a different outcome.