chronogrid/docs/WORKFLOWS/01-master-user-story.md

2.9 KiB

Master User Story: Distributed, Local-First Productivity Engine

Canonical Reference: docs/ARCHITECTURE/04-master-user-story.md

This document provides workflow-level summaries of the three primary execution domains. For full acceptance criteria and technical specifications, refer to the canonical master user story document above.


1. Multi-Domain Ingestion Workflows

The system automatically captures inputs from multiple distinct channels without requiring manual task entry:

  • IMAP Email Ingestion: Background daemon polls personal, engineering, and commercial IMAP accounts over TLS. Flagged emails or messages forwarded to internal parse addresses are extracted as Markdown notes with linked tasks.
  • Global Desktop Jots: System-wide hotkeys (Windows/Linux) invoke a lightweight command palette for instant plain-text jots. Android home-screen widgets and Share Intent receivers forward text, URLs, and voice notes.
  • Local File Watchers: Background filesystem watchers monitor dedicated folders. Markdown files with - [ ] checkboxes automatically parse into tasks. PDFs and design briefs parse into linked project notes.
  • AI Processing Pipeline: All raw inputs pass through the local NLP engine (regex + optional Ollama LLM) for namespace routing, task/note splitting, date extraction, and Eisenhower priority scoring.

2. Serverless P2P CRDT Synchronization

Data state changes are tracked via Hybrid Logical Clocks (HLC) and append-only CRDT deltas:

  • Local-First: All data is written to the local SQLCipher database first. The app is fully functional offline.
  • Peer Discovery: Nodes discover each other on LAN via mDNS (zero-config) and across WAN via libp2p Kademlia DHT with NAT hole-punching.
  • Delta Sync: On reconnection, peers exchange vector clocks, compute missing deltas, compress and encrypt them, and stream over QUIC/Noise XK channels.
  • Convergence: Automerge CRDT deterministic merge guarantees eventual consistency across all personal nodes (Windows, Android, Headless Server) without central server coordination.

3. Multi-View Display Execution

The Flutter presentation layer renders local database state into four specialized execution environments:

  • Eisenhower Priority Matrix: Four-quadrant board auto-populated by computed urgency-importance scores. Tasks automatically migrate between quadrants as deadlines approach.
  • Calendar Time-Blocking Grid: Drag-and-drop scheduling grid with CalDAV overlay for external calendar integration. Tasks reserve focus blocks with real-time duration adjustment.
  • Kanban / Gantt Views: Status-column Kanban board with swimlane grouping; interactive Gantt timeline with critical path highlighting and fractional sub-task nesting.
  • Notes & Knowledge Workspace: Rich Markdown editor with bidirectional task linking, project tree navigation, and Daily Jots aggregation.