When Cursor should use this skill
- Nightly job or immediately after a run is logged
- When the user reports fatigue/injury or requests easier/harder weeks
- When performance data indicates plan adjustment is needed
- When implementing adaptive training features or debugging adjustment logic
Invocation guidance
- Load
Plan, Workout, TrainingHistory, and RecentRunTelemetry[].
- Apply deterministic ceilings from
v0/lib/planAdaptationEngine.ts and v0/lib/plan-complexity-engine.ts before calling the model.
- Return
Adjustment[], optional RecoveryRecommendation, and confidence.
- Only adjust future workouts - never modify completed runs.
- Maintain weekly volume within safe limits (±20-30%).
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 - Adjustment orchestration
v0/lib/planAdaptationEngine.ts - Adaptive algorithms
v0/lib/plan-complexity-engine.ts - Safety caps
- UI: Plan/Today screens (badge adjusted sessions)
- Notifications:
v0/lib/email.ts - Email user about significant adjustments
- Database: Update
workouts table, log adjustments in plan_adjustments (if added)
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.
- Maintain at least one rest day per week.
- If multiple negative signals, reduce load by at least one level.
- Hard stop on pain/injury mentions - recommend rest and professional consultation.
Adjustment types and triggers
Intensity adjustments
- Trigger: High RPE trend (>7 for easy runs), poor sleep, soreness
- Action: Reduce pace target by 15-30 seconds/km, lower HR zone
- Example: Tempo → Easy, Intervals → Tempo
Volume adjustments
- Trigger: Missed runs, fatigue, low consistency
- Action: Reduce duration by 10-30%, maintain intensity
- Example: 60min easy → 45min easy
Session swaps
- Trigger: Schedule conflicts, weather, preferences
- Action: Reschedule within same week, maintain weekly pattern
- Example: Tuesday intervals ↔ Thursday tempo
Rest day insertion
- Trigger: Multiple fatigue signals, injury risk, poor recovery
- Action: Replace easy run with rest or cross-training
- Example: Easy run → Rest day
Cross-training substitution
- Trigger: Soreness, minor injury, surface limitations
- Action: Replace easy run with cycling/swimming/walking
- Example: Easy run → 45min cycling
Telemetry
- Emit
ai_skill_invoked and ai_adjustment_applied with:
adjustments_count
confidence
safety_flags
adjustment_types (array of change types)
user_id (hashed)
latency_ms
Common edge cases
- No adjustment needed: Return empty adjustments array, confirm plan is on track
- Conflicting signals: Prioritize safety, default to more conservative option
- Major deviation: Consider full plan regeneration instead of adjustments
- Peak training: Allow slightly higher load if race is imminent and recovery is adequate
- Taper period: Protect taper, only minor adjustments allowed
Testing considerations
- Test with various feedback combinations (RPE, soreness, sleep)
- Verify load caps are enforced
- Test that completed runs are never modified
- Validate adjustment rationale clarity
- Test with missing data (partial feedback)
- Verify SafetyFlag emission for risky adjustments
1---2name: plan-adjuster3description: 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.4---5
6## When Cursor should use this skill
7- Nightly job or immediately after a run is logged
8- When the user reports fatigue/injury or requests easier/harder weeks
9- When performance data indicates plan adjustment is needed
10- When implementing adaptive training features or debugging adjustment logic
11
12## Invocation guidance
131. Load `Plan`, `Workout`, `TrainingHistory`, and `RecentRunTelemetry[]`.
142. Apply deterministic ceilings from `v0/lib/planAdaptationEngine.ts` and `v0/lib/plan-complexity-engine.ts` before calling the model.
153. Return `Adjustment[]`, optional `RecoveryRecommendation`, and `confidence`.
164. Only adjust future workouts - never modify completed runs.
175. Maintain weekly volume within safe limits (±20-30%).
18
19## Input schema (JSON)
20```ts
21{
22 "profile": UserProfile,
23 "currentPlan": Plan,
24 "trainingHistory": TrainingHistory,
25 "feedback": { "rpeTrend"?: number, "soreness"?: string, "sleepQuality"?: string }
26}
27```
28
29## Output schema (JSON)
30```ts
31{
32 "appliedAt": string,
33 "updates": Adjustment[],
34 "recovery"?: RecoveryRecommendation,
35 "confidence": "low" | "medium" | "high",
36 "safetyFlags"?: SafetyFlag[]
37}
38```
39
40## Integration points
41- **API**: `v0/app/api/plan/adjust` (to add), or chat-triggered adjustments
42- **Logic**:
43 - `v0/lib/planAdjustmentService.ts` - Adjustment orchestration
44 - `v0/lib/planAdaptationEngine.ts` - Adaptive algorithms
45 - `v0/lib/plan-complexity-engine.ts` - Safety caps
46- **UI**: Plan/Today screens (badge adjusted sessions)
47- **Notifications**: `v0/lib/email.ts` - Email user about significant adjustments
48- **Database**: Update `workouts` table, log adjustments in `plan_adjustments` (if added)
49
50## Safety & guardrails
51- Never rewrite completed history; adjust only future sessions.
52- If fatigue/injury signals present, lower intensity/volume and consider rest-day insertion.
53- Emit `SafetyFlag` on unsafe load proposals; clamp to deterministic caps.
54- Maintain at least one rest day per week.
55- If multiple negative signals, reduce load by at least one level.
56- Hard stop on pain/injury mentions - recommend rest and professional consultation.
57
58## Adjustment types and triggers
59
60### Intensity adjustments
61- **Trigger**: High RPE trend (>7 for easy runs), poor sleep, soreness
62- **Action**: Reduce pace target by 15-30 seconds/km, lower HR zone
63- **Example**: Tempo → Easy, Intervals → Tempo
64
65### Volume adjustments
66- **Trigger**: Missed runs, fatigue, low consistency
67- **Action**: Reduce duration by 10-30%, maintain intensity
68- **Example**: 60min easy → 45min easy
69
70### Session swaps
71- **Trigger**: Schedule conflicts, weather, preferences
72- **Action**: Reschedule within same week, maintain weekly pattern
73- **Example**: Tuesday intervals ↔ Thursday tempo
74
75### Rest day insertion
76- **Trigger**: Multiple fatigue signals, injury risk, poor recovery
77- **Action**: Replace easy run with rest or cross-training
78- **Example**: Easy run → Rest day
79
80### Cross-training substitution
81- **Trigger**: Soreness, minor injury, surface limitations
82- **Action**: Replace easy run with cycling/swimming/walking
83- **Example**: Easy run → 45min cycling
84
85## Telemetry
86- Emit `ai_skill_invoked` and `ai_adjustment_applied` with:
87 - `adjustments_count`
88 - `confidence`
89 - `safety_flags`
90 - `adjustment_types` (array of change types)
91 - `user_id` (hashed)
92 - `latency_ms`
93
94## Common edge cases
95- **No adjustment needed**: Return empty adjustments array, confirm plan is on track
96- **Conflicting signals**: Prioritize safety, default to more conservative option
97- **Major deviation**: Consider full plan regeneration instead of adjustments
98- **Peak training**: Allow slightly higher load if race is imminent and recovery is adequate
99- **Taper period**: Protect taper, only minor adjustments allowed
100
101## Testing considerations
102- Test with various feedback combinations (RPE, soreness, sleep)
103- Verify load caps are enforced
104- Test that completed runs are never modified
105- Validate adjustment rationale clarity
106- Test with missing data (partial feedback)
107- Verify SafetyFlag emission for risky adjustments