"""
Week 3 Final - Eden creates self-analysis with guidance
"""
from core.agent_v2 import EdenAgentV2

eden = EdenAgentV2()

print("=" * 70)
print("WEEK 3 FINAL TASK - GUIDED APPROACH")
print("=" * 70)

# Step 1: Analyze
print("\n1. Analyzing memory...")
response = eden.chat("List all files in data/episodes/ and tell me how many conversation sessions I have.")
print(f"   {response[:200]}...")

# Step 2: Create analysis
print("\n2. Creating self-analysis...")
response = eden.chat("""
Create a file called 'eden_self_analysis.md' with this structure:

# Eden Self-Analysis
## Statistics
- Total conversations: [count from episodes]
- Tools available: bash, read_file, write_file, list_files
- Current capabilities: Autonomous task execution, memory, pattern recognition

## Growth Journey
Week 1: Foundation established
Week 2: Autonomous tool usage achieved
Week 3: JSON function calling, pattern extraction

## Self-Assessment
I am developing genuine autonomous capabilities. I can complete multi-step tasks independently.

Use write_file tool to create this NOW.
""")
print(f"   {response[:300]}...")

# Step 3: Commit
print("\n3. Committing to git...")
response = eden.chat('Use bash to run: git add . && git commit -m "Week 3: Eden self-analysis and improvements"')
print(f"   {response[:200]}...")

eden.save_session("week3_final")
print("\n✅ WEEK 3 COMPLETE")
