plan-adjuster

nadavyigal's avatarfrom nadavyigal

Recomputes upcoming workouts based on recent runs, feedback, and safety limits.

⭐1stars🔀0forks📁View on GitHub🕐Updated Jan 3, 2026

When & Why to Use This Skill

The plan-adjuster skill is an advanced AI-driven optimization tool designed to provide adaptive fitness coaching by dynamically recalibrating training plans. It analyzes recent run telemetry, user feedback, and physiological safety limits to ensure that every workout is tailored to the user's current physical readiness. By automating the complex logic of training load management, it helps users optimize their performance while minimizing the risk of overtraining and injury.

Use Cases

  • Adaptive Workout Scaling: Automatically adjusting the intensity and volume of upcoming sessions based on the RPE (Rate of Perceived Exertion) and performance data from recent runs.
  • Recovery-Based Planning: Proactively modifying the training schedule to prioritize rest or low-intensity activities when user feedback indicates poor sleep quality or high muscle soreness.
  • Safety-Regulated Progression: Implementing deterministic safety caps and guardrails to ensure that AI-proposed increases in training load remain within safe physiological limits.
nameplan-adjuster
descriptionRecomputes upcoming workouts based on recent runs, feedback, and safety limits.
short-descriptionAdaptive adjustment of future sessions with change logs and recovery tips.

When Codex should use it

  • Nightly job or immediately after a run is logged.
  • When the user reports fatigue/injury or requests easier/harder weeks.

Invocation guidance

  1. Load Plan, Workout, TrainingHistory, and RecentRunTelemetry[].
  2. Apply deterministic ceilings from v0/lib/planAdaptationEngine.ts and v0/lib/plan-complexity-engine.ts before calling the model.
  3. Return Adjustment[], optional RecoveryRecommendation, and confidence.

Input schema (JSON)

{
  "profile": UserProfile,
  "currentPlan": Plan,
  "trainingHistory": TrainingHistory,
  "feedback": { "rpeTrend"?: number, "soreness"?: string, "sleepQuality"?: string }
}

Output schema (JSON)

{
  "appliedAt": string,
  "updates": Adjustment[],
  "recovery"?: RecoveryRecommendation,
  "confidence": "low" | "medium" | "high",
  "safetyFlags"?: SafetyFlag[]
}

Integration points

  • API: v0/app/api/plan/adjust (to add), or chat-triggered adjustments.
  • Logic: v0/lib/planAdjustmentService.ts, v0/lib/planAdaptationEngine.ts.
  • UI: Plan/Today screens (badge adjusted sessions) and notifications via v0/lib/email.ts.

Safety & guardrails

  • Never rewrite completed history; adjust only future sessions.
  • If fatigue/injury signals present, lower intensity/volume and consider rest-day insertion.
  • Emit SafetyFlag on unsafe load proposals; clamp to deterministic caps.

Telemetry

  • Emit ai_skill_invoked and ai_adjustment_applied with adjustments_count, confidence, safety_flags.