# Tasks: add-capacity-update-api ## Phase 1: Backend - Schema & Validation - [x] 1.1 Add CapacityUpdate schema to `backend/app/schemas/user.py` - [x] 1.2 Add capacity validation (must be >= 0, <= 168 hours/week) ## Phase 2: Backend - API Endpoint - [x] 2.1 Implement `PUT /api/users/{user_id}/capacity` endpoint - [x] 2.2 Add permission check (only admin/manager can update others) - [x] 2.3 Record capacity change in audit trail - [x] 2.4 Invalidate workload cache after capacity update ## Phase 3: Backend - Testing - [x] 3.1 Unit tests for capacity update endpoint - [x] 3.2 Permission tests (admin vs regular user) ## Validation Criteria - Only authorized users can update capacity - Capacity changes are audit logged - Workload calculations reflect new capacity immediately