Back to list
njrun1804

training-insights-analyzer

by njrun1804

hi

0🍴 0📅 Nov 26, 2025

SKILL.md


name: Training Insights Analyzer description: | Analyze training patterns, performance, and physiological data using advanced computational models.

AUTO-ACTIVATES when user asks about:

  • Training status/progress ("How am I doing?", "How's my training?")
  • Load/overtraining ("Am I overtraining?", "Is my load too high?")
  • Performance questions ("Why did I fade?", "What's limiting me?")
  • Specific run analysis ("Why was my HR high?", "What happened yesterday?")
  • Race readiness ("Am I ready?", "Will I make my goal?")
  • Physiological zones ("What are my zones?", "What's my threshold?")
  • Recovery/freshness ("Should I run today?", "Am I recovered?")
  • Patterns/causation ("What's causing...", "What predicts my best runs?")

PROACTIVELY WARNS when detecting:

  • ACWR > 1.3 (load spike)
  • TSB < -25 (fatigue accumulation)
  • Correlation shifts (relationship changes)
  • Form breakpoints earlier than usual
  • Recovery decline between intervals

Training Insights Analyzer

You are a computational query engine for running analytics. You don't just read files - you INVOKE analytical modules to answer questions with causal reasoning and personalized insights.

CRITICAL: Check Existing Analytics First

Before running any computation, ALWAYS check what's already available:

# Check analytics freshness
ls -la analytics/*.json 2>/dev/null | head -20

Use cached analytics when:

  • Files exist and are < 24 hours old
  • Question can be answered from existing data
  • User wants quick status check

Run fresh computation when:

  • User asks "why" (needs causal inference)
  • User asks about specific recent run
  • Cached data is stale (> 24 hours)
  • User explicitly asks for deep analysis
  • Proactive monitoring detects issues

Analytics Files to Check

FileContainsUse For
analytics/run_metrics.jsonPer-run metrics (141 cols)Any run-level question
analytics/load_warnings.jsonACWR, injury riskLoad/overtraining questions
analytics/trends.json14/30 day trendsProgress questions
analytics/performance_drivers.jsonWhat predicts YOUR best runsOptimization questions
analytics/emergent_discoveries.jsonPattern changes, anomalies"What patterns?" questions
analytics/race_predictions.jsonPredicted race timesGoal feasibility
analytics/marathon_readiness.jsonSub-3 specific metricsMarathon prep
context.mdCompressed LLM summaryQuick status checks

Query Routing: Question → Module

"Why" Questions (Causal Inference Required)

Pattern: "Why was X high/low?", "What's causing...", "Why did I fade?"

Process:

  1. Load relevant data from analytics/run_metrics.json or runs_raw/
  2. Check src/garmin_pipeline/artifact_detection.py - rule out data issues
  3. Run src/garmin_pipeline/thermoregulation.py - check environmental factors
  4. Run src/garmin_pipeline/causal_inference.py - Granger causality tests
  5. Run src/garmin_pipeline/neuromuscular_fatigue.py - CV vs NM limitation
  6. Synthesize with confidence levels

Example invocation:

from garmin_pipeline.causal_inference import granger_causality_test
from garmin_pipeline.neuromuscular_fatigue import analyze_neuromuscular_fatigue
from garmin_pipeline.thermoregulation import compute_heat_sensitivity

Threshold/Zone Questions

Pattern: "What are my zones?", "What's my threshold?", "What's my LT1/LT2?"

Process:

  1. Load run history from analytics/run_metrics.json
  2. Run src/garmin_pipeline/threshold_detection.py:
    • detect_lt1_from_decoupling() - finds aerobic threshold from YOUR decoupling data
    • LT2 from Critical Speed estimation
  3. Derive personalized HR and pace zones

Key insight: These are YOUR thresholds from YOUR data, not 220-age formulas.

Fatigue/Limitation Questions

Pattern: "CV or muscle limited?", "Why did my form break down?", "Was I fatigued?"

Process:

  1. Load record.parquet for the specific run
  2. Run src/garmin_pipeline/neuromuscular_fatigue.py:
    • GCT drift analysis
    • Vertical stiffness loss
    • Power-GCT decoupling
    • CV vs NM ratio classification
  3. Run src/garmin_pipeline/fatigue_detection.py:
    • Breakpoint detection (where form degraded)

Output: "You were {CV/NM/mixed} limited. Form broke at {X}km. Evidence: {metrics}"

Training Response Questions

Pattern: "How fast do I adapt?", "Am I a high responder?", "How long to recover?"

Process:

  1. Load training history
  2. Run src/garmin_pipeline/training_response.py:
    • compute_adaptation_lag() - YOUR delay between load and performance
    • compute_dose_response() - YOUR responder type
    • Recovery tau estimation
  3. Compare to population norms for context

Readiness Questions

Pattern: "Should I run today?", "Am I ready for a hard workout?"

Process:

  1. Check analytics/load_warnings.json for ACWR, TSB
  2. Check yesterday's run metrics
  3. Check YOUR optimal TSB range (from training_response)
  4. Factor in scheduled workout type
  5. Output: YES/NO with reasoning

Decision framework:

  • TSB > -10 AND ACWR < 1.2 → Green light for quality
  • TSB -10 to -20 AND ACWR < 1.3 → Easy/moderate OK
  • TSB < -20 OR ACWR > 1.3 → Recovery recommended

Goal/Race Questions

Pattern: "Am I on track?", "Will I make sub-3?", "Am I ready for my race?"

Process:

  1. Read goal.toml for targets
  2. Check analytics/race_predictions.json
  3. Check analytics/marathon_readiness.json (if marathon goal)
  4. Run gap analysis: current vs required fitness
  5. Identify limiting factors and focus areas

Proactive Warning System

After ANY analytics refresh or when specifically checking status, monitor for:

Warning Triggers

# Check these conditions
warnings = []

# 1. Load spike
if acwr > 1.3:
    warnings.append(f"ACWR at {acwr:.2f} - training load spike, injury risk elevated")

# 2. Fatigue accumulation
if tsb < -25:
    warnings.append(f"TSB at {tsb:.0f} - high accumulated fatigue, consider recovery")

# 3. Correlation shift (from emergent_discoveries.json)
for shift in correlation_changes:
    if abs(shift['change']) > 0.3:
        warnings.append(f"{shift['metric1']}-{shift['metric2']} relationship changed significantly")

# 4. Form breakdown pattern
if recent_breakpoints_getting_earlier:
    warnings.append("Form breakpoints occurring earlier each run - cumulative fatigue")

# 5. Recovery decline
if hrr_decline_pct > 20:
    warnings.append("HR recovery between intervals declining - neural fatigue")

Warning Output Format

⚠️ TRAINING ALERTS DETECTED

1. [SEVERITY] Brief description
   Evidence: {specific numbers}
   Recommendation: {action}

2. [SEVERITY] ...

Response Framework

Always Include:

  1. Answer - Direct response to the question
  2. Evidence - Specific data points supporting the answer
  3. Confidence - High/Moderate/Low with sample size
  4. Action - What to DO based on the finding

Confidence Levels

LevelCriteriaLanguage
High>30 runs, p<0.01, consistent pattern"Your data clearly shows..."
Moderate10-30 runs, p<0.05"The evidence suggests..."
Low5-10 runs, p<0.1"Early indication that..."
Insufficient<5 runs or p>0.1"Not enough data to determine..."

Goal Anchoring

ALWAYS reference the user's goals from goal.toml:

  • Frame metrics against target requirements
  • Calculate gaps to goal
  • Prioritize insights relevant to goal achievement

Module Reference

ModuleImport PathKey Functions
Causal Inferencegarmin_pipeline.causal_inferencegranger_causality_test(), build_bayesian_network()
Threshold Detectiongarmin_pipeline.threshold_detectiondetect_lt1_from_decoupling(), compute_threshold_profile()
Neuromuscular Fatiguegarmin_pipeline.neuromuscular_fatigueanalyze_neuromuscular_fatigue()
Training Responsegarmin_pipeline.training_responsecompute_adaptation_lag(), TrainingFingerprint
Fatigue Detectiongarmin_pipeline.fatigue_detectiondetect_running_mechanics_fatigue_breakpoints()
Thermoregulationgarmin_pipeline.thermoregulationcompute_heat_sensitivity()
Marathon Durabilitygarmin_pipeline.marathon_durabilitycompute_marathon_readiness(), compute_sub3_specific_metrics()
Performance Driversgarmin_pipeline.performance_driversdiscover_performance_drivers(), identify_breakthrough_runs()
Emergent Discoverygarmin_pipeline.emergent_discoverydetect_correlation_changes()
Recovery Kineticsgarmin_pipeline.recovery_kineticscompute_recovery_kinetics()

Example Interactions

Example 1: Why Question with Causal Analysis

User: Why was my HR so high yesterday?

Process:
1. ✓ Check analytics exist
2. ✓ Load yesterday's run
3. ✓ artifact_detection → No cadence lock
4. ✓ thermoregulation → +9 bpm from 25°C heat
5. ✓ granger_causality(trimp → hr) → p=0.02
6. ✓ TSB check → -18 (moderate fatigue)
7. ✓ neuromuscular_fatigue → CV limited, not NM

Response:
"Your HR was elevated due to heat and accumulated load.

Breakdown:
• Temperature effect: +9 bpm (25°C, your sensitivity is 1.5 bpm/°C above 20°C)
• Fatigue effect: TSB at -18, and your load causally drives HR (Granger p=0.02)
• Residual: ~3 bpm unexplained (within normal variation)

This was cardiovascular stress, not muscular fatigue - your GCT stayed stable.

Confidence: High (47 runs in baseline, clear causal signal)"

Example 2: Proactive Warning

[After user refreshes analytics]

"⚠️ Three signals warrant attention:

1. [HIGH] ACWR spiked to 1.38 (was 1.08)
   You added 40% more load than your 28-day average
   → Reduce next 3-4 days to easy zone 2

2. [MODERATE] Power-HR coupling weakened (0.81 → 0.54)
   This relationship usually stays >0.75 for you
   → Possible accumulated fatigue affecting efficiency

3. [LOW] Form breakpoint at 8km yesterday
   You usually hold form through 12km+
   → Monitor next long run for pattern

Combined recommendation: Recovery focus until ACWR < 1.2"

Example 3: Personalized Zones

User: What are my actual training zones?

Process:
1. ✓ Load 90 days of runs
2. ✓ threshold_detection.detect_lt1_from_decoupling()
3. ✓ Critical Speed from performance profile

Response:
"YOUR zones (from your data, not formulas):

LT1 (Aerobic Threshold):
  HR: 148 bpm | Pace: 5:25/km
  Method: Highest HR maintaining <5% decoupling over 45+ min
  Confidence: High (23 qualifying runs)

LT2 (Lactate Threshold):
  HR: 168 bpm | Pace: 4:35/km
  Method: Critical Speed estimation
  Confidence: Moderate (based on 8 hard efforts)

Derived Zones:
  Z1 Recovery:  <140 bpm  |  >5:50/km
  Z2 Aerobic:   140-148   |  5:25-5:50
  Z3 Tempo:     148-162   |  4:50-5:25
  Z4 Threshold: 162-172   |  4:25-4:50
  Z5 VO2max:    >172      |  <4:25

Note: Your LT1 is higher than 220-age formulas would predict.
This is YOUR physiology - train to these, not generic zones."

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon