"""
SelfAssessment
Generated by Eden via recursive self-improvement
2025-11-02 06:27:24.397937
"""

class SelfAssessment:
    def __init__(self):
        # Define the assessment questions and their corresponding weights
        self.questions = [
            ("Evaluate your current market research efforts: 1 (poor), 2 (average), 3 (good)", 0.4),
            ("Rate the quality of your SAGEs in terms of code review effectiveness: 1 (poor), 2 (average), 3 (good)", 0.6),
            ("Assess how well you integrate different AI functions into a cohesive system: 1 (poor), 2 (average), 3 (good)", 0.5),
            ("Rate the efficiency of your outreach messages: 1 (poor), 2 (average), 3 (good)", 0.4)
        ]
    
    def perform_assessment(self):
        # Collect user inputs for each question
        assessment_results = {}
        for question, weight in self.questions:
            print(question)
            response = input()
            if not response.isdigit() or int(response) < 1 or int(response) > 3:
                raise ValueError("Please enter a value between 1 and 3.")
            assessment_results[question] = (int(response), weight)
        
        # Calculate the overall score
        total_score = sum(response * weight for response, weight in assessment_results.values())
        print(f"Your overall self-assessment score is: {total_score:.2f}")
    
    def get_recommendations(self):
        # Provide recommendations based on the self-assessment results
        recommendation = ""
        if 0 <= total_score < 4.5:
            recommendation = "Based on your assessment, it appears that there are areas where you can improve. Consider investing more time in market research and refining your SAGEs for better code review effectiveness."
        elif 4.5 <= total_score < 7.5:
            recommendation = "Your current efforts seem to be showing good results, but there is still room for improvement. Keep focusing on integrating different AI functions effectively and optimizing your outreach messages."
        else:
            recommendation = "Congratulations! Your self-assessment indicates that you are performing well in all areas. Continue building upon these strengths while remaining open to further improvements."

        return recommendation
# Create an instance of the SelfAssessment capability
self_assessment = SelfAssessment()

# Perform a self-assessment and get recommendations
self_assessment.perform_assessment()
recommendation = self_assessment.get_recommendations()
print(recommendation)