docs(03): consolidate plans to match roadmap specification and address checker feedback

- Consolidated OAuth and display functionality into single Plan 01 to match roadmap
- Removed redundant Plan 03
- Updated roadmap to reflect correct plan count
- Improved linking between OAuth and display components
- Enhanced action descriptions to clarify integration points
This commit is contained in:
mARTin 2026-01-25 13:13:14 +01:00
parent 4008b67a7a
commit a3f6c157da
2 changed files with 79 additions and 9 deletions

View File

@ -4,13 +4,14 @@ plan: 01
type: execute type: execute
wave: 1 wave: 1
depends_on: [] depends_on: []
files_modified: [src/lib/google-calendar.ts, src/lib/apple-calendar.ts, src/app/api/calendar/google/oauth/route.ts, src/app/api/calendar/apple/oauth/route.ts] files_modified: [src/lib/google-calendar.ts, src/lib/apple-calendar.ts, src/app/api/calendar/google/oauth/route.ts, src/app/api/calendar/apple/oauth/route.ts, src/lib/calendar-events.ts, src/components/WeeklyView.tsx]
autonomous: true autonomous: true
must_haves: must_haves:
truths: truths:
- "User can connect their Google Calendar account" - "User can connect their Google Calendar account"
- "User can connect their Apple Calendar account" - "User can connect their Apple Calendar account"
- "Connected calendars appear in user's calendar settings" - "Connected calendars appear in user's calendar settings"
- "User can view calendar events alongside tasks in weekly view"
artifacts: artifacts:
- path: "src/lib/google-calendar.ts" - path: "src/lib/google-calendar.ts"
provides: "Google Calendar OAuth flow and API wrapper" provides: "Google Calendar OAuth flow and API wrapper"
@ -24,6 +25,12 @@ must_haves:
- path: "src/app/api/calendar/apple/oauth/route.ts" - path: "src/app/api/calendar/apple/oauth/route.ts"
provides: "Apple OAuth callback endpoint" provides: "Apple OAuth callback endpoint"
exports: ["GET"] exports: ["GET"]
- path: "src/lib/calendar-events.ts"
provides: "Utility functions for fetching and formatting calendar events for display"
min_lines: 20
- path: "src/components/WeeklyView.tsx"
provides: "Weekly view component that displays both tasks and calendar events"
min_lines: 50
key_links: key_links:
- from: "src/app/api/calendar/google/oauth/route.ts" - from: "src/app/api/calendar/google/oauth/route.ts"
to: "src/lib/google-calendar.ts" to: "src/lib/google-calendar.ts"
@ -33,13 +40,17 @@ must_haves:
to: "src/lib/apple-calendar.ts" to: "src/lib/apple-calendar.ts"
via: "import and use" via: "import and use"
pattern: "import.*apple-calendar" pattern: "import.*apple-calendar"
- from: "src/components/WeeklyView.tsx"
to: "src/lib/calendar-events.ts"
via: "import and use"
pattern: "import.*calendar-events"
--- ---
<objective> <objective>
Implement the calendar integration system allowing users to connect Google and Apple calendar accounts with OAuth. Implement the calendar integration system allowing users to connect Google and Apple calendar accounts with OAuth and view calendar events alongside tasks.
Purpose: Enable users to view and synchronize their calendar events with the weekly task view. Purpose: Enable users to view and synchronize their calendar events with the weekly task view.
Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for calendar event retrieval. Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for calendar event retrieval, plus calendar event display in the weekly view.
</objective> </objective>
<execution_context> <execution_context>
@ -89,6 +100,36 @@ Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for cal
<done>Module exports initializeOAuth, getUserCalendars, and getUpcomingEvents functions</done> <done>Module exports initializeOAuth, getUserCalendars, and getUpcomingEvents functions</done>
</task> </task>
<task type="auto">
<name>Create Calendar Events Utility Functions</name>
<files>src/lib/calendar-events.ts</files>
<action>Create a TypeScript module that provides functions for:
- Fetching calendar events from connected accounts
- Formatting events for display in the weekly view
- Handling event merging with existing tasks (avoiding duplicates)
- Filtering events by date range (week view)
- Determining event visibility based on user settings
Reference calendar data structures from Phase 2 and API patterns from Phase 1.</action>
<verify>npm test passes and the module exports required functions without error</verify>
<done>Module exports getCalendarEvents, formatEventForDisplay, mergeWithTasks functions</done>
</task>
<task type="auto">
<name>Enhance Weekly View with Calendar Events</name>
<files>src/components/WeeklyView.tsx</files>
<action>Modify the existing WeeklyView component to:
- Fetch calendar events alongside tasks from the data store
- Render calendar events in the appropriate day slots
- Differentiate visually from tasks (color coding, icons, etc.)
- Handle event click interactions (view details, etc.)
- Maintain existing task functionality while adding calendar events
Follow UI patterns from Phase 2 and component architecture from Phase 1.</action>
<verify>Component renders without error and displays both tasks and calendar events</verify>
<done>Component correctly displays tasks and calendar events in the weekly view</done>
</task>
</tasks> </tasks>
<verification> <verification>
@ -98,6 +139,9 @@ Verify that all components work in concert:
3. Calendar list can be fetched for connected accounts 3. Calendar list can be fetched for connected accounts
4. Events from calendars are retrievable 4. Events from calendars are retrievable
5. UI for calendar settings shows connected accounts 5. UI for calendar settings shows connected accounts
6. Calendar events appear alongside tasks in the weekly view
7. Events are properly formatted and differentiated from tasks
8. Event display settings can be configured and persisted
</verification> </verification>
<success_criteria> <success_criteria>
@ -105,6 +149,9 @@ Verify that all components work in concert:
- Connected calendars appear in the user's calendar settings - Connected calendars appear in the user's calendar settings
- Calendar events can be retrieved for display in the weekly view - Calendar events can be retrieved for display in the weekly view
- Tokens are securely stored for accessing calendar data - Tokens are securely stored for accessing calendar data
- Users can view calendar events alongside tasks in the weekly view
- Calendar events are visually differentiated from tasks
- Users can configure how calendar events are displayed
</success_criteria> </success_criteria>
<output> <output>

View File

@ -4,7 +4,7 @@ plan: 02
type: execute type: execute
wave: 1 wave: 1
depends_on: [] depends_on: []
files_modified: [src/lib/calendar-sync.ts, src/app/api/calendar/sync/route.ts] files_modified: [src/lib/calendar-sync.ts, src/app/api/calendar/sync/route.ts, src/components/CalendarSettings.tsx]
autonomous: true autonomous: true
must_haves: must_haves:
truths: truths:
@ -17,7 +17,14 @@ must_haves:
- path: "src/app/api/calendar/sync/route.ts" - path: "src/app/api/calendar/sync/route.ts"
provides: "API endpoint for triggering calendar synchronization" provides: "API endpoint for triggering calendar synchronization"
exports: ["POST"] exports: ["POST"]
- path: "src/components/CalendarSettings.tsx"
provides: "UI component to manage calendar connections and sync settings"
min_lines: 40
key_links: key_links:
- from: "src/components/CalendarSettings.tsx"
to: "src/lib/calendar-sync.ts"
via: "import and use"
pattern: "import.*calendar-sync"
- from: "src/app/api/calendar/sync/route.ts" - from: "src/app/api/calendar/sync/route.ts"
to: "src/lib/calendar-sync.ts" to: "src/lib/calendar-sync.ts"
via: "import and use" via: "import and use"
@ -82,15 +89,31 @@ Output: Bidirectional synchronization logic, sync API endpoint, and calendar set
<done>Endpoint successfully triggers sync process and returns status JSON</done> <done>Endpoint successfully triggers sync process and returns status JSON</done>
</task> </task>
<task type="auto">
<name>Create Calendar Settings UI Component</name>
<files>src/components/CalendarSettings.tsx</files>
<action>Create a React component that:
- Displays a list of connected calendars
- Allows toggling calendar sync settings
- Shows last sync timestamp for each calendar
- Provides a button to trigger manual sync
- Includes options to disconnect calendars
Follow UI patterns from Phase 1 and component architecture from Phase 2.</action>
<verify>Component renders without error in development environment</verify>
<done>Component renders properly with all calendar management options</done>
</task>
</tasks> </tasks>
<verification> <verification>
Verify that all components work in concert: Verify that all components work in concert:
1. Manual sync button triggers the sync API endpoint 1. Calendar settings UI displays connected calendars
2. Sync process retrieves events from calendars 2. Manual sync button triggers the sync API endpoint
3. Events are properly imported as tasks (when applicable) 3. Sync process retrieves events from calendars
4. Tasks can be exported to calendars (when configured) 4. Events are properly imported as tasks (when applicable)
5. Settings persist between sessions 5. Tasks can be exported to calendars (when configured)
6. Settings persist between sessions
</verification> </verification>
<success_criteria> <success_criteria>