endurance-coach 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +3 -0
  2. package/dist/cli.js +318 -35
  3. package/dist/expander/expander.d.ts +20 -0
  4. package/dist/expander/expander.js +339 -0
  5. package/dist/expander/index.d.ts +8 -0
  6. package/dist/expander/index.js +9 -0
  7. package/dist/expander/types.d.ts +169 -0
  8. package/dist/expander/types.js +6 -0
  9. package/dist/expander/zones.d.ts +50 -0
  10. package/dist/expander/zones.js +159 -0
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.js +9 -1
  13. package/dist/schema/compact-plan.d.ts +175 -0
  14. package/dist/schema/compact-plan.js +64 -0
  15. package/dist/schema/compact-plan.schema.d.ts +277 -0
  16. package/dist/schema/compact-plan.schema.js +205 -0
  17. package/dist/templates/index.d.ts +10 -0
  18. package/dist/templates/index.js +13 -0
  19. package/dist/templates/interpolate.d.ts +51 -0
  20. package/dist/templates/interpolate.js +204 -0
  21. package/dist/templates/loader.d.ts +19 -0
  22. package/dist/templates/loader.js +129 -0
  23. package/dist/templates/template.schema.d.ts +401 -0
  24. package/dist/templates/template.schema.js +101 -0
  25. package/dist/templates/template.types.d.ts +155 -0
  26. package/dist/templates/template.types.js +7 -0
  27. package/dist/templates/yaml-parser.d.ts +15 -0
  28. package/dist/templates/yaml-parser.js +18 -0
  29. package/package.json +2 -1
  30. package/templates/bike/CLAUDE.md +7 -0
  31. package/templates/bike/easy.yaml +38 -0
  32. package/templates/bike/endurance.yaml +42 -0
  33. package/templates/bike/hills.yaml +80 -0
  34. package/templates/bike/overunders.yaml +81 -0
  35. package/templates/bike/rest.yaml +16 -0
  36. package/templates/bike/sweetspot.yaml +80 -0
  37. package/templates/bike/tempo.yaml +79 -0
  38. package/templates/bike/threshold.yaml +83 -0
  39. package/templates/bike/vo2max.yaml +84 -0
  40. package/templates/brick/CLAUDE.md +7 -0
  41. package/templates/brick/halfironman.yaml +72 -0
  42. package/templates/brick/ironman.yaml +72 -0
  43. package/templates/brick/olympic.yaml +70 -0
  44. package/templates/brick/sprint.yaml +70 -0
  45. package/templates/plan-viewer.html +22 -22
  46. package/templates/run/CLAUDE.md +7 -0
  47. package/templates/run/easy.yaml +36 -0
  48. package/templates/run/fartlek.yaml +40 -0
  49. package/templates/run/hills.yaml +36 -0
  50. package/templates/run/intervals.1k.yaml +63 -0
  51. package/templates/run/intervals.400.yaml +63 -0
  52. package/templates/run/intervals.800.yaml +63 -0
  53. package/templates/run/intervals.mile.yaml +64 -0
  54. package/templates/run/long.yaml +41 -0
  55. package/templates/run/progression.yaml +49 -0
  56. package/templates/run/race.5k.yaml +36 -0
  57. package/templates/run/recovery.yaml +36 -0
  58. package/templates/run/rest.yaml +16 -0
  59. package/templates/run/strides.yaml +49 -0
  60. package/templates/run/tempo.yaml +56 -0
  61. package/templates/run/threshold.yaml +56 -0
  62. package/templates/strength/CLAUDE.md +7 -0
  63. package/templates/strength/core.yaml +56 -0
  64. package/templates/strength/foundation.yaml +65 -0
  65. package/templates/strength/full.yaml +73 -0
  66. package/templates/strength/maintenance.yaml +62 -0
  67. package/templates/swim/CLAUDE.md +7 -0
  68. package/templates/swim/aerobic.yaml +67 -0
  69. package/templates/swim/easy.yaml +51 -0
  70. package/templates/swim/openwater.yaml +60 -0
  71. package/templates/swim/rest.yaml +16 -0
  72. package/templates/swim/technique.yaml +67 -0
  73. package/templates/swim/threshold.yaml +75 -0
  74. package/templates/swim/vo2max.yaml +88 -0
@@ -0,0 +1,7 @@
1
+ <claude-mem-context>
2
+ # Recent Activity
3
+
4
+ <!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
5
+
6
+ _No recent activity_
7
+ </claude-mem-context>
@@ -0,0 +1,36 @@
1
+ id: easy
2
+ name: Easy Run
3
+ sport: run
4
+ type: endurance
5
+ category: endurance
6
+
7
+ params:
8
+ duration:
9
+ type: int
10
+ required: true
11
+ default: 30
12
+ min: 15
13
+ max: 90
14
+ description: Duration in minutes
15
+
16
+ structure:
17
+ main:
18
+ - type: work
19
+ name: Easy Run
20
+ duration: "${duration}min"
21
+ pace: "${paces.easy}"
22
+ intensity: Zone 2
23
+
24
+ humanReadable: |
25
+ EASY RUN - ${duration} minutes
26
+
27
+ Run at a comfortable, conversational pace.
28
+ Pace: ${paces.easy}
29
+
30
+ Keep heart rate in Zone 2. You should be able to
31
+ hold a conversation throughout.
32
+
33
+ estimatedDuration: "${duration}"
34
+ targetZone: Z2
35
+ rpe: "4-5"
36
+ notes: Foundation aerobic work
@@ -0,0 +1,40 @@
1
+ id: fartlek
2
+ name: Fartlek
3
+ sport: run
4
+ type: intervals
5
+ category: speed
6
+
7
+ params:
8
+ duration:
9
+ type: int
10
+ required: true
11
+ default: 40
12
+ min: 25
13
+ max: 60
14
+ description: Total duration in minutes
15
+
16
+ humanReadable: |
17
+ FARTLEK - ${duration} minutes
18
+
19
+ "Speed play" - unstructured intervals based on feel.
20
+
21
+ WARM-UP: 10 min easy @ ${paces.easy}
22
+
23
+ MAIN SET (~${duration - 20} min):
24
+ Alternate between fast bursts (30s-3min) and
25
+ easy recovery jogs. Use landmarks, music, or
26
+ feel to dictate when to push and when to recover.
27
+
28
+ Suggested structure:
29
+ - 6-10 fast efforts of varying lengths
30
+ - Recovery should be at least equal to effort time
31
+ - Fast efforts range from 5K to mile pace
32
+
33
+ COOL-DOWN: 10 min easy
34
+
35
+ This is meant to be fun! Don't overthink it.
36
+
37
+ estimatedDuration: "${duration}"
38
+ targetZone: Z2-Z5
39
+ rpe: "5-8"
40
+ notes: Develops speed and race awareness without rigid structure
@@ -0,0 +1,36 @@
1
+ id: hills
2
+ name: Hill Repeats
3
+ sport: run
4
+ type: hills
5
+ category: hills
6
+
7
+ params:
8
+ reps:
9
+ type: int
10
+ required: true
11
+ default: 6
12
+ min: 4
13
+ max: 12
14
+ description: Number of hill repeats
15
+
16
+ humanReadable: |
17
+ HILL REPEATS
18
+
19
+ WARM-UP: 10 min easy @ ${paces.easy}
20
+
21
+ MAIN SET:
22
+ ${reps} × hill repeats (60-90 seconds uphill)
23
+ - Run uphill at hard effort (RPE 8)
24
+ - Jog/walk back down for recovery
25
+ - Focus on driving knees and pumping arms
26
+ - Stay tall, don't lean too far forward
27
+
28
+ Find a hill with moderate grade (4-8%).
29
+ Each rep should feel challenging but sustainable.
30
+
31
+ COOL-DOWN: 10 min easy on flat terrain
32
+
33
+ estimatedDuration: "${10 + (reps * 4) + 10}"
34
+ targetZone: Z4-Z5
35
+ rpe: "7-8"
36
+ notes: Builds leg strength, power, and running economy
@@ -0,0 +1,63 @@
1
+ id: intervals.1k
2
+ name: 1K Repeats
3
+ sport: run
4
+ type: intervals
5
+ category: threshold
6
+
7
+ params:
8
+ reps:
9
+ type: int
10
+ required: true
11
+ default: 4
12
+ min: 3
13
+ max: 8
14
+ description: Number of 1K repeats
15
+ recovery:
16
+ type: duration
17
+ default: "2min"
18
+ description: Recovery jog duration between repeats
19
+
20
+ structure:
21
+ warmup:
22
+ - type: warmup
23
+ name: Easy warmup
24
+ duration: 10min
25
+ pace: "${paces.easy}"
26
+ main:
27
+ - type: intervals
28
+ repeats: "${reps}"
29
+ work:
30
+ type: work
31
+ name: 1K repeat
32
+ distance: 1000m
33
+ pace: "${paces.r1k}"
34
+ intensity: Zone 4
35
+ recovery:
36
+ type: recovery
37
+ name: Recovery jog
38
+ duration: "${recovery}"
39
+ intensity: Zone 1-2
40
+ cooldown:
41
+ - type: cooldown
42
+ name: Easy cooldown
43
+ duration: 10min
44
+ pace: "${paces.easy}"
45
+
46
+ humanReadable: |
47
+ 1K REPEATS
48
+
49
+ WARM-UP: 10 min easy @ ${paces.easy}
50
+
51
+ MAIN SET:
52
+ ${reps} × 1K @ ${paces.r1k}
53
+ ${recovery} easy jog recovery between each
54
+
55
+ Target effort: 5K-10K race pace
56
+ Stay controlled - the goal is consistency.
57
+
58
+ COOL-DOWN: 10 min easy
59
+
60
+ estimatedDuration: "${10 + (reps * 6) + 10}"
61
+ targetZone: Z4
62
+ rpe: "7-8"
63
+ notes: Develops threshold and race-specific fitness
@@ -0,0 +1,63 @@
1
+ id: intervals.400
2
+ name: 400m Repeats
3
+ sport: run
4
+ type: intervals
5
+ category: speed
6
+
7
+ params:
8
+ reps:
9
+ type: int
10
+ required: true
11
+ default: 6
12
+ min: 4
13
+ max: 16
14
+ description: Number of 400m repeats
15
+ recovery:
16
+ type: duration
17
+ default: "90s"
18
+ description: Recovery jog duration between repeats
19
+
20
+ structure:
21
+ warmup:
22
+ - type: warmup
23
+ name: Easy warmup
24
+ duration: 10min
25
+ pace: "${paces.easy}"
26
+ main:
27
+ - type: intervals
28
+ repeats: "${reps}"
29
+ work:
30
+ type: work
31
+ name: 400m repeat
32
+ distance: 400m
33
+ pace: "${paces.r400}"
34
+ intensity: Zone 5
35
+ recovery:
36
+ type: recovery
37
+ name: Recovery jog
38
+ duration: "${recovery}"
39
+ intensity: Zone 1-2
40
+ cooldown:
41
+ - type: cooldown
42
+ name: Easy cooldown
43
+ duration: 10min
44
+ pace: "${paces.easy}"
45
+
46
+ humanReadable: |
47
+ 400m REPEATS
48
+
49
+ WARM-UP: 10 min easy @ ${paces.easy}
50
+
51
+ MAIN SET:
52
+ ${reps} × 400m @ ${paces.r400}
53
+ ${recovery} easy jog recovery between each
54
+
55
+ Run each 400m at a consistent effort.
56
+ Focus on quick turnover and relaxed form.
57
+
58
+ COOL-DOWN: 10 min easy
59
+
60
+ estimatedDuration: "${10 + (reps * 3) + 10}"
61
+ targetZone: Z5
62
+ rpe: "8-9"
63
+ notes: Develops speed and VO2max
@@ -0,0 +1,63 @@
1
+ id: intervals.800
2
+ name: 800m Repeats
3
+ sport: run
4
+ type: intervals
5
+ category: speed
6
+
7
+ params:
8
+ reps:
9
+ type: int
10
+ required: true
11
+ default: 5
12
+ min: 3
13
+ max: 10
14
+ description: Number of 800m repeats
15
+ recovery:
16
+ type: duration
17
+ default: "2min"
18
+ description: Recovery jog duration between repeats
19
+
20
+ structure:
21
+ warmup:
22
+ - type: warmup
23
+ name: Easy warmup
24
+ duration: 10min
25
+ pace: "${paces.easy}"
26
+ main:
27
+ - type: intervals
28
+ repeats: "${reps}"
29
+ work:
30
+ type: work
31
+ name: 800m repeat
32
+ distance: 800m
33
+ pace: "${paces.r800}"
34
+ intensity: Zone 4-5
35
+ recovery:
36
+ type: recovery
37
+ name: Recovery jog
38
+ duration: "${recovery}"
39
+ intensity: Zone 1-2
40
+ cooldown:
41
+ - type: cooldown
42
+ name: Easy cooldown
43
+ duration: 10min
44
+ pace: "${paces.easy}"
45
+
46
+ humanReadable: |
47
+ 800m REPEATS
48
+
49
+ WARM-UP: 10 min easy @ ${paces.easy}
50
+
51
+ MAIN SET:
52
+ ${reps} × 800m @ ${paces.r800}
53
+ ${recovery} easy jog recovery between each
54
+
55
+ These should feel "comfortably hard" - faster than
56
+ tempo but not all-out. Stay relaxed and efficient.
57
+
58
+ COOL-DOWN: 10 min easy
59
+
60
+ estimatedDuration: "${10 + (reps * 5) + 10}"
61
+ targetZone: Z4-Z5
62
+ rpe: "7-8"
63
+ notes: Develops VO2max and race-pace endurance
@@ -0,0 +1,64 @@
1
+ id: intervals.mile
2
+ name: Mile Repeats
3
+ sport: run
4
+ type: intervals
5
+ category: threshold
6
+
7
+ params:
8
+ reps:
9
+ type: int
10
+ required: true
11
+ default: 3
12
+ min: 2
13
+ max: 6
14
+ description: Number of mile repeats
15
+ recovery:
16
+ type: duration
17
+ default: "3min"
18
+ description: Recovery jog duration between repeats
19
+
20
+ structure:
21
+ warmup:
22
+ - type: warmup
23
+ name: Easy warmup
24
+ duration: 15min
25
+ pace: "${paces.easy}"
26
+ main:
27
+ - type: intervals
28
+ repeats: "${reps}"
29
+ work:
30
+ type: work
31
+ name: Mile repeat
32
+ distance: 1609m
33
+ pace: "${paces.rMile}"
34
+ intensity: Zone 4
35
+ recovery:
36
+ type: recovery
37
+ name: Recovery jog
38
+ duration: "${recovery}"
39
+ intensity: Zone 1-2
40
+ cooldown:
41
+ - type: cooldown
42
+ name: Easy cooldown
43
+ duration: 10min
44
+ pace: "${paces.easy}"
45
+
46
+ humanReadable: |
47
+ MILE REPEATS
48
+
49
+ WARM-UP: 15 min easy @ ${paces.easy}
50
+
51
+ MAIN SET:
52
+ ${reps} × 1 mile @ ${paces.rMile}
53
+ ${recovery} easy jog recovery between each
54
+
55
+ Target effort: 10K-half marathon race pace
56
+ These are challenging - pace yourself to finish
57
+ the last rep as fast as the first.
58
+
59
+ COOL-DOWN: 10 min easy
60
+
61
+ estimatedDuration: "${15 + (reps * 10) + 10}"
62
+ targetZone: Z4
63
+ rpe: "7-8"
64
+ notes: Builds race-pace endurance and mental toughness
@@ -0,0 +1,41 @@
1
+ id: long
2
+ name: Long Run
3
+ sport: run
4
+ type: long
5
+ category: endurance
6
+
7
+ params:
8
+ duration:
9
+ type: int
10
+ required: true
11
+ default: 90
12
+ min: 45
13
+ max: 240
14
+ description: Duration in minutes
15
+
16
+ structure:
17
+ main:
18
+ - type: work
19
+ name: Long Run
20
+ duration: "${duration}min"
21
+ pace: "${paces.long}"
22
+ intensity: Zone 2
23
+
24
+ humanReadable: |
25
+ LONG RUN - ${duration} minutes
26
+
27
+ Steady, comfortable pace throughout.
28
+ Pace: ${paces.long}
29
+
30
+ Stay in Zone 2. Practice your race nutrition
31
+ if running over 90 minutes.
32
+
33
+ Focus on:
34
+ - Consistent effort
35
+ - Good form even when tired
36
+ - Hydration and fueling
37
+
38
+ estimatedDuration: "${duration}"
39
+ targetZone: Z2
40
+ rpe: "5-6"
41
+ notes: Build aerobic endurance and mental toughness
@@ -0,0 +1,49 @@
1
+ id: progression
2
+ name: Progression Run
3
+ sport: run
4
+ type: tempo
5
+ category: tempo
6
+
7
+ params:
8
+ duration:
9
+ type: int
10
+ required: true
11
+ default: 45
12
+ min: 30
13
+ max: 90
14
+ description: Total duration in minutes
15
+
16
+ structure:
17
+ main:
18
+ - type: work
19
+ name: Easy start
20
+ duration: "${duration * 0.4}min"
21
+ pace: "${paces.easy}"
22
+ intensity: Zone 2
23
+ - type: work
24
+ name: Moderate middle
25
+ duration: "${duration * 0.3}min"
26
+ pace: "${paces.tempo}"
27
+ intensity: Zone 3
28
+ - type: work
29
+ name: Fast finish
30
+ duration: "${duration * 0.3}min"
31
+ pace: "${paces.threshold}"
32
+ intensity: Zone 4
33
+
34
+ humanReadable: |
35
+ PROGRESSION RUN - ${duration} minutes
36
+
37
+ Start easy, finish fast. Negative split the run.
38
+
39
+ Phase 1 (~40%): Easy pace @ ${paces.easy}
40
+ Phase 2 (~30%): Tempo pace @ ${paces.tempo}
41
+ Phase 3 (~30%): Threshold pace @ ${paces.threshold}
42
+
43
+ Let the pace come naturally. Don't force
44
+ the progression - finish feeling strong.
45
+
46
+ estimatedDuration: "${duration}"
47
+ targetZone: Z2-Z4
48
+ rpe: "5-8"
49
+ notes: Develops ability to run fast when tired
@@ -0,0 +1,36 @@
1
+ id: race.5k
2
+ name: 5K Race
3
+ sport: race
4
+ type: race
5
+ category: race
6
+
7
+ humanReadable: |
8
+ 5K RACE DAY
9
+
10
+ PRE-RACE:
11
+ - Light meal 2-3 hours before
12
+ - Arrive early for registration/warm-up
13
+ - 10-15 min easy jog + dynamic stretches
14
+ - 3-4 strides to prime the legs
15
+
16
+ RACE STRATEGY:
17
+ - First mile: Start controlled, find your rhythm
18
+ - Mile 2: Settle into goal pace
19
+ - Final 1.1 miles: Push harder, empty the tank
20
+
21
+ Target pace: ${paces.threshold} or faster
22
+
23
+ POST-RACE:
24
+ - 10 min easy cool-down jog
25
+ - Hydrate and refuel
26
+ - Celebrate!
27
+
28
+ Key reminders:
29
+ - Don't go out too fast in the first 800m
30
+ - Stay mentally engaged through the middle
31
+ - Dig deep in the final kilometer
32
+
33
+ estimatedDuration: 30
34
+ targetZone: Z4-Z5
35
+ rpe: "9-10"
36
+ notes: 5K race day - give it everything!
@@ -0,0 +1,36 @@
1
+ id: recovery
2
+ name: Recovery Run
3
+ sport: run
4
+ type: recovery
5
+ category: recovery
6
+
7
+ params:
8
+ duration:
9
+ type: int
10
+ required: true
11
+ default: 20
12
+ min: 15
13
+ max: 40
14
+ description: Duration in minutes
15
+
16
+ structure:
17
+ main:
18
+ - type: work
19
+ name: Recovery Jog
20
+ duration: "${duration}min"
21
+ pace: "${paces.easy}"
22
+ intensity: Zone 1-2
23
+
24
+ humanReadable: |
25
+ RECOVERY RUN - ${duration} minutes
26
+
27
+ Very easy pace, slower than your normal easy runs.
28
+ Pace: Slower than ${paces.easy}
29
+
30
+ This is active recovery. If in doubt, go slower.
31
+ Walk breaks are fine if needed.
32
+
33
+ estimatedDuration: "${duration}"
34
+ targetZone: Z1-Z2
35
+ rpe: "2-3"
36
+ notes: Active recovery, promotes blood flow
@@ -0,0 +1,16 @@
1
+ id: rest
2
+ name: Rest Day
3
+ sport: rest
4
+ type: rest
5
+ category: rest
6
+
7
+ humanReadable: |
8
+ REST DAY
9
+
10
+ Take the day off. Focus on recovery, sleep, and nutrition.
11
+ Light stretching or foam rolling optional.
12
+
13
+ estimatedDuration: 0
14
+ targetZone: "-"
15
+ rpe: "1"
16
+ notes: Complete rest from structured training
@@ -0,0 +1,49 @@
1
+ id: strides
2
+ name: Easy Run + Strides
3
+ sport: run
4
+ type: endurance
5
+ category: speed
6
+
7
+ params:
8
+ duration:
9
+ type: int
10
+ required: true
11
+ default: 30
12
+ min: 20
13
+ max: 60
14
+ description: Duration of easy run in minutes
15
+ strides:
16
+ type: int
17
+ default: 6
18
+ min: 4
19
+ max: 10
20
+ description: Number of strides
21
+
22
+ structure:
23
+ main:
24
+ - type: work
25
+ name: Easy Run
26
+ duration: "${duration}min"
27
+ pace: "${paces.easy}"
28
+ intensity: Zone 2
29
+
30
+ humanReadable: |
31
+ EASY RUN + STRIDES - ${duration} minutes
32
+
33
+ MAIN RUN:
34
+ ${duration} min easy @ ${paces.easy}
35
+
36
+ STRIDES (after the run):
37
+ ${strides} × 20-30 second accelerations
38
+ - Start easy, build to ~90% effort
39
+ - Focus on quick, light feet
40
+ - Full recovery walk (60-90s) between each
41
+ - Should feel smooth, not strained
42
+
43
+ Strides maintain leg speed without adding fatigue.
44
+ Keep them relaxed and controlled.
45
+
46
+ estimatedDuration: "${duration + 10}"
47
+ targetZone: Z2
48
+ rpe: "4-5 (run), 6-7 (strides)"
49
+ notes: Maintains speed and running economy during easy weeks
@@ -0,0 +1,56 @@
1
+ id: tempo
2
+ name: Tempo Run
3
+ sport: run
4
+ type: tempo
5
+ category: tempo
6
+
7
+ params:
8
+ tempo_mins:
9
+ type: int
10
+ required: true
11
+ default: 20
12
+ min: 10
13
+ max: 45
14
+ description: Duration of tempo section in minutes
15
+ warmup_mins:
16
+ type: int
17
+ default: 10
18
+ description: Warmup duration in minutes
19
+ cooldown_mins:
20
+ type: int
21
+ default: 10
22
+ description: Cooldown duration in minutes
23
+
24
+ structure:
25
+ warmup:
26
+ - type: warmup
27
+ name: Easy warmup
28
+ duration: "${warmup_mins}min"
29
+ pace: "${paces.easy}"
30
+ main:
31
+ - type: work
32
+ name: Tempo
33
+ duration: "${tempo_mins}min"
34
+ pace: "${paces.tempo}"
35
+ intensity: Zone 3-4
36
+ cooldown:
37
+ - type: cooldown
38
+ name: Easy cooldown
39
+ duration: "${cooldown_mins}min"
40
+ pace: "${paces.easy}"
41
+
42
+ humanReadable: |
43
+ TEMPO RUN
44
+
45
+ WARM-UP: ${warmup_mins} min easy @ ${paces.easy}
46
+
47
+ MAIN SET:
48
+ ${tempo_mins} min @ tempo pace (${paces.tempo})
49
+ "Comfortably hard" - you can speak in short phrases
50
+
51
+ COOL-DOWN: ${cooldown_mins} min easy
52
+
53
+ estimatedDuration: "${warmup_mins + tempo_mins + cooldown_mins}"
54
+ targetZone: Z3-Z4
55
+ rpe: "6-7"
56
+ notes: Builds lactate threshold and race-pace feel