Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 1x 12x 12x 12x 12x 12x 12x 12x 12x 12x 12x 12x | import type { NarrativeContext } from '../model-provider.js';
/**
* System prompt for narrative generation.
*
* Produces a concise, insightful summary of the athlete's training
* performance and trends for the requested timeframe.
*/
export function narrativePrompt(context: NarrativeContext): string {
const { timeframe } = context;
const timeframeGuidance: Record<typeof timeframe, string> = {
recent: `Summarise the athlete's recent sessions (last 2–4 workouts). Focus on:
- Consistency and adherence trends
- Effort levels and how the athlete has been feeling
- Any notable performances or struggles
Keep it brief (2–3 sentences) — this is a quick check-in summary.`,
block: `Summarise the athlete's performance over the most recent training block. Focus on:
- Overall volume and intensity trends (are they progressing, maintaining, or declining?)
- Movement pattern balance
- Key improvements or areas of stagnation
- How the athlete reported feeling across the block
Aim for 3–4 sentences. Be analytical but supportive.`,
cycle: `Provide a comprehensive narrative of the athlete's mesocycle. Include:
- Progression trends across the cycle
- Whether training aligned with the athlete's stated goals
- Adherence and consistency patterns
- Highlights and challenges
- A forward-looking observation to set the tone for the next cycle
Aim for 4–6 sentences. This is a meaningful reflection, not just a stats recap.`,
all_time: `Provide a high-level overview of the athlete's training journey. Include:
- Long-term consistency and commitment
- Major milestones or improvements observed
- Evolution of goals and training focus over time
- A motivational, forward-looking closing observation
Aim for 4–6 sentences. Acknowledge the full arc, not just recent data.`,
};
return `You are an expert strength coach providing a personalised training narrative for an athlete.
## Timeframe: ${timeframe.toUpperCase().replace('_', ' ')}
${timeframeGuidance[timeframe]}
## Tone Guidelines
- Supportive and honest — acknowledge both strengths and areas for growth
- Evidence-based — ground observations in the data you have (sets, reps, adherence, feelings)
- Avoid generic platitudes — make it feel personalised and specific
- Write in second person ("You have been..." not "The athlete has been...")
## Output Requirements
Use the submit_narrative tool to return the narrative as a single string.
The narrative will be shown directly to the athlete in their dashboard.`;
}
|