Skip to main content

Mo Coach AI System

The centralized AI coaching system powering personalized fitness guidance.

Location: lib/coaches/


Overview

Mo uses an intelligent 8-coach system divided into:

  • Domain Expert Coaches (3) - Always active, provide expertise
  • Personality Coaches (4) - User selects one, provides communication style
  • Adaptive Coach (1) - Fallback that fills any role
┌─────────────────────────────────────────────────────────────────┐
│ DOMAIN EXPERT COACHES │
│ (Always Active) │
├─────────────────┬─────────────────┬─────────────────────────────┤
│ MAX │ NOVA │ SAGE │
│ Training & │ Science & │ Recovery & │
│ Execution │ Insights │ Lifestyle │
├─────────────────┴─────────────────┴─────────────────────────────┤
│ "What to do" │ "Why it works" │ "How to sustain it" │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ PERSONALITY COACHES │
│ (User Selects One) │
├───────────┬───────────┬───────────┬─────────────────────────────┤
│ SAM │ ACE │ CHIP │ REX │
│ Buddy │ Minimalist│ Comedian │ Competitor │
├───────────┴───────────┴───────────┴─────────────────────────────┤
│ HOW the message is delivered (communication style) │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ MO │
│ The Adaptive │
├─────────────────────────────────────────────────────────────────┤
│ All-in-one coach that adapts to context │
└─────────────────────────────────────────────────────────────────┘

Quick Reference

CoachTypeDomainVoiceColor
MAXDomain ExpertTrainingDirect, commanding#EF4444
NOVADomain ExpertScienceAnalytical, precise#8B5CF6
SAGEDomain ExpertRecoveryCalm, wise#10B981
SAMPersonality-Friendly, supportive#3B82F6
ACEPersonality-Minimal, efficient#6B7280
CHIPPersonality-Funny, playful#EAB308
REXPersonality-Fierce, challenging#F43F5E
MOAdaptiveAllContext-aware#F97316

Documentation

DocumentDescription
profiles.mdDetailed coach personalities, expertise, and voice
tasks.mdTask system, configurations, and phases
personalization.mdPhase 7 memory & personalization features

Implementation

lib/coaches/
├── index.ts # Central exports
├── types.ts # TypeScript interfaces
├── profiles.ts # 8 coach definitions
├── constants.ts # Configuration
├── tasks.ts # Task registry
├── builder.ts # Prompt composition
├── examples.ts # Few-shot examples
├── validation.ts # Zod schemas
├── logger.ts # Scoped logging
├── cache.ts # TTL caching
├── memory.ts # Memory store (Phase 7)
├── preferences.ts # User preferences (Phase 7)
├── insights.ts # Insights & milestones (Phase 7)
└── personalization.ts # Context builder (Phase 7)

Basic Usage

import { buildCoachPrompt, getCoachProfile, MAX } from '@/lib/coaches';

// Build a prompt for Max
const prompt = buildCoachPrompt('max', 'plan-feedback', {
taskContext: { goals: [...], targets: [...] },
phase: 'goal_quantification',
});

// Get coach profile
const max = getCoachProfile('max');
console.log(max.name, max.role); // "Max", "Training & Execution"

See personalization.md for advanced usage with memory and user context.