YAS/yetanothersuite_implementation_plan.json
YetAnotherSuite Dev 262fbf48e2 feat: Phase 1 foundation — monorepo, auth, DB schema, API, shared packages
Phase 1.1: Monorepo Setup & Design System
- Turborepo + pnpm workspaces monorepo structure
- Shared packages: @yetanother/types, @yetanother/utils, @yetanother/hooks, @yetanother/ui, @yetanother/db
- Radix UI primitives with custom shadcn/ui-style components (Button, Dialog, Toast, Tooltip, Tabs, Label)
- Tailwind CSS v4 with design tokens (light theme)
- TypeScript strict mode with composite project references

Phase 1.2: Authentication & User Management
- Fastify server setup with JWT auth (register, login, me endpoints)
- @fastify/jwt with cookie support
- User and workspace models with Prisma ORM

Phase 1.3: Database Schema & Migrations
- Full Prisma schema: User, Workspace, Node, NodeLink, Tag,
  Folder, Reminder, Embedding, Activity, Attachment,
  WorkspaceMember, SyncCheckpoint
- pgvector extension for embeddings (vector(1536))
- Seed script for dev data
- Comprehensive indexes (GIN, BRIN, B-tree)

Phase 1.4: API Foundation & Middleware
- Fastify REST API with versioned routes (/api/v1)
- Zod request validation on all endpoints
- CORS, Helmet security headers, rate limiting
- Structured logging with pino-pretty
- Swagger/OpenAPI docs at /docs
- WebSocket support (collaboration ready)
- CRUD routes: nodes, workspaces, search, auth

Tooling:
- ESLint 9 flat config with TypeScript parser
- Prettier with consistent formatting rules
- Turbo v2 task orchestration
- GitHub Actions CI workflow
- Husky + lint-staged pre-commit hooks
2026-07-20 21:58:17 +02:00

1575 lines
61 KiB
JSON

{
"project": {
"name": "YetAnotherSuite",
"tagline": "The Unified Productivity Ecosystem \u2014 Todo, Calendar, and Notes, Connected by AI",
"type": "Interactive Web Application (PWA + Desktop + Mobile)",
"target_platform": "Web (PWA), Desktop (Electron/Tauri), Mobile (React Native)",
"development_phases": 6,
"estimated_timeline": "24-28 weeks"
},
"core_concept": {
"vision": "A unified workspace where tasks, events, and knowledge naturally interconnect. No more context switching between apps \u2014 your todos appear in your calendar, your notes link to your tasks, and AI surfaces the right information at the right time.",
"problem_statement": "Current productivity stacks are fragmented: todos in one app, calendar in another, notes in a third. Users lose context, duplicate effort, and miss connections between their work. YetAnotherSuite eliminates fragmentation by treating tasks, events, and notes as interconnected nodes in a personal knowledge and action graph.",
"differentiation": [
"Unified data model \u2014 tasks, events, and notes share a single graph structure",
"AI-powered cross-modal linking (e.g., 'this note relates to this meeting and these tasks')",
"Contextual workspace switching \u2014 calendar view shows relevant notes, task view shows upcoming deadlines",
"Natural language input across all modules ('Schedule meeting with Sarah next Tuesday and create prep notes')",
"Local-first with seamless cloud sync \u2014 works offline, syncs when connected",
"Time-blocking integration \u2014 drag tasks directly onto calendar as time blocks",
"Bi-directional references \u2014 tasks reference notes, notes reference events, events link to tasks"
],
"target_users": [
"Knowledge workers managing complex projects",
"Executives and managers coordinating teams",
"Researchers and academics with time-bound deliverables",
"Freelancers juggling multiple clients and deadlines",
"Students managing coursework and research"
],
"competitive_positioning": "Notion (notes) + Todoist (tasks) + Google Calendar (events) = 3 apps, 3 contexts, 3 syncs. YetAnotherSuite = 1 app, 1 context, 1 sync, with AI connecting everything."
},
"architecture": {
"frontend": {
"framework": "React 18+ with TypeScript (strict mode)",
"state_management": "Zustand (global) + TanStack Query (server state) + Jotai (local UI)",
"editor_engine": "TipTap / ProseMirror (block-based, extensible)",
"calendar_engine": "Custom React components + date-fns + rrule for recurrence",
"styling": "Tailwind CSS + Radix UI primitives + shadcn/ui components",
"realtime_collaboration": "Yjs (CRDT) for all modules",
"build_tool": "Vite + Turborepo (monorepo)",
"desktop_wrapper": "Tauri (Rust-based, lightweight, secure)",
"mobile": "React Native (shared business logic via React Native Web)",
"testing": "Vitest + React Testing Library + Playwright + MSW (API mocking)"
},
"backend": {
"api_gateway": "Node.js + Fastify (or Go + Gin for performance-critical paths)",
"database": "PostgreSQL 15+ (primary) with JSONB for flexible content",
"caching": "Redis (sessions, hot data, rate limiting)",
"search": "Meilisearch (instant) + pgvector (semantic) \u2014 hybrid search",
"realtime": "WebSocket server (Socket.io or native WS with Redis adapter)",
"queue": "BullMQ (Redis-based) for background jobs (AI processing, sync, exports)",
"ai_services": "OpenAI/Anthropic API + local fallback (Ollama) + self-hosted embeddings",
"file_storage": "S3-compatible (MinIO for self-hosting) + CDN for assets",
"vector_database": "pgvector (PostgreSQL extension) for semantic search and recommendations",
"sync_engine": "Custom sync protocol (based on CRDTs + operational transforms) for offline-first"
},
"infrastructure": {
"containerization": "Docker + Docker Compose (dev) + Kubernetes (production)",
"orchestration": "Helm charts for K8s deployment",
"ci_cd": "GitHub Actions with matrix builds (Web, Desktop, Mobile)",
"monitoring": "Prometheus + Grafana (metrics) + Sentry (errors) + LogRocket (session replay)",
"deployment": "Railway/Render (MVP) \u2192 AWS/GCP (scale) with Terraform",
"cdn": "Cloudflare (global edge caching)",
"backup": "Automated PostgreSQL backups + S3 versioning"
}
},
"unified_data_model": {
"philosophy": "All entities (tasks, events, notes) are 'Nodes' in a unified graph. They share common properties (title, content, timestamps, metadata) but have type-specific extensions. Relationships are first-class citizens.",
"core_entities": [
{
"entity": "User",
"fields": [
"id (UUID PK)",
"email (unique, indexed)",
"display_name",
"avatar_url",
"preferences (JSONB: theme, timezone, notification_settings, default_views)",
"encryption_key (for E2E encrypted notes)",
"created_at",
"updated_at",
"last_active_at"
],
"relations": [
"Workspaces (many-to-many via WorkspaceMember)",
"Nodes (one-to-many, owned)",
"SharedNodes (many-to-many via NodeShare)",
"Activities (one-to-many)"
]
},
{
"entity": "Workspace",
"fields": [
"id (UUID PK)",
"name",
"slug (unique per user)",
"description",
"settings (JSONB: default_view, color_scheme, ai_enabled, retention_policy)",
"owner_id (FK \u2192 User)",
"created_at",
"updated_at"
],
"relations": [
"Members (many-to-many via WorkspaceMember)",
"Nodes (one-to-many)",
"Tags (one-to-many, workspace-scoped)",
"Folders (one-to-many, workspace-scoped)",
"Integrations (one-to-many)"
]
},
{
"entity": "Node (Polymorphic Base)",
"fields": [
"id (UUID PK)",
"type (ENUM: 'task', 'event', 'note', 'project', 'goal')",
"workspace_id (FK \u2192 Workspace)",
"owner_id (FK \u2192 User)",
"parent_id (FK \u2192 Node, self-referencing for hierarchy)",
"title",
"content (JSONB: ProseMirror doc for notes, structured data for tasks/events)",
"plain_text (generated, for search)",
"status (ENUM: 'active', 'archived', 'deleted')",
"priority (INTEGER: 1-5, nullable)",
"start_time (TIMESTAMPTZ, for events and task deadlines)",
"end_time (TIMESTAMPTZ, for events and task durations)",
"duration_minutes (INTEGER, computed or explicit)",
"recurrence_rule (TEXT, iCal RRULE format)",
"completion_rate (DECIMAL, for projects/goals)",
"metadata (JSONB: type-specific data)",
"version (INTEGER, for optimistic locking)",
"is_encrypted (BOOLEAN, for E2E notes)",
"created_at",
"updated_at",
"completed_at",
"archived_at"
],
"relations": [
"Parent (self-referencing)",
"Children (self-referencing)",
"Tags (many-to-many via NodeTag)",
"Links (many-to-many via NodeLink, self-referencing)",
"Backlinks (many-to-many via NodeLink, inverse)",
"Embeddings (one-to-many)",
"Activities (one-to-many)",
"Reminders (one-to-many)",
"Attachments (one-to-many)"
],
"indexes": [
"GIN on content (JSONB)",
"GIN on metadata (JSONB)",
"B-tree on type, status, workspace_id, owner_id",
"BRIN on created_at (time-series optimization)",
"GIST on tsvector (full-text search)"
]
},
{
"entity": "NodeLink (Relationship Graph)",
"fields": [
"id (UUID PK)",
"source_id (FK \u2192 Node)",
"target_id (FK \u2192 Node)",
"link_type (ENUM: 'references', 'blocks', 'relates_to', 'parent_of', 'child_of', 'scheduled_as', 'prepared_for')",
"strength (DECIMAL: 0-1, AI-computed relevance)",
"is_auto (BOOLEAN, AI-generated vs user-created)",
"context (TEXT, why they're related)",
"created_at"
],
"constraints": [
"UNIQUE(source_id, target_id, link_type)",
"CHECK(source_id != target_id)"
],
"indexes": [
"B-tree on source_id, target_id",
"B-tree on link_type, is_auto"
]
},
{
"entity": "Tag",
"fields": [
"id (UUID PK)",
"name",
"color (HEX)",
"workspace_id (FK \u2192 Workspace)",
"is_system (BOOLEAN, e.g., 'urgent', 'meeting')",
"created_at"
],
"relations": [
"Nodes (many-to-many via NodeTag)",
"Workspace (many-to-one)"
]
},
{
"entity": "Folder",
"fields": [
"id (UUID PK)",
"name",
"workspace_id (FK \u2192 Workspace)",
"parent_id (FK \u2192 Folder, self-referencing)",
"view_type (ENUM: 'list', 'board', 'calendar', 'gallery')",
"filter_config (JSONB: saved filters)",
"sort_config (JSONB: default sort)",
"order_index (INTEGER)",
"created_at"
],
"relations": [
"Nodes (many-to-many via NodeFolder)",
"Parent (self-referencing)",
"Children (self-referencing)"
]
},
{
"entity": "Reminder",
"fields": [
"id (UUID PK)",
"node_id (FK \u2192 Node)",
"user_id (FK \u2192 User)",
"remind_at (TIMESTAMPTZ)",
"notification_type (ENUM: 'push', 'email', 'sms', 'in_app')",
"status (ENUM: 'pending', 'sent', 'dismissed', 'snoozed')",
"snooze_until (TIMESTAMPTZ)",
"created_at"
]
},
{
"entity": "Embedding",
"fields": [
"id (UUID PK)",
"node_id (FK \u2192 Node)",
"chunk_index (INTEGER, for long content)",
"chunk_text (TEXT, the text segment)",
"vector (VECTOR(1536), pgvector)",
"model_version (TEXT, e.g., 'text-embedding-3-large-v1')",
"created_at"
],
"indexes": [
"HNSW index on vector (for fast similarity search)"
]
},
{
"entity": "Activity",
"fields": [
"id (UUID PK)",
"user_id (FK \u2192 User)",
"node_id (FK \u2192 Node, nullable)",
"workspace_id (FK \u2192 Workspace)",
"action_type (ENUM: 'created', 'updated', 'deleted', 'viewed', 'shared', 'linked', 'completed', 'ai_assisted')",
"metadata (JSONB: before/after snapshots, AI prompt used, etc.)",
"session_id (TEXT, for grouping)",
"created_at"
],
"indexes": [
"BRIN on created_at",
"B-tree on user_id, workspace_id, action_type"
]
},
{
"entity": "Attachment",
"fields": [
"id (UUID PK)",
"node_id (FK \u2192 Node)",
"filename",
"mime_type",
"size_bytes",
"storage_key (S3 path)",
"thumbnail_key (S3 path, for images)",
"uploaded_by (FK \u2192 User)",
"created_at"
]
},
{
"entity": "WorkspaceMember",
"fields": [
"id (UUID PK)",
"workspace_id (FK \u2192 Workspace)",
"user_id (FK \u2192 User)",
"role (ENUM: 'owner', 'admin', 'editor', 'viewer')",
"permissions (JSONB: granular overrides)",
"joined_at",
"last_accessed_at"
]
},
{
"entity": "SyncCheckpoint",
"fields": [
"id (UUID PK)",
"user_id (FK \u2192 User)",
"device_id (TEXT)",
"last_sync_at (TIMESTAMPTZ)",
"sync_token (TEXT, for delta sync)",
"device_info (JSONB: os, app_version, screen_size)",
"updated_at"
]
}
]
},
"modules": {
"todo_module": {
"name": "Tasks",
"description": "Full-featured task management with projects, subtasks, and time estimates",
"core_views": [
{
"name": "Inbox",
"description": "Uncategorized tasks, quick capture"
},
{
"name": "Today",
"description": "Tasks due today + scheduled events"
},
{
"name": "Upcoming",
"description": "Calendar-integrated task timeline"
},
{
"name": "Projects",
"description": "Hierarchical project boards with progress"
},
{
"name": "Anytime",
"description": "Tasks without specific deadlines"
},
{
"name": "Completed",
"description": "Archive with search and restore"
}
],
"features": [
"Quick capture with natural language ('Buy milk tomorrow morning')",
"Subtasks and checklists within tasks",
"Priority levels (P1-P4) with visual urgency indicators",
"Time estimates and actual time tracking",
"Recurring tasks with flexible patterns",
"Drag-and-drop reordering and nesting",
"Batch operations (complete, reschedule, tag, assign)",
"Focus mode (Pomodoro integration with task context)"
]
},
"calendar_module": {
"name": "Calendar",
"description": "Time-blocking calendar with task integration and smart scheduling",
"core_views": [
{
"name": "Day",
"description": "Hour-by-hour with task slots"
},
{
"name": "Week",
"description": "Standard work week view"
},
{
"name": "Month",
"description": "Overview with density indicators"
},
{
"name": "Year",
"description": "Long-term planning with goals"
},
{
"name": "Schedule",
"description": "List view of upcoming events"
},
{
"name": "Availability",
"description": "Shareable free/busy slots"
}
],
"features": [
"Drag tasks from todo list onto calendar as time blocks",
"Smart scheduling suggestions ('You have 2 hours free Thursday afternoon')",
"Recurring events with complex patterns (bi-weekly, nth weekday)",
"Multiple calendar layers (work, personal, shared)",
"External calendar sync (Google, Outlook, Apple iCal)",
"Meeting prep auto-linking (find relevant notes for upcoming meetings)",
"Travel time buffers and location-based reminders",
"Focus time protection (auto-block deep work sessions)"
]
},
"notes_module": {
"name": "Notes",
"description": "AI-native note-taking with bidirectional linking and knowledge graph",
"core_views": [
{
"name": "All Notes",
"description": "Chronological list with search"
},
{
"name": "Graph",
"description": "Visual knowledge graph of all notes"
},
{
"name": "Daily Notes",
"description": "Date-stamped journal entries"
},
{
"name": "Templates",
"description": "Reusable note structures"
},
{
"name": "Trash",
"description": "Soft-deleted notes with recovery"
}
],
"features": [
"Block-based editor with slash commands and markdown",
"Bidirectional linking with auto-suggestion ('[[Meeting Notes]]')",
"Daily notes with automatic date headings",
"Templates with dynamic fields and placeholders",
"Web clipper for saving articles and annotating",
"AI-powered summarization and expansion",
"Semantic search across all notes",
"Export to Markdown, PDF, HTML, Notion"
]
}
},
"features": {
"phase_1_foundation": {
"timeline": "Weeks 1-4",
"theme": "Foundation & Core Infrastructure",
"features": [
{
"name": "Monorepo Setup & Design System",
"description": "Turborepo with shared packages (ui, utils, types, hooks). shadcn/ui base components. Theme system (light/dark/auto).",
"tech_stack": [
"Turborepo",
"pnpm",
"Tailwind",
"Radix UI",
"shadcn/ui"
],
"complexity": "Medium",
"dependencies": [],
"acceptance_criteria": [
"Shared packages build independently",
"Design tokens (colors, spacing, typography) centralized",
"Storybook running with all base components",
"Dark mode toggle working globally"
]
},
{
"name": "Authentication & User Management",
"description": "JWT-based auth with refresh tokens, OAuth (Google, GitHub, Microsoft), magic links, password reset, profile management.",
"tech_stack": [
"Fastify",
"Passport.js",
"PostgreSQL",
"Redis",
"JWT"
],
"complexity": "Medium",
"dependencies": [
"Monorepo Setup"
],
"acceptance_criteria": [
"All auth flows working end-to-end",
"Session management with Redis",
"Rate limiting on auth endpoints",
"Email verification and password reset"
]
},
{
"name": "Database Schema & Migrations",
"description": "Implement full unified schema with migrations, seed data, and test fixtures. Set up pgvector extension.",
"tech_stack": [
"PostgreSQL",
"pgvector",
"Prisma ORM",
"Docker"
],
"complexity": "High",
"dependencies": [
"Monorepo Setup"
],
"acceptance_criteria": [
"All entities created with proper constraints",
"Migration system reversible",
"Seed data for development",
"pgvector extension enabled and indexed"
]
},
{
"name": "API Foundation & Middleware",
"description": "REST API structure, error handling, validation (Zod), logging, rate limiting, CORS, API versioning.",
"tech_stack": [
"Fastify",
"Zod",
"Pino",
"Helmet"
],
"complexity": "Medium",
"dependencies": [
"Database Schema",
"Authentication"
],
"acceptance_criteria": [
"Consistent API response format",
"Request validation on all endpoints",
"Structured logging with correlation IDs",
"Rate limiting per user/IP"
]
},
{
"name": "Offline-First Sync Engine",
"description": "CRDT-based sync protocol with IndexedDB local storage, background sync, conflict resolution UI.",
"tech_stack": [
"Yjs",
"IndexedDB",
"Service Workers",
"Background Sync API"
],
"complexity": "High",
"dependencies": [
"API Foundation"
],
"acceptance_criteria": [
"Create/edit/delete notes offline, sync on reconnect",
"Conflict resolution UI for simultaneous edits",
"Sync status indicator in UI",
"Data integrity verified across devices"
]
}
]
},
"phase_2_notes_mvp": {
"timeline": "Weeks 5-8",
"theme": "Notes Module MVP",
"features": [
{
"name": "Block-Based Editor",
"description": "Notion-like editor with slash commands, markdown shortcuts, rich embeds, drag-and-drop blocks.",
"tech_stack": [
"TipTap",
"ProseMirror",
"React",
"tippy.js"
],
"complexity": "High",
"dependencies": [
"Monorepo Setup",
"Offline-First Sync"
],
"acceptance_criteria": [
"All basic block types (paragraph, heading, list, code, quote, divider)",
"Slash menu with 15+ commands",
"Markdown shortcuts (## for H2, - for list)",
"Drag-and-drop reordering of blocks"
]
},
{
"name": "Note CRUD & Organization",
"description": "Create, read, update, delete notes. Folders, tags, favorites, trash. Note list with sorting and filtering.",
"tech_stack": [
"PostgreSQL",
"Prisma",
"Zustand",
"TanStack Query"
],
"complexity": "Medium",
"dependencies": [
"Database Schema",
"Block-Based Editor"
],
"acceptance_criteria": [
"Full CRUD with optimistic UI updates",
"Folder hierarchy with drag-and-drop",
"Tag management with color coding",
"Trash with 30-day retention and restore"
]
},
{
"name": "Full-Text Search",
"description": "Instant search across all notes with highlighting, filters (date, type, tag), and search history.",
"tech_stack": [
"Meilisearch",
"PostgreSQL tsvector",
"React"
],
"complexity": "Medium",
"dependencies": [
"Note CRUD"
],
"acceptance_criteria": [
"Search results in <100ms for 10k notes",
"Highlighting of matched terms",
"Filter by date range, tags, folders",
"Recent searches and suggestions"
]
},
{
"name": "Bidirectional Linking",
"description": "[[Wiki-style links]] with auto-completion, backlink panels, and unlinked references suggestions.",
"tech_stack": [
"TipTap plugin",
"PostgreSQL",
"React"
],
"complexity": "High",
"dependencies": [
"Block-Based Editor",
"Note CRUD"
],
"acceptance_criteria": [
"Type [[ to trigger note autocomplete",
"Backlink panel showing all references to current note",
"Unlinked mentions detection (text matching note titles)",
"Broken link detection and repair suggestions"
]
}
]
},
"phase_3_todo_calendar": {
"timeline": "Weeks 9-14",
"theme": "Tasks & Calendar Integration",
"features": [
{
"name": "Task Management Core",
"description": "Full task CRUD with priorities, due dates, subtasks, projects, sections. Inbox, Today, Upcoming views.",
"tech_stack": [
"React",
"DnD Kit",
"date-fns",
"PostgreSQL"
],
"complexity": "High",
"dependencies": [
"Note CRUD",
"API Foundation"
],
"acceptance_criteria": [
"Task creation with natural language parsing",
"Subtask nesting (3 levels deep)",
"Priority colors and urgency sorting",
"Bulk operations (complete, reschedule, move)"
]
},
{
"name": "Calendar Engine",
"description": "Full calendar with day/week/month/year views. Event CRUD, recurring events, all-day events, time zones.",
"tech_stack": [
"React",
"date-fns",
"rrule",
"luxon"
],
"complexity": "High",
"dependencies": [
"Task Management Core"
],
"acceptance_criteria": [
"All calendar views rendering correctly",
"Recurring events with complex patterns",
"Timezone handling (user + event timezones)",
"All-day and multi-day events"
]
},
{
"name": "Task-Calendar Integration",
"description": "Drag tasks onto calendar as time blocks. Tasks shown in calendar views. Calendar events linked to tasks.",
"tech_stack": [
"DnD Kit",
"React",
"PostgreSQL",
"NodeLink"
],
"complexity": "High",
"dependencies": [
"Task Management Core",
"Calendar Engine"
],
"acceptance_criteria": [
"Drag task from list to calendar slot",
"Task appears as time block in calendar",
"Calendar event can be converted to task",
"Bidirectional updates (reschedule in calendar updates task)"
]
},
{
"name": "Natural Language Input",
"description": "Parse natural language for tasks and events ('Meeting with Sarah next Tuesday at 3pm for 1 hour').",
"tech_stack": [
"OpenAI API",
"compromise.js",
"chrono-node",
"custom NLP"
],
"complexity": "High",
"dependencies": [
"Task Management Core",
"Calendar Engine"
],
"acceptance_criteria": [
"Parse 90%+ of common date/time expressions",
"Extract duration, participants, location",
"Handle relative dates (tomorrow, next week)",
"Fallback to manual input when parsing fails"
]
},
{
"name": "Reminders & Notifications",
"description": "Push, email, and in-app notifications for tasks and events. Smart reminders (travel time, prep time).",
"tech_stack": [
"Web Push API",
"BullMQ",
"Redis",
"Firebase Cloud Messaging"
],
"complexity": "Medium",
"dependencies": [
"Task Management Core",
"Calendar Engine"
],
"acceptance_criteria": [
"Push notifications delivered reliably",
"Email reminders with note context",
"Smart reminders (15min before, travel time)",
"Notification preferences per workspace"
]
},
{
"name": "External Calendar Sync",
"description": "Sync with Google Calendar, Outlook, Apple iCal. Two-way or one-way sync options.",
"tech_stack": [
"Google Calendar API",
"Microsoft Graph API",
"iCal parser",
"BullMQ"
],
"complexity": "High",
"dependencies": [
"Calendar Engine"
],
"acceptance_criteria": [
"Import events from external calendars",
"Export Suite events to external calendars",
"Conflict detection and resolution",
"Sync frequency configurable (real-time, hourly, daily)"
]
}
]
},
"phase_4_ai_intelligence": {
"timeline": "Weeks 15-18",
"theme": "AI-Powered Intelligence Layer",
"features": [
{
"name": "Semantic Search & Embeddings",
"description": "Vector-based semantic search across all content. Find notes/tasks/events by meaning, not just keywords.",
"tech_stack": [
"OpenAI text-embedding-3-large",
"pgvector",
"HNSW index",
"React"
],
"complexity": "High",
"dependencies": [
"Full-Text Search",
"Note CRUD",
"Task Management Core"
],
"acceptance_criteria": [
"Semantic search results relevant to query intent",
"Hybrid search (keyword + semantic) ranking",
"Embeddings updated within 5s of content change",
"Search across all modules (notes, tasks, events)"
]
},
{
"name": "AI Writing Assistant",
"description": "Inline AI for expanding, summarizing, rewriting, translating, and answering questions about content.",
"tech_stack": [
"OpenAI GPT-4o",
"SSE streaming",
"TipTap plugin",
"React"
],
"complexity": "High",
"dependencies": [
"Block-Based Editor"
],
"acceptance_criteria": [
"AI suggestions appear inline with streaming",
"Accept/reject/dismiss UI for suggestions",
"Context-aware (uses surrounding paragraphs + linked notes)",
"Works offline with local model fallback"
]
},
{
"name": "Smart Linking & Knowledge Graph",
"description": "AI auto-discovers relationships between all nodes. Visual graph explorer with filtering and clustering.",
"tech_stack": [
"D3.js",
"OpenAI API",
"pgvector",
"Graph algorithms",
"React"
],
"complexity": "High",
"dependencies": [
"Semantic Search",
"Bidirectional Linking",
"Task-Calendar Integration"
],
"acceptance_criteria": [
"Auto-suggest 3-5 related items for any node",
"Graph view with 100+ nodes rendering at 60fps",
"Clustering by workspace, time, or topic",
"User can confirm/reject AI-suggested links"
]
},
{
"name": "Smart Scheduling Assistant",
"description": "AI suggests optimal times for tasks based on calendar, priorities, energy levels, and deadlines.",
"tech_stack": [
"OpenAI/Anthropic API",
"Constraint solver",
"Calendar Engine",
"React"
],
"complexity": "High",
"dependencies": [
"Task-Calendar Integration",
"Calendar Engine"
],
"acceptance_criteria": [
"Suggest time blocks for unscheduled tasks",
"Respect user preferences (morning focus, afternoon meetings)",
"Consider task dependencies and deadlines",
"One-click accept or modify suggestion"
]
},
{
"name": "Meeting Prep & Action Extraction",
"description": "Before meetings, auto-surface relevant notes. After meetings, extract action items and create tasks.",
"tech_stack": [
"OpenAI GPT-4o",
"NodeLink",
"Task Management Core",
"BullMQ"
],
"complexity": "High",
"dependencies": [
"Smart Linking",
"Task Management Core"
],
"acceptance_criteria": [
"Auto-collect notes linked to meeting participants/topic",
"Generate meeting prep summary 15min before",
"Extract action items from meeting notes",
"Create linked tasks with assignees and deadlines"
]
}
]
},
"phase_5_collaboration": {
"timeline": "Weeks 19-22",
"theme": "Collaboration & Team Features",
"features": [
{
"name": "Real-time Collaboration",
"description": "Multi-user editing on notes, shared task lists, shared calendars. Presence awareness, cursors, comments.",
"tech_stack": [
"Yjs",
"WebSocket",
"Redis adapter",
"React"
],
"complexity": "High",
"dependencies": [
"Offline-First Sync",
"Notes MVP",
"Task Management Core"
],
"acceptance_criteria": [
"3+ users editing same note simultaneously",
"Cursor positions and selections visible",
"Comments and suggestions on specific blocks",
"Conflict-free merging with CRDTs"
]
},
{
"name": "Workspace & Team Management",
"description": "Workspaces with members, roles (Owner/Admin/Editor/Viewer), permissions, and activity feeds.",
"tech_stack": [
"PostgreSQL RLS",
"CASL",
"React",
"Zustand"
],
"complexity": "Medium",
"dependencies": [
"Authentication",
"Real-time Collaboration"
],
"acceptance_criteria": [
"Role-based access control enforced at API level",
"Workspace switching with isolated data",
"Member invitation via email/link",
"Activity feed showing team actions"
]
},
{
"name": "Sharing & Permissions",
"description": "Share individual nodes or folders with granular permissions. Public links with optional passwords.",
"tech_stack": [
"PostgreSQL",
"CASL",
"React",
"UUID tokens"
],
"complexity": "Medium",
"dependencies": [
"Workspace & Team Management"
],
"acceptance_criteria": [
"Share via link with view/edit permissions",
"Password-protected public links",
"Revoke sharing instantly",
"Audit log of all share actions"
]
},
{
"name": "Templates & Automation",
"description": "Customizable templates for notes, tasks, events. Automation rules (when X, do Y).",
"tech_stack": [
"JSON Schema",
"Workflow engine",
"BullMQ",
"React"
],
"complexity": "High",
"dependencies": [
"Notes MVP",
"Task Management Core",
"Calendar Engine"
],
"acceptance_criteria": [
"Template gallery with 20+ built-in templates",
"User-created templates with dynamic fields",
"Automation: 'When task created with tag X, add to project Y'",
"Webhook triggers for external integrations"
]
}
]
},
"phase_6_platform_scale": {
"timeline": "Weeks 23-28",
"theme": "Platform, Extensibility & Enterprise",
"features": [
{
"name": "Public API & Webhooks",
"description": "REST and GraphQL APIs with comprehensive documentation. Webhook events for all mutations.",
"tech_stack": [
"Fastify",
"GraphQL (Mercurius)",
"OpenAPI",
"Webhook delivery"
],
"complexity": "Medium",
"dependencies": [
"Workspace & Team Management"
],
"acceptance_criteria": [
"REST API covering all CRUD operations",
"GraphQL with subscriptions for real-time",
"Webhook retry logic with exponential backoff",
"API rate limits and usage dashboards"
]
},
{
"name": "Plugin System",
"description": "Third-party extensions with sandboxed execution. Plugin marketplace.",
"tech_stack": [
"iframe sandbox",
"Plugin API",
"Manifest schema",
"CodeSandbox API"
],
"complexity": "High",
"dependencies": [
"Public API"
],
"acceptance_criteria": [
"Plugin manifest validation and installation",
"Sandboxed execution with limited permissions",
"Plugin settings UI integration",
"Marketplace with ratings and reviews"
]
},
{
"name": "Desktop & Mobile Apps",
"description": "Native desktop (Tauri) and mobile (React Native) with full feature parity and offline support.",
"tech_stack": [
"Tauri",
"React Native",
"Expo",
"SQLite (local)",
"Capacitor"
],
"complexity": "High",
"dependencies": [
"Offline-First Sync",
"All core modules"
],
"acceptance_criteria": [
"Desktop app <50MB installer",
"Mobile app on iOS and Android",
"Full offline functionality on all platforms",
"Native notifications and system integrations"
]
},
{
"name": "SSO & Enterprise Compliance",
"description": "SAML 2.0, OIDC, SCIM provisioning. Audit logs, data retention, GDPR tools, SOC 2 readiness.",
"tech_stack": [
"Passport.js",
"SAML",
"SCIM",
"Audit trail",
"Encryption"
],
"complexity": "Medium",
"dependencies": [
"Workspace & Team Management"
],
"acceptance_criteria": [
"SAML integration with major IdPs (Okta, Azure AD)",
"SCIM user provisioning and deprovisioning",
"Complete audit trail exportable as CSV/JSON",
"GDPR data export and deletion within 24h"
]
},
{
"name": "Self-Hosting & On-Premise",
"description": "Docker-based deployment with license management. Single-tenant option for enterprise.",
"tech_stack": [
"Docker Compose",
"Kubernetes",
"License API",
"Terraform"
],
"complexity": "Medium",
"dependencies": [
"All core modules"
],
"acceptance_criteria": [
"One-command Docker deployment",
"License validation and renewal",
"Automated backups and restore",
"Health checks and monitoring endpoints"
]
},
{
"name": "Advanced Analytics Dashboard",
"description": "Personal and team productivity insights. Time tracking, completion rates, focus metrics.",
"tech_stack": [
"ClickHouse",
"Metabase",
"D3.js",
"React"
],
"complexity": "Medium",
"dependencies": [
"Activity tracking",
"Workspace & Team Management"
],
"acceptance_criteria": [
"Personal productivity score and trends",
"Team workload distribution view",
"Time spent by project/category",
"Exportable reports (PDF, CSV)"
]
}
]
}
},
"api_design": {
"rest_endpoints": [
{
"method": "GET",
"path": "/api/v1/nodes",
"description": "List all nodes with filtering by type, workspace, date, status, tags"
},
{
"method": "POST",
"path": "/api/v1/nodes",
"description": "Create new node (task, event, note, project, goal)"
},
{
"method": "GET",
"path": "/api/v1/nodes/:id",
"description": "Get node by ID with links, backlinks, and related content"
},
{
"method": "PATCH",
"path": "/api/v1/nodes/:id",
"description": "Update node (partial, optimistic locking)"
},
{
"method": "DELETE",
"path": "/api/v1/nodes/:id",
"description": "Soft delete node (move to trash)"
},
{
"method": "POST",
"path": "/api/v1/nodes/:id/restore",
"description": "Restore node from trash"
},
{
"method": "GET",
"path": "/api/v1/nodes/:id/links",
"description": "Get all outgoing and incoming links for a node"
},
{
"method": "POST",
"path": "/api/v1/nodes/:id/links",
"description": "Create link between nodes"
},
{
"method": "GET",
"path": "/api/v1/nodes/:id/related",
"description": "AI-suggested related nodes (semantic + graph)"
},
{
"method": "POST",
"path": "/api/v1/nodes/:id/ai",
"description": "AI operations: summarize, expand, rewrite, extract actions, suggest links"
},
{
"method": "GET",
"path": "/api/v1/search",
"description": "Hybrid search (full-text + semantic) across all nodes"
},
{
"method": "GET",
"path": "/api/v1/workspaces/:id/graph",
"description": "Knowledge graph data for visualization (nodes + links)"
},
{
"method": "GET",
"path": "/api/v1/workspaces/:id/calendar",
"description": "Calendar events for a workspace with date range"
},
{
"method": "GET",
"path": "/api/v1/workspaces/:id/tasks",
"description": "Tasks for a workspace with filters and sorting"
},
{
"method": "GET",
"path": "/api/v1/workspaces/:id/notes",
"description": "Notes for a workspace with folder hierarchy"
},
{
"method": "GET",
"path": "/api/v1/workspaces/:id/activity",
"description": "Activity feed for workspace"
},
{
"method": "POST",
"path": "/api/v1/natural-language",
"description": "Parse natural language input into structured node data"
},
{
"method": "POST",
"path": "/api/v1/sync",
"description": "Delta sync endpoint for offline-first clients"
},
{
"method": "GET",
"path": "/ws/collab/:nodeId",
"description": "WebSocket for real-time collaboration on a node"
},
{
"method": "GET",
"path": "/api/v1/user/me",
"description": "Current user profile, preferences, and workspaces"
},
{
"method": "PATCH",
"path": "/api/v1/user/me",
"description": "Update user preferences and settings"
},
{
"method": "GET",
"path": "/api/v1/user/me/notifications",
"description": "User notification feed"
},
{
"method": "GET",
"path": "/api/v1/integrations/calendars",
"description": "List connected external calendars"
},
{
"method": "POST",
"path": "/api/v1/integrations/calendars/:provider/connect",
"description": "Connect external calendar (Google, Outlook, Apple)"
}
],
"graphql_schema": "\n Core Types: User, Workspace, Node, NodeLink, Tag, Folder, Reminder, Activity, Attachment, WorkspaceMember\n\n Queries:\n - nodes(filter: NodeFilter, pagination: Pagination): NodeConnection\n - node(id: UUID!): Node\n - search(query: String!, type: SearchType, filters: SearchFilters): SearchResultConnection\n - relatedNodes(id: UUID!, limit: Int): [NodeLink]\n - graph(workspaceId: UUID!, depth: Int): GraphData\n - calendar(workspaceId: UUID!, range: DateRange): [Node]\n - tasks(workspaceId: UUID!, filters: TaskFilters): [Node]\n - notes(workspaceId: UUID!, folderId: UUID): [Node]\n - activity(workspaceId: UUID!, limit: Int): [Activity]\n\n Mutations:\n - createNode(input: CreateNodeInput!): Node\n - updateNode(id: UUID!, input: UpdateNodeInput!): Node\n - deleteNode(id: UUID!): Boolean\n - createLink(input: CreateLinkInput!): NodeLink\n - deleteLink(id: UUID!): Boolean\n - aiAssist(id: UUID!, operation: AIOperation!, context: String): AIResult\n - naturalLanguage(input: String!): ParsedNodeData\n\n Subscriptions:\n - nodeUpdated(id: UUID!): Node\n - userPresence(workspaceId: UUID!): [UserPresence]\n - notificationReceived(userId: UUID!): Notification\n "
},
"ai_integration": {
"models": [
{
"provider": "OpenAI",
"model": "gpt-4o",
"use_case": "Writing assistant, summarization, action extraction, natural language parsing",
"priority": "Primary"
},
{
"provider": "Anthropic",
"model": "claude-3-5-sonnet",
"use_case": "Long-context analysis, complex reasoning, meeting prep",
"priority": "Fallback"
},
{
"provider": "Local",
"model": "llama3.1/phi4 via Ollama",
"use_case": "Privacy-sensitive operations, offline mode, cost reduction",
"priority": "Offline fallback"
},
{
"provider": "OpenAI",
"model": "text-embedding-3-large",
"use_case": "Node embeddings for semantic search and recommendations",
"priority": "Primary"
},
{
"provider": "Local",
"model": "nomic-embed-text via Ollama",
"use_case": "Offline embeddings for local-only content",
"priority": "Offline fallback"
}
],
"prompts": {
"summarize": "Summarize the following content in 3-5 bullet points, preserving key insights, action items, and decisions:\n\n{content}",
"expand": "Expand on the following outline/idea with detailed explanations, examples, and connections to related concepts. Maintain the original tone and style:\n\n{content}",
"rewrite": "Rewrite the following text to be {style} (e.g., more concise, more formal, simpler). Preserve all key information:\n\n{content}",
"link_suggestions": "Given this node:\n{current_node}\n\nAnd these candidate nodes:\n{candidates}\n\nIdentify which nodes are semantically related and explain why. Consider content similarity, shared topics, temporal proximity, and participant overlap. Return as JSON array of {{node_id, relevance_score, reason, link_type}}.",
"tag_generation": "Generate 3-5 relevant tags for this content. Be specific and use domain-appropriate terminology. Consider existing tags: {existing_tags}:\n\n{content}",
"natural_language_parse": "Parse the following natural language input into structured data. Extract: type (task/event/note), title, description, due_date, duration, priority, participants, location, tags, related_notes. Return as JSON. Input: '{input}'",
"action_extraction": "Extract all action items from the following meeting notes or text. For each action item, identify: task description, assignee (if mentioned), deadline (if mentioned), priority. Return as JSON array.\n\n{content}",
"meeting_prep": "The user has a meeting titled '{meeting_title}' with {participants} at {time}. Based on their notes and previous meetings, summarize relevant context, open questions, and suggested talking points.\n\nRelevant notes:\n{related_notes}",
"smart_schedule": "Given these unscheduled tasks with priorities and deadlines:\n{tasks}\n\nAnd this calendar availability:\n{availability}\n\nSuggest optimal time blocks for each task. Consider: task priority, deadline proximity, estimated duration, user energy patterns (morning/evening preference), and meeting prep time. Return as JSON array of {{task_id, suggested_start, suggested_end, reasoning}}."
},
"embedding_pipeline": [
"1. Chunk node content into semantic segments (paragraphs, sections, task descriptions)",
"2. Generate embeddings for each chunk + full node summary",
"3. Store in pgvector with metadata (node_id, chunk_index, type, workspace_id)",
"4. Build HNSW index for fast approximate nearest neighbor search",
"5. Update embeddings asynchronously on node modification (BullMQ queue)",
"6. Cache popular embeddings in Redis",
"7. Re-embed all content monthly with latest model version"
],
"ai_features": [
"Inline writing assistant (expand, summarize, rewrite, translate)",
"Smart linking suggestions across all modules",
"Auto-tagging based on content analysis",
"Natural language task/event creation",
"Meeting prep auto-collection",
"Action item extraction from notes",
"Smart scheduling with calendar optimization",
"Daily/weekly digest generation",
"Duplicate detection and merge suggestions",
"Content similarity warnings (avoid redundant notes)"
]
},
"security": {
"authentication": [
"JWT with refresh token rotation (7-day access, 30-day refresh)",
"OAuth 2.0 (Google, GitHub, Microsoft, Apple)",
"Magic links (passwordless option)",
"WebAuthn/FIDO2 for hardware key support",
"SAML 2.0 and OIDC for enterprise SSO",
"TOTP-based 2FA (optional for personal, required for teams)"
],
"authorization": [
"RBAC with predefined roles: Owner, Admin, Editor, Viewer",
"Resource-level permissions (share individual nodes with custom access)",
"Workspace-level access controls with inheritance",
"Field-level encryption for sensitive notes (E2E optional)",
"Row-level security (RLS) in PostgreSQL",
"API-level permission checks (CASL/Ability)",
"Audit logging for all permission changes"
],
"data_protection": [
"AES-256 encryption at rest (PostgreSQL TDE)",
"TLS 1.3 in transit (HSTS enforced)",
"E2E encryption option for sensitive workspaces (keys held by user)",
"GDPR data export (complete user data dump in 24h)",
"GDPR right to erasure (complete deletion within 30 days)",
"Data retention policies configurable per workspace",
"Automated backup encryption (AES-256-GCM)",
"SOC 2 Type II compliance target (Phase 6)",
"Penetration testing quarterly (external firm)"
]
},
"performance": {
"targets": [
{
"metric": "Time to First Contentful Paint",
"target": "< 1.0s",
"measurement": "Lighthouse"
},
{
"metric": "Time to Interactive",
"target": "< 2.5s",
"measurement": "Lighthouse"
},
{
"metric": "Editor interaction latency",
"target": "< 30ms",
"measurement": "Chrome DevTools"
},
{
"metric": "Search response time (full-text)",
"target": "< 50ms",
"measurement": "API response time"
},
{
"metric": "Search response time (semantic)",
"target": "< 200ms",
"measurement": "API response time"
},
{
"metric": "AI suggestion latency (first token)",
"target": "< 500ms",
"measurement": "SSE stream start"
},
{
"metric": "Calendar render (month view, 100 events)",
"target": "< 100ms",
"measurement": "React profiler"
},
{
"metric": "Task list render (1000 tasks)",
"target": "< 150ms",
"measurement": "React profiler"
},
{
"metric": "Sync reconciliation (100 changes)",
"target": "< 2s",
"measurement": "Offline simulation"
},
{
"metric": "Concurrent users per API node",
"target": "> 2000",
"measurement": "Load testing"
},
{
"metric": "WebSocket message latency",
"target": "< 50ms",
"measurement": "Ping/pong"
},
{
"metric": "Database query P99",
"target": "< 100ms",
"measurement": "PostgreSQL logs"
}
],
"optimization_strategies": [
"Virtualized rendering for long lists (react-window/react-virtuoso)",
"Lazy loading of note content and embeddings (intersection observer)",
"CDN for static assets, avatars, and thumbnails (Cloudflare)",
"Database connection pooling (PgBouncer, 100 connections)",
"Redis caching for hot data (search results, user sessions, workspace configs)",
"Query result caching with stale-while-revalidate",
"WebSocket connection multiplexing (single connection per user)",
"Debounced auto-save (1.5s) with optimistic UI updates",
"Service Worker for asset caching and offline support",
"Image optimization (WebP/AVIF, responsive sizes)",
"Code splitting by module (todo, calendar, notes loaded on demand)",
"Tree shaking and dead code elimination",
"Database query optimization (composite indexes, query plan analysis)",
"Read replicas for search and analytics queries",
"GraphQL query complexity analysis and depth limiting"
]
},
"development_workflow": {
"version_control": "Git with trunk-based development (main branch + short-lived feature branches)",
"branching_strategy": "main \u2192 feature/xxx branches (max 3 days) \u2192 PR \u2192 CI \u2192 merge \u2192 auto-deploy staging",
"code_quality": [
"ESLint + Prettier (strict config, no warnings allowed)",
"TypeScript strict mode with noImplicitAny",
"Husky pre-commit hooks (lint, type-check, test affected)",
"Conventional commits (feat:, fix:, docs:, refactor:, test:, chore:)",
"Branch naming: feature/xxx, fix/xxx, refactor/xxx, docs/xxx"
],
"testing_strategy": {
"unit_tests": "Vitest for logic, React Testing Library for components, 80% coverage minimum",
"integration_tests": "API endpoint testing with supertest + test database, 60% coverage",
"e2e_tests": "Playwright for critical user flows (auth, create note, search, calendar drag, sync)",
"visual_regression": "Chromatic/Storybook for UI component snapshots",
"performance_tests": "Lighthouse CI + custom benchmarks for editor and calendar",
"contract_tests": "Pact for API consumer-provider contracts"
},
"deployment_pipeline": [
"1. Developer pushes feature branch \u2192 triggers CI (lint, type-check, unit tests, build)",
"2. PR created \u2192 automated review (CodeRabbit/PR-Agent) + human review required",
"3. CI passes \u2192 preview deployment generated (Vercel/Railway preview URL)",
"4. E2E tests run against preview environment",
"5. Merge to main \u2192 auto-deploy to staging environment",
"6. Staging smoke tests (automated + manual QA checklist)",
"7. Manual promotion to production with feature flags",
"8. Production deployment with blue-green strategy (zero downtime)",
"9. Post-deploy monitoring (error rates, performance metrics) for 30 minutes",
"10. Automatic rollback if error rate > 0.1% or P95 latency > 2x baseline"
]
},
"monetization": {
"free_tier": {
"price": "$0",
"features": [
"Unlimited personal notes, tasks, and events",
"1 workspace",
"Basic AI (20 requests/day)",
"7-day version history",
"Local sync only (no cloud)",
"Web and mobile access",
"Community support"
]
},
"pro_tier": {
"price": "$10/month or $96/year",
"features": [
"Everything in Free",
"Unlimited AI requests",
"Unlimited workspaces",
"Cloud sync across devices",
"30-day version history",
"Advanced search (semantic + full-text)",
"Knowledge graph view",
"External calendar sync",
"Web clipper",
"Priority email support"
]
},
"team_tier": {
"price": "$18/user/month or $180/user/year",
"features": [
"Everything in Pro",
"Real-time collaboration",
"Team workspaces with RBAC",
"Shared templates and automation",
"Admin dashboard and analytics",
"SSO (Google Workspace, Microsoft 365)",
"90-day version history",
"Shared team calendar",
"API access (10k requests/month)",
"Priority support (24h response)"
]
},
"enterprise_tier": {
"price": "Custom pricing",
"features": [
"Everything in Team",
"SAML/OIDC SSO (Okta, Azure AD, custom)",
"SCIM user provisioning",
"Self-hosting option",
"Unlimited version history",
"Audit logs and compliance reports",
"Custom AI model training",
"Dedicated account manager",
"SLA (99.9% uptime, 4h response)",
"Onboarding and training",
"White-label option"
]
}
},
"risk_mitigation": {
"technical_risks": [
{
"risk": "CRDT conflicts in complex multi-module editing",
"mitigation": "Extensive Yjs testing across all node types, dedicated conflict resolution UI, automated conflict simulation tests"
},
{
"risk": "AI API latency and cost at scale",
"mitigation": "Aggressive caching of AI responses, local model fallback (Ollama), rate limiting per user, usage quotas with graceful degradation"
},
{
"risk": "Search performance with millions of nodes",
"mitigation": "Meilisearch sharding, pgvector HNSW indexing, read replicas, query result caching, eventual consistency for embeddings"
},
{
"risk": "Offline sync data corruption or loss",
"mitigation": "Checksums on all sync operations, sync conflict resolution UI, automated backup before sync, integrity verification on reconnect"
},
{
"risk": "Calendar recurrence complexity (DST, timezone, leap years)",
"mitigation": "Comprehensive test suite with edge cases, use battle-tested rrule library, UTC storage with timezone display, automated regression tests"
},
{
"risk": "Cross-platform feature parity gaps",
"mitigation": "Shared business logic layer (React Native Web), feature flags per platform, automated cross-platform E2E tests, platform-specific UI adapters"
}
],
"business_risks": [
{
"risk": "Market saturation (Notion, Todoist, Google Calendar, Obsidian)",
"mitigation": "Differentiate on unified experience + AI-native features, target power users who feel fragmentation pain, freemium to reduce switching cost"
},
{
"risk": "AI dependency and vendor lock-in",
"mitigation": "Local model support from day one, transparent AI usage, user control over AI features, multiple provider support (OpenAI, Anthropic, local)"
},
{
"risk": "Self-hosting cannibalizing cloud revenue",
"mitigation": "Self-hosting only at Enterprise tier, cloud-first features (collaboration, AI), managed hosting option for teams"
},
{
"risk": "Team productivity app adoption challenges",
"mitigation": "Individual-first design (works great solo), gradual team features, import from competitors, migration assistance for Enterprise"
}
]
},
"success_metrics": {
"engagement": [
"DAU/MAU ratio > 35%",
"Average session duration > 20 minutes",
"Nodes created per user per week > 15 (tasks + events + notes)",
"Cross-module usage (users who use 2+ modules daily) > 60%",
"AI feature usage (at least 1 AI interaction per week) > 40%"
],
"retention": [
"Week-1 retention > 65%",
"Week-4 retention > 45%",
"Month-3 retention > 30%",
"Month-12 retention > 20%",
"NPS score > 55"
],
"performance": [
"P99 API latency < 200ms",
"Uptime > 99.95%",
"Zero unplanned data loss incidents",
"Sync conflict resolution rate > 95% automatic",
"AI suggestion acceptance rate > 30%"
],
"business": [
"Free-to-Pro conversion rate > 5%",
"Team upgrade rate (Pro users upgrading to Team) > 15%",
"Average revenue per user (ARPU) > $12/month",
"Customer acquisition cost (CAC) < $50",
"Net revenue retention (NRR) > 110%"
]
},
"agent_development_guidelines": {
"execution_principles": [
"Phase-by-phase execution: Complete each phase fully before moving to the next. No skipping MVP features.",
"Module-by-module delivery: Finish Notes MVP before starting Tasks, finish Tasks before Calendar integration.",
"Test-driven development: Write tests before implementation. Maintain >80% coverage for critical paths.",
"Documentation-first: Update API docs, component stories, and data model diagrams before coding.",
"Incremental AI integration: Start with simple prompts, gradually add embeddings, knowledge graphs, and smart scheduling.",
"Performance budgeting: Profile after every major feature. No regressions on existing metrics.",
"Security hardening: Implement auth from day one. Never commit secrets. Use environment configs.",
"Collaboration protocol: Use Yjs for real-time features. Test with 3+ concurrent users minimum.",
"Deployment readiness: Every merged PR must be deployable. Feature flags for incomplete work.",
"Cross-platform consistency: Shared logic layer, platform-specific UI adapters, consistent behavior."
],
"agent_checkpoints": [
"After Phase 1: Validate monorepo builds, auth flows work, database migrations reversible, offline sync functional",
"After Phase 2: Validate block editor has all basic blocks, notes CRUD complete, search <100ms, bidirectional linking works",
"After Phase 3: Validate task-calendar drag integration, natural language parsing 90%+ accuracy, external calendar sync working",
"After Phase 4: Validate semantic search relevance, AI suggestions accepted >30%, knowledge graph renders 100+ nodes at 60fps",
"After Phase 5: Validate real-time collaboration with 3+ users, RBAC enforced at API level, sharing permissions granular",
"After Phase 6: Validate REST + GraphQL APIs, plugin sandbox secure, desktop <50MB, mobile on both platforms"
],
"code_generation_rules": [
"Generate TypeScript with strict types \u2014 no any types except in test mocks",
"Use functional components with hooks \u2014 no class components",
"Prefer composition over inheritance \u2014 use HOCs and render props sparingly",
"Separate business logic from UI \u2014 custom hooks for data operations",
"Use Zod for all runtime validation \u2014 never trust client input",
"Implement optimistic UI updates \u2014 rollback on error with toast notification",
"Add loading and error states to every async operation \u2014 no silent failures",
"Use React.memo and useMemo judiciously \u2014 profile before optimizing",
"Write accessible components \u2014 ARIA labels, keyboard navigation, focus management",
"Internationalize from day one \u2014 i18n keys for all user-facing strings"
]
}
}