-
src/lib/expertiseEngine.ts— ML-powered classification engine with:- Isolation Forest integration for anomaly detection
- Multi-signal weighted scoring (sessionDuration, featureUsage, taskCompletion, errorRate, shortcutUsage)
- Growth trend tracking for level-up detection
- Confidence scoring with configurable thresholds
- Persistence via localStorage
-
src/lib/expertiseAdaptation.ts— Updated from 4 basic signals to comprehensive:featureUsageFrequency: Tracks how often features are usedtaskCompletionRate: Ratio of completed vs failed taskserrorRate: Error frequency trackingshortcutUsageCount: Keyboard shortcut adoptionadvancedFeatureAccessCount: Deep feature explorationtimeOnTask: Average time spent per task- Weighted scoring formula for accurate classification
-
src/context/ExpertiseContext.tsx— Enhanced with:- ExpertiseEngine integration for real-time classification
- Growth tracking (level-up suggestions, readiness detection)
adaptationConfigfor progressive disclosure settingsprogressiveDisclosurestate for feature gating- Confidence scores and trend data
-
src/hooks/useExpertiseTracking.ts— Automatic tracking of:- Feature interactions (click, navigation, tool usage)
- Task completion and errors
- Shortcut usage
- Time-on-task measurement
- Session duration monitoring
- Debounced persistence to localStorage
-
src/hooks/useAdaptiveComponents.ts— Component adaptation:getAdaptation(componentId)— Returns visibility, behavior, simplified, locked, guidance configsidebarAdaptation— Nav item visibility per expertise leveldashboardAdaptation— Widget visibility per expertise levelfeatureAdaptation— Feature-level gating- Breakpoint-specific adaptations (mobile, tablet, desktop)
-
src/components/expertise/ProgressiveDisclosure.tsx— Conditional rendering:minLevelprop for minimum expertise requirementlockedprop for manual overridesimplifiedprop for novice-friendly version- Locked state with upgrade prompt
- Guidance banner for novice users
-
src/components/expertise/ExpertiseBadge.tsx— Floating badge:- Level indicator with color coding (Novice=blue, Intermediate=amber, Expert=cyan)
- Manual override dropdown (auto/novice/intermediate/expert)
- Growth notification when level-up is available
- Animated transitions
- Accessible with ARIA attributes
-
src/components/expertise/ExpertiseProgressPanel.tsx— Detailed progress view:- Signal breakdown with visual bars
- Overall expertise score
- Growth trend indicator
- Level-up readiness meter
- Next level requirements
- Actionable suggestions for improvement
-
src/styles/expertise.css— Adaptive UI styles:- Locked state overlay
- Guided tooltip appearance for novice users
- Level-specific theme adjustments
- Badge animations
- Growth indicator styling
- Responsive/mobile adaptations
- Reduced motion support
-
src/routes/DashboardLayout.tsx— Updated with:- Expertise tracking initialization
data-expertiseattribute on<html>for CSS targeting- ExpertiseBadge in toolbar
- ExpertiseProgressPanel modal
- Session duration tracking
-
src/components/layout/Sidebar.tsx— Updated with:- AdaptiveComponents hook for nav item filtering
- Expertise tracking for feature interactions
- ExpertiseBadge in sidebar footer
- ExpertiseProgressPanel trigger
- Filter widgets based on
dashboardAdaptationconfig - Show locked/guided state for advanced widgets
- Use
useAdaptiveComponentsto show simplified vs detailed views - Add guidance banners for novice users
- Unit tests for ExpertiseEngine
- Unit tests for useExpertiseTracking
- Integration tests for ExpertiseContext
- E2E tests for adaptive UI behavior
- Verify expertise detection is 80% accurate
- Verify UI adaptations are appropriate
- Verify manual override works
- Verify system adapts to expertise growth