Documentation
¶
Index ¶
- type CategoryProductivityStats
- type DailyProductivityPattern
- type DayStat
- type EfficiencyMetrics
- type HeatmapAnalyzer
- type HeatmapData
- type HourStat
- type ProductivityAnalyzer
- type ProductivityMetrics
- type ProductivityTip
- type SeasonalTrends
- type StreakAnalysis
- type TimeInsights
- type WeeklyProductivityPattern
- type WorkLifeBalanceScore
- type WorkingPattern
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryProductivityStats ¶
type CategoryProductivityStats struct {
TopCategory categories.Category `json:"top_category"`
MostImproved categories.Category `json:"most_improved"`
CategoryScores map[categories.Category]float64 `json:"category_scores"`
DiversityScore float64 `json:"diversity_score"`
SpecializationLevel string `json:"specialization_level"`
}
CategoryProductivityStats analyzes productivity by command category
type DailyProductivityPattern ¶
type DailyProductivityPattern struct {
PeakHours []int `json:"peak_hours"`
PeakScore float64 `json:"peak_score"`
LowHours []int `json:"low_hours"`
HourlyStats map[int]*HourStat `json:"hourly_stats"`
MorningScore float64 `json:"morning_score"` // 6-12
AfternoonScore float64 `json:"afternoon_score"` // 12-18
EveningScore float64 `json:"evening_score"` // 18-24
NightScore float64 `json:"night_score"` // 0-6
}
DailyProductivityPattern represents hourly productivity
type DayStat ¶
type DayStat struct {
Day time.Weekday `json:"day"`
CommandCount int `json:"command_count"`
Productivity float64 `json:"productivity"`
CategorySpread int `json:"category_spread"`
}
DayStat represents statistics for a specific day of the week
type EfficiencyMetrics ¶
type EfficiencyMetrics struct {
CommandsPerSession float64 `json:"commands_per_session"`
AverageSessionLength float64 `json:"average_session_length"`
RepetitiveCommands float64 `json:"repetitive_commands"`
UniqueCommandRatio float64 `json:"unique_command_ratio"`
ComplexityScore float64 `json:"complexity_score"`
AutomationPotential float64 `json:"automation_potential"`
}
EfficiencyMetrics measures command efficiency and patterns
type HeatmapAnalyzer ¶
type HeatmapAnalyzer struct{}
HeatmapAnalyzer generates productivity heatmaps and time insights
func NewHeatmapAnalyzer ¶
func NewHeatmapAnalyzer() *HeatmapAnalyzer
NewHeatmapAnalyzer creates a new heatmap analyzer
func (*HeatmapAnalyzer) FormatHeatmapVisualization ¶
func (ha *HeatmapAnalyzer) FormatHeatmapVisualization(heatmapData *HeatmapData) string
FormatHeatmapVisualization creates ASCII heatmap visualization
func (*HeatmapAnalyzer) GenerateHeatmap ¶
func (ha *HeatmapAnalyzer) GenerateHeatmap(commands []*models.Command) *HeatmapData
GenerateHeatmap creates productivity heatmap data
func (*HeatmapAnalyzer) GenerateTimeInsights ¶
func (ha *HeatmapAnalyzer) GenerateTimeInsights(heatmapData *HeatmapData, commands []*models.Command) *TimeInsights
GenerateTimeInsights creates actionable time management insights
type HeatmapData ¶
type HeatmapData struct {
WeeklyHeatmap map[time.Weekday]map[int]float64 `json:"weekly_heatmap"`
MonthlyHeatmap map[int]map[int]float64 `json:"monthly_heatmap"` // day -> hour -> intensity
OptimalHours []int `json:"optimal_hours"`
PeakDays []time.Weekday `json:"peak_days"`
WorkingPatterns []WorkingPattern `json:"working_patterns"`
FocusScore float64 `json:"focus_score"`
DistributionType string `json:"distribution_type"`
}
HeatmapData represents heatmap visualization data
type HourStat ¶
type HourStat struct {
Hour int `json:"hour"`
CommandCount int `json:"command_count"`
Productivity float64 `json:"productivity"`
Diversity float64 `json:"diversity"`
}
HourStat represents statistics for a specific hour
type ProductivityAnalyzer ¶
type ProductivityAnalyzer struct {
// contains filtered or unexported fields
}
ProductivityAnalyzer analyzes user productivity patterns
func NewProductivityAnalyzer ¶
func NewProductivityAnalyzer() *ProductivityAnalyzer
NewProductivityAnalyzer creates a new productivity analyzer
func (*ProductivityAnalyzer) AnalyzeProductivity ¶
func (pa *ProductivityAnalyzer) AnalyzeProductivity(commands []*models.Command, sessions []*models.Session) *ProductivityMetrics
AnalyzeProductivity performs comprehensive productivity analysis
func (*ProductivityAnalyzer) FormatProductivityReport ¶
func (pa *ProductivityAnalyzer) FormatProductivityReport(metrics *ProductivityMetrics) string
FormatProductivityReport generates a formatted productivity report
type ProductivityMetrics ¶
type ProductivityMetrics struct {
OverallScore float64 `json:"overall_score"`
DailyPattern DailyProductivityPattern `json:"daily_pattern"`
WeeklyPattern WeeklyProductivityPattern `json:"weekly_pattern"`
CategoryInsights CategoryProductivityStats `json:"category_insights"`
StreakAnalysis StreakAnalysis `json:"streak_analysis"`
EfficiencyMetrics EfficiencyMetrics `json:"efficiency_metrics"`
TimeDistribution map[string]float64 `json:"time_distribution"`
}
ProductivityMetrics holds comprehensive productivity analysis
type ProductivityTip ¶
type ProductivityTip struct {
Category string `json:"category"`
Title string `json:"title"`
Description string `json:"description"`
Impact string `json:"impact"` // high, medium, low
Effort string `json:"effort"` // high, medium, low
Priority int `json:"priority"` // 1-10
}
ProductivityTip provides actionable productivity advice
type SeasonalTrends ¶
type SeasonalTrends struct {
WeekdayTrend string `json:"weekday_trend"` // increasing, decreasing, stable
WeekendPattern string `json:"weekend_pattern"` // active, inactive, balanced
MonthlyTrend string `json:"monthly_trend"`
Seasonality float64 `json:"seasonality"` // 0-100
}
SeasonalTrends analyzes productivity trends over time
type StreakAnalysis ¶
type StreakAnalysis struct {
CurrentStreak int `json:"current_streak"`
LongestStreak int `json:"longest_streak"`
ConsistencyScore float64 `json:"consistency_score"`
DaysActive int `json:"days_active"`
WeeksActive int `json:"weeks_active"`
AverageGap float64 `json:"average_gap"`
}
StreakAnalysis analyzes usage streaks and consistency
type TimeInsights ¶
type TimeInsights struct {
Recommendations []string `json:"recommendations"`
OptimalSchedule map[string]string `json:"optimal_schedule"`
ProductivityTips []ProductivityTip `json:"productivity_tips"`
SeasonalTrends SeasonalTrends `json:"seasonal_trends"`
WorkLifeBalance WorkLifeBalanceScore `json:"work_life_balance"`
}
TimeInsights provides detailed time-based insights
type WeeklyProductivityPattern ¶
type WeeklyProductivityPattern struct {
MostProductiveDay time.Weekday `json:"most_productive_day"`
LeastProductiveDay time.Weekday `json:"least_productive_day"`
WeekdayScore float64 `json:"weekday_score"`
WeekendScore float64 `json:"weekend_score"`
DailyStats map[time.Weekday]*DayStat `json:"daily_stats"`
}
WeeklyProductivityPattern represents daily productivity across the week
type WorkLifeBalanceScore ¶
type WorkLifeBalanceScore struct {
Score float64 `json:"score"` // 0-100
WeekendActivity float64 `json:"weekend_activity"` // 0-100
EveningActivity float64 `json:"evening_activity"` // 0-100
OffHoursRatio float64 `json:"off_hours_ratio"` // 0-100
BalanceLevel string `json:"balance_level"` // excellent, good, needs_improvement, poor
Recommendations []string `json:"recommendations"`
}
WorkLifeBalanceScore evaluates work-life balance
type WorkingPattern ¶
type WorkingPattern struct {
Name string `json:"name"`
StartTime int `json:"start_time"` // hour
EndTime int `json:"end_time"` // hour
Intensity float64 `json:"intensity"` // 0-100
Days []time.Weekday `json:"days"`
Confidence float64 `json:"confidence"` // 0-100
Description string `json:"description"`
}
WorkingPattern represents identified working patterns