docs(03): revise phase plans to address checker feedback

- Fixed requirement coverage for CAL-03 (view calendar events in weekly view)
- Reduced tasks in Plan 01 from 4 to 2 to improve scoping
- Added new Plan 03 for calendar event display functionality
- Updated must_haves to reflect new task structure
This commit is contained in:
mARTin 2026-01-25 13:05:19 +01:00
parent 3eaf97ed9c
commit 4008b67a7a
3 changed files with 125 additions and 60 deletions

View File

@ -45,7 +45,6 @@ Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for cal
<execution_context>
@~/.config/opencode/get-shit-done/workflows/execute-plan.md
@~/.config/opencode/get-shit-done/templates/summary.md
</documentation>
</execution_context>
<context>
@ -90,34 +89,6 @@ Output: Google Calendar and Apple Calendar OAuth flows with API wrappers for cal
<done>Module exports initializeOAuth, getUserCalendars, and getUpcomingEvents functions</done>
</task>
<task type="auto">
<name>Create Google Calendar OAuth Endpoint</name>
<files>src/app/api/calendar/google/oauth/route.ts</files>
<action>Create an API route that handles the Google OAuth callback. The route should:
- Receive the authorization code from Google's OAuth redirect
- Exchange the code for an access token using the Google API
- Store the token in the database associated with the user
- Redirect to the calendar settings page or dashboard with success message
Follow the API endpoint pattern established in Phase 2 and authentication flow from Phase 1.</action>
<verify>curl -X GET http://localhost:3000/api/calendar/google/oauth returns a successful redirect</verify>
<done>Route successfully handles Google OAuth and stores token in DB for user</done>
</task>
<task type="auto">
<name>Create Apple Calendar OAuth Endpoint</name>
<files>src/app/api/calendar/apple/oauth/route.ts</files>
<action>Create an API route that handles the Apple OAuth callback. The route should:
- Receive the authorization code from Apple's OAuth redirect
- Exchange the code for an access token using the Apple API
- Store the token in the database associated with the user
- Redirect to the calendar settings page or dashboard with success message
Follow the API endpoint pattern established in Phase 2 and authentication flow from Phase 1.</action>
<verify>curl -X GET http://localhost:3000/api/calendar/apple/oauth returns a successful redirect</verify>
<done>Route successfully handles Apple OAuth and stores token in DB for user</done>
</task>
</tasks>
<verification>

View File

@ -4,11 +4,10 @@ plan: 02
type: execute
wave: 1
depends_on: []
files_modified: [src/lib/calendar-sync.ts, src/app/api/calendar/sync/route.ts, src/components/CalendarSettings.tsx]
files_modified: [src/lib/calendar-sync.ts, src/app/api/calendar/sync/route.ts]
autonomous: true
must_haves:
truths:
- "User can see calendar events alongside tasks in weekly view"
- "User can manage calendar connection settings from the application"
- "User's tasks and calendar events are synchronized bidirectionally"
artifacts:
@ -18,14 +17,7 @@ must_haves:
- path: "src/app/api/calendar/sync/route.ts"
provides: "API endpoint for triggering calendar synchronization"
exports: ["POST"]
- path: "src/components/CalendarSettings.tsx"
provides: "UI component to manage calendar connections and sync settings"
min_lines: 40
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"
to: "src/lib/calendar-sync.ts"
via: "import and use"
@ -90,35 +82,18 @@ Output: Bidirectional synchronization logic, sync API endpoint, and calendar set
<done>Endpoint successfully triggers sync process and returns status JSON</done>
</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>
<verification>
Verify that all components work in concert:
1. Calendar settings UI displays connected calendars
2. Manual sync button triggers the sync API endpoint
3. Sync process retrieves events from calendars
4. Events are properly imported as tasks (when applicable)
5. Tasks can be exported to calendars (when configured)
6. Settings persist between sessions
1. Manual sync button triggers the sync API endpoint
2. Sync process retrieves events from calendars
3. Events are properly imported as tasks (when applicable)
4. Tasks can be exported to calendars (when configured)
5. Settings persist between sessions
</verification>
<success_criteria>
- Users can see calendar events alongside tasks in the weekly view
- Users can manage calendar connections and sync settings from UI
- Bidirectional synchronization works between calendar events and tasks
- Events are properly imported from calendars to tasks

View File

@ -0,0 +1,119 @@
---
phase: 03-calendar-integration
plan: 03
type: execute
wave: 1
depends_on: []
files_modified: [src/components/WeeklyView.tsx, src/lib/calendar-events.ts]
autonomous: true
must_haves:
truths:
- "User can view calendar events alongside tasks in weekly view"
artifacts:
- path: "src/components/WeeklyView.tsx"
provides: "Weekly view component that displays both tasks and calendar events"
min_lines: 50
- path: "src/lib/calendar-events.ts"
provides: "Utility functions for fetching and formatting calendar events for display"
min_lines: 20
key_links:
- from: "src/components/WeeklyView.tsx"
to: "src/lib/calendar-events.ts"
via: "import and use"
pattern: "import.*calendar-events"
---
<objective>
Implement calendar event display functionality in the weekly view to show calendar events alongside tasks.
Purpose: Enable users to see their calendar events integrated with their weekly task view.
Output: Weekly view component that displays calendar events and utility functions for event formatting.
</objective>
<execution_context>
@~/.config/opencode/get-shit-done/workflows/execute-plan.md
@~/.config/opencode/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/REQUIREMENTS.md
# Relevant context from previous phases
@.planning/phases/01-setup-and-authentication/01-01-PLAN.md
@.planning/phases/01-setup-and-authentication/01-02-PLAN.md
@.planning/phases/02-task-management/02-01-PLAN.md
@.planning/phases/03-calendar-integration/03-01-PLAN.md
@.planning/phases/03-calendar-integration/03-02-PLAN.md
</context>
<tasks>
<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>
<task type="auto">
<name>Add Calendar Event Display Configuration</name>
<files>src/components/CalendarSettings.tsx</files>
<action>Enhance the CalendarSettings component to include:
- Toggle for showing/hiding calendar events in the weekly view
- Color customization for different calendar sources
- Filtering options for event types or calendars
- Settings persistence across sessions
Follow UI patterns from Phase 1 and component architecture from Phase 2.</action>
<verify>Component renders without error and allows configuration of event display</verify>
<done>Component allows users to configure calendar event display settings</done>
</task>
</tasks>
<verification>
Verify that all components work in concert:
1. Calendar events appear alongside tasks in the weekly view
2. Events are properly formatted and differentiated from tasks
3. Event display settings can be configured and persisted
4. Clicking on calendar events provides appropriate interaction
5. No duplication occurs between tasks and calendar events
</verification>
<success_criteria>
- 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
- Event interaction works as expected
- No duplication occurs between tasks and events
</success_criteria>
<output>
After completion, create `.planning/phases/03-calendar-integration/03-03-SUMMARY.md`
</output>