TrainingPeaks activity creator
Use this skill for TrainingPeaks activity creation and editing work.
Core rules
- Prefer the TrainingPeaks integration tools over browser automation when they can do the job.
- Read the current plan or source instructions first before creating or editing an activity.
- Check the athlete's current operating mode before publishing. If the athlete record says live TrainingPeaks is managed by an external primary coach, do not create or update live TrainingPeaks workouts from Coach Luca planning unless the operator explicitly requests that live publish.
- When creating workouts from a written plan, preserve the planned session intent, structure, and athlete-facing wording.
- Do not add internal provenance, source, or tag notes to visible TrainingPeaks descriptions, for example
Created by Coach Luca from the canonical calendar plan. Tag: luca.. Tags belong in the TrainingPeaks tag field only. - Use
create-workoutfor workout authoring decisions. This skill owns TrainingPeaks translation and publication, not the upstream design of the workout object itself. - Before creating or updating any structured bike workout, read the athlete's live TrainingPeaks settings and validate that the intended %FTP targets map sensibly to the athlete's current TP power-zone table.
- Do not assume coach zone language in the calendar, for example Z1, Z2, Z3, or threshold, will match the zone numbers shown inside TrainingPeaks.
- If the athlete's live TP power-zone table does not align with the coaching-zone language, do not silently publish the workout as though it matches. Either normalize the TP zone settings first when the tool path supports it, or explicitly label every step with the intended %FTP targets and report the mismatch to the operator.
- For activities created by Coach Luca or this system, attempt to add the
lucatag in TrainingPeaks so Luca-created items can be filtered in or out easily. - Do not add a separate
lucafield to the/calendar/YYYY-MM-DD.mdactivity objects just to support this TrainingPeaks tagging rule. - When revising an existing Coach Luca-created TrainingPeaks activity, attempt to preserve the
lucatag and add it if it is missing. - Current TrainingPeaks tag behavior: the live workout endpoint persists tags through
userTags, while the MCP tool interface still acceptstagsand translates that to the correct live field. Use comma-separated tag strings when multiple tags are needed, for exampleluca,red. - For cycling sessions, prefer structured workouts whenever the plan can be represented generically enough to guide execution on the head unit, even when the final day-of decision may still depend on constraints or same-morning feedback.
- Select the correct TrainingPeaks activity type so the calendar icon and sport classification are already correct, for example Road, MTB, CX, or Strength as appropriate.
- Do not use redundant title prefixes such as
Road -,MTB -,CX -, orStrength -when the correct activity type already communicates that information. - Use the canonical calendar activity title as the source title unless the operator explicitly wants a TP-specific override.
- Do not set a planned start time unless the user explicitly wants one.
- Do not add zone explanations or educational descriptions of zones in TrainingPeaks activities or related athlete-facing planning unless the athlete explicitly asks for that explanation. Assume professional cyclists already know their zones.
- Do not revise or delete activities beyond the scope explicitly requested.
- When deleting, delete only the specific activity or activities the user identified.
- If a deleted TrainingPeaks workout or activity came from a canonical calendar object that contains
- TrainingPeaks ID: ..., remove that line from the matching calendar item in the sourceathlete/calendar/YYYY-MM-DD.mdfile as part of the same task. - Match the correct calendar object before removing the ID line. Do not remove unrelated
TrainingPeaks IDlines from other items on the same day. - TrainingPeaks calendar notes may be separate objects from planned workouts or activities. If the request includes notes, day-off notes, or recovery-day notes, verify and remove those separately rather than assuming workout deletion also clears the notes.
- After bulk deletion of planned workouts, re-check the calendar for remaining notes or non-workout items in the same date range and clean them up in a separate step when needed.
- Use Canadian English in athlete-visible TrainingPeaks workout descriptions for Sidney unless the operator explicitly requests otherwise. Use
Fuelling, notFueling. - After creating, updating, or deleting items, report exactly what was created, changed, or removed, including workout IDs when available.
Minimum workflow
- Read the current plan or instructions.
- Identify the exact date, sport, title, structure, and required tags.
- For structured bike workouts, compare the planned %FTP targets against the athlete's live TP power-zone table before publishing.
- Create, update, move, or delete the TrainingPeaks activity using the integration tools.
- Attempt to ensure Coach Luca-created activities carry the
lucatag. - Use structured workout fields when the session has clear intervals.
- If the TP zone model and coaching-zone language are mismatched, label workout steps explicitly with %FTP targets before saving and report the mismatch.
- If a new TrainingPeaks activity or workout is created from a canonical calendar object, write the returned
workout_idback into that source calendar object as- TrainingPeaks ID: ...before considering the task complete. - If a TrainingPeaks workout or activity is deleted and the source calendar object contains a
TrainingPeaks IDline for that deleted object, remove that line from the matching calendar item before considering the task complete. - If deleting a block, verify whether calendar notes remain after workout deletion and remove them as a separate cleanup pass when required.
- Confirm the result precisely.
Notes
-
When a canonical calendar file exists for the target date, prefer using that file as the primary source for the planned activity before creating or revising the external TrainingPeaks object.
-
When a new TrainingPeaks object is created from a canonical calendar object, treat calendar writeback as part of the same task. Add the returned
TrainingPeaks IDto the matching calendar object immediately rather than leaving the calendar and TP states unsynced. -
When a TrainingPeaks object is deleted and that object came from a canonical calendar object, treat calendar cleanup as part of the same task. Remove the matching
TrainingPeaks IDline immediately rather than leaving the calendar and TP states unsynced. -
For TrainingPeaks event objects, map unsupported calendar race surfaces to the closest supported TrainingPeaks event type rather than leaving the event type blank or undefined. For gravel races, use the TrainingPeaks road-cycling or road-bike event type fallback.
-
For TrainingPeaks event objects, derive event priority from the confirmed planning hierarchy when available, for example the athlete
context/season-goals.mdpriority table, and map A, B, or C directly into TrainingPeaks. -
After creating or updating a TrainingPeaks event, read the event back and verify that the intended event type and priority actually persisted. Do not assume the write stuck just because the API returned success.
-
For simple endurance or recovery sessions, still prefer a real structured workout when a generic warm-up, endurance, tempo, or threshold pattern can represent the intended session without misleading the athlete.
-
If
athlete/skills/trainingpeaks-activity-creator/SKILL.mdexists, read and apply it before athlete-specific TrainingPeaks write or analysis work. -
If asked for an analysis of the athlete's other-coached-managed planned or completed workouts, use TrainingPeaks as an evidence source.
-
Interpret the session and likely coaching intent, then save the resulting feedback and athlete guidance into athletes daily log or the requested coaching document rather than overwriting any other-coach-managed live TrainingPeaks planning by default.
-
For other-coach-managed workout analysis, do not assess from
tp_get_workoutslist output alone. Always open the full workout detail withtp_get_workout, explicitly inspectcoach_commentsand the latest effective instructions, and check the current athlete analysis notes or daily-log interpretation before giving any risk or intent assessment. -
For interval sessions, threshold sessions, and other clearly defined sets, create a structured workout whenever practical.
-
When the calendar file includes a
### Structured workoutsection, treat that as the primary source for the TrainingPeaks structured workout payload. -
Keep contingencies, approval gates, and symptom-dependent overrides in the description or constraints, but do not downgrade the external TrainingPeaks item to a notes-only entry merely because the session includes conditions.
-
Double-check that the selected sport or activity type matches the session before creating or updating the activity.
-
Do not add explanatory text about what zones mean in athlete-facing activity descriptions unless the athlete explicitly requests it.
-
If the integration path returns a validation error, simplify the payload and retry with the minimum fields needed.
-
If a TrainingPeaks event create or update call reports success but the readback still shows
eventType: Undefinedor a missing priority, report that clearly as a live TP API limitation or mapping issue rather than assuming the event metadata was set correctly. -
When a delete request mentions both activities and notes, treat that as a two-part cleanup task: workouts first, notes second, with verification between steps.
Completion standard
The task is complete only when:
- the intended TrainingPeaks object was created, updated, moved, or deleted successfully
- any required zone-model mismatch was surfaced clearly
- any newly created TrainingPeaks object sourced from a calendar item has its
TrainingPeaks IDwritten back into the source calendar object - any deleted TrainingPeaks object sourced from a calendar item has its matching
TrainingPeaks IDremoved from the source calendar object - the reported result includes the relevant workout IDs when available
Creator-tag policy
- In this workspace, activities created by Coach Luca or this system should attempt to carry the
lucatag in TrainingPeaks so Luca-created items can be filtered in or out easily. - When revising an existing Coach Luca-created TrainingPeaks activity, attempt to preserve the
lucatag and add it if it is missing. - Current TrainingPeaks tag behavior: the live workout endpoint persists tags through
userTags, while the MCP tool interface still acceptstagsand translates that to the correct live field. Use comma-separated tag strings when multiple tags are needed, for exampleluca,red.