feat: implement Phase 2 Core features for AutoScheduler GTD System

- ConnectWise Manage Integration:
  - ConnectWiseModule with service, controller, entity
  - API endpoints for connection CRUD and sync
  - Syncs service tickets, project tickets, zero-ticket projects
  - Stores ConnectWise priority/SLA in task metadata

- Intelligent Calendar Scheduling:
  - CalendarModule with connection and event entities
  - Support for CalDAV, Microsoft Graph, Google Calendar providers
  - CalendarService with sync methods for all providers
  - SchedulingModule with automatic scheduling engine
  - Finds available slots respecting working hours
  - Groups tasks by context, respects priority and due dates

- Interactive Calendar Week View:
  - FullCalendar with timeGridWeek view
  - Drag-and-drop task rescheduling
  - Tasks auto-lock when manually moved
  - Color-coded by context
  - Regenerate Schedule button

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-11 09:58:15 +00:00
parent e7ffcce768
commit 9c6b85f28a
29 changed files with 1863 additions and 47 deletions

View File

@@ -1,28 +1,30 @@
---
active: true
iteration: 1
max_iterations: 30
completion_promise: "PHASE_1_COMPLETE"
started_at: "2026-01-11T08:23:00Z"
max_iterations: 40
completion_promise: "PHASE_2_COMPLETE"
started_at: "2026-01-11T09:43:37Z"
---
# Phase 1: Foundation
# Phase 2: Core
## Context
Read PROMPT.md for full project requirements and context.
This prompt focuses ONLY on Phase 1: Foundation.
This prompt focuses ONLY on Phase 2: Core.
## Phase Objective
Project setup, core infrastructure, and initial configuration
Main functionality and core features implementation
## Phase 1 Tasks
## Phase 2 Tasks
- [ ] GTD Inbox Capture: Multi-source task capture system that ingests tasks from manual web form, REST API, email (IMAP/Microsoft Graph), and ConnectWise Manage sync into an unprocessed inbox for later GTD clarification
- Acceptance: Manual tasks can be submitted via web form quick-add and appear in inbox
- [ ] GTD Processing Workflow: Interactive inbox processing interface that guides users through GTD clarification: converting raw inbox items into Next Actions with context tags, Projects, Waiting For items, Someday/Maybe, Reference Material, Tickler items, or Trash
- Acceptance: Inbox view displays unprocessed items with processing workflow controls
- [ ] ConnectWise Manage Integration: Read-only sync from ConnectWise Manage that imports service tickets, project tickets, and projects assigned to user. Projects with zero tickets surface as planning tasks. ConnectWise priority/SLA displayed for reference only; user assigns manual priority
- Acceptance: ConnectWise API integration syncs assigned service tickets as inbox items
- [ ] Intelligent Calendar Scheduling: Automatic scheduling engine that pulls from CalDAV calendars (Nextcloud, Google Calendar, Outlook via Microsoft Graph) and places actionable tasks into available time slots, respecting working hours, context constraints, deadlines, and manual priority. Supports drag-drop manual override and task locking
- Acceptance: Engine reads existing events from CalDAV/Google/Outlook calendars
- [ ] Interactive Calendar Week View: React SPA with interactive week-view calendar displaying scheduled tasks and calendar events. Supports drag-and-drop task rescheduling, manual time adjustments, and real-time updates when scheduling changes occur
- Acceptance: Week view renders all scheduled tasks and synced calendar events
## Working Instructions
@@ -46,7 +48,7 @@ Project setup, core infrastructure, and initial configuration
## Verification
After completing all Phase 1 tasks:
After completing all Phase 2 tasks:
```bash
npm run build && npm run test && npm run lint
```
@@ -55,12 +57,12 @@ All commands must pass with zero errors.
## Completion
When ALL Phase 1 tasks are complete and verified:
When ALL Phase 2 tasks are complete and verified:
- All features for this phase pass their acceptance criteria
- prd.json shows passes: true for all Phase 1 features
- prd.json shows passes: true for all Phase 2 features
- Build, test, and lint all pass
Output: <promise>PHASE_1_COMPLETE</promise>
Output: <promise>PHASE_2_COMPLETE</promise>
If blocked and cannot proceed:
Output: <promise>ABORT_BLOCKED</promise>