feat: signal source abstraction — generalize beyond Todoist #78

Closed
opened 2026-04-16 15:25:11 +00:00 by alvis · 0 comments
Owner

Motivation

Currently the recommender is hard-wired to Todoist. To support Google Calendar, Apple Health, manual input, and AI-generated advice, we need a SignalSource interface that normalizes heterogeneous data into a common signal stream.

Design

interface SignalSource {
  id: string;                    // e.g. 'todoist', 'google-calendar', 'manual'
  fetchSignals(userId: string): Promise<Signal[]>;
  act?(userId: string, signalId: string, action: string): Promise<void>;
}

interface Signal {
  id: string;
  source: string;
  kind: 'task' | 'event' | 'habit' | 'insight';
  content: string;
  metadata: Record<string, unknown>;
  features: Record<string, number | boolean>;
  timestamp: string;
}

Tasks

  • Define SignalSource interface in packages/shared-types
  • Refactor Todoist fetcher to implement SignalSource
  • Create SignalAggregator that merges signals from all connected sources
  • Update recommender to consume Signal[] instead of CachedTask[]
  • ADR for signal normalization strategy
## Motivation Currently the recommender is hard-wired to Todoist. To support Google Calendar, Apple Health, manual input, and AI-generated advice, we need a `SignalSource` interface that normalizes heterogeneous data into a common signal stream. ## Design ```typescript interface SignalSource { id: string; // e.g. 'todoist', 'google-calendar', 'manual' fetchSignals(userId: string): Promise<Signal[]>; act?(userId: string, signalId: string, action: string): Promise<void>; } interface Signal { id: string; source: string; kind: 'task' | 'event' | 'habit' | 'insight'; content: string; metadata: Record<string, unknown>; features: Record<string, number | boolean>; timestamp: string; } ``` ## Tasks - [ ] Define `SignalSource` interface in `packages/shared-types` - [ ] Refactor Todoist fetcher to implement `SignalSource` - [ ] Create `SignalAggregator` that merges signals from all connected sources - [ ] Update recommender to consume `Signal[]` instead of `CachedTask[]` - [ ] ADR for signal normalization strategy
alvis added this to the M2 — AI tips + multi-source signals milestone 2026-04-16 15:25:11 +00:00
alvis closed this issue 2026-04-25 17:15:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alvis/oO#78