Recomputes upcoming workouts based on recent runs and user feedback. Use when recent performance deviates from plan, user provides negative feedback, or recovery signals indicate adjustment needed with deterministic safety caps.
Plan, Workout, TrainingHistory, and RecentRunTelemetry[].v0/lib/planAdaptationEngine.ts and v0/lib/plan-complexity-engine.ts before calling the model.Adjustment[], optional RecoveryRecommendation, and confidence.{
"profile": UserProfile,
"currentPlan": Plan,
"trainingHistory": TrainingHistory,
"feedback": { "rpeTrend"?: number, "soreness"?: string, "sleepQuality"?: string }
}
{
"appliedAt": string,
"updates": Adjustment[],
"recovery"?: RecoveryRecommendation,
"confidence": "low" | "medium" | "high",
"safetyFlags"?: SafetyFlag[]
}
v0/app/api/plan/adjust (to add), or chat-triggered adjustments.v0/lib/planAdjustmentService.ts, v0/lib/planAdaptationEngine.ts.v0/lib/email.ts.SafetyFlag on unsafe load proposals; clamp to deterministic caps.ai_skill_invoked and ai_adjustment_applied with adjustments_count, confidence, safety_flags.