Strivonex Coach — Claude AI Audit

2,408 words · Strivonex Coach-Claude-Audit-2026-07-13.md

Strivonex Coach — Complete Claude AI Audit

Generated 13 July 2026


Overview

There are two separate LLM systems running in Strivonex Coach:

  • System A — claudeService (Anthropic Claude): a backend function proxying the Anthropic Messages API with the ANTHROPIC_API_KEY secret. Default model claude-sonnet-5, thinking disabled, max 8192 output tokens.
  • System B — InvokeLLM (Base44 built-in integration): a different hosted LLM. Most calls use the default "automatic" model; two explicitly request "gemini_3_flash". This is not Claude.

This split is the single most important finding: you are paying for and maintaining two AI stacks that overlap heavily.


PART 1 — Current Claude AI Usage

1.1 Features using Claude (Anthropic) via claudeService

1. Check-in Analysis (CheckinDetail / CheckinReview)

  • What Claude does: structured weekly analysis — summary, wins, concerns, risk level, patterns, day-by-day flags, suggested coach actions, video talking points, draft client feedback.
  • Model: claude-sonnet-5
  • Data sent: weekly aggregate metrics + 7-day daily breakdown + weight trend + previous 3 coach replies + client profile/goal/injuries + pre-calculated compliance score.
  • Data returned: validated JSON (~10 fields).
  • Backend function: analyseClientCheckIn -> claudeService
  • Status: PARTIALLY WORKING — runs on manual regenerate; the entity automation ("Auto-Analyse Client Check-in") shows last_run_status "failed" (1 consecutive failure), so auto-analysis on submission is currently broken.
  • Estimated cost / request: ~3-5k input, ~1-2k output = $0.01-$0.03

2. Coach Copilot — Daily Brief (CoachSuccessDashboard)

  • What Claude does: executive daily intelligence — greeting, exec summary, urgent items, check-ins to review, programme review candidates, engagement concerns, billing alerts, business summary, suggested priorities.
  • Model: claude-sonnet-5
  • Data sent: all of the coach's clients with deterministic status + priority pre-computed, key metrics, business counts.
  • Data returned: validated structured JSON brief. Cached daily per coach with auto-invalidation.
  • Backend function: generateCoachCopilotBrief -> claudeService
  • Status: WORKING (tested 200 OK; cached).
  • Estimated cost / request: first call/day ~5-15k input, ~2-4k output = $0.02-$0.07; cached calls = $0

3. Coach Copilot — Ask (dashboard question chips)

  • What Claude does: answers predefined or free-text questions scoped to the coach's own clients, with evidence + clickable client actions.
  • Model: claude-sonnet-5
  • Data sent: question key/text + condensed client dataset.
  • Data returned: JSON answer + evidence array + client actions.
  • Backend function: askCoachCopilot -> claudeService
  • Status: WORKING
  • Estimated cost / request: ~3-8k input, ~1-2k output = $0.01-$0.04

4. claudeService itself

  • Role: reusable Anthropic proxy; injects JSON-schema instruction, parses JSON, returns result + model + usage.
  • Status: WORKING (the hub for features 1-3)

Claude total active surfaces: 3 features, 1 service function.


1.2 Features using a non-Claude LLM (InvokeLLM) — NOT Claude

5. Client Profile Copilot Briefing (useClientInsights -> CopilotBriefing)

  • What it does: 2-3 sentence client summary for the coach.
  • Model: automatic (default, not Claude)
  • Data sent / returned: computed metrics block -> prose summary. Auto-runs on every client profile open.
  • Status: Working
  • Cost: Base44 integration credit

6. Workout Studio — AI Builder

  • What it does: generates a full workout programme from a text prompt.
  • Model: automatic
  • Data sent / returned: prompt + JSON schema -> programme JSON
  • Status: Working
  • Cost: integration credit (large)

7. Nutrition Studio — AI Meal Plan Builder

  • What it does: generates meal plan + shopping list from a text prompt.
  • Model: automatic
  • Data sent / returned: prompt + JSON schema -> plan JSON
  • Status: Working
  • Cost: integration credit (large)

8. Client AI Chat / FoodLog (AIChat)

  • What it does: food estimation (calories/macros) + general chat, confirm-before-log.
  • Model: automatic
  • Data sent / returned: client profile + message + JSON schema -> intent + estimate + reply
  • Status: Working
  • Cost: integration credit per message

9. Check-in Suggested Reply (CoachAISuggestedReply)

  • What it does: drafts the coach's weekly reply to the client.
  • Model: automatic
  • Data sent / returned: full check-in data block -> prose reply. Auto-generates on open.
  • Status: Working
  • Cost: integration credit

10. Client Progress — AI Progress Coach (AIProgressCoach)

  • What it does: motivational progress bullets + next milestone.
  • Model: gemini_3_flash
  • Data sent / returned: computed facts -> bullet summary. Has deterministic fallback.
  • Status: Working (falls back often)
  • Cost: integration credit

11. Client Progress — AI Summary (AIProgressSummary)

  • What it does: one-sentence transformation summary.
  • Model: gemini_3_flash
  • Data sent / returned: computed facts -> one sentence. Has deterministic fallback.
  • Status: Working (falls back often)
  • Cost: integration credit

1.3 "AI-branded" features that use NO LLM (deterministic logic only)

  • CoachAIRecommendation (nutrition "best option" recommendation) — pure macro-gap math.
  • AILiftCoachModal + voiceCoach.js — browser Web Speech API TTS, no AI.
  • getCheckInDailyBreakdown — rule-based weekly insights (missed workouts, low-protein days, sleep decline).
  • weightReminderCheck, supplementReminders (scheduled) — pure notification logic.
  • progressReport, coachLandingPage, socialProof — pure DB/PDF logic.

1.4 Duplicates & unnecessary LLM calls

  1. Check-in double-analysis (highest-impact duplicate). analyseClientCheckIn (Claude) already returns draft_client_feedback. Then CoachAISuggestedReply makes a separate InvokeLLM call on the same check-in to write essentially the same reply. Two LLM calls, overlapping output, two different models. Recommendation: use the Claude draft_client_feedback as the reply seed; drop the second InvokeLLM call, or keep only a "regenerate" action.

  2. Three overlapping client summaries. For one client the coach can see: (a) useClientInsights InvokeLLM summary, (b) the per-client CopilotBriefing (deterministic), (c) the dashboard CoachCopilotBrief (Claude). (a) is an LLM call that largely restates deterministic metrics. Recommendation: replace (a) with the deterministic briefing already computed, or fold it into the Claude brief.

  3. Two LLM calls on the Progress page. AIProgressCoach and AIProgressSummary both fire InvokeLLM on the same page load, both with deterministic fallbacks that already render fine. Recommendation: consolidate to one call, or serve the fallback and offer a single "Generate AI summary" button.

  4. Auto-generate on mount. CoachAISuggestedReply, useClientInsights, and both Progress components auto-fire LLM calls on page open whether the user wants them or not. Each open = a billed call. Consider making them explicit or caching per day.


PART 2 — Existing Features That Could Be Connected to Claude

High priority

Workout Studio — auto-progression / deload

  • Why Claude helps: coaches manually decide next-week load changes; AI can ground this in the client's actual logged volume, RIR, failed sets.
  • What Claude would do: read recent WorkoutLogs -> suggest per-exercise set/rep/weight changes + flag deload weeks. Coach approves.
  • Priority: High
  • Complexity: Medium (new backend fn reusing claudeService)
  • Estimated cost increase: ~1 call/week per client = low

Messaging — coach reply drafting & client Q&A

  • Why Claude helps: ClientMessages has no AI; coaches type every reply.
  • What Claude would do: draft replies in the coach's ai_motivation_style; answer common client questions using their plan/context. Never auto-send.
  • Priority: High
  • Complexity: Medium
  • Estimated cost increase: per-message, modest

Client Dashboard — personalised daily nudge

  • Why Claude helps: uses the coach's ai_motivation_style / ai_unique_value fields that exist but aren't fully leveraged.
  • What Claude would do: generate a short daily motivational message tailored to today's plan + recent adherence.
  • Priority: High
  • Complexity: Low-Medium
  • Estimated cost increase: 1 call/client/day — highest volume, watch cost

Onboarding — programme & nutrition template matching

  • Why Claude helps: coaches pick templates manually; new clients get generic defaults.
  • What Claude would do: match onboarding answers (goal, equipment, experience, foods to avoid) to the coach's library templates and suggest the best fit.
  • Priority: High
  • Complexity: Medium
  • Estimated cost increase: 1 call per new client

Technique Review — form video analysis

  • Why Claude helps: TechniqueReview entity exists with no AI analysis.
  • What Claude would do: Claude vision analyses uploaded form video -> form cues, risks, suggested corrections.
  • Priority: High
  • Complexity: High (vision model, larger cost)
  • Estimated cost increase: per review, higher per-call cost

Medium priority

Check-ins — multi-week trend analysis

  • Why: current analysis is single-week; patterns across weeks are missed.
  • What: compare last 4-8 check-ins -> plateau/stall detection, trend risks, programme-reset triggers.
  • Priority: Medium
  • Complexity: Medium
  • Cost: 1 call per check-in (piggyback)

Nutrition Studio — macro adjustment advice

  • Why: coaches guess target changes; AI can tie them to adherence + weight trend.
  • What: suggest calorie/macro changes with rationale based on 2-4 weeks of data.
  • Priority: Medium
  • Complexity: Low-Medium
  • Cost: per adjustment

Meal Logging — photo food estimation

  • Why: AIChat only does text estimation.
  • What: Claude vision on meal photo -> detect foods + estimate portions/macros, confirm before logging.
  • Priority: Medium
  • Complexity: Medium-High
  • Cost: per photo, vision cost

Challenges — personalised challenge generation

  • Why: challenges are manual/library-only.
  • What: generate goal-appropriate challenges for an individual or group based on adherence gaps.
  • Priority: Medium
  • Complexity: Low-Medium
  • Cost: per generation

History — narrative weekly/monthly recaps

  • Why: history is data-only.
  • What: write a short narrative recap of the week/month for the client.
  • Priority: Medium
  • Complexity: Low
  • Cost: per recap

Landing Page Builder — copy & testimonial drafting

  • Why: coaches write all copy.
  • What: draft headlines, CTAs, package descriptions, and testimonial-style summaries from transformation data (with permission).
  • Priority: Medium
  • Complexity: Low
  • Cost: per generation

Admin — churn / anomaly detection

  • Why: admin flags are rule-based.
  • What: Claude scans client engagement patterns to flag likely cancellations/churn before they happen.
  • Priority: Medium
  • Complexity: Medium
  • Cost: batched, scheduled

Low priority

Notifications — smart prioritisation

  • Rule-based grouping exists; re-rank by likely impact. Medium complexity, low value vs. rules already in place.

Supplement Studio — interaction checks

  • Flag potential supplement interactions from the stack. Medium complexity, per plan.

Stripe/billing — dunning message drafting

  • Personalised recovery message in coach voice for failed payments. Low complexity, per failed payment.

Where Claude is currently used for tasks that should be plain logic

  • AIProgressCoach & AIProgressSummary — both already produce a perfectly good deterministic fallback from the same facts. The LLM call adds marginal polish for a billed round-trip on every Progress page open. Recommendation: serve the deterministic summary by default; offer Claude as an optional "rewrite" only.
  • useClientInsights summary — summarises metrics that are already computed and displayed. A deterministic template would render instantly and for free. Recommendation: replace with template logic (or reuse the existing CopilotBriefing).
  • CoachAISuggestedReply — duplicates analyseClientCheckIn.draft_client_feedback. Recommendation: seed the reply from the Claude analysis already stored on the check-in; remove the parallel InvokeLLM call.
  • The compliance score and client status/priority are correctly kept deterministic (Claude is told the score, not asked to compute it). Keep this pattern for any new feature.

Summary Table

| Feature | Claude Connected | Working | Recommended | Priority | |---------|------------------|---------|-------------|----------| | Check-in Analysis (analyseClientCheckIn) | Yes — Claude Sonnet 5 | Partial — manual only (automation failing) | Fix automation; reuse its draft for reply | High | | Coach Copilot Daily Brief | Yes — Claude Sonnet 5 | Yes | Keep; expand trigger coverage | High | | Coach Copilot Ask | Yes — Claude Sonnet 5 | Yes | Keep | High | | Client Profile Summary (useClientInsights) | No — InvokeLLM (auto) | Yes | Replace with deterministic or fold into Copilot | High (cost saver) | | Check-in Suggested Reply | No — InvokeLLM (auto) | Yes | Remove duplicate; use Claude draft | High (cost saver) | | Workout Studio AI Builder | No — InvokeLLM (auto) | Yes | Add auto-progression (Claude) | High | | Nutrition Studio AI Builder | No — InvokeLLM (auto) | Yes | Add macro-adjustment advice (Claude) | Medium | | Client AI Chat / FoodLog | No — InvokeLLM (auto) | Yes | Add photo estimation (Claude vision) | Medium | | AI Progress Coach | No — Gemini Flash | Yes (fallback) | Make deterministic default, Claude optional | Low | | AI Progress Summary | No — Gemini Flash | Yes (fallback) | Make deterministic default, Claude optional | Low | | Strivonex Coach Recommendation (nutrition) | No — Deterministic | Yes | Keep deterministic | — | | AI Lift Coach (voice) | No — Browser TTS | Yes | No AI needed | — | | Messaging | No — None | Yes | Add Claude reply drafting + Q&A | High | | Client daily nudge | No — None | Yes | Add Claude personalisation (watch volume) | High | | Technique Review | No — None (entity exists) | Yes | Add Claude vision form analysis | High | | Onboarding matching | No — None | Yes | Add Claude template matching | High | | Multi-week check-in trends | No — None | Yes | Add Claude trend analysis | Medium | | Challenges generation | No — None | Yes | Add Claude generation | Medium | | History narrative recaps | No — None | Yes | Add Claude recaps | Medium | | Landing page copy | No — None | Yes | Add Claude drafting | Medium | | Admin churn detection | No — None | Yes | Add Claude anomaly scan | Medium | | Supplement interactions | No — None | Yes | Add Claude interaction check | Low | | Notifications prioritisation | No — Rules | Yes | Keep rules | Low | | Stripe dunning | No — None | Yes | Add Claude drafting | Low |


Top three actions for biggest impact

  1. Fix the analyseClientCheckIn entity automation (it is failing) and delete the duplicate CoachAISuggestedReply InvokeLLM call — one change removes a duplicate bill and restores auto-analysis.
  2. Consolidate the two LLM stacks — pick Claude as the single AI provider and migrate the five InvokeLLM features (or formally keep Gemini Flash for the cheap progress blurbs). Right now you have inconsistent quality, inconsistent safety rules, and untraceable cost.
  3. Prioritise the four high-value, low-complexity additions: workout auto-progression, messaging reply drafting, daily nudge personalisation, and onboarding template matching — all reuse the existing claudeService with the established deterministic-first safety pattern.