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
| Coach | Type | Domain | Voice | Color |
|---|---|---|---|---|
| MAX | Domain Expert | Training | Direct, commanding | #EF4444 |
| NOVA | Domain Expert | Science | Analytical, precise | #8B5CF6 |
| SAGE | Domain Expert | Recovery | Calm, wise | #10B981 |
| SAM | Personality | - | Friendly, supportive | #3B82F6 |
| ACE | Personality | - | Minimal, efficient | #6B7280 |
| CHIP | Personality | - | Funny, playful | #EAB308 |
| REX | Personality | - | Fierce, challenging | #F43F5E |
| MO | Adaptive | All | Context-aware | #F97316 |
Documentation
| Document | Description |
|---|---|
| profiles.md | Detailed coach personalities, expertise, and voice |
| tasks.md | Task system, configurations, and phases |
| personalization.md | Phase 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.