workout generator audit: rules engine, structure rules, split patterns, injury UX, metadata cleanup

- Add rules_engine.py with quantitative rules for all 8 workout types
- Add quality gate retry loop in generate_single_workout()
- Expand calibrate_structure_rules to all 120 combinations (8 types × 5 goals × 3 sections)
- Wire WeeklySplitPattern DB records into _pick_weekly_split()
- Enforce movement patterns from WorkoutStructureRule in exercise selection
- Add straight-set strength support (single main lift, 4-6 rounds)
- Add modality consistency check for duration-dominant workout types
- Add InjuryStep component to onboarding and preferences
- Add sibling exercise exclusion in regenerate and preview_day endpoints
- Display generator warnings on dashboard
- Expand fix_rep_durations, fix_exercise_flags, fix_movement_pattern_typo
- Add audit_exercise_data and check_rules_drift management commands
- Add Next.js frontend with dashboard, onboarding, preferences, history pages
- Add generator app with ML-powered workout generation pipeline
- 96 new tests across 7 test modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-22 20:07:40 -06:00
parent 2a16b75c4b
commit 1c61b80731
111 changed files with 28108 additions and 30 deletions

View File

@@ -34,6 +34,8 @@ INSTALLED_APPS = [
'import_export',
'push_notifications',
'corsheaders',
'equipment',
'exercise',
'registered_user',
@@ -42,11 +44,13 @@ INSTALLED_APPS = [
'scripts',
'video',
'superset',
'generator',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
"whitenoise.middleware.WhiteNoiseMiddleware",
'corsheaders.middleware.CorsMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
@@ -198,6 +202,12 @@ else:
}
}
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
}
}
CELERY_BROKER_URL = "redis://redis:6379"
CELERY_RESULT_BACKEND = "redis://redis:6379"
@@ -210,4 +220,12 @@ else:
# "APNS_TOPIC": "io.brodkast.ios-Dev",
# "APNS_TEAM_ID": "JCU65VV9D9",
# "APNS_USE_SANDBOX": True
# }
# }
# CORS settings
CORS_ALLOW_ALL_ORIGINS = True if DEBUG else False
CORS_ALLOWED_ORIGINS = [
'http://localhost:3000',
'http://127.0.0.1:3000',
]
CORS_ALLOW_CREDENTIALS = True

View File

@@ -23,6 +23,7 @@ urlpatterns = [
path('.well-known/apple-app-site-association', TemplateView.as_view(template_name='frontend/apple-app-site-association', content_type='application/json',)),
path('scripts/', include('scripts.urls')),
path('videos/', include('video.urls')),
path('generator/', include('generator.urls')),
path('app/', TemplateView.as_view(template_name='frontend/download.html')),
path('ipa_plist/', ipa_plist),