Performance
Engineering project brief

Build an AI cycling coach that athletes can trust.

Performance is a pre-build product for adult competitive cyclists in Germany. The athlete uses Telegram to talk to the AI Coach. The system uses the athlete's training plan, completed training, recovery data, and confirmed context.

  • Telegram is the main coaching interface.
  • The web overview shows the plan, recent training, progress, and account settings.
  • An optional assigned coach sees selected data in read-only mode.
Start here

Explore the project.

This page is the full overview: goal, scope, tiers, boundary, architecture and delivery. For deeper detail, go to the prototype and the build specification.

The goal

Where this product is going.

Performance is a direct-to-consumer subscription: serious cyclists in Germany pay monthly to talk to an AI coach that understands their plan, their training and their recovery. The category is a conversation, not a tracker.

The problem

Real 1:1 coaching costs several hundred euros a month. Trackers like TrainingPeaks and WHOOP tell you what happened but don't talk to you. Between those two sits a conversational AI coach at a fraction of the cost.

The market

Germany's cycling federation reports roughly 140,000 licensed racing members — the ceiling for "serious, structured-training cyclists". A small, specific audience: trust and relevance matter more than mass reach.

The offer

A direct-to-consumer subscription with two athlete-owned tiers. The athlete owns the account and approves every change.

What the pilot must prove

The pilot proves the concept. It must show that athletes like the product, use it regularly and stay subscribed. It must also show that the product can be profitable. Only after that proof do we invest in the next version.

The trajectory

  • Build: 4–6 weeks from confirmed start
  • Pilot: 10–20 German athletes prove the concept
  • Prove: users like it, it is sticky, it is profitable
  • Improve: fine-tune the model and use user data to improve the product
  • v2: launch the next version with better features
01 · Users and context

The athlete is the primary user.

The product supports athlete-led training decisions. A coach can view selected information, but the athlete owns the account and approves changes.

Athlete

  • Adult professional, elite, or serious performance cyclist in Germany
  • Uses TrainingPeaks and WHOOP
  • Uses Telegram for daily interaction
  • Owns the account and approves writes

Professional coach

  • Optional existing coach relationship
  • One active assignment in v1
  • Sees selected athlete data only
  • Read-only access. No private AI conversation.

Operator

  • Creates coach accounts
  • Assigns a coach to an athlete
  • Supports operations and release controls
  • Does not replace athlete approval
02 · The promise and the boundary

AI-supported self-coaching — not autonomous control.

AI-supported self-coaching (what we build)Autonomous AI coach (what we don't build)
Athlete owns the decisionAI is expected to own the decision
AI explains and suggestsAI prescribes
AI drafts possible plan changesAI changes the plan automatically
Athlete can question, refine, accept or rejectAthlete is expected to follow
Engagement through conversation and insightEngagement through delegated control

Marketing can say "Your AI coach." The product boundary underneath stays fixed: AI-supported self-coaching for nonmedical cycling performance. Every feature decision is filtered through this line.

03 · V1 subscription tiers

Two ways to use the same athlete-first product.

Both tiers are owned by the athlete. The difference is whether one existing professional coach gets a limited, read-only overview.

Self-Coaching AI
V1 core product
  • Full Telegram coaching conversation and athlete web overview
  • Personal explanations using plan, training and recovery data
  • Daily guidance, optional check-ins and confirmed memories
  • Plan discussions and proposals — every decision stays with the athlete
04 · V1 scope

One product across four surfaces.

The work combines a Telegram conversation, a small web product, data integrations, and a controlled AI runtime.

Athlete product

  • Self-registration, secure-link login, adult confirmation, and session security
  • Stripe checkout and billing portal with two entitlements
  • Verified Telegram binding, private chats, four public commands, and inline buttons
  • Web overview for today, plan, recent training, progress, and account settings

Training and recovery

  • TrainingPeaks calendar and completed-workout intake
  • Pasted text and CSV plan import
  • WHOOP v2 sleep and recovery data
  • Check-ins, reminders, and correction history

AI and memory

  • Open conversation with server-scoped tools
  • Recent context, rolling summary, and confirmed memories
  • Deterministic evidence objects for numeric claims
  • Structured output, validation, safety policy, and degraded responses

Plans and coach access

  • Immutable plan versions and conversational plan drafts
  • AI proposals require explicit athlete approval
  • One assigned coach with selected read-only visibility
  • Web-only coach AI assistant over the same read-only data

Mental performance signal

  • Daily job extracts mood, motivation, and confidence evidence from conversation
  • Live-by-default Mental Readiness trend
  • Athlete can correct or dismiss each entry
  • Separate consent purpose and DPIA before release

Governance and operations

  • AI disclosure, consent records, audit trail, export, and deletion
  • Retention settings, backups, and incident process
  • Durable jobs, provider reconciliation, and observability
  • Separate development, staging, and production environments
05 · Explicitly deferred to v2

Not "maybe later" — deliberately out, so v1 stays sharp.

These are excluded on purpose so the effort concentrates on the athlete product and AI quality first.

Coach ecosystem

  • Coach self-registration, discovery and matching
  • Organizations, invitations, team administration, seat billing
  • Multi-coach relationships
  • Coach-side plan editing and proposal approval
  • Coach messaging/inbox
  • Advanced analytics, custom dashboards, automated flags

Product surface

  • Medical or clinical functions
  • Nutrition and meal planning
  • Marketplace / coach matching
  • Automatic plan modification (no autonomous control)
  • Automatic extraction beyond the Mental Readiness signal
  • General personality profiling or typing
  • Native mobile applications

Data, providers & infrastructure

  • Providers beyond TrainingPeaks and WHOOP
  • PDF parsing, image analysis, voice transcription
  • Web search and weather
  • Fine-tuning on customer data
  • Vector database, knowledge graph
  • Kafka, Kubernetes, per-athlete models
06 · Core user flows

The application must keep authority visible.

01 · AccessCreate and bindAthlete creates an account, selects a tier, and binds a private Telegram chat.
02 · ConversationRead and explainApplication selects authorized evidence. AI returns a validated response.
03 · ActionConfirm and writeAthlete approves a proposal before the application creates a new version.

Conversation pipeline

  1. Authenticate the athlete and Telegram binding.
  2. Run the safety and boundary check.
  3. Select the workflow and bounded context.
  4. Run authorized read or draft tools.
  5. Call the approved model route.
  6. Validate schema, evidence, and safety.

Coach access flow

  1. Operator assigns an existing coach.
  2. Athlete confirms the assignment.
  3. Application creates a privacy-filtered projection.
  4. Coach reads the selected data.
  5. Athlete can revoke access at any time.
07 · UI examples

Three surfaces. Three clear jobs.

The athlete needs a quick daily view. The AI conversation supports decisions. The coach view shows selected shared data. These examples show the information hierarchy, not final visual specifications.

Performance / Athlete overviewSources current
This morning

Good morning, Anna

Live data
TodayEndurance ride90 min · planned
RecoveryLower than usualWHOOP source
Training loadRecent sessions
Pending proposalCompare an easier interval option in Telegram
Open chat
PerformanceAI Coach
I slept badly. What should I do today?
Your recovery is lower than usual. Today's plan includes intervals. I can compare an easier option.
Compare easier optionKeep current plan
Decision point: the AI explains and proposes. The athlete chooses.
Coach overviewRead only
Assigned athletesAthlete controlled
AthletesAnna WeberJonas KleinMara Vogt

Anna · training overview

Selected shared data
Read only
This weekPlan and completed training
RecoverySelected WHOOP context
VisibilityNo private AI conversation. No edit controls.

The athlete can revoke access at any time.

08 · Engineering challenges

The difficult work is in control, evidence, and reliability.

The product is not a general chatbot. The application must control what the AI can see, what it can do, and what the user can trust.

1. Grounded AI responses

Send compact evidence objects with IDs, freshness, and deterministic values. Validate every cited fact. Do not let the model become the source of truth for numbers.

2. Safe action authority

Allow the AI to explain and draft. Require athlete confirmation for plan changes, memory writes, and other state changes. Reject actions outside module authority.

3. Provider integrations

TrainingPeaks access and its partner contract are not yet granted. WHOOP needs webhook handling, API refetch, reconciliation, freshness checks, and production approval.

4. Privacy and sensitive data

Enforce athlete ownership and coach sharing rules on every read. Handle consent, export, deletion, retention, Mental Readiness evidence, and the medical boundary.

5. Durable operations

Use a durable PostgreSQL-backed job queue. Make syncs idempotent. Recover from missed webhooks. Do not lose messages or apply partial authoritative changes.

6. Pilot quality

Deliver a reliable system for a controlled 20-athlete pilot. Measure latency, availability, projection freshness, backup restore, cost limits, and degraded behavior.

09 · Technical shape

One application with clear internal modules.

Deploy in Scaleway Paris (fr-par) to support EU data residency. Use one Next.js and TypeScript application, one PostgreSQL database, one durable worker, and one AI route.

Athlete browser -----------+
Coach browser -------------+
                           |
Telegram webhook ----------+--> Next.js application and API
                           |          |
Stripe webhooks -----------+          +--> PostgreSQL state and job queue
                                      +--> durable worker
Activity and recovery APIs ---------->+--> EU object storage
                                      +--> AI gateway
                                                |
                                                +--> Scaleway Generative APIs, Paris
Next.js and TypeScriptPostgreSQLDurable jobsEU object storageTelegram Bot APIStripeScaleway Generative APIsSecret ManagerCockpit
ComponentV1 implementationPurpose
ApplicationOne containerized DEV1-L instanceWeb, API routes, auth, billing, product logic
DatabaseDB-DEV-S Managed PostgreSQLSystem state, evidence, and job queue
WorkerSupervised process on the same instanceSync, reconciliation, AI jobs, and projections
StorageStandard Multi-AZ object storagePlan inputs, approved raw objects, exports, and backups
AIOne approved Paris model routeConversation, planning, recovery, and safety workflows
Edge and secretsEdge Starter, WAF, TLS, Secret ManagerPublic access and protected credentials
  • Use one instance for the pilot. Add nodes or failover after measured need.
  • Keep development, staging, and production projects, credentials, databases, buckets, secrets, Stripe modes, and AI keys separate.
  • Use synthetic or sanitized fixtures in local development. Never use production data.
10 · External systems and gates

Five integrations define the first release.

SystemUseV1 rule
TrainingPeaksPlanned workouts, calendar, and completed activitiesMandatory. Read-only. No write-back. Approved commercial access and the partner endpoint contract are required.
WHOOP API v2Sleep and recoveryMandatory. OAuth 2.0. Use webhook and API reconciliation. Production use above the 10-member development limit requires approval.
Telegram Bot APIPrivate athlete conversationPrivate chats only. Verify the webhook secret. Deduplicate update_id before acknowledgement.
StripeCheckout, billing portal, and entitlementUse Stripe-hosted pages and signed raw-body webhooks. Card data does not enter the application.
Scaleway Generative APIsLLM route for all product domainsParis route. Compare Gemma 4 and Qwen 3.6 on a fixed German corpus. Select one route before real-athlete use.

Ready-to-Start gates

  • TrainingPeaks access, partner documentation, credentials, and staging smoke test
  • WHOOP production approval or an equivalent approved route
  • Fixed German model benchmark and signed model-route decision

Measured before pilot

  • Interactive AI latency
  • Projection freshness and provider sync time
  • Backup restore, rate limits, and degraded responses
11 · Delivery and quality

Build target: 4 to 6 weeks from the confirmed start date.

The first release supports a controlled pilot. The Technical PRD defines the acceptance journeys; it is the current plan, not a fixed contract.

Product works

  • Athlete can register, subscribe, bind Telegram, and use the web overview
  • Live TrainingPeaks and WHOOP data reaches the product
  • Plan proposals remain proposals until approval

AI works safely

  • Responses use authorized evidence
  • Schema, facts, and safety are validated
  • Failure returns a clear degraded response

Access stays private

  • Coach access needs athlete confirmation
  • Coach view is selected and read-only
  • Export, deletion, audit, and consent controls work
MeasurePilot target
Web availability99.5% each month, excluding announced maintenance
Provider sync95% of webhook or requested sync jobs within 2 minutes, if provider quota allows
AI response timep50 <= 5 s and p95 <= 12 s. Provisional until benchmark.
Projection freshnessWithin 5 minutes of a completed import or check-in
BackupDaily encrypted off-provider backup. RPO <= 24 h and RTO <= 8 h. Monthly restore test.
12 · What "good" looks like

Four things every screen and every reply has to hold to.

Athlete approvalMeaningful plan changes stay proposals until accepted.
Clear AI identityThe product never presents the AI as a human coach.
Private by defaultCoach visibility is limited, selected and athlete-controlled.
Nonmedical boundarySupports training decisions; never diagnoses or prescribes treatment.
13 · The work

The build spans product implementation and technical delivery.

The build turns the scope into a working pilot system. It includes application code, provider contracts, AI controls, tests, and operations.

Build the applicationImplement the Next.js and TypeScript application, PostgreSQL data model, auth, billing, roles, web views, and Telegram surface.
Build the integrationsImplement typed TrainingPeaks, WHOOP, Telegram, Stripe, and Scaleway adapters with sync, reconciliation, provenance, export, and deletion behavior.
Build the AI runtimeImplement the AI gateway, authorized tools, context construction, structured output, evidence validation, safety policy, rate limits, and degraded responses.
Protect user authorityEnforce athlete ownership, coach sharing rules, confirmation flows, privacy rights, consent purposes, and the medical boundary.
Make the pilot reliableWrite acceptance tests, add observability, operate durable jobs, test backup restore, and prepare the release gates for live provider data.