https://www.gravatar.com/avatar/aca0e16473affc5e8774274b4c259bcc?s=240&d=mp

Nick Kirsch

twenty-four: the full picture

After eight months of building, the twenty-four system is running in production. Four services, fully automated, managing my entire fitness and wellness routine.

Here’s how it all works.

The Architecture

/images/twenty-four-architecture-2025.svg

What It Does

The system automates everything around fitness tracking, calendar management, and meal planning:

Fitness tracking:

  • Scrapes gym website, auto-reserves classes
  • Processes Strava activities (adds emojis, detects commutes, assigns gear)
  • Generates structured workout plans using AI
  • Creates personalized stretching routines
  • Builds multi-sport training plans for races

Calendar sync:

twenty-four: what's next

Two weeks after the service consolidation, here’s what’s been added.

Training Plan Generator

The big one: AI-powered training plan generation for endurance events.

What it does:

Give it a race (distance, date, sport) and it generates a complete training plan:

1
2
3
4
5
6
7
8
POST /training-plan
{
  "race_date": "2026-03-07",
  "race_distance": 13.1,
  "race_name": "Half Marathon",
  "sport": "Run",
  "start_date": "2026-01-01"
}

The service:

  1. Fetches your current fitness metrics from Intervals.icu (CTL, ATL, recent training)
  2. Checks your calendar for holidays and time off
  3. Sends everything to Claude with instructions
  4. Gets back a week-by-week plan
  5. Creates structured workouts in Intervals.icu

Holiday awareness:

twenty-four: strava service

The Strava service processes activities automatically. Adds emojis, tags commutes, mutes short walks, assigns gear, and syncs to Intervals.icu.

The Problem

Every Strava activity needs housekeeping:

  • Add emoji to activity name (🏃 Run, 🚴 Ride, 💪 Strength, etc.)
  • Tag commutes (home ↔ work, home ↔ dojo)
  • Assign the correct gear (roadie, gravel, trainer, running shoes)
  • Mute short walks from the feed (< 2km)
  • Hide activities that shouldn’t be public

This is tedious when you upload 15+ activities a week.

twenty-four: service consolidation

The gym service used to be Python. Then it was Python + Go. Now it’s just Go, merged into the workouts service.

Fewer pods, less complexity, same functionality.

The Before State

October 11, 2025:

  • calendar - Go service (ICU ↔ Google Calendar sync, gym reservation sync)
  • gym - Python service (Selenium web scraper, Chrome sidecar)
  • strava - Python service (activity processing)
  • workouts - Go service (workout plan generator)

Four services. Three different languages/runtimes. Separate deployments, separate LoadBalancers, separate health checks.

twenty-four: AI recommendations

Added two AI-powered features using Claude API: meal recommendations and daily stretching routines.

Both personalize based on training load, recent activities, and upcoming workouts.

The Dining Service

Daily meal recommendations generated at 4am PT. Uses Claude to plan breakfast, lunch, dinner, and snacks based on:

  • Current fitness metrics (CTL, ATL, form)
  • Recent activities (last 7 days)
  • Upcoming workouts (next 24 hours)
  • Training intensity trends

The prompt:

 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
prompt := fmt.Sprintf(`Generate personalized meal recommendations for today.

Current fitness metrics:
- CTL (fitness): %.1f
- ATL (fatigue): %.1f
- Form: %.1f
- Training load ramp rate: %.1f%%

Recent activities (last 7 days):
%s

Upcoming workouts (next 24 hours):
%s

Provide meal recommendations for:
- Breakfast
- Lunch
- Dinner
- Snacks

Focus on:
1. Recovery nutrition if fatigued (high ATL)
2. Fuel for upcoming hard workouts
3. Lighter meals on rest days
4. Practical, simple meals

Format as markdown with sections.`,
    wellness.CTL,
    wellness.ATL,
    wellness.Form,
    wellness.Ramp,
    formatRecentActivities(recentActivities),
    formatUpcomingWorkouts(upcomingWorkouts),
)

Context extraction:

twenty-four: workout generator

The workout generator creates structured workout plans for activities that don’t have them in Intervals.icu.

Uses the Claude API to generate plans dynamically. No templates, no static rules - just context and inference.

Using the Claude API

The service is simple:

  1. Fetch workouts from Intervals.icu that don’t have plans
  2. For each workout, send context to Claude API
  3. Claude generates a structured plan
  4. Apply it to the workout

The API call: