I'm constantly working on this app.

Blog

How We Built a Workout Builder That Actually Understands Cycling

Three specialized AI systems work together to turn your workout description into precise intervals that sync perfectly with your Wahoo device. Here's how we built it.

How We Built a Workout Builder That Actually Understands Cycling

When you type "4x8 minute threshold intervals" into planned-workouts.com, what seems like a simple request actually triggers three different AI systems, each with specialized knowledge about cycling physiology, workout structure, and the technical requirements of Wahoo devices.

The system understands cycling training from the ground up, makes intelligent decisions about workout structure, and converts everything into the precise format your Wahoo ELEMNT, BOLT, or ROAM expects.

The Three-AI Architecture

Three specialized AI systems work together, each handling what they do best.

The Planner (Draft Generator)

The first AI acts as the master planner for your wahoo workout builder request. When you describe your workout, it makes the big decisions that determine the entire structure. This system understands that a 20-minute session needs different treatment than a 90-minute ride, and that "threshold intervals" require different preparation than "sprint work."

The planner decides whether you need a warm-up based on your workout type and target duration. It knows that high-intensity intervals benefit from neuromuscular activation, while endurance work needs only a simple progressive build. It calculates precise time allocation across segments, ensuring every second adds up to your target duration.

Most importantly, it creates segment descriptions that are completely self-contained. Each description must contain everything the specialist AIs need to know, because they work independently without seeing the full workout context.

The Warm-Up Specialist

The second AI focuses exclusively on preparation. This specialist understands that different types of main sets require different physiological preparation. For threshold work, it designs progressive builds that gradually bring you to near-threshold zones. For VO2max intervals, it includes neuromuscular activation—short, sharp efforts that prepare your nervous system for high-intensity work.

The Main Set Specialist

The third AI handles the core training stimulus. This is where your workout description gets converted into exact interval arrays with precise power targets and durations. When you say "4x8 minutes," this specialist understands that means 4 work intervals plus 4 recovery periods, calculates the exact durations, and determines appropriate power zones.

The main set specialist handles complex patterns too. Progressive efforts, ramps, and mixed intervals all get converted into structured sequences that your Wahoo device can execute perfectly.

The Cool-Down Specialist

The final AI focuses on recovery. Like the warm-up specialist, it understands that different workout types need different recovery approaches. After intense intervals, it creates longer cool-downs with gradual power reductions. For endurance work, it might design shorter, simpler recovery periods.

Structured Outputs: Teaching AI to Speak Cycling

The key to making this work is structured outputs. Instead of generating free-form text, each AI is constrained to produce data in a specific format using JSON schema enforcement. This ensures consistency and precision across all generated workouts.

JSON Schema Enforcement

Each AI specialist must output its results in a rigid structure: interval arrays with exact durations in seconds and power targets as FTP fractions. No approximations, no vague descriptions—just precise data that can be converted directly into workout files.

When the main set specialist processes "threshold intervals," it can't just say "hard efforts." It must specify exactly 0.90 FTP for power and precise durations that sum to the allocated time. This structured approach eliminates ambiguity and ensures your wahoo planned workouts are exactly what you expect.

From Natural Language to Intervals

The conversion process reveals the complexity hidden in simple workout descriptions. "Sweet spot intervals" becomes a specific power target of 88% FTP. "4x8 minutes" expands into work intervals of 480 seconds each plus recovery periods calculated to fit the total duration.

Real Workout Examples

"Sweet Spot Intervals"

When you request sweet spot work, the planner allocates time for a progressive warm-up, extended main set intervals, and adequate recovery. The warm-up specialist creates a gradual build targeting aerobic preparation—typically easy spinning progressing to moderate efforts that prepare your aerobic system without creating fatigue.

The main set specialist interprets "sweet spot" as 88% FTP and structures the intervals with enough recovery to maintain quality. Common patterns include 3 × 20 minutes or 2 × 30 minutes, depending on your target duration and fitness level.

"FTP Test"

An FTP test request triggers different logic. The warm-up specialist creates a specific preparation sequence that includes neuromuscular activation efforts to ensure your power systems are fully activated. The main set becomes a single 20-minute interval at maximum sustainable effort.

The cool-down specialist knows that after maximal efforts, you need extended recovery time with gradual power reduction to promote lactate clearance and metabolic recovery.

"Sprint Intervals"

Sprint work requires the most sophisticated warm-up. The specialist includes specific neuromuscular activation—short, explosive efforts that prepare your nervous system for the high-power demands ahead. Without this preparation, sprint intervals are less effective and potentially risky.

The main set specialist converts your sprint description into precise intervals: typically 6 × 15 seconds at 150% FTP with full recovery between efforts. The recovery periods are calculated to allow complete ATP-PC system recovery between sprints.

Converting to Wahoo Format

Once the AIs generate structured workout data, another challenge emerges: converting everything into the format your Wahoo device expects. This isn't just a simple translation—it requires understanding Wahoo's specific data structure and making intelligent decisions about how to represent complex intervals.

The Translation Challenge

Wahoo devices expect workouts in a specific format with headers, interval definitions, and intensity mappings. Our conversion system analyzes the generated interval arrays and determines the optimal Wahoo representation.

The converter maps FTP percentages to Wahoo intensity zones: recovery efforts become "rest" zones, threshold work becomes "ftp" zones, and VO2max intervals become "ac" (anaerobic capacity) zones. This ensures your wahoo elemnt displays the correct zone information during your workout.

How the Converter Works

The converter analyzes each workout segment and creates the appropriate wahoo planned workout structure:

Single intervals are straightforward - one power target held for a specific duration. A 20-minute FTP test becomes a single wahoo planned workout interval with consistent power from start to finish.

Repeating patterns are detected when the converter finds alternating work and recovery periods with identical durations and power targets. It creates a repeated structure that tells your wahoo elemnt to repeat the pattern automatically, just like planned workouts from TrainingPeaks.

Everything else gets converted into a single interval with power range targets. For ramps and progressive efforts, the converter calculates minimum and maximum power values across all the individual intervals and creates wahoo elemnt planned workouts that display the correct power zones.

The Technical Challenges

Duration Precision

Every workout must hit exactly the target duration—no approximations allowed. This creates interesting mathematical challenges when converting natural language descriptions into precise intervals.

The AI must account for recovery periods, transition times, and the fact that interval + recovery patterns must sum perfectly to allocated segment time. When you request "4x8 minutes" in a 45-minute workout, the system must calculate not just the 32 minutes of work and recovery, but how to distribute the remaining 13 minutes across warm-up and cool-down.

Context Independence

Each AI specialist works without seeing the others' output. This architectural decision ensures modularity but creates coordination challenges. Segment descriptions must be completely self-contained, providing all context needed for specialist processing.

The warm-up specialist must understand from the description alone what type of main set preparation is needed. The main set specialist must create precise intervals without knowing the warm-up structure. This independence allows each specialist to focus on their expertise while requiring careful coordination through the planner.

Wahoo API Compatibility

The final challenge is ensuring seamless integration with Wahoo's ecosystem. The converted workout files must match exactly what TrainingPeaks, TrainerRoad, and other platforms generate when they sync wahoo planned workouts.

This requires understanding Wahoo's specific data format, intensity zone mappings, and the technical requirements of different Wahoo devices. The system must generate files that work identically across ELEMNT, BOLT, and ROAM devices.

What Makes This Interesting

The sophistication lies not in the individual components but in how they work together. Three specialized AI systems, each with deep knowledge of their domain, collaborate to create something neither could achieve alone. The planner provides strategy, the specialists provide expertise, and the converter bridges the gap to your actual device.

Structured outputs ensure precision and consistency. Every workout is generated fresh based on your specific description, but the underlying structure guarantees compatibility and reliability. The system adapts intelligently to workout length, intensity, and training focus while maintaining the technical precision your Wahoo device requires.

The conversion process reveals the hidden complexity in "simple" workout descriptions. What seems like a straightforward request triggers physiological analysis, mathematical calculations, pattern recognition, and format conversion—all to ensure your wahoo workout builder request results in exactly the training stimulus you intended.

Conclusion

Behind every workout description lies a fascinating technical challenge: understanding training intent, applying physiological principles, calculating precise intervals, and formatting everything for your specific device. The three-AI architecture makes this possible by combining specialized knowledge with structured outputs and intelligent conversion.

The next time you describe a workout, remember the complex choreography happening behind the scenes. Three AI systems are analyzing your request, making physiological decisions, calculating precise intervals, and converting everything into the format your Wahoo device expects.

If you're curious about how this works in practice, try describing any workout you have in mind at planned-workouts.com—from simple endurance rides to complex interval sessions. The system handles the complexity while you focus on the training.